Commit Graph

2788 Commits

Author SHA1 Message Date
Steve Karg 8a866b6754 Bugfix/file object file size type (#116)
* Fix file object example file size type

* Add include for definition of BACnet unsigned.

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-09-03 22:02:49 -05:00
Greg Shue b872ee7859 Merge pull request #115 from bacnet-stack/feature/zephyr_clang-format_file
Feature/zephyr clang format file via patched commits from Zephyr.
2020-09-01 14:57:54 -07:00
Peter Bigot 9f4a5b31c7 clang-format: Update with latest FOR_EACH macro list
Correct the shell fragment to use the spelling Zephyr uses, and re-run
it to update the list.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-31 19:05:52 -07:00
Håkon Alseth b90df2bf90 clang-format: add support for clang-format
Add .clang-format style from linux kernel to allow easier
style formatting for developers that do not use uncrustify.
You can call "clang-format -style=file -i my_src.c" within the repo
to in-place fix the style.

Signed-off-by: Håkon Alseth <haal@nordicsemi.no>
2020-08-31 19:05:23 -07:00
Greg Shue b01f3026e0 Merge pull request #114 from bacnet-stack/feature/zephyr_module
Simplest Zephyr module + bacnet_stack config and hello sample
2020-08-31 14:39:24 -07:00
Gregory Shue 6ccc9505f3 Simplest Zephyr module + bacnet_stack config and hello sample 2020-08-29 13:08:08 -07:00
Greg Shue 2698b0aa41 Merge pull request #113 from bacnet-stack/feature/toplevel_west_manifest
Add top-level west.yml to become a west manifest repo
2020-08-27 09:33:51 -07:00
Gregory Shue c2f2b112d1 Add top-level west.yml to become a west manifest repo 2020-08-27 09:30:59 -07:00
Steve Karg 577b18e1f7 Fix confirmed ACK and simple ack callback without casting. (#112)
Co-authored-by: Steve Karg <steve.karg@legrand.us>
2020-08-26 17:41:32 -05:00
Steve Karg 645c1b7916 Fixed AVR ports IDE project builds (#111)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-08-19 10:05:01 -05:00
Txinto c1429ba7be Fixing BACDL_ETHERNET compilation (#108)
Co-authored-by: Txinto Vaz <txinto@iac.es>
2020-08-13 10:19:42 -05:00
Roy Schneider 993acb494a Replaced gotos in handler code (#109) 2020-08-13 10:18:50 -05:00
Steve Karg f41b5377cc Added UTF8 multibyte to wide char printing in some apps (#106)
* Added UTF8 multibyte to wide char printing in some apps

* Fix test compile

* Reduce diff churn

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-07-27 22:44:43 -05:00
Roy Schneider 2af16ab14d Feature/comments and review (#102)
* Added comments. Replaced -1 with BACNET_STATUS_ERROR macro.

* Added some DogyGen comments

* Added missing return value check for booleans.

* Check used bits against unused bits in bitstrings.

* Added missing return value check for bitstrings.

* Added sanity checks and comments.

* Fixed implicit type conv warning.

* Chose to keep simpler C function methods.

Co-authored-by: Steve Karg <steve@kargs.net>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-07-14 11:41:51 -05:00
Steve Karg de7f7e9782 Feature/router mstp example app (#101)
* Ported router-ipv6 app to router-mstp

* Fixed router-ipv6 build

* Added router-ipv6 and router-mstp to pipeline

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-07-02 22:46:13 -05:00
Steve Karg cfb82a937f Incremented version to 1.0.0 for release on 20200619 2020-06-19 15:01:41 -05:00
Steve Karg ca544e7ac1 Performed clang-tidy on files 2020-06-19 14:51:19 -05:00
Steve Karg 15dce68947 make pretty using clang-format 10 2020-06-19 14:44:32 -05:00
radolin be57c73508 Set name after call to Init_Service_Handlers(), as it calls Device_Init() from device.c which overwrites it to SimpleServer (#98) 2020-06-19 07:50:54 -05:00
Steve Karg fbef685063 Updated some of the documentation 2020-06-19 07:48:06 -05:00
Carlos Gomes Martinho ff9697bab4 fix: linking with cpp code (#95)
* fix: linking with cpp code

* fix: make Handler_Transmit_Buffer always available
2020-05-31 23:44:09 -05:00
Carlos Gomes Martinho 9cad803cc8 chore: remove BACAPP_SNPRINTF_ENABLED macro (#94)
* chore: remove BACAPP_SNPRINTF_ENABLED macro

* feat: add ifdef in bacapp_snprintf_value and bacapp_parse_application_data for each data type so that smaller MCU can compile without

* fix: typos
2020-05-31 23:42:40 -05:00
Carlos Gomes Martinho 9137531eb0 fix: compiler warnings Wtautological-pointer-compare (#93)
warning: comparison of array 'wp_data->application_data' equal to a null pointer is always false [-Wtautological-pointer-compare]
2020-05-28 08:56:58 -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
Steve Karg cbfa74e48d Bugfix/bacnet real endian simplify (#89)
* Remove dependence on endian define

* Make use of existing big_endian function if BACNET_BIG_ENDIAN is not defined

* Add efficient endian macro option if available

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-05-24 09:36:21 -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
Carlos Gomes Martinho 3818f3d844 ci: run pipeline also on pull requests (#88) 2020-05-18 11:04:34 -05:00
Steve Karg 3553ae56c2 Fixed objects list helper and unit test (#86)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-05-15 15:41:02 -05:00
Roy Schneider 094ac1db00 Feature/safe decode npdu (#84)
* Added safe version to decode npdu

* Calling safe decoder function.

* Added comments and apdu_len checks.

* Fixed signed/unsigned warnings.
2020-05-11 08:30:18 -05:00
Steve Karg ec923e51a3 Bugfix/device object protocol revision 14 property list (#82)
* Added property-list to device object for client applications

* Added property-list to some AVR ARM and RX62 ports

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-05-02 14:01:09 -05:00
Roy Schneider 05aaee7f6b Comments and length checks. (#81)
* Comments and length checks.

* Added max_apdu checking.
2020-05-01 20:29:21 -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
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
Steve Karg 89929ee802 Fix the Abort and Reject enumeration max and comments. Thanks Brad! (#78)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-27 11:47:57 -05:00
Steve Karg 1fe6b7e670 Fixed #15 bactext engineering units for new reserved range (#77)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-23 14:42:38 -05:00
Steve Karg 62bfeba2c5 Fixed #57 crash for get alarm summary. Thank you Walter! (#76)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-23 07:29:56 -05:00
Steve Karg 5e9cb90a09 Update README.md 2020-04-17 08:36:19 -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 1ead6acea5 Fix BACnet IPv4 decode to allow for NULL (#72)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-15 00:03:21 -05:00
Steve Karg 5c8e3406cb Fixed BACnet integer decode for 40-48-56 bits (#71)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-15 00:03:06 -05:00
Steve Karg 33cc55db30 Fixed router app after BACnet IPv4 refactor 2020-04-13 14:55:18 -05:00
Steve Karg 40f7aaba74 Added macro to calculate the next power of two for FIFO data store (#69)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-13 11:45:57 -05:00
Roy Schneider b55a0263f8 Feature/length check use pointers (#66)
* Added received bytes length check and some comments.

* Added more check for MAX_PDU
2020-04-13 06:15:50 -05:00
Steve Karg 4d1aca2a71 Updated readme with additional CI badges
Added AppVeyor and GitHub workflow badges
Add CMake instructions for Code::Blocks
2020-04-12 09:41:53 -05:00
Steve Karg d7918bb2ea Feature/add bbmd unit tests (#65)
* Added som BBMD IPv4 and IPv6 unit tests

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-11 22:58:07 -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 0ce6368b43 Feature/refactor datetime os dependency (#63)
* remove dependency on OS for time functions.

* add datetime epoch to and from seconds (yikes! 64-bit!). Add symmetric midnight seconds for unit test. Add unit tests.

* clean up BACnet date time warnings

* fix BACnet datetime warnings

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-04-04 11:23:26 -05:00
Steve Karg b159402647 Feature/enable mingw build (#62)
* enabled mingw win32 build in travis

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2020-03-27 13:30:16 -05:00