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

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

m

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