BACnetStack_SetIntrinsicChangeOfTimerAlgorithm
bool BACnetStack_SetIntrinsicChangeOfTimerAlgorithm( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t * alarmValues, const uint32_t alarmValueCount, const uint32_t timeDelay, const bool useTimeDelayNormal, const uint32_t timeDelayNormal, const bool enable);Enables the ChangeOfTimer intrinsic event algorithm for a timer object.
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.
This function will enable the required properties and store the initial values in memory.
The monitored value is the Timer_State (a BACnetTimerState enumeration, cl. 21: idle=0, running=1, expired=2). alarmValues is the algorithm’s pAlarmValues (cl. 13.3.19): the Timer_State values that are OFFNORMAL (typically [expired]). The object transitions to OFFNORMAL when the Timer_State enters any value in alarmValues and back to NORMAL when it leaves all of them, honoring the configured time delays.
BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.19 (CHANGE_OF_TIMER Event Algorithm).
Parameters
Section titled “Parameters”| 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 the OFFNORMAL Timer_State values: the algorithm’s pAlarmValues list. |
alarmValueCount |
in | The number of values in the alarmValues array. |
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 |
Returns
Section titled “Returns”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.