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

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

sensoractuator

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