Commit Graph

3665 Commits

Author SHA1 Message Date
Steve Karg b8bf498e57 Updated SECUTITY after CVE reported on 1.5.0.rc1 2025-12-13 11:27:55 -06:00
Ryan Mulder 602111059a Add support for Event_Message_Texts and Fault Event Notifications in Analog Input objects (#1188) 2025-12-12 22:44:44 -06:00
Steve Karg 380540635c Refactored BACnetShedLevel encoding, decoding, and printing into separate file. Added unit testing. (#1187)
* 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.
2025-12-12 08:32:42 -06:00
Steve Karg 7a319c2901 Updated CHANGELOG for recent changes. 2025-12-11 14:58:18 -06:00
Ryan Mulder 731e1b8370 implemented Analog_Input_Notification_Class, Analog_Input_Event_Enable, Analog_Input_Notify_Type (#1184) 2025-12-11 14:56:41 -06:00
Steve Karg 4b9cd061e7 Added API and properties to basic lighting output object example for power and feedback value. (#1185) 2025-12-11 13:33:50 -06:00
Steve Karg e0ce0bd5c7 Disabled macOS workflow that is taking forever. (#1186) 2025-12-11 13:03:51 -06:00
Steve Karg 2e973fac93 Updated CHANGELOG for recent changes. 2025-12-09 13:22:42 -06:00
Steve Karg 7f2690fd96 Fixed a regression in the rpm_ack_object_property_process() function that prevented proper parsing of multi-object ReadPropertyMultiple ACK responses. The bug was introduced in PR #765 and caused the function to incorrectly return ERROR_CODE_INVALID_TAG after processing the first object, even when additional valid objects were present in the response. Added tests that use rpm_ack_object_property_process() with a multi-object RPM ACK to verify the fix and prevent regression. (#1183) 2025-12-09 13:18:52 -06:00
Steve Karg 2b328266c8 Fixed Channel object coercion encoding of non-primitive data. (#1181)
* Refactored the object-id to and from 32-bit value so channel-value could re-use the same API.

* Expanded the BACnetChannelValue coercion function to include all the coercions, no coercions, and invalid datatypes described in Table 12-63 of the Channel object.  Expanded unit testing code coverage for BACnetChannelValue.
2025-12-09 11:02:58 -06:00
Steve Karg 95cdec459e Fix warnings during unit testing of BACnet secure connect node. (#1182) 2025-12-09 09:34:28 -06:00
Steve Karg b1c6a0e74b Fixed writing to the Channel object when no member value coercion was required. (#1176)
* Updated documentation for encode functions to accurately describe return values (0 on error instead of BACNET_STATUS_ERROR)

* Expanded property support, removed INPUT object types, added fallback encoding for non-coerced data types, and updated error handling in ReadProperty of present-value to check for 0 instead of BACNET_STATUS_ERROR.

* Expanded the validation tests and increased test code coverage.
2025-12-04 20:28:43 -06:00
Steve Karg 5758e511c8 Bump release candidate version to rc2 2025-12-04 09:42:25 -06:00
Steve Karg 9378f7d1e7 Secured npdu_is_expected_reply() function where the MS/TP reply matcher could have an out-of-bounds read. (#1178) 2025-12-04 09:34:20 -06:00
Steve Karg 11efd6902c Integrated the Loop object read/write references and manipulated variables with device read/write property in basic example device object. (#1175) 2025-12-03 16:23:01 -06:00
Steve Karg 63e984edbb Updated CHANGELOG for recent changes. 2025-12-03 16:12:26 -06:00
Ryan Mulder 9a335b545e Added _Address versions of a few services, primarily for interacting with MS/TP slaves (#1174)
* add address versions of Send_Write_Property_Request and Send_Read_Property_Multiple_Request

* add Send_COV_Subscribe_Address
2025-12-03 16:05:26 -06:00
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