Examples of IActuator


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) {
                errorMessage(e.getMessage());
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

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

            // Case when the list of actuator equal 1 and the type of scan is SCAN ENERGY
            // Can not add other row in the list of actuators
            boolean stopAdd = ((config.getType().equals(ScanType.SCAN_ENERGY) || (config.getType()
                    .equals(ScanType.SCAN_K))) && listActuator.size() == 1) ? true : false;
            if (!stopAdd) {
                IActuator actuator = new ActuatorModel();
                actuator.setName(defaultActuatorName);
                if (value != null) {
                    actuator.setName(value);
                }
                actuator.setEnabled(true);
                boolean addSucces = this.actuatorsListView.addRow(actuator);
                if (addSucces)
                    this.listActuator.add(actuator);
            }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

        }
        else if (this.listActuator.size() == 0) {
            for (int i = 0; i < this.actuatorsListView.getModel().getRowCount(); i++) {
                String actuatorName = (String) this.actuatorsListView.getModel().getValueAt(i, 1);
                Boolean isEnabled = (Boolean) this.actuatorsListView.getModel().getValueAt(i, 0);
                IActuator actuator = new ActuatorModel();
                actuator.setName(actuatorName);
                actuator.setEnabled(isEnabled);
                this.listActuator.add(actuator);
            }

        }
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

            }
        }
    }

    public static void swapActuator(IActuatorTrajectory t1, IActuatorTrajectory t2) {
        IActuator t1Actuator = t1.getActuator();
        t1.setActuator(t2.getActuator());
        t2.setActuator(t1Actuator);
    }
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

        if ((trajectoryList != null) && (listActuator != null)
                && (trajectoryList.size() == listActuator.size())) {

            ITrajectory readTrajectory = null;
            ITrajectory newTrajectory = null;
            IActuator actuator = null;
            String actuatorKey = null;
            LinkedList<ITrajectory> linkedTrajectoryList = null;
            for (int i = 0; i < trajectoryList.size(); i++) {
                actuator = listActuator.get(i);
                readTrajectory = trajectoryList.get(i);
                if ((actuator != null) && actuator.isEnabled() && (actuator.getName() != null)) {
                    actuatorKey = actuator.getName().toLowerCase();
                    if (trajectoryMap.containsKey(actuatorKey)) {
                        linkedTrajectoryList = trajectoryMap.get(actuatorKey);
                        newTrajectory = linkedTrajectoryList.poll();
                        modifyTrajectory(newTrajectory, readTrajectory);
                    }
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

        if (config != null && config instanceof IConfigEnergy && config.getDimensionX() != null) {
            IDimensionEnergy dimensionEnergy = ((IConfigEnergy) config).getDimensionX();

            List<IActuator> actuatorsList = dimensionEnergy.getActuatorsList();
            if (actuatorsList.size() != 0) {
                IActuator actuator = actuatorsList.get(0);
                IRangeEnergy rangeEnergy = createRange();
                rangeEnergy.setDimension(dimensionEnergy);
                ITrajectoryEnergy trajectoryEnergy = createTrajectory();
                trajectoryEnergy.setRange(rangeEnergy);
                trajectoryEnergy.setActuator(actuator);
View Full Code Here

Examples of fr.soleil.salsa.entity.IActuator

                for(int actuatorXIndex = 0; actuatorXIndex < actuatorsXNamesArray.length; ++actuatorXIndex) {
                    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);

                    row = 0;
                    column = 0;
                    for(double actuatorXValue : actuatorXValuesArray) {
                        scanPointsMatrix[row][column].getActuatorsXValuesMap().put(actuatorX, actuatorXValue);
                        ++column;
                        if(column >= columnsNumber) {
                            column = 0;
                            ++ row;
                        }
                    }
                }
   
                // Actuators dimension Y
                String[] actuatorsYNamesArrayTmp = scanServerProxy.read_attribute("actuators2").extractStringArray();
                // The actuatorsYNamesArrayTmp contains the data twice : once for reading and once for writing.
                String actuatorYName;
                String[] actuatorsYNamesArray = new String[actuatorsYNamesArrayTmp.length / 2];
                for(int actuatorYIndex = 0; actuatorYIndex < actuatorsYNamesArray.length; ++actuatorYIndex) {
                    actuatorsYNamesArray[actuatorYIndex] = actuatorsYNamesArrayTmp[actuatorYIndex];
                }
               
                String[] actuatorsYValueKeysArray = scanServerProxy.read_attribute("actuators2DataList").extractStringArray();
                IActuator actuatorY;
                String actuatorYValueKey;
                double[] actuatorYValuesArray;
                DeviceAttribute actuatorYValueAttribute;
                for(int actuatorYIndex = 0;
                        actuatorYIndex < actuatorsYNamesArray.length && actuatorYIndex < actuatorsYValueKeysArray.length;
                        ++actuatorYIndex) {
                    actuatorYName = actuatorsYNamesArray[actuatorYIndex];
                    actuatorY = new ActuatorImpl();
                    actuatorY.setName(actuatorYName);
                    actuatorY.setEnabled(true);
                    scanResult.getActuatorsYList().add(actuatorY);
                   
                    actuatorYValueKey = actuatorsYValueKeysArray[actuatorYIndex];
                   
                    actuatorYValueAttribute = scanServerProxy.read_attribute(actuatorYValueKey);
                    actuatorYValuesArray = AttributeHelper.extractToDoubleArray(actuatorYValueAttribute);
                    actuatorY.setScanServerAttributeName(scanServerProxy.get_name() + "/" + actuatorYValueKey);

                    row = 0;
                    for(double actuatorYValue : actuatorYValuesArray) {
                        for(column = 0; column < columnsNumber; ++column) {
                            scanPointsMatrix[row][column].getActuatorsYValuesMap().put(actuatorY, actuatorYValue);
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.