source: flair-dev/trunk/include/FlairSensorActuator/VrpnClient.h@ 53

Last change on this file since 53 was 50, checked in by Sanahuja Guillaume, 7 years ago

doc

File size: 2.2 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 VrpnClient.h
7 * \brief Class to connect to a Vrpn server
[13]8 * \author César Richard, Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS
9 * 7253
[4]10 * \date 2013/04/03
11 * \version 4.0
12 */
13
14#ifndef VRPNCLIENT_H
15#define VRPNCLIENT_H
16
17#include <Thread.h>
18
[13]19namespace flair {
[44]20 namespace core {
21 class SerialPort;
22 }
23 namespace gui {
24 class TabWidget;
25 class Layout;
26 }
[4]27}
28
29class VrpnClient_impl;
30class VrpnObject_impl;
31
[13]32namespace flair {
33namespace sensor {
34/*! \class VrpnClient
35*
[44]36* \brief Class to connect to a Vrpn server. The Thread is created with
37* the FrameworkManager as parent. FrameworkManager must be created before.
38* Only one instance of this class is allowed by program.
[13]39*/
40class VrpnClient : public core::Thread {
41 friend class ::VrpnObject_impl;
[4]42
[13]43public:
44 /*!
45 * \brief Constructor
46 *
47 * Construct a VrpnClient. Connection is done by IP.
48 *
49 * \param name name
50 * \param address server address
51 * \param priority priority of the Thread
52 */
[44]53 VrpnClient(std::string name,
[50]54 std::string address, uint8_t priority);
[4]55
[13]56 /*!
57 * \brief Constructor
58 *
59 * Construct a VrpnClient. Connection is done by XBee modem.
60 *
61 * \param name name
62 * \param serialport SerialPort for XBee modem
63 * \param us_period Xbee RX timeout in us
64 * \param priority priority of the Thread
65 */
[44]66 VrpnClient(std::string name,
[13]67 core::SerialPort *serialport, uint16_t us_period,
68 uint8_t priority);
[4]69
[13]70 /*!
71 * \brief Destructor
72 *
73 */
74 ~VrpnClient();
[4]75
[13]76 /*!
77 * \brief Setup Layout
78 *
79 * \return a Layout available
80 */
81 gui::Layout *GetLayout(void) const;
[4]82
[13]83 /*!
84 * \brief Setup Tab
85 *
86 * \return a Tab available
87 */
88 gui::TabWidget *GetTabWidget(void) const;
[4]89
[13]90 /*!
91 * \brief Is XBee used?
92 *
93 * \return true if connection is based on XBee modem
94 */
95 bool UseXbee(void) const;
[4]96
[13]97private:
98 /*!
99 * \brief Run function
100 *
101 * Reimplemented from Thread.
102 *
103 */
104 void Run(void);
[4]105
[13]106 class VrpnClient_impl *pimpl_;
107};
[44]108
109/*!
110* \brief get VrpnClient
111*
112* \return the VrpnClient
113*/
114VrpnClient *GetVrpnClient(void);
115
[4]116} // end namespace sensor
117} // end namespace flair
118#endif // VRPNCLIENT_H
Note: See TracBrowser for help on using the repository browser.