Fixed error-code returned when an object does not support WriteProperty but has properties that are known. (#912)

This commit is contained in:
Steve Karg
2025-02-12 16:54:40 -06:00
committed by GitHub
parent ae135cd368
commit 7b9d6d7dc5
8 changed files with 383 additions and 20 deletions
+29
View File
@@ -256,6 +256,35 @@ void Device_Objects_Property_List(
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;
}
/* These three arrays are used by the ReadPropertyMultiple handler */
static const int Device_Properties_Required[] = {
PROP_OBJECT_IDENTIFIER,