Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test16.h
- Committer:
- nherriot
- Date:
- 2012-09-10
- Revision:
- 28:c630a04a7198
- Child:
- 29:c0e6f198db84
File content as of revision 28:c630a04a7198:
#pragma once #include "VodafoneTestCase.h" //#define __DEBUG__ 1 // this test case will wait to send an SMS from the modem. // if the method that sends a message returns an error it will fail. // it will report the test as failed if any of the above happens. // it does not wait after it has succesfully sent an SMS. class Test16 : public VodafoneTestCase { public: Test16(VodafoneUSBModem *m, int tcNumber) : VodafoneTestCase(m, tcNumber) { } virtual bool runTest() { LOG("Creating GSM test buffer"); LOG("Test %d sending an SMS message...", _testCaseNumber); LOG("Sending SMS:' %s ' to test phone: %s , waiting for response.", testMessage, testPhoneNumber); int ret = _modem->sendSM(testPhoneNumber, testMessage); if (ret) { LOG("Error in sending the SMS message. The return values is: %d", ret); switch(ret){ case(NET_INVALID): LOG("Error message is: 'phone number is invalid size, must be less than 16 digits'.");break; case(NET_PROTOCOL): LOG("Error message is: 'protocol error from the modem'.");break; default: LOG("Undefined error message."); } return false; } LOG("Test %d passed...", _testCaseNumber); return true; } private: char gsm03dot38CharacterSet[127]; };