Added bypass in basic WriteProperty handler to accept writes of NULL to non-commandable properties (#919)
This commit is contained in:
@@ -220,6 +220,46 @@ void Device_Objects_Property_List(BACNET_OBJECT_TYPE object_type,
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determine if the object property is a member of this object instance
|
||||
* @param object_type - object type of the object
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param object_property - object-property to be checked
|
||||
* @return true if the property is a member of this object instance
|
||||
*/
|
||||
bool Device_Objects_Property_List_Member(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID object_property)
|
||||
{
|
||||
bool found = false;
|
||||
struct special_property_list_t property_list = { 0 };
|
||||
|
||||
Device_Objects_Property_List(object_type, object_instance, &property_list);
|
||||
found = property_list_member(property_list.Required.pList, object_property);
|
||||
if (!found) {
|
||||
found =
|
||||
property_list_member(property_list.Optional.pList, object_property);
|
||||
}
|
||||
if (!found) {
|
||||
found = property_list_member(
|
||||
property_list.Proprietary.pList, object_property);
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the list of required, optional, and proprietary properties
|
||||
* for the Device object.
|
||||
* @param pRequired [out] Pointer to the list of required properties
|
||||
* @param pOptional [out] Pointer to the list of optional properties
|
||||
* @param pProprietary [out] Pointer to the list of proprietary properties
|
||||
* @note The lists are terminated with -1.
|
||||
* @note The lists are not allocated, so do not free them.
|
||||
* @note The lists are static, so do not modify them.
|
||||
* @ingroup ObjIntf
|
||||
*/
|
||||
void Device_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user