Corrected the NPDU encoding for the demo handlers.

This commit is contained in:
skarg
2006-09-23 22:02:04 +00:00
parent 07a1077b2d
commit 337bc5ab4e
23 changed files with 502 additions and 289 deletions
+16 -8
View File
@@ -275,7 +275,7 @@ int cov_notify_decode_service_request(uint8_t * apdu,
}
int ucov_notify_send(uint8_t * buffer, BACNET_COV_DATA * data)
{
{
int len = 0;
int pdu_len = 0;
BACNET_ADDRESS dest;
@@ -284,11 +284,11 @@ int ucov_notify_send(uint8_t * buffer, BACNET_COV_DATA * data)
/* unconfirmed is a broadcast */
datalink_get_broadcast_address(&dest);
/* encode the NPDU portion of the packet */
npdu_encode_npdu_data(&npdu_data, false, MESSAGE_PRIORITY_NORMAL);
pdu_len = npdu_encode_pdu(&buffer[0], &dest, NULL, &npdu_data);
/* encode the NPDU portion of the packet */
npdu_encode_npdu_data(&npdu_data, false, MESSAGE_PRIORITY_NORMAL);
pdu_len = npdu_encode_pdu(&buffer[0], &dest, NULL, &npdu_data);
/* encode the APDU portion of the packet */
len = ucov_notify_encode_apdu(&buffer[pdu_len], data);
len = ucov_notify_encode_apdu(&buffer[pdu_len], data);
pdu_len += len;
/* send the data */
bytes_sent = datalink_send_pdu(&dest, &npdu_data, &buffer[0], pdu_len);
@@ -355,10 +355,18 @@ int ucov_notify_decode_apdu(uint8_t * apdu,
/* dummy function stubs */
void npdu_encode_unconfirmed_apdu(BACNET_NPDU_DATA * npdu,
BACNET_MESSAGE_PRIORITY priority)
int npdu_encode_pdu(uint8_t * npdu,
BACNET_ADDRESS * dest,
BACNET_ADDRESS * src, BACNET_NPDU_DATA * npdu_data)
{
return;
return 0;
}
void npdu_encode_npdu_data(BACNET_NPDU_DATA * npdu,
bool data_expecting_reply,
BACNET_MESSAGE_PRIORITY priority)
{
}
/* dummy function stubs */