BACnetStack_SetIntrinsicUnsignedOutOfRangeAlgorithm
bool BACnetStack_SetIntrinsicUnsignedOutOfRangeAlgorithm( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t lowLimit, const uint32_t highLimit, const uint32_t deadband, const bool enableLowLimit, const bool enableHighLimit, const uint32_t timeDelay, const bool useTimeDelayNormal, const uint32_t timeDelayNormal, const bool enable);Enables the UNSIGNED_OUT_OF_RANGE algorithm for an unsigned Present_Value.
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.
Enables the UNSIGNED_OUT_OF_RANGE intrinsic event algorithm (135-2024 cl. 13.3.15) for an UnsignedInteger-valued Present_Value - the unsigned counterpart of OUT_OF_RANGE (cl. 13.3.6), with the same shape: both limits individually enableable, and a deadband applied on the return to NORMAL. See BACnetStack_SetIntrinsicOutOfRangeAlgorithm() for the full parameter semantics; lowLimit/highLimit/deadband are unsigned to match the monitored datatype.
NOT THE SAME ALGORITHM as BACnetStack_SetIntrinsicUnsignedRangeAlgorithm(), despite an identical parameter list. Both take a per-limit enable (Limit_Enable / pLimitEnable), so that is NOT the difference. The difference is the DEADBAND:
- UNSIGNED_OUT_OF_RANGE (this function, cl. 13.3.15): pDeadband is part of the standard algorithm. The return to NORMAL requires the value to come back inside the limit BY deadband. Typical object: Positive Integer Value.
- UNSIGNED_RANGE (cl. 13.3.9): the standard algorithm has NO deadband; the return to NORMAL is a plain comparison against the limit. Typical object: Accumulator. Choose by the object you are arming and by the algorithm its Event_Type must report, not by the signature - the two compile identically.
BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.15 (UNSIGNED_OUT_OF_RANGE 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). |
lowLimit |
in | The bottom of the normal band. |
highLimit |
in | The top of the normal band. |
deadband |
in | The margin by which the value has to come back inside the exceeded limit before the event state returns to normal. |
enableLowLimit |
in | Whether to enable the low limit to the algorithm (true) or not (false). |
enableHighLimit |
in | Whether to enable the high limit to the algorithm (true) or not (false). |
timeDelay |
in | How long, in seconds, an offnormal condition has to persist before the event state changes to offnormal. |
useTimeDelayNormal |
in | Whether to use a different time delay value for the timeDelayNormal, or just use the timeDelay value. |
timeDelayNormal |
in | How long, in seconds, a normal condition has to persist before the event state returns to normal. |
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.