BACnet.Protocol.AccumulatorRecord (bacstack v0.1.0-dev.1)

Copy Markdown View Source

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

Types

t()

Represents a single historical record captured by an Accumulator object.

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

t()

@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

encode(record, opts \\ [])

@spec encode(t(), Keyword.t()) ::
  {:ok, BACnet.Protocol.ApplicationTags.encoding_list()} | {:error, term()}

Encodes an accumulator record struct into application tags encoding.

parse(tags)

Parses a BACnet accumulator record into a struct.

valid?(t)

@spec valid?(t()) :: boolean()

Validates whether the given accumulator record is in form valid.

It only validates the struct is valid as per type specification.