Package org.jscsi.scsi.protocol.cdb

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


   }

   @Test
   public void TestReadWriteCompare10()
   {
      CDB cdb1 = new Write10(0, false, false, false, false, false, 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 performWrite10(int lba, int numBlocks, ByteBuffer data)
   {
      _logger.debug("********** WRITE10 MEMORY **********");
      CDB cdb = new Write10(0, false, false, false, false, false, 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 testWrite10inMemory()
   {
      _logger.debug("********** WRITE10 MEMORY **********");
      int lba = generateRandomLBA();
      CDB cdb = new Write10(0, false, false, false, false, false, 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 testWrite10inFile()
   {
      _logger.debug("********** WRITE10 FILE **********");
      int lba = generateRandomLBA();
      CDB cdb = new Write10(0, false, false, false, false, false, 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.Write10

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.