Network Protocol Control Information (NPCI) is the header that precedes every BACnet Network Protocol Data Unit (NPDU). It carries the information that BACnet routers and receiving devices need to correctly forward or deliver the message.
The NPCI indicates the version of the protocol, the ultimate source and destination networks (when the message crosses routers), whether a reply is expected, the priority of the message, and whether the data that follows is an Application Protocol Data Unit (APDU) or a Network Service Data Unit (NSDU). Network-layer messages (NSDUs) are used for router-to-router communication, router configuration, and certain network management functions.
Summary
Functions
Creates a NPCI iodata from the NPCI struct.
Get the NPCI version.
Creates a new NPCI struct with the given fields.
Types
@type t() :: %BACnet.Protocol.NPCI{ destination: BACnet.Protocol.NpciTarget.t() | nil, expects_reply: boolean(), hopcount: non_neg_integer() | nil, is_network_message: boolean(), priority: BACnet.Protocol.Constants.npdu_control_priority(), source: BACnet.Protocol.NpciTarget.t() | nil }
Represents Network Protocol Control Information (NPCI).
Functions
Creates a NPCI iodata from the NPCI struct.
If destination is not nil, but net is nil, net will default to 1.
@spec get_version() :: non_neg_integer()
Get the NPCI version.
Creates a new NPCI struct with the given fields.
The following default values are applied:
priority: :normal,
expects_reply: false,
destination: nil,
source: nil,
hopcount: nil,
is_network_message: false