Coverage Report - org.jscsi.target.scsi.modeSense.PageControl
 
Classes in this File Line Coverage Branch Coverage Complexity
PageControl
0%
0/12
0%
0/4
2.5
 
 1  
 package org.jscsi.target.scsi.modeSense;
 2  
 
 3  
 
 4  
 import org.jscsi.target.scsi.cdb.ModeSense6Cdb;
 5  
 
 6  
 
 7  
 /**
 8  
  * The page control (PC) field specifies the type of mode parameter values to be returned in the mode pages.
 9  
  * 
 10  
  * @see ModeSense6Cdb
 11  
  * @author Andreas Ergenzinger
 12  
  */
 13  0
 public enum PageControl {
 14  
     /**
 15  
      * The currently valid values shall be returned.
 16  
      */
 17  0
     CURRENT_VALUES(0x00),
 18  
     /**
 19  
      * Only changeable values shall be returned.
 20  
      */
 21  0
     CHANGEABLE_VALUES(0x01),
 22  
     /**
 23  
      * The default values shall be returned.
 24  
      */
 25  0
     DEFAULT_VALUES(0x02),
 26  
     /**
 27  
      * The last values that have been saved persistently shall be returned.
 28  
      */
 29  0
     SAVED_VALUES(0x03);
 30  
 
 31  
     private final int value;
 32  
 
 33  0
     private PageControl (final int value) {
 34  0
         this.value = value;
 35  0
     }
 36  
 
 37  
     public static PageControl getPageControl (final int value) {
 38  0
         final PageControl[] vals = values();
 39  0
         for (PageControl p : vals)
 40  0
             if (p.value == value) return p;
 41  0
         return null;
 42  
     }
 43  
 }