IOUSBPipeV2

Inherits from
IOUSBPipe
Availability
Available in OS X v10.8 and later.
Declared in
IOUSBPipeV2.h

Overview

The object representing an open pipe for a device.

Tasks

Miscellaneous

Instance Methods

Abort

virtual IOReturn Abort( UInt32 streamID);
Parameters
streamID

ID of the stream to abort

Discussion

This method causes all outstanding I/O on a stream of a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall

Abort(stream)

virtual IOReturn Abort( UInt32 streamID);
Parameters
streamID

ID of the stream to abort

Discussion

This method causes all outstanding I/O on a stream of a pipe to complete with return code kIOReturnAborted. It clears the halted bit but does NOT clear the toggle bit on the endpoint in the controller. If you wish to clear the toggle bit, see ClearPipeStall

CreateStreams

virtual IOReturn CreateStreams( UInt32 maxStreams);
Parameters
streamID

ID of the highest stream to create (pass 0 to destroy streams)

GetBytesPerInterval

virtual UInt16 GetBytesPerInterval();
Discussion

returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

GetConfiguredStreams

virtual UInt32 GetConfiguredStreams( void);
Discussion

Get the number of streams which have been configured for the endpoint with CreateStreams

GetMaxBurst

virtual UInt16 GetBytesPerInterval();
Discussion

returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

GetMaxBurst()

virtual UInt8 GetMaxBurst();
Discussion

returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

GetMaxBurst()

virtual UInt8 GetMult();
Discussion

returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

GetMult

virtual UInt8 GetMult();
Discussion

returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

GetSuperSpeedEndpointCompanionDescriptor

virtual const IOUSBSuperSpeedEndpointCompanionDescriptor * GetSuperSpeedEndpointCompanionDescriptor();
Discussion

returns the SuperSpeed endpoint companion descriptor for the pipe.

Read

virtual IOReturn Read( UInt32 streamID, IOMemoryDescriptor *buffer, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount, IOUSBCompletion *completion = 0, IOByteCount *bytesRead = 0);
Parameters
streamID

ID of the stream to read from

buffer

place to put the transferred data

noDataTimeout

number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out the driver software may have to resynchronize the data toggle. See ClearPipeStall.

completionTimeout

number of milliseconds from the time the transaction is placed on the bus until it times out

reqCount

requested number of bytes to transfer. must be <= buffer->getLength()

completion

describes action to take when buffer has been filled

bytesRead

returns total bytes read for synchronous reads

Discussion

Read from a stream on a bulk endpoint

SupportsStreams

virtual UInt32 SupportsStreams( void);
Discussion

Returns non zero if the pipe supports streams. Return value is the max supported stream.

Write

virtual IOReturn Write( UInt32 streamID, IOMemoryDescriptor *buffer, UInt32 noDataTimeout, UInt32 completionTimeout, IOByteCount reqCount, IOUSBCompletion *completion = 0);
Parameters
streamID

ID of the stream to write to

buffer

place to get the transferred data

noDataTimeout

number of milliseconds of no bus activity until transaction times out. Note that if a tranasction times out the driver software may have to resynchronize the data toggle. See ClearPipeStall.

completionTimeout

number of milliseconds from the time the transaction is placed on the bus until it times out

reqCount

requested number of bytes to transfer. must be <= buffer->getLength()

completion

describes action to take when buffer has been emptied

Discussion

Write to a stream on a bulk endpoint