Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
19:26fbed33d4e7
Parent:
17:28443b768f1c
Child:
25:55b865c41f21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Tests/Test21.h	Mon Sep 03 16:02:58 2012 +0000
@@ -0,0 +1,31 @@
+#pragma once
+#include "VodafoneTestCase.h"
+class Test21 : public VodafoneTestCase {
+   public: 
+      Test21(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) {
+      }
+      
+      virtual void setupTest() {
+         _ussdResponse = (char*)malloc(16*sizeof(char));
+      }
+   
+      virtual bool runTest() {
+
+         LOG("Test %d trying out USSD communication sending *#100#", _testCaseNumber);
+         
+         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;
+};