Last change
on this file since 470 was 448, checked in by Sanahuja Guillaume, 3 years ago |
handle ack in vrpnlite
|
File size:
1.3 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 gui {
|
---|
25 | class PushButton;
|
---|
26 | }
|
---|
27 | namespace sensor {
|
---|
28 | class VrpnClient;
|
---|
29 | class VrpnObject;
|
---|
30 | }
|
---|
31 | }
|
---|
32 |
|
---|
33 | class VrpnLite: public flair::core::Thread {
|
---|
34 | public:
|
---|
35 | VrpnLite(int vrpnLitePort,std::string vrpnServerAddress);
|
---|
36 | ~VrpnLite();
|
---|
37 |
|
---|
38 | private:
|
---|
39 | typedef struct {
|
---|
40 | std::vector<flair::sensor::VrpnObject*> vrpnobjects;
|
---|
41 | flair::core::Time lastAck;
|
---|
42 | uint16_t srcId;
|
---|
43 | } connection_t;
|
---|
44 | flair::gui::PushButton* killButton;
|
---|
45 | flair::sensor::VrpnClient* vrpnclient;
|
---|
46 | std::vector<connection_t> connections;
|
---|
47 | flair::core::UdpSocket* dataSocket;
|
---|
48 | void Run(void);
|
---|
49 | void SendObjects(void) ;
|
---|
50 | int16_t ConvertPosition(float value) const;
|
---|
51 | int16_t ConvertQuaternion(float value) const;
|
---|
52 | connection_t* ConnectionOfSrcId(uint16_t srcId);
|
---|
53 | };
|
---|
54 |
|
---|
55 | #endif // VRPNLITE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.