source: flair-src/trunk/lib/FlairSensorActuator/src/UsRangeFinder.h@ 243

Last change on this file since 243 was 221, checked in by Sanahuja Guillaume, 6 years ago

add us plot

File size: 2.6 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 UsRangeFinder.h
7 * \brief Base class for UsRangeFinder
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/01/22
10 * \version 4.0
11 */
12
13#ifndef USRANGEFINDER_H
14#define USRANGEFINDER_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 UsRangeFinder
34*
35* \brief Base class for UsRangeFinder
36*
37* Use this class to define a custom UsRangeFinder.
38*
39*/
40class UsRangeFinder : public core::IODevice {
41public:
42 /*!
43 * \brief Constructor
44 *
45 * Construct a UsRangeFinder. Control part.
46 * It will be child of the FrameworkManager.
47 *
48 * \param name name
49 */
50 UsRangeFinder(std::string name);
51
52 /*!
53 * \brief Constructor
54 *
55 * Construct a UsRangeFinder. Simulation part.
56 *
57 * \param parent parent
58 * \param name name
59 */
60 UsRangeFinder(const core::IODevice *parent, std::string name);
61
62 /*!
63 * \brief Destructor
64 *
65 */
66 ~UsRangeFinder();
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 Tab widget
110 *
111 * \return tab widget
112 */
113 gui::TabWidget *GetTabWidget(void) const;
114
115 /*!
116 * \brief Value
117 *
118 * \return output value
119 */
120 float Value(void) const;
121
122protected:
123 /*!
124 * \brief Output matrix
125 *
126 * \return output matrix
127 */
128 core::Matrix *output;
129
130 /*!
131 * \brief Setup GroupBox
132 *
133 * \return a GroupBox available
134 */
135 gui::GroupBox *GetGroupBox(void) const;
136
137private:
138 /*!
139 * \brief Update using provided datas
140 *
141 * Reimplemented from IODevice.
142 *
143 * \param data data from the parent to process
144 */
145 void UpdateFrom(const core::io_data *data){};
146
147 gui::Tab *main_tab;
148 gui::TabWidget *tab;
149 gui::GroupBox *setup_groupbox;
150 gui::Tab *sensor_tab;
151 gui::DataPlot1D *plot;
152 gui::Tab *plot_tab;
153};
154} // end namespace sensor
155} // end namespace flair
156#endif // USRANGEFINDER_H
Note: See TracBrowser for help on using the repository browser.