Skip to content
Version 6.1.0
Contact Us

BACnetStack_UpdateValue

bool BACnetStack_UpdateValue(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance,
const uint32_t propertyIdentifier);

Tells the stack that a value you serve has changed, so COV, trend logging and alarms see it.

Tells the CAS BACnet Stack that a value has changed, and runs every piece of logic attached to that data point: COV and COV-property-multiple notifications, COV-driven trend logging, the deferred BUFFER_READY evaluation for any trend log that grew, and the intrinsic event and fault algorithms.

REQUIRED. Every algorithm armed by the BACnetStack_SetIntrinsic* and BACnetStack_SetFault* functions is DORMANT until this function is called for the monitored property - typically Present_Value, but Total_Record_Count for BUFFER_READY, Member_Status_Flags for a globalGroup and Timer_State for a timer. A host that never calls it will never generate an event notification.

Reliability: for an object with intrinsic alarming, the stack asks CallbackGetPropertyEnumerated for the object’s Reliability, and treats any answer other than NO_FAULT_DETECTED as a hardware or communication fault (135-2024 cl. 13.2.2.2, first stage) that takes precedence over the fault algorithm. It is served as Reliability (and Status_Flags FAULT) on every read. The move to FAULT, and its notification, happen when the algorithms next run - so call this function with Reliability when that fault state changes, rather than waiting for the next update of the monitored property.

The order is: the alarm and event algorithms first, then COV and COV-property-multiple, then COV-driven trend logging and the BUFFER_READY evaluation of any trend log that grew. Running the algorithms first means that when an intrinsic-reporting transition with no time delay changes Status_Flags, each SubscribeCOV or SubscribeCOVProperty subscription gets one notification carrying both the new value and the new Status_Flags. A SubscribeCOVPropertyMultiple subscription is notified per property, so it may get the Status_Flags change and the value change in separate notifications. A build without a feature skips that step and still runs the others.

Parameter Direction Description
deviceInstance in The instance of the device that contains the object where the value changed.
objectType in The BACnet object type of the object where the value changed. See CASBACnetStack::BACnetObjectType for more info. With objectInstance, this is one BACnet Object Identifier carried as two parameters (see the API conventions).
objectInstance in The instance of the object where the value changed.
propertyIdentifier in The property of the value that changed. See BACnetPropertyIdentifier for more info.

True if the value update was processed. False if objectType or objectInstance is out of range, if the device does not exist, or if the property is not enabled on that object. For propertyIdentifier Object_Name or Object_Identifier the device’s Database_Revision is incremented only when the call returns true; a call that returns false leaves it unchanged.

Topic: Objects and properties. Declared in CASBACnetStackDLL.h.