Skip to content
Version 6.1.0
Contact Us

BACnetStack_SetPropertyByObjectTypeEnabled

bool BACnetStack_SetPropertyByObjectTypeEnabled(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t propertyIdentifier,
const bool enabled);

Per-object-TYPE variant of BACnetStack_SetPropertyEnabled().

Instead of enabling the property on one existing object instance, this sets the enabled state on the object-type’s default template.

Use the per-instance function (BACnetStack_SetPropertyEnabled()) to tweak a single existing object; use this per-type function to set the default applied to the object type - notably the template used for objects created dynamically via the CreateObject service, and for bulk-enabling a property across a type without enumerating every instance. The two write different stores (a per-object override vs. the per-type settings), so they do not conflict.

Precondition difference: the per-instance function requires the specific object to already exist; this per-type function requires the object TYPE to be registered on the device (not any particular instance).

Parameter Direction Description
deviceInstance in The instance number of the device.
objectType in The object type whose default template will be changed. See CASBACnetStack::BACnetObjectType.
propertyIdentifier in The property to enable. See BACnetPropertyIdentifier.
enabled in True to enable, false to disable.

True if successful, false if failed (e.g. the object type is not registered on the device).

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