vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
Loading...
Searching...
No Matches
vrpn_Dyna.h
Go to the documentation of this file.
1
#ifndef INCLUDED_DYNA
2
#define INCLUDED_DYNA
3
4
#include "
vrpn_Configure.h
"
// for VRPN_API
5
#include "
vrpn_Serial.h
"
6
#include "
vrpn_Tracker.h
"
// for vrpn_Tracker_Serial
7
8
class
VRPN_API
vrpn_Connection
;
9
10
// only 13 receivers allowed in normal addressing mode
11
#define VRPN_DYNA_MAX_SENSORS 13
12
13
// This is a class which provides a server for an ascension
14
// DynaSight. The server will send out messages
15
// The timestamp is the time when the first character was read
16
// from the serial driver with "read". No adjustment is currently
17
// made to this time stamp.
18
19
// If this is running on a non-linux system, then the serial port driver
20
// is probably adding more latency -- see the vrpn README for more info.
21
22
class
VRPN_API
vrpn_Tracker_Dyna
:
public
vrpn_Tracker_Serial
{
23
private
:
24
unsigned
reportLength;
25
unsigned
totalReportLength;
26
27
public
:
28
29
vrpn_Tracker_Dyna
(
char
*name,
vrpn_Connection
*c,
int
cSensors
=1,
30
const
char
*port =
"/dev/ttyd3"
,
long
baud = 38400);
31
32
virtual
~vrpn_Tracker_Dyna
();
33
34
private
:
35
void
my_flush() {
36
// clear the input data buffer
37
unsigned
char
foo[128];
38
while
(
vrpn_read_available_characters
(
serial_fd
, foo, 1) > 0) ;
39
}
40
int
valid_report();
41
int
decode_record();
42
int
get_status();
43
protected
:
44
45
virtual
int
get_report
(
void
);
46
virtual
void
reset
();
47
void
printError
(
unsigned
char
uchErrCode,
unsigned
char
uchExpandedErrCode);
48
int
checkError
();
49
int
cResets
;
50
int
cSensors
;
51
};
52
53
54
#endif
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition
vrpn_Connection.h:561
vrpn_Tracker_Dyna::checkError
int checkError()
vrpn_Tracker_Dyna::cSensors
int cSensors
Definition
vrpn_Dyna.h:50
vrpn_Tracker_Dyna::cResets
int cResets
Definition
vrpn_Dyna.h:49
vrpn_Tracker_Dyna::vrpn_Tracker_Dyna
vrpn_Tracker_Dyna(char *name, vrpn_Connection *c, int cSensors=1, const char *port="/dev/ttyd3", long baud=38400)
Definition
vrpn_Dyna.C:30
vrpn_Tracker_Dyna::printError
void printError(unsigned char uchErrCode, unsigned char uchExpandedErrCode)
vrpn_Tracker_Serial::reset
virtual void reset(void)=0
Reset the tracker.
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::serial_fd
int serial_fd
Definition
vrpn_Tracker.h:153
vrpn_Tracker_Serial::vrpn_Tracker_Serial
vrpn_Tracker_Serial(const char *name, vrpn_Connection *c, const char *port="/dev/ttyS1", long baud=38400)
Definition
vrpn_Tracker.C:966
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
vrpn_Connection
class VRPN_API vrpn_Connection
Definition
vrpn_Dyna.h:8
vrpn_read_available_characters
int vrpn_read_available_characters(int comm, unsigned char *buffer, size_t bytes)
Definition
vrpn_Serial.C:515
vrpn_Serial.h
vrpn_Serial: Pulls all the serial port routines into one file to make porting to new operating system...
vrpn_Tracker.h
vrpn_Dyna.h
Generated by
1.17.0