Package 

Class ScsiRequestSenseResponse

  • All Implemented Interfaces:

    
    public final class ScsiRequestSenseResponse
    
                        

    Represents the response of a sense request.

    The response data is received in the data phase

    • Constructor Detail

    • Method Detail

      • getErrorCode

         final Byte getErrorCode()

        Returns the error code.

        Apparently always either 0x70 or 0x71. Don't know the significance of this number.

      • getSenseKey

         final Byte getSenseKey()

        Returns overall error/info type for this sense request.

        0h = No Sense — no specific sense key information to be reported. A sense key of 0 indicates a successful command. 1h = Recovered error — Indicates that the command completed successfully, with some recovery action performed by the device server. 2h = Not Ready — Indicates that the logical unit is not accessible. Operator intervention may be required to correct this condition. 3h = Medium Error — the command terminated with a non-recovered error condition that may have been caused by a flaw in the medium or an error in the recorded data. 4h = Hardware Error — the device detected an unrecoverable hardware failure while performing the command or during a self-test. 5h = Illegal Request — an illegal parameter in the command descriptor block or in the parameter list data. 6h = Unit Attention — a power-on or reset has occurred to the device, or a not ready-to-ready transition has occurred, or an I/O element has been accessed. Also, this may indicate mode parameters have changed, or the microcode has been changed. 7h = Data Protect — Indicates that a command that reads or writes the medium was attempted on a block that is protected. The read or write operation is not performed. 8h = Blank Check — Indicates that a write-once device or a sequential-access device encountered blank medium or format-defined end-of-data indication while reading or that a write-once device encountered a non-blank medium while writing. 9h = Vendor Specific Ah = Copy Aborted — Indicates an EXTENDED COPY command was aborted due to an error condition on the source device, the destination device, or both. Bh = Aborted Command — the device aborted the command. The initiator might be able to recover by trying the command again. Ch = Reserved Dh = Volume Overflow — Indicates that a buffered SCSI device has reached the end-of-partition and data may remain in the buffer that has not been written to the medium. Eh = Miscompare — Indicates that the source data did not match the data read from the medium. Fh = Completed — Indicates there is command completed sense data (see SAM-5) to be reported. This may occur for a successful command.

      • getAdditionalSenseLength

         final Byte getAdditionalSenseLength()

        Returns the length of the rest of the message.

        A request sense message must always be at least 18 bytes, but can be longer. additionalSenseLength indicates the total message length minus 8. I.e. if it returns 10 the message is just the 18 initial bytes, if it's 12 there are two more bytes to collect. Consider additionalSenseLength to be the length of the remainder of the message after the byte that holds additionalSenseLength.

      • getAdditionalSenseCode

         final Byte getAdditionalSenseCode()

        Returns the additional sense code (ASC).

        This code together with ASCQ contains more specific information in addition to senseKey.

      • getAdditionalSenseCodeQualifier

         final Byte getAdditionalSenseCodeQualifier()

        Returns the additional sense code qualifier (ASCQ).

        This code together with ASC contains more specific information in addition to senseKey.

      • checkResponseForError

         final Unit checkResponseForError()

        Checks the result from a request sense command. Will throw some type of SenseException, or do nothing if sense response indicates {@see ScsiRequestSenseResponse.NO_SENSE}, {@see ScsiRequestSenseResponse.COMPLETED}, {@see ScsiRequestSenseResponse.RECOVERED_ERROR}.