Added BACnet CreateObject and DeleteObject services
* refactored codec for BACnetPropertyValue into bacapp module
* added unit tests for BACnetPropertyValue
* refactored COV and Events to use BACnetPropertyValue codec API
* added unit tests for COV
* added overrun safe decoders for tag numbers and boolean context
* added unit tests and codecs for CreateObject and DeleteObject services
* added APDU service handers and senders for CreateObject and DeleteObject services
* added command line apps bacco and bacdo for CreateObject and DeleteObject services
* added CreateObject and DeleteObject service handling in example server app and device object
* added new BACnetRejectReason, Error Class, and BACnetAbortReason enumerations and conversions
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* re-enable parallel build for CMake unit tests, but limited to ncores on supported OSes. Using MAKEFLAGS in .bashrc to set the '-j' flag size causes problem for Makefile build of BACnet library which doesn't tolerate parallel builds. Using "-j" without limits for CMake of unit tests overwhelms my lesser endowed build machines.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* fix the tool archive for release script
* fix the source archive for release script
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
the original solution caused that after encode_bacnet_address the apdu pointer was moved too far because apdu_len took into account the length of the opening_tag
* [WIP] Remove unit testcases duplicated under non-unit tree
* [WIP] Update west.yml to Zephyr v3.3.0 (twister verified)
* Update CI to Zephyr v3.4.0 w/ reduced module set
- Update zephyr/module.yml to use Zephyr v3.4.0 + cmsis;
- Update tests to use ZTEST_NEW_API for zephyr builds
Verified by:
1. make clean test
2. ./zephyr/scripts/twister -p unit_testing -T bacnet/zephyr/tests/bacnet
---------
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
* Implement parsing for proprietary events (complex-event-type)
* Fix unit test linking for event.c
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* 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>
* 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>
* 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>
* 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>