A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.
Dependencies: mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed
TaskGPS.h
00001 /** 00002 * @file TaskGPS.h 00003 * 00004 * @author Adrian 00005 * @date 30.05.2016 00006 * 00007 */ 00008 #include "uBlox.h " 00009 #include "UBloxGPSMessage.h " 00010 #include "main.h" 00011 #include "Task.h" 00012 00013 #ifndef TASKGPS_H_ 00014 #define TASKGPS_H_ 00015 00016 /** 00017 * @class TaskGPS 00018 * @brief This TaskGPS Class handles the GPS measurement using the uBlox. 00019 * Starting the task using the start() starts the measurement. 00020 * It can be used alongside with other measurement Tasks inside the mbed::rtos 00021 * environment. The Task Class basically wraps mbeds Thread functionality. 00022 */ 00023 class TaskGPS : public Task { 00024 public: 00025 TaskGPS(uBlox*,Mutex*, Queue<UBloxGPSMessage,GPS_QUEUE_LENGHT>*); 00026 TaskGPS(uBlox*,Mutex*,Queue<UBloxGPSMessage,GPS_QUEUE_LENGHT>*, 00027 osPriority, uint32_t, unsigned char*); 00028 virtual ~TaskGPS(); 00029 00030 private: 00031 rtos::Queue<UBloxGPSMessage,GPS_QUEUE_LENGHT>* queue; 00032 uBlox* mUBlox; 00033 uBLOX_MODE uBloxMode; 00034 00035 00036 /** 00037 * @brief A thread safe method that acquires GPS values. After acquiring GPS Data 00038 * it stores the data inside a uBLoxGPSMessage 00039 */ 00040 void measure(); 00041 00042 /** 00043 * @brief Sets the message Queue of the Task where the acquired data will be stored 00044 * after the acquisition 00045 * @param queueGps the queue where the MPU9250AccelerationMessage will be stored 00046 */ 00047 void setQueue(Queue<UBloxGPSMessage,GPS_QUEUE_LENGHT>* queueGps); 00048 00049 }; 00050 00051 #endif /* TASKGPS_H_ */
Generated on Tue Jul 12 2022 21:35:27 by 1.7.2