vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
Loading...
Searching...
No Matches
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_ADBox::vrpn_ADBox
vrpn_ADBox(char *name, vrpn_Connection *c, const char *port="/dev/ttyS1/", long baud=9600)
Definition
vrpn_ADBox.C:22
vrpn_Analog::vrpn_Analog
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
Definition
vrpn_Analog.C:14
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Button_Filter::vrpn_Button_Filter
vrpn_Button_Filter(const char *, vrpn_Connection *c=NULL)
Definition
vrpn_Button.C:129
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition
vrpn_Connection.h:561
vrpn_Connection
class VRPN_API vrpn_Connection
Definition
vrpn_ADBox.h:22
vrpn_Analog.h
vrpn_Button.h
VRPN_BUTTON_BUF_SIZE
const int VRPN_BUTTON_BUF_SIZE
Definition
vrpn_Button.h:14
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
vrpn_Shared.h
vrpn_ADBox.h
Generated by
1.17.0