Last change
on this file since 422 was 363, checked in by Sanahuja Guillaume, 4 years ago |
allow mutliple connection on udp (only nrt for the moment)
|
File size:
1.1 KB
|
Line | |
---|
1 | // created: 2019/03/12
|
---|
2 | // filename: VrpnLite.h
|
---|
3 | //
|
---|
4 | // author: Guillaume Sanahuja
|
---|
5 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
6 | //
|
---|
7 | // version: $Id: $
|
---|
8 | //
|
---|
9 | // purpose: vrpnlite, to forward it to bth for exemple
|
---|
10 | // usefull to reduce vrpn frame size
|
---|
11 | //
|
---|
12 | /*********************************************************************/
|
---|
13 |
|
---|
14 | #ifndef VRPNLITE_H
|
---|
15 | #define VRPNLITE_H
|
---|
16 |
|
---|
17 | #include <string>
|
---|
18 | #include <Thread.h>
|
---|
19 |
|
---|
20 | namespace flair {
|
---|
21 | namespace core {
|
---|
22 | class UdpSocket;
|
---|
23 | }
|
---|
24 | namespace sensor {
|
---|
25 | class VrpnClient;
|
---|
26 | class VrpnObject;
|
---|
27 | }
|
---|
28 | }
|
---|
29 |
|
---|
30 | class VrpnLite: public flair::core::Thread {
|
---|
31 | public:
|
---|
32 | VrpnLite(int vrpnLitePort,std::string vrpnServerAddress);
|
---|
33 | ~VrpnLite();
|
---|
34 |
|
---|
35 | private:
|
---|
36 | void Run(void);
|
---|
37 | flair::sensor::VrpnClient* vrpnclient;
|
---|
38 | std::vector<flair::sensor::VrpnObject*> vrpnobjects;
|
---|
39 | std::vector<std::vector<flair::sensor::VrpnObject*>> vrpnobjects_list;
|
---|
40 | flair::core::UdpSocket* dataSocket;
|
---|
41 | void SendObjects(void) const;
|
---|
42 | int16_t ConvertPosition(float value) const;
|
---|
43 | int16_t ConvertQuaternion(float value) const;
|
---|
44 | };
|
---|
45 |
|
---|
46 | #endif // VRPNLITE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.