source: flair-src/trunk/lib/FlairSensorActuator/src/VrpnClient.h@ 38

Last change on this file since 38 was 15, checked in by Bayard Gildas, 8 years ago

sources reformatted with flair-format-dir script

File size: 2.2 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 VrpnClient.h
7 * \brief Class to connect to a Vrpn server
[15]8 * \author César Richard, Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS
9 * 7253
[3]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
[15]19namespace flair {
20namespace core {
21class FrameworkManager;
22class SerialPort;
[3]23}
[15]24namespace gui {
25class TabWidget;
26class Layout;
27}
28}
[3]29
30class VrpnClient_impl;
31class VrpnObject_impl;
32
[15]33namespace flair {
34namespace sensor {
35/*! \class VrpnClient
36*
37* \brief Class to connect to a Vrpn server
38*/
39class VrpnClient : public core::Thread {
40 friend class ::VrpnObject_impl;
[3]41
[15]42public:
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);
[3]56
[15]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);
[3]71
[15]72 /*!
73 * \brief Destructor
74 *
75 */
76 ~VrpnClient();
[3]77
[15]78 /*!
79 * \brief Setup Layout
80 *
81 * \return a Layout available
82 */
83 gui::Layout *GetLayout(void) const;
[3]84
[15]85 /*!
86 * \brief Setup Tab
87 *
88 * \return a Tab available
89 */
90 gui::TabWidget *GetTabWidget(void) const;
[3]91
[15]92 /*!
93 * \brief Is XBee used?
94 *
95 * \return true if connection is based on XBee modem
96 */
97 bool UseXbee(void) const;
[3]98
[15]99private:
100 /*!
101 * \brief Run function
102 *
103 * Reimplemented from Thread.
104 *
105 */
106 void Run(void);
[3]107
[15]108 class VrpnClient_impl *pimpl_;
109};
[3]110} // end namespace sensor
111} // end namespace flair
112#endif // VRPNCLIENT_H
Note: See TracBrowser for help on using the repository browser.