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:
+13
-13
@@ -45,7 +45,7 @@
|
||||
|
||||
/** Copy the npdu_data structure information from src to dest.
|
||||
* @param dest [out] The 'to' structure
|
||||
* @param src [in] The 'from' structure
|
||||
* @param src [in] The 'from' structure
|
||||
*/
|
||||
void npdu_copy_data(
|
||||
BACNET_NPDU_DATA * dest,
|
||||
@@ -107,14 +107,14 @@ ABORT.indication Yes Yes Yes No
|
||||
* and associated data.
|
||||
* If this is to be a Network Layer Control Message, there are probably
|
||||
* more bytes which will need to be encoded following the ones encoded here.
|
||||
* The Network Layer Protocol Control Information byte is described
|
||||
* The Network Layer Protocol Control Information byte is described
|
||||
* in section 6.2.2 of the BACnet standard.
|
||||
* @param npdu [out] Buffer which will hold the encoded NPDU header bytes.
|
||||
* The size isn't given, but it must be at least 2 bytes
|
||||
* for the simplest case, and should always be at least 24
|
||||
* bytes to accommodate the maximal case (all fields loaded).
|
||||
* @param dest [in] The routing destination information if the message must
|
||||
* be routed to reach its destination.
|
||||
* be routed to reach its destination.
|
||||
* If dest->net and dest->len are 0, there is no
|
||||
* routing destination information.
|
||||
* @param src [in] The routing source information if the message was routed
|
||||
@@ -123,9 +123,9 @@ ABORT.indication Yes Yes Yes No
|
||||
* routing source information.
|
||||
* This src describes the original source of the message when
|
||||
* it had to be routed to reach this BACnet Device.
|
||||
* @param npdu_data [in] The structure which describes how the NCPI and other
|
||||
* @param npdu_data [in] The structure which describes how the NCPI and other
|
||||
* NPDU bytes should be encoded.
|
||||
* @return On success, returns the number of bytes which were encoded into the
|
||||
* @return On success, returns the number of bytes which were encoded into the
|
||||
* NPDU section.
|
||||
* If 0 or negative, there were problems with the data or encoding.
|
||||
*/
|
||||
@@ -262,7 +262,7 @@ is expected for the service being issued.
|
||||
/** Initialize an npdu_data structure to good defaults.
|
||||
* The name is a misnomer, as it doesn't do any actual encoding here.
|
||||
* @see npdu_encode_npdu_network if you need to set a network layer msg.
|
||||
*
|
||||
*
|
||||
* @param npdu_data [out] Returns a filled-out structure with information
|
||||
* provided by the other arguments and good defaults.
|
||||
* @param data_expecting_reply [in] True if message should have a reply.
|
||||
@@ -281,27 +281,27 @@ void npdu_encode_npdu_data(
|
||||
npdu_data->network_message_type = NETWORK_MESSAGE_INVALID; /* optional */
|
||||
npdu_data->vendor_id = 0; /* optional, if net message type is > 0x80 */
|
||||
npdu_data->priority = priority;
|
||||
npdu_data->hop_count = DFLT_HOP_COUNT;
|
||||
npdu_data->hop_count = HOP_COUNT_DEFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
/** Decode the NPDU portion of a received message, particularly the NCPI byte.
|
||||
* The Network Layer Protocol Control Information byte is described
|
||||
* The Network Layer Protocol Control Information byte is described
|
||||
* in section 6.2.2 of the BACnet standard.
|
||||
* @param npdu [in] Buffer holding the received NPDU header bytes (must be at least 2)
|
||||
* @param dest [out] Returned with routing destination information if the NPDU
|
||||
* has any and if this points to non-null storage for it.
|
||||
* @param dest [out] Returned with routing destination information if the NPDU
|
||||
* has any and if this points to non-null storage for it.
|
||||
* If dest->net and dest->len are 0 on return, there is no
|
||||
* routing destination information.
|
||||
* @param src [out] Returned with routing source information if the NPDU
|
||||
* has any and if this points to non-null storage for it.
|
||||
* @param src [out] Returned with routing source information if the NPDU
|
||||
* has any and if this points to non-null storage for it.
|
||||
* If src->net and src->len are 0 on return, there is no
|
||||
* routing source information.
|
||||
* This src describes the original source of the message when
|
||||
* it had to be routed to reach this BACnet Device.
|
||||
* @param npdu_data [out] Returns a filled-out structure with information
|
||||
* decoded from the NCPI and other NPDU bytes.
|
||||
* @return On success, returns the number of bytes which were decoded from the
|
||||
* @return On success, returns the number of bytes which were decoded from the
|
||||
* NPDU section; if this is a network layer message, there may be more
|
||||
* bytes left in the NPDU; if not a network msg, the APDU follows.
|
||||
* If 0 or negative, there were problems with the data or arguments.
|
||||
|
||||
Reference in New Issue
Block a user