Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

measurement/Location.h

Committer:
xinlei
Date:
2016-08-08
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108

File content as of revision 138:f8ab852e83e7:

#ifndef LOCATION_H
#define LOCATION_H
#include "mbed.h"
#include "GPSTracker.h"
#include "AbstractReporter.h"


class Location: public AbstractReporter
{
public:
        Location(): gpsTracker(), timer() {
                oldValues[0] = 0;
                oldValues[1] = 0;
                oldValues[2] = 0;
                timer.start();
        }
        virtual ~Location() {}
        virtual bool init() { return true; }
        virtual const char* name() const { return "GPS"; }
        virtual int read(char*, size_t, char*, size_t);
private:
        GPSTracker gpsTracker;
        float oldValues[3];
        Timer timer;
};

#endif /* LOCATION_H */