Package fr.soleil.salsa.entity.scanenergy

Examples of fr.soleil.salsa.entity.scanenergy.IDimensionEnergy


        return this.baseBean.getDimensionX();
    }

    @Override
    public void setDimensionX(IDimensionEnergy dimensionEnergy) {
        IDimensionEnergy oldValue = this.baseBean.getDimensionX();
        this.baseBean.setDimensionX(dimensionEnergy);
        this.firePropertyChange("dimensionEnergy", oldValue, dimensionEnergy);

    }
View Full Code Here


                        break;

                    case SCAN_ENERGY:

                        IConfigEnergy configEnergy = (IConfigEnergy) config;
                        IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                        List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

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

                        List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                        for (int i = 0; i < rangeEnergy.size(); i++) {
                            List<ITrajectory> listTrajectories = rangeEnergy.get(i)
                                    .getTrajectoriesList();
                            for (int j = 0; j < listTrajectories.size(); j++) {
                                ITrajectory trajectoryEnergy = new TrajectoryImpl();
View Full Code Here

                    // Actuators
                    List<IActuator> actuatorsList;
                    List<String> actuatorsNamesList;
                    String[] actuatorsNamesArray;
                    IDimensionEnergy dimension = config.getDimensionX();
                    actuatorsList = dimension.getActuatorsList();
                    actuatorsNamesList = new ArrayList<String>(actuatorsList.size());
                    for (IActuator actuator : actuatorsList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesArray = actuatorsNamesList.toArray(new String[actuatorsNamesList
                            .size()]);
                    setAttribute("actuators", actuatorsNamesArray);

                    // Dimensions
                    // 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[] allActuatorsPositionsArray;
                    double initialValue;
                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsList;
                    // The list of integrations times.
                    List<Double> integrationsTimesList;
                    double[] integrationsTimesArray;
                    // The list of speeds.
                    List<Double> speedList = new ArrayList<Double>();
                    double[] speedArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumber;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsList;
                    // Dimension.
                    // Initial computations.
                    dimensionActuatorsList = dimension.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (IActuator actuator : dimensionActuatorsList) {
                        if (actuator.isEnabled()) {
                            initialValue = ActuatorConnector.getData(actuator);
                            actuatorPositionsList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory trajectory : findActuatorTrajectories(dimension,
                                    actuator)) {
                                actuatorPositionsList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(
                                                (ITrajectoryEnergy) trajectory, initialValue));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsList.addAll(actuatorPositionsList);
                            ++enabledActuatorsNumber;
                        }
                    }

                    // Integration Time and steps number.
                    config.getDimensionX().getRangesEnergyList().get(0).getIntegrationTime();
                    integrationsTimesList = new ArrayList<Double>();
                    int stepsNumber;
                    int index;
                    double integrationTime;
                    totalStepsNumber = 0;
                    for (IRangeEnergy range : dimension.getRangesEnergyList()) {
                        stepsNumber = range.getStepsNumber();
                        integrationTime = range.getIntegrationTime();
                        for (index = 0; index < stepsNumber + 1; ++index) {
                            integrationsTimesList.add(integrationTime);
                        }
View Full Code Here

                        break;

                    case SCAN_ENERGY:

                        IConfigEnergy configEnergy = (IConfigEnergy) config;
                        IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                        List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

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

                        List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                        for (int i = 0; i < rangeEnergy.size(); i++) {
                            List<ITrajectory> listTrajectories = rangeEnergy.get(i)
                                    .getTrajectoriesList();
                            for (int j = 0; j < listTrajectories.size(); j++) {
                                ITrajectory trajectoryEnergy = new TrajectoryImpl();
View Full Code Here

        return this.baseBean.getDimensionX();
    }

    @Override
    public void setDimensionX(IDimensionEnergy dimensionEnergy) {
        IDimensionEnergy oldValue = this.baseBean.getDimensionX();
        this.baseBean.setDimensionX(dimensionEnergy);
        this.firePropertyChange("dimensionEnergy", oldValue, dimensionEnergy);

    }
View Full Code Here

                            break;

                        case SCAN_ENERGY:
                            IConfigEnergy configEnergy = (IConfigEnergy) config;
                            IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                            List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                            List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                            for (int i = 0; i < rangeEnergy.size(); i++) {
                                List<ITrajectory> listTrajectories = rangeEnergy.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectories.size(); j++) {
                                    IActuator actuator = listActuatorEnergy.get(j);
View Full Code Here

                    // Actuators
                    List<IActuator> actuatorsList;
                    List<String> actuatorsNamesList;
                    String[] actuatorsNamesArray;
                    IDimensionEnergy dimension = config.getDimensionX();
                    actuatorsList = dimension.getActuatorsList();
                    actuatorsNamesList = new ArrayList<String>(actuatorsList.size());
                    for (IActuator actuator : actuatorsList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesArray = actuatorsNamesList.toArray(new String[actuatorsNamesList
                            .size()]);
                    setAttribute("actuators", actuatorsNamesArray);

                    // Dimensions
                    // 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[] allActuatorsPositionsArray;
                    double initialValue;
                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsList;
                    // The list of integrations times.
                    List<Double> integrationsTimesList;
                    double[] integrationsTimesArray;
                    // The list of speeds.
                    List<Double> speedList = new ArrayList<Double>();
                    double[] speedArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumber;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsList;
                    // Dimension.
                    // Initial computations.
                    dimensionActuatorsList = dimension.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (IActuator actuator : dimensionActuatorsList) {
                        if (actuator.isEnabled()) {
                            initialValue = ActuatorConnector.getData(actuator);
                            actuatorPositionsList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory trajectory : findActuatorTrajectories(dimension,
                                    actuator)) {
                                actuatorPositionsList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(
                                                (ITrajectoryEnergy) trajectory, initialValue));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsList.addAll(actuatorPositionsList);
                            ++enabledActuatorsNumber;
                        }
                    }

                    // Integration Time and steps number.
                    config.getDimensionX().getRangesEnergyList().get(0).getIntegrationTime();
                    integrationsTimesList = new ArrayList<Double>();
                    int stepsNumber;
                    int index;
                    double integrationTime;
                    totalStepsNumber = 0;
                    for (IRangeEnergy range : dimension.getRangesEnergyList()) {
                        stepsNumber = range.getStepsNumber();
                        integrationTime = range.getIntegrationTime();
                        for (index = 0; index < stepsNumber + 1; ++index) {
                            integrationsTimesList.add(integrationTime);
                        }
View Full Code Here

                            break;

                        case SCAN_ENERGY:
                            IConfigEnergy configEnergy = (IConfigEnergy) config;
                            IDimensionEnergy dimensionEnergy = configEnergy.getDimensionX();
                            List<IActuator> listActuatorEnergy = dimensionEnergy.getActuatorsList();

                            List<IRangeEnergy> rangeEnergy = dimensionEnergy.getRangesEnergyList();
                            for (int i = 0; i < rangeEnergy.size(); i++) {
                                List<ITrajectory> listTrajectories = rangeEnergy.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectories.size(); j++) {
                                    IActuator actuator = listActuatorEnergy.get(j);
View Full Code Here

                    // Actuators
                    List<IActuator> actuatorsList;
                    List<String> actuatorsNamesList;
                    String[] actuatorsNamesArray;
                    IDimensionEnergy dimension = config.getDimensionX();
                    actuatorsList = dimension.getActuatorsList();
                    actuatorsNamesList = new ArrayList<String>(actuatorsList.size());
                    for (IActuator actuator : actuatorsList) {
                        if (actuator.isEnabled()) {
                            actuatorsNamesList.add(actuator.getName());
                        }
                    }
                    actuatorsNamesArray = actuatorsNamesList.toArray(new String[actuatorsNamesList
                            .size()]);
                    setAttribute("actuators", actuatorsNamesArray);

                    // Dimensions
                    // 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[] allActuatorsPositionsArray;
                    double initialValue;
                    // Contains the positions in order, range after range, of the trajectories of an
                    // actuator.
                    List<Double> actuatorPositionsList;
                    // Contains the positions in order, actuator after actuator, range after range,
                    // of
                    // the trajectories of all the actuators.
                    List<Double> allActuatorsPositionsList;
                    // The list of integrations times.
                    List<Double> integrationsTimesList;
                    double[] integrationsTimesArray;
                    // The list of speeds.
                    List<Double> speedList = new ArrayList<Double>();
                    double[] speedArray;
                    // The number of points, which is the total steps numbers + 1 per range.
                    int totalStepsNumber;
                    // The actuators used for this dimension
                    List<IActuator> dimensionActuatorsList = dimension.getActuatorsList();
                    // The positions, sorted as Tango expect them.
                    allActuatorsPositionsList = new ArrayList<Double>();
                    // The number of enabled actuators.
                    int enabledActuatorsNumber = 0;
                    // The positions must be sorted by actuator, so we loop over the actuators.
                    for (int index = 0; index < dimensionActuatorsList.size(); index++) {
                        IActuator actuator = dimensionActuatorsList.get(index);
                        if (actuator.isEnabled()) {
                            initialValue = ActuatorConnector.getData(actuator);
                            actuatorPositionsList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted by range.
                            for (ITrajectory trajectory : findActuatorTrajectories(dimension, index)) {
                                actuatorPositionsList.addAll(TrajectoryCalculator
                                        .calculateLinearTrajectoriesPosition(
                                                (ITrajectoryEnergy) trajectory, initialValue));
                                // The speeds must be sorted in the same order, so we read them
                                // here.
                                speedList.add(trajectory.getSpeed());
                            }
                            allActuatorsPositionsList.addAll(actuatorPositionsList);
                            ++enabledActuatorsNumber;
                        }
                    }

                    // Integration Time and steps number.
                    config.getDimensionX().getRangesEnergyList().get(0).getIntegrationTime();
                    integrationsTimesList = new ArrayList<Double>();
                    int stepsNumber;
                    int index;
                    double integrationTime;
                    totalStepsNumber = 0;
                    for (IRangeEnergy range : dimension.getRangesEnergyList()) {
                        stepsNumber = range.getStepsNumber();
                        integrationTime = range.getIntegrationTime();
                        for (index = 0; index < stepsNumber + 1; ++index) {
                            integrationsTimesList.add(integrationTime);
                        }
View Full Code Here

        return this.baseBean.getDimensionEnergy();
    }

    @Override
    public void setDimensionEnergy(IDimensionEnergy dimensionEnergy) {
        IDimensionEnergy oldValue = this.baseBean.getDimensionEnergy();
        this.baseBean.setDimensionEnergy(dimensionEnergy);
        this.firePropertyChange("dimensionEnergy", oldValue, dimensionEnergy);

    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scanenergy.IDimensionEnergy

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.