Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Tue Oct 23 14:22:53 2012 +0000
Revision:
60:7efce4a3c26f
Parent:
44:6d0ac4747f5b
Added new SMS bulk test (incomplete).

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ashleymills 3:28336c2e94e4 1 #pragma once
ashleymills 3:28336c2e94e4 2 #include "VodafoneTestCase.h"
ashleymills 25:55b865c41f21 3
ashleymills 37:847f5f86e9ff 4 extern const char* gTest21Description;
ashleymills 27:0297dbc3252b 5 //const int gTest21Depends[] = {};
ashleymills 25:55b865c41f21 6
ashleymills 19:26fbed33d4e7 7 class Test21 : public VodafoneTestCase {
ashleymills 3:28336c2e94e4 8 public:
ashleymills 60:7efce4a3c26f 9 Test21(VodafoneUSBModem *m) : VodafoneTestCase(m) {}
ashleymills 8:6c30647f75d7 10
ashleymills 44:6d0ac4747f5b 11 private:
ashleymills 44:6d0ac4747f5b 12
ashleymills 8:6c30647f75d7 13 virtual void setupTest() {
ashleymills 8:6c30647f75d7 14 _ussdResponse = (char*)malloc(16*sizeof(char));
ashleymills 8:6c30647f75d7 15 }
ashleymills 3:28336c2e94e4 16
ashleymills 44:6d0ac4747f5b 17 virtual bool executeTest() {
ashleymills 60:7efce4a3c26f 18 LOG(gTest21Description);
ashleymills 4:1f8e079924ba 19
ashleymills 8:6c30647f75d7 20 if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) {
ashleymills 3:28336c2e94e4 21 LOG("Error sending USSD");
ashleymills 3:28336c2e94e4 22 return false;
ashleymills 3:28336c2e94e4 23 }
ashleymills 3:28336c2e94e4 24
ashleymills 8:6c30647f75d7 25 LOG("Received USSD response: \"%s\"",_ussdResponse);
ashleymills 3:28336c2e94e4 26 return true;
ashleymills 3:28336c2e94e4 27 }
ashleymills 8:6c30647f75d7 28
ashleymills 8:6c30647f75d7 29 virtual void endTest() {
ashleymills 8:6c30647f75d7 30 free(_ussdResponse);
ashleymills 8:6c30647f75d7 31 }
ashleymills 8:6c30647f75d7 32
ashleymills 8:6c30647f75d7 33 char *_ussdResponse;
ashleymills 8:6c30647f75d7 34 };