Examples of read_attribute()


Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

    private void writeData() {
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(DEVICE);

        if (proxy != null) {
            try {
                DeviceAttribute deviceAttribute = proxy.read_attribute("double_spectrum");
                double[] value1 = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                deviceAttribute.insert(value1);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("float_spectrum");
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

                DeviceAttribute deviceAttribute = proxy.read_attribute("double_spectrum");
                double[] value1 = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                deviceAttribute.insert(value1);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("float_spectrum");
                float[] value2 = new float[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                deviceAttribute.insert(value2);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("long_spectrum");
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

                deviceAttribute = proxy.read_attribute("float_spectrum");
                float[] value2 = new float[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
                deviceAttribute.insert(value2);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("long_spectrum");
                int[] value3 = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
                deviceAttribute.insert(value3);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("double_image");
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

                deviceAttribute = proxy.read_attribute("long_spectrum");
                int[] value3 = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
                deviceAttribute.insert(value3);
                proxy.write_attribute(deviceAttribute);

                deviceAttribute = proxy.read_attribute("double_image");
                double[] value4 = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
                deviceAttribute.insert(value4, 10, 2);
                proxy.write_attribute(deviceAttribute);

            } catch (DevFailed e) {
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

            // Add Actuator list
            if (TangoAttributeHelper.isAttributeRunning(deviceName, ACTUATORS_ATTRIBUTE)) {
                DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(deviceName);
                try {
                    DeviceAttribute deviceAttribute = proxy.read_attribute(ACTUATORS_ATTRIBUTE);
                    String[] attributeList = deviceAttribute.extractStringArray();
                    IDimension dimension = config.getDimensionX();
                    if (dimension != null) {
                        List<IActuator> actuatorList = dimension.getActuatorsList();
                        // Check if the actuators are not already defined
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

            // Add Sensor list
            if (TangoAttributeHelper.isAttributeRunning(deviceName, SENSORS_ATTRIBUTE)) {
                DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(deviceName);
                try {
                    DeviceAttribute deviceAttribute = proxy.read_attribute(SENSORS_ATTRIBUTE);
                    String[] attributeList = deviceAttribute.extractStringArray();
                    List<ISensor> sensorList = config.getSensorsList();
                    String completeSensorName = null;
                    for (String sensorName : attributeList) {
                        completeSensorName = deviceName + "/" + sensorName;
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

            if (sensor != null) {
                // We need the sensor position.
                String sensorName = sensor.getName();
                if (sensorName != null && !sensorName.trim().equals("")) {
                    String[] sensorsNamesArray = scanServerProxy.read_attribute("sensors")
                            .extractStringArray();
                    int sensorPosition;
                    for (sensorPosition = 0; sensorPosition < sensorsNamesArray.length; ++sensorPosition) {
                        if (sensorName.equals(sensorsNamesArray[sensorPosition])) {
                            break;
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

            if (actuator != null) {
                // We need the actuator position.
                String actuatorName = actuator.getName();
                if (actuatorName != null && !actuatorName.trim().equals("")) {
                    String[] actuatorsNamesArray = scanServerProxy.read_attribute("actuators")
                            .extractStringArray();
                    int actuatorPosition;
                    for (actuatorPosition = 0; actuatorPosition < actuatorsNamesArray.length; ++actuatorPosition) {
                        if (actuatorName.equals(actuatorsNamesArray[actuatorPosition])) {
                            break;
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

        if (scanServerProxy != null) {
            if (isScanResultReady()) {
                try {
                    // Type
                    actionName = "read_attribute(\"" + CurrentScanDataModel.SCAN_TYPE + "\")";
                    DeviceAttribute scanTypeAttribute = scanServerProxy.read_attribute(CurrentScanDataModel.SCAN_TYPE);
                    int scanType = scanTypeAttribute.extractLong();
                    LOGGER.trace("{}.{}={}", scanServerName, actionName, String.valueOf(scanType));
                    // 0 -> time scan
                    // 1 -> scan 1d
                    // 2 -> scan 2d
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()

        if (scanServerProxy != null) {
            if (isScanResultReady()) {
                try {
                    // Type
                    actionName = "read_attribute(\"" + CurrentScanDataModel.SCAN_TYPE + "\")";
                    DeviceAttribute scanTypeAttribute = scanServerProxy.read_attribute(CurrentScanDataModel.SCAN_TYPE);
                    int scanType = scanTypeAttribute.extractLong();
                    // 0 -> time scan
                    // 1 -> scan 1d
                    // 2 -> scan 2d
                    switch (scanType) {
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.