Coverage Report - org.jscsi.target.scsi.modeSense.ModeParameterHeader6
 
Classes in this File Line Coverage Branch Coverage Complexity
ModeParameterHeader6
0%
0/9
N/A
1
 
 1  
 package org.jscsi.target.scsi.modeSense;
 2  
 
 3  
 
 4  
 import java.nio.ByteBuffer;
 5  
 
 6  
 
 7  
 /**
 8  
  * A {@link ModeParameterHeader} sub-class. Instances of this class are sent in response to <code>MODE SENSE (6)</code>
 9  
  * SCSI commands and have a serialized length of 4 bytes.
 10  
  * 
 11  
  * @author Andreas Ergenzinger
 12  
  */
 13  
 public final class ModeParameterHeader6 extends ModeParameterHeader {
 14  
 
 15  
     /**
 16  
      * The length of this object when serialized.
 17  
      */
 18  
     static final int SIZE = 4;
 19  
 
 20  
     /**
 21  
      * The length in bytes of the MODE DATA LENGTH field.
 22  
      */
 23  
     static final int MODE_DATA_LENGTH_FIELD_SIZE = 1;
 24  
 
 25  
     /**
 26  
      * The constructor.
 27  
      * 
 28  
      * @param modeDataLength the total length in bytes of all MODE DATA list elements
 29  
      * @param blockDescriptorLength the total length in bytes of all BLOCK DESCRIPTOR list elements
 30  
      */
 31  
     public ModeParameterHeader6 (final int modeDataLength, final int blockDescriptorLength) {
 32  0
         super(modeDataLength, blockDescriptorLength);
 33  0
     }
 34  
 
 35  
     public void serialize (ByteBuffer byteBuffer, int index) {
 36  0
         byteBuffer.position(index);
 37  0
         byteBuffer.put((byte) modeDataLength);
 38  0
         byteBuffer.put(mediumType);
 39  0
         byteBuffer.put(deviceSpecificParameter);
 40  0
         byteBuffer.put((byte) blockDescriptorLength);
 41  0
     }
 42  
 
 43  
     public int size () {
 44  0
         return SIZE;
 45  
     }
 46  
 
 47  
 }