Access to an input/HID device using the HID API from the Windows Driver Kit.
More...
#include <WdkHidDeviceHandle.h>
Access to an input/HID device using the HID API from the Windows Driver Kit.
- See also
- SystemInputDeviceHandle
§ enumeratePaths()
Enumerates input devices.
- Parameters
-
logger | The logger to be used during enumeration. |
- Returns
- A list of device paths.
§ getDeviceIds()
bool SurgSim::Devices::WdkHidDeviceHandle::getDeviceIds |
( |
int * |
vendorId, |
|
|
int * |
productId |
|
) |
| const |
|
overridevirtual |
Gets the device identifiers.
- Parameters
-
[out] | vendorId | The USB or PCI vendor identifier. |
[out] | productId | The USB or PCI product identifier. |
- Returns
- true if it succeeds.
Implements SurgSim::Devices::SystemInputDeviceHandle.
§ getDeviceName()
std::string SurgSim::Devices::WdkHidDeviceHandle::getDeviceName |
( |
| ) |
const |
|
overridevirtual |
§ hasTranslationAndRotationAxes()
bool SurgSim::Devices::WdkHidDeviceHandle::hasTranslationAndRotationAxes |
( |
| ) |
const |
|
overridevirtual |
§ open()
Opens the given path and creates an access wrapper for the device.
- Parameters
-
path | Full pathname for the device. |
logger | The logger to be used by the device. |
- Returns
- The created device object, or an empty unique_ptr on failure.
§ prepareForShutdown()
void SurgSim::Devices::WdkHidDeviceHandle::prepareForShutdown |
( |
| ) |
|
|
overridevirtual |
Prepares the handle for sampling thread shutdown.
Should be called from the same thread that was calling updateStates, after the calls to updateStates have been stopped, but before object destruction.
Reimplemented from SurgSim::Devices::SystemInputDeviceHandle.
§ updateStates()
bool SurgSim::Devices::WdkHidDeviceHandle::updateStates |
( |
AxisStates * |
axisStates, |
|
|
ButtonStates * |
buttonStates, |
|
|
bool * |
updated |
|
) |
| |
|
overridevirtual |
Updates the axis and states from the device input, if any.
- Parameters
-
[in,out] | axisStates | The states for each axis of the device. |
[in,out] | buttonStates | The states for each device button. |
[out] | updated | True if any states were actually updated. (Note that even if this value is true, the states may not have changed value; one or more states could have been updated to the same value.) |
- Returns
- true if the operation was successful; false if the device is no longer in a usable state.
Implements SurgSim::Devices::SystemInputDeviceHandle.
The documentation for this class was generated from the following files:
- SurgSim/Devices/MultiAxis/win32/WdkHidDeviceHandle.h
- SurgSim/Devices/MultiAxis/win32/WdkHidDeviceHandle.cpp