Package de.dermoba.srcp.model.routes

Examples of de.dermoba.srcp.model.routes.SRCPRoute


            instance = new SRCPRouteControlAdapter();
        return instance;
    }

    public void disableRoute(Route route) throws RouteException {
        SRCPRoute sRoute = routesSRCPRoutesMap.get(route);
        try {
            routeControl.disableRoute(sRoute);
        } catch (SRCPModelException e) {
            throw new RouteException("Route Error", e);
        }
View Full Code Here


            throw new RouteException("Route Error", e);
        }
    }

    public void enableRoute(Route route) throws RouteException {
        SRCPRoute sRoute = routesSRCPRoutesMap.get(route);
        try {
            routeControl.enableRoute(sRoute);
        } catch (SRCPModelException e) {
            throw new RouteException("Route Error", e);
        }
View Full Code Here

        }

    }

    public boolean isRouteEnabled(Route route) {
        SRCPRoute sRoute = routesSRCPRoutesMap.get(route);
        return sRoute.getRouteState().equals(SRCPRouteState.ENABLED);
    }
View Full Code Here

        SRCPRoute sRoute = routesSRCPRoutesMap.get(route);
        return sRoute.getRouteState().equals(SRCPRouteState.ENABLED);
    }

    public boolean isRouting(Route route) {
        SRCPRoute sRoute = routesSRCPRoutesMap.get(route);
        return sRoute.getRouteState().equals(SRCPRouteState.ROUTING);
    }
View Full Code Here

                .getInstance();
        routeControl.setRoutingDelay(Preferences.getInstance().getIntValue(
                PreferencesKeys.ROUTING_DELAY));

        for (Route route : persistence.getAllRoutes()) {
            SRCPRoute sRoute = new SRCPRoute();
            for (RouteItem routeItem : route.getRouteItems()) {

                SRCPRouteItem sRouteItem = new SRCPRouteItem();
                SRCPTurnout sTurnout = turnoutControl.getSRCPTurnout(routeItem
                        .getTurnout());
                sRouteItem.setTurnout(sTurnout);
                if (routeItem.getRoutedState().toUpperCase().equals("LEFT")) {
                    sRouteItem.setRoutedState(SRCPTurnoutState.LEFT);
                } else if (routeItem.getRoutedState().toUpperCase()
                        .equals("RIGHT")) {

                    sRouteItem.setRoutedState(SRCPTurnoutState.RIGHT);
                } else if (routeItem.getRoutedState().toUpperCase()
                        .equals("STRAIGHT")) {

                    sRouteItem.setRoutedState(SRCPTurnoutState.STRAIGHT);
                } else {

                    sRouteItem.setRoutedState(SRCPTurnoutState.UNDEF);
                }
                sRoute.addRouteItem(sRouteItem);
            }
            routesSRCPRoutesMap.put(route, sRoute);
            SRCPRoutesRoutesMap.put(sRoute, route);
        }
        routeControl.addRouteChangeListener(this);
View Full Code Here

TOP

Related Classes of de.dermoba.srcp.model.routes.SRCPRoute

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.