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

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

sources reformatted with flair-format-dir script

File size: 2.4 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]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 {
[15]19namespace core {
20class ImuData;
21class OneAxisRotation;
[3]22}
[15]23namespace gui {
24class Tab;
25class TabWidget;
26class GroupBox;
27class Layout;
28class DataPlot1D;
29}
30}
[3]31
32class Ahrs_impl;
33
[15]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;
[3]45
[15]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);
[3]56
[15]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);
[3]67
[15]68 /*!
69 * \brief Destructor
70 *
71 */
72 ~Imu();
[3]73
[15]74 /*!
75 * \brief Setup Layout
76 *
77 * \return setup Layout
78 */
79 gui::Layout *GetLayout(void) const;
[3]80
[15]81 /*!
82 * \brief Lock user interface
83 *
84 */
85 void LockUserInterface(void) const;
[3]86
[15]87 /*!
88 * \brief Unlock user interface
89 *
90 */
91 void UnlockUserInterface(void) const;
[3]92
[15]93 /*!
94 * \brief Use default plot
95 *
96 */
97 void UseDefaultPlot(void);
[3]98
[15]99 /*!
100 * \brief Plot tab
101 *
102 * \return plot Tab
103 */
104 gui::Tab *GetPlotTab(void) const;
[3]105
[15]106protected:
107 /*!
108 * \brief Setup GroupBox
109 *
110 * \return setup GroupBox
111 */
112 gui::GroupBox *GetGroupBox(void) const;
[3]113
[15]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();
[3]123
[15]124 /*!
125 * \brief Get imu datas
126 *
127 * \param imuData imu datas
128 */
129 void GetDatas(core::ImuData **imuData) const;
[3]130
[15]131private:
132 gui::Tab *mainTab, *sensorTab, *plotTab;
133 gui::TabWidget *tab;
134 gui::GroupBox *setupGroupbox;
135 core::OneAxisRotation *rotation;
136 core::ImuData *imuData;
[3]137
[15]138 gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
139 gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
140 gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
141};
[3]142} // end namespace sensor
143} // end namespace flair
144
145#endif // IMU_H
Note: See TracBrowser for help on using the repository browser.