BACnetStack_SetPropertySubscribable
bool BACnetStack_SetPropertySubscribable( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t propertyIdentifier, const bool subscribable);Makes a device’s or object’s property subscribable.
The device and/or object must already exist. This function allows BACnet Clients to subscribe to an object using SubscribeCOV if supported
The property must already be enabled (required by default, or previously enabled with BACnetStack_SetPropertyEnabled()) before calling this; it does not enable the property itself.
When this function makes Present_Value subscribable on an Analog Input, Analog Output, Analog Value, Integer Value, Positive Integer Value, Large Analog Value, Loop, Lighting Output, Pulse Converter or Staging, it also enables the COV_Increment property, which these object types require on an object that reports COV (135-2024 cl. 12.2.16 for the Analog Input, and the same requirement on the others). Serve its value through the callback that matches the property’s datatype; a host that does not serve it reads 1.0. To keep the property absent, call BACnetStack_SetPropertyEnabled() for COV_Increment with false after this call.
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The instance number of the device that contains the object whose property will be made subscribable. |
objectType |
in | The object type of the object whose property will be made subscribable. 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 object instance of the object whose property will be made subscribable. |
propertyIdentifier |
in | The property to make subscribable. See BACnetPropertyIdentifier for more info. This is IN ADDITION to enabling the SubscribeCOV service with BACnetStack_SetServiceEnabled(); this function enables no service. It is also not always needed: the standard COV object types of 135-2024 Table 13-1 (analog, binary, multi-state, life-safety, character string value and the rest) already accept a plain SubscribeCOV without it. It IS needed for SubscribeCOVProperty on any property, and for Present_Value COV on any other object type. |
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
subscribable |
in | True to make property subscribable, false to make property not subscribable. Recommended value: true |
Returns
Section titled “Returns”True if successful. False if the device or object does not exist, the property is not part of that object type’s property profile, or the property is not yet enabled. When this is never called, the subscribable state falls back to the property profile default for the object type.
Topic: Objects and properties. Declared in CASBACnetStackDLL.h.