ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
SCSITaskDeviceInterface |
Declared In: |
Basic interface for a SCSITask Device.
After rendezvous with a SCSITask 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 create SCSITasks to send to the device. Use the CreateSCSITask method to create new SCSITask instances for this device.
Convenience method to add asynchronous callback mechanisms to the CFRunLoop of choice.
Method to create SCSITasks.
Method to find out if the device can be opened exclusively by the caller.
Method to obtain exclusive access to the device so that SCSITasks can be sent to it.
Method to release exclusive access to the device so that other clients can send commands to it.
Convenience method to remove asynchronous callback mechanisms from the CFRunLoop.
AddCallbackDispatcherToRunLoop |
Convenience method to add asynchronous callback mechanisms to the CFRunLoop of choice.
IOReturn ( *AddCallbackDispatcherToRunLoop ) ( void *self, CFRunLoopRef cfRunLoopRef );
self
Pointer to a SCSITaskDeviceInterface instance.
cfRunLoopRef
The CFRunLoop to which asynchronous callback notifications should be attached.
Returns kIOReturnSuccess if successful, kIOReturnNoDevice if there is no connection to an IOService, or kIOReturnNoMemory if a mach port could not be allocated and initialized properly.
Once a SCSITaskDeviceInterface is opened, the client may make synchronous or asynchronous requests to the device. This method creates and initializes a mach_port_t for receiving asynchronous callback notifications via the CFRunLoop mechanism.
CreateSCSITask |
Method to create SCSITasks.
SCSITaskInterface ** ( *CreateSCSITask )( void *self );
self
Pointer to a SCSITaskDeviceInterface instance.
Returns a handle to an instance of a SCSITaskInterface or NULL if one could not be allocated.
Once a SCSITaskDeviceInterface is opened, the client may request exclusive access to the device. Once the client has successfully gained exclusive access, it becomes the Logical Unit Driver. It then can use this method to allocate SCSITasks to be sent to the device.
IsExclusiveAccessAvailable |
Method to find out if the device can be opened exclusively by the caller.
Boolean ( *IsExclusiveAccessAvailable ) ( void *self );
self
Pointer to an instance of an SCSITaskDeviceInterface.
Returns false if the device has been opened for exclusive access, otherwise true.
Method to find out if the device can be opened exclusively by the caller.
ObtainExclusiveAccess |
Method to obtain exclusive access to the device so that SCSITasks can be sent to it.
IOReturn ( *ObtainExclusiveAccess ) ( void *self );
self
Pointer to a SCSITaskDeviceInterface instance.
Returns kIOReturnSuccess if exclusive access was granted, else if media is still mounted it returns kIOReturnBusy. If another client already has exclusive access, kIOReturnExclusiveAccess is returned.
Once a SCSITaskDeviceInterface is opened, the client may request exclusive access to the device. Once the client has successfully gained exclusive access, it becomes the Logical Unit Driver and all in-kernel Logical Unit Drivers are quiesced.
ReleaseExclusiveAccess |
Method to release exclusive access to the device so that other clients can send commands to it.
IOReturn ( *ReleaseExclusiveAccess ) ( void *self );
self
Pointer to a SCSITaskDeviceInterface instance.
Returns kIOReturnSuccess if exclusive access was released, else some appropriate error.
Once a SCSITaskDeviceInterface is opened, the client may request exclusive access to the device. Once the client has successfully gained exclusive access, it becomes the Logical Unit Driver and all in-kernel Logical Unit Drivers (if any are matched on the device) are quiesced. This method releases this access and unquiesces the in-kernel drivers (if any).
RemoveCallbackDispatcherFromRunLoop |
Convenience method to remove asynchronous callback mechanisms from the CFRunLoop.
void ( *RemoveCallbackDispatcherFromRunLoop ) ( void *self );
self
Pointer to a SCSITaskDeviceInterface instance.
Once a SCSITaskDeviceInterface is opened, the client may make synchronous or asynchronous requests to the device. This method removes the asynchronous notifications delivered via the CFRunLoop. This should be called only after calling AddCallbackDispatcherToRunLoop.
|
Last Updated: 2009-02-23