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 MAX44009Message.h Source File

MAX44009Message.h

Go to the documentation of this file.
00001 /**
00002  * @file MAX44009Message.h
00003  *
00004  * @author Adrian
00005  * @date 01.06.2016
00006  *
00007  */
00008 
00009 #ifndef MAX44009MESSAGE_H_
00010 #define MAX44009MESSAGE_H_
00011 
00012 #include <string>
00013 #include <vector>
00014 #include <stdio.h>
00015 #include "SensorMessage.h "
00016 
00017 /**
00018  * @class MAX44009Message
00019  * @brief A Container that can hold acquired lux values from the MAX44009. The container will be
00020  * transported via a MessageQueue between different Tasks.
00021  */
00022 class MAX44009Message:public SensorMessage {
00023 public:
00024     MAX44009Message();
00025     virtual ~MAX44009Message();
00026 
00027     /**
00028      * Sets the lux value of the MAX44009 Message
00029      * @param lux lux value to be stored
00030      */
00031     void setLux(float lux);
00032 
00033     /**
00034      * Gets the lux value from the MAX44009 Message
00035      * @return
00036      */
00037     float getLux();
00038 
00039 
00040     /**
00041      * Gets a small LoRaMessage Type Formated String from the MAX44009Message.
00042      * This String can later be used for transportation via LoRa
00043      * @return
00044      */
00045     virtual char* getLoRaMessageString();
00046 
00047 private:
00048     std::string loraMessage;
00049     std::vector<std::string> loraMessageId;
00050 
00051     float lux;
00052 
00053 };
00054 
00055 #endif /* MAX44009MESSAGE_H_ */