BACnetStack_SetIntrinsicBufferReadyAlgorithm
bool BACnetStack_SetIntrinsicBufferReadyAlgorithm( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t notificationThreshold, const uint32_t timeDelay, const bool enable);Enables the Intrinsic Buffer Ready Algorithm (135-2024 13.3.7) for a log object (trendLog / trendLogMultiple / eventLog).
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. Unlike the limit-based algorithms, BUFFER_READY has no low/high limit or deadband: it monitors this object’s own Total_Record_Count and fires a TO-NORMAL notification once notificationThreshold additional records have been logged since the last notification.
DEVIATION - cl. 13.3.7 (b) requires a record count that wraps past 2^32 to still be evaluated with modulo arithmetic. This implementation instead treats any count lower than the previous one as a buffer reset: it re-baselines silently and emits no notification for that step.
BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.7 (BUFFER_READY 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). |
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
notificationThreshold |
in | The number of new records since the last notification that triggers the next notification. Note: 0 disables BUFFER_READY entirely - no notification is ever produced (cl. 13.3.7 pThreshold). |
timeDelay |
in | Note: this parameter has no effect. Cl. 13.3.7 defines no time delay for BUFFER_READY; the value is stored and readable as Time_Delay but is never consulted when the algorithm is evaluated. That is also why this setter has no useTimeDelayNormal / timeDelayNormal pair. Pass 0. |
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.