Package fr.soleil.lib.flyscan.model.parsing.configuration.trajectory

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.trajectory.Trajectory


            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();
            }
        }

        assertNotNull(trajectoryStr);

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

        assertNotNull(trajectory);

        assertEquals("[{40.0,50.0,5}]", trajectory.getStringTrajectory());

        IntervalStepByStepTrajectory isbsTrajectory = ((IntervalStepByStepTrajectory) trajectory);

        assertEquals(1, isbsTrajectory.getIntervals().size());
View Full Code Here


            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();
            }
        }

        assertNotNull(trajectoryStr);

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

        assertNotNull(trajectory);

        assertEquals("[{50.0,100.0,5}]", trajectory.getStringTrajectory());

        ContinuousTrajectory cTrajectory = ((ContinuousTrajectory) trajectory);

        assertEquals(1, cTrajectory.getIntervals().size());
View Full Code Here

            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());
View Full Code Here

                    break;
                case TRAJECTORY:
                    if (entry instanceof TrajectoryEntry) {
                        String location = getErrorLocation(entry, entryContainer);
                        Trajectory trajectory = ((TrajectoryEntry) entry).getTrajectory();
                        if (trajectory instanceof ContinuousTrajectory) {
                            editorComponent = new ContinuousTrajectoryComponent(panelError, errorsMap,
                                    (ContinuousTrajectory) trajectory, location, this, labelName, tabTitle);
                        } else if (trajectory instanceof IntervalStepByStepTrajectory) {
                            editorComponent = new IntervalStepByStepTrajectoryComponent(panelError, errorsMap,
                                    (IntervalStepByStepTrajectory) trajectory, location, this, labelName, tabTitle);
                        } else if (trajectory instanceof TabStepByStepTrajectory) {
                            editorComponent = new TabStepByStepTrajectoryComponent(panelError, errorsMap,
                                    (TabStepByStepTrajectory) trajectory, location, this, labelName, tabTitle);
                        }
                        final ATrajectoryComponent<?> aTrajectoryComponent = (ATrajectoryComponent<?>) editorComponent;
                        aTrajectoryComponent.addBeingEditedListener(new ConfigurationEditionStateListener() {

                            @Override
                            public void setConfigurationBeingEdited(boolean isBeingEdited) {
                                Trajectory traj = aTrajectoryComponent.getTrajectory();
                                fireEditionStateChanged(isBeingEdited, entry, entryContainer,
                                        traj.getStringTrajectory(), aTrajectoryComponent, labelName, tabTitle);
                            }
                        });
                    }
                    break;
                default:
View Full Code Here

                                        }
//                                    else {
//                                        type = TrajectoryType.CUSTOM;
//                                    }
                                        try {
                                            Trajectory trajectory = TrajectoryParser.getInstance().parse(value, type);
                                            ((TrajectoryEntry) entry).setTrajectory(trajectory);
                                        } catch (FSParsingException e) {
                                            // Bufferize FSParsingException in case of custom trajectory and
                                            // 'custom_trajectory' keyword has not been read yet
                                            trajectoryparsingExceptionBuffer.put((Actuator<?>) currentObject, e);
View Full Code Here

TOP

Related Classes of fr.soleil.lib.flyscan.model.parsing.configuration.trajectory.Trajectory

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.