Mac Developer Library

Developer

IOFireWireSBP2LUN Class Reference

Options
Deployment Target:

On This Page
Language:

IOFireWireSBP2LUN

Provider for most drivers.

IOFireWireSBP2LUN objects are created by IOFireWireSBP2Target objects. Each target may have zero or more IOFireWireSBP2LUN children. The LUN object serves as the matching nub for most drivers and therefore will be the provider for most drivers. It supplies the methods that control the operation of the LUN as a whole. Methods that control the behavior and execution of an SBP2 login session are supplied in a separate IOFireWireSBP2Login object. The LUN can be used to create one of these login objects. The LUN can also create IOFireWireSBP2ManagementORBs for configuring and appending non-login related management functions. Login related management functions (ie. Login, Logout, Reconnect) are supplied by the IOFireWireSBP2Login. Finally the LUN can supply a reference to the IOFireWireUnit. This can be useful if a driver wishes to access the standard FireWire APIs.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.0 and later.
  • Attaches an IOService client to a provider in the registry.

    Declaration

    C++

    virtual bool attach( IOService *provider );

    Parameters

    provider

    The IOService object which will serve as this objects provider.

    Return Value

    false if the provider is inactive or on a resource failure, otherwise true.

    Discussion

    See IOService for discussion.

  • Creates a new IOFireWireSBP2Login object.

    Declaration

    C++

    virtual IOFireWireSBP2Login *createLogin( void );

    Return Value

    Returns a pointer to a new IOFireWireSBP2Login.

    Discussion

    Creates a new IOFireWireSBP2Login object for the LUN. Login objects supply most of the SBP2 APIs related to login maintenance and Normal Command ORB execution.

  • Creates a new IOFireWireSBP2ManagementORB object.

    Declaration

    C++

    virtual IOFireWireSBP2ManagementORB * createManagementORB( void *refCon, FWSBP2ManagementCallbackcompletion );

    Parameters

    refCon

    The refcon passed to the completion routine.

    completion

    The completion routine. Called when the ORB finishes execution.

    Return Value

    Returns a pointer to a new IOFireWireSBP2Login.

    Discussion

    Creates a new IOFireWireSBP2ManagementORB object. Management objects let you execute commands like QueryLogins, LogicalUnitReset, and AbortTask. These commands are configured after they are created here. When they are done executing (after a call to submit) the supplied completion routine will be called with the supplied refcon. Usually this refCon is the "this" pointer of completion method's object.

  • Debug-only method.

    Declaration

    C++

    virtual OSObject * getDiagnostics( void );

    Return Value

    Returns a pointer to the diagnostics object (if any).

    Discussion

    Returns a reference to the internal diagnostics object when the services are built in debug mode. Should be a no-op in release builds.

  • Returns an IOFireWireUnit object.

    Declaration

    C++

    virtual IOFireWireUnit * getFireWireUnit( void );

    Return Value

    Returns a pointer to an IOFireWireUnit.

    Discussion

    An IOFireWireUnit is the provider of an IOFireWireSBP2Target. In order to use the base FireWire services you will need a reference to the unit. This method returns that reference.

  • Returns the LUNs number.

    Declaration

    C++

    virtual UInt32 getLUNumber( void );

    Return Value

    Returns a UInt32 containing the Logical Unit Number.

    Discussion

    Each LUN has a number to uniquely identify it on a device. This method returns this value in a UInt32.

  • Overrideable method to control the open / close behaviour of an IOService.

    Declaration

    C++

    virtual void handleClose( IOService *forClient, IOOptionBitsoptions );

    Parameters

    forClient

    Designates the client of the provider requesting the close.

    options

    Options for the close, may be interpreted by the implementor of handleOpen.

    Discussion

    See IOService for discussion.

  • Overrideable method to control the open / close behaviour of an IOService.

    Declaration

    C++

    virtual bool handleOpen( IOService *forClient, IOOptionBits options, void *arg );

    Parameters

    forClient

    Designates the client of the provider requesting the open.

    options

    Options for the open, may be interpreted by the implementor of handleOpen.

    Return Value

    Return true if the open was successful, false otherwise.

    Discussion

    See IOService for discussion.

  • Implements SBP2 specific matching.

    Declaration

    C++

    virtual bool matchPropertyTable( OSDictionary *table);

    Parameters

    table

    The dictionary of properties to be matched against.

    Return Value

    Returns false if the family considers the matching dictionary does not match in properties it understands, true otherwise.

    Discussion

    See IOService for discussion.