Mac Developer Library

Developer

SCSICmds_REQUEST_SENSE_Defs.h Reference

Options
Deployment Target:

On This Page

SCSICmds_REQUEST_SENSE_Defs.h Reference

This file contains all definitions for the data returned from the REQUEST SENSE (0x03) command and from auto sense on protocols that support it.

Included Headers

  • <IOKit/IOTypes.h>

  • <CoreFoundation/CoreFoundation.h>

Data Types

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    typedef struct SCSI_Sense_Data { UInt8 VALID_RESPONSE_CODE; // 7 = Valid. 6-0 = Response Code. UInt8 SEGMENT_NUMBER; // Segment number UInt8 SENSE_KEY; // 7 = FILEMARK, 6 = EOM, 5 = ILI, 3-0 = SENSE KEY. UInt8 INFORMATION_1; // INFORMATION. UInt8 INFORMATION_2; // INFORMATION. UInt8 INFORMATION_3; // INFORMATION. UInt8 INFORMATION_4; // INFORMATION. UInt8 ADDITIONAL_SENSE_LENGTH; // Number of additional bytes available in sense data UInt8 COMMAND_SPECIFIC_INFORMATION_1; // Command Specific Information UInt8 COMMAND_SPECIFIC_INFORMATION_2; // Command Specific Information UInt8 COMMAND_SPECIFIC_INFORMATION_3; // Command Specific Information UInt8 COMMAND_SPECIFIC_INFORMATION_4; // Command Specific Information UInt8 ADDITIONAL_SENSE_CODE; // Additional Sense Code UInt8 ADDITIONAL_SENSE_CODE_QUALIFIER; // Additional Sense Code Qualifier UInt8 FIELD_REPLACEABLE_UNIT_CODE; // Field Replaceable Unit Code UInt8 SKSV_SENSE_KEY_SPECIFIC_MSB; // 7 = Sense Key Specific Valid bit, 6-0 Sense Key Specific MSB UInt8 SENSE_KEY_SPECIFIC_MID; // Sense Key Specific Middle UInt8 SENSE_KEY_SPECIFIC_LSB; // Sense Key Specific LSB } SCSI_Sense_Data;

    Discussion

    The basic SCSI Request Sense data structure.

    Import Statement

    Objective-C

    #include <SCSICmds_REQUEST_SENSE_Defs.h>;

    Availability

    Available in OS X v10.0 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    enum { kSENSE_EOM_Set = 0x40, kSENSE_EOM_Not_Set = 0x00, kSENSE_EOM_Mask = 0x40 };

    Constants

    • kSENSE_EOM_Set

      kSENSE_EOM_Set

      End Of Medium bit is set.

      Available in OS X v10.0 and later.

    • kSENSE_EOM_Not_Set

      kSENSE_EOM_Not_Set

      End Of Medium bit is not set.

      Available in OS X v10.0 and later.

    • kSENSE_EOM_Mask

      kSENSE_EOM_Mask

      Mask to use when checking the SENSE_KEY field for the EOM bit.

      Available in OS X v10.0 and later.

    Discussion

    Masks and values to determine the End Of Medium bit field.

  • Declaration

    Objective-C

    enum { kSENSE_FILEMARK_Set = 0x80, kSENSE_FILEMARK_Not_Set = 0x00, kSENSE_FILEMARK_Mask = 0x80 };

    Constants

    • kSENSE_FILEMARK_Set

      kSENSE_FILEMARK_Set

      Filemark bit is set.

      Available in OS X v10.0 and later.

    • kSENSE_FILEMARK_Not_Set

      kSENSE_FILEMARK_Not_Set

      Filemark bit is not set.

      Available in OS X v10.0 and later.

    • kSENSE_FILEMARK_Mask

      kSENSE_FILEMARK_Mask

      Mask to use when checking the SENSE_KEY field for the FILEMARK bit.

      Available in OS X v10.0 and later.

    Discussion

    Masks and values to determine the FileMark bit field.

  • Declaration

    Objective-C

    enum { kSENSE_ILI_Set = 0x20, kSENSE_ILI_Not_Set = 0x00, kSENSE_ILI_Mask = 0x20 };

    Constants

    • kSENSE_ILI_Set

      kSENSE_ILI_Set

      Incorrect Length Indicator bit is set.

      Available in OS X v10.0 and later.

    • kSENSE_ILI_Not_Set

      kSENSE_ILI_Not_Set

      Incorrect Length Indicator bit is not set.

      Available in OS X v10.0 and later.

    • kSENSE_ILI_Mask

      kSENSE_ILI_Mask

      Mask to use when checking the SENSE_KEY field for the ILI bit.

      Available in OS X v10.0 and later.

    Discussion

    Masks and values to determine the Incorrect Length Indicator bit field.

  • Declaration

    Objective-C

    enum { kSenseDefaultSize = 18 };

    Discussion

    The default size for SCSI Request Sense data.

  • Declaration

    Objective-C

    enum { kSENSE_KEY_NO_SENSE = 0x00, kSENSE_KEY_RECOVERED_ERROR = 0x01, kSENSE_KEY_NOT_READY = 0x02, kSENSE_KEY_MEDIUM_ERROR = 0x03, kSENSE_KEY_HARDWARE_ERROR = 0x04, kSENSE_KEY_ILLEGAL_REQUEST = 0x05, kSENSE_KEY_UNIT_ATTENTION = 0x06, kSENSE_KEY_DATA_PROTECT = 0x07, kSENSE_KEY_BLANK_CHECK = 0x08, kSENSE_KEY_VENDOR_SPECIFIC = 0x09, kSENSE_KEY_COPY_ABORTED = 0x0A, kSENSE_KEY_ABORTED_COMMAND = 0x0B, /* SENSE KEY x0C is obsoleted */ kSENSE_KEY_VOLUME_OVERFLOW = 0x0D, kSENSE_KEY_MISCOMPARE = 0x0E, /* SENSE KEY x0F is reserved */ kSENSE_KEY_Mask = 0x0F };

    Constants

    • kSENSE_KEY_NO_SENSE

      kSENSE_KEY_NO_SENSE

      No sense data is present.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_RECOVERED_ERROR

      kSENSE_KEY_RECOVERED_ERROR

      A recovered error has occurred.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_NOT_READY

      kSENSE_KEY_NOT_READY

      Device server is not ready.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_MEDIUM_ERROR

      kSENSE_KEY_MEDIUM_ERROR

      Device server detected a medium error.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_HARDWARE_ERROR

      kSENSE_KEY_HARDWARE_ERROR

      Device server detected a hardware error.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_ILLEGAL_REQUEST

      kSENSE_KEY_ILLEGAL_REQUEST

      Device server detected an illegal request.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_UNIT_ATTENTION

      kSENSE_KEY_UNIT_ATTENTION

      Device server indicates a unit attention condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_DATA_PROTECT

      kSENSE_KEY_DATA_PROTECT

      Device server indicates a data protect condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_BLANK_CHECK

      kSENSE_KEY_BLANK_CHECK

      Device server indicates a blank check condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_VENDOR_SPECIFIC

      kSENSE_KEY_VENDOR_SPECIFIC

      Device server indicates a vendor specific condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_COPY_ABORTED

      kSENSE_KEY_COPY_ABORTED

      Device server indicates a copy aborted condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_ABORTED_COMMAND

      kSENSE_KEY_ABORTED_COMMAND

      Device server indicates an aborted command condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_VOLUME_OVERFLOW

      kSENSE_KEY_VOLUME_OVERFLOW

      Device server indicates a volume overflow condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_MISCOMPARE

      kSENSE_KEY_MISCOMPARE

      Device server indicates a miscompare condition.

      Available in OS X v10.0 and later.

    • kSENSE_KEY_Mask

      kSENSE_KEY_Mask

      Mask to use when checking the SENSE_KEY field for the SENSE_KEY value.

      Available in OS X v10.0 and later.

    Discussion

    Masks and values to determine the SENSE_KEY.

  • Declaration

    Objective-C

    enum { kSENSE_RESPONSE_CODE_Current_Errors = 0x70, kSENSE_RESPONSE_CODE_Deferred_Errors = 0x71, kSENSE_RESPONSE_CODE_Mask = 0x7F };

    Constants

    • kSENSE_RESPONSE_CODE_Current_Errors

      kSENSE_RESPONSE_CODE_Current_Errors

      Response code indicating current errors are reported.

      Available in OS X v10.0 and later.

    • kSENSE_RESPONSE_CODE_Deferred_Errors

      kSENSE_RESPONSE_CODE_Deferred_Errors

      Response code indicating deferred errors are reported.

      Available in OS X v10.0 and later.

    • kSENSE_RESPONSE_CODE_Mask

      kSENSE_RESPONSE_CODE_Mask

      Mask to use when checking the VALID_RESPONSE_CODE field.

      Available in OS X v10.0 and later.

    Discussion

    Masks and values to determine the Response Code.

  • Declaration

    Objective-C

    enum { kSENSE_DATA_VALID = 0x80, kSENSE_NOT_DATA_VALID = 0x00, kSENSE_DATA_VALID_Mask = 0x80 };

    Constants

    • kSENSE_DATA_VALID

      kSENSE_DATA_VALID

      Sense data is valid.

      Available in OS X v10.0 and later.

    • kSENSE_NOT_DATA_VALID

      kSENSE_NOT_DATA_VALID

      Sense data is not valid.

      Available in OS X v10.0 and later.

    • kSENSE_DATA_VALID_Mask

      kSENSE_DATA_VALID_Mask

      Validity mask to use when checking the VALID_RESPONSE_CODE field.

      Available in OS X v10.0 and later.

    Discussion

    Masks to use to determine if sense data is valid or not.