source: flair-dev/trunk/include/FlairSensorActuator/RadioReceiver.h @ 13

Last change on this file since 13 was 13, checked in by Bayard Gildas, 5 years ago

formatting script + include reformatted

File size: 1.9 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 RadioReceiver.h
7 * \brief Base class for radio receiver
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/07/08
10 * \version 4.0
11 */
12
13#ifndef RADIORECEIVER_H
14#define RADIORECEIVER_H
15
16#include <IODevice.h>
17#include <stdint.h>
18
19namespace flair {
20namespace core {
21class FrameworkManager;
22class cvmatrix;
23}
24namespace gui {
25class Tab;
26class TabWidget;
27class Layout;
28}
29}
30
31namespace flair {
32namespace sensor {
33/*! \class RadioReceiver
34*
35* \brief Base class for radio receiver
36*/
37class RadioReceiver : public core::IODevice {
38public:
39  /*!
40  * \brief Constructor
41  *
42  * Construct a RadioReceiver.
43  *
44  * \param parent parent
45  * \param name name
46  * \param nb_channels number of supported channels
47  */
48  RadioReceiver(const core::FrameworkManager *parent, std::string name,
49                unsigned int nb_channels);
50
51  /*!
52  * \brief Destructor
53  *
54  */
55  ~RadioReceiver();
56
57  /*!
58  * \brief get channel value
59  *
60  * \param id channel id
61  * \return value of the channel, between 0 and 1.
62  *  Returns -1 if channel is out of bound
63  */
64  float ChannelValue(unsigned int id) const;
65
66  /*!
67  * \brief Is transmitter connected?
68  *
69  * \return true if transmitter is connected
70  */
71  bool IsConnected(void) const;
72
73  /*!
74  * \brief Setup Layout
75  *
76  * \return a Layout available
77  */
78  gui::Layout *GetLayout(void) const;
79
80private:
81  /*!
82  * \brief Update using provided datas
83  *
84  * Reimplemented from IODevice.
85  *
86  * \param data data from the parent to process
87  */
88  void UpdateFrom(const core::io_data *data){};
89
90  core::cvmatrix *output;
91  bool is_connected;
92  unsigned int nb_channels;
93  gui::Tab *main_tab;
94  gui::TabWidget *tab;
95  gui::Tab *setup_tab;
96};
97} // end namespace sensor
98} // end namespace flair
99#endif // RADIORECEIVER_H
Note: See TracBrowser for help on using the repository browser.