Package org.jscsi.scsi.protocol.sense

Examples of org.jscsi.scsi.protocol.sense.SenseData


      _logger.debug("servicing writeResponse request: nexus: " + nexus + ", cmdRef: "
            + commandReferenceNumber);
      _logger.debug("response was status: " + status);
      if (status.equals(Status.CHECK_CONDITION))
      {
         SenseData sense = null;
         try
         {
            sense = new SenseDataFactory().decode(senseData);
         }
         catch (IOException e)
View Full Code Here


            return;
         }

         try
         {
            SenseData expected = this.senseDataFactory.decode(this.expectedSenseData);
            SenseData actual = this.senseDataFactory.decode(senseData);

            if (expected.getKCQ() != actual.getKCQ())
            {
               this.callback.failure("Response sense data contains unexpected KCQ");
               return;
            }
View Full Code Here

         assertEquals("Task set did not report CHECK CONDITION to transport",
               Status.CHECK_CONDITION, port.getLastStatus());

         try
         {
            SenseData sense = (new SenseDataFactory()).decode(port.getSenseData());

            assertEquals("Task set did not return correct KCQ", KCQ.OVERLAPPED_COMMANDS_ATTEMPTED,
                  sense.getKCQ());

         }
         catch (IOException e)
         {
            e.printStackTrace();
View Full Code Here

         fail("Task returned CHECK CONDITION but did not return autosense data");

      try
      {
         SenseDataFactory fact = new SenseDataFactory();
         SenseData sense = fact.decode(exception.getSenseData());
         if (sense.getKCQ() != KCQ.INVALID_FIELD_IN_CDB)
            fail("Expected KCQ INVALID FIELD IN CDB; got " + sense.getKCQ().name());
      }
      catch (IOException e)
      {
         fail("Could not decode returned sense data: " + e.getMessage());
      }
View Full Code Here

   protected abstract SenseKeySpecificField getSenseKeySpecific();

   public byte[] encode()
   {
      // FIXME: Currently we hard code always returning fixed sense data
      SenseData data =
            new FixedSenseData(this.current, this.kcq, this.getInformation(),
                  this.getCommandSpecificInformation(), this.getSenseKeySpecific());
      return data.encode();
   }
View Full Code Here

TOP

Related Classes of org.jscsi.scsi.protocol.sense.SenseData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.