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

Last change on this file since 80 was 68, checked in by Sanahuja Guillaume, 7 years ago

maj for armv5te

File size: 1.7 KB
Line 
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 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 {
20 namespace core {
21 class SharedMem;
22 class AhrsData;
23 }
24 namespace gui {
25 class SpinBox;
26 }
27}
28
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.
41 * It will be child of the FrameworkManager.
42 *
43 * \param name name
44 * \param modelId Model id
45 * \param deviceId Imu id of the Model
46 * \param priority priority of the Thread
47 */
48 SimuImu(std::string name,
49 uint32_t modelId,uint32_t deviceId, uint8_t priority);
50
51 /*!
52 * \brief Destructor
53 *
54 */
55 ~SimuImu();
56
57private:
58 /*!
59 * \brief Run function
60 *
61 * Reimplemented from Thread.
62 *
63 */
64 void Run(void);
65
66 /*!
67 * \brief Update using provided datas
68 *
69 * Reimplemented from IODevice.
70 *
71 * \param data data from the parent to process
72 */
73 void UpdateFrom(const core::io_data *data){};
74
75 typedef struct {
76 float q0;
77 float q1;
78 float q2;
79 float q3;
80 float wx;
81 float wy;
82 float wz;
83 float ax;
84 float ay;
85 float az;
86 float mx;
87 float my;
88 float mz;
89 } imu_states_t;
90
91 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
92
93 gui::SpinBox *dataRate;
94 core::SharedMem *shmem;
95 core::AhrsData *ahrsData;
96};
97} // end namespace sensor
98} // end namespace flair
99#endif // SIMUIMU_H
Note: See TracBrowser for help on using the repository browser.