Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test21.h
- Committer:
- ashleymills
- Date:
- 2012-09-06
- Revision:
- 26:9eefab9e28df
- Parent:
- 25:55b865c41f21
- Child:
- 27:0297dbc3252b
File content as of revision 26:9eefab9e28df:
#pragma once #include "VodafoneTestCase.h" static const char* gTest21Description = "Trying out USSD communication sending *#100#\0"; const int gTest21Depends[] = {}; class Test21 : public VodafoneTestCase { public: Test21(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) { } virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } virtual bool runTest() { LOG(gTest21Description); 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; };