lora sensnode
Dependencies: libmDot mbed-rtos mbed
Fork of mDot_LoRa_Sensornode by
app/MPU9250GyroscopeMessage.h@0:f2815503561f, 2016-07-06 (annotated)
- Committer:
- mitea1
- Date:
- Wed Jul 06 20:40:36 2016 +0000
- Revision:
- 0:f2815503561f
initial commit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mitea1 | 0:f2815503561f | 1 | /** |
mitea1 | 0:f2815503561f | 2 | * @file MPU9250GyroscopeMessage.h |
mitea1 | 0:f2815503561f | 3 | * |
mitea1 | 0:f2815503561f | 4 | * @author Adrian |
mitea1 | 0:f2815503561f | 5 | * @date 01.06.2016 |
mitea1 | 0:f2815503561f | 6 | * |
mitea1 | 0:f2815503561f | 7 | */ |
mitea1 | 0:f2815503561f | 8 | |
mitea1 | 0:f2815503561f | 9 | #ifndef MPU9250GYROSCOPEMESSAGE_H_ |
mitea1 | 0:f2815503561f | 10 | #define MPU9250GYROSCOPEMESSAGE_H_ |
mitea1 | 0:f2815503561f | 11 | #include <stdio.h> |
mitea1 | 0:f2815503561f | 12 | #include <string> |
mitea1 | 0:f2815503561f | 13 | #include <vector> |
mitea1 | 0:f2815503561f | 14 | #include "SensorMessage.h" |
mitea1 | 0:f2815503561f | 15 | |
mitea1 | 0:f2815503561f | 16 | class MPU9250GyroscopeMessage: public SensorMessage { |
mitea1 | 0:f2815503561f | 17 | public: |
mitea1 | 0:f2815503561f | 18 | MPU9250GyroscopeMessage(); |
mitea1 | 0:f2815503561f | 19 | virtual ~MPU9250GyroscopeMessage(); |
mitea1 | 0:f2815503561f | 20 | |
mitea1 | 0:f2815503561f | 21 | /** |
mitea1 | 0:f2815503561f | 22 | * Sets the x-axis gyroscope value of the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 23 | * @param xGyro x-axis Gyroscope value to be stored |
mitea1 | 0:f2815503561f | 24 | */ |
mitea1 | 0:f2815503561f | 25 | void setXGyro(float xGyro); |
mitea1 | 0:f2815503561f | 26 | |
mitea1 | 0:f2815503561f | 27 | /** |
mitea1 | 0:f2815503561f | 28 | * Sets the y-axis gyroscope value of the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 29 | * @param yGyro y-axis Gyroscope value to be stored |
mitea1 | 0:f2815503561f | 30 | */ |
mitea1 | 0:f2815503561f | 31 | void setYGyro(float yGyro); |
mitea1 | 0:f2815503561f | 32 | |
mitea1 | 0:f2815503561f | 33 | /** |
mitea1 | 0:f2815503561f | 34 | * Sets the z-axis gyroscope value of the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 35 | * @param zGyro z-axis Gyroscope value to be stored |
mitea1 | 0:f2815503561f | 36 | */ |
mitea1 | 0:f2815503561f | 37 | void setZGyro(float zGyro); |
mitea1 | 0:f2815503561f | 38 | |
mitea1 | 0:f2815503561f | 39 | |
mitea1 | 0:f2815503561f | 40 | /** |
mitea1 | 0:f2815503561f | 41 | * Gets the x-axis gyroscope value from the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 42 | * @return |
mitea1 | 0:f2815503561f | 43 | */ |
mitea1 | 0:f2815503561f | 44 | float getXGyro(); |
mitea1 | 0:f2815503561f | 45 | |
mitea1 | 0:f2815503561f | 46 | /** |
mitea1 | 0:f2815503561f | 47 | * Gets the y-axis gyroscope value from the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 48 | * @return |
mitea1 | 0:f2815503561f | 49 | */ |
mitea1 | 0:f2815503561f | 50 | float getYGyro(); |
mitea1 | 0:f2815503561f | 51 | |
mitea1 | 0:f2815503561f | 52 | /** |
mitea1 | 0:f2815503561f | 53 | * Gets the z-axis gyroscope value from the MPU9250GyroscopeMessage |
mitea1 | 0:f2815503561f | 54 | * @return |
mitea1 | 0:f2815503561f | 55 | */ |
mitea1 | 0:f2815503561f | 56 | float getZGyro(); |
mitea1 | 0:f2815503561f | 57 | |
mitea1 | 0:f2815503561f | 58 | /** |
mitea1 | 0:f2815503561f | 59 | * Gets a small LoRaMessage Type Formated String from the MPU9250GyroscopeMessage. |
mitea1 | 0:f2815503561f | 60 | * This String can later be used for transportation via LoRa |
mitea1 | 0:f2815503561f | 61 | * @return |
mitea1 | 0:f2815503561f | 62 | */ |
mitea1 | 0:f2815503561f | 63 | virtual char* getLoRaMessageString(); |
mitea1 | 0:f2815503561f | 64 | |
mitea1 | 0:f2815503561f | 65 | private: |
mitea1 | 0:f2815503561f | 66 | std::string loraMessage; |
mitea1 | 0:f2815503561f | 67 | std::vector<std::string> loraMessageId; |
mitea1 | 0:f2815503561f | 68 | |
mitea1 | 0:f2815503561f | 69 | float xGyro; |
mitea1 | 0:f2815503561f | 70 | float yGyro; |
mitea1 | 0:f2815503561f | 71 | float zGyro; |
mitea1 | 0:f2815503561f | 72 | |
mitea1 | 0:f2815503561f | 73 | }; |
mitea1 | 0:f2815503561f | 74 | |
mitea1 | 0:f2815503561f | 75 | |
mitea1 | 0:f2815503561f | 76 | #endif /* MPU9250GYROSCOPEMESSAGE_H_ */ |