An Accumulator Record captures a single sample from an Accumulator object at a particular point in time.
Each record contains a timestamp, the accumulated present value at that moment, and an indication of whether the accumulation was the result of a normal rollover, a manual preset, or an error condition.
Summary
Functions
Encodes an accumulator record struct into application tags encoding.
Parses a BACnet accumulator record into a struct.
Validates whether the given accumulator record is in form valid.
Types
@type t() :: %BACnet.Protocol.AccumulatorRecord{ accumulated_value: non_neg_integer(), present_value: non_neg_integer(), status: BACnet.Protocol.Constants.accumulator_status(), timestamp: BACnet.Protocol.BACnetDateTime.t() }
Represents a single historical record captured by an Accumulator object.
Functions
@spec encode(t(), Keyword.t()) :: {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}
Encodes an accumulator record struct into application tags encoding.
@spec parse(BACnet.Protocol.ApplicationTags.encoding_list()) :: {:ok, {t(), rest :: BACnet.Protocol.ApplicationTags.encoding_list()}} | {:error, term()}
Parses a BACnet accumulator record into a struct.
Validates whether the given accumulator record is in form valid.
It only validates the struct is valid as per type specification.