source: flair-dev/trunk/include/FlairSensorActuator/SimuImu.h@ 48

Last change on this file since 48 was 32, checked in by Sanahuja Guillaume, 8 years ago

m

File size: 1.8 KB
RevLine 
[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 SimuImu.h
7 * \brief Class for a simulation Imu
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/02/07
10 * \version 4.0
11 */
12
13#ifndef SIMUIMU_H
14#define SIMUIMU_H
15
16#include <Imu.h>
17#include <Thread.h>
18
19namespace flair {
[32]20 namespace core {
21 class SharedMem;
22 class AhrsData;
23 }
24 namespace gui {
25 class SpinBox;
26 }
[4]27}
28
[13]29namespace flair {
30namespace sensor {
31/*! \class SimuImu
32*
33* \brief Class for a simulation Imu
34*/
35class SimuImu : public Imu, public core::Thread {
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a SimuImu. Control part.
41 *
42 * \param parent parent
43 * \param name name
44 * \param dev_id device id
45 * \param priority priority of the Thread
46 */
47 SimuImu(const core::FrameworkManager *parent, std::string name,
48 uint32_t dev_id, uint8_t priority);
[4]49
[13]50 /*!
51 * \brief Constructor
52 *
53 * Construct a SimuImu. Simulation part.\n
54 * The Thread of this class should not be run.
55 *
56 * \param parent parent
57 * \param name name
58 * \param dev_id device id
59 */
60 SimuImu(const core::IODevice *parent, std::string name, uint32_t dev_id);
[4]61
[13]62 /*!
63 * \brief Destructor
64 *
65 */
66 ~SimuImu();
[4]67
[13]68private:
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 typedef struct {
87 float q0;
88 float q1;
89 float q2;
90 float q3;
91 float wx;
92 float wy;
93 float wz;
94 } imu_states_t;
[32]95
96 gui::SpinBox *dataRate;
[13]97 core::SharedMem *shmem;
98 core::AhrsData *ahrsData;
99};
[4]100} // end namespace sensor
101} // end namespace flair
102#endif // SIMUIMU_H
Note: See TracBrowser for help on using the repository browser.