HID Explorer-Read Me.txt

HID Explorer
Human Interface Device Explorer
 
Version 4.1     14 Apr 2008
 
----
 
This application is a Carbon NIB sample which builds a list of all HID device and device elements attached to a Mac OS X system.  It allows the exploration of all device and element parameters and values.  The application also polls the current elements for their values; these values are then calibrated to the full range reported and also scaled to a range of 0 to 255.
 
----
 
Requirements: Mac OS X 10.5, Xcode 3.0
 
Packing List
------------
The sample contains the following items:
 
    HID Explorer-Read Me.txt        - this file
    HID Explorer.xcodeproj          - Xcode project file
    configs                         - Xcode configuration files
    HID Explorer.pch                - prefix header file
    main.c                          - main source file
    HID Explorer-Info.plist         - source for info.plist
    English.lproj                   - English localization files
        ⁃   main.nib                - the main nib
        ⁃   InfoPlist.strings       - strings file
    HID Utilities                   - folder of sources for HID utility files
        ⁃   IOHIDLib_.h             - single include header for HID utility files
        ⁃   HID_Utilities.c         - HID utility source
        ⁃   HID_Utilities.h         - HID utility header
        ⁃   IOHIDDevice_.c          - HID Device utilities source
        ⁃   IOHIDDevice_.h          - HID Device utilities header
        ⁃   IOHIDElement_.c         - HID Element utilities source
        ⁃   IOHIDElement_.h         - HID Element utilities source
        ⁃   English.lproj           - HID utilities localization files
            ⁃   HID_usage_strings.plist - HID usage strings (XML) file
    build                           - contains a prebuilt binary.
 
 
HID_Config.pch
InfoPlist.strings
build
configs
English.lproj
English.lproj
HID Utilities
 
Building the Sample
-------------------
The sample was built using Xcode 3.0 on Mac OS X 10.5.  You should be able to just open the project and choose Build from the Build menu.  This will build "HID Explorer.app" in the "build/debug" or "build/release" directory.
 
Using the Sample
----------------
Launch "HID Explorer"
The top pop-up menu is populated with currently connected HID Devices. Select one of these devices and its information will be displayed in the top third of the window and the bottom pop-up menu will be populated with all the elements for the selected device. Select one of these elements and its information will be displayed in the bottom half of the window. At the bottom of the window are three sliders that display the current physical, logical and calibrated values for the selected element.
 
How the code works
------------
In main after the main nib is loaded and used to create the application menus and a window then event handlers are installed that draw the three custom slider controls (physical, logical and calibrated). Then Build_AppDeviceList is called which opens a connection the the HID Manager and then calls Build_DeviceMenu to populate the top (device) pop-up menu. When the user selects a device from this pop-up menu the Handle_WindowEvents routine is called and it then calls Update_WindowDeviceInfo which updates all the device controls in the top third of the screen; it also calls Build_ElementMenu which populates the lower (element) pop-up menu. When an element in this pop-up is selected the Handle_WindowEvents routine is called and it calls Update_WindowElementInfo to update the lower half of the screen with the eleemnt information.
 
Caveats
-------
 
This demonstration application and the set of utilities is constantly evolving to both address any bugs and provide better support for developer requested features. Any suggestions and/or bugs can be directed to the Apple bug reporter at: <http://developer.apple.com/bugreporter/index.html>
 
We hope this helps people get up and running with the HID Manager APIs introduced in 10.5 in a quick and painless manner.
 
Credits and Version History
---------------------------
 
Version 4.1     Prefix file renamed; typo's fixed, etc. no code changes. (versions sync'd also)
 
Version 4.0:    Update for new Leopard API's and Universal Binary. 
                Dropped MWCW, Project Builder and CFM support.
 
Version 3.0:    Update for new interface types and include files. Added
                CFM support in separate CW project.  This CFM
                application utilizes the HID.Bundle (containing a MachO
                dylib).  The sample is set up to look for the bundle in
                the same directory as the application (which could be
                modified easily to suit developer needs).  Note, this
                CFM sample application is bundled (with the CW project
                designed to put the executable in the correct place with
                the correct name for the bundle) but this is only to
                support the Nib interface. There is no requirement for a
                bundled application to use HID Utilities CFM support.
 
Version 2.0:    Update.  Update to include parser fro PID and Power
                devices. Modified handling of elements to build
                heirarchy menus from binary tree of elements. Fixed some
                Mac OS X issues.
 
Version 1.0:    Initial release.  Application to demonstrate acquiring
                and deciphering HID devices using HID Utility functions.
 
 
Share and Enjoy.
Apple Developer Technical Support