Fixed error-code returned when an object does not support WriteProperty but has properties that are known. (#912)
This commit is contained in:
@@ -252,6 +252,35 @@ 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;
|
||||
}
|
||||
|
||||
void Device_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user