Examples of ActorSection


Examples of fr.soleil.lib.flyscan.model.parsing.configuration.section.ActorSection

        assertEquals(0, infoSection.getObjects().size());

        assertEquals(7, infoSection.getEntries().size());

        ActorSection actorSection = null;
        for (Section s : configuration.getSections()) {
            if (s instanceof ActorSection) {
                actorSection = (ActorSection) s;
            }
        }

        Trajectory trajectory = null;
        String trajectoryStr = null;
        for (Actor a : actorSection.getActors()) {
            if (a.getName().trim().equalsIgnoreCase("motor_1") && (a instanceof Actuator)) {
                trajectoryStr = ((Actuator<?>) a).getTrajectory();
            }
        }
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.section.ActorSection

        ConfigParser configParser = ConfigParser.getInstance();
        Configuration configuration = configParser.parse("configTest", content);

        assertNotNull(configuration);

        ActorSection actorSection = null;
        for (Section s : configuration.getSections()) {
            if (s instanceof ActorSection) {
                actorSection = (ActorSection) s;
            }
        }

        Trajectory trajectory = null;
        String trajectoryStr = null;
        for (Actor a : actorSection.getActors()) {
            if (a.getName().trim().equalsIgnoreCase("rz") && (a instanceof ContinuousActuator)) {
                trajectoryStr = ((Actuator<?>) a).getTrajectory();
            }
        }
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.section.ActorSection

        ConfigParser configParser = ConfigParser.getInstance();
        Configuration configuration = configParser.parse("configTest", content);

        assertNotNull(configuration);

        ActorSection actorSection = null;
        for (Section s : configuration.getSections()) {
            if (s instanceof ActorSection) {
                actorSection = (ActorSection) s;
            }
        }

        Trajectory trajectory = null;
        String trajectoryStr = null;
        for (Actor a : actorSection.getActors()) {
            if (a.getName().trim().equalsIgnoreCase("actuator_x") && (a instanceof Actuator)) {
                trajectoryStr = ((Actuator<?>) a).getTrajectory();
            }
        }

        assertNotNull(trajectoryStr);

        trajectory = TrajectoryParser.getInstance().parse(trajectoryStr, TrajectoryType.STEP_BY_STEP);

        assertNotNull(trajectory);

        assertEquals("[10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0]", trajectory.getStringTrajectory());

        TabStepByStepTrajectory tTrajectory = ((TabStepByStepTrajectory) trajectory);

        assertEquals(10, tTrajectory.getPoints().size());

        assertEquals(10.0, tTrajectory.getPoints().get(0));

        assertEquals(20.0, tTrajectory.getPoints().get(1));

        assertEquals(30.0, tTrajectory.getPoints().get(2));

        assertEquals(40.0, tTrajectory.getPoints().get(3));

        assertEquals(50.0, tTrajectory.getPoints().get(4));

        assertEquals(60.0, tTrajectory.getPoints().get(5));

        assertEquals(70.0, tTrajectory.getPoints().get(6));

        assertEquals(80.0, tTrajectory.getPoints().get(7));

        assertEquals(90.0, tTrajectory.getPoints().get(8));

        assertEquals(100.0, tTrajectory.getPoints().get(9));

        Sensor sensor = null;

        for (Actor a : actorSection.getActors()) {
            if ((a instanceof Sensor) && (a.getName().equalsIgnoreCase("sensor_a"))) {
                sensor = (Sensor) a;
            }
        }
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.section.ActorSection

                    // Handle new section
                    if (name.equals(ParsingUtil.ACQUISITION)) {
                        currentSection = new AcquisitionSection();
                    } else if (name.equals(ParsingUtil.ACTORS)) {
                        currentSection = new ActorSection();
                    } else if (name.equals(ParsingUtil.BEHAVIOR)) {
                        currentSection = new BehaviorSection();
                    } else if (name.equals(ParsingUtil.INFO)) {
                        currentSection = new InfoSection();
                    } else if (name.equals(ParsingUtil.RECORDING)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.