Package fr.soleil.salsa.entity.scanhcs

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


     *
     * @return
     */
    public Integer getNumberOfPoints() {
        Integer stepNumber = 1;
        IRangeHCS rangeHCS = getIRangeHCS();
        if (rangeHCS != null) {
            stepNumber = rangeHCS.getStepsNumber();
        }
        return stepNumber;
    }
View Full Code Here


     * Set the number of points.
     *
     * @param dimensionX
     */
    public void setNumberOfPoints(Integer numberOfPoints) {
        IRangeHCS rangeHCS = getIRangeHCS();
        if (rangeHCS != null) {
            rangeHCS.setStepsNumber(numberOfPoints);
        }
    }
View Full Code Here

            rangeHCS.setStepsNumber(numberOfPoints);
        }
    }

    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);
View Full Code Here

     */
    // This function returns the configuration it received as parameter.
    // Note that this is specific to LocalConfigMathService and that other implementations of IConfigMathService may behave differently.
    public ITrajectory computeIntegrationTimeChange(ITrajectory newTrajectory, double integrationTime, int numberOfPoints) {
       
        IRangeHCS range = ((ITrajectoryHCS) newTrajectory).getRange();
        for(ITrajectory trajectory : range.getTrajectoriesList()) {
            double beginPosition = trajectory.getBeginPosition();
            double endPosition = trajectory.getEndPosition();
            double delta = Math.abs(endPosition - beginPosition) / numberOfPoints;
            double speed = delta / integrationTime;
            trajectory.setDelta(delta);
View Full Code Here

     */
    // This function returns the configuration it received as parameter.
    // Note that this is specific to LocalConfigMathService and that other implementations of IConfigMathService may behave differently.
    public ITrajectory computeNumberOfPointsChange(ITrajectory newTrajectory, double integrationTime, int numberOfPoints) {
       
        IRangeHCS range = ((ITrajectoryHCS) newTrajectory).getRange();
        for(ITrajectory trajectory : range.getTrajectoriesList()) {
            double beginPosition = trajectory.getBeginPosition();
            double endPosition = trajectory.getEndPosition();
            double delta = Math.abs(endPosition - beginPosition) / numberOfPoints;
            double speed = delta / integrationTime;
            trajectory.setDelta(delta);
            trajectory.setSpeed(speed);
        }
        range.setStepsNumber(numberOfPoints);
        return newTrajectory;
    }
View Full Code Here

    // Note that this is specific to LocalConfigMathService and that other implementations of
    // IConfigMathService may behave differently.
    public ITrajectory computeIntegrationTimeChange(ITrajectory newTrajectory,
            double integrationTime, int numberOfPoints) {

        IRangeHCS range = ((ITrajectoryHCS) newTrajectory).getRange();
        for (ITrajectory trajectory : range.getTrajectoriesList()) {
            double beginPosition = trajectory.getBeginPosition();
            double endPosition = trajectory.getEndPosition();
            double delta = Math.abs(endPosition - beginPosition) / numberOfPoints;
            double speed = delta / integrationTime;
            trajectory.setDelta(delta);
View Full Code Here

    // Note that this is specific to LocalConfigMathService and that other implementations of
    // IConfigMathService may behave differently.
    public ITrajectory computeNumberOfPointsChange(ITrajectory newTrajectory,
            double integrationTime, int numberOfPoints) {

        IRangeHCS range = ((ITrajectoryHCS) newTrajectory).getRange();
        for (ITrajectory trajectory : range.getTrajectoriesList()) {
            double beginPosition = trajectory.getBeginPosition();
            double endPosition = trajectory.getEndPosition();
            double delta = Math.abs(endPosition - beginPosition) / numberOfPoints;
            double speed = delta / integrationTime;
            trajectory.setDelta(delta);
            trajectory.setSpeed(speed);
        }
        range.setStepsNumber(numberOfPoints);
        return newTrajectory;
    }
View Full Code Here

                config = new ConfigHCSImpl();
                config.setScanAddOn(new ScanAddOnImp());
                config.getScanAddOn().setDisplay(new DisplayImpl());
                ((IConfigHCS) config).setDimensionX(new DimensionHCSImpl());
                // Creates one range for a new HCS config.
                IRangeHCS rangeHCSToAdd = new RangeHCSImpl();
                rangeHCSToAdd.setDimension(((IConfigHCS) config).getDimensionX());
                ((IConfigHCS) config).getDimensionX().getRangesXList().add(rangeHCSToAdd);
                break;

            case SCAN_K:
                config = new ConfigKImpl();
View Full Code Here

        if (this.config != null) {
            RangeHCSModel rangeToAdd = new RangeHCSModel();
            rangeToAdd.setDimension(((IConfigHCS) config).getDimensionX());
            this.rangeModelsList.add(rangeToAdd);
            ((IConfigHCS) config).getDimensionX().getRangesXList().add(rangeToAdd);
            IRangeHCS range = ((IConfigHCS) config).getDimensionX().getRangesXList()
                    .get(((IConfigHCS) config).getDimensionX().getRangesXList().size() - 1);
            ((RangeHCSModel) range).addListener(listenerRangeHCS);

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

                rangeToAdd.getTrajectoriesList().add(trajectoryHCSModelToAdd);
                trajectoryHCSModelToAdd.setRange(rangeToAdd);
                trajectoryHCSModelToAdd.setActuator(actuatorModelsList.get(i));

                ((TrajectoryHCSModel) range.getTrajectoriesList().get(i))
                        .addListener(listenerTrajectoryHCS);

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

                    tmpHCS.setDimensionX(new DimensionHCSImpl());

                    // ((IConfigHCS) configModel).setDimensionX(new DimensionHCSModel());

                    // Creates one range for a new HCS config.
                    IRangeHCS rangeHCSToAdd = new RangeHCSImpl();
                    rangeHCSToAdd.setDimension(((IConfigHCS) tmpHCS).getDimensionX());
                    ((IConfigHCS) tmpHCS).getDimensionX().getRangesXList().add(rangeHCSToAdd);

                    configModel = wrap(tmpHCS);
                    break;
                case SCAN_K:
View Full Code Here

TOP

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

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.