* Refactored BACnetShedLevel encoding, decoding, and printing into separate file. Added unit testing.
* Added API to load control object for shed-level, start-time, duty-window, full-duty-baseline, and enable.
* Fixed bacapp sprintf for shed level and host-n-port found in scan build.
* Added basic timer object, internal state machine, and unit tests
* Added BACnetTimerStateChangeValue encode, decode, parse, print, and diff with unit tests
* Changed handler of add/remove list element to check if the property is a BACnetLIST
* Added BACnetLIST utility for handling WriteProperty to a list.
* Fixed outlier ReadProperty object handlers to return zero when the RP parameter is NULL.
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
* Refactored and secured BACnetActionCommand codec into bacaction.c module for command object and added to bacapp module encode/decode with define for enabling and pseudo application tag for internal use.
* Simplified bacapp_data_len() and moved into bacdcode module as bacnet_enclosed_data_len() function.
* Secured ReadProperty-REQUEST and -ACK decoding.
* Removed deprecated Keylist_Key() functions from usage.
* Removed pseudo application datatypes from bacapp_data_decode() which only uses primitive application tag encoded values.
* Defined INT_MAX when it is not already defined by compiler or libc.
* Deprecated bacapp_decode_application_data_len() and bacapp_decode_context_data_len() as they are no longer used in any code in the library.
* Added BACnetScale to bacapp module. Improved complex property value decoding. Refactored bacapp_decode_known_property() function.
* Refactored and improved the bacapp_snprintf() function for printing EPICS.
* Fixed Lighting Output WriteProperty to handle known property decoding.
* 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>
* 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 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>