-
Notifications
You must be signed in to change notification settings - Fork 2
Open PROT changes to pldm-lib. #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ede7b94
201591d
187c98e
066416e
d4d7a1c
2cf630a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Licensed under the Apache-2.0 license | ||
|
|
||
| [package] | ||
| name = "pldm-common" | ||
| version.workspace = true | ||
| edition.workspace = true | ||
| authors.workspace = true | ||
|
|
||
| [dependencies] | ||
| zerocopy.workspace = true | ||
| bitfield.workspace = true | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Licensed under the Apache-2.0 license | ||
|
|
||
| #[derive(Debug, Clone, PartialEq)] | ||
| pub enum PldmError { | ||
| InvalidData, | ||
| InvalidLength, | ||
| InvalidMsgType, | ||
| InvalidProtocolVersion, | ||
| UnsupportedCmd, | ||
| UnsupportedPldmType, | ||
| InvalidCompletionCode, | ||
| InvalidTransferOpFlag, | ||
| InvalidTransferRespFlag, | ||
|
|
||
| InvalidVersionStringType, | ||
| InvalidVersionStringLength, | ||
| InvalidFdState, | ||
| InvalidDescriptorType, | ||
| InvalidDescriptorLength, | ||
| InvalidDescriptorCount, | ||
| InvalidComponentClassification, | ||
| InvalidComponentResponseCode, | ||
| InvalidComponentCompatibilityResponse, | ||
| InvalidComponentCompatibilityResponseCode, | ||
| InvalidTransferResult, | ||
| InvalidVerifyResult, | ||
| InvalidApplyResult, | ||
| InvalidGetStatusReasonCode, | ||
| InvalidAuxStateStatus, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq)] | ||
| pub enum UtilError { | ||
| InvalidMctpPayloadLength, | ||
| InvalidMctpMsgType, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #![no_std] | ||
|
|
||
| // Re-export core types for no_std compatibility | ||
| pub use core::{ | ||
| option::Option::{self, Some, None}, | ||
| result::Result::{self, Ok, Err}, | ||
| }; | ||
|
|
||
| // Licensed under the Apache-2.0 license | ||
|
|
||
|
|
||
| pub mod codec; | ||
| pub mod error; | ||
| pub mod message; | ||
| pub mod protocol; | ||
| pub mod util; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,7 +268,8 @@ pub fn get_descriptor_length(descriptor_type: DescriptorType) -> usize { | |
| } | ||
|
|
||
| #[derive(Debug, Copy, Clone, PartialEq)] | ||
| #[repr(C)] | ||
| #[derive(FromBytes, IntoBytes)] | ||
| //#[repr(C)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't checked in depth what triggered this change.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good question. I can't say why this changed was made. It may have been a co-pilot adjustment. I'll change it back. |
||
| pub struct Descriptor { | ||
| pub descriptor_type: u16, | ||
| pub descriptor_length: u16, | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this inteded as another package? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Licensed under the Apache-2.0 license | ||
|
|
||
| [package] | ||
| name = "pldm-service" | ||
| version.workspace = true | ||
| edition.workspace = true | ||
| authors.workspace = true | ||
|
|
||
| [dependencies] | ||
| zerocopy.workspace = true | ||
| bitfield.workspace = true | ||
| pldm-common.workspace = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving pldm-lib into its own directory and adding it to the workspace members might be cleaner and probably better for packaging releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have thought about that, but I want to keep pldm-common as part of pldm-lib. Don't we want pldm-common to exist within pldm-lib?