Commit Graph

3034 Commits

Author SHA1 Message Date
Steve Karg 7bac8aa0bd Add bitstring to minimal config (#443)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-08 09:14:23 -05:00
Steve Karg dbed4040ae Improve MSTP debug. Fix WhoIs app APDU timeout. (#444)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-07-08 09:13:56 -05:00
Steve Karg 95174ce96e added changelog. updated security statement. 2023-07-02 09:43:01 -05:00
Steve Karg d9d61b4ba7 Merge remote-tracking branch 'origin/master' into bacnet-stack-1.1 2023-06-30 17:49:05 -05:00
Steve Karg cfe3086ae5 increment version to 1.1.1 for release on 30-June-2023 2023-06-30 17:09:02 -05:00
Steve Karg b676f09c4b Merge branch 'master' 2023-06-30 17:04:23 -05:00
Steve Karg a9c2474534 Fix BACnetARRAY encoder for index=ALL (#442)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-30 15:39:15 -05:00
Steve Karg 5b7eac60cf cleaned up lwIP function header javadoc (#441)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-28 12:46:56 -05:00
Steve Karg db21bf1bfa Increment version to 1.1.0 for release 2023-06-25 09:32:15 -05:00
Steve Karg a4750b8999 Increment version to 1.1.0 for release 2023-06-25 09:31:07 -05:00
Steve Karg 9bb367982b Improve MSTP debug. Fix WhoIs app APDU timeout. 2023-06-25 09:27:05 -05:00
Steve Karg c8a6ea74b8 Fix WPM decoding. Add unit test for WPM. (#438)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-14 17:25:38 -05:00
Steve Karg 2c771414bd fix BACnet Array size encoding (#437)
* fix BACnet Array size encoding

* test BACnet Array size encoding

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-06-14 17:13:52 -05:00
Steve Karg 6e5524bee3 Create SECURITY.md 2023-05-30 14:34:04 -05:00
Steve Karg 5e0f7b79ef Fix potential XSS vulnerability in jQuery #1 (#436)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-30 14:24:47 -05:00
Steve Karg 682d913686 fix compiler warnings for C89 builds (#433)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-22 08:49:17 -05:00
Ondřej Hruška dab95eec3f Implement parsing for proprietary events (complex-event-type) (#420)
* Implement parsing for proprietary events (complex-event-type)

* Fix unit test linking for event.c
---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-16 23:55:55 -05:00
Steve Karg c02a8281a7 Cleanup win32 build warnings (#431)
* Cleanup win32 build warnings

* Add README for MinGW32 build under Windows

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-13 15:13:15 -05:00
Steve Karg f59a460292 Fixed array index out of range for binary-value, multistate-output, and lighting-output objects. Thanks, Roy! (#430)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-09 15:58:28 -05:00
Steve Karg 65792ab408 Update address in VMAC table for IPv6 (#429)
* Update address in VMAC table for IPv6

* fix compile warnings in IPv6 handler

* cleanup BIP6 PRINTF

* enable unit test for BBMD6 hander

* keylist should only return FALSE when growing fails

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-05-03 23:33:06 -05:00
Steve Karg ced9dff0f2 Added AddListElement and RemoveListElement services (#418)
* Added AddListElement and RemoveListElement services

Added list-element codec and unit tests.
Added BACnetDestination codec and unit tests.
Added RecipientList handling to NotificationClass object.
Added AddListElement and RemoveListElement client example app.

* Fix defects found by scan-build and CPPCHECK

* Update ports errors found during CI builds

* Update zephy os test build missing files in CMakeLists

---------

Co-authored-by: Ondřej Hruška <ondra@ondrovo.com>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-04-16 14:12:11 -05:00
Steve Karg e517df0d47 Bugfix/bacnet array encoding overflows (#414)
* Add common BACnetARRAY encode function to fix Device object list buffer overflow. Refactor device, analog-output, access-door and binary-output objects to use common BACnetARRAY encoder.

* Fix non-POSIX builds (win32).

* Cleanup some ports/stm32 build warnings
---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-04-13 20:43:54 -05:00
jci-zimm 064c6f7f1c MSTP stat lost_token_counter was missing a drop case (#421)
Co-authored-by: jzimmen_jcplc <nathan.m.zimmerman@jci.com>
2023-04-13 20:36:22 -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 c74a8cf3a9 Feature/bacnet bacerror unit tests (#407)
* Add <zephyr/fff.h> from zephyr v3.1.0

Zephyr is deprecating the zmock library in favor of using
the FFF faking library for defining and controlling fake
implementations of depended-upon APIs called by the code-under-test.

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>

* Fix bacerror_decode_service_request return value; add unit tests

bacerror_decode_service_request() return value now includes
the apdu bytes parsed for invoke_id and service.

Also added a unit test for functions in bacerror.c, using `fff`
for faking the depended-upon functions.

Verified by:

1. (Pass) cd $bacnet-stack/test && make test

2. (Pass) west build -p always -b unit_testing \
              bacnet-stack/zephyr/tests/unit/bacnet/bacerror/ && \
              ./build/testbinary

3. (Pass) ./zephyr/scripts/twister -p unit_testing  \
              -T bacnet-stack/zephyr/tests/unit/bacnet/bacerror/

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>

---------

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-03-07 17:01:33 -06:00
Greg Shue fe69978387 Add <zephyr/fff.h> from zephyr v3.1.0 (#406)
Zephyr is deprecating the zmock library in favor of using
the FFF faking library for defining and controlling fake
implementations of depended-upon APIs called by the code-under-test.

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-03-07 16:42:25 -06:00
Steve Karg 261a506eb4 refactor mstimer callback handling (#400)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-18 10:02:13 -06:00
Steve Karg 343d9f893d Fix and extend BACnetReliability per 135-2020 (#399)
Fix member-fault and tripped values.
Extend BACnetReliability to include:
monitored-object-fault (14),
tripped (15),
lamp-failure (16),
activation-failure (17),
renew-dhcp-failure (18),
renew-fd-registration-failure (19),
restart-auto-negotiation-failure (20),
restart-failure (21),
proprietary-command-failure (22),
faults-listed (23),
referenced-object-fault (24),
multi-state-out-of-range (25),

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-17 08:24:48 -06:00
Steve Karg e95aed9b93 Added UTC option to BACnet TimeSync app (#396)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-08 13:12:44 -06:00
Steve Karg d96b29d023 Fix BACnet property operational-certificate-file enum value (#395)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-05 12:33:32 -06:00
Steve Karg cd52faccb0 Remove duplicate network port enums. Add BACnet/SC port types. (#388)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-04 08:50:21 -06:00
Steve Karg 236c2d1003 refactor BACnet Address utility functions (#390)
* refactor BACnet Address utility functions

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-04 08:46:31 -06:00
Steve Karg 85976ee1f8 Correct the length for bad data crc in mstpcap (#393)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-02-03 11:04:53 -06:00
Greg Shue 7f7b419411 Fix decode_signed32(); Add unit/bacnet/bacint tests (#392)
Fix decode_signed32() length for -8388608 and NULL apdu handling.

Add comprehensive unit tests for bacint.c functionality.

Verified by:

1. (Pass) From $bacnet-stack/test:
            make clean test
2. (Pass) From $workspace (above $bacnet-stack):
            west build -p always -b unit_testing \
              bacnet-stack/zephyr/tests/unit/bacnet/bacint/ && \
            ./build/testbinary

3. (Pass) From $workspace (above $bacnet-stack):
            ./zephyr/scripts/twister -p unit_testing \
              -T bacnet-stack/zephyr/tests/unit/bacnet/bacint/

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-02-03 09:47:42 -06:00
Greg Shue 338d445b99 unit/bacnet/bits test (#391)
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-02-02 11:45:47 -08:00
Greg Shue eb36033fd8 [OSCBS-41] Update to Zephyr v3.2.0 (#382)
Updating to integrate with Zephyr v3.2.0 required:

- Update `west.yml` to import Zephyr v3.2.0 manifest
- Prefix include pathname of ztest.h with `zephyr/`
- Prefix every Zephyr header included pathname with `zephyr/`
- Change all Zephyr tests/samples to use `find_package`
- For unit_testing, use a distinct prj.conf which only references
  Kconfigs defined in the Zephyr repo. (Zephyr constraint.)
- Move ztest headers into a zephyr-prefixed pathname

Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-01-18 08:50:31 -08: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 225ffb0d4c Cleanup gateway example Makefile build (#380)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-01-09 13:40:33 -06:00
Greg Shue 35fa602bc6 [OSCbS-42] skip tests failing unit_testing (temp) (#378)
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-01-09 08:47:02 -06:00
Greg Shue b8d345679b Oscbs 33 ci zephyr port (#375)
* zephyr: twister build fixes/patches

* zephyr: hack: suppress bvlc test (build failures)

Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
2023-01-05 16:53:29 -08:00
Steve Karg c9efd0b84d Enable dynamic BACnet POSIX files for example (#374)
* Enable dynamic BACnet POSIX files for example

* Add basic unit test for BACnet File object.

* Use example file pathname in demo app.

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2023-01-04 13:11:45 -06: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
Kari Argillander 28644040e7 Fix: Use memmove with overlapping data (#361)
We should use memmove instead of memcpy when things can overlap. I was looking little bit whole repo and this got my eye.
2022-11-29 14:31:26 -06:00
fprwi6labs 5a3d7a4ab2 Fix linkage conflict when use stack in C++ project (#360) 2022-11-21 09:30:45 -06:00