Mac Developer Library

Developer

IOATACommand Class Reference

Options
Deployment Target:

On This Page
Language:

IOATACommand

More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable @import Kernel;

Availability


Available in OS X v10.0 and later.
  • The byte count on the ending result, as best as can be determined by the controller. May be zero, but partial transfer may have occurred on error in some cases.

    Declaration

    C++

    virtual IOByteCount getActualTransfer ( void );

    Import Statement

  • the IOMemoryDescriptor used in this transaction.

    Declaration

    C++

    virtual IOMemoryDescriptor* getBuffer ( void );

    Import Statement

  • returns true if IOATAController is still in control of the command.

    Declaration

    C++

    virtual bool getCommandInUse( void );

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getCylHi ( void );

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getCylLo ( void );

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getDevice_Head ( void );

    Import Statement

  • If the error bit was set in the status register, the value of the error register is returned at the end of a command.

    Declaration

    C++

    virtual UInt8 getEndErrorReg( void );

    Import Statement

  • the value of the status register on the end of the command.

    Declaration

    C++

    virtual UInt8 getEndStatusReg ( void);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getErrorReg ( void );

    Import Statement

  • IOReturn value of the result of this command. ATA family errors are defined in IOATATypes.h

    Declaration

    C++

    virtual IOReturn getResult ( void);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getSectorCount ( void );

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getSectorNumber ( void );

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual UInt8 getStatus ( void );

    Import Statement

  • set the IIOMemoryDescriptor for this transaction.

    Declaration

    C++

    virtual void setBuffer ( IOMemoryDescriptor *inDesc);

    Import Statement

  • set the byte count for this transaction. Should agree with the device command and the memory descriptor in use.

    Declaration

    C++

    virtual void setByteCount ( IOByteCount numBytes);

    Import Statement

  • set the function pointer to call when this command completes.

    Declaration

    C++

    virtual void setCallbackPtr ( IOATACompletionFunction *inCompletion);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setCommand ( UInt8 in);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setCylHi( UInt8 in);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setCylLo ( UInt8 in);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setDevice_Head( UInt8 in);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setFeatures( UInt8 in);

    Import Statement

  • set the flags for this command, as defined in IOATATypes.

    Declaration

    C++

    virtual void setFlags( UInt32 inFlags);

    Import Statement

  • convenience method that sets the taskfile registers into a 28-bit LBA address, with unit selected and LBA bit set. return err if param out of range, return kIOSuccess (kATANoErr) = 0 on return if successful

    Declaration

    C++

    virtual IOReturn setLBA28( UInt32 lba, ataUnitID inUnit);

    Import Statement

  • command opcode as defined in IOATATypes.

    Declaration

    C++

    virtual void setOpcode( ataOpcode inCode);

    Import Statement

  • ATAPI command packet max size is 16 bytes. Makes deep copy of data.

    Declaration

    C++

    virtual IOReturn setPacketCommand( UInt16 packetSizeBytes, UInt8 *command);

    Import Statement

  • used to set an offset into the memory descriptor for this transfer.

    Declaration

    C++

    virtual void setPosition ( IOByteCount fromPosition);

    Import Statement

  • used when accessing registers or reading registers on an error result. Mask is defined in IOATATypes.h

    Declaration

    C++

    virtual void setRegMask( ataRegMask mask);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setSectorCount( UInt8 in);

    Import Statement

  • Taskfile access. Registers are named in accordance with ATA Standards conventions

    Declaration

    C++

    virtual void setSectorNumber( UInt8 in);

    Import Statement

  • how long to allow this command to complete, in milliseconds, once issued to the hardware. if the time period expires, this command will return with a timeout error.

    Declaration

    C++

    virtual void setTimeoutMS( UInt32 inMs);

    Import Statement

  • set the size of transfer between intervening interrupts. necessary when doing PIO Read/Write Multiple, etc. so the controller knows when to expect an interrupt during multi-sector data transfers.

    Declaration

    C++

    virtual void setTransferChunkSize( IOByteCount chunk = kATADefaultSectorSize);

    Import Statement

  • set the unit number for this command.

    Declaration

    C++

    virtual void setUnit( ataUnitID inUnit);

    Import Statement

  • set to blank state, MUST call prior to re-use of this object

    Declaration

    C++

    virtual void zeroCommand( void);

    Import Statement

Data Types

  • Declaration

    C++

    struct ExpansionData { IOExtendedLBA *extLBA; };

    Discussion

    This structure will be used to expand the capablilties of the IOWorkLoop in the future.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData *fExpansionData;

  • for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner.

    for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner.

    Declaration

    C++

    void* refCon2;

  • for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner.

    for use by disk drivers, clients of IOATADevice only. IOATADevice and IOATAControllers shall not use this field in any manner.

    Declaration

    C++

    void* refCon;

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData *fExpansionData;