* Support routed virtual device backup restore reinitialization
Allow routed virtual devices to accept ReinitializeDevice so Backup and Restore
states can be handled per device. Gateway behavior remains unchanged, and
DeviceCommunicationControl remains disabled for virtual devices.
Virtual-device COLDSTART, WARMSTART, and ACTIVATE_CHANGES requests now return
OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED instead of being acknowledged.
* Cover routed device backup restore test variants
Add routed-device tests for ReinitializeDevice service approval, DCC blocking,
virtual-device unsupported reinitialize states, per-device Backup/Restore state,
and backup timeout countdown behavior.
Build device tests in four compile-time variants so BAC_ROUTING and
BACNET_BACKUP_RESTORE are covered in both enabled and disabled combinations.
* Keep routed device variant tests in CTest
Register each optional device test build as its own CTest build/run pair so BAC_ROUTING and BACNET_BACKUP_RESTORE variants keep the existing fixture-based build-before-run behavior without changing the top-level test CMake file.
Constraint: Top-level test/CMakeLists.txt remains unchanged to preserve the existing test registration convention
Confidence: high
Scope-risk: narrow
Tested: cmake -S test -B /tmp/bacnet-stack-test-cmake-pr1320
Tested: ctest --test-dir /tmp/bacnet-stack-test-cmake-pr1320 -R '^test_device(_.*)?$' --output-on-failure -j4
Not-tested: Full repository CTest suite
* Ensure Backup/Restore has real configuration-file storage
Centralize reinitialize state storage so routed devices and the default device use the same access path. Enforce BACNET_BACKUP_FILE_COUNT as a positive Backup/Restore invariant, while preserving BACNET_BACKUP_RESTORE guards for no-backup builds.
Constraint: BACNET_BACKUP_RESTORE performs backup and restore through Configuration_Files[0].
Rejected: Preserve BACNET_BACKUP_FILE_COUNT=0 support | it leaves only state/property handling without a usable backup file.
Confidence: high
Scope-risk: moderate
Directive: Guard no-backup builds with BACNET_BACKUP_RESTORE, not BACNET_BACKUP_FILE_COUNT.
Tested: ctest --test-dir test/build -R '^(build_device|test_device|build_device_backup_restore|test_device_backup_restore|build_device_bac_routing|test_device_bac_routing|build_device_bac_routing_backup_restore|test_device_bac_routing_backup_restore)$' --output-on-failure
Tested: cmake --build build --target server gateway gateway2 bacbasic
Not-tested: Runtime BACnet client backup/restore exchange
---------
Signed-off-by: kimhyeongjun <hjun1.kim@samsung.com>
Co-authored-by: OmX <omx@oh-my-codex.dev>
* fix: add null pointer check for value when resetting device identifier in bacdevobjpropref
* test: add regression test for bacnet_device_object_reference_decode with null value pointer
* Add BACnet authentication factor support with comparison functions and text strings and parsing
* Fix MyReadPropertyAckHandler to allow zero length for empty property list
* Fix rp_ack_fully_decode_service_request to handle empty recipient list
* Enhance PrintReadPropertyArray to handle empty lists with improved output formatting
* Refactor command line argument handling for target-address to accept dotted IP if offered.
* This commit introduces the inclusion of `authentication_factor.c` and `authentication_factor_format.c` in the CMakeLists.txt files for multiple BACnet tests to fix the broken test builds.
* Refactor bacapp.c for improved readability and documentation; streamline code formatting and enhance function comments.
* Fix return value assignment in bacapp_snprintf_value for authentication format
* Enhance help message to clarify target MAC or IP address format and improve readability
* Implement memory management for ReadProperty ACK service requests and improve error handling in decoding
* Refactor lighting output and lighting command structure for loose coupling. Add locking callbacks in lighting command.
* Enhance lighting command handling with locking mechanism
- Added locking and unlocking functionality to critical sections in lighting command functions to ensure thread safety.
- Introduced new functions `lighting_command_lock` and `lighting_command_unlock` for explicit locking.
- Updated existing functions to utilize the new locking mechanism, preventing concurrent access issues.
- Refactored notification and clamping functions to support locking, ensuring data integrity during operations.
- Added getter and setter functions with internal locking to access the lighting command data
* Add BACnetRecipientProcess type encoding and decoding functions with associated tests
* Refactor COV subscription encoding and decoding functions to reduce code size and reuse existing unit tested functions.
* Refactor COV subscription handling to simplify error checking
* Fix type definitions in bacapp.c for inner_tag and object_instance when uint32_t is defined as long unsigned int instead of unsigned int
* Change DNET_list type from int to int32_t across multiple files to avoid compiler warnings when int32_t is defined as long int instead of int.
* Fixed special-event to print priority for the RP and RPM and EPICS example apps.
* Improved error message for tag value parsing in WP example app.
* Added BACnet property array parsing function to handle property string name in RPM example app.
* Added unit test to validate BACnet special event with multiple time-value pairs
When Routed_Device_Index reached MAX_NUM_DEVICES, Get_Routed_Device_Object()
returned NULL without updating iCurrent_Device_Idx, causing Send_I_Am() to
broadcast the previous device's I-Am again.
* Initialize Routed_Device_Index to 1 (first routed device index)
* Move increment after Send_I_Am() to prevent out-of-bounds access
Signed-off-by: kimhyeongjun <hjun1.kim@samsung.com>
* Expanded Object_List to Object_List[MAX_NUM_DEVICES] array to support per-device objects for virtual remote devices
* Added multi-device iteration for COV handler, device timer, and intrinsic reporting
* Added apps/gateway2 demo application
* When MAX_NUM_DEVICES == 1, behavior is identical to the original implementation
* Conditional compilation with macros ensures no impact on non-gateway applications
---------
Signed-off-by: Hyeongjun Kim <hjun1.kim@samsung.com>
Co-authored-by: haemeok-kang <haemeok.kang@samsung.com>
* Add Raspberry Pi Pico port
- Adds BACnet/IP with abstracted network layer
- Adds BACnet MS/TP support using RS485/UART
- Includes README with examples
* Add Pico 2 MS/TP demo, CI, and docs
* Add low and high trim fade functionality to lighting command operations
* Refactor lighting command override functions and fix operating and normalized range.
* Add physical range clamping function and update related clamping logic