* pre-commit: Update and enable clang-format check
There is newer version from clang-format so use that. We do not yet want
18 as that is little bit too new.
* Format some thing by hand which clang-format "breaks"
Clang-format will format some things little bit off in some cases.
Format some things by hand so we get cleaner end result.
* Run clang-format with
```
pre-commit run --all-files clang-format
```
We have already in previously checked places where clang-format does not
make good format and ignored those (hopefully most of the things).
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
* 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>
* Improved GCC compiler flags in ARM, OS, and test builds. Removed redundant flags, and made them consistent across various builds.
* Fixed redundant redeclaration of various functions detected by change in compiler flags.
* Fixed string truncation warning in bip-init detected by change in compiler flags.
* Fixed some set-but-not-used variables by creating dummy functions instead of using macros.
* Added dependent BACnet stack headers into bacdef.h file.
* Changed bacdef.h and other stack includes in c/h files to have a common pattern.
* Moved bits.h, bytes.h, and bacnet_stack_exports.h under bacnet/basic/sys/ folder.
* Require bacdeps.h as first bacnet header to include
BACnet headers need to pull in optional configuration and
optional ecosystem overrides to allow integrators to control
builds. This commit changes bacnet header files to first
include bacnet/bacdep.h to consistently introduce integrator
header files.
Verified by:
1. make clean all test
2. ./zephyr/scripts/twister -p unit_testing \
-T bacnet-stack/zephyr/tests/
* Migrate BACNET_UNSIGNED_INTEGER defn to bacdef.h
Verified by:
1. make clean all test
2. ./zephyr/scripts/twister -p unit_testing \
-T bacnet-stack/zephyr/tests/
---------
Signed-off-by: Gregory Shue <gregory.shue@legrand.com>
Co-authored-by: Greg Shue <32416235+gregshue@users.noreply.github.com>
Co-authored-by: Gregory Shue <gregory.shue@legrand.com>
* Added Binary Lighting Output object example.
* Changed piface example app to support binary-lighting-output object type and blink warn
* Changed example device object to not create objects when device object-table is overridden
* Fixed unit testing for device object
* Fix EPICS property name proprietary range
* Fix Lighting Command decode length
* add function to determine property name and units proprietary range
* improve test coverage for AI, AO, AV, BI, BO, BV, LO
* refactor common property encoding to proplist module
* add decoder for priority array
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
Add enumerations and text for Color and Color Temperature objects
Add enumerations and text for Audit Log and Audit Reporter objects
Add enumerations and text for BACnet/SC Network Port object
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Enable lcov coverage in unit testing via cmake.
* fix pipeline build error
* add compile options for unit test to silence some warnings
* remove all BAC_TEST unit tests in src/bacnet/ folder. They are now in test/bacnet/ folders using ztest.
* removed key.c - only used for unit test.
* produce XML test result output for parsing
* produce junit XML test result output
* change lint workflow to quality
* update readme badge for quality results
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Added alarm-ack application
* fix error and simple ack handling for event notification
* Added ack-alarm application
* Update CMake for ack-alarm
* update example objects for alarm and events
* Allow repeated ack-alarm for same transition
* add event state API. Fix COV event state.
* add event state API to AV. Fix COV event state.
* Use event time for ack notification
* Enable notifications for all transitions by default. For testing.
* Use unconfirmed device notification to 4194303 for testing.
* initialize local vars
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Add BAC_ROUTING compile definition
* Reorder cmake
* Fix OpenSSL support: support both 1.0 and 1.1t pus
* Explicitly export symbols, hidden by default
* Build shared libraries on travis using cmake
* Learn Makefile about static library
* Fix build using mingw with cmake
* Do not cleanup twice or after potential free
The existing method of calling various example apps requires the user to
know the enumeration value for the object-type and property values. This
patch enhances to allow the object-type and property arguments to be
specified as strings, using the strings as defined in the spec. It does
not remove the old behaviour.
Current:
bacrp 1234 3 1 85
New:
bacrp 1234 binary-input 1 present-value
This change does not currently apply to the property arguments of the
readm and writem applications.
* moving folders and files and adjust server demo build
* Fix Makefile for apps/server on Linux
* fix unit test source file folders
* fix datetime convert UTC functions. Add Code::Blocks project for datetime testing
* added some ignore extensions
* disable parallel make option
* fix build for abort, dcc, and epics apps
* fix build for dcc, epics, error, and getevent apps.
* Fixed building of all apps
* fix the ipv4 to ipv6 router app build
* Change indent style from Google to Webkit
* make pretty to re-format style
* removed common Makefile since we already had one and two was too many
* remove scripts from root folder that are no longer maintained or used
* remove mercurial EOL and ignore files for git repo
* remove .vscodeconfig files from repo
* tweak clang-format style
* clang-format src and apps with tweaked style
* added clang-tidy to fix readability if braces in src
* result of make tidy for src and apps
* fix clang-tidy mangling
* Added code::blocks project for BACnet server simulation
* added code::blocks linux project for WhoIs app
* update text files for EOL
* fix EOL in some files
* fixed make win32 apps for older gcc
* Removed Borland C++ Makefile in apps. Unable to maintain support for Borland C++ compiler.
* created codeblocks project for apps/epics for Windows
* fixing ports/xplained to work with new data structure.
* fix ports/xplained example for Atmel Studio compile
* fix ports/stm32f10x example for gcc Makefile compile
* fix ports/stm32f10x example for IAR EWARM compile
* fix ports/xplained timer callback
* fix ports/bdk_atxx_mspt build with subdirs
* fix ports/bdk_atxx_mspt build with subdirs
* updated git ignore for IAR build artifacts
* updated gitignore for non-tracked files and folders
* fixed bdk-atxx4-mstp port for Rowley Crossworks project file
* fixed bdk-atxx4-mstp port for GCC AVR Makefile
* fixed atmega168 port for IAR AVR and GCC AVR Makefile
* fixed at91sam7s port for IAR ARM and GCC ARM Makefile
* removed unmaintainable DOS, RTOS32, and atmega8 ports. Updated rx62n (untested).
* changed arm7 to uip port