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

Copy Markdown View Source

A BACnetRouterEntry describes one first-hop router that can be used to reach a remote BACnet network.

It is the element type of the Routing_Table property of the Network Port object. The table is normally maintained automatically by the network layer from received I-Am-Router-To-Network / I-Could-Be-Router-To-Network messages, but may also be configured statically.

ASN.1 (ASHRAE 135)

BACnetRouterEntry ::= SEQUENCE {
    network-number    [0] Unsigned16,
    mac-address       [1] OCTET STRING,
    status            [2] ENUMERATED {
                            available    (0),
                            busy         (1),
                            disconnected (2)
                          },
    performance-index [3] Unsigned8 OPTIONAL
}

Status values

  • :available - the router is ready to forward traffic
  • :busy - the router is temporarily unable to accept more traffic
  • :disconnected- the router is known but currently unreachable

The optional performance_index is the value carried in an I-Could-Be-Router-To-Network message (Clause 6.4.3).

Summary

Types

Status of a router entry.

t()

A single entry in a Network Port Routing_Table.

Functions

Encodes a BACnetRouterEntry into application tags encoding.

Parses a BACnetRouterEntry from application tags encoding.

Validates whether the given RouterEntry is well-formed.

Types

status()

@type status() :: :available | :busy | :disconnected

Status of a router entry.

t()

@type t() :: %BACnet.Protocol.RouterEntry{
  mac_address: binary(),
  network_number: 0..65535,
  performance_index: 0..255 | nil,
  status: status()
}

A single entry in a Network Port Routing_Table.

Functions

encode(entry, opts \\ [])

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

Encodes a BACnetRouterEntry into application tags encoding.

parse(tags)

Parses a BACnetRouterEntry from application tags encoding.

valid?(router_entry)

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

Validates whether the given RouterEntry is well-formed.