Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test20.h
- Committer:
- nherriot
- Date:
- 2012-08-30
- Revision:
- 16:c89d426c6175
- Parent:
- 13:8b69853966f8
- Child:
- 17:28443b768f1c
File content as of revision 16:c89d426c6175:
#pragma once #include "VodafoneTestCase.h" class Test20 : public VodafoneTestCase { public: Test20(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) { } virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } virtual bool runTest() { LOG("Test %d sending *#100# USSD message...", _testCaseNumber); 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; };