IOHIDDevice.h User-Space

Overview

IOHIDDevice defines a Human Interface Device (HID) object, which interacts with an IOHIDDevicePlugIn object that typically maps to an object in the kernel. IOHIDDevice is used to communicate with a single HID device in order to obtain or set device properties, element values, and reports. IOHIDDevice is also a CFType object and as such conforms to all the conventions expected such object.

This documentation assumes that you have a basic understanding of the material contained in Accessing Hardware From Applications For definitions of I/O Kit terms used in this documentation, such as matching dictionary, family, and driver, see the overview of I/O Kit terms and concepts n the "Device Access and the I/O Kit" chapter of Accessing Hardware From Applications.

This documentation also assumes you have read Human Interface Device & Force Feedback. Please review documentation before using this reference.

All of the information described in this document is contained in the header file IOHIDDevice.h found at /System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDDevice.h.

Included Headers

  • <CoreFoundation/CoreFoundation.h>

  • <IOKit/hid/IOHIDBase.h>

Topics

Miscellaneous

IOHIDDeviceClose

Closes communication with a HID device.

IOHIDDeviceConformsTo

Convenience function that scans the Application Collection elements to see if it conforms to the provided usagePage and usage.

IOHIDDeviceCopyMatchingElements

Obtains HID elements that match the criteria contained in the matching dictionary.

IOHIDDeviceCopyValueMultiple

Copies a values for multiple elements.

IOHIDDeviceCopyValueMultipleWithCallback

Copies a values for multiple elements and returns status via a completion callback.

IOHIDDeviceCreate

Creates an element from an io_service_t.

IOHIDDeviceGetProperty

Obtains a property from an IOHIDDevice.

IOHIDDeviceGetReport

Obtains a report from the device.

IOHIDDeviceGetReportWithCallback

Obtains a report from the device.

IOHIDDeviceGetService

Returns the io_service_t for an IOHIDDevice, if it has one.

IOHIDDeviceGetTypeID

Returns the type identifier of all IOHIDDevice instances.

IOHIDDeviceGetValue

Gets a value for an element.

IOHIDDeviceGetValueWithCallback

Gets a value for an element and returns status via a completion callback.

IOHIDDeviceOpen

Opens a HID device for communication.

IOHIDDeviceRegisterInputReportCallback

Registers a callback to be used when an input report is issued by the device.

IOHIDDeviceRegisterInputValueCallback

Registers a callback to be used when an input value is issued by the device.

IOHIDDeviceRegisterRemovalCallback

Registers a callback to be used when a IOHIDDevice is removed.

IOHIDDeviceScheduleWithRunLoop

Schedules HID device with run loop.

IOHIDDeviceSetInputValueMatching

Sets matching criteria for input values received via IOHIDDeviceRegisterInputValueCallback.

IOHIDDeviceSetInputValueMatchingMultiple

Sets multiple matching criteria for input values received via IOHIDDeviceRegisterInputValueCallback.

IOHIDDeviceSetProperty

Sets a property for an IOHIDDevice.

IOHIDDeviceSetReport

Sends a report to the device.

IOHIDDeviceSetReportWithCallback

Sends a report to the device.

IOHIDDeviceSetValue

Sets a value for an element.

IOHIDDeviceSetValueMultiple

Sets multiple values for multiple elements.

IOHIDDeviceSetValueMultipleWithCallback

Sets multiple values for multiple elements and returns status via a completion callback.

IOHIDDeviceSetValueWithCallback

Sets a value for an element and returns status via a completion callback.

IOHIDDeviceUnscheduleFromRunLoop

Unschedules HID device with run loop.