private SignalSystemsData createSignalSystemsAndGroups(SignalsData sd) { SignalSystemsData systems = sd.getSignalSystemsData(); SignalGroupsData groups = sd.getSignalGroupsData(); createSignalSystem2Lights(idS3, idL23, idL53, systems, groups); createSignalSystem2Lights(idS5, idL35, idL75, systems, groups); createSignalSystem2Lights(idS4, idL24, idL64, systems, groups); createSignalSystem2Lights(idS6, idL46, idL76, systems, groups); createSignalSystem4Lights(idS2, idL12, idL12L1, idL12L2, idL32, idL42, systems, groups); createSignalSystem4Lights(idS7, idL87, idL87L1, idL87L2, idL67, idL57, systems, groups); return systems; }
private SignalControlData createSignalControl(SignalsData sd) { SignalControlData control = sd.getSignalControlData(); createSignalControlFor2LightCrossing(idS3, control); createSignalControlFor2LightCrossing(idS5, control); createSignalControlFor2LightCrossing(idS4, control); createSignalControlFor2LightCrossing(idS6, control); createSignalControlFor4LightCrossing(idS2, control); // this.createSystem2Control(control); // this.createSystem5Control(control); // // // signal system 3, 4, 7, 8 control // List<Id<SignalSystem>> ids = new LinkedList<>(); // ids.add(id3); // ids.add(id4); // for (Id<SignalSystem> id : ids) { // SignalSystemControllerData controller = control.getFactory() // .createSignalSystemControllerData(id); // control.addSignalSystemControllerData(controller); // controller // .setControllerIdentifier(DefaultPlanbasedSignalSystemController.IDENTIFIER); // SignalPlanData plan = control.getFactory().createSignalPlanData( // Id.create(id1, SignalPlan.class)); // controller.addSignalPlanData(plan); // plan.setCycleTime(this.cycle); // plan.setOffset(0); // SignalGroupSettingsData settings1 = control.getFactory() // .createSignalGroupSettingsData( // Id.create(id1, SignalGroup.class)); // plan.addSignalGroupSettings(settings1); // settings1.setOnset(this.onset1); // settings1.setDropping(this.dropping1); // SignalGroupSettingsData settings2 = control.getFactory() // .createSignalGroupSettingsData( // Id.create(id2, SignalGroup.class)); // plan.addSignalGroupSettings(settings2); // settings2.setOnset(this.onset1); // settings2.setDropping(this.dropping1); // } // ids.clear(); // ids.add(id7); // ids.add(id8); // for (Id<SignalSystem> id : ids) { // SignalSystemControllerData controller = control.getFactory() // .createSignalSystemControllerData(id); // control.addSignalSystemControllerData(controller); // controller // .setControllerIdentifier(DefaultPlanbasedSignalSystemController.IDENTIFIER); // SignalPlanData plan = control.getFactory().createSignalPlanData( // Id.create(id1, SignalPlan.class)); // controller.addSignalPlanData(plan); // plan.setCycleTime(this.cycle); // plan.setOffset(0); // SignalGroupSettingsData settings1 = control.getFactory() // .createSignalGroupSettingsData( // Id.create(id1, SignalGroup.class)); // plan.addSignalGroupSettings(settings1); // settings1.setOnset(this.onset1); // settings1.setDropping(this.dropping1); // SignalGroupSettingsData settings2 = control.getFactory() // .createSignalGroupSettingsData( // Id.create(id2, SignalGroup.class)); // plan.addSignalGroupSettings(settings2); // settings2.setOnset(this.onset1); // settings2.setDropping(this.dropping1); // } return control; }