BACnetStack_SetBACnetSCSettings
bool BACnetStack_SetBACnetSCSettings( const uint16_t maximumBVLCLength, const uint16_t maximumNPDULength, const uint16_t connectTimeout, const uint16_t wsConnectTimeout, const uint16_t wsReconnectTimeout, const uint16_t heartbeatTimeout);Sets the BACnet/SC transport-level timing and size settings shared by every SC connection this device makes.
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
maximumBVLCLength |
in | The maximum BVLC message length this device accepts. With the current limits, a value below 1600 (the stack’s configuration floor) is refused, and a value above 6144 (the size of the buffer every BACnet/SC frame is received into) is saturated: the stack stores 6144, logs that it did, and the call still succeeds. |
maximumNPDULength |
in | The maximum NPDU length this device accepts. A value below 1497 or above 61327 is refused. With the current limits, a value above 6128 (the largest NPDU a frame received into the 6144-octet buffer can carry behind the 16-octet BVLC header of a frame relayed by a hub, without header options) is saturated: the stack stores 6128, logs that it did, and the call still succeeds. The Network Port’s Max_NPDU_Length_Accepted then reads 6128. The two lengths must agree: after saturation, maximumNPDULength + 16 (the BVLC header a hub adds to a relayed broadcast) must not exceed maximumBVLCLength, or the call is refused and nothing is changed. A peer that sized an NPDU to the advertised maximum would otherwise send a frame larger than the advertised BVLC maximum, which is discarded. A WriteProperty of Max_BVLC_Length_Accepted or Max_NPDU_Length_Accepted that would break the same rule is refused with Error(PROPERTY, VALUE_OUT_OF_RANGE). |
connectTimeout |
in | The connect wait timeout of 135-2024 AB.6.2, in seconds: how long the hub connector and the direct-connect initiator wait for a Connect-Accept after sending a Connect-Request, and how long the hub function waits for a Connect-Request on an accepted connection after its first frame. Also served as the Network Port’s SC_Connect_Wait_Timeout. It is not a TCP connect timeout; the hub connector’s WebSocket connect is timed by wsConnectTimeout instead. 5 to 300; a value outside that range is refused. |
wsConnectTimeout |
in | The WebSocket connect timeout in seconds. |
wsReconnectTimeout |
in | The WebSocket reconnect delay in seconds after a lost connection. |
heartbeatTimeout |
in | The WebSocket heartbeat timeout in seconds. |
Returns
Section titled “Returns”True if successfully set, otherwise false. All six values, and the agreement of the two lengths, are checked before any is applied, so a refused call leaves every setting unchanged. A later failure to apply the settings to one Network Port can still return false after earlier ports were updated.
Topic: BACnet/SC. Declared in CASBACnetStackDLL.h.