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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TaskLoRaMeasurement.h Source File

TaskLoRaMeasurement.h

Go to the documentation of this file.
00001 /**
00002  * @file TaskLoRaMeasurement.h
00003  *
00004  * @author Adrian
00005  * @date 13.06.2016
00006  */
00007 
00008 #include <Thread.h>
00009 #include <Queue.h>
00010 #include <Mutex.h>
00011 #include "LoRa.h "
00012 #include "LoRaMeasuermentMessage.h "
00013 #include "main.h"
00014 #include "Task.h"
00015 
00016 #ifndef APP_TASKLORAMEASUREMENT_H_
00017 #define APP_TASKLORAMEASUREMENT_H_
00018 
00019 /**
00020  * @class
00021  */
00022 class TaskLoRaMeasurement : public Task {
00023 public:
00024     TaskLoRaMeasurement(LoRa*,Mutex*, Queue<LoRaMeasurementMessage,LORA_MEASUREMENT_QUEUE_LENGHT>*);
00025     TaskLoRaMeasurement(LoRa*,Mutex*,Queue<LoRaMeasurementMessage,LORA_MEASUREMENT_QUEUE_LENGHT>*,
00026             osPriority, uint32_t, unsigned char*);
00027     virtual ~TaskLoRaMeasurement();
00028 
00029 private:
00030     rtos::Queue<LoRaMeasurementMessage,LORA_MEASUREMENT_QUEUE_LENGHT>* queue;
00031     LoRa* lora;
00032 
00033 
00034     void measure();
00035 
00036     /**
00037      * @brief Sets the message Queue of the Task where the measured values will be stored
00038      * after the measurement
00039      * @param queueSingal the queue where the LoRa Signal strength will be stored
00040      */
00041     void setQueue(Queue<LoRaMeasurementMessage,LORA_MEASUREMENT_QUEUE_LENGHT>*);
00042 
00043 };
00044 
00045 #endif /* APP_TASKLORAMEASUREMENT_H_ */