Package org.jscsi.scsi.protocol.cdb

Examples of org.jscsi.scsi.protocol.cdb.Write6


   //

   @Test
   public void TestReadWriteCompare6()
   {
      CDB cdb1 = new Write6(false, true, 10, NUM_BLOCKS_TRANSFER);
      Command cmd1 =
            new Command(this.transport.createNexus(this.cmdRef), cdb1, TaskAttribute.ORDERED,
                  this.cmdRef, 0);
      this.transport.createReadData(NUM_BLOCKS_TRANSFER * STORE_BLOCK_SIZE, this.cmdRef);
      lu.enqueue(this.transport, cmd1);
View Full Code Here


   }

   private void performWrite6(int lba, int numBlocks, ByteBuffer data)
   {
      _logger.debug("********** WRITE6 MEMORY **********");
      CDB cdb = new Write6(false, true, lba, numBlocks);
      this.addReadData(numBlocks * STORE_BLOCK_SIZE, cmdRef, data);
      this.submitMemoryTask(cdb, cmdRef);
      this.purgeReadData(cmdRef);
      cmdRef++;
   }
View Full Code Here

   @Test
   public void testWrite6inMemory()
   {
      _logger.debug("********** WRITE6 MEMORY **********");
      int lba = generateRandomLBA();
      CDB cdb = new Write6(false, true, lba, WRITE_BLOCKS);
      ByteBuffer data = this.createReadData(WRITE_BLOCKS * STORE_BLOCK_SIZE, cmdRef);
      this.submitMemoryTask(cdb, cmdRef);
      verifyDeviceBuffer(data, this.getMemoryBuffer(), lba);
      this.purgeReadData(cmdRef);
      this.purgeDeviceData();
View Full Code Here

   @Test
   public void testWrite6inFile()
   {
      _logger.debug("********** WRITE6 FILE **********");
      int lba = generateRandomLBA();
      CDB cdb = new Write6(false, true, lba, WRITE_BLOCKS);
      ByteBuffer data = this.createReadData(WRITE_BLOCKS * STORE_BLOCK_SIZE, cmdRef);
      this.submitFileTask(cdb, cmdRef);
      verifyDeviceBuffer(data, this.getFileBuffer(), lba);
      this.purgeReadData(cmdRef);
      this.purgeDeviceData();
View Full Code Here

TOP

Related Classes of org.jscsi.scsi.protocol.cdb.Write6

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.