[−][src]Struct libmctp::smbus_response::MCTPSMBusContextResponse
The context for MCTP SMBus response protocol operations
Implementations
impl MCTPSMBusContextResponse
[src]
pub fn new(address: u8) -> Self
[src]
Create a new SBMust response context
address
: The source address of this device
pub fn set_endpoint_id(
&self,
completion_code: CompletionCode,
dest_addr: u8,
assignment_status: MCTPSetEndpointIDAssignmentStatus,
allocation_status: MCTPSetEndpointIDAllocationStatus,
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
assignment_status: MCTPSetEndpointIDAssignmentStatus,
allocation_status: MCTPSetEndpointIDAllocationStatus,
buf: &mut [u8]
) -> Result<usize, ()>
Assigns an EID to the endpoint at the given physical address
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
assignment_status
: EID assignment status
allocation_status
: Endpoint ID allocation status
buf
: A mutable buffer to store the request bytes.
EID dynamic Pools are not supported
Returns the length of the query on success.
pub fn get_endpoint_id(
&self,
completion_code: CompletionCode,
dest_addr: u8,
endpoint_type: MCTPGetEndpointIDEndpointType,
endpoint_id_type: MCTPGetEndpointIDEndpointIDType,
fairness_support: bool,
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
endpoint_type: MCTPGetEndpointIDEndpointType,
endpoint_id_type: MCTPGetEndpointIDEndpointIDType,
fairness_support: bool,
buf: &mut [u8]
) -> Result<usize, ()>
Returns the EID presently assigned to an endpoint. Also returns information about what type the endpoint is and its level of use of static EIDs.
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
endpoint_type
: Endpoint Type
endpoint_id_type
: Endpoint ID Type
fairness_support
: fairness arbitration support (see 6.13)
buf
: A mutable buffer to store the request bytes.
Returns the length of the query on success.
pub fn get_endpoint_uuid(
&self,
completion_code: CompletionCode,
dest_addr: u8,
uuid: &[u8; 16],
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
uuid: &[u8; 16],
buf: &mut [u8]
) -> Result<usize, ()>
Retrieves a per-device unique UUID associated with the endpoint
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
uuid
: A reference to an array containing the UUID
buf
: A mutable buffer to store the request bytes.
Returns the length of the query on success.
pub fn get_mctp_version_support(
&self,
completion_code: CompletionCode,
dest_addr: u8,
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
buf: &mut [u8]
) -> Result<usize, ()>
Generate a response to the MCTP Version request supported by a device.
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
buf
: A mutable buffer to store the request bytes.
Returns the length of the response.
pub fn get_message_type_suport(
&self,
completion_code: CompletionCode,
dest_addr: u8,
supported_msg_types: &[u8],
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
supported_msg_types: &[u8],
buf: &mut [u8]
) -> Result<usize, ()>
Lists the message types that an endpoint supports
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
supported_msg_types
: A slice to an array of bytes listing the
supported MCTP message types, this should NOT include the control
message type (0). This implementation supports a maximum of 30
control messages.
buf
: A mutable buffer to store the request bytes.
Returns the length of the response.
pub fn get_vendor_defined_message_support(
&self,
completion_code: CompletionCode,
dest_addr: u8,
vendor_id_selector: u8,
vendor_id: &[u8],
buf: &mut [u8]
) -> Result<usize, ()>
[src]
&self,
completion_code: CompletionCode,
dest_addr: u8,
vendor_id_selector: u8,
vendor_id: &[u8],
buf: &mut [u8]
) -> Result<usize, ()>
Used to discover an MCTP endpoint’s vendor-specific MCTP extensions and capabilities
completion_code
: Indicates the completion code we should return.
dest_addr
: The address to send the data to.
vendor_id_selector
: The vendor ID set returned.
Indicates the specific capability set requested. Indices start at
0x00 and increase monotonically by 1. If the responding endpoint has
one or more capability sets with indices greater than the requested
index, it increments the requested index by 1 and returns the
resulting value in the response message. The requesting endpoint uses
the returned value to request the next capability set.
vendor_id
: A slice to an array of bytes listing a
structured field of variable length that identifies the vendor ID
format (presently PCI or IANA) and the ID of the vendor that defined
the capability set.
This should be either 3 (PCI Vendor ID) or 5 (IANA Enterprise
Number) bytes long.
If using a 16-bit numeric value or bit field, as specified by the
vendor or organization identified by the vendor ID this should
be include in this slice, increasing the total length by 2.
buf
: A mutable buffer to store the request bytes.
Returns the length of the response.
Auto Trait Implementations
impl Send for MCTPSMBusContextResponse
impl !Sync for MCTPSMBusContextResponse
impl Unpin for MCTPSMBusContextResponse
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,