pub trait AllocationMessage<T: Transport>: Message + Serialize + Deserialize {
const SUBJECT: SubjectId;
// Required methods
fn with_unique_id(id: &[u8; 16]) -> Self;
fn matches_unique_id(&self, id: &[u8; 16]) -> bool;
fn node_id(&self) -> Option<T::NodeId>;
}
Expand description
A node ID allocation message
This is currently implemented for uavcan.pnp.NodeIdAllocationData
version 1.0. In the future,
it may also be implemented for version 2.0 of that data type.
Required Associated Constants§
Required Methods§
sourcefn with_unique_id(id: &[u8; 16]) -> Self
fn with_unique_id(id: &[u8; 16]) -> Self
Creates a message with the provided unique ID and no allocated node ID
The message must fit into one frame of the transport that is being used.
sourcefn matches_unique_id(&self, id: &[u8; 16]) -> bool
fn matches_unique_id(&self, id: &[u8; 16]) -> bool
Determines if this message matches the provided unique ID