Skip to main content

Module npdu

Module npdu 

Source
Expand description

NPDU encoding and decoding per ASHRAE 135-2020 Clause 6.

The Network Protocol Data Unit carries either an application-layer APDU or a network-layer message, with optional source/destination routing information for multi-hop BACnet internetworks.

Both directions hold DADR and SADR to NpduAddress::MAX_MAC_LEN octets (#1141), so the router, the non-router network layer and everything above them only ever see an address that some data link could carry.

Structs§

Npdu
Decoded Network Protocol Data Unit (Clause 6.2).
NpduAddress
Network-layer address: network number + MAC address.
RejectMessageToNetwork
Decoded payload of a Reject-Message-To-Network control message.

Enums§

NpduAddressField
The NPCI address an NpduDecodeError::AddressTooLong concerns.
NpduDecodeError
Why decode_npdu refused an NPDU.

Constants§

BACNET_PROTOCOL_VERSION
BACnet protocol version (always 1).

Functions§

decode_npdu
Decode an NPDU from raw bytes.
decode_reject_message_to_network
Decode the fixed three-octet Reject-Message-To-Network payload.
encode_npdu
Encode an NPDU to wire format.