BACnet.Protocol.AccumulatorRecord (bacstack v0.0.1)

View Source

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

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()
}

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.