source: flair-src/branches/mavlink/lib/FlairSensorActuator/src/Imu.h@ 86

Last change on this file since 86 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 2.4 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 {
19namespace core {
20class ImuData;
21class OneAxisRotation;
22}
23namespace gui {
24class Tab;
25class TabWidget;
26class GroupBox;
27class Layout;
28class 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
106protected:
107 /*!
108 * \brief Setup GroupBox
109 *
110 * \return setup GroupBox
111 */
112 gui::GroupBox *GetGroupBox(void) const;
113
114 /*!
115 * \brief UpdateImu
116 *
117 * The reimplemented class must call this function as soon as IMU datas are
118 *available. \n
119 * It handles the data rotation if it was defined.
120 *
121 */
122 void UpdateImu();
123
124 /*!
125 * \brief Get imu datas
126 *
127 * \param imuData imu datas
128 */
129 void GetDatas(core::ImuData **imuData) const;
130
131private:
132 gui::Tab *mainTab, *sensorTab, *plotTab;
133 gui::TabWidget *tab;
134 gui::GroupBox *setupGroupbox;
135 core::OneAxisRotation *rotation;
136 core::ImuData *imuData;
137
138 gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
139 gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
140 gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
141};
142} // end namespace sensor
143} // end namespace flair
144
145#endif // IMU_H
Note: See TracBrowser for help on using the repository browser.