![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
UDPversion
Dependencies: XBee mbed NetServicesMin
Diff: common/data_models.cpp
- Revision:
- 1:3a46d2725374
- Parent:
- 0:84a3b029656e
diff -r 84a3b029656e -r 3a46d2725374 common/data_models.cpp --- a/common/data_models.cpp Sat Apr 14 03:53:45 2012 +0000 +++ b/common/data_models.cpp Sun Apr 15 10:49:08 2012 +0000 @@ -3,6 +3,8 @@ #include "EthernetNetIf.h" extern Serial pc; + + void initPayload(Payload *_payload) { _payload->size=sizeof(Payload); @@ -175,4 +177,35 @@ } pc.printf("\r\n"); +} + +void dumpPrefSender(PrefSender *prf) +{ + pc.printf("current frame number:%d\n",prf->currentFrameNumber); + pc.printf("gainData gain:%d\n",prf->gainData.gain); + pc.printf("gainData middleLevel:%d\n",prf->gainData.middleLevel); + pc.printf("lightsw:%d\n",prf->lightsw); + pc.printf("continueusMode:%d\n",prf->continueusMode); + pc.printf("isSend:%d\n",prf->isSend); + pc.printf("xbeeAdress:%X\n",prf->xbeeAdress); + +} +void dumpPrefReciever(PrefReciever *prf) +{ + + pc.printf("xbeeAdress:%X\n",prf->xbeeAdress); + +} +void dumpPrefServer(PrefServer *prf) +{ + pc.printf("xbeeAdress:%X\n",prf->xbeeAdress); + pc.printf("server ip:%d.%d.%d.%d\n",prf->serverAddress[0],prf->serverAddress[1],prf->serverAddress[2],prf->serverAddress[3]); + pc.printf("subnet ip:%d.%d.%d.%d\n",prf->subnetMask[0],prf->subnetMask[1],prf->subnetMask[2],prf->subnetMask[3]); + pc.printf("router ip:%d.%d.%d.%d\n",prf->routerAddress[0],prf->routerAddress[1],prf->routerAddress[2],prf->routerAddress[3]); + + pc.printf("Server Port:%d\n",prf->serverPort); + + pc.printf("Destination ip:%d.%d.%d.%d\n",prf->destinationAddress[0],prf->destinationAddress[1],prf->destinationAddress[2],prf->destinationAddress[3]); + pc.printf("Destination Port:%d\n",prf->destinationPort); + } \ No newline at end of file