Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Mon Sep 17 13:28:39 2012 +0000
Revision:
44:6d0ac4747f5b
Parent:
43:6db6a72d722b
Child:
60:7efce4a3c26f
Refactored names. Privatised virtuals to avoid bugs (bitten).

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 33:16126e029d58 9 Test21(VodafoneUSBModem *m) : VodafoneTestCase(m) {
ashleymills 33:16126e029d58 10 _description = gTest21Description;
ashleymills 33:16126e029d58 11 _testCaseNumber = 21;
ashleymills 3:28336c2e94e4 12 }
ashleymills 8:6c30647f75d7 13
ashleymills 44:6d0ac4747f5b 14 private:
ashleymills 44:6d0ac4747f5b 15
ashleymills 8:6c30647f75d7 16 virtual void setupTest() {
ashleymills 8:6c30647f75d7 17 _ussdResponse = (char*)malloc(16*sizeof(char));
ashleymills 8:6c30647f75d7 18 }
ashleymills 3:28336c2e94e4 19
ashleymills 44:6d0ac4747f5b 20 virtual bool executeTest() {
ashleymills 37:847f5f86e9ff 21 LOG(_description);
ashleymills 4:1f8e079924ba 22
ashleymills 8:6c30647f75d7 23 if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) {
ashleymills 3:28336c2e94e4 24 LOG("Error sending USSD");
ashleymills 3:28336c2e94e4 25 return false;
ashleymills 3:28336c2e94e4 26 }
ashleymills 3:28336c2e94e4 27
ashleymills 8:6c30647f75d7 28 LOG("Received USSD response: \"%s\"",_ussdResponse);
ashleymills 3:28336c2e94e4 29 return true;
ashleymills 3:28336c2e94e4 30 }
ashleymills 8:6c30647f75d7 31
ashleymills 8:6c30647f75d7 32 virtual void endTest() {
ashleymills 8:6c30647f75d7 33 free(_ussdResponse);
ashleymills 8:6c30647f75d7 34 }
ashleymills 8:6c30647f75d7 35
ashleymills 8:6c30647f75d7 36 char *_ussdResponse;
ashleymills 8:6c30647f75d7 37 };