Bugfix/property array element zero size (#908)

* Changed BACnetARRAY index validation into ReadProperty, ReadPropertyMultiple, WriteProperty, and WritePropertyMultiple handlers.

* Changed the basic and example objects after refactoring BACnetARRAY index validation into ReadProperty, ReadPropertyMultiple, WriteProperty, and WritePropertyMultiple handlers.

* Added BACnet application decoder that understands that an array element of zero is an unsigned integer tagged value.  Fixes RP and RPM apps when reading the array element zero of arrays.
This commit is contained in:
Steve Karg
2025-02-10 09:44:53 -06:00
committed by GitHub
parent da3aaf3b48
commit 66329a05a0
98 changed files with 299 additions and 1234 deletions
+6 -1
View File
@@ -55,6 +55,7 @@ void handler_write_property(
BACNET_WRITE_PROPERTY_DATA wp_data;
int len = 0;
bool bcontinue = true;
bool success;
int pdu_len = 0;
BACNET_NPDU_DATA npdu_data;
int bytes_sent = 0;
@@ -103,7 +104,11 @@ void handler_write_property(
bcontinue = false;
}
if (bcontinue) {
if (Device_Write_Property(&wp_data)) {
success = write_property_bacnet_array_valid(&wp_data);
if (!success) {
success = Device_Write_Property(&wp_data);
}
if (success) {
len = encode_simple_ack(
&Handler_Transmit_Buffer[pdu_len], service_data->invoke_id,
SERVICE_CONFIRMED_WRITE_PROPERTY);