Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test20.h@17:28443b768f1c, 2012-08-30 (annotated)
- Committer:
- nherriot
- Date:
- Thu Aug 30 14:14:39 2012 +0000
- Revision:
- 17:28443b768f1c
- Parent:
- 14:d7bf58146337
- Parent:
- 16:c89d426c6175
merging log text
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: |
nherriot | 13:8b69853966f8 | 5 | Test20(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) { |
ashleymills | 3:28336c2e94e4 | 6 | } |
ashleymills | 8:6c30647f75d7 | 7 | |
ashleymills | 8:6c30647f75d7 | 8 | virtual void setupTest() { |
ashleymills | 8:6c30647f75d7 | 9 | _ussdResponse = (char*)malloc(16*sizeof(char)); |
ashleymills | 8:6c30647f75d7 | 10 | } |
ashleymills | 3:28336c2e94e4 | 11 | |
ashleymills | 3:28336c2e94e4 | 12 | virtual bool runTest() { |
nherriot | 17:28443b768f1c | 13 | |
nherriot | 17:28443b768f1c | 14 | LOG("Test %d trying out USSD communication sending *#100#", _testCaseNumber); |
ashleymills | 4:1f8e079924ba | 15 | |
ashleymills | 8:6c30647f75d7 | 16 | if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) { |
ashleymills | 3:28336c2e94e4 | 17 | LOG("Error sending USSD"); |
ashleymills | 3:28336c2e94e4 | 18 | return false; |
ashleymills | 3:28336c2e94e4 | 19 | } |
ashleymills | 3:28336c2e94e4 | 20 | |
ashleymills | 8:6c30647f75d7 | 21 | LOG("Received USSD response: \"%s\"",_ussdResponse); |
ashleymills | 3:28336c2e94e4 | 22 | return true; |
ashleymills | 3:28336c2e94e4 | 23 | } |
ashleymills | 8:6c30647f75d7 | 24 | |
ashleymills | 8:6c30647f75d7 | 25 | virtual void endTest() { |
ashleymills | 8:6c30647f75d7 | 26 | free(_ussdResponse); |
ashleymills | 8:6c30647f75d7 | 27 | } |
ashleymills | 8:6c30647f75d7 | 28 | |
ashleymills | 8:6c30647f75d7 | 29 | private: |
ashleymills | 8:6c30647f75d7 | 30 | char *_ussdResponse; |
ashleymills | 8:6c30647f75d7 | 31 | }; |