vrpn 07.35
Virtual Reality Peripheral Network
 
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
9
10
11#define vrpn_VPJOY_MESSAGE_LENGTH (4)
12#define vrpn_VPJOY_NUM_BUTTONS (8)
13
15
16 public:
17 vrpn_VPJoystick(char* name, vrpn_Connection *c,
18 const char *port="/dev/ttyS0", long baud=9600);
19
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
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Button_Filter(const char *, vrpn_Connection *c=NULL)
Generic connection class not specific to the transport mechanism.
vrpn_VPJoystick(char *name, vrpn_Connection *c, const char *port="/dev/ttyS0", long baud=9600)
#define VRPN_API
#define vrpn_VPJOY_MESSAGE_LENGTH
#define vrpn_VPJOY_NUM_BUTTONS
class VRPN_API vrpn_Connection