Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetFaultLifeSafetyAlgorithm

bool BACnetStack_SetFaultLifeSafetyAlgorithm(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const uint32_t * faultValues,
const uint32_t faultValueCount,
const bool enable);

Enables the LifeSafety fault 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.

When the monitored Present_Value is in the faultValues set the Reliability transitions to MULTI_STATE_FAULT, and back to NO_FAULT_DETECTED when it leaves the set (135-2024 cl. 13.4.4 conditions (a) and (b)).

pMode (cl. 13.4.4 condition (c)) is the Mode of a stack-held Life Safety Point or Zone or, on an Event Enrollment, the property its mode-property-reference names (local references only). While Reliability is MULTI_STATE_FAULT, a change of that value indicates a fresh MULTI_STATE_FAULT transition. A Point or Zone the host serves itself has no Mode feed, so this re-transition does not occur for it.

faultValues may not share a value with the alarmValues or lifeSafetyAlarmValues of the CHANGE_OF_LIFE_SAFETY algorithm armed on the same object (cl. 13.4.4). An overlapping value is refused whichever algorithm is armed first: this call, or BACnetStack_SetIntrinsicChangeOfLifeSafetyAlgorithm() afterwards, returns false and changes nothing.

faultValues is copied, so the caller may free it on return, and each call REPLACES the previous list. On a stack-held Life Safety Point or Zone the armed list is the object’s Fault_Values property (cl. 12.15.18, 12.16.18). A maximum of 64 fault values is supported; a faultValueCount above that is rejected. A NULL faultValues empties the list, and an empty list means the algorithm never faults.

BACnet reference: ANSI/ASHRAE 135-2024 clause 13.4.4 (FAULT_LIFE_SAFETY Fault 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).
faultValues in Pointer to an array of monitored values that indicate a fault. Each is a BACnetLifeSafetyState value (cl. 21), the element type of the Fault_Values list (cl. 12.15, 12.16).
faultValueCount in The number of values in faultValues. Must be <= 64.
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, faultValueCount exceeds 64, a fault value is one of the armed CHANGE_OF_LIFE_SAFETY alarm or life-safety alarm 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.