Package fr.soleil.salsa.entity.scan1d

Examples of fr.soleil.salsa.entity.scan1d.IDimension1D


                    Element actuators = document.createElement("actuators");
                    ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                    // System.out.println("config=" + config.getClass().getName());
                    if (config instanceof IConfig1D) {
                        IConfig1D config1d = (IConfig1D) config;
                        IDimension1D dimensionX = config1d.getDimensionX();
                        List<IActuator> listActuator = dimensionX.getActuatorsList();
                        // System.out.println("Actuator Size=" + listActuator.size());
                        List<IRange1D> range1d = dimensionX.getRangesXList();
                        // System.out.println("range1d=" + range1d.size());
                        for (int rangeIndex = 0; rangeIndex < range1d.size(); rangeIndex++) {
                            IRange1D range1D = range1d.get(rangeIndex);
                            List<ITrajectory> listTrajectory = range1D.getTrajectoriesList();
                            int trajectorySize = listTrajectory.size();
View Full Code Here


                        if (!actuatorTrajectoryMap.isEmpty()) {
                            switch (config.getType()) {

                                case SCAN_1D:
                                    IConfig1D config1d = (IConfig1D) config;
                                    IDimension1D dimensionX = config1d.getDimensionX();
                                    List<IActuator> actuatorList = dimensionX.getActuatorsList();
                                    List<IRange1D> range1DList = dimensionX.getRangesXList();

                                    for (int rangeid = 0; rangeid < range1DList.size(); rangeid++) {
                                        modifyTrajectory(range1DList.get(rangeid), actuatorList,
                                                actuatorTrajectoryMap);
                                    }
View Full Code Here

     * Adds a range and associated trajectories for the model and the view.
     */
    @Override
    public void notifyNewRangeAction() {
        if (this.config != null) {
            IDimension1D dimension = ((IConfig1D) config).getDimensionX();
            Range1DModel rangeToAdd = new Range1DModel();
            rangeToAdd.setDimension(dimension);
            rangeToAdd.setIntegrationTime(1.0);
            rangeToAdd.setStepsNumber(1);
            this.rangeModelsList.add(rangeToAdd);
            List<IRange1D> range1DList = dimension.getRangesXList();

            for (int i = 0; i < this.actuatorModelsList.size(); i++) {
                Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
                trajectory1DModelToAdd.setBeginPosition(0.0);
                trajectory1DModelToAdd.setEndPosition(0.0);
                trajectory1DModelToAdd.setDelta(0.0);
                trajectory1DModelToAdd.setRelative(false);
                trajectory1DModelToAdd.setSpeed(0.0);

                rangeToAdd.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.setRange(rangeToAdd);
                trajectory1DModelToAdd.setActuator(actuatorModelsList.get(i));
                dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            }

            if (view != null) {
                view.addRange();
View Full Code Here

     */
    public void actuatorAddedEvent(List<IActuator> newList) {
        ActuatorModel actuatorModel = (ActuatorModel) newList.get(newList.size() - 1);
        this.actuatorModelsList.add(actuatorModel);
        actuatorModel.addListener(listenerActuator);
        IDimension1D dimension = ((IConfig1D) config).getDimensionX();
        List<IRange1D> range1DList = dimension.getRangesXList();
        if (this.rangeModelsList.size() == 0) {
            this.notifyNewRangeAction();
        }
        for (int i = 0; i < this.rangeModelsList.size(); i++) {
            Range1DModel range = rangeModelsList.get(i);
            IRange1D range1D = range1DList.get(i);
            Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
            trajectory1DModelToAdd.setBeginPosition(0.0);
            trajectory1DModelToAdd.setEndPosition(0.0);
            trajectory1DModelToAdd.setDelta(0.0);
            trajectory1DModelToAdd.setRelative(false);
            trajectory1DModelToAdd.setSpeed(0.0);
            trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
            range.getTrajectoriesList().add(trajectory1DModelToAdd);
            range1D.getTrajectoriesList().add(trajectory1DModelToAdd);
            dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
            trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            trajectory1DModelToAdd.setActuator(actuatorModel);
        }
        this.notifyAddActuator(actuatorModel.getName(), true);
    }
View Full Code Here

    /**
     *
     */
    public void setDimensionX(IDimension1D dimensionX) {
        IDimension1D oldValue = this.baseBean.getDimensionX();
        this.baseBean.setDimensionX(dimensionX);
        this.firePropertyChange("dimensionX", oldValue, dimensionX);
    }
View Full Code Here

                    ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                    switch (config.getType()) {

                        case SCAN_1D:
                            IConfig1D config1d = (IConfig1D) config;
                            IDimension1D dimensionX = config1d.getDimensionX();
                            List<IActuator> listActuator = dimensionX.getActuatorsList();
                            // System.out.println("Actuator Size=" + listActuator.size());
                            List<IRange1D> range1d = dimensionX.getRangesXList();
                            for (int rangeIndex = 0; rangeIndex < range1d.size(); rangeIndex++) {
                                IRange1D range1D = range1d.get(rangeIndex);
                                List<ITrajectory> listTrajectory = range1D.getTrajectoriesList();
                                int trajectorySize = listTrajectory.size();
                                if (listActuator.size() == trajectorySize) {
View Full Code Here

                    ArrayList<ITrajectory> trajectories = new ArrayList<ITrajectory>();
                    switch (config.getType()) {

                        case SCAN_1D:
                            IConfig1D config1d = (IConfig1D) config;
                            IDimension1D dimensionX = config1d.getDimensionX();
                            List<IActuator> listActuator = dimensionX.getActuatorsList();
                            // System.out.println("Actuator Size=" + listActuator.size());
                            List<IRange1D> range1d = dimensionX.getRangesXList();
                            for (int rangeIndex = 0; rangeIndex < range1d.size(); rangeIndex++) {
                                IRange1D range1D = range1d.get(rangeIndex);
                                List<ITrajectory> listTrajectory = range1D.getTrajectoriesList();
                                int trajectorySize = listTrajectory.size();
                                if (listActuator.size() == trajectorySize) {
View Full Code Here

    }

    @Override
    protected IConfig<IDimension1D> initModel() {
        Config1DModel config1DModel = new Config1DModel(this);
        IDimension1D dimension1D = (IDimension1D) getDimensionX();
        if (dimension1D != null && dimension1D instanceof IObjectImpl<?>) {
            IDimension1D dimensionModel = (IDimension1D) ((IObjectImpl<?>) dimension1D).toModel();
            List<IActuator> actuatorList = dimension1D.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);
            config1DModel.setDimensionX(dimensionModel);
        }

        return config1DModel;
    }
View Full Code Here

        indent("**" + c1.getName(), _d);
        indent("  id : " + c1.getId(), _d);
        indent("  scanNumber : " + c1.getScanNumber(), _d);

        IDimension1D X = c1.getDimensionX();
        if (X != null) {
            for (int i = 0; i < X.getActuatorsList().size(); i++) {
                IActuator actuator = X.getActuatorsList().get(i);
                indent("  actuator" + i + " : " + actuator.getName() + (actuator.isEnabled() ? " (on)" : " (off)"), _d);
            }
        }

        for (int i = 0; i < c1.getSensorsList().size(); i++) {
View Full Code Here

        indent("**" + c1.getName(), _d);
        indent("  id : " + c1.getId(), _d);
        indent("  scanNumber : " + c1.getScanNumber(), _d);

        IDimension1D X = c1.getDimensionX();
        if (X != null) {
            for (int i = 0; i < X.getActuatorsList().size(); i++) {
                IActuator actuator = X.getActuatorsList().get(i);
                indent("  actuator" + i + " : " + actuator.getName()
                        + (actuator.isEnabled() ? " (on)" : " (off)"), _d);
            }
        }

View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan1d.IDimension1D

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.