pub enum SubjectIDList {
Mask(BitArray<1024>),
SparseList(Vec<SubjectID, 255>),
Total(Empty),
}
Expand description
uavcan.node.port.SubjectIDList.0.1
Size ranges from 1 to 1025 bytes
A list of subject identifiers. The range of subject-ID is large, so using a fixed-size bitmask would make this type difficult to handle on resource-constrained systems. To address that, we provide two extra options: a simple variable-length list, and a special case that indicates that every subject-ID is in use. Replaced with v1.
Variants§
Mask(BitArray<1024>)
The index represents the identifier value. True – present/used. False – absent/unused.
saturated bool[8192]
SparseList(Vec<SubjectID, 255>)
A list of identifiers that can be used instead of the mask if most of the identifiers are unused.
uavcan.node.port.SubjectID.1.0[<=255]
Total(Empty)
A special case indicating that all identifiers are in use. Reserve space in case the range is extended in the future.
uavcan.primitive.Empty.1.0
Implementations§
Trait Implementations§
source§impl DataType for SubjectIDList
impl DataType for SubjectIDList
source§const EXTENT_BYTES: Option<u32> = _
const EXTENT_BYTES: Option<u32> = _
This type is delimited with an extent of 4097 bytes.
source§impl Deserialize for SubjectIDList
impl Deserialize for SubjectIDList
source§fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where Self: Sized,
source§fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where Self: Sized,
deserialize
source§impl Serialize for SubjectIDList
impl Serialize for SubjectIDList
source§fn size_bits(&self) -> usize
fn size_bits(&self) -> usize
source§fn serialize(&self, cursor: &mut WriteCursor<'_>)
fn serialize(&self, cursor: &mut WriteCursor<'_>)
source§fn serialize_to_bytes(&self, bytes: &mut [u8])
fn serialize_to_bytes(&self, bytes: &mut [u8])
serialize