Mac Developer Library

Developer

IOUSBPipeV2 Class Reference

Options
Deployment Target:

On This Page

IOUSBPipeV2

The object representing an open pipe for a device.

  • Declaration

    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

  • Declaration

    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

  • Declaration

    virtual IOReturn CreateStreams( UInt32 maxStreams);

    Parameters

    streamID

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

  • Declaration

    virtual UInt16 GetBytesPerInterval();

    Discussion

    returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

  • Declaration

    virtual UInt32 GetConfiguredStreams( void);

    Discussion

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

  • Declaration

    virtual UInt16 GetBytesPerInterval();

    Discussion

    returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

  • Declaration

    virtual UInt8 GetMaxBurst();

    Discussion

    returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

  • Declaration

    virtual UInt8 GetMult();

    Discussion

    returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

  • Declaration

    virtual UInt8 GetMult();

    Discussion

    returns the value of bMaxBurst from the SuperSpeed endpoint companion descriptor

  • Declaration

    virtual const IOUSBSuperSpeedEndpointCompanionDescriptor * GetSuperSpeedEndpointCompanionDescriptor();

    Discussion

    returns the SuperSpeed endpoint companion descriptor for the pipe.

  • Declaration

    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

  • Declaration

    virtual UInt32 SupportsStreams( void);

    Discussion

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

  • Declaration

    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