}
private void enableRoute() throws SRCPTurnoutException, SRCPModelException,
InterruptedException {
List<SRCPRouteItem> routeItems = sRoute.getRouteItems();
SRCPTurnoutControl sc = SRCPTurnoutControl.getInstance();
for (SRCPRouteItem ri : routeItems) {
SRCPTurnout turnoutToRoute = ri.getTurnout();
switch (ri.getRoutedState()) {
case STRAIGHT:
sc.setStraight(turnoutToRoute);
break;
case LEFT:
sc.setCurvedLeft(turnoutToRoute);
break;
case RIGHT:
sc.setCurvedRight(turnoutToRoute);
break;
}
Thread.sleep(waitTime);
}
sRoute.setRouteState(SRCPRouteState.ENABLED);