Routing functionality complete, and working. (Have not done extensive testing, though.)

For building, made it possible to include or exclude the routing functionality with simple changes in the main Makefile and enables in lib/Makefile and include/config.h
The Device object (device.c and .h) was extended to support the virtually routed Devices, with most of the new functions in new file gw_device.c to replace their simpler cousins in device.c.
This commit is contained in:
tbrennan3
2010-10-13 15:59:39 +00:00
parent f934f8add8
commit 48411b8dbf
12 changed files with 754 additions and 46 deletions
+10 -2
View File
@@ -53,7 +53,15 @@ static uint8_t Rx_Buf[MAX_MPDU] = { 0 };
/* target address */
static BACNET_ADDRESS Target_Router_Address;
static BACNET_ROUTER_PORT *Target_Router_Port_List;
/* static BACNET_ROUTER_PORT *Target_Router_Port_List; */
#define VIRTUAL_DNET 2709 /* your choice of number here */
/** The list of DNETs that our router can reach.
* Only one entry since we don't support downstream routers.
*/
int DNET_list[2] = {
VIRTUAL_DNET, -1 /* Need -1 terminator */
};
static bool Error_Detected = false;
@@ -319,7 +327,7 @@ int main(
timeout_seconds = apdu_timeout() / 1000;
/* send the request */
Send_Initialize_Routing_Table(&Target_Router_Address,
Target_Router_Port_List);
DNET_list);
/* loop forever */
for (;;) {
/* increment timer - exit if timed out */