source: flair-src/trunk/lib/FlairSensorActuator/src/unexported/VrpnClient_impl.h@ 167

Last change on this file since 167 was 167, checked in by Sanahuja Guillaume, 5 years ago

modifs pour template vectors

File size: 2.0 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// created: 2013/04/03
6// filename: VrpnClient_impl.h
7//
8// author: César Richard, Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: objet se connectant au serveur vrpn
14//
15//
16/*********************************************************************/
17
18#ifndef VRPNCLIENT_IMPL_H
19#define VRPNCLIENT_IMPL_H
20
21#include <string>
22#include <vector>
23#include "Vector3D.h"
24
25namespace flair {
26namespace core {
27class OneAxisRotation;
28class Quaternion;
29class Mutex;
30class SerialPort;
31}
32namespace gui {
33class TabWidget;
34class Tab;
35class Layout;
36}
37namespace sensor {
38class VrpnClient;
39class VrpnObject;
40}
41}
42
43class VrpnObject_impl;
44class vrpn_Connection;
45
46class VrpnClient_impl {
47public:
48 VrpnClient_impl(flair::sensor::VrpnClient *self, std::string name,
49 std::string address);
50 VrpnClient_impl(flair::sensor::VrpnClient *self, std::string name,
51 flair::core::SerialPort *serialport, uint16_t us_period);
52 ~VrpnClient_impl();
53 void AddTrackable(VrpnObject_impl *obj); // normal
54 void AddTrackable(VrpnObject_impl *obj, uint8_t id); // xbee
55 void RemoveTrackable(VrpnObject_impl *obj); // normal+xbee
56 void ComputeRotations(flair::core::Vector3Df &point);
57 void ComputeRotations(flair::core::Quaternion &quat);
58 bool UseXbee(void);
59 void Run(void);
60 flair::gui::Tab *setup_tab;
61 flair::gui::TabWidget *tab;
62 vrpn_Connection *connection;
63
64private:
65 flair::sensor::VrpnClient *self;
66 flair::core::Mutex *mutex;
67 uint16_t us_period;
68 std::vector<VrpnObject_impl *> trackables;
69 typedef struct xbee_object {
70 VrpnObject_impl *vrpnobject;
71 uint8_t id;
72 } xbee_object;
73
74 std::vector<xbee_object> xbee_objects;
75 flair::gui::Tab *main_tab;
76 flair::core::OneAxisRotation *rotation_1, *rotation_2;
77 flair::core::SerialPort *serialport;
78 bool isConnected;//only for ip connection, not for xbee
79};
80
81#endif // VRPNCLIENT_IMPL_H
Note: See TracBrowser for help on using the repository browser.