Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test20.h@3:28336c2e94e4, 2012-08-23 (annotated)
- Committer:
- ashleymills
- Date:
- Thu Aug 23 13:32:32 2012 +0000
- Revision:
- 3:28336c2e94e4
- Child:
- 4:1f8e079924ba
Added multiple tests
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ashleymills | 3:28336c2e94e4 | 1 | #pragma once |
ashleymills | 3:28336c2e94e4 | 2 | #include "VodafoneTestCase.h" |
ashleymills | 3:28336c2e94e4 | 3 | class Test20 : public VodafoneTestCase { |
ashleymills | 3:28336c2e94e4 | 4 | public: |
ashleymills | 3:28336c2e94e4 | 5 | Test20(VodafoneUSBModem *m) : VodafoneTestCase(m) { |
ashleymills | 3:28336c2e94e4 | 6 | } |
ashleymills | 3:28336c2e94e4 | 7 | |
ashleymills | 3:28336c2e94e4 | 8 | virtual bool runTest() { |
ashleymills | 3:28336c2e94e4 | 9 | _lastRunTime = time(NULL); |
ashleymills | 3:28336c2e94e4 | 10 | LOG("Sending USSD, waiting for response."); |
ashleymills | 3:28336c2e94e4 | 11 | char ussdResponse[64]; |
ashleymills | 3:28336c2e94e4 | 12 | if(_modem->sendUSSD("*#100#",ussdResponse,64)!=0) { |
ashleymills | 3:28336c2e94e4 | 13 | LOG("Error sending USSD"); |
ashleymills | 3:28336c2e94e4 | 14 | _lastRunOutcome = false; |
ashleymills | 3:28336c2e94e4 | 15 | |
ashleymills | 3:28336c2e94e4 | 16 | return false; |
ashleymills | 3:28336c2e94e4 | 17 | } |
ashleymills | 3:28336c2e94e4 | 18 | |
ashleymills | 3:28336c2e94e4 | 19 | LOG("Received USSD response: \"%s\"",ussdResponse); |
ashleymills | 3:28336c2e94e4 | 20 | _lastRunOutcome = true; |
ashleymills | 3:28336c2e94e4 | 21 | return true; |
ashleymills | 3:28336c2e94e4 | 22 | } |
ashleymills | 3:28336c2e94e4 | 23 | }; |