BACnet.Protocol.PropertyValue (bacstack v0.0.1)

View Source

Summary

Functions

Encodes a BACnet property value into application tags encoding.

Encode a list of property values into application tag-encoded property values.

Parse application tag-encoded property value into a struct.

Parse application tag-encoded property values into a list of structs.

Validates whether the given property value is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.PropertyValue{
  priority: 1..16 | nil,
  property_array_index: non_neg_integer() | nil,
  property_identifier:
    BACnet.Protocol.Constants.property_identifier() | non_neg_integer(),
  property_value: BACnet.Protocol.ApplicationTags.Encoding.t()
}

Functions

encode(property, opts \\ [])

Encodes a BACnet property value into application tags encoding.

encode_all(properties, opts \\ [])

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

Encode a list of property values into application tag-encoded property values.

parse(tags)

Parse application tag-encoded property value into a struct.

parse_all(tags)

@spec parse_all(BACnet.Protocol.ApplicationTags.encoding_list()) ::
  {:ok, [t()]} | {:error, term()}

Parse application tag-encoded property values into a list of structs.

valid?(t)

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

Validates whether the given property value is in form valid.

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