11 #if defined(VRPN_USE_HID) 14 static const vrpn_uint16 DREAMCHEEKY_VENDOR = 6465;
15 static const vrpn_uint16 USB_ROLL_UP_DRUM_KIT = 32801;
39 , d_debounce(debounce)
88 for (i = 0; i < (bytes / 8); i++) {
97 vrpn_uint8 mask = 1 << btn;
98 for (r = 0; r < 8; r++) {
99 vrpn_uint8 *
report = buffer + 9*i + r;
100 count += ((*
report & mask) != 0);
110 for (r = 0; r < 8; r++) {
111 vrpn_uint8 *
report = buffer + 9*i + r;
114 vrpn_uint8 mask = 1 << btn;
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...
virtual ~vrpn_DreamCheeky()
void on_data_received(size_t bytes, vrpn_uint8 *buffer)
Derived class reimplements this callback.
Accepts any device with the given vendor and product IDs.
Generic connection class not specific to the transport mechanism.
vrpn_DreamCheeky_Drum_Kit(const char *name, vrpn_Connection *c=0, bool debounce=true)
void decodePacket(size_t bytes, vrpn_uint8 *buffer)
vrpn_DreamCheeky(vrpn_HidAcceptor *filter, const char *name, vrpn_Connection *c=0)
virtual void decodePacket(size_t bytes, vrpn_uint8 *buffer)=0
vrpn_HidAcceptor * _filter
struct timeval _timestamp
#define vrpn_gettimeofday
virtual void update()
Polls the device buffers and causes on_data_received callbacks if appropriate You NEED to call this f...
Class from which all user-level (and other) classes that communicate with vrpn_Connections should der...
virtual void mainloop()
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
void report_changes(void)