vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file.
38 #define BTN_LEFT 0x110
39 #define BTN_RIGHT 0x111
40 #define BTN_MIDDLE 0x112
41 #define REL_WHEEL 0x08
51 const char* evdev_name) :
101 vrpn_Event_Mouse::process_mouse_data() {
111 fprintf( stderr,
"vrpn_Event_Mouse::process_mouse_data(): Not yet implemented on this architecture.");
113 #else // if defined(LINUX)
120 switch ((*iter).type) {
122 switch ((*iter).code) {
124 channel[0] = (
signed int)(*iter).value;
127 channel[1] = (
signed int)(*iter).value;
130 channel[2] = (
signed int)(*iter).value;
135 switch ((*iter).code) {
148 switch ((*iter).value) {
170 printf(
"channel %d mit %f; ",i,
channel[i]);
178 printf(
"button %d mit %d; ",i,
buttons[i]);
184 #endif // if defined(LINUX)
197 vrpn_Event_Mouse::clear_values() {
vrpn_float64 channel[vrpn_CHANNEL_MAX]
virtual vrpn_bool connected(void) const
Returns vrpn_true if the connection has been established, vrpn_false if not (For a networkless connec...
vrpn_Event_Mouse(const char *name, vrpn_Connection *c=0, const char *evdev_name="/dev/input/event0")
vrpn_Connection * d_connection
Connection that this object talks to.
int read_available_data()
event_vector_t::iterator event_iter_t
virtual int mainloop(const struct timeval *timeout=NULL)=0
Call each time through program main loop to handle receiving any incoming messages and sending any pa...
Generic connection class not specific to the transport mechanism.
#define vrpn_gettimeofday
vrpn_float64 last[vrpn_CHANNEL_MAX]
void mainloop(void)
Called once each time through the server program's mainloop to handle various functions (like setting...
event_vector_t event_data
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...
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...