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

Last change on this file since 68 was 68, checked in by Sanahuja Guillaume, 3 years ago

maj for armv5te

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