* Added the SpecialEvent struct for the Exception_Schedule property of Schedule, encode/decode/same functions, unit tests, and integrated into bacapp functions.
* Added the CalendarEntry struct for the Date_List property of Calendar and the SpecialEvent struct, encode/decode functions, unit tests, and integrated into bacapp functions.
* Added the DateRange struct for the Effective_Period property of Schedule, encode/decode functions, unit tests, and integrated into bacapp functions.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
Fixed CMakeLists.txt: to exclude h_routed_npdu.c when BAC_ROUTING=OFF
When calling cmake with -DBAC_ROUTING=OFF,
basic/object/gateway/gw_device.c is correctly excluded from the build.
It does contain however the definition for the functions
Routed_Device_GetNext and Routed_Device_Is_Valid_Network, both of which
are called in the routed_apdu_handler function of basic/npdu/h_routed_npdu.c.
This is fine during compilation since these functions' prototypes are
declared in basic/object/device.h but linking will fail.
Thus, make the compilation of h_routed_npdu.c conditional depending on
the value of BAC_ROUTING.
Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Co-authored-by: Sebastian Weyer <sebastian.weyer@smile.fr>
* Fixed BACNET_STACK_EXPORT macro to Analog_Output_Read_Property function
Added the call to this macro so that Analog_Output_Read_Property is
properly exported as a global symbol when the library is compiled with
-DBUILD_SHARED_LIBS=ON using cmake. This macro expands to
__declspec(dllexport) on Windows and __attribute__((visibility("default")))
on Linux. It is necessary when compiling with the -fvisibility-hidden flag.
Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
Co-authored-by: Sebastian Weyer <sebastian.weyer@smile.fr>
* 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
* Create common DLMSTP using core MSTP FSM in STM32F4xx example
* add openocd debug launcher under vscode in STM32F4xx example
* Add generic property list member checking for write property members of network port object in STM32F4xx example
* refactor service requests from service header
* add APDU size checking and length feature
* add unit tests to check for length when passing NULL buffer
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Changed npdu_encode function to return length when given a NULL buffer.
* reduce TSM dependency in NPDU handler and use local buffer
* add bacnet API with additional size of PDU argument.
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* 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>
* object/nc: Fix incorrect apdu_len calculation when encoding Recipient_List which had resulted in malformed APDU.
* enabled unit testing on notification-class object example
---------
Co-authored-by: Tomasz Kazimierz Motyl <butterfly_tm666@yahoo.com>
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
* Check init flag before cleaning up WSA for BACnet/IP
* Check for valid socket before cleaning up WSA for BACnet/IPv6
---------
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>