RflySimSDK
v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
simulink
vrpn
vrpn_VPJoystick.h
1
2
#ifndef VRPN_VPJOYSTICK
3
#define VRPN_VPJOYSTICK 1
4
5
#include "vrpn_Button.h"
// for VRPN_BUTTON_BUF_SIZE, etc
6
#include "vrpn_Configure.h"
// for VRPN_API
7
8
class
VRPN_API
vrpn_Connection
;
9
10
11
#define vrpn_VPJOY_MESSAGE_LENGTH (4)
12
#define vrpn_VPJOY_NUM_BUTTONS (8)
13
14
class
VRPN_API
vrpn_VPJoystick
:
public
vrpn_Button_Filter
{
15
16
public
:
17
vrpn_VPJoystick
(
char
* name,
vrpn_Connection
*c,
18
const
char
*port=
"/dev/ttyS0"
,
long
baud=9600);
19
20
~vrpn_VPJoystick
();
21
22
void
mainloop
();
23
24
private
:
25
int
serial_fd;
26
27
unsigned
char
message_buffer[ vrpn_VPJOY_MESSAGE_LENGTH ];
28
unsigned
int
bytes_read;
29
unsigned
int
button_masks[ vrpn_VPJOY_NUM_BUTTONS ];
30
31
unsigned
int
state;
32
};
33
34
#endif
// #ifndef VRPN_VPJOYSTICK
vrpn_Button_Filter
定义
vrpn_Button.h:66
vrpn_Connection
Generic connection class not specific to the transport mechanism.
定义
vrpn_Connection.h:562
vrpn_VPJoystick
定义
vrpn_VPJoystick.h:14
vrpn_VPJoystick::mainloop
void mainloop()
制作者
1.11.0