Add API for writable object property lists (#1206)
Added a new API for writable property lists across all the basic example object types, preparing for the introduction of a Writable_Property_List property in every object in a future BACnet standard revision. The lists can be used by backup and restore feature to automatically choose the object property values in the backup that can be restored via internal WriteProperty directly from BACnet CreateObject services with List of Initial Values. Updated existing device object examples to include these writable property lists.
This commit is contained in:
@@ -137,6 +137,14 @@ static const int32_t BACnetARRAY_Properties[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int32_t Writable_Properties[] = {
|
||||
/* Every object shall have a Writable Property_List property
|
||||
which is a BACnetARRAY of property identifiers,
|
||||
one property identifier for each property within this object
|
||||
that is always writable. */
|
||||
PROP_ENABLE, PROP_BUFFER_SIZE, -1
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Determine if the object property is a BACnetARRAY property
|
||||
* @param object_property - object-property to be checked
|
||||
@@ -176,6 +184,20 @@ void Audit_Log_Property_Lists(
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the list of writable properties for an Audit Log object
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param properties - Pointer to the pointer of writable properties.
|
||||
*/
|
||||
void Audit_Log_Writable_Property_List(
|
||||
uint32_t object_instance, const int32_t **properties)
|
||||
{
|
||||
(void)object_instance;
|
||||
if (properties) {
|
||||
*properties = Writable_Properties;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets an object from the list using an instance number as the key
|
||||
* @param object_instance - object-instance number of the object
|
||||
|
||||
Reference in New Issue
Block a user