Added Who-Is-Router process for Notification Class recipient unknown router addresses. (#1243)
* Added Who-Is-Router-To-Network process in basic Notification Class when recipient address is missing the router MAC address. * Added buffer_length parameter to octet string buffer decode functions * Fixed BACnet address handling for I-Am-Router address updating the recipient list address for the next hop router. * Changed VMAC encoding and decoding to use octet string buffer API to reduce stack RAM.
This commit is contained in:
@@ -72,6 +72,8 @@ add_executable(${PROJECT_NAME}
|
||||
# Test and test library files
|
||||
./stubs.c
|
||||
./src/main.c
|
||||
${TST_DIR}/bacnet/basic/object/test/datetime_local.c
|
||||
${TST_DIR}/bacnet/basic/object/test/device_mock.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
${ZTST_DIR}/ztest.c
|
||||
)
|
||||
|
||||
@@ -11,10 +11,19 @@
|
||||
#include "bacnet/datetime.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/basic/npdu/h_npdu.h"
|
||||
#include "bacnet/basic/object/nc.h"
|
||||
|
||||
uint32_t Device_Object_Instance_Number(void)
|
||||
uint8_t Send_CEvent_Notify_Address(
|
||||
uint8_t *pdu,
|
||||
uint16_t pdu_size,
|
||||
const BACNET_EVENT_NOTIFICATION_DATA *data,
|
||||
BACNET_ADDRESS *dest)
|
||||
{
|
||||
(void)pdu;
|
||||
(void)pdu_size;
|
||||
(void)data;
|
||||
(void)dest;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -43,15 +52,14 @@ void Send_WhoIs(int32_t low_limit, int32_t high_limit)
|
||||
(void)high_limit;
|
||||
}
|
||||
|
||||
bool datetime_local(
|
||||
BACNET_DATE *bdate,
|
||||
BACNET_TIME *btime,
|
||||
int16_t *utc_offset_minutes,
|
||||
bool *dst_active)
|
||||
void Send_Who_Is_Router_To_Network(BACNET_ADDRESS *dst, int dnet)
|
||||
{
|
||||
(void)bdate;
|
||||
(void)btime;
|
||||
(void)utc_offset_minutes;
|
||||
(void)dst_active;
|
||||
return true;
|
||||
(void)dst;
|
||||
(void)dnet;
|
||||
}
|
||||
|
||||
void npdu_set_i_am_router_to_network_handler(
|
||||
i_am_router_to_network_function pFunction)
|
||||
{
|
||||
(void)pFunction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user