Package fr.soleil.salsa.entity.scanhcs

Examples of fr.soleil.salsa.entity.scanhcs.IDimensionHCS


                            break;

                        case SCAN_HCS:

                            IConfigHCS configHCS = (IConfigHCS) config;
                            IDimensionHCS dimensionHCS = configHCS.getDimensionX();
                            List<IActuator> listActuatorHCS = dimensionHCS.getActuatorsList();

                            List<IRangeHCS> rangeHCS = dimensionHCS.getRangesXList();
                            for (int i = 0; i < rangeHCS.size(); i++) {
                                List<ITrajectory> listTrajectory = rangeHCS.get(i)
                                        .getTrajectoriesList();
                                for (int j = 0; j < listTrajectory.size(); j++) {
                                    IActuator actuator = listActuatorHCS.get(j);
View Full Code Here


        }
    }

    private IRangeHCS getIRangeHCS() {
        IRangeHCS rangeHCS = null;
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null) {
            List<IRangeHCS> rangeList = dimension.getRangesXList();
            if (rangeList != null && !rangeList.isEmpty()) {
                rangeHCS = rangeList.get(0);
            }
        }
        return rangeHCS;
View Full Code Here

    }

    @Override
    protected IConfig<IDimensionHCS> initModel() {
        ConfigHCSModel configHCSModel = new ConfigHCSModel(this);
        IDimensionHCS dimension = (IDimensionHCS) getDimensionX();
        if (dimension != null && dimension instanceof IObjectImpl<?>) {
            IDimensionHCS dimensionModel = (IDimensionHCS) ((IObjectImpl<?>) dimension).toModel();
            List<IActuator> actuatorList = dimension.getActuatorsList();
            List<IActuator> actuatorListModel = convertActuatorListToModel(actuatorList);
            dimensionModel.setActuatorsList(actuatorListModel);
            configHCSModel.setDimensionX(dimensionModel);
        }
        return configHCSModel;
    }
View Full Code Here

                    // Actuators
                    List<IActuator> actuatorsList;
                    List<String> actuatorsNamesList;
                    String[] actuatorsNamesArray;
                    IDimensionHCS 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 speeds.
                    List<Double> speedList = new ArrayList<Double>();
                    double[] speedArray;
                    // 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.
View Full Code Here

        else if (dimension instanceof IDimensionEnergy) {
            IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) dimension);
            rangeList = dimensionEnergy.getRangesEnergyList();
        }
        else if (dimension instanceof IDimensionHCS) {
            IDimensionHCS dimensionHCS = ((IDimensionHCS) dimension);
            rangeList = dimensionHCS.getRangesXList();
        }
        return rangeList;
    }
View Full Code Here

            tmpRangeList = dimension2DY.getRangesList();
        } else if (this instanceof IDimensionEnergy) {
            IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) this);
            tmpRangeList = dimensionEnergy.getRangesEnergyList();
        } else if (this instanceof IDimensionHCS) {
            IDimensionHCS dimensionHCS = ((IDimensionHCS) this);
            tmpRangeList = dimensionHCS.getRangesXList();
        } else if (this instanceof IDimensionK) {
            IDimensionK dimensionK = ((IDimensionK) this);
            tmpRangeList = dimensionK.getRangesXList();
        } else {
            tmpRangeList = rangeList;
View Full Code Here

            dimension2DY.setRangesList((List<IRange2DY>) arangeList);
        } else if (this instanceof IDimensionEnergy) {
            IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) this);
            dimensionEnergy.setRangesEnergyList((List<IRangeEnergy>) arangeList);
        } else if (this instanceof IDimensionHCS) {
            IDimensionHCS dimensionHCS = ((IDimensionHCS) this);
            dimensionHCS.setRangesXList((List<IRangeHCS>) arangeList);
        } else if (this instanceof IDimensionK) {
            IDimensionK dimensionK = ((IDimensionK) this);
            dimensionK.setRangesXList((List<IRangeK>) arangeList);
        } else {
            this.rangeList = (List<IRange>) arangeList;
View Full Code Here

            } else if ((this instanceof IDimensionEnergy) && (range instanceof IRangeEnergy)) {
                IDimensionEnergy dimensionEnergy = ((IDimensionEnergy) this);
                List<IRangeEnergy> tmpRangeList = dimensionEnergy.getRangesEnergyList();
                tmpRangeList.add((IRangeEnergy) range);
            } else if ((this instanceof IDimensionHCS) && (range instanceof IRangeHCS)) {
                IDimensionHCS dimensionHCS = ((IDimensionHCS) this);
                List<IRangeHCS> tmpRangeList = dimensionHCS.getRangesXList();
                tmpRangeList.add((IRangeHCS) range);
            } else if ((this instanceof IDimensionK) && (range instanceof IRangeK)) {
                IDimensionK dimensionK = ((IDimensionK) this);
                List<IRangeK> tmpRangeList = dimensionK.getRangesXList();
                tmpRangeList.add((IRangeK) range);
View Full Code Here

                // Actuators
                List<IActuator> actuatorsList;
                List<String> actuatorsNamesList;
                String[] actuatorsNamesArray;
                IDimensionHCS 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 speeds.
                List<Double> speedList = new ArrayList<Double>();
                double[] speedArray;
                // 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.
View Full Code Here

        loadConfig();
    }

    private void initConfig() {
        // Init all the configuration
        IDimensionHCS dimensionHCS = configHCS.getDimensionX();
        if (dimensionHCS == null) {
            dimensionHCS = new DimensionHCSImpl();
            configHCS.setDimensionX(dimensionHCS);
        }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.scanhcs.IDimensionHCS

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.