Log Status is a compact three-bit bit string that reports the operational state of a Trend Log or Event Log object. The three bits respectively indicate whether logging has been disabled by the Log_Enable property, whether the internal buffer has been purged since the last notification, and whether logging was interrupted (for example because of a power failure or a configuration change).
These status bits are returned as part of the Log Status property and are also included in the log record that is sent when a client reads the log or when the log autonomously sends a notification. They allow a receiving system to know whether the data it is seeing is complete or whether there are gaps that must be taken into account when performing analysis or generating reports.
Examples (Doc Test)
iex> status = %LogStatus{log_disabled: false, buffer_purged: true, log_interrupted: false}
iex> status.buffer_purged
true
Summary
Functions
Encodes a BACnet log status into application tags encoding.
Creates from an application tag bitstring a log status.
Parses a BACnet log status from application tags encoding.
Creates an application tag bitstring from a log status.
Validates whether the given log status is in form valid.
Types
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes a BACnet log status into application tags encoding.
Creates from an application tag bitstring a log status.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parses a BACnet log status from application tags encoding.
@spec to_bitstring(t()) :: BACnet.Protocol.ApplicationTags.primitive_encoding()
Creates an application tag bitstring from a log status.
Validates whether the given log status is in form valid.
It only validates the struct is valid as per type specification.