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

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

vrpn modifs

File size: 2.1 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]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>
[167]23#include "Vector3D.h"
[3]24
[15]25namespace flair {
26namespace core {
27class OneAxisRotation;
28class Quaternion;
29class Mutex;
30class SerialPort;
[3]31}
[15]32namespace gui {
33class TabWidget;
34class Tab;
35class Layout;
36}
37namespace sensor {
38class VrpnClient;
39class VrpnObject;
40}
41}
[3]42
43class VrpnObject_impl;
44class vrpn_Connection;
45
[15]46class VrpnClient_impl {
47public:
48 VrpnClient_impl(flair::sensor::VrpnClient *self, std::string name,
[136]49 std::string address);
[15]50 VrpnClient_impl(flair::sensor::VrpnClient *self, std::string name,
51 flair::core::SerialPort *serialport, uint16_t us_period);
52 ~VrpnClient_impl();
[140]53 void AddTrackable(VrpnObject_impl *obj); // normal
[16]54 void AddTrackable(VrpnObject_impl *obj, uint8_t id); // xbee
[140]55 void RemoveTrackable(VrpnObject_impl *obj); // normal+xbee
[167]56 void ComputeRotations(flair::core::Vector3Df &point);
[15]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;
[3]63
[15]64private:
65 flair::sensor::VrpnClient *self;
66 flair::core::Mutex *mutex;
67 uint16_t us_period;
[140]68 std::vector<VrpnObject_impl *> trackables;
[15]69 typedef struct xbee_object {
70 VrpnObject_impl *vrpnobject;
71 uint8_t id;
72 } xbee_object;
[3]73
[15]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;
[136]78 bool isConnected;//only for ip connection, not for xbee
[294]79 std::string address;
[3]80};
81
82#endif // VRPNCLIENT_IMPL_H
Note: See TracBrowser for help on using the repository browser.