package signals;

public final class AdaptSignals extends Signals{

	private static final long serialVersionUID = 1L;

	public AdaptSignals(Signals s){
		// v2.0 fields
		this.id = s.id;
		this.widthUnit=s.widthUnit;
		this.name=s.name;
		this.setUpTime = s.setUpTime;
		this.bus=s.bus;
		this.clock=s.clock;
		this.dependsOnClk=s.dependsOnClk;
		this.selected_for_edit=s.selected_for_edit;
		this.clkToQdelay=s.clkToQdelay;
		this.wave = s.wave;
		this.busNames = s.busNames;
		this.busFill = s.busFill;
		this.ratio=s.ratio;
		this.clockDomainId=s.clockDomainId;
		this.displayRisingEdges=s.displayRisingEdges;
		if (wave.length<500){
			System.out.println("Wave size conversion");
			int[] tempWave = wave;
			String[] tempbusNames = busNames;
			boolean[] tempbusFill = busFill;
			wave = new int[500];
			busNames = new String[500];
			busFill = new boolean[500];
			for (int i=0; i<500; i++){
				if (i<200){
					wave[i]=tempWave[i];
					busNames[i]=tempbusNames[i];
					busFill[i]=tempbusFill[i];
				}
				else{
					wave[i]=0;
				}
			}
		}
		
		// v2.1 new fields
		if ((Boolean)s.bold!=null) this.bold=s.bold;
		if (s.color!=null) this.color=s.color;
	}

	public void generate(boolean beginOnRisingEdge) {
	}
}
