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

Last change on this file was 340, checked in by Sanahuja Guillaume, 22 months ago

add servos

File size: 2.4 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 Destructor
54  *
55  */
56  ~UsRangeFinder();
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 Tab widget
100  *
101  * \return tab widget
102  */
103  gui::TabWidget *GetTabWidget(void) const;
104
105  /*!
106  * \brief Value
107  *
108  * \return output value
109  */
110  float Value(void) const;
111
112protected:
113  /*!
114  * \brief Output matrix
115  *
116  * \return output matrix
117  */
118  core::Matrix *output;
119
120  /*!
121  * \brief Setup GroupBox
122  *
123  * \return a GroupBox available
124  */
125  gui::GroupBox *GetGroupBox(void) const;
126
127private:
128  /*!
129  * \brief Update using provided datas
130  *
131  * Reimplemented from IODevice.
132  *
133  * \param data data from the parent to process
134  */
135  void UpdateFrom(const core::io_data *data){};
136
137  gui::Tab *main_tab;
138  gui::TabWidget *tab;
139  gui::GroupBox *setup_groupbox;
140  gui::Tab *sensor_tab;
141  gui::DataPlot1D *plot;
142  gui::Tab *plot_tab;
143};
144} // end namespace sensor
145} // end namespace flair
146#endif // USRANGEFINDER_H
Note: See TracBrowser for help on using the repository browser.