Commit Graph

3626 Commits

Author SHA1 Message Date
Steve Karg 5acd3ac336 Added bacnet_str functions for parsing various numeric strings. (#1151)
* Added bacnet_str functions for parsing various numeric strings.

* Refactored bacapp_parse_application_data to use bacnet_str functions
2025-11-19 06:23:58 -06:00
Steve Karg 2a6c251803 Revert "Added segmentation support for server reply. (#974)"
This reverts commit 3ea710f92f.
2025-11-17 22:26:50 -06:00
BACnetEd 003073b71e Use BACNET_ENGINEERING_UNITS for basic object API for units properties (#1104)
Co-authored-by: Ed <edward@connect-ex.com>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2025-11-17 22:17:22 -06:00
Steve Karg e9dd910b55 Convert the property list values into int32_t to support the larger property values when an int is 8-bit or 16-bit. (#1145) 2025-11-16 08:34:45 -06:00
Steve Karg 3ea710f92f Added segmentation support for server reply. (#974)
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.
2025-11-15 13:33:36 -06:00
Steve Karg bea2ceba11 Updated CHANGELOG for recent changes. 2025-11-15 13:10:26 -06:00
Steve Karg 9d1abbeba5 Added postpone reply because transmission of the segmented ComplexACK cannot begin until the node holds the token. (#1116) 2025-11-15 13:08:27 -06:00
Steve Karg 51358e83f9 Changed version to 1.5.0.rc1 2025-11-15 13:07:41 -06:00
Steve Karg 0682428c86 Released version 1.4.2 on 15-Nov-2025. 2025-11-15 12:52:22 -06:00
Steve Karg c1e685d490 Fixed the apps/blinkt example project to control 8 lighting outputs. (#1143) 2025-11-14 16:23:17 -06:00
Steve Karg 25d14c7c15 Fixed BACnet/SC secure connect VMAC, UUID, and initialization sequence (#1142)
* 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
2025-11-14 15:41:17 -06:00
Steve Karg 74972bd025 Added a basic creatable loop object with PID control (#1141)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-13 16:11:19 -06:00
Steve Karg 86e4405c71 Fixed WPM workaround for BTL Specified Test 9.23.2.X5 by reverting. (#1140) 2025-11-12 07:45:20 -06:00
Steve Karg 979ff0ead9 Added defines for lighting output object present-value special values. (#1137) 2025-11-11 09:41:38 -06:00
Steve Karg 356b4f72bf Bugfix/channel-object-type-all-enabled (#1135)
* Added datetime same API for unit testing.

* Added CHANNEL_VALUE_ALL define and fixed the API integration for the additional datatypes now supported.
2025-11-10 14:02:03 -06:00
Steve Karg 5574c9d3f1 Added getter API function to timer object for state-change-value (#1134)
* Added a new getter API function Timer_State_Change_Value_Get() to the timer object that returns state-change values by copying them to a caller-provided buffer, providing a safer alternative to the existing Timer_State_Change_Value() function which returns a direct pointer to internal data.
2025-11-10 12:12:23 -06:00
Steve Karg 28a30be5ec Fixed compiler warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] (#1133)
* Fixed compiler  warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

* Fixed compile error found in pipeline build.

* Fixed pre-commit
2025-11-09 13:26:35 -06:00
Steve Karg c6076f2561 Fixed the error class returned for AlarmAcknowledgment (#1131) 2025-11-07 08:40:59 -06:00
Steve Karg 4e52f26823 Added Audit Log and Time Value objects to basic device. (#1128)
* Added ListElement service callback for storing data.  

* Added Audit Log and Time Value objects to basic device.

* Added Audit Log object to Makefile and CMake builds.
2025-11-06 14:10:07 -06:00
Steve Karg 2acde643fd Secured BACnetAuthenticationFactorFormat decoder and added unit testing (#1127) 2025-11-06 14:08:38 -06:00
Steve Karg 35f3964b5a Secured event decoding by refactoring deprecated functions. (#1126)
* Secured event and authentication decoding by removing deprecated functions.

* Added extended, discrete-value, double-out-of-range, signed-out-of-range, unsigned-out-of-range, change-of-characterstring, change-of-status-flags, change-of-reliability, and change-of-timer event notification encode, decode, and unit testing with #ifdef disabled by default.
2025-11-05 21:41:30 -06:00
Steve Karg 4dd13cf199 Added basic timer object, internal state machine, and unit tests (#1123)
* 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.
2025-11-05 15:11:45 -06:00
Steve Karg 17259b37f3 Fixing Makefile build for bip6 with win32 MinGW and in github workflows. (#1125) 2025-10-30 12:00:01 -05:00
Steve Karg 895d9b3e21 Clause 21, enumerations for BACnetNetworkPortCommand conflict with final assigned values in multiple addenda. (#1124) 2025-10-29 15:05:58 -05:00
Steve Karg f278ccf37d Added object list init into create function in cases where create is called before init. (#1122) 2025-10-29 08:44:31 -05:00
Steve Karg cf79515272 Fixed octetstring_copy_value() and added unit tests. (#1121) 2025-10-28 17:54:38 -05:00
Steve Karg b726458ab9 The NDPU priority is now passed through the stack via apdu.c or h_apdu.c module so the MS/TP compare DER function can include the value in the comparison. (#1119) 2025-10-16 10:31:21 -05:00
Steve Karg d4d928a915 Added more unit testing for ReadProperty to increase code coverage. (#1118) 2025-10-15 10:24:08 -05:00
dependabot[bot] 6713f750c3 Bump github/codeql-action from 3 to 4 (#1117)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  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>
2025-10-08 05:48:58 -05:00
Steve Karg 5b7932ee62 Feature/add-device-object-functions-find-api (#1115)
* Added Device_Object_Functions_Find() API to enable override of basic object API function.

* Added Device_Object_Functions() API to return basic object API table of functions for all objects.
2025-09-30 15:59:08 -05:00
Steve Karg 83dfe50294 Updated CHANGELOG after latest commits. 2025-09-30 08:30:03 -05:00
Steve Karg f5bc0620e7 Added new enumerations, text, BACnetARRAY and BACnetList from protocol-revision 30 (#1114) 2025-09-28 21:36:38 -05:00
Steve Karg b74af37720 Refactored CharacterString_Value_Out_Of_Service_Set() function to remove confusion about an assignment inside an if-statement. (#1113) 2025-09-28 21:35:23 -05:00
Steve Karg 2416157351 Added a context variable in basic object data structure and API to get or set the context pointer. (#1111) 2025-09-26 13:19:58 -05:00
Steve Karg d91282be16 Fixed basic program object internal datatype for reason-for-fault and change properties. (#1110) 2025-09-25 14:11:28 -05:00
Steve Karg 814eea5fd9 Fixed compile errors in basic/server/device when BACAPP_TIMESTAMP or Channel object are not enabled. (#1109) 2025-09-24 11:01:49 -05:00
Steve Karg d3689aaec0 Updated CHANGELOG after latest commits. 2025-09-24 10:07:08 -05:00
Steve Karg f93f4fecf8 Added uBASIC+BACnet README document to describe the programming language, porting, and integration. (#1108) 2025-09-24 09:48:08 -05:00
Steve Karg 7dfc840dfc Bugfix/using-uint16-for-units-property-storage (#1107)
* 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.
2025-09-24 09:35:10 -05:00
Steve Karg b357bca5dd Converted device object test to use common read-write property test. Extended the basic BACnet device object example API. (#1106)
* Converted device object test to use common read-write property test. Extended the basic BACnet device object example API.

* Created BACnet/IP and COV test mocks to enable device object testing with less dependencies.
2025-09-24 07:09:56 -05:00
Steve Karg f877ca0ebb Fixed MS/TP state WAIT_FOR_REPLY to allow reception of any frames that are not known to be not reply frames. (#1103)
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.
2025-09-20 10:52:59 -05:00
Steve Karg af29c75075 Test/expanded-object-property-write-coverage (#1102)
* Expanded test coverage for WriteProperty in objects.

* Added common property tests for Lighting Output object and updated CMake configuration
2025-09-19 20:27:26 -05:00
Steve Karg 203cb102e7 Fixed Lighting Output object STOP lighting command so that it sets the present-value. (#1101) 2025-09-18 17:03:08 -05:00
Steve Karg 6061c36ac2 Fixed the lighting command RAMP TO ramp rate to always clamp within 0.1 and 100.0 to avoid endless rate of 0.0. (#1100)
* Fixed the lighting command RAMP TO ramp rate to always clamp within 0.1 and 100.0 to avoid endless rate of 0.0.

* Fixed the use of default fade, ramp, or step when those optional parameters are missing from lighting command.
2025-09-18 16:18:50 -05:00
Steve Karg bc2e0866e3 Fixed Lighting Output Step Up/On and Down/Off mixup. (#1099) 2025-09-18 15:01:39 -05:00
Steve Karg 547d7dfa98 Fixed Lighting Output step operations to set the Priority_Array slot appropriately. (#1098) 2025-09-18 14:15:14 -05:00
Steve Karg d8e6cacaeb Updated CHANGELOG after latest commits. 2025-09-18 10:58:25 -05:00
Steve Karg a7956e6082 Fixed the lighting output objects current priority comparison during lighting commands by using priority 17 (relinquish default) instead of 0. (#1097) 2025-09-18 10:57:03 -05:00
Steve Karg e3ef352f2d Added API to output objects for priority-array property value inspection. (#1096) 2025-09-17 15:57:53 -05:00
Steve Karg 5921a28590 Fixed CMake Error in libwebsocket: Compatibility with CMake < 3.5 has been removed from CMake (#1095) 2025-09-17 12:48:27 -05:00