* Fixed example app router-ipv6 to build under ports/win32
* Fixed example app router-mstp to build under ports/win32 with MinGW
* Added win32 builds of router-ipv6 and router-mstp to the Github pipeline
* Added required linux Ethernet library for ethernet build
* Added .obj to gitignore
* Fixed BACnet port for APPLE to use BSD in CMake
* Changed format in CMake to enable cleaner SC merge
* Added create-object and delete-object recipes in GCC Makefile
* Added datalink timer to all example OS apps
* Changed most microcontroller ports to use BACAPP_MINIMAL to specify which datatypes can be written.
* Fixed zephyr OS for BACnet/IP warning
* Fixed zephyr OS log to not require log_strdup
* Added writefile API to file object example
* Added API to device-client to make it more robust.
* Added API in network-port object for getting the ASCII object-name
* Added debug print with a timestamp option
* Added debug print with hex dump print
* Added API to network port object for activate and discard
* Added default define for debug with timestamp
* Added prototype in header for disabled debug printf.
* Added fifo peek ahead function to peek at more than one byte.
* Added get-mac value for network port that uses buffer rather than octetstring
* 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.
* Added Keylist_Data_Free function to free all nodes and data in a list
* Added basic Life Safety Zone object type in the apps/server example, with unit testing.
* Fix routing to a remote network in the router-mstp example.
The net, len and adr fields of remote_dest are not initialized
although they are used by the npdu_encode_pdu function in
case of "Routing to another Router". Thank you, Eugene!
* Fixed handling of received MS/TP extended frames.
mstp_port->DataLength should be set to the actual length of decoded data.
* Fix MSTP_Master_Node_FSM and MSTP_Slave_Node_FSM for extended frames.
BACNET_EXTENDED_DATA frames should be treated the same as
their corresponding BACNET_DATA frames.
* Fixed MSTP COBS frame encoding
cobs_frame_encode writes the encoded data to the
beginning of the buffer, overwriting the frame header.
The frame header is constructed before COBS frame encoding,
so it contains the wrong Frame Type and Data Length.
* Added extended frame client unit test
* Fix router-ipv6 application for remote networks
* Added an example application to discover devices and their objects and properties on a specific destination network. The application uses a BACnet Discovery FSM module along with the BACnet R/W FSM. The BACnet Discovery module stores the binary property data in Keylists and includes device object property queries and iterators.
* Added callback from BACnet R/W FSM module for I-Am messages.
* Removed dependency in BACnet R/W FSM module on rpm_ack_decode_service_request() which uses calloc/free value lists. Created an alternate RPM-ACK to RP-ACK processing function.
* Changed RPM handler to skip over unknown property values
* Added a MS/TP zero-config (automatically choose an unused MAC address) using an algorithm that starts with MAC=64 and waits for a random number of PFM (minimum of 8 plus modulo 64) before attempting to choose a MAC sequentially from 64..127. The confirmation uses a 128-bit UUID with the MSTP Test Request frame. The modifications are in src/bacnet/datalink/mstp.c and src/bacnet/datalink/dlmstp.c modules enabling any device to use zero-config if enabled. A working demonstration is in the ports/stm32f4xx for the NUCLEO board. Complete unit testing is included. Options include lurking forever (wait for a router or another master node before joining) or lurking for a minimum time (enables self forming automatic MAC addressing device nodes).
* Added basic Calendar object, unit tests, and integration with example device object.
* Added basic Time Value object, unit tests, and integration with example device object.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* 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
* Added MSTP extended frame transmit to bacnet/datalink/mstp.c and ports/stm32f4xx/dlmstp.c modules.
* Changed RS485_Send_Frame to MSTP_Send_Frame in mstp.c
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Fix device object ReinitializeDevice service handling examples of no-password in the device. Add unit testing of device object ReinitializeDevice service. Add API for setting ReinitializeDevice device object password.
* Fix DeviceCommunicationControl service handling example of no-password in the device.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* refactor WriteProperty of object-name property rules into device object.
* remove dependence on device object inside some dynamic objects
* improve device object unit test coverage
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* fixed BACnetXYcolor and BACnetColorCommand encode and decoding and improved unit test coverage. Refactored BACnetXYcolor to/from ascii into lighting module.
* added to the color, color temperature, and lighting output objects a fade/ramp/step engine. Added color and color command coercion into the channel object and enabled color temperature object coercion. Added CreateObject and DeleteObject service handling to the color, color temperature, lighting output, and channel objects.
* added blinkt demo app for Raspberry Pi [WIP]
* updated gitignore to simplify handling of apps folder contents
* fixed piface demo build
* added RaspiOS to pipeline for piface and blinkt! demo builds
* added device object timer function for child object types into example Device object. Refactored device object to increment database revision for create or delete object services. Refactored example app/server to use mstimer library and device child object timers.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Change mstpcap to either write to pipe or file, not both.
Fixed bug#83 of mstpcap.exe Permission Denied in Wireshark
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Fixes#346 by binding the broadcast socket to the port specific broadcast address rather than INADDR_ANY or INADDR_BROADCAST. Added additional compile and environment options for those who might need them.
* Changed the define USE_CLASSADDR to BACNET_IP_BROADCAST_USE_CLASSADDR to help manage namespaces.
* Added BACNET_IP_BROADCAST_BIND_ADDR environment variable to override the default broadcast binding address.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* added or updated secure the BACnet primitive value decoders - the core codecs - named bacnet_x_decode(), bacnet_x_application_decode() and bacnet_x_context_decode where x is one of the 13 BACnet primitive value names. The updated API includes an APDU size to prevent over-reading of an APDU buffer while decoding. Improved or added unit test code coverage for the BACnet primitive value decoders.
* marked the insecure decoding API as 'deprecated' which is defined in src/bacnet/basic/sys/platform.h and can be disabled during a build.
* added secure decoders for BACnetTimeValue, BACnetHostNPort, BACnetTimeStamp, BACnetAddress, and Weekly_Schedule and improved unit test code coverage.
* improved test code coverage for BACnet objects and properties.
* secured AtomicReadFile and AtomicWriteFile service decoders and improved unit test code coverage.
* secured BACnet Error service decoder and improved unit test code coverage.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
Added BACnet CreateObject and DeleteObject services
* refactored codec for BACnetPropertyValue into bacapp module
* added unit tests for BACnetPropertyValue
* refactored COV and Events to use BACnetPropertyValue codec API
* added unit tests for COV
* added overrun safe decoders for tag numbers and boolean context
* added unit tests and codecs for CreateObject and DeleteObject services
* added APDU service handers and senders for CreateObject and DeleteObject services
* added command line apps bacco and bacdo for CreateObject and DeleteObject services
* added CreateObject and DeleteObject service handling in example server app and device object
* added new BACnetRejectReason, Error Class, and BACnetAbortReason enumerations and conversions
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Added AddListElement and RemoveListElement services
Added list-element codec and unit tests.
Added BACnetDestination codec and unit tests.
Added RecipientList handling to NotificationClass object.
Added AddListElement and RemoveListElement client example app.
* Fix defects found by scan-build and CPPCHECK
* Update ports errors found during CI builds
* Update zephy os test build missing files in CMakeLists
---------
Co-authored-by: Ondřej Hruška <ondra@ondrovo.com>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Add common BACnetARRAY encode function to fix Device object list buffer overflow. Refactor device, analog-output, access-door and binary-output objects to use common BACnetARRAY encoder.
* Fix non-POSIX builds (win32).
* Cleanup some ports/stm32 build warnings
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Enable extra GCC warnings to discover subtle bugs
* convert c++ comments to c comments
* cleanup pedantic compiler warnings
* Compile apps with GNU89 GNU99 GNU11 and GNU17
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>