Examples of ISensor


Examples of fr.soleil.salsa.entity.ISensor

     */
    @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) {
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

            List<IActuator> actuatorsList = result.getActuatorsXList();

            Option[] sensorsArray = new Option[sensorsList.size()];
            int sensorIndex;
            int sensorsNumber = sensorsList.size();
            ISensor sensor;
            for (sensorIndex = 0; sensorIndex < sensorsNumber; ++sensorIndex) {
                sensor = sensorsList.get(sensorIndex);
                sensorsArray[sensorIndex] = new Option(sensor, sensor.getName());
            }
            view.setSensorsArray(sensorsArray);

            Option[] actuatorsArray = new Option[actuatorsList.size()];
            int actuatorIndex;
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

                        // Sensors
                        actionName = "read_attribute(\"" + CurrentScanDataModel.SENSORS_DATA_LIST + "\")";
                        String[] sensorsValueKeysArray = CurrentScanDataModel.getSensors(scanServerName);
                        LOGGER.trace("{}.{}={}", scanServerName, actionName, Arrays.toString(sensorsValueKeysArray));
                        ISensor sensor = null;
                        String sensorName = null;
                        String entityName = null;

                        if (sensorsValueKeysArray != null) {
                            for (String sensorValueKey : sensorsValueKeysArray) {
                                entityName = TangoDeviceHelper.getEntityName(sensorValueKey);
                                sensorName = TangoAttributeHelper.getLabel(scanServerName, entityName);
                                sensor = new SensorImpl();
                                sensor.setName(sensorName);
                                sensor.setEnabled(true);
                                scanResult.getSensorsList().add(sensor);
                                sensor.setScanServerAttributeName(sensorValueKey);
                            }
                        }

                        // Actuators dimension X
                        actionName = "read_attribute(\"" + CurrentScanDataModel.ACTUATORS_DATA_LIST + " "
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

                    sensorsNamesArray[sensorIndex] = sensorsNamesArrayTmp[sensorIndex];
                }
               
                String[] sensorsValueKeysArray = scanServerProxy.read_attribute("sensorsDataList").extractStringArray();
               
                ISensor sensor;
                String sensorValueKey;
                String sensorName;
                double[] sensorValuesArray;
                DeviceAttribute sensorValueAttribute;
                for(int sensorIndex = 0; sensorIndex < sensorsNamesArray.length && sensorIndex < sensorsValueKeysArray.length; ++sensorIndex) {
                    sensorName = sensorsNamesArray[sensorIndex];
                    sensor = new SensorImpl();
                    sensor.setName(sensorName);
                    sensor.setEnabled(true);
                    scanResult.getSensorsList().add(sensor);
                   
                    sensorValueKey = sensorsValueKeysArray[sensorIndex];
                    sensorValueAttribute = scanServerProxy.read_attribute(sensorValueKey);
                    sensorValuesArray = AttributeHelper.extractToDoubleArray(sensorValueAttribute);
                    sensor.setScanServerAttributeName(scanServerProxy.get_name() + "/" + sensorValueKey);
                   
                    row = 0;
                    column = 0;
                    for(double sensorValue : sensorValuesArray) {
                        scanPointsMatrix[row][column].getSensorsValuesMap().put(sensor, sensorValue);
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

     */
    @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());
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

            List<IActuator> actuatorsList = result.getActuatorsXList();
           
            Option[] sensorsArray = new Option[sensorsList.size()];
            int sensorIndex;
            int sensorsNumber =  sensorsList.size();
            ISensor sensor;
            for(sensorIndex = 0; sensorIndex < sensorsNumber; ++sensorIndex) {
                sensor = sensorsList.get(sensorIndex);
                sensorsArray[sensorIndex] = new Option(sensor, sensor.getName());
            }
            view.setSensorsArray(sensorsArray);
           
            Option[] actuatorsArray = new Option[actuatorsList.size()];
            int actuatorIndex;
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

        setDimension(dimension);

    }

    public void addSensor(String sensorName) {
        ISensor device = new SensorModel();
        device.setName(sensorName);
        device.setEnabled(true);
        sensorsList.add(device);
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

                        // Sensors
                        actionName = "read_attribute(\"" + CurrentScanDataModel.SENSORS_DATA_LIST + "\")";
                        String[] sensorsValueKeysArray = CurrentScanDataModel.getSensors(scanServerName);

                        ISensor sensor = null;
                        String sensorName = null;
                        String entityName = null;

                        if (sensorsValueKeysArray != null) {
                            for (String sensorValueKey : sensorsValueKeysArray) {
                                entityName = TangoDeviceHelper.getEntityName(sensorValueKey);
                                sensorName = TangoAttributeHelper.getLabel(scanServerName, entityName);
                                sensor = new SensorImpl();
                                sensor.setName(sensorName);
                                sensor.setEnabled(true);
                                scanResult.getSensorsList().add(sensor);
                                sensor.setScanServerAttributeName(sensorValueKey);
                            }
                        }

                        // Actuators dimension X
                        actionName = "read_attribute(\"" + CurrentScanDataModel.ACTUATORS_DATA_LIST + " "
View Full Code Here

Examples of fr.soleil.salsa.entity.ISensor

                }

                String[] sensorsValueKeysArray = scanServerProxy.read_attribute("sensorsDataList")
                        .extractStringArray();

                ISensor sensor;
                String sensorValueKey;
                String sensorName;
                double[] sensorValuesArray;
                DeviceAttribute sensorValueAttribute;
                for (int sensorIndex = 0; sensorIndex < sensorsNamesArray.length
                        && sensorIndex < sensorsValueKeysArray.length; ++sensorIndex) {
                    sensorName = sensorsNamesArray[sensorIndex];
                    sensor = new SensorImpl();
                    sensor.setName(sensorName);
                    sensor.setEnabled(true);
                    scanResult.getSensorsList().add(sensor);

                    sensorValueKey = sensorsValueKeysArray[sensorIndex];
                    sensorValueAttribute = scanServerProxy.read_attribute(sensorValueKey);
                    sensorValuesArray = AttributeHelper.extractToDoubleArray(sensorValueAttribute);
                    sensor.setScanServerAttributeName(scanServerProxy.get_name() + "/"
                            + sensorValueKey);

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

Examples of fr.soleil.salsa.entity.ISensor

            // Sensors
            List<ISensor> sensors = config.getSensorsList();
            view.clearSensors();
            for (int i = 0; i < sensors.size(); i++) {

                ISensor s = sensors.get(i);
                SensorModel eSensort = (SensorModel) s;
                eSensort.addListener(sensorListener);
                view.addSensor(s.getName(), s.getName());
                if (i == postScanBehaviour.getSensor()) {
                    view.setSensorSelected(i);
                }
            }
            if (sensors.size() == 0) {
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.