-
- All Implemented Interfaces:
public final class ScsiRequestSenseResponseRepresents the response of a sense request.
The response data is received in the data phase
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classScsiRequestSenseResponse.Companion
-
Field Summary
Fields Modifier and Type Field Description private BooleaninformationValidprivate ByteerrorCodeprivate BytesegmentNumberprivate BytesenseKeyprivate Integerinformationprivate ByteadditionalSenseLengthprivate IntegercommandSpecificInformationprivate ByteadditionalSenseCodeprivate ByteadditionalSenseCodeQualifier
-
Method Summary
Modifier and Type Method Description final BooleangetInformationValid()Returns if the information field is valid. final UnitsetInformationValid(Boolean informationValid)final BytegetErrorCode()Returns the error code. final UnitsetErrorCode(Byte errorCode)final BytegetSegmentNumber()Returns the segment number. final UnitsetSegmentNumber(Byte segmentNumber)final BytegetSenseKey()Returns overall error/info type for this sense request. final UnitsetSenseKey(Byte senseKey)final IntegergetInformation()Returns the information field. final UnitsetInformation(Integer information)final BytegetAdditionalSenseLength()Returns the length of the rest of the message. final UnitsetAdditionalSenseLength(Byte additionalSenseLength)final IntegergetCommandSpecificInformation()Returns the specific command information. final UnitsetCommandSpecificInformation(Integer commandSpecificInformation)final BytegetAdditionalSenseCode()Returns the additional sense code (ASC). final UnitsetAdditionalSenseCode(Byte additionalSenseCode)final BytegetAdditionalSenseCodeQualifier()Returns the additional sense code qualifier (ASCQ). final UnitsetAdditionalSenseCodeQualifier(Byte additionalSenseCodeQualifier)final UnitcheckResponseForError()Checks the result from a request sense command. -
-
Method Detail
-
getInformationValid
final Boolean getInformationValid()
Returns if the information field is valid.
-
setInformationValid
final Unit setInformationValid(Boolean informationValid)
-
getErrorCode
final Byte getErrorCode()
Returns the error code.
Apparently always either 0x70 or 0x71. Don't know the significance of this number.
-
setErrorCode
final Unit setErrorCode(Byte errorCode)
-
getSegmentNumber
final Byte getSegmentNumber()
Returns the segment number.
-
setSegmentNumber
final Unit setSegmentNumber(Byte segmentNumber)
-
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.
-
setSenseKey
final Unit setSenseKey(Byte senseKey)
-
getInformation
final Integer getInformation()
Returns the information field.
-
setInformation
final Unit setInformation(Integer information)
-
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.
-
setAdditionalSenseLength
final Unit setAdditionalSenseLength(Byte additionalSenseLength)
-
getCommandSpecificInformation
final Integer getCommandSpecificInformation()
Returns the specific command information.
-
setCommandSpecificInformation
final Unit setCommandSpecificInformation(Integer commandSpecificInformation)
-
getAdditionalSenseCode
final Byte getAdditionalSenseCode()
Returns the additional sense code (ASC).
This code together with ASCQ contains more specific information in addition to senseKey.
-
setAdditionalSenseCode
final Unit setAdditionalSenseCode(Byte additionalSenseCode)
-
getAdditionalSenseCodeQualifier
final Byte getAdditionalSenseCodeQualifier()
Returns the additional sense code qualifier (ASCQ).
This code together with ASC contains more specific information in addition to senseKey.
-
setAdditionalSenseCodeQualifier
final Unit setAdditionalSenseCodeQualifier(Byte additionalSenseCodeQualifier)
-
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}.
-
-
-
-