vrpn
07.35
Virtual Reality Peripheral Network
Toggle main menu visibility
Loading...
Searching...
No Matches
vrpn_VPJoystick.h
Go to the documentation of this file.
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_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_VPJoystick::vrpn_VPJoystick
vrpn_VPJoystick(char *name, vrpn_Connection *c, const char *port="/dev/ttyS0", long baud=9600)
Definition
vrpn_VPJoystick.C:64
vrpn_Button.h
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
vrpn_VPJOY_MESSAGE_LENGTH
#define vrpn_VPJOY_MESSAGE_LENGTH
Definition
vrpn_VPJoystick.h:11
vrpn_VPJOY_NUM_BUTTONS
#define vrpn_VPJOY_NUM_BUTTONS
Definition
vrpn_VPJoystick.h:12
vrpn_Connection
class VRPN_API vrpn_Connection
Definition
vrpn_VPJoystick.h:8
vrpn_VPJoystick.h
Generated by
1.17.0