Changed Init Router message to have DER = true.

This commit is contained in:
skarg
2008-08-29 16:47:30 +00:00
parent 4d4b7a1904
commit 61759224a6
2 changed files with 28 additions and 12 deletions
+15 -6
View File
@@ -43,11 +43,12 @@
static void npdu_encode_npdu_network(
BACNET_NPDU_DATA * npdu_data,
BACNET_NETWORK_MESSAGE_TYPE network_message_type,
BACNET_NETWORK_MESSAGE_TYPE network_message_type,
bool data_expecting_reply,
BACNET_MESSAGE_PRIORITY priority)
{
if (npdu_data) {
npdu_data->data_expecting_reply = false;
npdu_data->data_expecting_reply = data_expecting_reply;
npdu_data->protocol_version = BACNET_PROTOCOL_VERSION;
npdu_data->network_layer_message = true; /* false if APDU */
npdu_data->network_message_type = network_message_type; /* optional */
@@ -68,7 +69,9 @@ void Send_Who_Is_Router_To_Network(
BACNET_NPDU_DATA npdu_data;
npdu_encode_npdu_network(&npdu_data,
NETWORK_MESSAGE_WHO_IS_ROUTER_TO_NETWORK, MESSAGE_PRIORITY_NORMAL);
NETWORK_MESSAGE_WHO_IS_ROUTER_TO_NETWORK,
false,
MESSAGE_PRIORITY_NORMAL);
/* fixme: should dnet/dlen/dadr be set in NPDU? */
pdu_len =
npdu_encode_pdu(&Handler_Transmit_Buffer[0], NULL, NULL, &npdu_data);
@@ -109,7 +112,9 @@ void Send_I_Am_Router_To_Network(
unsigned index = 0;
npdu_encode_npdu_network(&npdu_data,
NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK, MESSAGE_PRIORITY_NORMAL);
NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK,
false,
MESSAGE_PRIORITY_NORMAL);
pdu_len =
npdu_encode_pdu(&Handler_Transmit_Buffer[0], NULL, NULL, &npdu_data);
/* encode the optional DNET list portion of the packet */
@@ -152,7 +157,9 @@ void Send_Initialize_Routing_Table(
BACNET_ROUTER_PORT *router_port;
unsigned i = 0; /* counter */
npdu_encode_npdu_network(&npdu_data, NETWORK_MESSAGE_INIT_RT_TABLE,
npdu_encode_npdu_network(&npdu_data,
NETWORK_MESSAGE_INIT_RT_TABLE,
true,
MESSAGE_PRIORITY_NORMAL);
pdu_len =
npdu_encode_pdu(&Handler_Transmit_Buffer[0], NULL, NULL, &npdu_data);
@@ -201,7 +208,9 @@ void Send_Initialize_Routing_Table_Ack(
int bytes_sent = 0;
BACNET_NPDU_DATA npdu_data;
npdu_encode_npdu_network(&npdu_data, NETWORK_MESSAGE_INIT_RT_TABLE_ACK,
npdu_encode_npdu_network(&npdu_data,
NETWORK_MESSAGE_INIT_RT_TABLE_ACK,
false,
MESSAGE_PRIORITY_NORMAL);
pdu_len =
npdu_encode_pdu(&Handler_Transmit_Buffer[0], NULL, NULL, &npdu_data);