IOFireWireSBP2LUN

Inherits from
IOService
Availability
Available in OS X v10.0 and later.
Declared in
IOFireWireSBP2LUN.h

Overview

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.

Tasks

Miscellaneous

Instance Methods

attach

Attaches an IOService client to a provider in the registry.

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.

createLogin

Creates a new IOFireWireSBP2Login object.

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.

createManagementORB

Creates a new IOFireWireSBP2ManagementORB object.

virtual IOFireWireSBP2ManagementORB * createManagementORB( void *refCon, FWSBP2ManagementCallback completion );
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.

getDiagnostics

Debug-only method.

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.

getFireWireUnit

Returns an IOFireWireUnit object.

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.

getLUNumber

Returns the LUNs number.

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.

handleClose

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

virtual void handleClose( IOService *forClient, IOOptionBits options );
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.

handleOpen

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

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.

matchPropertyTable

Implements SBP2 specific matching.

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.