Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetBACnetSCWebSocketStatus

bool BACnetStack_SetBACnetSCWebSocketStatus(
const char * uri,
const uint16_t uriLength,
const uint8_t status,
const uint32_t errorCode);

Reports the status of a BACnet/SC WebSocket connection to the stack.

Reports the current status of a BACnet/SC WebSocket connection to the stack (e.g. after the host application’s WebSocket layer connects, disconnects, or errors), so the stack’s connection-state machine and Network Port status properties stay in sync with the real transport state.

Parameter Direction Description
uri, uriLength in The WebSocket URI the status applies to.
status in The BACnet/SC connection status being reported. See BACnetSCWebsocketStatus: Unknown = 0, Connecting = 1, Connected = 2, Disconnected = 3, Error = 4.
errorCode in The error code associated with the status, if applicable (0 if none).

True if a websocket or peer matching uri was found and updated, otherwise false (including when no BACnet/SC data link exists, or the stack was built without STACK_OPTION_DATA_LINK_LAYER_SC).

Topic: BACnet/SC. Declared in CASBACnetStackDLL.h.