Event Timestamps is a composite structure that holds three BACnet Timestamp values recording the most recent transitions of an event-generating object into the off-normal, fault, and normal states. It is carried inside Event Information entries and inside certain event notification parameters.
The presence of these timestamps allows clients to determine exactly when an alarm condition appeared, when it became a fault, and when it returned to normal. This information is extremely valuable for post-mortem analysis, for computing the duration of an alarm, and for correlating events across multiple devices on a site. If a particular transition has never occurred, the corresponding timestamp field is usually encoded as a "time of day" with all fields set to 255 (unspecified).
Summary
Types
Represents the timestamps of the last transitions to the offnormal, fault, and normal event states.
Functions
Encodes a BACnet event timestamps into BACnet application tags encoding.
Parses a BACnet event timestamps from BACnet application tags encoding.
Validates whether the given event timestamps is in form valid.
Types
@type t() :: %BACnet.Protocol.EventTimestamps{ to_fault: BACnet.Protocol.BACnetTimestamp.t(), to_normal: BACnet.Protocol.BACnetTimestamp.t(), to_offnormal: BACnet.Protocol.BACnetTimestamp.t() }
Represents the timestamps of the last transitions to the offnormal, fault, and normal event states.
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes a BACnet event timestamps into BACnet application tags encoding.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parses a BACnet event timestamps from BACnet application tags encoding.
Validates whether the given event timestamps is in form valid.
It only validates the struct is valid as per type specification.