BACnet.Protocol.Recipient (bacstack v0.0.1)

View Source

Summary

Functions

Encodes a BACnet recipient into application tags encoding.

Decodes the given application tags encoding into a BACnet recipient.

Validates whether the given BACnet recipient is in form valid.

Types

t()

@type t() :: %BACnet.Protocol.Recipient{
  address: BACnet.Protocol.RecipientAddress.t() | nil,
  device: BACnet.Protocol.ObjectIdentifier.t() | nil,
  type: :address | :device
}

Functions

encode(recipient, opts \\ [])

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

Encodes a BACnet recipient into application tags encoding.

parse(tags)

Decodes the given application tags encoding into a BACnet recipient.

valid?(t)

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

Validates whether the given BACnet recipient is in form valid.

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