source: flair-src/trunk/lib/FlairSensorActuator/src/RadioReceiver.h@ 309

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

matrix

File size: 1.8 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]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
[15]19namespace flair {
20namespace core {
[214]21class Matrix;
[3]22}
[15]23namespace gui {
24class Tab;
25class TabWidget;
26class Layout;
27}
28}
[3]29
[15]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.
[137]42 * It will be child of the FrameworkManager.
[15]43 *
44 * \param name name
45 * \param nb_channels number of supported channels
46 */
[137]47 RadioReceiver(std::string name,
[15]48 unsigned int nb_channels);
[3]49
[15]50 /*!
51 * \brief Destructor
52 *
53 */
54 ~RadioReceiver();
[3]55
[15]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;
[3]64
[15]65 /*!
66 * \brief Is transmitter connected?
67 *
68 * \return true if transmitter is connected
69 */
70 bool IsConnected(void) const;
[3]71
[15]72 /*!
73 * \brief Setup Layout
74 *
75 * \return a Layout available
76 */
77 gui::Layout *GetLayout(void) const;
[3]78
[15]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){};
[3]88
[214]89 core::Matrix *output;
[15]90 bool is_connected;
91 unsigned int nb_channels;
92 gui::Tab *main_tab;
93 gui::TabWidget *tab;
94 gui::Tab *setup_tab;
95};
[3]96} // end namespace sensor
97} // end namespace flair
98#endif // RADIORECEIVER_H
Note: See TracBrowser for help on using the repository browser.