Commit Graph

3387 Commits

Author SHA1 Message Date
Steve Karg 1f591db6e7 Feature/mstp zero config option (#564)
* Added a MS/TP zero-config (automatically choose an unused MAC address) using an algorithm that starts with MAC=64 and waits for a random number of PFM (minimum of 8 plus modulo 64) before attempting to choose a MAC sequentially from 64..127. The confirmation uses a 128-bit UUID with the MSTP Test Request frame. The modifications are in src/bacnet/datalink/mstp.c and src/bacnet/datalink/dlmstp.c modules enabling any device to use zero-config if enabled. A working demonstration is in the ports/stm32f4xx for the NUCLEO board. Complete unit testing is included.  Options include lurking forever (wait for a router or another master node before joining) or lurking for a minimum time (enables self forming automatic MAC addressing device nodes).
2024-02-02 11:18:20 -06:00
Mikhail Antropov 8f576461a8 Feature/oscbs 29 calendar time object (#440)
* Added basic Calendar object, unit tests, and integration with example device object.

* Added basic Time Value object, unit tests, and integration with example device object.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-02-01 23:01:27 -06:00
Ondřej Hruška 340bd09561 Implement missing data types for calendar and schedule (#474)
* Added the SpecialEvent struct for the Exception_Schedule property of Schedule, encode/decode/same functions, unit tests, and integrated into bacapp functions.

* Added the CalendarEntry struct for the Date_List property of Calendar and the SpecialEvent struct, encode/decode functions, unit tests, and integrated into bacapp functions.

* Added the DateRange struct for the Effective_Period property of Schedule, encode/decode functions, unit tests, and integrated into bacapp functions.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-02-01 10:57:46 -06:00
Sebastian Weyer 7ad82f19a0 CMakeLists.txt: exclude h_routed_npdu.c when BAC_ROUTING=OFF (#562)
Fixed CMakeLists.txt: to exclude h_routed_npdu.c when BAC_ROUTING=OFF

When calling cmake with -DBAC_ROUTING=OFF,
basic/object/gateway/gw_device.c is correctly excluded from the build.
It does contain however the definition for the functions
Routed_Device_GetNext and Routed_Device_Is_Valid_Network, both of which
are called in the routed_apdu_handler function of basic/npdu/h_routed_npdu.c.
This is fine during compilation since these functions' prototypes are
declared in basic/object/device.h but linking will fail.

Thus, make the compilation of h_routed_npdu.c conditional depending on
the value of BAC_ROUTING.

Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Co-authored-by: Sebastian Weyer <sebastian.weyer@smile.fr>
2024-01-30 15:05:31 -06:00
Sebastian Weyer 5924c0c6ab ao.h: add BACNET_STACK_EXPORT macro to Analog_Output_Read_Property function (#561)
* Fixed BACNET_STACK_EXPORT macro to Analog_Output_Read_Property function

Added the call to this macro so that Analog_Output_Read_Property is
properly exported as a global symbol when the library is compiled with
-DBUILD_SHARED_LIBS=ON using cmake. This macro expands to
__declspec(dllexport) on Windows and __attribute__((visibility("default")))
on Linux. It is necessary when compiling with the -fvisibility-hidden flag.

Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Co-authored-by: Sebastian Weyer <sebastian.weyer@smile.fr>
2024-01-29 10:43:16 -06:00
Steve Karg 6cb875aae6 Feature/add bacnet binary lighting object (#522)
* Added Binary Lighting Output object example.

* Changed piface example app to support binary-lighting-output object type and blink warn

* Changed example device object to not create objects when device object-table is overridden

* Fixed unit testing for device object
2024-01-29 09:41:40 -06:00
Steve Karg 34b1d24bb7 Build/add cmake to ports at91sam7 (#560)
* added CMake to AT91SAM7S port example

* Add ports AT91SAM7S and STM32F4xx CMake builds into pipeline
2024-01-27 16:00:22 -06:00
Steve Karg ef762118a6 Chore/refactor dlmstp core mstp (#559)
* Create common DLMSTP using core MSTP FSM in STM32F4xx example

* add openocd debug launcher under vscode in STM32F4xx example

* Add generic property list member checking for write property members of network port object in STM32F4xx example
2024-01-27 15:16:42 -06:00
Steve Karg 587e3c5a11 Chore/refactor automac unit test (#557)
* move ports automac module into bacnet/datalink and add unit test.
2024-01-12 16:14:24 -06:00
Steve Karg c6dcab8f0a Change Life-Safety-Point object to use Create/Delete-Object (#555)
* Change Life-Safety-Point object to use Create/Delete-Object
2024-01-12 16:01:50 -06:00
Steve Karg ebc47571ba Bugfix/stm32f4xx port example updates (#556)
* Added CMake build option for stm32f4xx

* port some fixes and comments from bacnet/basic/object/device.c module
2024-01-08 15:27:46 -06:00
Alonso Cárdenas a459b0feca Fix build on FreeBSD (#554) 2024-01-05 21:34:51 -06:00
Steve Karg 1db2119bf2 fix apps that use old BACnetPropertyStates enumeration. 2024-01-05 17:20:28 -06:00
Steve Karg c7c2e1c6ef Fix enumerations syntax 2024-01-05 17:12:59 -06:00
Steve Karg 889ea5ae12 Fix enumerations syntax 2024-01-05 17:11:13 -06:00
Steve Karg ba4b0ca7c6 Changed BACnetPropertyStates to support more enumerations. Added apdu size checking on decode. Removed BACnetPropertyStates local enumeration. Increased BACnetPropertyStates codec unit test coverage. 2024-01-05 16:00:42 -06:00
Steve Karg bb081d28da Bugfix/service request refactor size check (#553)
* refactor service requests from service header

* add APDU size checking and length feature

* add unit tests to check for length when passing NULL buffer

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-01-05 08:59:45 -06:00
Steve Karg 5ca14e5320 update changelog 2024-01-03 14:46:01 -06:00
Steve Karg 7f3b82db9a Fixed compilation with BACNET_SVC_SERVER=1 for apps. (#552)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-01-03 10:35:03 -06:00
Steve Karg ead190584c Fix COBS conversion for large MSTP data-not-expecting-reply frames. (#550)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-31 19:38:00 -06:00
Steve Karg 73ee75635b Changed npdu_encode function to return length when given a NULL buffer. (#549)
* Changed npdu_encode function to return length when given a NULL buffer.

* reduce TSM dependency in NPDU handler and use local buffer

* add bacnet API with additional size of PDU argument.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-27 10:29:42 -06:00
Steve Karg 0aa6b242b3 updated bin/readme.txt with additional tool descriptions 2023-12-22 20:39:09 -06:00
Steve Karg c84afb2aff fixed spelling in bacucov help message. 2023-12-22 14:53:09 -06:00
Steve Karg 6656b57703 updated release script for tag menu option 2023-12-21 10:04:52 -06:00
Steve Karg f64eab736e Incremented version to 1.3.2 for release on 2023-12-21. 2023-12-21 09:53:21 -06:00
Steve Karg 548b2ea580 Add WPM workaround for BTL Specified Test 9.23.2.X5 (#548)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-21 09:52:32 -06:00
Steve Karg 19539c3fd5 Add hex file output recipe to ports/stm32f4xx port 2023-12-17 14:44:56 -06:00
dependabot[bot] 4a2166b08a Bump actions/upload-artifact from 3 to 4 (#547)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2023-12-15 09:12:42 -06:00
dependabot[bot] 4a55e9d3d9 Bump github/codeql-action from 2 to 3 (#545)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [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/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  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>
2023-12-15 09:12:08 -06:00
Steve Karg bbe5de7c12 Bugfix/bacapp application decode buffer over-read (#546)
* fix BACnet app decode function APDU over-read

* change BACnet app decode function APDU size datatype to 32-bit

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-14 11:24:47 -06:00
Steve Karg 7bcaa61f36 Updated SLOC count doc. Added McCabe complexity to Makefile. 2023-12-11 10:01:35 -06:00
Steve Karg cc84a16c14 Removed rx_fsm.c example which duplicated MSTPCAP features (#544)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-09 11:42:14 -06:00
Steve Karg 11add815a8 Updated CHANGELOG with latest changes. 2023-12-02 09:16:19 -06:00
Steve Karg 08bfd22d82 remove extraneous define which causes compile warning 2023-12-02 08:49:15 -06:00
Steve Karg b9a29d8093 add defines for each supported BACAPP_TYPES_EXTRA (#543)
* add defines for each supported BACAPP_TYPES_EXTRA

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-12-01 12:23:44 -06:00
Steve Karg c34e1a72b2 add install recipe for stm32f4xx port example 2023-11-30 23:02:26 -06:00
Steve Karg 9780f52640 Fix bacdevobjpropref module decode buffer overflow reads (#541)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-11-29 15:44:58 -06:00
bakmaria 241cd2994f Remove RefIndx == 0 condition, as BACnet norm allows this case (#539) 2023-11-25 07:30:10 -06:00
Steve Karg e1efca9d9e Fix MSTP slave FSM for Data-Expecting-Reply frames (#538)
* Fix MSTP subordinate nodes Data-Expecting-Reply handling

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-11-20 19:08:28 -06:00
Steve Karg 1a55bd7b08 remove duplicate cobs.c file in MSVC project (#535)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-11-16 07:48:10 -06:00
Steve Karg ce5a83ad31 fix CMake for code::blocks build (#533) 2023-11-13 11:48:34 -06:00
Steve Karg 3c94580bee Added MSTP extended frame transmit. (#531)
* Added MSTP extended frame transmit to bacnet/datalink/mstp.c and ports/stm32f4xx/dlmstp.c modules.

* Changed RS485_Send_Frame to MSTP_Send_Frame in mstp.c

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-11-12 09:49:37 -06:00
Steve Karg 1372e52aa7 Feature/mstp extended frames (#529)
* added MSTP extended frames to bacnet/datalink/mstp.c module. Thank you, Simon!

* auto-size some FIFO buffers for MSTP

* add COBS library to MSTP builds

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-11-08 15:54:18 -06:00
Steve Karg 2536d5a350 Fix BACnet/IP builds for BBMD clients without BBMD tables. (#523)
* Fix BACnet/IP builds for BBMD clients without BBMD tables.

* added BBMD=client to pipeline build

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-10-31 10:57:44 -05:00
Steve Karg c1464a1660 Change SubscribeCOV Cancellations to always reply with Result+ (#526)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-10-31 10:56:18 -05:00
Steve Karg 4991bb6156 Allow processing of Who-Has when DCC initiation is disabled 2023-10-31 10:55:08 -05:00
Ondřej Hruška 3f1d6fe3a9 Merge pull request #519 from bacnet-stack/fix/rpm-decode-empty-array
Fix decoding empty array of complex type in RPM
2023-10-23 10:09:32 +02:00
Steve Karg 657973d322 format code 2023-10-21 08:45:18 -05:00
Ondřej Hruška 3870bb3826 Fix decoding empty array of complex type in RPM 2023-10-20 15:27:44 +02:00
Steve Karg 0b5474d36e Ignore ReinitializeDevice and DeviceCommunicationControl service password (#518)
* Fix device object ReinitializeDevice service handling examples of no-password in the device. Add unit testing of device object ReinitializeDevice service.  Add API for setting ReinitializeDevice device object password.

* Fix DeviceCommunicationControl service handling example of no-password in the device.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-10-18 21:32:44 -05:00