Adrian Mitevski / Mbed 2 deprecated mDot_LoRa_Sensornode

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TaskTemperature.h Source File

TaskTemperature.h

Go to the documentation of this file.
00001 /**
00002  * @file TaskTemperature.h
00003  *
00004  * @author Adrian
00005  * @date 30.05.2016
00006  *
00007  */
00008 
00009 #include "BME280.h"
00010 #include "BME280TemperatureMessage.h "
00011 #include "main.h"
00012 #include "Task.h"
00013 
00014 #ifndef TASKTEMPERATURE_H_
00015 #define TASKTEMPERATURE_H_
00016 
00017 /**
00018  * @class TaskTemperature
00019  * @brief This TaskTemperature Class handles the temperature measurement using the BME280.
00020  * Starting the task using the start() starts the measurement of all axis.
00021  * It can be used alongside with other measurement Tasks inside the mbed::rtos
00022  * environment. The Task Class basically wraps mbeds Thread functionality.
00023  */
00024 class TaskTemperature : public Task {
00025 public:
00026     TaskTemperature(BME280*,Mutex*, Queue<BME280TemperatureMessage,TEMPERATURE_QUEUE_LENGHT>*);
00027     TaskTemperature(BME280*,Mutex*,Queue<BME280TemperatureMessage,TEMPERATURE_QUEUE_LENGHT>*,
00028             osPriority, uint32_t, unsigned char*);
00029     virtual ~TaskTemperature();
00030 
00031 private:
00032     rtos::Queue<BME280TemperatureMessage,TEMPERATURE_QUEUE_LENGHT>* queue;
00033 
00034     BME280* bme280;
00035 
00036     /**
00037      * @brief A thread safe method that measures the temperature. After measuring
00038      * the temperature it stores the data inside a BME280TemperatureMessage
00039      */
00040     void measure();
00041 
00042     /**
00043      * @brief Sets the message Queue of the Task where the measured values will be stored
00044      * after the measurement
00045      * @param queueGyro the queue where the MPU9250GyroscopeMessage will be stored
00046      */
00047     void setQueue(Queue<BME280TemperatureMessage,TEMPERATURE_QUEUE_LENGHT>* queueTemperature);
00048 
00049 };
00050 
00051 #endif /* TASKTEMPERATURE_H_ */