Refactor/property lists member function (#609)

* Refactor property lists member function for WriteProperty default case.

* Refactor time-value object unit testing

* Added test for unsupported property to common property test
This commit is contained in:
Steve Karg
2024-03-27 09:52:01 -05:00
committed by GitHub
parent 4e0a37fd75
commit 6bd1942635
14 changed files with 118 additions and 304 deletions
+27
View File
@@ -85,6 +85,33 @@ bool property_list_member(const int *pList, int object_property)
return status;
}
/**
* @brief Determine if the object property is a member of any of the lists
* @param pRequired - array of type 'int' that is a list of BACnet properties
* @param pOptional - array of type 'int' that is a list of BACnet properties
* @param pProprietary - array of type 'int' that is a list of BACnet properties
* @param object_property - object-property to be checked
* @return true if the property is a member of any of these lists
*/
bool property_lists_member(
const int *pRequired,
const int *pOptional,
const int *pProprietary,
int object_property)
{
bool found = false;
found = property_list_member(pRequired, object_property);
if (!found) {
found = property_list_member(pOptional, object_property);
}
if (!found) {
found = property_list_member(pProprietary, object_property);
}
return found;
}
/**
* ReadProperty handler for this property. For the given ReadProperty
* data, the application_data is loaded or the error flags are set.