BACnetStack_AddRouterRoute
bool BACnetStack_AddRouterRoute( const uint32_t deviceInstance, const uint16_t dnet, const uint8_t portId, const uint8_t * nextHopAddress, const uint8_t nextHopAddressLength);Configures a static route to a remote network reached through a next-hop router (ASHRAE 135 cl. 6.6).
Where BACnetStack_AddRouterPort() registers a directly connected network, this configures a route to a network that is one or more hops away, together with the port it is reached through. It optionally names the MAC of the next-hop router on that port’s link, so the relayed copy is MAC-unicast to that router (135.1-2023 10.2.3.3) rather than broadcast on the egress link.
BACnet reference: ANSI/ASHRAE 135-2024 clause 6.6 (BACnet Routers).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The instance number of the main device. |
dnet |
in | The remote network reachable through portId. |
portId |
in | The router port the remote network is reached through, as reported in the Routing_Table property (cl. 12.56.62). |
nextHopAddress |
in | The MAC of the next-hop router on that port’s link, or NULL for a route with no configured next hop (the relay falls back to the egress link broadcast). A directly connected network is configured with BACnetStack_AddRouterPort() instead. |
nextHopAddressLength |
in | The length of nextHopAddress, or 0. |
Returns
Section titled “Returns”True if the route was configured, otherwise false.
Topic: Routing and virtual networks. Declared in CASBACnetStackDLL.h.