Commit Graph

3648 Commits

Author SHA1 Message Date
Steve Karg 6993a7c0fd Bugfix/indtext-find-string-among-similar (#1173)
* Enhanced string comparison functions and update indtext API usage

- Added library specific case-sensitive and case-insensitive string comparison functions that mimic strcmp.
- Updated indtext_by_string and indtext_by_istring to use the new comparison functions.
- Improved documentation for return values in indtext functions.
- Expanded test data in main.c for comprehensive testing when beginning of string matches another string.
2025-12-03 11:08:32 -06:00
Ryan Mulder 458508f562 increase size of MAX_HEADER in BACDL_MULTIPLE because 8 is not big enough for some datalinks (e.g. mstp) (#1170) 2025-12-03 11:01:18 -06:00
Ryan Mulder 19cd0e8cd8 Add npdu set i am router to network handler (#1169)
* added npdu_set_i_am_router_to_network_handler

* npdu_send_what_is_network_number: fix sending to broadcast address
2025-12-03 11:00:28 -06:00
Ryan Mulder 0fd814867d Change prints to debug (#1168) 2025-12-03 10:59:30 -06:00
Steve Karg b1c9d013ef Fixed compiler macro redefined warning when optional datatypes are defined globally. (#1172) 2025-12-03 08:58:36 -06:00
Steve Karg 8991c56b70 Fixed copy and compare API of BACnetObjectPropertyReference structure. (#1171) 2025-12-02 16:54:10 -06:00
Steve Karg e7f1101808 Fixed array-bounds on BACnetObjectPropertyReference parsing. (#1167) 2025-12-02 15:04:45 -06:00
Steve Karg bdfe70639c Fixed the missing BACnetObjectPropertyReference text used in debugging. Also fixed missing BACnetSCFailedConnectionRequest, BACnetSCHubFunctionConnection, BACnetSCDirectConnection,BACnetSCHubConnection, BACnetTimerStateChangeValue, and BACnetAddressBinding text. (#1166) 2025-12-02 14:31:19 -06:00
Steve Karg c33944e0f8 Fixed the units to/from ASCII to function for other units properties. (#1165) 2025-12-02 12:37:27 -06:00
Steve Karg cef68dc079 Feature/refactor-apps-string-parsing (#1152)
* Added bacnet_str functions for parsing various numeric strings.

* Renamed BACnet string API to be clearer when no stdlib function exists.

* Fixed  incompatible types - from 'BACNET_UNSIGNED_INTEGER *' to 'unsigned long *'  warning

* Changed bacnet-str-to functions to use ERANGE for error detection.

* Refactored some apps to use common string parsing for BACnet data types.

* Refactor bacapp_parse_application_data to use bacnet_string_to_unsigned for better clarity

* Added strtol for BACnetEventType.
2025-12-02 11:27:19 -06:00
Steve Karg 73fbb400cb Fixed bacnet_snprintf() to be able to return the full length of a string when the size is zero. (#1164) 2025-12-01 13:45:30 -06:00
matt7aylor f28c804969 Fixed ipv6 destination port and multicast interface issues. (#1161) 2025-11-27 23:14:35 -06:00
Steve Karg ca9836b099 Added BACnetRecipient and BACnetAddressBinding codecs for EPICS application (#1163)
* Added BACnetRecipient and BACnetAddressBinding encoding, decoding, ASCII conversion, comparison, and copy functions.

*  Added library specific string manipulation utilities including strcmp, strncmp, stptok, and snprintf with offset functions.

* Added test/README about verification and validation testing.
2025-11-27 23:12:39 -06:00
Steve Karg 21626d1ac5 Fixed datetime integer overflow on 8-bit compiler (#1162) 2025-11-25 21:02:04 -06:00
Steve Karg ba2e2ac24f Added default option to some bactext name functions so that NULL can be returned when a name does not exist. (#1160) 2025-11-21 17:19:10 -06:00
Steve Karg a31261f78d Moved ltrim, rtrim, and trim string functions into the bacstr library. (#1159) 2025-11-21 16:30:40 -06:00
Steve Karg a508e11624 Fixed the loop object empty reference property by initializing to self. When configured for self, the manipulated property value will update the controlled variable value for simulation. (#1158)
* Fixed the loop object empty reference property by initializing to self.   When configured for self, the manipulated property value will update the controlled variable value for simulation.

* Changed min/max output and update-interval defaults.
2025-11-21 15:45:14 -06:00
Amer 94b267d67e linux: cache netmask for accurate subnet prefix calculation to fix implementation which always returned 0 (#1155)
Co-authored-by: Syed Amer Gilani <syed.gilani@trilux.com>
2025-11-21 15:21:59 -06:00
dependabot[bot] af834c9fff Bump actions/checkout from 5 to 6 (#1156)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  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-11-21 13:11:39 -06:00
Steve Karg 2a2407b2c6 Feature/bacnet-str-itoa-helpers (#1157)
* Added BACnet library itoa, ltoa, ultoa, dtoa, and utoa ASCII functions for ease of printing formatted values.

* Exposed the bacnet_byte_reverse_bits() function API.
2025-11-21 11:30:44 -06:00
Steve Karg 004aaf702d Fixed unit test stack corruption from using stack based message text characterstring pointer in multiple functions and setting the value in the global event and test event data structures. (#1154) 2025-11-20 06:56:04 -06:00
Steve Karg 8f0fe8c48e Fix timesync recipient encoding to check for OBJECT_DEVICE type before encoding. (#1153) 2025-11-20 05:14:52 -06:00
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