1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
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 {
|
---|
20 | namespace core {
|
---|
21 | class FrameworkManager;
|
---|
22 | class SerialPort;
|
---|
23 | }
|
---|
24 | }
|
---|
25 |
|
---|
26 | class Gx3_25_imu_impl;
|
---|
27 |
|
---|
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;
|
---|
36 |
|
---|
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 */
|
---|
46 | };
|
---|
47 |
|
---|
48 | /*!
|
---|
49 | * \brief Constructor
|
---|
50 | *
|
---|
51 | * Construct a Gx3_25_imu.
|
---|
52 | *
|
---|
53 | * \param parent parent
|
---|
54 | * \param name name
|
---|
55 | * \param serialport SerialPort
|
---|
56 | * \param command command for continuous mode
|
---|
57 | * \param priority priority of the Thread
|
---|
58 | */
|
---|
59 | Gx3_25_imu(const core::FrameworkManager *parent, std::string name,
|
---|
60 | core::SerialPort *serialport, Command_t command, uint8_t priority);
|
---|
61 |
|
---|
62 | /*!
|
---|
63 | * \brief Destructor
|
---|
64 | *
|
---|
65 | */
|
---|
66 | ~Gx3_25_imu();
|
---|
67 |
|
---|
68 | private:
|
---|
69 | /*!
|
---|
70 | * \brief Run function
|
---|
71 | *
|
---|
72 | * Reimplemented from Thread.
|
---|
73 | *
|
---|
74 | */
|
---|
75 | void Run(void);
|
---|
76 |
|
---|
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){};
|
---|
85 |
|
---|
86 | class Gx3_25_imu_impl *pimpl_;
|
---|
87 | };
|
---|
88 | } // end namespace sensor
|
---|
89 | } // end namespace flair
|
---|
90 |
|
---|
91 | #endif // GX3_25_IMU_H
|
---|