Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Test06.h Source File

Test06.h

00001 #pragma once
00002 #include "VodafoneTestCase.h"
00003 
00004 extern const char* gTest06Description;
00005 //const int gTest06Depends[] = {};
00006 
00007 class Test06 : public VodafoneTestCase {
00008    public: 
00009       Test06(VodafoneUSBModem *m) : VodafoneTestCase(m) {}
00010       
00011    private:
00012    
00013       virtual void setupTest() {
00014          _ussdResponse = (char*)malloc(16*sizeof(char));
00015       }
00016    
00017       virtual bool executeTest() {
00018          LOG(gTest06Description);
00019          
00020          if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) {
00021             LOG("Error sending USSD");
00022             return false;
00023          }
00024          
00025          LOG("Received USSD response: \"%s\"",_ussdResponse);
00026          return true;
00027       }
00028       
00029       virtual void endTest() {
00030          free(_ussdResponse);
00031       }
00032       
00033       char *_ussdResponse;
00034 };