Package fr.soleil.salsa.entity.scan2D

Examples of fr.soleil.salsa.entity.scan2D.IDimension2DX


                        break;

                    case SCAN_2D:
                        IConfig2D config2d = (IConfig2D) config;
                        IDimension2DX dimension2DX = config2d.getDimensionX();
                        List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();

                        ArrayList<ITrajectory> trajectories2DX = new ArrayList<ITrajectory>();

                        List<IRange2DX> range2DX = dimension2DX.getRangesList();

                        for (int i = 0; i < range2DX.size(); i++) {
                            List<ITrajectory> listTrajectory = range2DX.get(i)
                                    .getTrajectoriesList();
                            for (int j = 0; j < listTrajectory.size(); j++) {
View Full Code Here


                    // Actuators X
                    List<IActuator> actuatorsXList;
                    List<String> actuatorsNamesXList;
                    String[] actuatorsNamesXArray;
                    IDimension2DX dimensionX = config.getDimensionX();
                    actuatorsXList = dimensionX.getActuatorsList();
                    actuatorsNamesXList = new ArrayList<String>(actuatorsXList.size());
                    for (IActuator actuator : actuatorsXList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesXList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesXArray = actuatorsNamesXList
                            .toArray(new String[actuatorsNamesXList.size()]);
                    setAttribute("actuators", actuatorsNamesXArray);

                    // Actuators y
                    List<IActuator> actuatorsYList;
                    List<String> actuatorsNamesYList;
                    String[] actuatorsNamesYArray;
                    IDimension2DY dimensionY = config.getDimensionY();
                    actuatorsYList = dimensionY.getActuatorsList();
                    actuatorsNamesYList = new ArrayList<String>(actuatorsYList.size());
                    for (IActuator actuator : actuatorsYList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesYList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesYArray = actuatorsNamesYList
                            .toArray(new String[actuatorsNamesYList.size()]);
                    setAttribute("actuators2", actuatorsNamesYArray);

                    // Dimensions X
                    // Tango exchanges trajectories as double arrays that contains the positions, in
                    // order,
                    // actuator after actuator, range after range, of the trajectories of all the
                    // actuators.
                    // There is one such array per dimension.
                    double[] allActuatorsPositionsXArray;
                    double initialValueX;

                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsXList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsXList;
                    // The list of integrations times.
                    List<Double> integrationsTimesXList;
                    double[] integrationsTimesXArray;
                    int integrationTimeIndexX;
                    // The list of speeds.
                    List<Double> speedXList = new ArrayList<Double>();
                    double[] speedXArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumberX;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsXList;
                    // Tango API
                    dimensionActuatorsXList = dimensionX.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsXList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsXNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (IActuator actuator : dimensionActuatorsXList) {
                        if (actuator.isEnabled()) {
                            initialValueX = ActuatorConnector.getData(actuator);
                            actuatorPositionsXList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory2DX trajectory : findActuatorTrajectories(dimensionX,
                                    actuator)) {
                                actuatorPositionsXList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(trajectory,
                                                initialValueX));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedXList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsXList.addAll(actuatorPositionsXList);
                            ++enabledActuatorsXNumber;
                        }
                    }

                    // Integration Time and steps number.
                    integrationsTimesXList = new ArrayList<Double>(dimensionX.getRangesList()
                            .size());
                    int stepsNumberX;
                    totalStepsNumberX = 0;
                    for (IRange2DX range : dimensionX.getRangesList()) {
                        stepsNumberX = range.getStepsNumber();
                        for (integrationTimeIndexX = 0; integrationTimeIndexX < stepsNumberX + 1; ++integrationTimeIndexX) {
                            integrationsTimesXList.add(range.getIntegrationTime());
                        }
                        totalStepsNumberX += stepsNumberX + 1;
View Full Code Here

                            break;

                        case SCAN_2D:
                            IConfig2D config2d = (IConfig2D) config;
                            IDimension2DX dimension2DX = config2d.getDimensionX();
                            List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                            List<IRange2DX> range2DX = dimension2DX.getRangesList();

                            for (int i = 0; i < range2DX.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DX.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
View Full Code Here

                    // Actuators X
                    List<IActuator> actuatorsXList;
                    List<String> actuatorsNamesXList;
                    String[] actuatorsNamesXArray;
                    IDimension2DX dimensionX = config.getDimensionX();
                    actuatorsXList = dimensionX.getActuatorsList();
                    actuatorsNamesXList = new ArrayList<String>(actuatorsXList.size());
                    for (IActuator actuator : actuatorsXList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesXList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesXArray = actuatorsNamesXList
                            .toArray(new String[actuatorsNamesXList.size()]);
                    setAttribute("actuators", actuatorsNamesXArray);

                    // Actuators y
                    List<IActuator> actuatorsYList;
                    List<String> actuatorsNamesYList;
                    String[] actuatorsNamesYArray;
                    IDimension2DY dimensionY = config.getDimensionY();
                    actuatorsYList = dimensionY.getActuatorsList();
                    actuatorsNamesYList = new ArrayList<String>(actuatorsYList.size());
                    for (IActuator actuator : actuatorsYList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesYList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesYArray = actuatorsNamesYList
                            .toArray(new String[actuatorsNamesYList.size()]);
                    setAttribute("actuators2", actuatorsNamesYArray);

                    // Dimensions X
                    // Tango exchanges trajectories as double arrays that contains the positions, in
                    // order,
                    // actuator after actuator, range after range, of the trajectories of all the
                    // actuators.
                    // There is one such array per dimension.
                    double[] allActuatorsPositionsXArray;
                    double initialValueX;

                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsXList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsXList;
                    // The list of integrations times.
                    List<Double> integrationsTimesXList;
                    double[] integrationsTimesXArray;
                    int integrationTimeIndexX;
                    // The list of speeds.
                    List<Double> speedXList = new ArrayList<Double>();
                    double[] speedXArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumberX;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsXList;
                    // Tango API
                    dimensionActuatorsXList = dimensionX.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsXList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsXNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (IActuator actuator : dimensionActuatorsXList) {
                        if (actuator.isEnabled()) {
                            initialValueX = ActuatorConnector.getData(actuator);
                            actuatorPositionsXList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory2DX trajectory : findActuatorTrajectories(dimensionX,
                                    actuator)) {
                                actuatorPositionsXList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(trajectory,
                                                initialValueX));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedXList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsXList.addAll(actuatorPositionsXList);
                            ++enabledActuatorsXNumber;
                        }
                    }

                    // Integration Time and steps number.
                    integrationsTimesXList = new ArrayList<Double>(dimensionX.getRangesList()
                            .size());
                    int stepsNumberX;
                    totalStepsNumberX = 0;
                    for (IRange2DX range : dimensionX.getRangesList()) {
                        stepsNumberX = range.getStepsNumber();
                        for (integrationTimeIndexX = 0; integrationTimeIndexX < stepsNumberX + 1; ++integrationTimeIndexX) {
                            integrationsTimesXList.add(range.getIntegrationTime());
                        }
                        totalStepsNumberX += stepsNumberX + 1;
View Full Code Here

                    // Actuators X
                    List<IActuator> actuatorsXList;
                    List<String> actuatorsNamesXList;
                    String[] actuatorsNamesXArray;
                    IDimension2DX dimensionX = config.getDimensionX();
                    actuatorsXList = dimensionX.getActuatorsList();
                    actuatorsNamesXList = new ArrayList<String>(actuatorsXList.size());
                    for (IActuator actuator : actuatorsXList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesXList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesXArray = actuatorsNamesXList
                            .toArray(new String[actuatorsNamesXList.size()]);
                    setAttribute("actuators", actuatorsNamesXArray);

                    // Actuators y
                    List<IActuator> actuatorsYList;
                    List<String> actuatorsNamesYList;
                    String[] actuatorsNamesYArray;
                    IDimension2DY dimensionY = config.getDimensionY();
                    actuatorsYList = dimensionY.getActuatorsList();
                    actuatorsNamesYList = new ArrayList<String>(actuatorsYList.size());
                    for (IActuator actuator : actuatorsYList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesYList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesYArray = actuatorsNamesYList
                            .toArray(new String[actuatorsNamesYList.size()]);
                    setAttribute("actuators2", actuatorsNamesYArray);

                    // Dimensions X
                    // Tango exchanges trajectories as double arrays that contains the positions, in
                    // order,
                    // actuator after actuator, range after range, of the trajectories of all the
                    // actuators.
                    // There is one such array per dimension.
                    double[] allActuatorsPositionsXArray;
                    double initialValueX;

                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsXList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsXList;
                    // The list of integrations times.
                    List<Double> integrationsTimesXList;
                    double[] integrationsTimesXArray;
                    int integrationTimeIndexX;
                    // The list of speeds.
                    List<Double> speedXList = new ArrayList<Double>();
                    double[] speedXArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumberX;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsXList = dimensionX.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsXList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsXNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (int index = 0; index < dimensionActuatorsXList.size(); index++) {
                        IActuator actuator = dimensionActuatorsXList.get(index);
                        if (actuator.isEnabled()) {
                            initialValueX = ActuatorConnector.getData(actuator);
                            actuatorPositionsXList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory2DX trajectory : findActuatorTrajectories(dimensionX,
                                    index)) {
                                actuatorPositionsXList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(trajectory,
                                                initialValueX));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedXList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsXList.addAll(actuatorPositionsXList);
                            ++enabledActuatorsXNumber;
                        }
                    }

                    // Integration Time and steps number.
                    integrationsTimesXList = new ArrayList<Double>(dimensionX.getRangesList()
                            .size());
                    int stepsNumberX;
                    totalStepsNumberX = 0;
                    for (IRange2DX range : dimensionX.getRangesList()) {
                        stepsNumberX = range.getStepsNumber();
                        for (integrationTimeIndexX = 0; integrationTimeIndexX < stepsNumberX + 1; ++integrationTimeIndexX) {
                            integrationsTimesXList.add(range.getIntegrationTime());
                        }
                        totalStepsNumberX += stepsNumberX + 1;
View Full Code Here

                            break;

                        case SCAN_2D:
                            IConfig2D config2d = (IConfig2D) config;
                            IDimension2DX dimension2DX = config2d.getDimensionX();
                            List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();
                            List<IRange2DX> range2DX = dimension2DX.getRangesList();

                            for (int i = 0; i < range2DX.size(); i++) {
                                List<ITrajectory> listTrajectory = range2DX.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
View Full Code Here

        this.firePropertyChange("actuatorsDelay", oldValue, actuatorsDelay);
    }

    @Override
    public void setDimensionX(IDimension2DX dimensionX) {
        IDimension2DX oldValue = baseBean.getDimensionX();
        baseBean.setDimensionX(dimensionX);
        this.firePropertyChange("dimensionX", oldValue, dimensionX);
    }
View Full Code Here

                    break;

                case SCAN_2D:
                    IConfig2D config2d = (IConfig2D) config;
                    IDimension2DX dimension2DX = config2d.getDimensionX();
                    List<IActuator> listActuator2DX = dimension2DX.getActuatorsList();

                    ArrayList<ITrajectory> trajectories2DX = new ArrayList<ITrajectory>();

                    List<IRange2DX> range2DX = dimension2DX.getRangesList();

                    for (int i = 0; i < range2DX.size(); i++) {
                        List<ITrajectory> listTrajectory = range2DX.get(i).getTrajectoriesList();
                        for (int j = 0; j < listTrajectory.size(); j++) {
                            ITrajectory trajectory = new TrajectoryImpl();
View Full Code Here

        this.firePropertyChange("actuatorsDelay", oldValue, actuatorsDelay);
    }

    @Override
    public void setDimensionX(IDimension2DX dimensionX) {
        IDimension2DX oldValue = baseBean.getDimensionX();
        baseBean.setDimensionX(dimensionX);
        this.firePropertyChange("dimensionX", oldValue, dimensionX);
    }
View Full Code Here

        if (this instanceof IDimension1D) {
            IDimension1D dimension1D = ((IDimension1D) this);
            tmpRangeList = dimension1D.getRangesXList();
        }
        else if (this instanceof IDimension2DX) {
            IDimension2DX dimension2DX = ((IDimension2DX) this);
            tmpRangeList = dimension2DX.getRangesList();
        }
        else if (this instanceof IDimension2DY) {
            IDimension2DY dimension2DY = ((IDimension2DY) this);
            tmpRangeList = dimension2DY.getRangesList();
        }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scan2D.IDimension2DX

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.