Commit Graph

73 Commits

Author SHA1 Message Date
Ondřej Hruška 0dec80fae7 Add functions to enable/disable debug logging (#280)
* Add "bip_debug_disable()"

* Add "bvlc_debug_disable()"

* Add setters for BIP_DL_Debug (BBMD registration debug logging)
2022-05-25 21:43:08 -05:00
Steve Karg 295f127c2b Feature/makefile add apps library (#218)
* add BACnet stack library at apps/lib

* convert apps to use apps/lib for smaller binary

* fix -DBACDL_ALL=1 build

* fix piface build

* datalink MAX_MPDU and MAX_HEADER cleanup

* add bip6 to git workflow

* fix system library dependency of BACnet library

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-01-29 15:55:40 -06:00
Alexander Wells ca32676662 Add bip_get_socket (#210)
* Add function to get BIP socket

* Add bip_get_socket to all applicable ports
2022-01-10 10:15:54 -06:00
Steve Karg 889b7f9357 Feature/bip6 debug enable (#209)
* Added BACNET_BIP6_DEBUG environment variable to enhance BACnet/IPv6 debugging

* Added BACNET_BIP6_DEBUG environment variable to enhance BACnet/IPv6 debugging

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-01-08 11:34:11 -06:00
Steve Karg 3ed77e2491 DSR-1471: fixes data race issues on ring buffer for MSTP (#9) (#174)
* DSR-1471: fixes data race issues on ring buffer

* DSR-1471: added missing semi-colon

Co-authored-by: Fraser Gordon <51318560+FraserG01@users.noreply.github.com>
2021-05-24 18:53:59 -05:00
Steve Karg 63e4fa1f4b fixes #141 Linux BIP with no default gateway (#144)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-12-21 13:07:24 -06:00
Michael Francis cb9b166515 Replace "bits/pthreadtypes.h" include with <sys/types.h> in /ports/linux/dlmstp_linux.h (#139)
This resolves #129 by making this file able to be built on Alpine Linux
2020-11-20 21:38:27 -06:00
Steve Karg 762ffacc8e Bug#72 reading zero bytes in linux BIP. Thanks, Mikhail! (#132)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-10-10 10:45:12 -05:00
Roy Schneider 764e0e8448 Feature/zeroing rx buffer remain (#90)
* Added zeroing rx buffer remain

* Added zeroing rx buffer remain

* Added safety margin for the rx-buffer in the different ports.

* Added safety margin for the receive buffer.

* Added DoxyGen comments.

* Fixed checking return value when calculating distance between opening and closing tag on multiple properties.
2020-05-24 09:19:52 -05:00
Steve Karg fdd49f1791 Feature/make pretty apps and ports (#80)
* Added pretty-apps and pretty-ports make targets

* pretty-fied apps folder C files

* Pretty-fied ports folder C and H files

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-30 10:13:11 -05:00
Steve Karg dbbcec3033 Feature/bacnet ipv4 default iface linux (#75)
* Added default IFACE for IPv4 on Linux

* fix potential leak of memory found by scan-build

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-16 15:55:38 -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 f18612f1ec Fix mstimer elapsed time (#58)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-03-17 17:27:25 -05:00
Steve Karg 81d3a0b4a4 fix BVLC6 Delete-Foreign-Device-Table-Entry (#56)
* fix BVLC6 Delete-Foreign-Device-Table-Entry

* Add unit test failure detection to Makefile report target

* Fix the IPv6 layers for sending PDU

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-03-12 12:24:07 -05:00
Anonymous Maarten 4a916468c6 Export symbols in order to support shared libraries (#54)
* 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
2020-03-06 15:42:03 -06:00
Steve Karg bb5fafc06a feat remove openssl dependency functions and add missing file to cmake (#52)
* feat: remove openssl dependency functions and add missing file to cmake

* chore: also build shared lib

* chore: also build shared for github ci

* chore: do not test shared libs in ci for the moment
2020-03-04 13:35:14 -06:00
Steve Karg 9c41180145 Add ifdef to bit definitions to avoid conflicts with other libraries. Refactor BITx to use BIT macro. (#45) 2020-02-18 08:21:54 -06:00
Geert Linders 76abcaedd1 Reduce Tusage_timeout for all ports. (#37) 2020-01-22 17:07:44 -06:00
Carlos Gomes Martinho d3014c87fa build: improve cmake, add github actions (#16)
* build: install cmake config files to enable cmake find_package

fix: destination for header files

build: clean up build system

build: also install port directory header files

build: fix name of header files

ci: add github actions

build: add bsd port

chore: fix typos

build: remove not deeded mstpsnap

ci: disable ctests as not corrently

ci: disable macos for the moment

build: print compiler versions in cmake

* build: do not build apps by default

* build: add missing slash

* build: add more options to cmake (#3)

* build: add more options to cmake

* chore: disable ipv6

* build: guard around apps for options

* build: fix link lib on windows
2020-01-14 23:25:41 -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
Steve Karg 944362801f re-save line endings to LF for git 2019-10-19 14:20:19 -05:00
Steve Karg a42e8f507c adjust root folder 2019-10-08 23:47:53 -05:00