A Log Multiple Record is the data element used by Trend Log Multiple objects. Unlike a normal Trend Log (which records a single point over time), a Trend Log Multiple records several properties from one or more objects at the same instant, producing a "row" of related samples.
Each record contains a timestamp and a Log Status or a list of individual log data values. The values are kept in the same order as the Log Device Object Property list that the Trend Log Multiple object was configured with. This structure allows clients to retrieve synchronized, multi-variable snapshots that are extremely useful for control loop tuning, energy analysis, and any application where the relationship between several measurements at the exact same moment matters.
The encoding is more complex than a single Log Record because it must carry a variable-length array of values while still remaining compact enough for devices with limited memory.
Summary
Types
Representative type for log data - possible values it can take.
A single record in a Trend Log Multiple object log buffer.
Functions
Encode a BACnet log multiple record into application tag-encoded.
Parse a BACnet log multiple record from application tags encoding.
Validates whether the given log multiple record is in form valid.
Types
@type log_data() :: BACnet.Protocol.ApplicationTags.Encoding.t() | BACnet.Protocol.BACnetError.t() | nil
Representative type for log data - possible values it can take.
@type t() :: %BACnet.Protocol.LogMultipleRecord{ log_data: [log_data()] | BACnet.Protocol.LogStatus.t() | {:time_change, float()}, timestamp: BACnet.Protocol.BACnetDateTime.t() }
A single record in a Trend Log Multiple object log buffer.
Contains a timestamp and the associated log data which may be a list of encoded values, a LogStatus, or a time-change indicator.
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encode a BACnet log multiple record into application tag-encoded.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parse a BACnet log multiple record from application tags encoding.
Validates whether the given log multiple record is in form valid.
It only validates the struct is valid as per type specification.