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

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

                        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++) {
                                ITrajectory trajectory = new TrajectoryImpl();
View Full Code Here


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

        return this.baseBean.getNumberOfPoints();
    }

    @Override
    public void setIntegrationTime(Double integrationTime) {
        IDimensionHCS oldValue = this.baseBean.getDimensionX();
        this.baseBean.setIntegrationTime(integrationTime);
        this.firePropertyChange("integrationTime", oldValue, integrationTime);
    }
View Full Code Here

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

    @Override
    public void setNumberOfPoints(Integer numberOfPoints) {
        IDimensionHCS oldValue = this.baseBean.getDimensionX();
        this.baseBean.setNumberOfPoints(numberOfPoints);
        this.firePropertyChange("numberOfPoints", oldValue, numberOfPoints);
    }
View Full Code Here

                    // Get the only one range
                    int nbOfPoint = 1;
                    double timeIntegration = 1;

                    IDimensionHCS dimension = config.getDimensionX();
                    if (dimension != null) {
                        List<IRangeHCS> rangeList = dimension.getRangesXList();
                        if (rangeList != null && !rangeList.isEmpty()) {
                            IRangeHCS range = rangeList.get(0);
                            nbOfPoint = range.getStepsNumber();
                            timeIntegration = range.getIntegrationTime();
                        }
                    }

                    setAttribute("hwContinuousNbPt", nbOfPoint);

                    // Partial mode for recording, must be manage by an external client
                    // setAttribute("dataRecorderPartialMode", false);

                    // Run name.
                    String runName = config.getName();
                    IDirectory directory = config.getDirectory();
                    while (directory != null) {
                        runName = directory.getName() + "." + runName;
                        directory = directory.getDirectory();
                    }
                    setAttribute("runName", runName);

                    // Scan number.
                    setAttribute("scanNumber", config.getScanNumber());

                    // Timebases
                    List<ITimebase> timebasesList = config.getTimebaseList();
                    List<String> timebasesNameList = new ArrayList<String>(timebasesList.size());
                    for (ITimebase timebase : timebasesList) {
                        if (timebase.isEnabled()) {
                            timebasesNameList.add(timebase.getName());
                        }
                    }
                    String[] timebasesNameArray = timebasesNameList
                            .toArray(new String[timebasesNameList.size()]);
                    setAttribute("timebases", timebasesNameArray);

                    // Sensors
                    List<ISensor> sensorsList = config.getSensorsList();
                    List<String> sensorsNameList = new ArrayList<String>(sensorsList.size());
                    for (ISensor sensor : sensorsList) {
                        if (sensor.isEnabled()) {
                            sensorsNameList.add(sensor.getName());
                        }
                    }
                    String[] sensorsNameArray = sensorsNameList.toArray(new String[sensorsNameList
                            .size()]);
                    setAttribute("sensors", sensorsNameArray);

                    // Actuators
                    List<IActuator> actuatorsList;
                    List<String> actuatorsNamesList;
                    String[] actuatorsNamesArray;
                    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.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

                    // 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

        return this.baseBean.getNumberOfPoints();
    }

    @Override
    public void setIntegrationTime(Double integrationTime) {
        IDimensionHCS oldValue = this.baseBean.getDimensionX();
        this.baseBean.setIntegrationTime(integrationTime);
        this.firePropertyChange("integrationTime", oldValue, integrationTime);
    }
View Full Code Here

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

    @Override
    public void setNumberOfPoints(Integer numberOfPoints) {
        IDimensionHCS oldValue = this.baseBean.getDimensionX();
        this.baseBean.setNumberOfPoints(numberOfPoints);
        this.firePropertyChange("numberOfPoints", oldValue, numberOfPoints);
    }
View Full Code Here

                            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

     * Called when integration time changed in HCS scan.
     */
    @Override
    public void notifyIntegrationTimeHCSChanged(String value) {
        IConfigHCS configHCS = (IConfigHCS) config;
        IDimensionHCS dimHCS = configHCS.getDimensionX();
        if (dimHCS.getActuatorsList() != null && dimHCS.getActuatorsList().size() > 0
                && dimHCS.getRangesXList() != null && dimHCS.getRangesXList().size() > 0) {
            IRangeHCS range = dimHCS.getRangesXList().get(0);
            computeIntegrationTimeChange(range, Double.valueOf(value));
        }
    }
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.