Package fr.esrf.Tango

Examples of fr.esrf.Tango.DevState


        ScanState state = ScanState.STOPPED;

        try {
            DeviceProxy scanServerProxy = ScanServerManager.getScanServerProxy(scanServerName);
            if (scanServerProxy != null) {
                DevState devstate = scanServerProxy.state();
                if (devstate.value() == DevState.ON.value()) {
                    state = ScanState.STOPPED;
                }
                else if (devstate.value() == DevState.MOVING.value()
                        || devstate.value() == DevState.RUNNING.value()) {
                    state = ScanState.RUNNING;
                }
                else if (devstate.value() == DevState.STANDBY.value()) {
                    state = ScanState.PAUSED;
                }

                else if (devstate.value() == DevState.ALARM.value()
                        || devstate.value() == DevState.FAULT.value()) {
                    state = ScanState.ABORT;
                }
                else {
                    state = ScanState.STOPPED;
                }
View Full Code Here


        ScanState state = ScanState.STOPPED;
        if (TangoDeviceHelper.isDeviceRunning(scanServerName)) {
            try {
                DeviceProxy scanServerProxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
                if (scanServerProxy != null) {
                    DevState devstate = scanServerProxy.state();
                    if (devstate.value() == DevState.ON.value()) {
                        state = ScanState.STOPPED;
                    } else if (devstate.value() == DevState.MOVING.value()
                            || devstate.value() == DevState.RUNNING.value()) {
                        state = ScanState.RUNNING;
                    } else if (devstate.value() == DevState.STANDBY.value()) {
                        state = ScanState.PAUSED;
                    }

                    else if (devstate.value() == DevState.ALARM.value() || devstate.value() == DevState.FAULT.value()) {
                        state = ScanState.ABORT;
                    } else {
                        state = ScanState.STOPPED;
                    }
                }
View Full Code Here

        DeviceProxy scanServerProxy = TangoDeviceHelper.getDeviceProxy(scanServerName, false);
        if (scanServerProxy != null) {
            try {
                // Time out
                scanServerProxy.set_timeout_millis(10000);
                DevState devState = scanServerProxy.state();
                if (devState != null) {
                    int stateInt = devState.value();
                    switch (stateInt) {
                        case DevState._ON:
                            state = ScanState.STOPPED;
                            break;
                        case DevState._MOVING:
                        case DevState._RUNNING:
                            state = ScanState.RUNNING;
                            break;
                        case DevState._STANDBY:
                            state = ScanState.PAUSED;
                            break;
                        case DevState._ALARM:
                            state = ScanState.ABORT;
                            break;
                        case DevState._FAULT:
                            state = ScanState.ABORT;
                            break;
                        default:
                            String errorMessage = devState.toString() + " is a not supported state";
                            LOGGER.error(errorMessage);
                            throw new SalsaDeviceException(errorMessage);
                    }
                } else {
                    String errorMessage = scanServerName + " is in unknown state";
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            switchFactory();
        }

        if (getDeviceProxy() != null) {
            try {
                DevState scanServerState = getDeviceProxy().state();
                if (scanServerState.value() != scanServerStateOld.value()) {

                    if (scanServerState == DevState.MOVING) {
                        attributeField.setUserEnabled(false);
                    }
                    else {
View Full Code Here

    public static String getState(String scanServerName) {
        String state = StateUtilities.getNameForState(DevState.UNKNOWN);
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName);
        try {
            if (proxy != null) {
                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of fr.esrf.Tango.DevState

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.