Resolved more code where we didn't need to define separate BAC_ROUTING functionality, since the npdu_encode_pdu() will do the right thing if our source address is for the gateway (root device), because src->net and/or src->len will be 0.

For the important Device_Object_Instance_Number(), will redirect to the Routed_Device_Object_Instance_Number() function if this is a routing build.
This leaves only the Who-Is and Who-Has handlers to be dealt with.
This commit is contained in:
tbrennan3
2010-11-24 22:04:02 +00:00
parent 22c14fccad
commit a595bdb4b5
12 changed files with 30 additions and 100 deletions
+4
View File
@@ -353,7 +353,11 @@ uint32_t Device_Index_To_Instance(
uint32_t Device_Object_Instance_Number(
void)
{
#if BAC_ROUTING
return Routed_Device_Object_Instance_Number();
#else
return Object_Instance_Number;
#endif
}
bool Device_Set_Object_Instance_Number(
+7 -5
View File
@@ -175,6 +175,8 @@ BACNET_ADDRESS * Get_Routed_Device_Address(
return NULL;
}
/** Get the currently active BACnet address.
* This is an implementation of the datalink_get_my_address() template for
* devices with routing.
@@ -459,11 +461,11 @@ bool Routed_Device_Write_Property_Local(
/* methods to manipulate the data */
/** Return the Object Instance number for our (single) Device Object.
* This is a key function, widely invoked by the handler code, since
* it provides "our" (ie, local) address.
* @ingroup ObjIntf
* @return The Instance number used in the BACNET_OBJECT_ID for the Device.
/** Return the Object Instance number for the currently active Device Object.
* This is an overload of the important, widely used
* Device_Object_Instance_Number() function.
*
* @return The Instance number of the currently active Device.
*/
uint32_t Routed_Device_Object_Instance_Number(
void)