Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Files at this revision

API Documentation at this revision

Comitter:
nherriot
Date:
Thu Aug 23 16:02:34 2012 +0000
Parent:
6:476f6c7b5a1f
Child:
9:3ff68422f4d7
Commit message:
updating Nick's test case 12 for receiving SMS message.....

Changed in this revision

TestManager.cpp Show annotated file Show diff for this revision Revisions of this file
Tests/Test12.h Show annotated file Show diff for this revision Revisions of this file
Tests/Tests.h Show annotated file Show diff for this revision Revisions of this file
--- a/TestManager.cpp	Thu Aug 23 15:45:14 2012 +0000
+++ b/TestManager.cpp	Thu Aug 23 16:02:34 2012 +0000
@@ -2,7 +2,7 @@
 #include "Tests.h"
 TestManager::TestManager(VodafoneUSBModem *m) : _modem(m) { 
    _tests.push_back((VodafoneTestCase*)new Test20(_modem));
-   _tests.push_back((VodafoneTestCase*)new Test50(_modem));
+   _tests.push_back((VodafoneTestCase*)new Test12(_modem));
 }
 
 int TestManager::runAll() {
--- a/Tests/Test12.h	Thu Aug 23 15:45:14 2012 +0000
+++ b/Tests/Test12.h	Thu Aug 23 16:02:34 2012 +0000
@@ -5,7 +5,7 @@
 
 class Test12 : public VodafoneTestCase {
    public: 
-      int test_number = 12;
+
       char num[17];
       char msg[64];
       size_t count;
@@ -18,10 +18,10 @@
          LOG("Receiving SMS from test phone, waiting for response.");
          char smsResponse[64];
       
-         while(TRUE)
+         while(true)
             {
-             LOG("Test %d waiting for an SMS message...", test_number);
-             int ret = _modem.getSMCount(&count);
+             LOG("Test 12 waiting for an SMS message...");
+             int ret = _modem->getSMCount(&count);
              if(ret)
                 {
                     LOG("getSMCount returned %d", ret);
@@ -32,7 +32,7 @@
              if( count > 0)
                 {
                     LOG("%d SMS to read", count);
-                    ret = _modem.getSM(num, msg, 64);
+                    ret = _modem->getSM(num, msg, 64);
                 if(ret)
                     {
                         LOG("Error receiving sms. The method getSMS  returned %d", ret);
--- a/Tests/Tests.h	Thu Aug 23 15:45:14 2012 +0000
+++ b/Tests/Tests.h	Thu Aug 23 16:02:34 2012 +0000
@@ -1,3 +1,4 @@
 #pragma once
+#include "Test12.h"
 #include "Test20.h"
 #include "Test50.h"
\ No newline at end of file