Added basic timer object, internal state machine, and unit tests (#1123)

* Added basic timer object, internal state machine, and unit tests

* Added BACnetTimerStateChangeValue encode, decode, parse, print, and diff with unit tests

* Changed handler of add/remove list element to check if the property is a BACnetLIST

* Added BACnetLIST utility for handling WriteProperty to a list.

* Fixed outlier ReadProperty object handlers to return zero when the RP parameter is NULL.
This commit is contained in:
Steve Karg
2025-11-05 15:11:45 -06:00
committed by GitHub
parent 17259b37f3
commit 4dd13cf199
126 changed files with 5509 additions and 56 deletions
+12 -4
View File
@@ -803,11 +803,15 @@ int Notification_Class_Add_List_Element(BACNET_LIST_ELEMENT_DATA *list_element)
return BACNET_STATUS_ABORT;
}
if (list_element->object_property != PROP_RECIPIENT_LIST) {
list_element->error_class = ERROR_CLASS_SERVICES;
list_element->error_code = ERROR_CODE_PROPERTY_IS_NOT_A_LIST;
/* The specified property is currently not modifiable
by the requester.*/
list_element->error_class = ERROR_CLASS_PROPERTY;
list_element->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
return BACNET_STATUS_ERROR;
}
if (list_element->array_index != BACNET_ARRAY_ALL) {
/* An array index is provided but the property is
not a BACnetARRAY of BACnetLIST.*/
list_element->error_class = ERROR_CLASS_PROPERTY;
list_element->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
return BACNET_STATUS_ERROR;
@@ -963,11 +967,15 @@ int Notification_Class_Remove_List_Element(
return BACNET_STATUS_ABORT;
}
if (list_element->object_property != PROP_RECIPIENT_LIST) {
list_element->error_class = ERROR_CLASS_SERVICES;
list_element->error_code = ERROR_CODE_PROPERTY_IS_NOT_A_LIST;
/* The specified property is currently not modifiable
by the requester.*/
list_element->error_class = ERROR_CLASS_PROPERTY;
list_element->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
return BACNET_STATUS_ERROR;
}
if (list_element->array_index != BACNET_ARRAY_ALL) {
/* An array index is provided but the property is
not a BACnetARRAY of BACnetLIST.*/
list_element->error_class = ERROR_CLASS_PROPERTY;
list_element->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
return BACNET_STATUS_ERROR;