Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Diff: Tests/Test50.h
- Revision:
- 12:b50d37429dff
- Parent:
- 11:a286d8112b45
- Child:
- 13:8b69853966f8
--- a/Tests/Test50.h Fri Aug 24 10:47:29 2012 +0000 +++ b/Tests/Test50.h Tue Aug 28 15:40:07 2012 +0000 @@ -23,12 +23,14 @@ LOG("Got MSISDN %s",_ownNumber); for(int i=0; i<numIterations; i++) { createRandomString(_smsOut,_smsLen); - LOG("Created: %s",_smsOut); if(_modem->sendSM(_ownNumber,_smsOut)!=0) { LOG("Error sending short message"); } + LOG("Created: %s",_smsOut); bool gotMessage = false; - while(!gotMessage) { + Timer t; + t.start(); + while(!gotMessage && t.read_ms()<25000) { if(_modem->getSMCount(&smCount)!=0) { LOG("Faiure getting SM count"); return false; @@ -48,6 +50,10 @@ } Thread::wait(50); } + if(!gotMessage) { + LOG("FAIL: timeout on waiting for SMS"); + return false; + } } return true;