Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/VrpnClient.h
- Timestamp:
- 04/08/16 15:40:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/VrpnClient.h
r3 r15 6 6 * \file VrpnClient.h 7 7 * \brief Class to connect to a Vrpn server 8 * \author César Richard, Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253 8 * \author César Richard, Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 9 * 7253 9 10 * \date 2013/04/03 10 11 * \version 4.0 … … 16 17 #include <Thread.h> 17 18 18 namespace flair 19 { 20 namespace core 21 { 22 class FrameworkManager; 23 class SerialPort; 24 } 25 namespace gui 26 { 27 class TabWidget; 28 class Layout; 29 } 19 namespace flair { 20 namespace core { 21 class FrameworkManager; 22 class SerialPort; 23 } 24 namespace gui { 25 class TabWidget; 26 class Layout; 27 } 30 28 } 31 29 … … 33 31 class VrpnObject_impl; 34 32 35 namespace flair 36 { 37 namespace sensor 38 { 39 /*! \class VrpnClient 40 * 41 * \brief Class to connect to a Vrpn server 42 */ 43 class VrpnClient:public core::Thread 44 { 45 friend class ::VrpnObject_impl; 33 namespace flair { 34 namespace sensor { 35 /*! \class VrpnClient 36 * 37 * \brief Class to connect to a Vrpn server 38 */ 39 class VrpnClient : public core::Thread { 40 friend class ::VrpnObject_impl; 46 41 47 public: 48 /*! 49 * \brief Constructor 50 * 51 * Construct a VrpnClient. Connection is done by IP. 52 * 53 * \param parent parent 54 * \param name name 55 * \param address server address 56 * \param us_period Thread period in us 57 * \param priority priority of the Thread 58 */ 59 VrpnClient(const core::FrameworkManager* parent,std::string name,std::string address,uint16_t us_period,uint8_t priority); 42 public: 43 /*! 44 * \brief Constructor 45 * 46 * Construct a VrpnClient. Connection is done by IP. 47 * 48 * \param parent parent 49 * \param name name 50 * \param address server address 51 * \param us_period Thread period in us 52 * \param priority priority of the Thread 53 */ 54 VrpnClient(const core::FrameworkManager *parent, std::string name, 55 std::string address, uint16_t us_period, uint8_t priority); 60 56 61 /*! 62 * \brief Constructor 63 * 64 * Construct a VrpnClient. Connection is done by XBee modem. 65 * 66 * \param parent parent 67 * \param name name 68 * \param serialport SerialPort for XBee modem 69 * \param us_period Xbee RX timeout in us 70 * \param priority priority of the Thread 71 */ 72 VrpnClient(const core::FrameworkManager* parent,std::string name,core::SerialPort* serialport,uint16_t us_period,uint8_t priority); 57 /*! 58 * \brief Constructor 59 * 60 * Construct a VrpnClient. Connection is done by XBee modem. 61 * 62 * \param parent parent 63 * \param name name 64 * \param serialport SerialPort for XBee modem 65 * \param us_period Xbee RX timeout in us 66 * \param priority priority of the Thread 67 */ 68 VrpnClient(const core::FrameworkManager *parent, std::string name, 69 core::SerialPort *serialport, uint16_t us_period, 70 uint8_t priority); 73 71 74 75 76 77 78 72 /*! 73 * \brief Destructor 74 * 75 */ 76 ~VrpnClient(); 79 77 80 81 82 83 84 85 gui::Layout*GetLayout(void) const;78 /*! 79 * \brief Setup Layout 80 * 81 * \return a Layout available 82 */ 83 gui::Layout *GetLayout(void) const; 86 84 87 88 89 90 91 92 gui::TabWidget*GetTabWidget(void) const;85 /*! 86 * \brief Setup Tab 87 * 88 * \return a Tab available 89 */ 90 gui::TabWidget *GetTabWidget(void) const; 93 91 94 95 96 97 98 99 92 /*! 93 * \brief Is XBee used? 94 * 95 * \return true if connection is based on XBee modem 96 */ 97 bool UseXbee(void) const; 100 98 101 102 103 104 105 106 107 108 99 private: 100 /*! 101 * \brief Run function 102 * 103 * Reimplemented from Thread. 104 * 105 */ 106 void Run(void); 109 107 110 class VrpnClient_impl*pimpl_;111 108 class VrpnClient_impl *pimpl_; 109 }; 112 110 } // end namespace sensor 113 111 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.