Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test21.h
- Committer:
- ashleymills
- Date:
- 2012-09-17
- Revision:
- 44:6d0ac4747f5b
- Parent:
- 43:6db6a72d722b
- Child:
- 60:7efce4a3c26f
File content as of revision 44:6d0ac4747f5b:
#pragma once #include "VodafoneTestCase.h" extern const char* gTest21Description; //const int gTest21Depends[] = {}; class Test21 : public VodafoneTestCase { public: Test21(VodafoneUSBModem *m) : VodafoneTestCase(m) { _description = gTest21Description; _testCaseNumber = 21; } private: virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } virtual bool executeTest() { LOG(_description); 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); } char *_ussdResponse; };