BACnet.Protocol.ForeignDeviceTableEntry (bacstack v0.0.1)

View Source

Summary

Functions

Decodes a Foreign Device Table Entry from binary data.

Encodes the Foreign Device Table Entry to binary data.

Types

t()

@type t() :: %BACnet.Protocol.ForeignDeviceTableEntry{
  ip: :inet.ip4_address(),
  port: :inet.port_number(),
  remaining_time: non_neg_integer() | nil,
  time_to_live: non_neg_integer() | nil
}

Functions

decode(data)

@spec decode(binary()) :: {:ok, {t(), rest :: binary()}} | {:error, term()}

Decodes a Foreign Device Table Entry from binary data.

encode(entry)

@spec encode(t()) :: {:ok, binary()} | {:error, term()}

Encodes the Foreign Device Table Entry to binary data.

If both time_to_live and remaining_time are nil, they are not included in the binary (useful for Delete-Foreign-Device-Table-Entry)