Package de.dermoba.srcp.devices

Examples of de.dermoba.srcp.devices.GL


        }
        if (locomotive.getSession() == null && session != null) {
            locomotive.setSession(session);
        }
        if (locomotive.getGL() == null) {
            GL gl = new GL(session);
            gl.setBus(locomotive.getBus());
            gl.setAddress(locomotive.getAddress());
            locomotive.setGL(gl);
            lockControl.registerControlObject(
                    "GL",
                    new SRCPAddress(locomotive.getBus(), locomotive
                            .getAddress()), locomotive);
View Full Code Here


            }
            int drivingSteps = locomotive.getDrivingSteps();
            if (speed < 0 || speed > drivingSteps) {
                return;
            }
            GL gl = locomotive.getGL();
            switch (locomotive.direction) {
            case FORWARD:
                gl.set(SRCPLocomotive.FORWARD_DIRECTION, speed, drivingSteps,
                        functions);
                break;
            case REVERSE:
                gl.set(SRCPLocomotive.REVERSE_DIRECTION, speed, drivingSteps,
                        functions);
                break;
            case UNDEF:
                gl.set(SRCPLocomotive.FORWARD_DIRECTION, speed, drivingSteps,
                        functions);
                locomotive.setDirection(SRCPLocomotiveDirection.FORWARD);
                break;
            }
            locomotive.setCurrentSpeed(speed);
View Full Code Here

TOP

Related Classes of de.dermoba.srcp.devices.GL

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.