Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
io/GPSTracker.h
- Committer:
- vwochnik
- Date:
- 2014-10-30
- Revision:
- 65:a62dbef2f924
- Parent:
- GPSTracker.h@ 47:89ae46d5c466
- Child:
- 99:e369fc75c000
File content as of revision 65:a62dbef2f924:
#ifndef GPSTRACKER_H #define GPSTRACKER_H #include <stddef.h> #include "GPS.h" #include "rtos.h" /** * A GPS tracker class providing access to the current position. */ class GPSTracker { public: /** * Initialize a new GPSTracker object. * @param gps a previously initialized instance of the GPSI2C class */ GPSTracker(GPSI2C&); typedef struct { double altitude; // altitude meters double latitude; // latitude degrees double longitude; // longitude degrees } Position; /** * Retrieves and invalidates the current position. * @param position a pointer of type Position where the current position is written to * @return true on success, false otherwise */ bool position(Position*); protected: void thread(); static void thread_func(void const*); private: GPSI2C _gps; Thread _thread; Mutex _mutex; Position _position; bool _positionSet; }; #endif