Data Members



_inqBuf

protected:
 UInt8 * _inqBuf; /* the Inquiry data buffer */

 /*!
 * @var _inqBufSize
 * The size of the inquiry data buffer, in bytes.
 */
 UInt32 _inqBufSize; /* size of the buffer */

 /*!
 * @var _inqLen
 * The number of valid bytes of inquiry data.
 */
 UInt32 _inqLen; /* valid bytes in buffer */
 
 /*!
 * @var _vendor
 * The Vendor Name string from the inquiry data, null-terminated.
 */
 char _vendor[9]; /* info from Inquiry data */

 /*!
 * @var _product
 * The Product Name string from the inquiry data, null-terminated.
 */
 char _product[17];

 /*!
 * @var _rev
 * The Product Revision string from the inquiry data, null-terminated.
 */
 char _rev[5];

 /* Since we get both of these items from the same command, we
 * just cache both values if we get either call, so we only
 * have to issue the command once.
 */

 /*!
 * @var _readCapDone
 * True if we have issued a Read-Capacity command to obtain the
 * values for _maxBlock and _blockSize.
 */
 bool _readCapDone;

 /*!
 * @var _removable
 * True if the media is removable; False if the media is fixed.
 */
 bool _removable;

 /*!
 * @var _maxBlock
 * The highest valid block on the media, relative to zero.
 */
 UInt64 _maxBlock;

 /*!
 * @var _blockSize
 * The block size of the media in bytes.
 */
 UInt64 _blockSize;

 /* The queue of pending requests awaiting power: */

 /*!
 * @struct queue
 * @discussion
 * A data structure for a queue.
 * @field head
 * A pointer to the head item.
 * @field tail
 * A pointer to the tail item.
 * @field lock
 * A lock used to protect the queue during changes.
 */
 /*!
 * @var _powerQueue
 * A queue structure containing operations queued awaiting power level.
 */
 struct queue {
 struct context * head;
 struct context * tail;
 IOLock * lock;
 } _powerQueue;
 
};

A pointer to the allocate Inquiry Data buffer.


_provider

protected:
 IOSCSIDevice * _provider;

A pointer to our provider.


completion

public:
  *  @struct  context
  *  @discussion
  *  The  context  structure  contains  all  persistent  information  needed  for  a
  *  synchronous  or  asynchronous  IO  operation.
  *  @field  completion
  *  The  completion  information  for  an  asynchronous  read  or  write  operation.
  *  @field  state
  *  The  current  state  of  the  operation.
  *  @field  step
  *  The  current  step  value,  if  we  are  handling  a  Unit  Attention.
  *  @field  originalContext
  *  A  pointer  to  the  context  for  the  command  that  caused  the  Unit  Attention
  *  condition.
  *  @field  scsireq
  *  A  pointer  to  the  IOSCSIRequest  object.
  *  @field  memory
  *  The  data  buffer  for  the  operation.  A  pointer  to  an  IOMemoryDescriptor.
  *  @field  scsiresult
  *  A  pointer  to  the  IOSCSIResult  object.
  *  @field  desiredPower
  *  The  desired  power  level  for  the  operation  to  execute.
  *  @field  isSync
  *  True  if  synchronous;  False  if  asynchronous.
  *  @field  next
  *  A  pointer  to  a  context  structure,  used  as  a  queue  forward-link.
  *  @field  sync
  *  A  syncer  used  to  block  a  thread  awaiting  a  power  level,  or  for  completion
  *  of  a  synchronous  operation.
  */
  struct  context  {

  /*  Completion  information  for  our  client,  used  only  for  async  operations.
  *  Typically  this  information  will  only  be  used  by  subclasses.
  */

  struct  {
  gdCompletionFunction  action;  /*  function  to  call  */
  IOService  *target;  /*  client  object  ("this")  */
  void  *param;  /*  client's  parameter  */
  }  completion;

Fields

NameDescription
actionThe C function called upon completion of the operation.
targetThe C++ class pointer, passed to tha action function.
paramA value passed to the action function. This value is not touched.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)