Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetIntrinsicChangeOfLifeSafetyAlgorithm

bool BACnetStack_SetIntrinsicChangeOfLifeSafetyAlgorithm(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const uint32_t * alarmValues,
const uint32_t alarmValueCount,
const uint32_t * lifeSafetyAlarmValues,
const uint32_t lifeSafetyAlarmValueCount,
const uint32_t mode,
const uint32_t operationExpected,
const uint32_t timeDelay,
const bool useTimeDelayNormal,
const uint32_t timeDelayNormal,
const bool enable);

Enables the ChangeOfLifeSafety intrinsic event algorithm for a lifeSafetyPoint / lifeSafetyZone.

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 Present_Value is a BACnetLifeSafetyState (enum). Values in alarmValues drive the object to OFFNORMAL and values in lifeSafetyAlarmValues drive it to LIFE_SAFETY_ALARM. A change in the configured mode forces an immediate transition that overrides the time delays.

BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.8 (CHANGE_OF_LIFE_SAFETY 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).
alarmValues in Pointer to an array of monitored values that indicate the OFFNORMAL state. Each is a BACnetLifeSafetyState value (cl. 21), the element type of the Alarm_Values list (cl. 12.15, 12.16).
alarmValueCount in The number of values in alarmValues.
lifeSafetyAlarmValues in Pointer to an array of monitored values that indicate the LIFE_SAFETY_ALARM state. Each is a BACnetLifeSafetyState value (cl. 21), the element type of the Life_Safety_Alarm_Values list (cl. 12.15, 12.16).
lifeSafetyAlarmValueCount in The number of values in lifeSafetyAlarmValues.
mode in The current life-safety Mode (BACnetLifeSafetyMode).
operationExpected in The Operation_Expected value (BACnetLifeSafetyOperation) the notifications carry. pOperationExpected is the monitored object’s Operation_Expected (Table 12-15.1): on a stack-held Life Safety Point or Zone this call seeds that property with the value, and a later change to the property is what the notifications then report. On an Event Enrollment the value is used until the monitored object’s Operation_Expected is first read; after that the notifications carry the value last read. 10-63 (reserved) and values above 65535 are refused.
timeDelay in The time delay for transitions to an alarm state.
useTimeDelayNormal in Whether to use a separate timeDelayNormal for the to-normal transition.
timeDelayNormal in The time delay for transitions 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, operationExpected is not a BACnetLifeSafetyOperation, an alarm value or life-safety alarm value is one of the object’s armed FAULT_LIFE_SAFETY fault values (cl. 13.4.4), or Alarm-and-Event support was not compiled (STACK_OPTION_ALARMS_AND_EVENTS).

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