1#ifndef VRPN_SPACEBALL_H
2#define VRPN_SPACEBALL_H
4#include "vrpn_Analog.h"
5#include "vrpn_Button.h"
6#include "vrpn_Configure.h"
7#include "vrpn_Connection.h"
8#include "vrpn_Shared.h"
16 const char * port,
int baud);
28 unsigned char buf[512];
38 struct timeval timestamp;
48 (vrpn_uint32 class_of_service
49 = vrpn_CONNECTION_LOW_LATENCY);
53 (vrpn_uint32 class_of_service
54 = vrpn_CONNECTION_LOW_LATENCY);
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
int packlen
Expected packet length
定义 vrpn_Spaceball.h:31
int leftymode4000
Spaceball 4000 is in lefty mode
定义 vrpn_Spaceball.h:36
int escapedchar
We're processing an escaped char
定义 vrpn_Spaceball.h:32
int resetoccured
A reset event has occurred
定义 vrpn_Spaceball.h:34
int _numchannels
How many analog channels to open
定义 vrpn_Spaceball.h:27
virtual int get_report(void)
report received, 0 otherwise. Sets status to current mode.
virtual void clear_values(void)
Set all buttons, analogs and encoders back to 0
virtual void mainloop()
Called once through each main loop iteration to handle updates.
virtual int reset(void)
Set device back to starting config
int bufpos
Current char pos in buffer
定义 vrpn_Spaceball.h:29
int spaceball4000
We found a Spaceball 4000
定义 vrpn_Spaceball.h:35
int erroroccured
A device error has occurred
定义 vrpn_Spaceball.h:33
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report whether or not changed
int null_radius
range where no motion should be reported
定义 vrpn_Spaceball.h:37
int _numbuttons
How many buttons to open
定义 vrpn_Spaceball.h:26
int packtype
What kind of packet we are decoding
定义 vrpn_Spaceball.h:30
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report iff changed