vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
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
20
21
22const int vrpn_ISOTRAK_MAX_STATIONS = 2; // How many stations can exist
23
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
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
68
69private:
70 void process_binary();
71};
72
73#endif
Generic connection class not specific to the transport mechanism.
virtual void reset(void)=0
Reset the tracker.
virtual int get_report(void)=0
Gets a report if one is available, returns 0 if not, 1 if complete report.
#define VRPN_API
const int vrpn_ISOTRAK_MAX_STATIONS