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§

source

const SUBJECT: SubjectId

The fixed subject ID for this message

Required Methods§

source

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.

source

fn matches_unique_id(&self, id: &[u8; 16]) -> bool

Determines if this message matches the provided unique ID

source

fn node_id(&self) -> Option<T::NodeId>

Returns the allocated node ID in this message, if one is specified

Implementations on Foreign Types§

source§

impl<T: Transport> AllocationMessage<T> for NodeIDAllocationData

source§

const SUBJECT: SubjectId = node_id_allocation_data_1_0::SUBJECT

source§

fn with_unique_id(id: &[u8; 16]) -> Self

source§

fn matches_unique_id(&self, id: &[u8; 16]) -> bool

source§

fn node_id(&self) -> Option<T::NodeId>

Implementors§