source: flair-src/trunk/lib/FlairSensorActuator/src/Imu.h@ 4

Last change on this file since 4 was 3, checked in by Sanahuja Guillaume, 6 years ago

sensoractuator

File size: 3.3 KB
RevLine 
[3]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 { namespace sensor {
35 /*! \class Imu
36 *
37 * \brief Base class for Imu
38 *
39 * Use this class to define a custom Imu.
40 *
41 */
42 class Imu : public core::IODevice {
43 friend class ::Ahrs_impl;
44
45 public:
46 /*!
47 * \brief Constructor
48 *
49 * Construct an Imu.
50 *
51 * \param parent parent
52 * \param name name
53 */
54 Imu(const core::FrameworkManager *parent,std::string name);
55
56 /*!
57 * \brief Constructor
58 *
59 * Construct an Imu. \n
60 * This contructor must only be called for a simulated device.
61 *
62 * \param parent parent
63 * \param name name
64 */
65 Imu(const core::IODevice *parent,std::string name);
66
67 /*!
68 * \brief Destructor
69 *
70 */
71 ~Imu();
72
73 /*!
74 * \brief Setup Layout
75 *
76 * \return setup Layout
77 */
78 gui::Layout *GetLayout(void) const;
79
80 /*!
81 * \brief Lock user interface
82 *
83 */
84 void LockUserInterface(void) const;
85
86 /*!
87 * \brief Unlock user interface
88 *
89 */
90 void UnlockUserInterface(void) const;
91
92 /*!
93 * \brief Use default plot
94 *
95 */
96 void UseDefaultPlot(void);
97
98 /*!
99 * \brief Plot tab
100 *
101 * \return plot Tab
102 */
103 gui::Tab *GetPlotTab(void) const;
104
105 protected:
106 /*!
107 * \brief Setup GroupBox
108 *
109 * \return setup GroupBox
110 */
111 gui::GroupBox *GetGroupBox(void) const;
112
113 /*!
114 * \brief UpdateImu
115 *
116 * The reimplemented class must call this function as soon as IMU datas are available. \n
117 * It handles the data rotation if it was defined.
118 *
119 */
120 void UpdateImu();
121
122 /*!
123 * \brief Get imu datas
124 *
125 * \param imuData imu datas
126 */
127 void GetDatas(core::ImuData **imuData) const;
128
129
130 private:
131 gui::Tab *mainTab,*sensorTab,*plotTab;
132 gui::TabWidget* tab;
133 gui::GroupBox *setupGroupbox;
134 core::OneAxisRotation* rotation;
135 core::ImuData *imuData;
136
137 gui::DataPlot1D *axPlot,*ayPlot,*azPlot;
138 gui::DataPlot1D *gxPlot,*gyPlot,*gzPlot;
139 gui::DataPlot1D *mxPlot,*myPlot,*mzPlot;
140 };
141} // end namespace sensor
142} // end namespace flair
143
144#endif // IMU_H
Note: See TracBrowser for help on using the repository browser.