Commit Graph

3280 Commits

Author SHA1 Message Date
Steve Karg 1be0aa39b9 Fixed compile warnings and BACnet priority array decoding (#712)
* Fixed network port warning for unused static function.

* Fixed BACnetPriorityArray decoding in bacapp module

* Fixed epics print of BACnetDateTime complex data.
2024-08-06 14:10:03 -05:00
Steve Karg a1d91dbeb1 Updated B-SS profile sample build for Zephyr OS. (#711) 2024-08-06 09:52:10 -05:00
Steve Karg 61730e3d87 Fixed load control object and unit test. Added recipe to Makefile for Zephyr OS twister unit testing. (#710) 2024-08-06 08:28:01 -05:00
Steve Karg ebfaa5eb2c Added Exception_Schedule property to schedule object example. (#709) 2024-08-01 12:15:57 -05:00
Steve Karg 4ee3bb6fa2 Added create and delete methods to basic device object table for calendar object. 2024-07-31 09:42:41 -05:00
Eric Miller bdf63f4b19 Fixed typo in command line argument check of example app for BACnet Network-Number-Is (#707) 2024-07-30 12:03:54 -05:00
Steve Karg c55f5e2886 Added alaternate define for BACNET_NPDU_DATA as BACNET_NPCI_DATA. 2024-07-29 07:17:33 -05:00
Michael O'Neill 274781a8bc Added mstpcap for MacOS (#705)
* Updated the Makefile for mstpcap to accomodate macOS and to build the bacnet lib. Compiling working version of mstpcap on macOS 14, although compiling should work on many earlier versions.  The --extcap-interfaces flag now works for macOS which allows one to use mstpcap as an extcap for Wireshark while listing the available serial ports and baud rates.

* note: Had to use uname to figure out if one is on Darwin/macOS vs vanilla BSD. From there, macOS specific supported features and location are used. For instance, the 76800 baud rate is natively supported.

* note: MacOS doesn't like placing the mstpcap executable in the global extcap plugin directory as it corrupts the Wireshark executable from an xattr and SIP (System Integrity Protection) perspective and macOS will refuse to run it calling it 'corrupt'. One could turn off xattr stuff, using xattr -cr, but could be risky long term. A safer, permissible workaround is to place the executable in the user .local extcap directory: '/Users/<your_user_name>/.local/lib/wireshark/extcap/'. If the directory doesn't exist just create it and copy the executable there.

* note: make the executable from the root or apps folder, as there are defines in the apps folder that are common to all the apps. The mstpcap executable is copied to bacnet-stack/bin/ folder.

---------

Co-authored-by: Michael O'Neill <em.pee.oh@gmail.com>
2024-07-26 16:23:40 -05:00
Steve Karg 4326128e72 Secure ReadProperty decoding and BACnetActionCommand (#702)
* Refactored and secured BACnetActionCommand codec into bacaction.c module for command object and added to bacapp module encode/decode with define for enabling and pseudo application tag for internal use.

* Simplified bacapp_data_len() and moved into bacdcode module as bacnet_enclosed_data_len() function.

* Secured ReadProperty-REQUEST and -ACK decoding.

* Removed deprecated Keylist_Key() functions from usage.

* Removed pseudo application datatypes from bacapp_data_decode() which only uses primitive application tag encoded values.

* Defined INT_MAX when it is not already defined by compiler or libc.

* Deprecated bacapp_decode_application_data_len() and bacapp_decode_context_data_len() as they are no longer used in any code in the library.

* Added BACnetScale to bacapp module. Improved complex property value decoding. Refactored bacapp_decode_known_property() function.

* Refactored and improved the bacapp_snprintf() function for printing EPICS.

* Fixed Lighting Output WriteProperty to handle known property decoding.
2024-07-25 17:12:08 -05:00
Steve Karg 923eaf2313 Added some dependency into zephyr kconfig for BACnet/IP builds. Updated simple sensor sample. 2024-07-24 10:38:24 -05:00
Steve Karg 4694b9b2eb Added bacnet-basic callback in zephyr subsys to include init and task in same thread. 2024-07-23 15:27:39 -05:00
Eric Miller 39f08d253b Modifications for ASHRAE 135-2020cn engineering units (#703) 2024-07-22 16:39:13 -05:00
Steve Karg 766e0c020d Create bacnet strnlen and stricmp to avoid libc compiler problems 2024-07-22 16:22:36 -05:00
Steve Karg 3864421ac8 Fixed compile warning in network port object. 2024-07-22 16:04:40 -05:00
Steve Karg 142d50db16 Added more kconfig for zephyr build. Added more creatable objects for zephyr build. 2024-07-22 15:40:20 -05:00
Steve Karg 3246d6bd72 Fixed zephyr B-SS sample build under native_sim 2024-07-22 14:56:12 -05:00
Önder Görmez 55f757c8a2 Fix typo (#701)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-07-21 10:19:30 -05:00
Steve Karg e2349b719f Fixed bitstring-value header file duplication. 2024-07-19 17:22:13 -05:00
Steve Karg 00ab206075 * Changed header file include guards to unique namespace. Updated file headers comments with SPDX [issue #55] (#666) 2024-07-19 17:16:28 -05:00
Steve Karg 1e889b633c Added Zephyr settings and basic device in subsys. (#697)
* Added Zephyr settings subsys to enable storing of BACnet values according to BACnet object property value path.

* Added BACnet Basic features to enable basic samples. Refactored the zephyr BACnet profile B-SS sample to use BACnet basic subsys.
2024-07-19 17:12:20 -05:00
Steve Karg 90714c094c Fixed BACnetHostNPort known property decoding. (#700)
* Fixed BACnetHostNPort known property decoding.

* Added BDT-Entry and FDT-Entry to BACapp for known property encoding/decoding.
2024-07-19 16:45:09 -05:00
Nandkishor Biradar fd2f33b522 Fixed MS/TP that was not working in ports/win32 (#694) 2024-07-19 07:53:16 -05:00
GauiStori e984a19885 Added reject response to unknown reserved network layer message types. (#690) 2024-07-17 14:37:36 -05:00
GauiStori a12c552601 Added a check for apdu_len exceeding MAX_APDU in apdu_handler() for confirmed service and ignore the message if the APDU portion of the message is too long. (#696) 2024-07-17 12:13:56 -05:00
Steve Karg a94917b106 Fixed compile warnings from stricmp in indtext module on Windows. 2024-07-16 17:48:46 -05:00
Steve Karg 2e222b70c4 Fixed compile warnings from stricmp in indtext module on Windows. 2024-07-16 17:46:38 -05:00
Steve Karg 544075f5fd Fixed compile warnings from recent merge into datetime ports. 2024-07-16 17:37:20 -05:00
Steve Karg 359995e4bc Remove Makefile debug from MSTPCAP build 2024-07-16 17:33:10 -05:00
Steve Karg d1fe878d4a Fixed MSTPCAP build by removing BACnet Library 2024-07-16 17:31:41 -05:00
Steve Karg 734321a974 Moved timesync offset get/set from handler to ports to fix projects not using handler (#699) 2024-07-16 17:30:38 -05:00
Steve Karg 13debf3ead Fixed compile warnings from Binary Value header file. 2024-07-16 16:40:24 -05:00
GauiStori fda3cb5e82 Added set time callback with optional offset for BACnet TimeSynchronization services (#691) 2024-07-16 15:28:03 -05:00
Steve Karg f2686a441a updating the MSTP zero config transition names (#698) 2024-07-16 15:18:54 -05:00
Tomasz Kazimierz Motyl f4637325ad Added Binary Input and Binary Value intrinsic reporting CHANGE_OF_STATE algorithm as per 13.3.2 as per ASHRAE 135-2020 (#689) 2024-07-16 08:16:33 -05:00
Steve Karg 299d4f36e0 Fixed the common DLMSTP module destination address to use the destination in the request instead of zero (copy/pasta error). (#693) 2024-07-11 10:37:20 -05:00
GauiStori 2c819274af Fixed network priority reponses for test 10.1.2 (#687) 2024-07-11 10:26:22 -05:00
GauiStori 8bb93d3286 Fixed basic device object and ReadRange handling for test 9.21.2.2 and 9.21.2.3 array index (#692) 2024-07-11 09:23:55 -05:00
Tomasz Kazimierz Motyl 66fd9f5c48 Added BACnet/IPv6 properties to basic Network port object (#686)
Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
2024-07-08 07:46:01 -05:00
GauiStori 0634028368 Fixed Object type list length for protocol-revision 24. (#684) 2024-07-03 13:14:26 -05:00
Steve Karg cb4f675e39 Reduced MS/TP MAX_APDU to use 480 by default in examples (#683)
* Reduced MS/TP MAX_APDU to 480 from 1476 so that devices not use new MS/TP extended frame types which older routers do not understand.

* Added extra objects to STM32F4xx example to elicit edge cases in object-list for testing.
2024-07-02 12:47:15 -05:00
Steve Karg d5b0060d8a Updated version to 1.3.7 for release. Happy Anniversary, Patricia! (#682) 2024-06-26 08:21:17 -05:00
Steve Karg ddb2b43125 Refactor/mstp zero config state machine (#676)
* Changed MS/TP master node self destination checks to be located in receive FSM

* Changed MSTP zero configuration: modified comments for state transition names; modified next station increment; refactored the UUID rand() to not be required by common zero config implementation; added more unit tests.

* Added another context to MS/TP user data to allow additional user data
2024-06-26 07:43:25 -05:00
Tomasz Kazimierz Motyl 9e0751f8c9 Adding activate-changes to the ReinitializeDevice options (#674)
Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
2024-06-17 20:27:31 -05:00
Jonathan 2cdbf20f9f ai.c, ao.c : Fix typos (#673) 2024-06-14 10:13:40 -05:00
Steve Karg 12d55ab3cb Fix datatype conversion errors found by splint. Fix Binary input/value set. (#672) 2024-06-12 21:13:33 -05:00
Steve Karg aa9370004b Added example basic bitstring value object. (#668) 2024-06-05 11:03:42 -05:00
Steve Karg 4576e41ec3 Refactor/ports xplained common dlmstp (#665)
* Refactored ports/xplained to use common DLMSTP module to enable extended frames

* Added floating point compares in cases where they don't exist in math library
2024-06-04 14:48:40 -05:00
Steve Karg 17c5e2e98d Added guards in create object initialization to prevent memory leaks (#664) 2024-06-02 07:09:26 -05:00
NikSchew ec066fcc70 Added wildcard check for bi objects (#663)
Co-authored-by: Nik Schewtschuk <nikonlinee@gmail.com>
2024-06-02 06:51:12 -05:00
NikSchew 7276bf471d Added guard for some object inits to prevent memory leak by misuse (#662)
Co-authored-by: Nik Schewtschuk <nikonlinee@gmail.com>
2024-06-02 06:42:47 -05:00