ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOUSBHubDevice

Inherits from:
Declared In:

Overview

New in MAC OS X 10.5. The IOKit object representing a hub device on the USB bus. It is a subclass of IOUSBDevice.

Discussion

With the exception of the IOUSBRootHubDevice objects representing the root hubs, every IOUSBDevice will have an IOUSBHubDevice as its parent in the IOUSB plane. USB KEXT drivers will have the ability to query this device for characteristics of the hub into which they are connected. This class will also give a dive driver the abilty to get an IOService* pointing to the hub driver itself, which can then be used as the parent in the power plane.



Functions

GetHubCharacteristics
GetMaxProvidedPower
GetPolicyMaker
RequestProvidedPower

GetHubCharacteristics


public

virtual UInt32 GetHubCharacteristics();
Return Value

returns a bitmap of characteristics

Discussion

returns characteristics of the hub device which might be useful for the driver of a device connected to the hub. kIOUSBHubDeviceIsRootHub indicates that the hub is a root hub kIOUSBHubDeviceIsOnHighSpeedBus indicates that the hub is running on a High Speed bus. If this bit is set and kIOUSBHubDeviceIsHighSpeed is clear, then this is a Classic Speed hub running on a High Speed bus, which means that Split Transactions will be used to communicate with downstream devices.


GetMaxProvidedPower


public

virtual UInt32 GetMaxProvidedPower();
Return Value

the power is returned in milliamps - usually 100ma or 500 ma.

Discussion

returns the maximum amount of power available on any downstream port of this hub


GetPolicyMaker


public

virtual IOUSBHubPolicyMaker *GetPolicyMaker( void);
Return Value

returns an IOUSBHubPolicyMaker* pointing to the policy maker for this hub. returns NULL is no policy maker is active on the hub device.

Discussion

returns a pointer to the policy maker for the hub, which can be used as the power plane parent.


RequestProvidedPower


public

virtual UInt32 RequestProvidedPower( UInt32 requestedPower);
Parameters
requestedPower

- the amount of power requested in milliamps (usually 100ma or 500 ma)

Return Value

the amount of power allocated for this driver in milliamps (usually 100ma or 500 ma)

Discussion

requests power from the hub device


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19