Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test20.h
- Committer:
- ashleymills
- Date:
- 2012-08-24
- Revision:
- 8:6c30647f75d7
- Parent:
- 4:1f8e079924ba
- Child:
- 13:8b69853966f8
File content as of revision 8:6c30647f75d7:
#pragma once #include "VodafoneTestCase.h" class Test20 : public VodafoneTestCase { public: Test20(VodafoneUSBModem *m) : VodafoneTestCase(m) { } virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } virtual bool runTest() { LOG("Sending USSD, waiting for response."); if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) { LOG("Error sending USSD"); return false; } LOG("Received USSD response: \"%s\"",_ussdResponse); return true; } virtual void endTest() { free(_ussdResponse); } private: char *_ussdResponse; };