Examples of IActuator


Examples of fr.soleil.salsa.entity.IActuator

                if (trajectoryList != null) {
                    List<ITrajectory> trajectoryModelList = new ArrayList<ITrajectory>();
                    for (ITrajectory trajectory : trajectoryList) {
                        ITrajectory trajectoryModel = trajectory.toModel();
                        if (trajectoryModel instanceof IActuatorTrajectory) {
                            IActuator actuator = ((IActuatorTrajectory) trajectory).getActuator();
                            ((IActuatorTrajectory) trajectoryModel).setActuator((IActuator) actuator.toModel());
                        }
                        trajectory.setIRange(this);
                        trajectoryModelList.add(trajectoryModel);
                    }
                    model.setTrajectoriesList(trajectoryModelList);
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

    @Override
    public void notifyGotoClicked() {
        if(selectedFunction != null) {
            String scanServerName = ModelPreferences.getInstance().getScanServer();
            ISensor sensor = selectedFunction.getArgumentCount() > 0 ? selectedSensor : null;
            IActuator actuator = selectedFunction.getArgumentCount() > 1 ? selectedActuator : null;
            try {
                ScanApi.doScanFunction(scanServerName, selectedFunction, sensor, actuator);
            } catch (SalsaDeviceException e) {
                Salsa.getApplicationController().errorMessage(e.getMessage());
                if (e.isConsoleDisplay()) {
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

            view.setSensorsArray(sensorsArray);
           
            Option[] actuatorsArray = new Option[actuatorsList.size()];
            int actuatorIndex;
            int actuatorsNumber =  actuatorsList.size();
            IActuator actuator;
            for(actuatorIndex = 0; actuatorIndex < actuatorsNumber; ++actuatorIndex) {
                actuator = actuatorsList.get(actuatorIndex);
                actuatorsArray[actuatorIndex] = new Option(actuator, actuator.getName());
            }
            view.setActuatorsArray(actuatorsArray);
        }
        else {
            view.setSensorsArray(new Option[0]);
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

        return timebaseListModel;
    }

    @Override
    public void addActuator(String actuatorName, boolean yActuator) {
        IActuator device = new ActuatorModel();
        device.setName(actuatorName);
        device.setEnabled(true);

        IDimension dimension = getDimensionX();
        if (yActuator && (this instanceof IConfig2D)) {
            dimension = ((IConfig2D) this).getDimensionY();
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

    /**
     *
     */
    public void setActuator(IActuator actuator) {
        IActuator oldValue = this.baseBean.getActuator();
        this.baseBean.setActuator(actuator);
        this.firePropertyChange("actuator", oldValue, actuator);
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

                    actuatorsXNamesArray[actuatorXIndex] = actuatorsXNamesArrayTmp[actuatorXIndex];
                }

                String[] actuatorsXValueKeysArray = scanServerProxy.read_attribute(
                        "actuatorsDataList").extractStringArray();
                IActuator actuatorX;
                String actuatorXValueKey;
                double[] actuatorXValuesArray;
                DeviceAttribute actuatorXValueAttribute;
                for (int actuatorXIndex = 0; actuatorXIndex < actuatorsXNamesArray.length
                        && actuatorXIndex < actuatorsXValueKeysArray.length; ++actuatorXIndex) {
                    actuatorXName = actuatorsXNamesArray[actuatorXIndex];
                    actuatorX = new ActuatorImpl();
                    actuatorX.setName(actuatorXName);
                    actuatorX.setEnabled(true);
                    scanResult.getActuatorsXList().add(actuatorX);

                    actuatorXValueKey = actuatorsXValueKeysArray[actuatorXIndex];

                    actuatorXValueAttribute = scanServerProxy.read_attribute(actuatorXValueKey);
                    actuatorXValuesArray = AttributeHelper
                            .extractToDoubleArray(actuatorXValueAttribute);
                    actuatorX.setScanServerAttributeName(scanServerProxy.get_name() + "/"
                            + actuatorXValueKey);

                    pointIndex = 0;
                    for (double actuatorXValue : actuatorXValuesArray) {
                        // The reading can occur during the scan. Because of this, more values can
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

                    speedList.add(trajectoryK.getSpeed());
                } else {
                    // The positions must be sorted by actuator, so we loop over
                    // the actuators.
                    for (int index = 0; index < actuatorsList.size(); index++) {
                        IActuator actuator = actuatorsList.get(index);
                        deviceName = actuator.getName();
                        if (actuator.isEnabled() && (deviceName != null) && !deviceName.trim().isEmpty()) {
                            actuatorPositionsList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted
                            // by range.
                            List<ITrajectory> completetrajectoryList = findActuatorTrajectories(dimension, index);
                            List<ITrajectory> trajectoryList = new ArrayList<ITrajectory>();
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

                        // Actuators dimension X
                        actionName = "read_attribute(\"" + CurrentScanDataModel.ACTUATORS_DATA_LIST + " "
                        + CurrentScanDataModel.YACTUATORS_DATA_LIST + "\")";
                        String[] actuatorsValueKeysArray = CurrentScanDataModel.getActuators(scanServerName);
                        LOGGER.trace("{}.{}={}", scanServerName, actionName, Arrays.toString(actuatorsValueKeysArray));
                        IActuator actuator = null;
                        String actuatorName = null;
                        List<IActuator> actuatorList = null;

                        if (actuatorsValueKeysArray != null) {
                            for (String actuatorValueKey : actuatorsValueKeysArray) {
                                entityName = TangoDeviceHelper.getEntityName(actuatorValueKey);
                                actuatorName = TangoAttributeHelper.getLabel(scanServerName, entityName);
                                actuator = new ActuatorImpl();
                                actuator.setName(actuatorName);
                                actuator.setEnabled(true);
                                // X Actuator
                                if (entityName.startsWith("actuator_1")) {
                                    actuatorList = scanResult.getActuatorsXList();
                                } else if (entityName.startsWith("actuator_2") && (scanResult instanceof IScanResult2D)) {
                                    actuatorList = ((IScanResult2D) scanResult).getActuatorsYList();
                                }

                                if (actuatorList != null) {
                                    actuatorList.add(actuator);
                                }

                                actuator.setScanServerAttributeName(actuatorValueKey);
                            }

                            if (withTrajectories) {
                                HashMap<IActuator, double[]> trajectoryMap = new HashMap<IActuator, double[]>();
                                actuatorList = scanResult.getActuatorsXList();
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

            if (config instanceof IConfig1D) {
                IConfig1D config1d = (IConfig1D) config;
                List<IActuator> actuators = config1d.getDimensionX().getActuatorsList();
                view.clearActuators();
                for (int i = 0; i < actuators.size(); i++) {
                    IActuator a = (IActuator) actuators.get(i);
                    ActuatorModel eActuator = (ActuatorModel) a;
                    eActuator.addListener(actuatorListener);
                    view.addActuator(a.getName(), a.getName());
                    if (i == postScanBehaviour.getActuator()) {
                        view.setActuatorSelected(i);
                    }
                }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

                    speedList.add(trajectoryK.getSpeed());
                } else {
                    // The positions must be sorted by actuator, so we loop over
                    // the actuators.
                    for (int index = 0; index < actuatorsList.size(); index++) {
                        IActuator actuator = actuatorsList.get(index);
                        if (actuator.isEnabled()) {
                            actuatorPositionsList = new ArrayList<Double>();
                            // For each actuators, the positions must be sorted
                            // by range.
                            List<ITrajectory> completetrajectoryList = findActuatorTrajectories(dimension, index);
                            List<ITrajectory> trajectoryList = new ArrayList<ITrajectory>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.