BACnetStack_SetIntrinsicChangeOfBitstringAlgorithm64
bool BACnetStack_SetIntrinsicChangeOfBitstringAlgorithm64( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t bitmaskLow, const uint32_t bitmaskHigh, const uint32_t alarmValueLow, const uint32_t alarmValueHigh, const uint32_t bitstringLength, const uint32_t timeDelay, const bool useTimeDelayNormal, const uint32_t timeDelayNormal, const bool enable);Enables the CHANGE_OF_BITSTRING algorithm for a bit string of up to 64 bits.
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.
Sibling of BACnetStack_SetIntrinsicChangeOfBitstringAlgorithm() above that reaches all 64 bits the engine actually holds - that export’s bitmask/alarmValue are each a single uint32_t and can only ever express bits 0-31 of the monitored bitstring. This export splits both into (Low, High) uint32_t halves: bit i of *Low is bit i of the bitstring (i = 0..31), bit i of *High is bit (i+32) of the bitstring (i = 0..31) - together they can express bits 0-63.
Multiple alarm values (cl. 13.3.1 defines pAlarmValues as a LIST) are still not supported by this export - it sets exactly one alarm value, the same deviation as the 32-bit export above.
BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.1 (CHANGE_OF_BITSTRING 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). |
bitmaskLow, bitmaskHigh |
in | Packed-uint32 halves of the significant-bits mask (cl. 13.3.1 pBitmask). Bit i of bitmaskLow is bit i of the bitstring; bit i of bitmaskHigh is bit (i+32). |
alarmValueLow, alarmValueHigh |
in | Packed-uint32 halves of the alarm value, same bit order, compared against (monitored AND bitmask). |
bitstringLength |
in | The number of significant bits in the monitored bitstring. MUST be 1..64 - 0 is rejected (see the 32-bit export’s doc for why) and a value above 64 is rejected; the call returns false and changes nothing. |
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 - see the 32-bit export’s doc above for the full explanation. 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, bitstringLength is out of range, or Alarm-and-Event support was not compiled (STACK_OPTION_ALARMS_AND_EVENTS).
Topic: Alarms and events. Declared in CASBACnetStackDLL.h.