RflySimSDK
v4.01
RflySimSDK说明文档
载入中...
搜索中...
未找到
simulink
vrpn
vrpn_sgibox.h
1
#ifndef VRPN_SGIBOX
2
#define VRPN_SGIBOX
3
4
#ifdef sgi
5
6
#include "vrpn_Analog.h"
7
#include "vrpn_Button.h"
8
// Do we really need this here as everything is already
9
// surrounded by #ifdef sgi...???
10
#ifndef _WIN32
11
#include <netinet/in.h>
12
#include <sys/ioctl.h>
13
#endif
14
#ifndef MICROSCAPE_H
15
#include <gl/gl.h>
16
#include <gl/device.h>
17
#endif
18
19
/* Number of buttons and number of dials on sgi button/dial boxes */
20
#define NUM_BUTTONS (32)
21
#define NUM_DIALS (8)
22
#define NUMDEVS (NUM_BUTTONS+NUM_DIALS)
23
24
class
VRPN_API vrpn_SGIBox :
public
vrpn_Analog
,
public
vrpn_Button_Filter
{
25
public
:
26
vrpn_SGIBox(
char
* name, vrpn_Connection * c);
27
void
mainloop
();
28
void
reset();
29
30
31
protected
:
32
void
get_report();
33
34
35
private
:
36
double
resetval[vrpn_CHANNEL_MAX];
37
long
MAX_TIME_INTERVAL;
38
39
unsigned
long
btstat;
/* status of of on/off buttons */
40
unsigned
long
bs1, bs2;
/* status of all buttons */
41
unsigned
long
*bpA, *bpB, *bpT;
/* ptrs to above */
42
Device devs[NUMDEVS];
/* device array */
43
short
vals1[NUMDEVS],
44
vals2[NUMDEVS];
/* two values arrays */
45
int
dial_changed[NUM_DIALS];
46
int
mid_values[NUM_DIALS];
47
int
winid;
48
int
sid;
// server id;
49
};
50
51
#endif
// sgi
52
53
#endif
// VRPN_SGIBOX
54
vrpn_Analog
定义
vrpn_Analog.h:28
vrpn_BaseClass::mainloop
virtual void mainloop()=0
vrpn_Button_Filter
定义
vrpn_Button.h:66
制作者
1.14.0