Using MQTT on Dragonfly

Dependencies:   MQTT mbed mtsas

MTSCellularManager.hpp

Committer:
miaotwilio
Date:
2017-09-14
Revision:
8:f8a346582627
Parent:
4:f4e8f0fca631

File content as of revision 8:f8a346582627:

#ifndef MTS_CELLULAR_MANAGE_HPP
#define MTS_CELLULAR_MANAGE_HPP

#include <mbed.h>
#include <mtsas.h>

class MTSCellularManager {
public:
    MTSCellularManager(const char* apn_);

    ~MTSCellularManager();

    bool init();

    void uninit();

    struct GPSStatus {
        bool success;
        int fix;
        float speedVal; // mph
        double longitudeVal;
        double latitudeVal;
    };

    void enableGps();

    GPSStatus gpsPollStatus();

private:
    // An APN is required for GSM radios.
    const char* apn;
    // The MTSSerialFlowControl object represents the physical serial link between the processor and the cellular radio.
    mts::MTSSerialFlowControl* io;
    // The Cellular object represents the cellular radio.
    mts::Cellular* radio;
    mts::Cellular* radio2;
};

#endif