Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetIntrinsicChangeOfStatusFlagsAlgorithm

bool BACnetStack_SetIntrinsicChangeOfStatusFlagsAlgorithm(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const uint32_t selectedFlags,
const uint32_t timeDelay,
const bool useTimeDelayNormal,
const uint32_t timeDelayNormal,
const bool enable);

Enables the ChangeOfStatusFlags intrinsic event algorithm for a globalGroup.

The object must exist and have alarms and events enabled by BACnetStack_SetAlarmsAndEventsForObjectEnabled(…, enabled=true) - an Event Enrollment object carries its own and needs no such call; otherwise this returns false.

The monitored value is the Member_Status_Flags BACnetStatusFlags BIT STRING, and selectedFlags (below) marks which of its bits are significant. The object transitions to OFFNORMAL when any selected bit is set and back to NORMAL when all selected bits clear, honoring the configured time delays.

BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.11 (CHANGE_OF_STATUS_FLAGS Event Algorithm).

Parameter Direction Description
deviceInstance in The instance number of the device that owns this object.
objectType, objectInstance in The object for alarms and events: one BACnet Object Identifier, carried as two parameters (see the API conventions).
selectedFlags in The algorithm’s pSelectedFlags (cl. 13.3.11): a BACnetStatusFlags BIT STRING (cl. 21) packed into the low four bits - bit 0 = in-alarm, bit 1 = fault, bit 2 = overridden, bit 3 = out-of-service. A set bit makes that flag significant; bits 4 to 31 are ignored.
timeDelay in The time delay for the transition to the OFFNORMAL state.
useTimeDelayNormal in Whether to use a separate timeDelayNormal for the to-normal transition.
timeDelayNormal in The time delay for the transition back to the NORMAL state.
enable in Initial inhibit state, inverted - NOT a remove. true arms the algorithm; false leaves it armed but INHIBITED through the object’s Event_Algorithm_Inhibit property (or Reliability_Evaluation_Inhibit for a fault algorithm). Both of those properties are made WRITABLE by BACnetStack_SetAlarmsAndEventsForObjectEnabled(), so a remote client can change the state afterwards. To genuinely remove an armed algorithm, disable the object with BACnetStack_SetAlarmsAndEventsForObjectEnabled(…, enabled=false). Recommended value: true

True on success; false if the device or object does not exist, the object type does not support this algorithm, or Alarm-and-Event support was not compiled (STACK_OPTION_ALARMS_AND_EVENTS).

Topic: Alarms and events. Declared in CASBACnetStackDLL.h.