Class CommandStatusWrapper


  • public class CommandStatusWrapper
    extends java.lang.Object
    This class represents the command status wrapper (CSW) in the SCSI transparent command set standard, which is transmitted from the device to the host after the data phase (if any).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int COMMAND_FAILED
      SCSI command could not be executed, host should issue an SCSI request sense.
      static int COMMAND_PASSED
      SCSI command has successfully been executed.
      static int PHASE_ERROR
      SCSI command could not be executed, host should issue a mass storage reset.
      static int SIZE
      Every CSW has the same size.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte getbCswStatus()
      Returns the status of execution of the transmitted SCSI command.
      int getdCswDataResidue()
      Returns the amount of bytes which has not been processed yet in the data phase.
      int getdCswTag()
      Returns the tag which can be used to determine the corresponding CBW.
      void read​(java.nio.ByteBuffer buffer)
      Reads command block wrapper from the specified buffer and stores it into this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COMMAND_PASSED

        public static final int COMMAND_PASSED
        SCSI command has successfully been executed.
        See Also:
        Constant Field Values
      • PHASE_ERROR

        public static final int PHASE_ERROR
        SCSI command could not be executed, host should issue a mass storage reset.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CommandStatusWrapper

        public CommandStatusWrapper()
    • Method Detail

      • read

        public void read​(java.nio.ByteBuffer buffer)
        Reads command block wrapper from the specified buffer and stores it into this object.
        Parameters:
        buffer - The data where the command block wrapper is located.
      • getdCswTag

        public int getdCswTag()
        Returns the tag which can be used to determine the corresponding CBW.
        Returns:
        The command status wrapper tag.
        See Also:
        #getdCswTag()
      • getdCswDataResidue

        public int getdCswDataResidue()
        Returns the amount of bytes which has not been processed yet in the data phase.
        Returns:
        The amount of bytes.