pub struct ObjectTypesSupported { /* private fields */ }Expand description
BACnetObjectTypesSupported — the protocol-object-types-supported bit
string, one bit per object type (Clause 21).
Stored as a [u64; 16] bitset (1024 bits): bit N is set iff ObjectType
value N is supported. The property covers only standardized object types
(Clause 12.11.15) and the bit-string production is closed, but
BACnetObjectType values run to 1023, so decode tolerates the enumeration’s
full 10-bit range instead of discarding a nonconformant peer’s extra bits —
hence the 16-word array, which is allocation-free and Copy. The public API
still yields named
ObjectType values (reusing that table rather than duplicating it), and
Debug prints names, never raw numbers.
Implementations§
Source§impl ObjectTypesSupported
impl ObjectTypesSupported
Sourcepub fn from_bacnet(data: &[u8]) -> Self
pub fn from_bacnet(data: &[u8]) -> Self
Decode a bit-string payload (the data of PropertyValue::BitString)
into the bitset of object types it advertises.
Sourcepub fn contains(&self, object_type: ObjectType) -> bool
pub fn contains(&self, object_type: ObjectType) -> bool
Whether object_type is marked supported.
Sourcepub fn iter(&self) -> impl Iterator<Item = ObjectType> + '_
pub fn iter(&self) -> impl Iterator<Item = ObjectType> + '_
Iterate the supported object types in ascending bit order.