vrpn
07.33
Virtual Reality Peripheral Network
vrpn_ADBox.h
Go to the documentation of this file.
1
// -*- Mode:C++ -*-
2
3
/*
4
* ad-box driver
5
* works with Fraunhofer IMK AD-Box and Fakespace Cubic Mouse
6
*
7
* for additional information see:
8
* http://www.imk.fraunhofer.de
9
* http://www.fakespace.com
10
*
11
* written by Sascha Scholz <sascha.scholz@imk.fraunhofer.de>
12
*/
13
14
#ifndef VRPN_ADBOX_H
15
#define VRPN_ADBOX_H
16
17
#include "
vrpn_Analog.h
"
// for vrpn_Analog
18
#include "
vrpn_Button.h
"
// for VRPN_BUTTON_BUF_SIZE, etc
19
#include "
vrpn_Configure.h
"
// for VRPN_API
20
#include "
vrpn_Shared.h
"
// for timeval
21
22
class
VRPN_API
vrpn_Connection
;
23
24
class
VRPN_API
vrpn_ADBox
:
public
vrpn_Analog
,
public
vrpn_Button_Filter
{
25
26
public
:
27
vrpn_ADBox
(
char
* name,
vrpn_Connection
*c,
28
const
char
*port=
"/dev/ttyS1/"
,
long
baud=9600);
29
30
~
vrpn_ADBox
();
31
32
void
mainloop
();
33
34
private
:
35
int
ready;
36
37
struct
timeval timestamp;
// time of the last report from the device
38
39
int
serial_fd;
40
unsigned
char
buffer[
VRPN_BUTTON_BUF_SIZE
];
41
42
int
iNumBytes;
43
int
iNumDigBytes;
44
int
iFilter[8][30];
45
int
iFilterPos;
46
};
47
48
#endif // #ifndef VRPN_ADBOX
vrpn_Analog
Definition:
vrpn_Analog.h:28
vrpn_Configure.h
vrpn_Analog.h
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition:
vrpn_Connection.h:510
VRPN_API
#define VRPN_API
Definition:
vrpn_Configure.h:646
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
VRPN_BUTTON_BUF_SIZE
const int VRPN_BUTTON_BUF_SIZE
Definition:
vrpn_Button.h:13
vrpn_Shared.h
vrpn_Button_Filter
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition:
vrpn_Button.h:65
vrpn_Button.h
vrpn_ADBox
Definition:
vrpn_ADBox.h:24
vrpn_ADBox.h
Generated by
1.8.15