14#ifndef VRPN_ANALOG_5DTUSB_H
15#define VRPN_ANALOG_5DTUSB_H
27#if defined(VRPN_USE_HID)
136 product(desiredProduct),
142 return (device.
vendor == vendor) && ((device.
product & mask) == (product & mask));
virtual ~vrpn_Analog_5dtUSB_Glove14Left()
vrpn_Analog_5dtUSB_Glove14Left(const char *name, vrpn_Connection *c=0)
virtual ~vrpn_Analog_5dtUSB_Glove14Right()
vrpn_Analog_5dtUSB_Glove14Right(const char *name, vrpn_Connection *c=0)
virtual ~vrpn_Analog_5dtUSB_Glove5Left()
vrpn_Analog_5dtUSB_Glove5Left(const char *name, vrpn_Connection *c=0)
virtual ~vrpn_Analog_5dtUSB_Glove5Right()
vrpn_Analog_5dtUSB_Glove5Right(const char *name, vrpn_Connection *c=0)
5th Dimension Technologies (5dt) "Ultra" USB data glove driver
vrpn_Analog_5dtUSB(vrpn_HidAcceptor *filter, int num_sensors, bool isLeftHand, const char *name, vrpn_Connection *c=0)
Protected constructor: use a subclass to specify the glove variant to use.
bool _wasConnected
Flag indicating whether we were connected last time through the mainloop. Used to send a "normal"-sev...
struct timeval _timestamp
Timestamp updated during mainloop()
bool isRightHand() const
Accessor to know if this is a right hand glove.
std::string get_description() const
Returns a string description of the device we've connected to. Used internally, but also possibly use...
bool isLeftHand() const
Accessor to know if this is a left hand glove.
double _rawVals[16]
The raw values extracted from the report: which ones we use to set analog channels varies based on th...
bool _isLeftHand
Flag for left handedness.
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
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 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...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
vrpn_HidInterface(vrpn_HidAcceptor *acceptor, vrpn_uint16 vendor=0, vrpn_uint16 product=0, hid_device *device=NULL)
Constructor If we already have a HID device from some other source, it can be passed and we'll take o...
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
vrpn_HidProductMaskAcceptor(vrpn_uint16 vendorId, vrpn_uint16 productMask=0x0000, vrpn_uint16 desiredProduct=0x0000)
bool accept(const vrpn_HIDDEVINFO &device)
~vrpn_HidProductMaskAcceptor()
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY