* Added example Device object and property value backup using create-object list-of-initial-values and writable properties. Initiated using ReinitializeDevice with STARTBACKUP command. Added backup and restore required properties to the Device object.
* Fixed fwrite parameters in bacfile_posix_write_stream_data to return the correct number of bytes written.
* Added Device Management-Backup and Restore-B (DM-BR-B) conversion to Wireshark PCAP format command line utility in apps/dmbrcap which decodes and provides a view of the binary backup file.
Added a new API for writable property lists across all the basic example object types, preparing for the introduction of a Writable_Property_List property in every object in a future BACnet standard revision.
The lists can be used by backup and restore feature to automatically choose the object property values in the backup that can be restored via internal WriteProperty directly from BACnet CreateObject services with List of Initial Values.
Updated existing device object examples to include these writable property lists.
* Fixed BACnet file object path name unintended path traversals by optionally restricting path name content with BACNET_FILE_PATH_RESTRICTED define.
* Added POSIX file path name checking for AtomicReadFile and AtomicWriteFile example applications. Prohibits use of relative and absolute file paths when BACNET_FILE_PATH_RESTRICTED is non-zero.
missing include asm/ioctls.h with error 'TCGETS2' undeclared
The gcc warning "overflow in conversion from 'long unsigned int' to 'int' changes value from '2150388778' to '-2144578518' " can be surrpres wtith a musl patch
https://gist.github.com/stargieg/3dbfe94b5776d9dfb3e14d18ee43aade
from the musl mailing list with discussion on this bug, but no solution.
[PATCH] ioctl: Fix implicit constant conversion overflow
https://www.openwall.com/lists/musl/2024/06/01/1
* fix mstp on macos NS_PER_S is 1s and 0ns
* fix compile on freebsd
* port bsd: add compile warnings and comments
* port bsd: limit pthred prio to OS defined min/max value
e.g. FreeBSD min=0 max=31
* port bsd: fix clangformat
* Refactored BACnetShedLevel encoding, decoding, and printing into separate file. Added unit testing.
* Added API to load control object for shed-level, start-time, duty-window, full-duty-baseline, and enable.
* Fixed bacapp sprintf for shed level and host-n-port found in scan build.
Added segmentation support for server devices for some services. Configure BACNET_SEGMENTATION_ENABLED=1 to include in the library, and adjust BACNET_MAX_SEGMENTS_ACCEPTED for maximum number of segments.
* Refactored the BACnet/SC datalink initialization order by moving certificate file checks and hub connection registration to occur after datalink initialization
* Replaced stdlib rand() with platform-specific cryptographically secure random functions (RtlGenRandom for Windows, getrandom for Linux, arc4random_buf for BSD) to generate UUID and VMAC addresses, preventing duplicates that broke connections
* Enabled conditional debug output in BACnet/SC components when BUILD=debug is specified
* 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.
* Fixed units property declaration in basic Analog Input header file to be uint16_t instead of uint8_t.
* Added range checking of units property in example objects WriteProperty handler.
This fixes segmented Complex-ACK frames which were dropped. This enables all proprietary frames and any new frames to be recieved to the higher layers.
* Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. Increased the size of the name string to handle larger possible integers.
* Fixed copied code that no longer needs static function scope variables for text names.
* Added dynamic RAM file system to use with basic bacnet file object.
* Added static RAM file system to use with basic bacnet file object.
* Added check for read-only during AtomicWriteFile service API for BACnet File object.
* Change stm32f4xx example to use static RAM file system.
* Fixed bacfile_count() function return type
* Linux MS/TP:
* dlmstp_init:
* Maximize thread priority if permitted
* MSTP_Put_Receive/dlmstp_receive:
* Use a buffer so incoming frames are not dropped during bursts
* dlmstp_receive:
* Make timeout optional
* MSTP_Get_Reply:
* Lock the mutex before using the PDU Queue
* Iterate over all queued replies to find a match (instead of only checking the first)
* Sleep for a millisecond before checking again to wait for the application provide a reply
* RS485_Check_UART_Data:
* Ensure waiter is initilized before using with select
* Ensure bytes are read before adding to FIFO
TSM:
* Add log when `datalink_send_pdu` fails for consistency with all other `datalink_send_pdu` calls
dlenv_maintenance_timer:
* Fix Tx/Rx labels in MSTP statitistics print
* don't log on queued requests
* Added missing API defined in header into ports/win32/dlmstp.c module, added a PDU queue and refactored receive thread, and refactored MS/TP timing parameters.
* Added missing API defined in header into ports/linux/dlmstp.c module, and refactored MS/TP timing parameters.
* Added missing API defined in header into ports/bsd/dlmstp.c module, and refactored MS/TP timing parameters.
* Reduce default MS/TP APDU to 480 to avoid extended frames by default.