* 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>
* added or updated secure the BACnet primitive value decoders - the core codecs - named bacnet_x_decode(), bacnet_x_application_decode() and bacnet_x_context_decode where x is one of the 13 BACnet primitive value names. The updated API includes an APDU size to prevent over-reading of an APDU buffer while decoding. Improved or added unit test code coverage for the BACnet primitive value decoders.
* marked the insecure decoding API as 'deprecated' which is defined in src/bacnet/basic/sys/platform.h and can be disabled during a build.
* added secure decoders for BACnetTimeValue, BACnetHostNPort, BACnetTimeStamp, BACnetAddress, and Weekly_Schedule and improved unit test code coverage.
* improved test code coverage for BACnet objects and properties.
* secured AtomicReadFile and AtomicWriteFile service decoders and improved unit test code coverage.
* secured BACnet Error service decoder and improved unit test code coverage.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* [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>
* 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>
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>
* schedule: add decode_daily_schedule() and encode_daily_schedule()
* schedule: encode/decode implemented + add to bacapp
* add safe encode/decode functions for timevalue, schedule function renaming
* fix unit tests build failing
* add IDEA and test temporary files to .gitignore
* try to make "deprecated" work in MSVC
* add WeeklySchedule compare function
* add bacnet_weeklyschedule_context_decode()
* Add basic test for WeeklySchedule
* Fix WeeklySchedule parsing and snprintf, decoder verified with real hardware
* try to fix windows build
* improve boolean parsing in 'bacapp_parse_application_data'
* add parse function for weekly schedule
* allow types > 16 in bacwp, show the decoded value before sending
* add bacapp binaries to gitignore
* remove bacwp logging
* Add error checking to bacapp_parse_application_data
* try to fix windows build
* fix avr build
* Fix error handling in RP Ack
* add singleDay flag
* show day name in single day weeklyschedule snprintf
* show weeklyschedule inner tag in snprintf
* improve weeklyschedule parsing and printing, supports type names now
* add weekly schedule to bacapp_decode_data
* move bacnet/bacnet_plat_compat.h to bacnet/basic/sys/platform.h
* disable tag limit also in bacwpm
* add ifdef's around strtoX helper functions in bacapp
* move strtox to BACAPP_PRINT_ENABLED ifdef in bacapp
* fix stm32 makefiles
* fix at91sam7s build
* use BACNET_UNSIGNED_INTEGER in BACnet_Short_Application_Data_Value
* fix capitalization in BACnet_Daily_Schedule
* add name to BACNET_TIME_VALUE struct
* change bacwp bacwpm to use bacapp_known_property_tag()
* fix some macros in bacdcode missing parentheses
* Remove dummy fields from BACNET_SHORT_APPLICATION_DATA_VALUE, replace remaining uses of upcasting (adds extra overhead but is maybe safer), rename short DV to Primitive
* fix new ci warnings
* more fixes for ancient C
* fix tests no longer building
* primitive value renamed to shorter name
- misprint in ports/zephyr/bip-init.c
- error processing PROP_TRACKING_VALUE for the Color Temperature object in
src/bacnet/bacapp.c
- misprint MSV test
- add hostnport.c for each zephyr tests
- fix colors and ms-input tests - remove mocking Device_Inc_Database_Revision()
for zephyr tests
- debug the color temperature test
* added BACnetColorCommand and BACnetxyColor encoding and unit testing
* Added Color object and unit testing.
* Added Color Temperature object and Unit test
* Fix BVLC unit test warning.
* add port Makefile for extra types
* added RGB to and from CIE xy utility in sys folder, and add unit tests.
* added cmake-win32 target
* Change RP and RPM to use known property decoder.
Add color object RP and RPM decoding and printing
Fix RPM print for new reserved range above 4194303
Change default protocol-revision to 24 for Color object
* Integrate Color and Color Temperature objects into demo apps
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Add APDU as NULL to get BACnet type lengths.
* Fix bacapp copy test to succeed
* fix BACnet REAL and DOUBLE decode
* Add unit test for NULL APDU encoding for length
* Add unit tests for bacapp context
* refactor host-n-port to hostnport.c module
* fix BVLC decoder
* additional unit testing for bacapp
* include bacdevobjpropref module in builds
* simplify bacapp snprintf to be able to return length
* adjust compiler for variable-length arrays
* fix bug found by scan-build
Authored-by: Steve Karg <skarg@users.sourceforge.net>
* 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>
* Added characterstring change of value example
* Add COV to unit tests
* Add memcopy to object COV unit tests
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Leverage (older) embedded unit tests into external unit tests build upon copy of Zephyr's ztest library and CMake.
* Expand top-level CMake build to run external unit tests.
* Expand Zephyr module extension to run external unit tests via west or sanitycheck.
Co-authored-by: Gregory Shue <gregory.shue@legrand.us>