Fixed WriteProperty bypass which is only for present-value property of commandable objects. (#984)

This commit is contained in:
Steve Karg
2025-05-05 21:48:29 -05:00
committed by GitHub
parent 44d727c13b
commit 0f3cbe3ec5
7 changed files with 123 additions and 24 deletions
+50
View File
@@ -534,3 +534,53 @@ bool property_list_bacnet_list_member(
return property_list_member(Properties_BACnetLIST, object_property);
}
/**
* @brief Determine if the object property is a commandable member
*
* 19.2.1.1 Commandable Properties
* The prioritization scheme is applied to certain properties of objects.
* The standard commandable properties and objects are as follows.
*
* @param object_type - object-type to be checked
* @param object_property - object-property to be checked
* @return true if the property is a commandable member
*/
bool property_list_commandable_member(
BACNET_OBJECT_TYPE object_type, BACNET_PROPERTY_ID object_property)
{
bool status = false;
switch (object_type) {
case OBJECT_ACCESS_DOOR:
case OBJECT_ANALOG_OUTPUT:
case OBJECT_ANALOG_VALUE:
case OBJECT_BINARY_LIGHTING_OUTPUT:
case OBJECT_BINARY_OUTPUT:
case OBJECT_BINARY_VALUE:
case OBJECT_BITSTRING_VALUE:
case OBJECT_CHANNEL:
case OBJECT_CHARACTERSTRING_VALUE:
case OBJECT_DATE_VALUE:
case OBJECT_DATE_PATTERN_VALUE:
case OBJECT_DATETIME_VALUE:
case OBJECT_DATETIME_PATTERN_VALUE:
case OBJECT_INTEGER_VALUE:
case OBJECT_LARGE_ANALOG_VALUE:
case OBJECT_LIGHTING_OUTPUT:
case OBJECT_MULTI_STATE_OUTPUT:
case OBJECT_MULTI_STATE_VALUE:
case OBJECT_OCTETSTRING_VALUE:
case OBJECT_POSITIVE_INTEGER_VALUE:
case OBJECT_TIME_VALUE:
case OBJECT_TIME_PATTERN_VALUE:
if (object_property == PROP_PRESENT_VALUE) {
status = true;
}
break;
default:
break;
}
return status;
}