Changed npdu_encode function to return length when given a NULL buffer. (#549)

* 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>
This commit is contained in:
Steve Karg
2023-12-27 10:29:42 -06:00
committed by GitHub
parent 0aa6b242b3
commit 73ee75635b
4 changed files with 192 additions and 94 deletions
+8
View File
@@ -81,6 +81,14 @@ extern "C" {
BACNET_ADDRESS * src,
BACNET_NPDU_DATA * npdu_data);
BACNET_STACK_EXPORT
int bacnet_npdu_encode_pdu(
uint8_t * pdu,
uint16_t pdu_size,
BACNET_ADDRESS * dest,
BACNET_ADDRESS * src,
BACNET_NPDU_DATA * npdu_data);
BACNET_STACK_EXPORT
void npdu_encode_npdu_data(
BACNET_NPDU_DATA * npdu,