ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


MMCDeviceInterface

Declared In:

Overview

Basic interface for an MMC-2 Compliant Device.

Discussion

After rendezvous with a MMC-2 Compliant Device in the I/O Registry you can create an instance of this interface as a proxy to the IOService. Once you have this interface, or one of its subclasses, you can issue some select MMC-2 calls to the device without getting exclusive access first.



Functions

GetConfiguration

Issues a GET_CONFIGURATION command to the device as defined in MMC-2.

GetPerformance

Issues a GET_PERFORMANCE command to the device as defined in MMC-2.

GetPerformanceV2

Issues a GET_PERFORMANCE command to the device as defined in Mt. Fuji 5.

GetSCSITaskDeviceInterface

Gets a handle to the SCSITaskDeviceInterface without closing the user client connection which was initiated by IOCreateCFPlugInForService.

GetTrayState

Issues a GET_EVENT_STATUS_NOTIFICATION command to the device as defined in MMC-2.

Inquiry

Issues an INQUIRY command to the device as defined in SPC-2.

ModeSense10

Issues a MODE_SENSE_10 command to the device as defined in SPC-2.

ReadDiscInformation

Issues a READ_DISC_INFORMATION command to the device as defined in MMC-2.

ReadDiscInformationV2

Issues a READ_DISC_INFORMATION command to the device as defined in MMC-5.

ReadDiscStructure

Issues a READ_DISC_STRUCTURE command to the device as defined in MMC-5.

ReadDVDStructure

Issues a READ_DVD_STRUCTURE command to the device as defined in MMC-2.

ReadFormatCapacities

Issues a READ_FORMAT_CAPACITIES command to the device as defined in MMC-2.

ReadTableOfContents

Issues a READ_TOC_PMA_ATIP command to the device as defined in MMC-2/SFF-8020i.

ReadTrackInformation

Issues a READ_TRACK_INFORMATION command to the device as defined in MMC-2.

ReadTrackInformationV2

Issues a READ_TRACK_INFORMATION command to the device as defined in Mt. Fuji 5.

SetCDSpeed

Issues a SET_CD_SPEED command to the device as defined in MMC-2.

SetTrayState

Issues a START_STOP_UNIT command to the device as defined in SBC-3.

SetWriteParametersModePage

Issues a MODE_SELECT command to the device as defined in SPC-2 with the Write Parameters Mode Page Code as defined in MMC-2.

TestUnitReady

Issues a TEST_UNIT_READY command to the device as defined in SPC-2.


GetConfiguration


Issues a GET_CONFIGURATION command to the device as defined in MMC-2.

