Important: The information in this document is obsolete and should not be used for new development.
SCSIAction
You use theSCSIAction
function to initiate a SCSI transaction or request a service from the XPT or SIM.
OSErr SCSIAction(SCSI_PB *scsiPB);
scsiPB
- A pointer to a SCSI Manager parameter block.
--> scsiPBLength UInt16 The size of the parameter block. --> scsiFunctionCode UInt8 The function selector code. <-- scsiResult OSErr The returned result code. --> scsiDevice DeviceIdent A 4-byte value that uniquely identifies the target device. --> scsiCompletion CallbackProc A pointer to a completion routine. If this field is set to nil
, the function is executed synchronously.--> scsiFlags UInt32 Flags indicating the transfer direction and any special handling required for the request. See page 4-22 for descriptions of these flags. --> scsiDriverStorage UInt8 * Optional pointer to the device driver's private storage. DESCRIPTION
TheSCSIAction
function initiates the request specified by the scsiFunctionCode field of the parameter block. Certain types of requests are handled by the XPT, but most are handled by the SIM. Table 4-2 lists the function selector codes. See the following sections for descriptions of the functions you access throughSCSIAction
.When called asynchronously,
SCSIAction
normally returns theNoErr
result code, indicating that the request was queued successfully. The result of the SCSI transaction is returned in thescsiResult
field upon completion. If theSCSIAction
function returns an error code, the request was not queued and the completion routine will not be called.When the completion routine is called, it receives the A5 world that existed when the
SCSIAction
request was received. If A5 was invalid when the request was made, it is also invalid in the completion routine.Your completion routine should use the following function prototype:
pascal void (*CallbackProc) (void * scsiPB);There is no implied ordering of asynchronous requests made to different devices. An earlier request may be started later, and a later request may complete earlier. However, a series of requests to the same device is issued to that device in the order received, except when thescsiSIMQHead
flag is set in thescsiFlags
field of the parameter block.When called synchronously, the
SCSIAction
function returns the actual result of the operation. It also places this result in thescsiResult
field.RESULT CODES
noErr 0 Asynchronous request successfully queued, or synchronous request successfully completed
- Note
- Result codes for specific
SCSIAction
function requests are listed
in the following sections. See page 4-90 for a list of all result codes.