Access to an input/HID device using the Input API in Linux.
More...
#include <InputDeviceHandle.h>
Access to an input/HID device using the Input API in Linux.
- 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::InputDeviceHandle::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::InputDeviceHandle::getDeviceName |
( |
| ) |
const |
|
overridevirtual |
§ hasTranslationAndRotationAxes()
bool SurgSim::Devices::InputDeviceHandle::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.
§ updateStates()
bool SurgSim::Devices::InputDeviceHandle::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/linux/InputDeviceHandle.h
- SurgSim/Devices/MultiAxis/linux/InputDeviceHandle.cpp