Hi Steve,
First of all, many thanks for this great stack. I am running the stack as a BACnet Client on a Ubuntu Linux VM. Using the demo app (bin/bacrp) for reading the device object property of the demo server (bin/bacserv), the object list doesnt get fully printed on the console.
So in file bacnetstack/src/bacnet/basic/service and in function
void rp_ack_print_data(BACNET_READ_PROPERTY_DATA data)
...
...
/ FIXME: what if application_data_len is bigger than 255? /
/ value? need to loop until all of the len is gone... /
for (;;) {
len = bacapp_decode_application_data(
application_data, (uint8_t)application_data_len*, &value);
...
...
I changed the line to
len = bacapp_decode_application_data(
application_data, (uint16_t)application_data_len, &value);
to allow application_data_len bigger than 255.
With this change, I am able to print the complete list of objects when reading the property of the device. Hopefully this change would cover the max APDU length of 1500bytes.
Anonymous
Thank you for finding the bug. I fixed it by matching the cast with the function data type of unsigned.