Bugfix/network port object bdt required (#184)
* Added BDT encoding to network port object. * Added BDT encoding rules from clause 21 * Added FDT encoding to network port object. * added more unit tests for BVLC * Fix network port and device object unit tests * fix router build for bvlc dependencies * fix router build for bvlc dependencies * fix network port MSTP compile Co-authored-by: Steve Karg <skarg@users.sourceforge.net> Co-authored-by: Steve Karg <steve.karg@legrand.us>
This commit is contained in:
@@ -73,6 +73,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/basic/service/h_wp.c
|
||||
${SRC_DIR}/bacnet/basic/sys/bigend.c
|
||||
${SRC_DIR}/bacnet/basic/tsm/tsm.c
|
||||
${SRC_DIR}/bacnet/datalink/bvlc.c
|
||||
${SRC_DIR}/bacnet/cov.c
|
||||
${SRC_DIR}/bacnet/datetime.c
|
||||
${SRC_DIR}/bacnet/dcc.c
|
||||
|
||||
@@ -43,6 +43,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/bacstr.c
|
||||
${SRC_DIR}/bacnet/bactext.c
|
||||
${SRC_DIR}/bacnet/basic/sys/bigend.c
|
||||
${SRC_DIR}/bacnet/datalink/bvlc.c
|
||||
${SRC_DIR}/bacnet/datetime.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
|
||||
@@ -58,12 +58,15 @@ static void test_network_port(void)
|
||||
rpdata.object_property = *pRequired;
|
||||
rpdata.array_index = BACNET_ARRAY_ALL;
|
||||
len = Network_Port_Read_Property(&rpdata);
|
||||
zassert_not_equal(len, 0, NULL);
|
||||
test_len = bacapp_decode_application_data(rpdata.application_data,
|
||||
(uint8_t)rpdata.application_data_len, &value);
|
||||
zassert_true(test_len >= 0, NULL);
|
||||
if (test_len < 0) {
|
||||
printf("<decode failed!>\n");
|
||||
zassert_not_equal(len, BACNET_STATUS_ERROR, NULL);
|
||||
if (len > 0) {
|
||||
test_len = bacapp_decode_application_data(
|
||||
rpdata.application_data,
|
||||
(uint8_t)rpdata.application_data_len, &value);
|
||||
zassert_true(test_len >= 0, NULL);
|
||||
if (test_len < 0) {
|
||||
printf("<decode failed!>\n");
|
||||
}
|
||||
}
|
||||
pRequired++;
|
||||
}
|
||||
@@ -71,12 +74,15 @@ static void test_network_port(void)
|
||||
rpdata.object_property = *pOptional;
|
||||
rpdata.array_index = BACNET_ARRAY_ALL;
|
||||
len = Network_Port_Read_Property(&rpdata);
|
||||
zassert_not_equal(len, 0, NULL);
|
||||
test_len = bacapp_decode_application_data(rpdata.application_data,
|
||||
(uint8_t)rpdata.application_data_len, &value);
|
||||
zassert_true(test_len >= 0, NULL);
|
||||
if (test_len < 0) {
|
||||
printf("<decode failed!>\n");
|
||||
zassert_not_equal(len, BACNET_STATUS_ERROR, NULL);
|
||||
if (len > 0) {
|
||||
test_len = bacapp_decode_application_data(
|
||||
rpdata.application_data,
|
||||
(uint8_t)rpdata.application_data_len, &value);
|
||||
zassert_true(test_len >= 0, NULL);
|
||||
if (test_len < 0) {
|
||||
printf("<decode failed!>\n");
|
||||
}
|
||||
}
|
||||
pOptional++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user