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

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

formatting script + include reformatted

File size: 1.9 KB
RevLine 
[4]1// %flair:license{
[13]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[4]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
[13]19namespace flair {
20namespace core {
21class FrameworkManager;
22class cvmatrix;
[4]23}
[13]24namespace gui {
25class Tab;
26class TabWidget;
27class Layout;
28}
29}
[4]30
[13]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);
[4]50
[13]51 /*!
52 * \brief Destructor
53 *
54 */
55 ~RadioReceiver();
[4]56
[13]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;
[4]65
[13]66 /*!
67 * \brief Is transmitter connected?
68 *
69 * \return true if transmitter is connected
70 */
71 bool IsConnected(void) const;
[4]72
[13]73 /*!
74 * \brief Setup Layout
75 *
76 * \return a Layout available
77 */
78 gui::Layout *GetLayout(void) const;
[4]79
[13]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){};
[4]89
[13]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};
[4]97} // end namespace sensor
98} // end namespace flair
99#endif // RADIORECEIVER_H
Note: See TracBrowser for help on using the repository browser.