Commit Graph

187 Commits

Author SHA1 Message Date
fprwi6labs 5a3d7a4ab2 Fix linkage conflict when use stack in C++ project (#360) 2022-11-21 09:30:45 -06:00
Patrick Grimm 0f75085771 FIX export ucix_for_each_section_type function (#357) 2022-11-20 14:25:38 -06:00
Patrick Grimm 9a1291529a Fix min data len for UNCONFIRMED_SERVICE_REQUEST from 3 to 2 (#356) 2022-11-20 14:25:00 -06:00
Steve Karg 70c290d1ad Feature/bacnet ipv6 foreign device registration (#355)
* Added IPv6 Foreign Device Registration for apps

* Fix debug message in BACnet/IPv6 Linux port

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-11-17 08:14:33 -06:00
Patrick Grimm a755eb4d9c bacapp print Timestamp Value (#354)
print out the Time stamp in ISO 8601 format for event-time-stamps

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
2022-11-16 16:06:58 -06:00
Steve Karg 77b2881f60 fix analog, binary, and multistate output tests 2022-11-10 17:35:03 -06:00
Steve Karg 100df01cef Modify example output objects
Add current-command-priority to output objects revision 17 or later.
Modify analog, binary, multistate outputs to be dynamic creatable.
2022-11-10 14:16:26 -06:00
Steve Karg db65a71433 Fix color temperature name 2022-11-10 10:27:12 -06:00
Steve Karg a3fd5b9fc3 Added some missing services to APDU. Fix maxes. Refactor Simple Ack. 2022-11-06 10:34:44 -06:00
Steve Karg 64d1461549 fix spelling errors 2022-10-29 12:28:21 -05:00
Steve Karg db7d9fc572 Fix deprecated for other compilers 2022-10-29 09:01:25 -05:00
Alexander Wells 5b30674215 Provide getter for broadcast BIP socket (#350) 2022-10-24 13:44:42 -05:00
Alexander Wells de454a8d5c Fix apparent typo (#345) 2022-09-30 09:19:00 -05:00
rcb-tcs 8fac5afdaa RPM should return UNKNOWN_OBJECT for non-existent objects (#337)
* Return UNKNOWN_OBJECT for invalid object IDs

* Don't terminate RPM for UNKNOWN_OBJECT

* Review changes
2022-09-26 23:06:39 -05:00
Mikhail Antropov 32a312f974 Fix regressive zephyr unit tests (#339) 2022-09-21 09:08:37 -05:00
Steve Karg 196ac2b0fd Fix BACnet object text off-by-one. 2022-09-16 08:42:07 -05:00
Steve Karg d77881147e Add README to UCIX option 2022-09-15 10:15:33 -05:00
Steve Karg bda33b987e Change Notifications to initially be disabled. 2022-09-15 10:12:32 -05:00
Steve Karg a3838cb7b5 Fix BACnet/IP Forwarded NPDU to FDT entries 2022-09-15 10:11:52 -05:00
Steve Karg 72ca232cab fix cppcheck errors 2022-09-10 21:00:16 -05:00
Steve Karg 457ceb4a25 fix cppcheck errors 2022-09-10 20:41:38 -05:00
Steve Karg cc4911a185 make pretty 2022-09-10 10:32:50 -05:00
Ondřej Hruška 7cdab61d72 Schedule encoding/decoding (#319)
* schedule: add decode_daily_schedule() and encode_daily_schedule()

* schedule: encode/decode implemented + add to bacapp

* add safe encode/decode functions for timevalue, schedule function renaming

* fix unit tests build failing

* add IDEA and test temporary files to .gitignore

* try to make "deprecated" work in MSVC

* add WeeklySchedule compare function

* add bacnet_weeklyschedule_context_decode()

* Add basic test for WeeklySchedule

* Fix WeeklySchedule parsing and snprintf, decoder verified with real hardware

* try to fix windows build

* improve boolean parsing in 'bacapp_parse_application_data'

* add parse function for weekly schedule

* allow types > 16 in bacwp, show the decoded value before sending

* add bacapp binaries to gitignore

* remove bacwp logging

* Add error checking to bacapp_parse_application_data

* try to fix windows build

* fix avr build

* Fix error handling in RP Ack

* add singleDay flag

* show day name in single day weeklyschedule snprintf

* show weeklyschedule inner tag in snprintf

* improve weeklyschedule parsing and printing, supports type names now

* add weekly schedule to bacapp_decode_data

* move bacnet/bacnet_plat_compat.h to bacnet/basic/sys/platform.h

* disable tag limit also in bacwpm

* add ifdef's around strtoX helper functions in bacapp

* move strtox to BACAPP_PRINT_ENABLED ifdef in bacapp

* fix stm32 makefiles

* fix at91sam7s build

* use BACNET_UNSIGNED_INTEGER in BACnet_Short_Application_Data_Value

* fix capitalization in BACnet_Daily_Schedule

* add name to BACNET_TIME_VALUE struct

* change bacwp bacwpm to use bacapp_known_property_tag()

* fix some macros in bacdcode missing parentheses

* Remove dummy fields from BACNET_SHORT_APPLICATION_DATA_VALUE, replace remaining uses of upcasting (adds extra overhead but is maybe safer), rename short DV to Primitive

* fix new ci warnings

* more fixes for ancient C

* fix tests no longer building

* primitive value renamed to shorter name
2022-09-05 09:27:15 -05:00
Steve Karg abe4642189 Issue 326 struct tm temp time; (#330)
* Convert struct tm and time.h to datetime.h usage

* remove use of time.h standard file

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-08-24 14:10:05 -05:00
Steve Karg 95b487ea6f Bugfix/c89 compile fixes (#327)
* Fix code to be able to compile with older C89 ANSI compilers

* Convert C++ comments to C89 comments.

* default to std=gnu89

* Fix to enable CMake 3.1 to build on Centos7

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-08-23 13:37:32 -05:00
Steve Karg c8671d54f7 Fix warnings found by splint (#324)
* Fix warnings found by splint

* Ignore Win32 Builder warnings about possible data loss for integers.

* Fix Windows build warnings

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-08-17 23:23:26 -05:00
Steve Karg 8cddaa5881 Fix confirmed service with service supported enumeration 2022-08-17 23:21:39 -05:00
Steve Karg af16d44d2b Add Unconfirmed Audit Notification enum. (#318)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-08-01 22:16:50 -05:00
Steve Karg a945588340 Bugfix/print property name units lighting (#313)
* 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>
2022-07-29 17:11:38 -05:00
Steve Karg 1388b668f9 Bugfix/bsd compile warnings (#307)
* Fix FreeBSD compile warnings

* remove example app from ports/bsd. OS based apps are in apps folder

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-07-19 09:54:24 -05:00
Steve Karg c7738dfaf2 Remove RGB API from lighting module. Already in sys. (#305)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-07-14 21:03:46 -05:00
Steve Karg 1f41341c09 Feature/what is network number handling (#304)
* Add What-Is-Network-Number handling.

Add What-Is-Network-Number and Network-Number-Is network layer handling.
Refactor npdu_encode_npdu_network() from router specific code.
Add unit test for NDPU network message
Add app for What-Is-Network-Number
Add app for Network-Number-Is
Add send helper for What-Is-Network-Number
Add send helper for Network-Number-Is

* added sys/debug.c to ports builds for use of debug_printf() in npdu handler.

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-07-14 15:34:45 -05:00
Steve Karg 38d213b47c Feature/color objects color command (#302)
* added BACnetColorCommand and BACnetxyColor encoding and unit testing

* Added Color object and unit testing.

* Added Color Temperature object and Unit test

* Fix BVLC unit test warning.

* add port Makefile for extra types

* added RGB to and from CIE xy utility in sys folder, and add unit tests.

* added cmake-win32 target

* Change RP and RPM to use known property decoder.

Add color object RP and RPM decoding and printing
Fix RPM print for new reserved range above 4194303
Change default protocol-revision to 24 for Color object

* Integrate Color and Color Temperature objects into demo apps

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-07-13 09:54:36 -05:00
Mikhail Antropov 144017f861 BIP: add option - listen to broadcast on a separate socket (#293)
* BIP: add socket to listen to broadcast packets for Linux/Windows/BSD/Zephyr

* BIP: added BVLC broadcast handler to drop a packet when confirmed broadcast request is sent.

* https://sourceforge.net/p/bacnet/bugs/65/
2022-07-01 09:48:41 -05:00
Mikael 1a76db015b bugfix - Avoid segmentation error if file has capacity size (#300)
Co-authored-by: mgbolduc <mgonellabolduc@dimonoff.com>
2022-07-01 09:35:03 -05:00
Greg Shue 8d3c134b3e Merge pull request #297 from bacnet-stack/bugfix/bacport-dependency-removal
Bugfix/bacport dependency removal
2022-06-14 12:39:30 -07:00
Steve Karg 741530ef8a remove unnecessary bacport.h dependency 2022-06-14 12:13:36 -05:00
jci-zimm 9615327a9a support a BACDL_CUSTOM datalink define which allows for externally linked datalink_xxx functions (#292)
Co-authored-by: jzimmen_jcplc <nathan.m.zimmerman@jci.com>
2022-06-13 13:22:16 -05:00
Steve Karg 20ffb968ef fix the bacapp snprintf return size (#294)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-06-12 15:02:05 -05:00
Steve Karg 6a8adcce3d Feature/writepropertymultiple error handler (#289)
* Added extended BACnet Error PDU handling for WPM

* Added BACnetObjectPropertyReference to bacapp module.

* Added unit testing for BACnetObjectPropertyReference

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-06-03 15:47:30 -05:00
Steve Karg f147283293 Feature/apdu null length returned (#285)
* Add APDU as NULL to get BACnet type lengths.

* Fix bacapp copy test to succeed

* fix BACnet REAL and DOUBLE decode

* Add unit test for NULL APDU encoding for length

* Add unit tests for bacapp context

* refactor host-n-port to hostnport.c module

* fix BVLC decoder

* additional unit testing for bacapp

* include bacdevobjpropref module in builds

* simplify bacapp snprintf to be able to return length

* adjust compiler for variable-length arrays

* fix bug found by scan-build

Authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-06-01 15:42:50 -05:00
Mikhail Antropov 810bfefb34 Fix error in datalink/bvlc.c (#288) 2022-05-29 21:00:37 -05:00
Ondřej Hruška 08a12769bd Add option to subscribe to single property COV (#283) 2022-05-26 08:51:29 -05:00
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
Ondřej Hruška 44bd46d395 Make "dlenv_network_port_init()" public (was static) (#281)
This is needed when initing other than by calling "dlenv_init()", e.g. to avoid using env variables and exit()
2022-05-25 21:42:50 -05:00
Ondřej Hruška 44d9d2c668 Allow "address_mac_from_ascii()" to parse hex 1-6 bytes (#284)
This function is used for BIP MAC, but also for DADR. Some real devices use 2-byte DADR. This can now be expressed e.g. as CA:FE
2022-05-25 21:31:32 -05:00
Steve Karg ba0cbc1fb8 Feature/bacnet server client app example (#273)
* Create example server-client for R/W polling application example.

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-05-16 15:02:17 -05:00
Steve Karg b0bed813de added FD BBMD Address and Lifetime as option in NP object (#270)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-05-11 08:02:47 -05:00
Steve Karg e08680044e Added FD BBMD Address encoding. (#269)
* Added FD BBMD Address encoder and decoder

* Added FD BBMD address to bacapp

* Added FD BBMD address to network port object

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-05-10 17:06:51 -05:00
Steve Karg 64a58d8581 Issue 260 unreachable code in bacstr c octetstring init ascii hex (#265)
* Fix unreachable code

Fix unreachable code in octetstring_init_ascii_hex()
Add unit test for octetstring_init_ascii_hex()
Thank you, rlstrand!

* Improve bacstr unit testing

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
2022-05-05 10:21:34 -05:00