Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/RadioReceiver.h
- Timestamp:
- 04/08/16 15:40:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/RadioReceiver.h
r3 r15 17 17 #include <stdint.h> 18 18 19 namespace 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 } 19 namespace flair { 20 namespace core { 21 class FrameworkManager; 22 class cvmatrix; 23 } 24 namespace gui { 25 class Tab; 26 class TabWidget; 27 class Layout; 28 } 32 29 } 33 30 34 namespace flair 35 { 36 namespace 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); 31 namespace flair { 32 namespace sensor { 33 /*! \class RadioReceiver 34 * 35 * \brief Base class for radio receiver 36 */ 37 class RadioReceiver : public core::IODevice { 38 public: 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); 55 50 56 57 58 59 60 51 /*! 52 * \brief Destructor 53 * 54 */ 55 ~RadioReceiver(); 61 56 62 63 64 65 66 67 68 69 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; 70 65 71 72 73 74 75 76 66 /*! 67 * \brief Is transmitter connected? 68 * 69 * \return true if transmitter is connected 70 */ 71 bool IsConnected(void) const; 77 72 78 79 80 81 82 83 gui::Layout*GetLayout(void) const;73 /*! 74 * \brief Setup Layout 75 * 76 * \return a Layout available 77 */ 78 gui::Layout *GetLayout(void) const; 84 79 85 86 87 88 89 90 91 92 93 80 private: 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){}; 94 89 95 96 97 98 gui::Tab*main_tab;99 gui::TabWidget*tab;100 gui::Tab*setup_tab;101 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 }; 102 97 } // end namespace sensor 103 98 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.