Commit Graph

13 Commits

Author SHA1 Message Date
Alexander Wells b787173a56 Various minor fixes/improvements (#239)
Includes:
- Making "rpm_data_free" a public method and using it where appropriate
  - Includes fixing memory leak in epics demo application
    (note Valgrind indicates that there are more...)
- Fix typo in cov.c
- Allow NULL max_apdu parameter to address_get_by_device
- Add missing include to s_cov.h
2022-03-10 15:29:10 -06:00
Steve Karg c3a4c229fe Issue 87 execute tests with GitHub ci (#234)
* 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>
2022-02-28 20:09:46 -06:00
Steve Karg 5e70eeecfc Issue 10 ci add support for code spelling checks (#231)
* added make targets spell and codespell for spelling checks

* fix spelling errors detected by codespell

* added codespell to github workflow

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-02-27 16:02:17 -06:00
Steve Karg b38d975f35 Bugfix/compiler warning (#172)
* Fix compiler and static analysis warning

* revise to use for loop pattern

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2021-05-21 09:00:40 -05:00
Steve Karg 15dce68947 make pretty using clang-format 10 2020-06-19 14:44:32 -05:00
Carlos Gomes Martinho 5efc16d3e4 refactor: use const char * instead of char * for inputs (#92)
fixes: "ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]"
2020-05-28 08:55:50 -05:00
Carlos Gomes Martinho 981d4036c8 refactor: rename test macro to prevent collisions (#91)
* refactor: rename test macro to prevent collisions

* style: align cmake epilog

* refactor: rename define in makefiles
2020-05-28 08:55:05 -05:00
Roy Schneider 0abcbea971 Feature/app data buffer check (#79)
* Added comments and buffer overflow checks

* Removed backslashs from C-code.
2020-04-28 08:45:03 -05:00
Roy Schneider 8f13d59629 Feature/comments and buffer checks (#73)
* Added comments

* Replaced Goto construct

* Added apdu_len check

* Added comments

* Added string limit and reworked printable check

* Mainly comments

* Just comments

* Just comments

* decode service request returns now non zero on success

* eliminated warnings

* Added character string init with length check.

* Paranoic length check

* Comments and object index checking on read/write.

* Check name/desc strings before returning.

* Eliminated Goto
2020-04-16 10:38:49 -05:00
Steve Karg eedfa58a55 Feature/refactor bacnet ipv4 add unit tests (#64)
* refactor BACnet/IPv4 BVLC into encode-decode library with unit tests
Added Read-Broadcast-Distribution-Table encoding and unit test.
Added Read-Broadcast-Distribution-Table-Ack encoding and unit test.
Added Read-Foreign-Device-Table-Ack encoding and unit test.
Added some BDT/FDT diff copy functions with unit tests
Added some FDT add and delete entry functions with unit tests
Added some BDT set append and clear entry functions with unit tests
Added some BIPv4 address conversion functions with unit tests
Added non-BBMD handling unit test
Added basic unit test for BBMD handler
Added BBMD broadcast mask get set and unit tests
Added IPv6 maintenance timer.
Added ReadFDT app
Fixed ReadBDT app
Added Who-Is to Makefile for individual app build
Fixed debugging code blocks projects by swapping bip.c for h_bbmd.c module.
Ported BACnet/IPv4 to refactored BVLC for Linux, BSD, Windows
Fix datalink debug for DLENV module
Improve BIPv4 linux driver debug info
Added BDT mask functions
Reduce debug info clutter in Who-Is app by using environment option
Fix TTL seconds upper bounds addition
Fix CIDR prefix calculation on Linux BIPv4.
Convert BSD BIPv4 to BVLCv4
Fix CMake build for BIPv4 (Linux, BSD, Windows)
Added [U]nsigned to 0xBAC0 constants
Cleanup POSIX and Win32 API sockets
Remove unnecessary file scope variable initialization
Fix routed NPDU to depend on datalink; fix warning
Remove OS dependent network code from gateway
Enable BBMD client in library by default
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
Co-authored-by: Steve Karg <steve.karg@legrand.us>
2020-04-04 11:31:54 -05:00
Steve Karg 914f502cff Bugfix/add makefile lint fix warnings (#39)
* fix warnings indicated by scan-build lint tool

* add lint target to makefile using scan-build tool

* add lint into build script stages (note: uses scan-build-7)

* fix potential use of memory after it is freed
2020-01-28 18:48:29 -06:00
Steve Karg 830ab2d788 cleaned clang compile warnings 2019-12-18 21:14:05 -06:00
Steve Karg d50c190957 Issue 2 move folders and use deep path include file names to prevent collisions (#4)
* 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
2019-12-13 15:19:10 -06:00