Hello,
NOTE: I'm using the 1.3.8 (but in Milestone only 1.3.7 is present).
I've found an error when receiving:
WriteProperty "PROP_TIME_OF_DEVICE_RESTART", that has BACnet_Timestamp type.
Writing fail (not because is read only, I know) because "bacapp_decode_application_data" return -1 and give "ERROR_CODE_VALUE_OUT_OF_RANGE".
I've found the cause (but not the solution):
The Date and Time of "time of device restart" is included in a double Context Tag and this cause the "bacapp_decode_application_data" to fail; this dont' happens on previous 0.8.6.
Format of ADPU seems to be correct and has the same double Context Tag created by library when reading the same property; Attached the capture of this issue.
Thanks and Best Regards,
Andrea.
Anonymous
Thank you for reporting the problem!
I made a quick test by adding
PROP_TIME_OF_DEVICE_RESTARTto device object, made and ran the unit test, which failed. I made some changes until the test passed. Then I used the command line tools (bacservto similulate a device,bacepicsandbacrpandbacrpmto read the device property values, andbacwpto write values) to validate the fix and review the encoding using Wireshark.See commit cdda52
PROP_TIME_OF_DEVICE_RESTARTto the apps/server example Device object for ReadProperty and WriteProperty.src/bacnet/bacapp.cmodule to includeBACnetTimeStampin the decoding of known properties, and encode and parsing used by bacwp to write the value.bacapp_decode_known_property()instead ofbacapp_decode_application_data()function.Thank you for quick fixing!
It works as expected.
Thanks and Best Regards.