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

SI1143ProximityMessage.h

Go to the documentation of this file.
00001 /**
00002  * @file SI1143ProximityMessage.h
00003  *
00004  * @author Adrian
00005  * @date 02.06.2016
00006  *
00007  */
00008 #include <stdio.h>
00009 #include <string>
00010 #include <vector>
00011 #include <stdint.h>
00012 #include "SensorMessage.h "
00013 
00014 #ifndef APP_SI1143MESSAGE_H_
00015 #define APP_SI1143MESSAGE_H_
00016 
00017 /**
00018  * @class SI1143ProximityMessage
00019  * @brief A Container that can hold acquired proximity values from the SI1143. The container will be
00020  * transported via a MessageQueue between different Tasks.
00021  */
00022 class SI1143ProximityMessage: public SensorMessage {
00023 public:
00024     SI1143ProximityMessage();
00025     virtual ~SI1143ProximityMessage();
00026 
00027     /**
00028      * Sets the proximity value of the SI1143ProximityMessage
00029      * @param proximity proximity value to be stored
00030      */
00031     void setProximity(uint16_t proximity);
00032 
00033     /**
00034      * Gets the proximity value from the SI1143ProximityMessage
00035      * @return
00036      */
00037     uint16_t getProximity();
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     uint16_t proximity;
00052 };
00053 
00054 #endif /* APP_SI1143MESSAGE_H_ */