IOReturn ( *GetConfiguration )(
    void *self, 
    SCSICmdField1Byte RT, 
    SCSICmdField2Byte STARTING_FEATURE_NUMBER, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

RT

The RT field as described for the GET_CONFIGURATION command in MMC-2.

STARTING_FEATURE_NUMBER

The STARTING_FEATURE_NUMBER field as described in MMC-2 for the GET_CONFIGURATION command.

buffer

Pointer to the buffer where the mode sense data should be placed.

bufferSize

Size of the buffer.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to get configuration information from the device.


GetPerformance


Issues a GET_PERFORMANCE command to the device as defined in MMC-2.

IOReturn ( *GetPerformance )(
    void *self, 
    SCSICmdField2Bit TOLERANCE, 
    SCSICmdField1Bit WRITE, 
    SCSICmdField2Bit EXCEPT, 
    SCSICmdField4Byte STARTING_LBA, 
    SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

TOLERANCE

The TOLERANCE field as described for the GET_PERFORMANCE command in MMC-2.

WRITE

The WRITE bit as described in MMC-2 for the GET_PERFORMANCE command.

EXCEPT

The EXCEPT field as described in MMC-2 for the GET_PERFORMANCE command.

STARTING_LBA

The STARTING_LBA field as described in MMC-2 for the GET_PERFORMANCE command.

MAXIMUM_NUMBER_OF_DESCRIPTORS

The MAXIMUM_NUMBER_OF_DESCRIPTORS field as described in MMC-2 for the GET_PERFORMANCE command.

buffer

Pointer to the buffer where the mode sense data should be placed.

bufferSize

Size of the buffer.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to get performance information from the device.


GetPerformanceV2


Issues a GET_PERFORMANCE command to the device as defined in Mt. Fuji 5.

IOReturn ( *GetPerformanceV2 )(
    void *self, 
    SCSICmdField5Bit DATA_TYPE, 
    SCSICmdField4Byte STARTING_LBA, 
    SCSICmdField2Byte MAXIMUM_NUMBER_OF_DESCRIPTORS, 
    SCSICmdField1Byte TYPE, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

DATA_TYPE

The DATA_TYPE field as described for the GET_PERFORMANCE command in Mt. Fuji 5.

STARTING_LBA

The STARTING_LBA field as described in Mt. Fuji 5 for the GET_PERFORMANCE command.

MAXIMUM_NUMBER_OF_DESCRIPTORS

The MAXIMUM_NUMBER_OF_DESCRIPTORS field as described in Mt. Fuji 5 for the GET_PERFORMANCE command.

TYPE

The TYPE field as described for the GET_PERFORMANCE command in Mt. Fuji 5.

buffer

Pointer to the buffer where the mode sense data should be placed.

bufferSize

Size of the buffer.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to get performance information from the device.


GetSCSITaskDeviceInterface


Gets a handle to the SCSITaskDeviceInterface without closing the user client connection which was initiated by IOCreateCFPlugInForService.

SCSITaskDeviceInterface ** ( *GetSCSITaskDeviceInterface )(
    void *self );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

Return Value

Returns a handle to a SCSITaskDeviceInterface if successful, otherwise NULL.

Discussion

Once an MMCDeviceInterface is opened the client may use this function to get a handle to the interface used to create and send SCSITasks directly to the device.


GetTrayState


Issues a GET_EVENT_STATUS_NOTIFICATION command to the device as defined in MMC-2.

IOReturn ( *GetTrayState )(
    void *self,
    UInt8 *trayState );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

trayState

Pointer to a UInt8 which will hold the tray state on completion of the routine. The tray state can be one of two values, kMMCDeviceTrayClosed or kMMCDeviceTrayOpen.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to find out if the device's medium tray is open.


Inquiry


Issues an INQUIRY command to the device as defined in SPC-2.

IOReturn ( *Inquiry )(
    void *self, 
    SCSICmd_INQUIRY_StandardData *inquiryBuffer, 
    UInt32 inqBufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

inquiryBuffer

A pointer to a buffer the size of the SCSICmd_INQUIRY_StandardData struct found in SCSICmds_INQUIRY_Definitions.h.

inqBufferSize

The amount of INQUIRY data to ask the device for (some devices return less INQUIRY data than the size of SCSICmd_INQUIRY_StandardData and will need to be reset if more than that amount is specified). This value must be less than the size of SCSICmd_INQUIRY_StandardData.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to get inquiry data from the drive.


ModeSense10


Issues a MODE_SENSE_10 command to the device as defined in SPC-2.

IOReturn ( *ModeSense10 )(
    void *self, 
    SCSICmdField1Bit LLBAA, 
    SCSICmdField1Bit DBD, 
    SCSICmdField2Bit PC, 
    SCSICmdField6Bit PAGE_CODE, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

LLBAA

The LLBAA bit as defined in SPC-2 for the MODE_SENSE_10 command.

DBD

The DBD bit as defined in SPC-2 for the MODE_SENSE_10 command.

PC

The PC bits as defined in SPC-2 for the MODE_SENSE_10 command.

PAGE_CODE

The PAGE_CODE bits as defined in SPC-2 for the MODE_SENSE_10 command.

buffer

Pointer to the buffer where the mode sense data should be placed.

bufferSize

Size of the buffer.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to get mode page information from the device.


ReadDiscInformation


Issues a READ_DISC_INFORMATION command to the device as defined in MMC-2.

IOReturn ( *ReadDiscInformation ) (
    void *self, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about the disc (CD-R/RW, (un)finalized, etc..


ReadDiscInformationV2


Issues a READ_DISC_INFORMATION command to the device as defined in MMC-5.

IOReturn ( *ReadDiscInformationV2 ) (
    void *self, 
    SCSICmdField3Bit DATA_TYPE, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

DATA_TYPE

The DATA_TYPE field as defined in MMC-5.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about the disc (CD-R/RW, (un)finalized, etc..


ReadDiscStructure


Issues a READ_DISC_STRUCTURE command to the device as defined in MMC-5.

IOReturn ( *ReadDiscStructure ) (
    void *self, 
    SCSICmdField4Bit MEDIA_TYPE, 
    SCSICmdField4Byte ADDRESS, 
    SCSICmdField1Byte LAYER_NUMBER, 
    SCSICmdField1Byte FORMAT, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

MEDIA_TYPE

The MEDIA_TYPE field as defined in MMC-5.

ADDRESS

The ADDRESS field as defined in MMC-5.

LAYER_NUMBER

The LAYER_NUMBER field as defined in MMC-5.

format

The FORMAT field as defined in MMC-5.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about Disc specific structures on the disc.


ReadDVDStructure


Issues a READ_DVD_STRUCTURE command to the device as defined in MMC-2.

IOReturn ( *ReadDVDStructure ) (
    void *self, 
    SCSICmdField4Byte ADDRESS, 
    SCSICmdField1Byte LAYER_NUMBER, 
    SCSICmdField1Byte FORMAT, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

ADDRESS

The ADDRESS field as defined in MMC-2.

LAYER_NUMBER

The LAYER_NUMBER field as defined in MMC-2.

format

The FORMAT field as defined in MMC-2.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about DVD specific structures on the disc.


ReadFormatCapacities


Issues a READ_FORMAT_CAPACITIES command to the device as defined in MMC-2.

IOReturn ( *ReadFormatCapacities ) (
    void *self, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

buffer

Pointer to the buffer where the mode sense data should be placed.

bufferSize

Size of the buffer.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to get format capacity information from the media.


ReadTableOfContents


Issues a READ_TOC_PMA_ATIP command to the device as defined in MMC-2/SFF-8020i.

IOReturn ( *ReadTableOfContents )(
    void *self, 
    SCSICmdField1Bit MSF, 
    SCSICmdField4Bit FORMAT, 
    SCSICmdField1Byte TRACK_SESSION_NUMBER, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

MSF

The MSF bit as defined in MMC-2/SFF-8020i.

FORMAT

The FORMAT field as defined in MMC-2/SFF-8020i.

TRACK_SESSION_NUMBER

The TRACK_SESSION_NUMBER field as defined in MMC-2/SFF-8020i.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read the table of contents from the media.


ReadTrackInformation


Issues a READ_TRACK_INFORMATION command to the device as defined in MMC-2.

IOReturn ( *ReadTrackInformation ) (
    void *self, 
    SCSICmdField2Bit ADDRESS_NUMBER_TYPE, 
    SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

ADDRESS_NUMBER_TYPE

The ADDRESS/NUMBER_TYPE field as defined in MMC-2.

LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER

The LOGICAL_BLOCK_ADDRESS/SESSION_NUMBER field as defined in MMC-2.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about selected tracks on the disc.


ReadTrackInformationV2


Issues a READ_TRACK_INFORMATION command to the device as defined in Mt. Fuji 5.

IOReturn ( *ReadTrackInformationV2 ) (
    void *self, 
    SCSICmdField1Bit OPEN, 
    SCSICmdField2Bit ADDRESS_NUMBER_TYPE, 
    SCSICmdField4Byte LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER, 
    void *buffer, 
    SCSICmdField2Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

OPEN

The OPEN field as defined in Mt. Fuji 5.

ADDRESS_NUMBER_TYPE

The ADDRESS/NUMBER_TYPE field as defined in Mt. Fuji 5.

LOGICAL_BLOCK_ADDRESS_TRACK_SESSION_NUMBER

The LOGICAL_BLOCK_ADDRESS/SESSION_NUMBER field as defined in Mt. Fuji 5.

buffer

Pointer to the buffer to be used for this function.

bufferSize

The size of the data transfer requested.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to read information about selected tracks on the disc.


SetCDSpeed


Issues a SET_CD_SPEED command to the device as defined in MMC-2.

IOReturn ( *SetCDSpeed ) (
    void *self, 
    SCSICmdField2Byte LOGICAL_UNIT_READ_SPEED, 
    SCSICmdField2Byte LOGICAL_UNIT_WRITE_SPEED, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

LOGICAL_UNIT_READ_SPEED

The LOGICAL_UNIT_READ_SPEED field as defined in MMC-2.

LOGICAL_UNIT_WRITE_SPEED

The LOGICAL_UNIT_WRITE_SPEED field as defined in MMC-2.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened the client may send this command to change the read and/or write CD speed of the drive.


SetTrayState


Issues a START_STOP_UNIT command to the device as defined in SBC-3.

IOReturn ( *SetTrayState )(
    void *self,
    UInt8 trayState );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

trayState

A UInt8 describing which tray state is desired. The tray state can be one of two values, kMMCDeviceTrayClosed or kMMCDeviceTrayOpen.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNotPermitted if media is inserted, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened and all volumes associated with that device's media have been unmounted, the client may send this command to eject the tray.


SetWriteParametersModePage


Issues a MODE_SELECT command to the device as defined in SPC-2 with the Write Parameters Mode Page Code as defined in MMC-2.

IOReturn ( *SetWriteParametersModePage )(
    void *self, 
    void *buffer, 
    SCSICmdField1Byte bufferSize, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
buffer

Pointer to buffer (including mode parameter header).

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to set the default values returned in a READ_DISC_INFORMATION call.


TestUnitReady


Issues a TEST_UNIT_READY command to the device as defined in SPC-2.

IOReturn ( *TestUnitReady )(
    void *self, 
    SCSITaskStatus *taskStatus, 
    SCSI_Sense_Data *senseDataBuffer );  
Parameters
self

Pointer to an MMCDeviceInterface for one IOService.

taskStatus

Pointer to a SCSITaskStatus to get the status of the SCSITask which was executed. Valid SCSITaskStatus values are defined in SCSITask.h

senseDataBuffer

Pointer to a buffer the size of the SCSI_Sense_Data struct found in SCSICmds_REQUEST_SENSE_Defs.h. The sense data is only valid if the SCSITaskStatus is kSCSITaskStatus_CHECK_CONDITION.

Return Value

Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, kIOReturnNoMemory if a SCSITask couldn't be created, or kIOReturnExclusiveAccess if the device is already opened for exclusive access by another client.

Discussion

Once an MMCDeviceInterface is opened, the client may send this command to test if the drive is ready.


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: 2009-02-23