turnoutControl.update(SRCPTurnoutsTurnoutsMap.keySet());
// turnoutControl.setSession(session)
}
SRCPTurnout createSRCPTurnout(Turnout turnout) {
SRCPTurnout sTurnout = new MMTurnout();
sTurnout.setBus1(turnout.getBus1());
sTurnout.setBus2(turnout.getBus2());
sTurnout.setAddress1(turnout.getAddress1());
sTurnout.setAddress2(turnout.getAddress2());
sTurnout.setAddress1Switched(turnout.isAddress1Switched());
sTurnout.setAddress2Switched(turnout.isAddress2Switched());
switch (turnout.getDefaultStateEnum()) {
case STRAIGHT:
sTurnout.setDefaultState(SRCPTurnoutState.STRAIGHT);
break;
case LEFT:
sTurnout.setDefaultState(SRCPTurnoutState.LEFT);
break;
case RIGHT:
sTurnout.setDefaultState(SRCPTurnoutState.RIGHT);
break;
case UNDEF:
sTurnout.setDefaultState(SRCPTurnoutState.UNDEF);
break;
}
switch (turnout.getTurnoutType().getTurnoutTypeEnum()) {
case DEFAULT:
sTurnout.setTurnoutType(SRCPTurnoutTypes.DEFAULT);
break;
case DOUBLECROSS:
sTurnout.setTurnoutType(SRCPTurnoutTypes.DOUBLECROSS);
break;
case THREEWAY:
sTurnout.setTurnoutType(SRCPTurnoutTypes.THREEWAY);
break;
}
return sTurnout;
}