Commit Graph

3781 Commits

Author SHA1 Message Date
Steve Karg ba2d357784 Fix decode functions for signed integers to prevent undefined behavior by using unsigned values (#1300) 2026-04-10 06:23:17 -05:00
jenahn0630 f8bbc0b006 Fix Bug: Update RS485 baud rate configuration to use dlmstp_baud_rate(mstp_port) instead of shared data enum value (#1294) 2026-04-08 16:36:21 -05:00
Steve Karg 7536c6b6fa Fix type limits for uint32_t in sscanf and printf across multiple files (#1298) 2026-04-08 16:35:31 -05:00
Steve Karg ad89cba29b Add additional writable properties to OctetString and fix write property to present-value priority 6 logic. (#1297) 2026-04-07 16:31:27 -05:00
Steve Karg e77e070d90 Fix type definitions for inner_tag and object_instance when uint32_t is defined as long unsigned int instead of unsigned int (#1293)
* 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.
2026-04-06 11:51:36 -05:00
Kato Gangstad 589a61b287 esp32: replace port with PlatformIO implementation and add CI build (#1292) 2026-04-06 08:33:17 -05:00
Steve Karg 3d668f2f96 Bugfix/special event read property write property (#1291)
* 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
2026-04-02 09:09:49 -04:00
Steve Karg a8e2b53aa0 Reverted unsigned decorator to BACNET_MAX_INSTANCE and BACNET_MAX_OBJECT constants since they are compared to signed values in some use cases which then fails when unsigned is promoted. 2026-04-01 22:28:05 -04:00
Steve Karg 83fc4b351e Implement parsing for BACnetSpecialEvent in bacapp and add unit tests (#1290) 2026-04-01 16:27:36 -04:00
Hyeongjun Kim 236250492e Fixed off-by-one bug in gateway main() causing duplicate I-Am broadcast (#1289)
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>
2026-03-31 09:44:08 -04:00
Hyeongjun Kim f408b6eb7f Add multi-device support for BACnet gateway routing (#1279)
* 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>
2026-03-30 15:16:17 -04:00
Steve Karg b8dd89b879 Feature/structured view object subordinate list add remove (#1283) 2026-03-27 15:08:37 -05:00
Steve Karg 6f3d25b5ba Refactor CMakeLists.txt to replace BIG_ENDIAN definition with BACNET_BIG_ENDIAN to fix missing function in builds. (#1284) 2026-03-27 14:40:21 -05:00
Steve Karg 326a47b688 Remove push and pull_request triggers, keeping only workflow_dispatch for macOS CI tests 2026-03-27 14:38:00 -05:00
Steve Karg e695d399b0 Change macOS runner from macos-15-intel to macos-14-large for CI workflow 2026-03-27 14:28:49 -05:00
Steve Karg 40932a39db Update macOS runner version to macos-15-intel for CI workflow 2026-03-27 14:25:45 -05:00
Hyeongjun Kim fa6dc86ee4 Added INTRINSIC_REPORTING CMake option to enable intrinsic reporting at build time (#1275)
Signed-off-by: kimhyeongjun <hjun1.kim@samsung.com>
2026-03-26 15:37:02 -05:00
Hyeongjun Kim 5ec8f27487 Fixed missing keylist.h include in objects.h for OS_Keylist type dependency (#1277)
Signed-off-by: kimhyeongjun <hjun1.kim@samsung.com>
2026-03-26 15:26:50 -05:00
Steve Karg d562374f53 Fixed javadoc header in bvlc-pico. Added ports/pico to CHANGELOG. 2026-03-25 08:55:04 -05:00
Testimony 17e94092a1 Add Raspberry Pi Pico port (#1232)
* 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
2026-03-25 08:22:09 -05:00
Ping 5eda68d381 Add void *context field to service data structures (#1265) 2026-03-23 12:22:28 -05:00
dependabot[bot] cbf716f61b Bump microsoft/setup-msbuild from 2 to 3 (#1271)
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2 to 3.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v2...v3)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 08:03:02 -05:00
Hyeongjun Kim b7abd5016e Fixed missing BACNET_STACK_EXPORT macro for PositiveInteger_Value_Count() function declaration (#1273)
Signed-off-by: kimhyeongjun <hjun1.kim@samsung.com>
2026-03-23 08:02:17 -05:00
Steve Karg d3b0a9577b Add lighting_command_refresh() unit test (#1269)
* Add lighting_command_refresh() unit test

* Add tests for lighting output writable property list and warn relinquish behavior
2026-03-20 17:34:00 -05:00
Steve Karg 45541659e2 Updated CHANGELOG for recent changes. 2026-03-20 17:12:40 -05:00
Steve Karg 05f81b05ce Bugfix/lighting output low high trim fade (#1268)
* 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
2026-03-20 17:10:10 -05:00
Steve Karg 457d04a7df Changed BACNET_NO_DEV_ID to use UINT32_MAX (same value), and added U decorators to BACNET_MAX_INSTANCE and BACNET_MAX_OBJECT constants. 2026-03-19 15:37:12 -05:00
Steve Karg 91090d3ff8 Add octet string buffer duplication functions and refactor related structures (#1266)
* Add new functions for duplicating and copying octet string buffers.

* Move and update octet string value object structure with description string and add object-name and description WriteProperty handling using strdup. Add functional tests to ensure the correctness of the new features.
2026-03-18 13:13:00 -05:00
Steve Karg 1c9af1632b Fixed FQDN hostname limit in minimal hostnport implementation (#1263) 2026-03-16 17:16:27 -05:00
Steve Karg a755a8db4d Feature/octetstring value and length api (#1264)
* feat: add octetstring_length_value_same function for length and content comparison

* feat: add tests for characterstring UTF-8 validation

* feat: add tests for octetstring_init_ascii_epics validation

* feat: add test for bacnet_strdup string duplication validation

* feat: add utf8_isvalid test cases

* feat: add octet string value API for present-value octet-string value and length, and out-of-service properties
2026-03-16 17:04:23 -05:00
Steve Karg 07cf52384b Fixed duplicate name in RPM unit test. (#1260) 2026-03-12 18:13:06 -05:00
Steve Karg 3637149363 docs: add latest changes to CHANGELOG. 2026-03-12 10:23:51 -05:00
Steve Karg 4499f17135 fix: Add input validation to Schedule_Recalculate_PV and Schedule_Timer functions to prevent segmentation fault occurring in Schedule_Recalculate_PV() during application startup (#1259) 2026-03-12 10:21:29 -05:00
Steve Karg f525e7c484 Bugfix/read-range-address-list-encode (#1149)
* Fix: Corrected `rr_address_list_encode` to properly handle the end of the address cache and added a new test case to validate ReadRange operations near the cache limit.
2026-03-12 09:05:04 -05:00
Steve Karg 07bfc7c61c Fix Trend Log ReadRangeACK BY_SEQUENCE where an incorrect FirstSequence is sometimes returned. (#1150) 2026-03-12 08:13:04 -05:00
Steve Karg 4fbd80fd83 chore: Add *.idx to .gitignore to prevent indexing files from being tracked. 2026-03-12 07:03:34 -05:00
Steve Karg a5f2b2b125 Add property_list_read_only_member function to check for READ-ONLY properties (#1258) 2026-03-11 07:17:30 -05:00
Steve Karg fda63eb1aa Changed COV FSM handler to stay IDLE until there is a valid subscriber. (#1257) 2026-03-09 13:39:57 -05:00
Steve Karg bd29f1039d Fixed bacnet_strdup() to compile with C89/C90 without warnings. 2026-03-07 11:55:31 -06:00
Steve Karg 926bc17801 Feature/writable structured view object lists (#1256)
* Added WriteProperty handler in the Structured View object with handling for object-name, description, node-subtype, node-type, default-subordinate-relationship, represents, subordinate-list, subordinate-annotations, subordinate-node-types, and subordinate-relationships in the basic Structured View object.

* Changed Structured View character strings for object-name, description, and node-subtype to use dynamic strings to support WriteProperty.

* Added characterstring_utf8_valid(), characterstring_utf8_strdup() and write_property_characterstring_utf8_strdup() for UTF-8 string duplication.

* Added write property tests for array handling and validation of array index values
2026-03-06 10:23:42 -06:00
Steve Karg 8c47e8c9a3 Added array size parameter in BACnet array write handlers avoid a duplicate decoding operation. Avoid duplicate checking of array size in object handlers. (#1253) 2026-03-05 10:15:47 -06:00
Steve Karg b17a7c6084 Add bacnet_strdup function to replace POSIX strdup and update bacfile to use it (#1251) 2026-03-04 07:14:25 -06:00
Steve Karg 70914cf4d8 Fixed Device Management-Backup and Restore-B functionality to keep configuration files during the restore operation. (#1250) 2026-03-03 14:26:13 -06:00
Steve Karg 7535953235 Prevent deletion of backup files during restore process (#1249) 2026-03-03 11:37:21 -06:00
Steve Karg c65083af97 Fix macro naming for Octet String configuration in BACnet device object to align with existing Zephyr RTOS port. 2026-02-27 10:49:25 -06:00
Steve Karg 1e9347f8f3 Bugfix/backup restore failure timeout (#1247)
* Added backup failure timeout functionality and related methods in device management

* Fixed STARTBACKUP to hold at PERFORMING_A_BACKUP per spec, not IDLE.

* Added error handling for reinitialization during restore process to prevent accidental delete of all objects.

* Added some missing Create/Delete object functions. Formatting.

* Fixed Program object type in bacnet_device.c module.
2026-02-27 10:33:10 -06:00
Steve Karg 1437a68ce1 Add CreateObject and DeleteObject for Octet String and Positive Integer Values (#1246)
* Added CreateObject and DeleteObject for basic Octet String Value and Positive Integer Value objects.

* Changed PositiveInteger present-value datatype to BACNET_UNSIGNED_INTEGER.
2026-02-26 16:25:03 -06:00
Steve Karg 24587dfc27 Add PROP_TIMER_RUNNING to writable properties and implement Timer_Running_Set functionality (#1245) 2026-02-26 11:26:42 -06:00
Steve Karg a70ce07507 Secure BACnet decoders and service requests (#1244)
* Secured BACnetAssignedAccessRights decoder.

* Secured BACnetPropertyState decoder.

* Secured BACnetCredentialAuthenticationFactor decoder.

* Secured BACnetEventState change-of-state [1] SEQUENCE decoder.

* Secured I-Have-Request service decoder.

* Secured Add/Remove ListElement service request decoder.

* Secured ConfirmedPrivateTransfer-Request and UnconfirmedPrivateTransfer-Request decoders.

* Secured ReadPropertyMultiple-Request and -Ack decoders.

* Secured TimeSynchronization-Request decoder.

* Secured WritePropertyMultiple service decoders

* Secured Trend Log object TL_fetch_property() function.

* Secured ReadProperty-Ack decider,

* Refactor BACnet time sync recipient handling by moving timesync linked list structure into bacdest where the recipient encoder and decoder already existed.

* Secured decoding of BACnetPropertyState.

* Secured decoding in the LifeSafetyOperation-Request service.

* Secured BACnetAuthenticationFactor decoding in the Credential Data Input object.

* Fixed WriteProperty decoder to avoid read buffer overrun.  Improved WriteProperty error reporting by adding specific reject codes during decoding similar to WritePropertyMultiple. Deduplicated the WriteProperty handling of abort, reject and error codes.

* Added BACNET_STACK_DEPRECATED_DISABLE guards around all of the deprecated decoding functions to ensure they are not used except intentionally for legacy code bases.

* Changed version to 1.5.0.rc5 for security fix tracking in branch.
2026-02-26 10:48:25 -06:00
Steve Karg cf4f62f7e0 Added Who-Is-Router process for Notification Class recipient unknown router addresses. (#1243)
* Added Who-Is-Router-To-Network process in basic Notification Class when recipient address is missing the router MAC address.

* Added buffer_length parameter to octet string buffer decode functions

* Fixed BACnet address handling for I-Am-Router address updating the recipient list address for the next hop router.

* Changed VMAC encoding and decoding to use octet string buffer API to reduce stack RAM.
2026-02-25 09:58:38 -06:00