11 #if defined(VRPN_USE_WIIUSE) 20 #define VRPN_WIIUSE_MAX_WIIMOTES 4 24 class vrpn_Wiimote_Device;
26 #ifdef vrpn_THREADS_AVAILABLE 27 struct vrpn_WiiMote_SharedData;
132 ,
unsigned useMS = 1,
unsigned useIR = 1,
unsigned reorderButtons = 0,
133 const char *bdaddr = NULL);
138 bool isValid()
const;
142 static int VRPN_CALLBACK handle_request_message(
void *userdata,
144 static int VRPN_CALLBACK handle_request_channels_message(
void* userdata,
153 void acquireMessageLock();
154 void releaseMessageLock();
156 #ifdef vrpn_THREADS_AVAILABLE 160 bool waitingForConnection;
162 vrpn_WiiMote_SharedData *sharedData;
166 struct timeval last_reconnect_attempt
169 vrpn_Wiimote_Device *wiimote;
171 wiimote_t **available_wiimotes;
174 inline void FAIL(
const char *msg) {
195 struct timeval _timestamp;
198 void initialize_wiimote_state(
void);
201 void handle_event(
void);
204 void connect_wiimote(
int timeout);
207 unsigned map_button(
unsigned btn);
210 #endif // VRPN_USE_WIIUSE 212 #endif // VRPN_WIIMOTE_H const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
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...
Generic connection class not specific to the transport mechanism.
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 ...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
This structure is what is passed to a vrpn_Connection message callback.
int send_text_message(const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0)
Sends a NULL-terminated text message from the device d_sender_id.
#define vrpn_gettimeofday