UDPversion

Dependencies:   XBee mbed NetServicesMin

Revision:
1:3a46d2725374
Parent:
0:84a3b029656e
--- a/xbee/xbee_rec_route.cpp	Sat Apr 14 03:53:45 2012 +0000
+++ b/xbee/xbee_rec_route.cpp	Sun Apr 15 10:49:08 2012 +0000
@@ -8,13 +8,17 @@
 #include "tcp_client.h"
 #include "leds.h"
 
+extern Serial pc;
+
 extern XBee xbee;
 extern ZBRxResponse zbRx;
 
 
 void xbeeRecieveRouting(void)
 {
-
+#ifdef _SERVER_TEST_MODE_
+return;
+#else
      xbeeReadPacket();
     
    
@@ -56,7 +60,7 @@
         //    pc.printf("\r\n");
         }
     
-    
+#endif    
 }
 
 void routing(Payload *_payload)
@@ -68,14 +72,14 @@
         {
         //    _payload->frame.message.command=ACK;
         //    xbeeSend(0x4086B0D5,_payload);
-            DBGF("*******  send!  *******\r\n");
+            DBGF("*******[XBeeRec]  send!  *******\r\n");
         }
         break;
         
         case RECIEVE:
         {
             udpSendPayload(_payload);
-            DBGF("******  recieve!  *******\r\n");
+            DBGF("******[XBeeRec]  recieve!  *******\r\n");
         }
         break;
         
@@ -83,20 +87,26 @@
         {   
             
             udpSendPayload(_payload);
-            DBGF("*******  ping!  **************\r\n");
+            DBGF("*******[XBeeRec]  ping!  **************\r\n");
         }
         break;
         
         case ACK:
         {   
             udpSendPayload(_payload);
-            DBGF("*******  ACK!  **************\r\n");
+            DBGF("*******[XBeeRec]  ACK!  **************\r\n");
         }
         
         case SET_TX_GAIN:
+        {
+            udpSendPayload(_payload);
+            DBGF("*******[XBeeRec]  SET_TX_GAIN!  **************\r\n");
+        }
+        break;
         case SET_LIGHT_CONTROL:
         {
             udpSendPayload(_payload);
+            DBGF("*******[XBeeRec]  SET_LIGHT_CONTROL!  **************\r\n");
         }
         break;
     }