IOHIDTransaction.h

Overview

IOHIDTransaction defines an object used to manipulate multiple parsed items (IOHIDElement) contained within a Human Interface Device (HID) object. It is used to minimize device communication when interacting with feature and output type elements that are grouped by their report IDs. IOHIDTransaction is 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 in 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 IOHIDTransaction.h found at /System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDTransaction.h.

Included Headers

  • <CoreFoundation/CoreFoundation.h>

  • <IOKit/hid/IOHIDBase.h>

Topics

Miscellaneous

IOHIDTransactionAddElement

Adds an element to the transaction @disussion To minimize device traffic it is important to add elements that share a common report type and report id.

IOHIDTransactionClear

Clears element transaction values.

IOHIDTransactionCommit

Synchronously commits element transaction to the device.

IOHIDTransactionCommitWithCallback

Commits element transaction to the device.

IOHIDTransactionContainsElement

Queries the transaction to determine if elemement has been added.

IOHIDTransactionCreate

Creates an IOHIDTransaction object for the specified device.

IOHIDTransactionGetDevice

Obtain the device associated with the transaction.

IOHIDTransactionGetDirection

Obtain the direction of the transaction.

IOHIDTransactionGetTypeID

Returns the type identifier of all IOHIDTransaction instances.

IOHIDTransactionGetValue

Obtains the value for a transaction element.

IOHIDTransactionRemoveElement

Removes an element to the transaction

IOHIDTransactionScheduleWithRunLoop

Schedules transaction with run loop.

IOHIDTransactionSetDirection

Sets the direction of the transaction @disussion This method is useful for manipulating bi-direction (feature) elements such that you can set or get element values without creating an additional transaction object.

IOHIDTransactionSetValue

Sets the value for a transaction element.

IOHIDTransactionUnscheduleFromRunLoop

Unschedules transaction with run loop.

Data Types

See the Overview for header-level documentation.