Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetBBMD

bool BACnetStack_SetBBMD(const uint32_t deviceInstance, const uint32_t networkPortInstance);

Initializes the device as a BBMD (BACnet Broadcast Management Device).

The device instance and network port instance are passed so the BBMD can identify its own IP address and subnet mask and find its corresponding entry in the broadcast distribution table. The network port object must already exist and be configured with callbacks for IP address, subnet mask, and UDP port. If the BBMD cannot find its own entry in the broadcast distribution table, it will not be configured as a BBMD.

On success the port’s Network Port object reads BACnet_IP_Mode BBMD, and the stack enables its BBMD_Broadcast_Distribution_Table, BBMD_Accept_FD_Registrations and BBMD_Foreign_Device_Table properties. BBMD_Accept_FD_Registrations starts TRUE and is writable while the port is a BBMD (135-2024 cl. 12.56.39); a write to a port that is not a BBMD is refused with Error(PROPERTY, WRITE_ACCESS_DENIED), and a write is refused with an Abort when CallbackReinitializeDevice is not registered. A written value is held pending: it reads back as written and Changes_Pending reads TRUE until a ReinitializeDevice ACTIVATE_CHANGES or WARMSTART, or BACnetStack_ActivateNetworkPortPendingChanges(), makes it the value in use. While the value in use is FALSE, every Register-Foreign-Device is answered with a NAK; the entries already in the foreign device table stay until their time-to-live runs out.

BACnet reference: ANSI/ASHRAE 135-2024 Annex J: J.4.3 (BBMD concept) and J.4.5 (broadcast distribution).

Parameter Direction Description
deviceInstance in The instance of the device that is being configured as a BBMD.
networkPortInstance in The instance of the network port object to read host parameters from.

True if successfully configured as a BBMD, otherwise false.

Topic: BACnet/IP: BBMD and foreign devices. Declared in CASBACnetStackDLL.h.