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

Last change on this file since 4 was 3, checked in by Sanahuja Guillaume, 6 years ago

sensoractuator

File size: 2.8 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 7253
9 * \date 2013/04/03
10 * \version 4.0
11 */
12
13#ifndef VRPNCLIENT_H
14#define VRPNCLIENT_H
15
16#include <Thread.h>
17
18namespace flair
19{
20    namespace core
21    {
22        class FrameworkManager;
23        class SerialPort;
24    }
25    namespace gui
26    {
27        class TabWidget;
28        class Layout;
29    }
30}
31
32class VrpnClient_impl;
33class VrpnObject_impl;
34
35namespace flair
36{
37namespace 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;
46
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);
60
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);
73
74            /*!
75            * \brief Destructor
76            *
77            */
78            ~VrpnClient();
79
80            /*!
81            * \brief Setup Layout
82            *
83            * \return a Layout available
84            */
85            gui::Layout* GetLayout(void) const;
86
87            /*!
88            * \brief Setup Tab
89            *
90            * \return a Tab available
91            */
92            gui::TabWidget* GetTabWidget(void) const;
93
94            /*!
95            * \brief Is XBee used?
96            *
97            * \return true if connection is based on XBee modem
98            */
99            bool UseXbee(void) const;
100
101        private:
102            /*!
103            * \brief Run function
104            *
105            * Reimplemented from Thread.
106            *
107            */
108            void Run(void);
109
110            class VrpnClient_impl* pimpl_;
111    };
112} // end namespace sensor
113} // end namespace flair
114#endif // VRPNCLIENT_H
Note: See TracBrowser for help on using the repository browser.