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

Copy Markdown View Source

A BACnetVMACEntry maps a virtual MAC address (VMAC) to the native MAC address used by the underlying data link.

It is used by the Virtual_MAC_Address_Table property of the Network Port object (see Annex H.7 of ASHRAE 135). Virtual MAC addressing is required by some network types (e.g. Zigbee, certain IPv6 configurations) so that the BACnet network layer can use an uniform 6-octet (or smaller) address space while the real data-link addresses remain larger or differently formatted.

ASN.1 (ASHRAE 135)

BACnetVMACEntry ::= SEQUENCE {
    virtual-mac-address [0] OCTET STRING,  -- maximum size 6 octets
    native-mac-address  [1] OCTET STRING
}

Summary

Types

t()

A single Virtual MAC Address table entry.

Functions

Encodes a BACnetVMACEntry into application tags encoding.

Parses a BACnetVMACEntry from application tags encoding.

Validates whether the given VMAC entry is well-formed.

Types

t()

@type t() :: %BACnet.Protocol.VmacEntry{
  native_mac_address: binary(),
  virtual_mac_address: binary()
}

A single Virtual MAC Address table entry.

Functions

encode(entry, opts \\ [])

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

Encodes a BACnetVMACEntry into application tags encoding.

parse(tags)

Parses a BACnetVMACEntry from application tags encoding.

valid?(vmac_entry)

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

Validates whether the given VMAC entry is well-formed.