Skip to main content

encode_timestamp

Function encode_timestamp 

Source
pub fn encode_timestamp(
    buf: &mut BytesMut,
    tag_number: u8,
    ts: &BACnetTimeStamp,
)
Expand description

Encode a BACnetTimeStamp wrapped in a context opening/closing tag pair.

The outer tag_number is the context tag of the field that holds the timestamp (e.g., 3 for EventNotification timeStamp). Inside, the CHOICE variant is encoded with its own context tag (0=Time, 1=Unsigned, 2=DateTime).