source: flair-dev/trunk/include/FlairSensorActuator/PressureSensor.h @ 68

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

maj for armv5te

File size: 2.5 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 PressureSensor.h
7 * \brief Base class for PressureSensor
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2018/02/08
10 * \version 4.0
11 */
12
13#ifndef PRESSURESENSOR_H
14#define PRESSURESENSOR_H
15
16#include <IODevice.h>
17
18namespace flair {
19  namespace core {
20    class Matrix;
21  }
22  namespace gui {
23    class Tab;
24    class TabWidget;
25    class GroupBox;
26    class Layout;
27    class DataPlot1D;
28  }
29}
30
31namespace flair {
32namespace sensor {
33/*! \class PressureSensor
34*
35* \brief Base class for PressureSensor
36*
37* Use this class to define a custom PressureSensor.
38*
39*/
40class PressureSensor : public core::IODevice {
41public:
42  /*!
43  * \brief Constructor
44  *
45  * Construct a PressureSensor. Control part.
46        * It will be child of the FrameworkManager.
47        *
48  * \param name name
49  */
50  PressureSensor(std::string name);
51
52  /*!
53  * \brief Constructor
54  *
55  * Construct a PressureSensor. Simulation part.
56  *
57  * \param parent parent
58  * \param name name
59  */
60  PressureSensor(const core::IODevice *parent, std::string name);
61
62  /*!
63  * \brief Destructor
64  *
65  */
66  ~PressureSensor();
67
68  /*!
69  * \brief Lock user interface
70  *
71  */
72  void LockUserInterface(void) const;
73
74  /*!
75  * \brief Unlock user interface
76  *
77  */
78  void UnlockUserInterface(void) const;
79
80  /*!
81  * \brief Use default plot
82  *
83  * Should no be used for the simulation part.
84  */
85  void UseDefaultPlot(void);
86
87  /*!
88  * \brief Plot
89  *
90  * \return DataPlot1D
91  */
92  gui::DataPlot1D *GetPlot(void) const;
93
94  /*!
95  * \brief Setup Layout
96  *
97  * \return a Layout available
98  */
99  gui::Layout *GetLayout(void) const;
100
101  /*!
102  * \brief Plot tab
103  *
104  * \return plot Tab
105  */
106  gui::Tab *GetPlotTab(void) const;
107
108  /*!
109  * \brief Value
110  *
111  * \return output value in pascal
112  */
113  float Value(void) const;
114
115protected:
116  /*!
117  * \brief Output matrix
118  *
119  * \return output matrix
120  */
121  core::Matrix *output;
122
123  /*!
124  * \brief Setup GroupBox
125  *
126  * \return a GroupBox available
127  */
128  gui::GroupBox *GetGroupBox(void) const;
129
130private:
131  /*!
132  * \brief Update using provided datas
133  *
134  * Reimplemented from IODevice.
135  *
136  * \param data data from the parent to process
137  */
138  void UpdateFrom(const core::io_data *data){};
139
140  gui::Tab *main_tab;
141  gui::TabWidget *tab;
142  gui::GroupBox *setup_groupbox;
143  gui::Tab *sensor_tab;
144  gui::DataPlot1D *plot;
145  gui::Tab *plot_tab;
146};
147} // end namespace sensor
148} // end namespace flair
149#endif // PRESSURESENSOR_H
Note: See TracBrowser for help on using the repository browser.