vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Spaceball.h
Go to the documentation of this file.
1#ifndef VRPN_SPACEBALL_H
2#define VRPN_SPACEBALL_H
3
4#include "vrpn_Analog.h" // for vrpn_Serial_Analog
5#include "vrpn_Button.h" // for vrpn_Button_Filter
6#include "vrpn_Configure.h" // for VRPN_API
7#include "vrpn_Connection.h" // for vrpn_CONNECTION_LOW_LATENCY, etc
8#include "vrpn_Shared.h" // for timeval
9#include "vrpn_Types.h" // for vrpn_uint32
10
12 ,public vrpn_Button_Filter
13{
14 public:
15 vrpn_Spaceball (const char * name, vrpn_Connection * c,
16 const char * port, int baud);
17
19
21 virtual void mainloop ();
22
23 virtual int reset(void);
24
25 protected:
28 unsigned char buf[512];
29 int bufpos;
31 int packlen;
38 struct timeval timestamp;
39
40 virtual void clear_values(void);
41
44 virtual int get_report(void);
45
47 virtual void report_changes
48 (vrpn_uint32 class_of_service
50
52 virtual void report
53 (vrpn_uint32 class_of_service
55
56 // NOTE: class_of_service is only applied to vrpn_Analog
57 // values, not vrpn_Button, which are always vrpn_RELIABLE
58};
59
60#endif
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
Definition vrpn_Analog.C:94
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
Definition vrpn_Analog.C:71
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.
int packtype
What kind of packet we are decoding.
int packlen
Expected packet length.
int spaceball4000
We found a Spaceball 4000.
int _numchannels
How many analog channels to open.
int leftymode4000
Spaceball 4000 is in lefty mode.
int resetoccured
A reset event has occurred.
int bufpos
Current char pos in buffer.
int escapedchar
We're processing an escaped char.
int _numbuttons
How many buttons to open.
int null_radius
range where no motion should be reported
int erroroccured
A device error has occurred.
#define VRPN_API
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY