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
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
[36]106 /*!
107 * \brief Get OneAxisRotation
108 *
109 * \return fixed rotation of the imu
110 */
111 core::OneAxisRotation *GetOneAxisRotation(void) const;
112
113
[13]114protected:
115 /*!
116 * \brief Setup GroupBox
117 *
118 * \return setup GroupBox
119 */
120 gui::GroupBox *GetGroupBox(void) const;
[4]121
[13]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();
[4]131
[13]132 /*!
133 * \brief Get imu datas
134 *
135 * \param imuData imu datas
136 */
137 void GetDatas(core::ImuData **imuData) const;
[4]138
[13]139private:
140 gui::Tab *mainTab, *sensorTab, *plotTab;
141 gui::TabWidget *tab;
142 gui::GroupBox *setupGroupbox;
143 core::OneAxisRotation *rotation;
144 core::ImuData *imuData;
[4]145
[13]146 gui::DataPlot1D *axPlot, *ayPlot, *azPlot;
147 gui::DataPlot1D *gxPlot, *gyPlot, *gzPlot;
148 gui::DataPlot1D *mxPlot, *myPlot, *mzPlot;
149};
[4]150} // end namespace sensor
151} // end namespace flair
152
153#endif // IMU_H
Note: See TracBrowser for help on using the repository browser.