A library for talking to Multi-Tech's Cellular SocketModem Devices.

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

tests/test_main.cpp

Committer:
mfiore
Date:
2014-01-02
Revision:
124:6d964b4343c8
Child:
141:571e0ef6c8dc

File content as of revision 124:6d964b4343c8:

#include "mbed.h"
#include "include_me.h"

// uncomment only the header corresponding to the test you want to run
//#include "test_ping.h"
//#include "test_SMS.h"
//#include "test_TCP_Socket.h"
//#include "test_TCP_Socket_Echo.h"
//#include "test_MTS_Circular_Buffer.h"


//int main() {
    // uncomment only one test at a time
    
    // PING TEST
    //testPing();

    /*
    // SMS TEST
    for (int i = 30; i >= 0; i = i - 2) {
        wait(2);
        printf("Waiting %d seconds...\n\r", i);
    }  
    Transport::setTransport(Transport::CELLULAR);
    MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8);
    serial->baud(115200);
    Cellular* cell = Cellular::getInstance();
    cell->init(serial);
    while (cell->getRegistration() != Cellular::REGISTERED);
    while (cell->setApn("wap.cingular") != SUCCESS);
    
    sendSms();
    while (true) {
        receiveSms();
        wait(15);
    }
    */
    
    // TCP SOCKET TEST
    //testTcpSocket();
    
    // TCP SOCKET ECHO TEST
    //testTcpSocketEcho();
    
    // CIRCULAR BUFFER TEST
    //testMTSCircularBuffer();
//}