Coverage Report - org.jscsi.target.scsi.sense.senseDataDescriptor.CommandSpecificSenseDataDescriptor
 
Classes in this File Line Coverage Branch Coverage Complexity
CommandSpecificSenseDataDescriptor
0%
0/5
N/A
1
 
 1  
 package org.jscsi.target.scsi.sense.senseDataDescriptor;
 2  
 
 3  
 
 4  
 import java.nio.ByteBuffer;
 5  
 
 6  
 import org.jscsi.target.scsi.sense.information.EightByteInformation;
 7  
 
 8  
 
 9  
 /**
 10  
  * The command-specific information sense data descriptor provides information that depends on the command on which the
 11  
  * exception condition occurred.
 12  
  * 
 13  
  * @author Andreas Ergenzinger
 14  
  */
 15  
 public class CommandSpecificSenseDataDescriptor extends SenseDataDescriptor {
 16  
 
 17  
     /**
 18  
      * The byte position of the COMMAND-SPECIFIC INFORMATION field.
 19  
      */
 20  
     private static final int COMMAND_SPECIFIC_INFORMATION_INDEX = 4;
 21  
 
 22  
     /**
 23  
      * Should contain command-specific information.
 24  
      */
 25  
     private final EightByteInformation commandSpecificInformation;
 26  
 
 27  
     /**
 28  
      * The constructor.
 29  
      * 
 30  
      * @param commandSpecificInformation {@link EightByteInformation} which should contain command-specific information.
 31  
      */
 32  
     public CommandSpecificSenseDataDescriptor (final EightByteInformation commandSpecificInformation) {
 33  0
         super(SenseDataDescriptorType.COMMAND_SPECIFIC_INFORMATION, 0x0a);// additional
 34  
                                                                           // length
 35  0
         this.commandSpecificInformation = commandSpecificInformation;
 36  0
     }
 37  
 
 38  
     @Override
 39  
     protected void serializeSpecificFields (ByteBuffer byteBuffer, int index) {
 40  0
         commandSpecificInformation.serialize(byteBuffer, index + COMMAND_SPECIFIC_INFORMATION_INDEX);
 41  0
     }
 42  
 
 43  
 }