source: flair-src/trunk/lib/FlairSensorActuator/src/PressureSensor.h@ 345

Last change on this file since 345 was 340, checked in by Sanahuja Guillaume, 5 years ago

add servos

File size: 2.3 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 Destructor
54 *
55 */
56 ~PressureSensor();
57
58 /*!
59 * \brief Lock user interface
60 *
61 */
62 void LockUserInterface(void) const;
63
64 /*!
65 * \brief Unlock user interface
66 *
67 */
68 void UnlockUserInterface(void) const;
69
70 /*!
71 * \brief Use default plot
72 *
73 * Should no be used for the simulation part.
74 */
75 void UseDefaultPlot(void);
76
77 /*!
78 * \brief Plot
79 *
80 * \return DataPlot1D
81 */
82 gui::DataPlot1D *GetPlot(void) const;
83
84 /*!
85 * \brief Setup Layout
86 *
87 * \return a Layout available
88 */
89 gui::Layout *GetLayout(void) const;
90
91 /*!
92 * \brief Plot tab
93 *
94 * \return plot Tab
95 */
96 gui::Tab *GetPlotTab(void) const;
97
98 /*!
99 * \brief Value
100 *
101 * \return output value in pascal
102 */
103 float Value(void) const;
104
105protected:
106 /*!
107 * \brief Output matrix
108 *
109 * \return output matrix
110 */
111 core::Matrix *output;
112
113 /*!
114 * \brief Setup GroupBox
115 *
116 * \return a GroupBox available
117 */
118 gui::GroupBox *GetGroupBox(void) const;
119
120private:
121 /*!
122 * \brief Update using provided datas
123 *
124 * Reimplemented from IODevice.
125 *
126 * \param data data from the parent to process
127 */
128 void UpdateFrom(const core::io_data *data){};
129
130 gui::Tab *main_tab;
131 gui::TabWidget *tab;
132 gui::GroupBox *setup_groupbox;
133 gui::Tab *sensor_tab;
134 gui::DataPlot1D *plot;
135 gui::Tab *plot_tab;
136};
137} // end namespace sensor
138} // end namespace flair
139#endif // PRESSURESENSOR_H
Note: See TracBrowser for help on using the repository browser.