IOHIDDeviceGetValueWithCallback
Gets a value for an element and returns status via a completion callback.
Declaration
IOReturn IOHIDDeviceGetValueWithCallback(IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef _Nonnull *pValue, CFTimeInterval timeout, IOHIDValueCallback callback, void *context);Parameters
- device:
Reference to an IOHIDDevice.
- element:
IOHIDElementRef whose value is to be obtained.
- pValue:
Pointer to IOHIDValueRef to be passedback.
- timeout:
CFTimeInterval containing the timeout.
- callback:
Pointer to a callback method of type IOHIDValueCallback.
- context:
Pointer to data to be passed to the callback.
Return Value
Returns kIOReturnSuccess if successful.
Discussion
This method behaves asynchronusly and is only relevent for either output or feature type elements. If obtaining values for multiple elements you may want to consider using IOHIDDeviceCopyValueMultipleWithCallback or IOHIDTransaction.
See Also
Miscellaneous
IOHIDDeviceCloseIOHIDDeviceConformsToIOHIDDeviceCopyMatchingElementsIOHIDDeviceCopyValueMultipleIOHIDDeviceCopyValueMultipleWithCallbackIOHIDDeviceCreateIOHIDDeviceGetPropertyIOHIDDeviceGetReportIOHIDDeviceGetReportWithCallbackIOHIDDeviceGetServiceIOHIDDeviceGetTypeIDIOHIDDeviceGetValueIOHIDDeviceOpenIOHIDDeviceRegisterInputReportCallbackIOHIDDeviceRegisterInputValueCallbackIOHIDDeviceRegisterRemovalCallbackIOHIDDeviceScheduleWithRunLoopIOHIDDeviceSetInputValueMatchingIOHIDDeviceSetInputValueMatchingMultipleIOHIDDeviceSetPropertyIOHIDDeviceSetReportIOHIDDeviceSetReportWithCallbackIOHIDDeviceSetValueIOHIDDeviceSetValueMultipleIOHIDDeviceSetValueMultipleWithCallbackIOHIDDeviceSetValueWithCallbackIOHIDDeviceUnscheduleFromRunLoop