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

MPU9250AccelerationMessage.h

Go to the documentation of this file.
00001 /**
00002  * @file MPU9250AccelerationMessage.h
00003  *
00004  * @author Adrian
00005  * @date 01.06.2016
00006  *
00007  */
00008 
00009 #ifndef MPU9250ACCELERATIONMESSAGE_H_
00010 #define MPU9250ACCELERATIONMESSAGE_H_
00011 #include <stdio.h>
00012 #include <string>
00013 #include <vector>
00014 #include "SensorMessage.h "
00015 
00016 /**
00017  * @class MPU9250AccelerationMessage
00018  * @brief A Container that can hold acquired acceleration values from the MPU9250. The container will be
00019  * transported via a MessageQueue between different Tasks.
00020  */
00021 class MPU9250AccelerationMessage: public SensorMessage {
00022 public:
00023     MPU9250AccelerationMessage();
00024     virtual ~MPU9250AccelerationMessage();
00025 
00026     /**
00027      * Sets the x-axis acceleration value of the MPU9250AccelerationMessage
00028      * @param xAcceleration x-axis acceleration to be stored
00029      */
00030     void setXAcceleration(float xAcceleration);
00031 
00032     /**
00033      * Sets the y-axis acceleration value of the MPU9250AccelerationMessage
00034      * @param yAcceleration y-axis acceleration to be stored
00035      */
00036     void setYAcceleration(float yAcceleration);
00037 
00038     /**
00039      * Sets the z-axis acceleration value of the MPU9250AccelerationMessage
00040      * @param zAcceleration
00041      */
00042     void setZAcceleration(float zAcceleration);
00043 
00044 
00045     /**
00046      * Gets the x-axis acceleration value from the MPU9250AccelerationMessage
00047      * @return
00048      */
00049     float getXAcceleration();
00050 
00051     /**
00052      * Gets the y-axis acceleration value from the MPU9250AccelerationMessage
00053      * @return
00054      */
00055     float getYAcceleration();
00056 
00057     /**
00058      * Gets the z-axis acceleration value from the MPU9250AccelerationMessage
00059      * @return
00060      */
00061     float getZAcceleration();
00062 
00063     /**
00064      * Gets a small LoRaMessage Type Formated String from the  MPU9250AccelerationMessage.
00065      * This String can later be used for transportation via LoRa
00066      * @return
00067      */
00068     virtual char* getLoRaMessageString();
00069 
00070 private:
00071 
00072     std::string loraMessage;
00073     std::vector<std::string> loraMessageId;
00074 
00075     float xAcceleration;
00076     float yAcceleration;
00077     float zAcceleration;
00078 
00079 };
00080 
00081 #endif /* MPU9250ACCELERATIONMESSAGE_H_ */