vrpn
07.33
Virtual Reality Peripheral Network
vrpn_Tracker_Isotrak.h
Go to the documentation of this file.
1
// vrpn_Tracker_Isotrak.h
2
// This file contains the code to operate a Polhemus Isotrack Tracker.
3
// This file is based on the vrpn_Tracker_Fastrack.C file, with modifications made
4
// to allow it to operate a Isotrack instead. The modifications are based
5
// on the old version of the Isotrack driver.
6
// This version was written in the Spring 2006 by Bruno Herbelin.
7
8
9
#ifndef VRPN_TRACKER_ISOTRAK_H
10
#define VRPN_TRACKER_ISOTRAK_H
11
12
#include <stdio.h>
// for NULL
13
14
#include "
vrpn_Configure.h
"
// for VRPN_API
15
#include "
vrpn_Shared.h
"
// for timeval
16
#include "
vrpn_Tracker.h
"
// for vrpn_Tracker_Serial
17
18
class
VRPN_API
vrpn_Button_Server
;
19
class
VRPN_API
vrpn_Connection
;
20
21
22
const
int
vrpn_ISOTRAK_MAX_STATIONS
= 2;
// How many stations can exist
23
24
class
VRPN_API
vrpn_Tracker_Isotrak
:
public
vrpn_Tracker_Serial
{
25
26
public
:
27
41
42
vrpn_Tracker_Isotrak
(
const
char
*name,
vrpn_Connection
*c,
43
const
char
*port =
"/dev/ttyS1"
,
long
baud = 19200,
44
int
enable_filtering = 1,
int
numstations =
vrpn_ISOTRAK_MAX_STATIONS
,
45
const
char
*additional_reset_commands = NULL);
46
47
~
vrpn_Tracker_Isotrak
();
48
50
int
add_stylus_button(
const
char
*button_device_name,
int
sensor);
51
52
protected
:
53
54
virtual
int
get_report
(
void
);
55
virtual
void
reset
();
56
57
struct
timeval reset_time;
58
int
do_filter
;
//< Should we turn on filtering for pos/orient?
59
int
num_stations
;
//< How many stations maximum on this Isotrak?
60
61
int
num_resets
;
//< How many resets have we tried this time around?
62
char
add_reset_cmd[2048];
//< Additional reset commands to be sent
63
64
int
set_sensor_output_format(
int
sensor);
65
66
// An Isotrak can have stylus's with buttons on them
67
vrpn_Button_Server
*stylus_buttons[
vrpn_ISOTRAK_MAX_STATIONS
];
68
69
private
:
70
void
process_binary();
71
};
72
73
#endif
vrpn_Tracker.h
vrpn_Tracker_Isotrak::do_filter
int do_filter
Definition:
vrpn_Tracker_Isotrak.h:58
vrpn_Button_Server
Definition:
vrpn_Button.h:98
vrpn_Shared.h
vrpn_Tracker_Isotrak
Definition:
vrpn_Tracker_Isotrak.h:24
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition:
vrpn_Connection.h:510
vrpn_Tracker_Serial
Definition:
vrpn_Tracker.h:144
vrpn_Tracker_Isotrak::num_stations
int num_stations
Definition:
vrpn_Tracker_Isotrak.h:59
vrpn_ISOTRAK_MAX_STATIONS
const int vrpn_ISOTRAK_MAX_STATIONS
Definition:
vrpn_Tracker_Isotrak.h:22
vrpn_Tracker_Isotrak::num_resets
int num_resets
Definition:
vrpn_Tracker_Isotrak.h:61
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition:
vrpn_Configure.h:646
vrpn_Tracker_Serial::get_report
virtual int get_report(void)=0
Gets a report if one is available, returns 0 if not, 1 if complete report.
vrpn_Tracker_Serial::reset
virtual void reset(void)=0
Reset the tracker.
vrpn_Tracker_Isotrak.h
Generated by
1.8.16