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

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

m

File size: 2.6 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 Imu.h
7 * \brief Base class for Imu
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/01/16
10 * \version 4.0
11 */
12
13#ifndef IMU_H
14#define IMU_H
15
16#include <IODevice.h>
17
18namespace flair {
19 namespace core {
20 class ImuData;
21 class OneAxisRotation;
22 }
23 namespace gui {
24 class Tab;
25 class TabWidget;
26 class GroupBox;
27 class Layout;
28 class DataPlot1D;
29 }
30}
31
32class Ahrs_impl;
33
34namespace flair {
35namespace sensor {
36/*! \class Imu
37*
38* \brief Base class for Imu
39*
40* Use this class to define a custom Imu.
41*
42*/
43class Imu : public core::IODevice {
44 friend class ::Ahrs_impl;
45
46public:
47 /*!
48 * \brief Constructor
49 *
50 * Construct an Imu.
51 *
52 * \param parent parent
53 * \param name name
54 */
55 Imu(const core::FrameworkManager *parent, std::string name);
56
57 /*!
58 * \brief Constructor
59 *
60 * Construct an Imu. \n
61 * This contructor must only be called for a simulated device.
62 *
63 * \param parent parent
64 * \param name name
65 */
66 Imu(const core::IODevice *parent, std::string name);
67
68 /*!
69 * \brief Destructor
70 *
71 */
72 ~Imu();
73
74 /*!
75 * \brief Setup Layout
76 *
77 * \return setup Layout
78 */
79 gui::Layout *GetLayout(void) const;
80
81 /*!
82 * \brief Lock user interface
83 *
84 */
85 void LockUserInterface(void) const;
86
87 /*!
88 * \brief Unlock user interface
89 *
90 */
91 void UnlockUserInterface(void) const;
92
93 /*!
94 * \brief Use default plot
95 *
96 */
97 void UseDefaultPlot(void);
98
99 /*!
100 * \brief Plot tab
101 *
102 * \return plot Tab
103 */
104 gui::Tab *GetPlotTab(void) const;
105
106 /*!
107 * \brief Get OneAxisRotation
108 *
109 * \return fixed rotation of the imu
110 */
111 core::OneAxisRotation *GetOneAxisRotation(void) const;
112
113
114protected:
115 /*!
116 * \brief Setup GroupBox
117 *
118 * \return setup GroupBox
119 */
120 gui::GroupBox *GetGroupBox(void) const;
121
122 /*!
123 * \brief UpdateImu
124 *
125 * The reimplemented class must call this function as soon as IMU datas are
126 *available. \n
127 * It handles the data rotation if it was defined.
128 *
129 */
130 void UpdateImu();
131
132 /*!
133 * \brief Get imu datas
134 *
135 * \param imuData imu datas
136 */
137 void GetDatas(core::ImuData **imuData) const;
138
139private:
140 gui::Tab *mainTab, *sensorTab, *plotTab;
141 gui::TabWidget *tab;
142 gui::GroupBox *setupGroupbox;
143 core::OneAxisRotation *rotation;
144 core::ImuData *imuData;
145
146 gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
147 gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
148 gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
149};
150} // end namespace sensor
151} // end namespace flair
152
153#endif // IMU_H
Note: See TracBrowser for help on using the repository browser.