RflySimSDK
v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
simulink
vrpn
vrpn_ADBox.h
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.h:24
vrpn_ADBox::mainloop
void mainloop()
vrpn_Analog
定义
vrpn_Analog.h:28
vrpn_Button_Filter
定义
vrpn_Button.h:66
vrpn_Connection
Generic connection class not specific to the transport mechanism.
定义
vrpn_Connection.h:562
制作者
1.11.0