[4] | 1 | // %flair:license{
|
---|
[13] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[4] | 4 | // %flair:license}
|
---|
| 5 | /*!
|
---|
| 6 | * \file Gx3_25_imu.h
|
---|
| 7 | * \brief Class for 3dmgx3-25 Imu
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2011/08/19
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef GX3_25_IMU_H
|
---|
| 14 | #define GX3_25_IMU_H
|
---|
| 15 |
|
---|
| 16 | #include <Imu.h>
|
---|
| 17 | #include <Thread.h>
|
---|
| 18 |
|
---|
| 19 | namespace flair {
|
---|
[13] | 20 | namespace core {
|
---|
| 21 | class FrameworkManager;
|
---|
| 22 | class SerialPort;
|
---|
[4] | 23 | }
|
---|
[13] | 24 | }
|
---|
[4] | 25 |
|
---|
| 26 | class Gx3_25_imu_impl;
|
---|
| 27 |
|
---|
[13] | 28 | namespace flair {
|
---|
| 29 | namespace sensor {
|
---|
| 30 | /*! \class Gx3_25_imu
|
---|
| 31 | *
|
---|
| 32 | * \brief Class for 3dmgx3-25 Imu
|
---|
| 33 | */
|
---|
| 34 | class Gx3_25_imu : public Imu, public core::Thread {
|
---|
| 35 | friend class ::Gx3_25_imu_impl;
|
---|
[4] | 36 |
|
---|
[13] | 37 | public:
|
---|
| 38 | /*!
|
---|
| 39 | \enum Command_t
|
---|
| 40 | \brief Command for the continuous mode
|
---|
| 41 | */
|
---|
| 42 | enum Command_t {
|
---|
| 43 | EulerAnglesAndAngularRates = 0xcf, /*!< Euler angles and angular rates */
|
---|
| 44 | AccelerationAngularRateAndOrientationMatrix =
|
---|
| 45 | 0xc8, /*!< Acceleration, angular rate and orientation matrix */
|
---|
[36] | 46 | Quaternion = 0xdf, /*!< Quaternion */
|
---|
[13] | 47 | };
|
---|
[4] | 48 |
|
---|
[13] | 49 | /*!
|
---|
| 50 | * \brief Constructor
|
---|
| 51 | *
|
---|
[50] | 52 | * Construct a Gx3_25_imu. It will be child of the FrameworkManager.
|
---|
[13] | 53 | *
|
---|
| 54 | * \param name name
|
---|
| 55 | * \param serialport SerialPort
|
---|
| 56 | * \param command command for continuous mode
|
---|
| 57 | * \param priority priority of the Thread
|
---|
| 58 | */
|
---|
[50] | 59 | Gx3_25_imu(std::string name,
|
---|
[13] | 60 | core::SerialPort *serialport, Command_t command, uint8_t priority);
|
---|
[4] | 61 |
|
---|
[13] | 62 | /*!
|
---|
| 63 | * \brief Destructor
|
---|
| 64 | *
|
---|
| 65 | */
|
---|
| 66 | ~Gx3_25_imu();
|
---|
[4] | 67 |
|
---|
[13] | 68 | private:
|
---|
| 69 | /*!
|
---|
| 70 | * \brief Run function
|
---|
| 71 | *
|
---|
| 72 | * Reimplemented from Thread.
|
---|
| 73 | *
|
---|
| 74 | */
|
---|
| 75 | void Run(void);
|
---|
[4] | 76 |
|
---|
[13] | 77 | /*!
|
---|
| 78 | * \brief Update using provided datas
|
---|
| 79 | *
|
---|
| 80 | * Reimplemented from IODevice.
|
---|
| 81 | *
|
---|
| 82 | * \param data data from the parent to process
|
---|
| 83 | */
|
---|
| 84 | void UpdateFrom(const core::io_data *data){};
|
---|
[4] | 85 |
|
---|
[13] | 86 | class Gx3_25_imu_impl *pimpl_;
|
---|
| 87 | };
|
---|
[4] | 88 | } // end namespace sensor
|
---|
| 89 | } // end namespace flair
|
---|
| 90 |
|
---|
| 91 | #endif // GX3_25_IMU_H
|
---|