vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file.
30 #ifndef VRPN_HUMANINTERFACE_H
31 #define VRPN_HUMANINTERFACE_H
61 #if defined(VRPN_USE_HID)
74 virtual bool connected()
const;
79 virtual void update();
83 virtual bool reconnect();
86 vrpn_uint16 vendor()
const;
89 vrpn_uint16 product()
const;
92 int interface_number()
const;
108 void send_data(
size_t bytes,
const vrpn_uint8 *buffer);
112 void send_feature_report(
size_t bytes,
const vrpn_uint8 *buffer);
117 int get_feature_report(
size_t bytes, vrpn_uint8 *buffer);
138 #endif // VRPN_USE_HID
159 return (device.
vendor == vendor) && (device.
product == product);
163 vrpn_uint16 product, vendor;
179 const wchar_t *devNum;
218 return delegate->accept(device) && (found++ == target);
227 size_t target, found;
242 bool p = first->accept(device);
243 bool q = second->accept(device);
267 bool p = first->accept(device);
268 bool q = second->accept(device);
283 #endif // VRPN_HUMANINTERFACE_H
bool accept(const vrpn_HIDDEVINFO &device)
Accepts any device with a particular interface number. Best in conjunction with vrpn_HidBooleanAndAcc...
vrpn_HidSerialNumberAcceptor(const wchar_t *serial)
Accepts devices meeting at least one of two criteria. NOT SHORT-CIRCUIT. Another demonstration of acc...
vrpn_HidProductAcceptor(vrpn_uint16 vendorId, vrpn_uint16 productId)
Accepts the Nth device matching a given acceptor.
bool accept(const vrpn_HIDDEVINFO &device)
bool accept(const vrpn_HIDDEVINFO &)
vrpn_HidBooleanAndAcceptor(vrpn_HidAcceptor *p, vrpn_HidAcceptor *q)
struct hid_device_ hid_device
vrpn_HidInterfaceNumberAcceptor(int iface)
Accepts any device with the given vendor and product IDs.
virtual ~vrpn_HidAcceptor()
bool accept(const vrpn_HIDDEVINFO &device)
Accepts any device with a particular serial number.
vrpn_HidNthMatchAcceptor(size_t index, vrpn_HidAcceptor *acceptor)
virtual ~vrpn_HidNthMatchAcceptor()
virtual void on_data_received(size_t bytes, vrpn_uint8 *buffer)=0
Derived class reimplements this callback.
bool accept(const vrpn_HIDDEVINFO &device)
virtual bool accept(const vrpn_HIDDEVINFO &device)=0
bool accept(const vrpn_HIDDEVINFO &device)
bool accept(const vrpn_HIDDEVINFO &device)
Accepts only devices meeting two criteria. NOT SHORT-CIRCUIT. Another demonstration of acceptor compo...
vrpn_HidAcceptor * _acceptor
This is the HidAcceptor we use when reconnecting.
Always accepts the first device passed. Pointless by itself except for testing.
vrpn_HidBooleanOrAcceptor(vrpn_HidAcceptor *p, vrpn_HidAcceptor *q)
wchar_t * manufacturer_string