Package fr.soleil.salsa.entity.impl

Examples of fr.soleil.salsa.entity.impl.ActuatorImpl


                    String actuatorXValueKey;
                    double[] actuatorXValuesArray;
                    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];
View Full Code Here


                double[] actuatorXValuesArray;
                TangoAttribute 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 = new TangoAttribute(scanServerName + "/"
                            + actuatorXValueKey);
                    actuatorXValuesArray = (double[]) actuatorXValueAttribute
                            .readArray(Double.TYPE);
                    actuatorX.setScanServerAttributeName(scanServerName + "/" + actuatorXValueKey);

                    row = 0;
                    column = 0;
                    for (double actuatorXValue : actuatorXValuesArray) {
                        if ((row < rowsNumber) && (column < columnsNumber)) {
                            scanPointsMatrix[row][column].getActuatorsXValuesMap().put(actuatorX,
                                    actuatorXValue);
                        }
                        ++column;
                        if (column >= columnsNumber) {
                            column = 0;
                            ++row;
                        }
                    }
                }

                // Actuators dimension Y
                String[] actuatorsYNamesArrayTmp = new TangoAttribute(scanServerName
                        + "/actuators2").readSpecOrImage(String.class);
                // 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 = new TangoAttribute(scanServerName
                        + "/actuators2DataList").readSpecOrImage(String.class);
                IActuator actuatorY;
                String actuatorYValueKey;
                double[] actuatorYValuesArray;
                TangoAttribute 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];
View Full Code Here

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

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

    /**
     * Default constructor, that creates a new instance of ActuatorImpl and wraps it.
     */
    public ActuatorModel() {
        this(new ActuatorImpl());
    }
View Full Code Here

            IDevice deviceImp = null;
            for (String deviceName : values) {
                deviceImp = null;
                switch (deviceType) {
                    case ACTUATOR:
                        deviceImp = new ActuatorImpl();
                        ((List<IActuator>) returnDeviceList).add((IActuator) deviceImp);
                        break;
                    case SENSOR:
                        deviceImp = new SensorImpl();
                        ((List<ISensor>) returnDeviceList).add((ISensor) deviceImp);
View Full Code Here

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

            IDevice deviceImp = null;
            for (String deviceName : values) {
                deviceImp = null;
                switch (deviceType) {
                    case ACTUATOR:
                        deviceImp = new ActuatorImpl();
                        ((List<IActuator>) returnDeviceList).add((IActuator) deviceImp);
                        break;
                    case SENSOR:
                        deviceImp = new SensorImpl();
                        ((List<ISensor>) returnDeviceList).add((ISensor) deviceImp);
View Full Code Here

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

            dim.getRangesXList().add(r);
        }

        // Actuators
        for (int i = 0; i < _nbActuators; i++) {
            IActuator a = new ActuatorImpl();
            a.setName("/mon/actuator/" + i);
            a.setEnabled(i % 2 == 0);
            dim.getActuatorsList().add(a);
        }

        for (int i = 0; i < dim.getRangesXList().size(); i++) {
            for (int j = 0; j < dim.getActuatorsList().size(); j++) {
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.impl.ActuatorImpl

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.