Changed Hop Count default to 255. BTL NPDU tests expect Hop Count to start at 255. Added ability of Hop Count default to be overridden in Makefile or project file if you need to make it smaller in your implementation.

This commit is contained in:
skarg
2011-07-07 16:43:43 +00:00
parent ea05c15ce2
commit ad27b84949
3 changed files with 43 additions and 41 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ static void npdu_encode_npdu_network(
npdu_data->network_message_type = network_message_type; /* optional */ npdu_data->network_message_type = network_message_type; /* optional */
npdu_data->vendor_id = 0; /* optional, if net message type is > 0x80 */ npdu_data->vendor_id = 0; /* optional, if net message type is > 0x80 */
npdu_data->priority = priority; npdu_data->priority = priority;
npdu_data->hop_count = DFLT_HOP_COUNT; npdu_data->hop_count = HOP_COUNT_DEFAULT;
} }
} }
+4 -2
View File
@@ -39,8 +39,10 @@
#include "bacdef.h" #include "bacdef.h"
#include "bacenum.h" #include "bacenum.h"
/** Use a hop count default that is generous but reasonable. */ /** Hop count default is required by BTL to be maximum */
#define DFLT_HOP_COUNT 15 #ifndef HOP_COUNT_DEFAULT
#define HOP_COUNT_DEFAULT 255
#endif
/* an NPDU structure keeps the parameter stack to a minimum */ /* an NPDU structure keeps the parameter stack to a minimum */
typedef struct bacnet_npdu_data_t { typedef struct bacnet_npdu_data_t {
+1 -1
View File
@@ -281,7 +281,7 @@ void npdu_encode_npdu_data(
npdu_data->network_message_type = NETWORK_MESSAGE_INVALID; /* optional */ npdu_data->network_message_type = NETWORK_MESSAGE_INVALID; /* optional */
npdu_data->vendor_id = 0; /* optional, if net message type is > 0x80 */ npdu_data->vendor_id = 0; /* optional, if net message type is > 0x80 */
npdu_data->priority = priority; npdu_data->priority = priority;
npdu_data->hop_count = DFLT_HOP_COUNT; npdu_data->hop_count = HOP_COUNT_DEFAULT;
} }
} }