Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetRouterEnabled

bool BACnetStack_SetRouterEnabled(const uint32_t deviceInstance, const bool enabled);

Turns physical inter-datalink routing on or off.

Routing is opt-in: configuring ports alone does not start forwarding, so a device that happens to have two datalinks does not silently become a router.

Write-only: no export reads the current routing state back. Track it yourself.

BACnet reference: ANSI/ASHRAE 135-2024 clause 6.6 (BACnet Routers).

Parameter Direction Description
deviceInstance in The instance number of the main device. The device must already exist and this must be its exact instance number; any other value is rejected.
enabled in True to route NPDUs between the configured ports.

True if successful. False if no device has been added, if deviceInstance is not the main device, or if the stack was built without STACK_OPTION_ROUTER_PHYSICAL.

Topic: Routing and virtual networks. Declared in CASBACnetStackDLL.h.