Expand description
Which constructed production a property’s value is made of.
A value read from a device arrives as bare octets. For a primitive value the application tags say where each element starts and ends, but a list or array of constructed elements (timestamps, schedule days, references) carries nothing that marks the boundary between one element and the next. Splitting it takes the element’s datatype, and that depends on the object type and the property, which the octets don’t say.
property_element is that knowledge as a table: for each (object type,
property) pair whose datatype it knows, the ConstructedElement the
value is made of and whether the property holds one of them or a
collection (ElementShape). Each element names the codec in
crate::constructed (or, for ConstructedElement::ReadAccessResult,
the ReadPropertyMultiple ACK decoder in bacnet-services) that decodes
it, which split_elements takes to find where each element ends.
The table needs no allocator; split_elements needs alloc.
Enums§
- Constructed
Element - A constructed production a property’s value is made of.
- Element
Shape - How a property holds its elements.
Functions§
- property_
element - The element
propertyofobject_typeis made of, and how the property holds it;Nonefor a property this table doesn’t know, whose value the application tags alone describe or whose datatype it doesn’t cover. - split_
elements - Where each element of
octetsends, withdecodereading the element that starts at an offset and returning the offset just past it.Nonewhen an element doesn’t decode ordecodedoesn’t move forward, so a value that isn’t wholly made of the elements is never half split. Empty octets split into no elements.