BACnetStack_SetProprietaryProperty
bool BACnetStack_SetProprietaryProperty( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t propertyIdentifier, const bool required, const bool writable, const uint32_t dataType, const bool isArray, const bool isList, const bool subscribable);Sets the data type that is used in the callback for a object property.
The device, and object, must exist before calling this function. It is rare that you will need to call this function. It is primarly used for adding custom properties to an object.
CALLING THIS TWICE FOR THE SAME PROPERTY IS REFUSED: if the property identifier is already configured on the object (including through an earlier call that enabled it), none of the arguments above are applied and false is returned. There is no update path - get it right on the first call.
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The instance number of the device that contains the object whose property will be enabled. |
objectType |
in | The object type of the object whose property will be enabled. 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 enabled. |
propertyIdentifier |
in | The property to enable. See BACnetPropertyIdentifier for more info. |
required |
in | If true this property will be added to the required list of objects, instead of the optional list. A ReadPropertyMultiple for REQUIRED or OPTIONAL returns standard properties only (cl. 15.7.3.1.2), so for a proprietary propertyIdentifier this flag changes no ReadPropertyMultiple answer; ALL includes the property either way. For a standard propertyIdentifier the flag decides whether REQUIRED or OPTIONAL returns it. |
writable |
in | If true this property will Automaticallybe set to writable. |
dataType |
in | The datatype to be used. See CASBACnetStack::BACnetTag::BACnetTagApplicationDatatypes for the enumerations. Null = 0, Boolean = 1, UnsignedInteger = 2, SignedInteger = 3, Real = 4, Double = 5, OctetString = 6, CharacterString = 7, BitString = 8, Enumerated = 9, Date = 10, Time = 11, BACnetObjectIdentifier = 12, |
isArray |
in | IGNORED. Arrays are not implemented for proprietary properties; passing true only logs a warning through the debug-message callback and the property is still created as a scalar. |
isList |
in | IGNORED, exactly as isArray. |
subscribable |
in | LIVE - this is NOT an unused parameter, despite what earlier revisions of this documentation said. False makes SubscribeCOV / SubscribeCOVProperty on this property fail with Error Class PROPERTY, Error Code NOT_COV_PROPERTY. Pass true if clients must subscribe to it. |
Returns
Section titled “Returns”True if successful, false if failed.
Topic: Objects and properties. Declared in CASBACnetStackDLL.h.