ThingPlug Test
Dependents: WizFi310_ThingPlug_Test WizFi310_ThingPlug_Test_P
Fork of WizFi310Interface by
Diff: WizFi310Interface.cpp
- Revision:
- 9:90902218e268
- Parent:
- 8:08588dd2a66f
- Child:
- 10:ea405bb59143
diff -r 08588dd2a66f -r 90902218e268 WizFi310Interface.cpp --- a/WizFi310Interface.cpp Mon Aug 28 05:19:48 2017 +0000 +++ b/WizFi310Interface.cpp Thu Oct 19 04:34:44 2017 +0000 @@ -108,24 +108,42 @@ int WizFi310Interface::recvTP(const char *commandName, int executeStatus, int executeResult) { - int cid = 0; + int cnt, cid = 0, ret = 0; char buffer[1024] = ""; - + if(_wizfi310.recv(cid, buffer, sizeof(buffer))) { //printf("%s\r\n", buffer); - + if(_wizfi310.cmdSKTPRESULT(commandName, executeStatus, executeResult)) { _wizfi310.initCon(cid, true); return -1; } + + for(cnt = 0; cnt < sizeof(buffer); cnt++) + { + if( buffer[cnt] == '8' ) + { + if( buffer[cnt + 1] == '0' ) + { + WIZ_INFO("1!!/r/n/r/n"); + ret = 1; + } + + else if( buffer[cnt + 1] == '1' ) + { + WIZ_INFO("2!!/r/n/r/n"); + ret = 2; + } + } + } WIZ_INFO("Complete/r/n/r/n"); _wizfi310.initCon(cid, true); - return 0; + return ret; } WIZ_INFO("Incorrect Request\r\n");