Commit Graph

48 Commits

Author SHA1 Message Date
Steve Karg e1002c433f Revert "Zephyr 3.7.0 integration fixes: (#723) (#724)"
This reverts commit 2d7a2961a2.
2024-08-16 09:02:24 -05:00
Kari Argillander dab6d8af55 Build more code in CI (#725)
* bugfix/hostnport: Fix bacnet_fdt_entry_from_ascii() parse wrong
* apps/router: Fix Wstrict-prototypes compiler warnings
* apps/router: Fix -Wmissing-field-initializers compiler warning
* ports/linux: Fix -Wself-assign compiler warning
* ports/linux: Fix -Wunused-function compiler warning
* Fix -Wimplicit-function-declaration warnings
* ci: Add more compile options to enable more code build
* ci: Do not fail-fast our main matrix build
* cmake: Add -Wno-c99-extensions compiler option

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2024-08-15 11:20:10 -05:00
Greg Shue 2d7a2961a2 Zephyr 3.7.0 integration fixes: (#723) (#724)
- Update west.yml
- Update samples.yaml to new syntax, board names
- Patches to ports/zephyr (some stubs)

Verified by:

1. ./zephyr/scripts/twister -p unit_testing -T bacnet-stack/zephyr/tests

2. ./zephyr/scripts/twister -T bacnet-stack/zephyr/samples/ --integration

Fix #721

Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2024-08-15 07:24:09 -05:00
Kari Argillander 6271632944 Add and fix compiler warnings (#718)
* Add and remove compiler warning compile options

Add some new compiler warnings. Some of those does not build clean so
ignore them for now. This also helps if some user use those options so
we ignore those for them also.

Also remove following ignores as they do not produce any warnings:

  - Wno-attributes
  - Wno-long-long
  - Wno-implicit-fallthrough

* Fix -Wmissing-declarations compiler warnings

Fix new -Wmissing-declarations compiler warnings. I tried to look which
should be in headers and which should be static. Might be that some
statics should be in header as it is not easy to choose if something
should be exported or not.

* Fix -Wmissing-field-initializers compiler warnings

If we use { { 0 } } compiler thinks we might have mean that we only
meant initialize first member of struct or have forgotton to add second
one. We could do { { 0 }, 0 } but we can just do { 0 } which tells
compiler that hey just intialize this whole thing to zero.

* tests: Fix couple -Wfloat-conversion warnings

Add f prefix to floating point numbers to get some double to float
warnings away.

* ci: Make warnings as errors with cmake main build

To keep repo more clean from warnings use Werror flag when building main
project.

Windows should need -DCMAKE_C_FLAGS="/WX" but we have not ignore errors
for that yet so let's not yet take it in use.

* ci: Build also tests in matrix build

Enable also tests to be builded in our main matrix build. This way tests
will be builded also with clang and in future also with MSVC. We also
keep build very clean now as all warnings as catched.

With this we can also take out -Werror from compile_options as we add
that in CI. It is not good practice to keep that option always on. It
makes development lot harder. See example this blog post [1].

[1]: https://embeddedartistry.com/blog/2017/05/22/werror-is-not-your-friend/

* getevent: Deprecate getevent_encode_apdu()

Steve suggested that we should deprecate getevent_encode_apdu() [1].

Suggested-by: Steve Karg

[1]: https://github.com/bacnet-stack/bacnet-stack/pull/718#discussion_r1715821735

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2024-08-13 16:32:44 -05:00
Steve Karg 96222574f8 Bugfix/router mstp builds (#630)
* Fixed example app router-ipv6 to build under ports/win32

* Fixed example app router-mstp to build under ports/win32 with MinGW

* Added win32 builds of router-ipv6 and router-mstp to the Github pipeline
2024-04-30 13:52:00 -05:00
Steve Karg 770be70688 Chore/bacnet-sc-unrelated-cleanup (#620)
* Added required linux Ethernet library for ethernet build

* Added .obj to gitignore

* Fixed BACnet port for APPLE to use BSD in CMake

* Changed format in CMake to enable cleaner SC merge

* Added create-object and delete-object recipes in GCC Makefile

* Added datalink timer to all example OS apps

* Changed most microcontroller ports to use BACAPP_MINIMAL to specify which datatypes can be written.

* Fixed zephyr OS for BACnet/IP warning

* Fixed zephyr OS log to not require log_strdup

* Added writefile API to file object example

* Added API to device-client to make it more robust.

* Added API in network-port object for getting the ASCII object-name

* Added debug print with a timestamp option

* Added debug print with hex dump print

* Added API to network port object for activate and discard

* Added default define for debug with timestamp

* Added prototype in header for disabled debug printf.

* Added fifo peek ahead function to peek at more than one byte.

* Added get-mac value for network port that uses buffer rather than octetstring
2024-04-19 12:54:56 -05:00
Steve Karg 6bd1942635 Refactor/property lists member function (#609)
* Refactor property lists member function for WriteProperty default case.

* Refactor time-value object unit testing

* Added test for unsupported property to common property test
2024-03-27 09:52:01 -05: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
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
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 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 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 da2dc9841a Feature/raspberry pi blinkt color objects (#503)
* fixed BACnetXYcolor and BACnetColorCommand encode and decoding and improved unit test coverage. Refactored BACnetXYcolor to/from ascii into lighting module.

* added to the color, color temperature, and lighting output objects a fade/ramp/step engine.  Added color and color command coercion into the channel object and enabled color temperature object coercion.  Added CreateObject and DeleteObject service handling to the color, color temperature, lighting output, and channel objects.

* added blinkt demo app for Raspberry Pi [WIP]

* updated gitignore to simplify handling of apps folder contents

* fixed piface demo build

* added RaspiOS to pipeline for piface and blinkt! demo builds

* added device object timer function for child object types into example Device object.  Refactored device object to increment database revision for create or delete object services.   Refactored example app/server to use mstimer library and device child object timers.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-28 10:50:32 -05:00
Steve Karg 62982f9308 added release script 2023-09-11 14:20:24 -05:00
Steve Karg 08b28dd6f4 fix github release to sf.net workflow 2023-09-11 11:37:53 -05:00
Steve Karg 7f619e4245 fix github release to sf.net workflow 2023-09-11 10:40:29 -05:00
Steve Karg 0001f85f29 Bugfix/network port object link speeds (#488)
* fix ports/xplained build under Linux

* fix network port object link-speeds property

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-09-08 17:41:56 -05:00
dependabot[bot] bc8c261153 Bump actions/checkout from 3 to 4 (#484)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-09-06 13:53:52 -05:00
Steve Karg c383514a62 Chore/fix release script tools archive (#479)
* fix the tool archive for release script

* fix the source archive for release script

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-25 11:17:30 -05:00
Steve Karg 58a6373ffb Update release.yml (#472)
fix tag name from releases
2023-08-21 08:56:24 -05:00
Steve Karg a7012fbd12 Feature/add release script (#471)
* add release script

* updated changelog

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-08-18 14:59:01 -05:00
dependabot[bot] 8bea1a33a8 Bump actions/checkout from 2 to 3 (#402)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-03-07 17:02:11 -06:00
Greg Shue 1a7a810f1a Update zephyr.yml (#368)
Update Zephyr CI workflow to Twister to build, run, and archive unit_testing testsuites.
2023-01-09 14:30:02 -08:00
Steve Karg b91735af13 Bugfix/code clean using gcc warnings (#371)
* Enable extra GCC warnings to discover subtle bugs

* convert c++ comments to c comments

* cleanup pedantic compiler warnings

* Compile apps with GNU89 GNU99 GNU11 and GNU17

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-12-25 21:43:51 -06:00
dependabot[bot] 0728bc4390 Bump actions/upload-artifact from 2 to 3 (#366)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 11:28:36 -06:00
Steve Karg 108f73a113 Update zephyr.yml 2022-12-09 17:11:45 -06:00
Steve Karg 66c7b8b356 Update zephyr.yml 2022-12-09 16:49:37 -06:00
Steve Karg 4063b776b9 Update zephyr.yml 2022-12-09 16:39:41 -06:00
Steve Karg cedacbdfee Update zephyr.yml 2022-12-09 16:32:36 -06:00
Steve Karg cd05367e54 Create zephyr.yml 2022-12-09 16:23:55 -06:00
dependabot[bot] 2843b2b075 Bump actions/checkout from 2 to 3 (#329)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-24 11:35:08 -05:00
dependabot[bot] 71d444730b Bump github/codeql-action from 1 to 2 (#328)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [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/v1...v2)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-24 11:34:49 -05:00
Steve Karg 8944bbca21 Update lint.yml to call scan-build 2022-04-25 20:38:58 -05:00
Steve Karg 050efc2472 Update lint.yml 2022-03-30 08:29:30 -05:00
Steve Karg 902949a192 update LwIP BACnet/IP abstraction (#246)
* update LwIP BACnet/IP abstraction. Integrate LwIP build with continuous integration.

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-03-29 17:47:44 -05:00
Steve Karg 5b07b484d4 Bugfix/cppcheck error code fixes (#244)
* Add flawfinder. Add error code for exit status.

* fix errors found by cppcheck

* fix initialization warning in unit test compile

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-03-28 10:29:52 -05:00
Steve Karg c3a4c229fe Issue 87 execute tests with GitHub ci (#234)
* Enable lcov coverage in unit testing via cmake.

* fix pipeline build error

* add compile options for unit test to silence some warnings

* remove all BAC_TEST unit tests in src/bacnet/ folder. They are now in test/bacnet/ folders using ztest.

* removed key.c - only used for unit test.

* produce XML test result output for parsing

* produce junit XML test result output

* change lint workflow to quality

* update readme badge for quality results

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-02-28 20:09:46 -06:00
Steve Karg 5e70eeecfc Issue 10 ci add support for code spelling checks (#231)
* added make targets spell and codespell for spelling checks

* fix spelling errors detected by codespell

* added codespell to github workflow

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-02-27 16:02:17 -06:00
Steve Karg 295f127c2b Feature/makefile add apps library (#218)
* add BACnet stack library at apps/lib

* convert apps to use apps/lib for smaller binary

* fix -DBACDL_ALL=1 build

* fix piface build

* datalink MAX_MPDU and MAX_HEADER cleanup

* add bip6 to git workflow

* fix system library dependency of BACnet library

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-01-29 15:55:40 -06:00
Steve Karg 88a3921c5b Issue 188 compile failed when bbmd enabled 0 (#200)
* Fix compile for BBMD=none

* Add compile for BBMD=none to pipeline

* remove appveyor. add codeql badge

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2021-10-13 10:37:01 -05:00
Steve Karg eff691aedd Bugfix/codeql initial fixes (#195)
* Fix to BVLC6 bounds checking

* Convert MSTP capture to use datetime library

* Convert timesync app to use datetime and mstimer library

* fix workflow per warning

* fix BSD mstimer init function name

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2021-09-17 09:21:26 -05:00
Steve Karg 63a8735fa7 Create codeql-analysis.yml (#193)
* Create codeql-analysis.yml

* Update codeql-analysis.yml

* Update codeql-analysis.yml

fixing detected YML syntax error
2021-08-20 07:27:21 -05:00
Steve Karg efa975dac7 Copy travis CI workflow to github (#192)
* Initial port of travis CI workflow to github

* fix embedded github workflow

* fix embedded github workflow

* fix gcc and lint github workflow

* fix gcc and lint github workflow

* Remove appveyor and travis CI to reduce maintainence

* fix lint CI workflow

* restore appveyor CI

* restore appveyor CI badge

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2021-08-18 15:08:02 -05:00
Steve Karg 810a2f93de Feature/write property type check refactor (#182)
* refactor write-property tag check

* modify ports objects to use write-property tag check API

* modify example objects to use write-property tag check API

* Fix object unit test builds

* Fix and run unit ztests via CMake

* Enable unit testing on Travis CI

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2021-06-23 10:10:12 -05:00
Carlos Gomes Martinho 3818f3d844 ci: run pipeline also on pull requests (#88) 2020-05-18 11:04:34 -05:00
Carlos Gomes Martinho 5d4358030a ci: add mac os to github ci (#51)
* ci: add mac os to ci

* ci: add appveyor file
2020-02-19 10:48:36 -06:00
Carlos Gomes Martinho d3014c87fa build: improve cmake, add github actions (#16)
* build: install cmake config files to enable cmake find_package

fix: destination for header files

build: clean up build system

build: also install port directory header files

build: fix name of header files

ci: add github actions

build: add bsd port

chore: fix typos

build: remove not deeded mstpsnap

ci: disable ctests as not corrently

ci: disable macos for the moment

build: print compiler versions in cmake

* build: do not build apps by default

* build: add missing slash

* build: add more options to cmake (#3)

* build: add more options to cmake

* chore: disable ipv6

* build: guard around apps for options

* build: fix link lib on windows
2020-01-14 23:25:41 -06:00