* Add BACnet authentication factor support with comparison functions and text strings and parsing
* Fix MyReadPropertyAckHandler to allow zero length for empty property list
* Fix rp_ack_fully_decode_service_request to handle empty recipient list
* Enhance PrintReadPropertyArray to handle empty lists with improved output formatting
* Refactor command line argument handling for target-address to accept dotted IP if offered.
* This commit introduces the inclusion of `authentication_factor.c` and `authentication_factor_format.c` in the CMakeLists.txt files for multiple BACnet tests to fix the broken test builds.
* Refactor bacapp.c for improved readability and documentation; streamline code formatting and enhance function comments.
* Fix return value assignment in bacapp_snprintf_value for authentication format
* Enhance help message to clarify target MAC or IP address format and improve readability
* Implement memory management for ReadProperty ACK service requests and improve error handling in decoding
* 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.
* Updated documentation for encode functions to accurately describe return values (0 on error instead of BACNET_STATUS_ERROR)
* Expanded property support, removed INPUT object types, added fallback encoding for non-coerced data types, and updated error handling in ReadProperty of present-value to check for 0 instead of BACNET_STATUS_ERROR.
* Expanded the validation tests and increased test code coverage.
* 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.
* Added basic object-name get for ASCII names to enable free if they were dynamically created. Added unit testing to validate the basic object ASCII object-name API.
* Removed static scope on character array used for name since the array gets copied into characterstring array and static is not needed.
* 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 Create/Delete object services to Analog Input, Analog Value, Binary Input, Binary Value, Multistate Input, Multistate Value object examples, and updated their units tests.
* 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>
* 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>
* 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>