Package fr.esrf.TangoApi

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


                    .setRunCompletion(scanServerProxy.read_attribute("runCompletion")
                            .extractDouble());
            result.setScanCompletion(scanServerProxy.read_attribute("scanCompletion")
                    .extractDouble());
            result.setDeadTime(scanServerProxy.read_attribute("deadTime").extractDouble());
            result.setDeadTimePercentage(scanServerProxy.read_attribute("deadTimePercent")
                    .extractDouble());
            result.setDeadTimePerPoint(scanServerProxy.read_attribute("deadTimePerPoint")
                    .extractDouble());
            return result;
        }
View Full Code Here


            result.setScanCompletion(scanServerProxy.read_attribute("scanCompletion")
                    .extractDouble());
            result.setDeadTime(scanServerProxy.read_attribute("deadTime").extractDouble());
            result.setDeadTimePercentage(scanServerProxy.read_attribute("deadTimePercent")
                    .extractDouble());
            result.setDeadTimePerPoint(scanServerProxy.read_attribute("deadTimePerPoint")
                    .extractDouble());
            return result;
        }
        catch (DevFailed e) {
            invalidateScanServerProxy(scanServerName);
View Full Code Here

     * @throws SalsaDeviceException
     */
    public IConfig.ScanType getScanType(String scanServerName) throws SalsaDeviceException {
        try {
            DeviceProxy scanServerProxy = getScanServerProxy(scanServerName);
            short scanType = AttributeHelper.extractToShort(scanServerProxy
                    .read_attribute("scanType"));
            switch (scanType) {
                case 0:
                    return IConfig.ScanType.SCAN_1D;
                case 1:
View Full Code Here

        // If a scan result is ready, there is a data_01 attribute.
        DeviceProxy scanServerProxy;
        boolean ready;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute data01Attribute = scanServerProxy.read_attribute("data_01");
            // If there is no data_01 attribute, the next line will throw a DevFailed exception.
            double[] data01Array = AttributeHelper.extractToDoubleArray(data01Attribute);
            ready = data01Array != null && data01Array.length != 0;
        }
        catch (DevFailed e) {
View Full Code Here

    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        DeviceProxy scanServerProxy;
        ScanState state;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute stateAttribute = scanServerProxy.read_attribute("State");
            String stateString = AttributeHelper.extractToString(stateAttribute);
            if ("ON".equals(stateString)) {
                state = ScanState.STOPPED;
            }
            else if ("MOVING".equals(stateString)) {
View Full Code Here

        DeviceProxy scanServerProxy;
        DeviceAttribute historicAttribute;
        String historicStringArray[];
        try {
            scanServerProxy = getScanServerProxy(scanServerName);
            historicAttribute = scanServerProxy.read_attribute("historic");
            historicStringArray = AttributeHelper.extractToStringArray(historicAttribute);
        }
        catch (DevFailed e) {
            invalidateScanServerProxy(scanServerName);
            e.printStackTrace();
View Full Code Here

            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

            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

                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

                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

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.