source: flair-src/branches/mavlink/lib/FlairSensorActuator/src/VrpnClient.h@ 66

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

sources reformatted with flair-format-dir script

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