Package de.dermoba.srcp.model.turnouts

Examples of de.dermoba.srcp.model.turnouts.SRCPTurnout


    private void disableRoute() throws SRCPTurnoutException,
            SRCPModelException, InterruptedException {
        List<SRCPRouteItem> routeItems = sRoute.getRouteItems();
        SRCPTurnoutControl sc = SRCPTurnoutControl.getInstance();
        for (SRCPRouteItem ri : routeItems) {
            SRCPTurnout turnoutToRoute = ri.getTurnout();

            sc.setDefaultState(turnoutToRoute);

            Thread.sleep(waitTime);
        }
View Full Code Here


    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:
View Full Code Here

            instance = new SRCPTurnoutControlAdapter();
        return instance;
    }

    public SRCPTurnoutState getTurnoutState(Turnout turnout) {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        return sTurnout.getTurnoutState();
    }
View Full Code Here

        }

    }

    public void setCurvedLeft(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        try {
            turnoutControl.setCurvedLeft(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
        }
View Full Code Here

            throw new TurnoutException("Turnout Error", e);
        }
    }

    public void setCurvedRight(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        try {
            turnoutControl.setCurvedRight(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
        }
View Full Code Here

        }

    }

    public void setDefaultState(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        try {
            turnoutControl.setDefaultState(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
        }
View Full Code Here

        }

    }

    public void setNonDefaultState(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        try {
            turnoutControl.setNonDefaultState(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
        }
View Full Code Here

        }

    }

    public void setStraight(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);
        try {
            turnoutControl.setStraight(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
        }
View Full Code Here

        }

    }

    public void toggleTest(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = null;
        if (sTurnoutTemp != null) {
            turnoutControl.removeTurnout(sTurnoutTemp);
        }
        System.out.println(turnoutTemp);
        if (turnoutTemp != null)
View Full Code Here

            throw new TurnoutException("Turnout Error", e);
        }
    }

    public void toggle(Turnout turnout) throws TurnoutException {
        SRCPTurnout sTurnout = turnoutsSRCPTurnoutsMap.get(turnout);

        try {
            turnoutControl.toggle(sTurnout);
        } catch (SRCPModelException e) {
            throw new TurnoutException("Turnout Error", e);
View Full Code Here

TOP

Related Classes of de.dermoba.srcp.model.turnouts.SRCPTurnout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.