package turgen.plugin.csturbo;
import turgen.generator.PulseCrate;
import turgen.playlist.AbstractPlayListItem;

/**Polozka playlistu pro "spojite zaznamy turbo", tj. Chainloader a KBlock*/
public class CsTurboPlaylistItem extends AbstractPlayListItem {
    
    /**Jmeno souboru do TURBO HLAVICKY*/
    String fname;
    
    /**Typ souboru do TURBO HLAVICKY*/
    String type;
    
    /**Zavadeci adresa*/
    String load;
    
    /**Delka souboru*/
    String length;
    
    /**Spousteci adresa*/
    String run;
    
    /**Typ konverze*/
    public int conversionType;

    /**Ticho*/
    public int[] silenceList;

    /**Konstanty pro typ konverze*/
    public static final int CV_MONOLITHIC=0;
    public static final int CV_SEGMENTED_CHAIN=1;
    public static final int CV_SEGMENTED_BLOCK=2;
    public static final int CV_BASIC=3;
    public static final int CV_DATA=4;
    public static final int CV_BINTURBO=5;


    
  public CsTurboPlaylistItem(String inF,String outF,PulseCrate speed,String type,String fname,String load,String run,String length,int conversionType,int[] silenceList) {
        this.inFile=inF;
        this.outFile=outF;
        this.pulses=speed;
        this.fname=fname;
        this.load=load;
        this.run=run;
        this.length=length;
        this.type=type;
        this.conversionType=conversionType;
        this.silenceList=silenceList;
    }
    
    public String toString() {
       
       switch (conversionType) {
           case CV_SEGMENTED_BLOCK: {
               return "BlockLoading: "+fname;
           }
           case CV_SEGMENTED_CHAIN: {
               return "ChainLoading: "+fname;
           }
           case CV_MONOLITHIC: {
               return "Monolithic: "+fname;
           }
           case CV_BASIC: {
               return "BASIC: "+fname;
           }
           case CV_BINTURBO: {
               return "Binary turbo: "+fname;
           }
           case CV_DATA: {
               return "Data: "+fname+","+load+","+run+","+length;
            }
       }
       return "";
    }
    
    public void appendParameter(String param) {
        
    }
    
    public boolean validate() {
        return false;
    }
    
}
