Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetIntrinsicChangeOfDiscreteValueAlgorithm

bool BACnetStack_SetIntrinsicChangeOfDiscreteValueAlgorithm(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const uint32_t timeDelay,
const bool useTimeDelayNormal,
const uint32_t timeDelayNormal,
const bool enable);

Enables the ChangeOfDiscreteValue intrinsic event algorithm.

No object type applies this algorithm intrinsically: an OctetString Value has no intrinsic-reporting properties (135-2024 cl. 12.41), so this function returns false and changes nothing for every object type except an Event Enrollment whose own algorithm is CHANGE_OF_DISCRETE_VALUE. Deprecated for intrinsic reporting. The CHANGE_OF_DISCRETE_VALUE algorithm remains available to an Event Enrollment object, which can monitor a discrete property of an 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.

BACnet reference: ANSI/ASHRAE 135-2024 clause 13.3.18 (CHANGE_OF_DISCRETE_VALUE Event Algorithm) and clause 12.41 (OctetString Value Object Type).

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).
timeDelay in The time delay (seconds) the changed value must persist before notifying.
useTimeDelayNormal in Whether to use a separate timeDelayNormal for the to-normal transition.
timeDelayNormal in The time delay for the TO-NORMAL notification.
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

False: no object type supports this algorithm intrinsically. A device or object that does not exist, or a build without Alarm-and-Event support (STACK_OPTION_ALARMS_AND_EVENTS), also returns false.

Topic: Alarms and events. Declared in CASBACnetStackDLL.h.