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 ...
All button servers should derive from this class, which provides the ability to turn any of the butto...
Definition: vrpn_Button.h:66
Generic connection class not specific to the transport mechanism.
#define VRPN_API
#define vrpn_VPJOY_MESSAGE_LENGTH
#define vrpn_VPJOY_NUM_BUTTONS