Package fr.esrf.TangoApi

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


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


        // Do not test if the device is running, it is overload the database
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName, false);
        if (proxy != null) {
            try {

                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
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;
View Full Code Here

        String state;
        if (device != null && device.getName() != null && !"".equals(device.getName().trim())) {
            DeviceProxy proxy = getDeviceProxy(device);
            if (proxy != null) {
                try {
                    state = StateUtilities.getNameForState(proxy.state());
                }
                catch (DevFailed e) {
                    SalsaDeviceException salsaDeviceException = new SalsaDeviceException(
                            "Error while trying to read the state of the device "
                                    + device.getName() + ".", e);
View Full Code Here

        }
        report.setQuality(quality);

        String state;
        try {
            state = StateUtilities.getNameForState(proxy.state());
        }
        catch (DevFailed e) {
            SalsaDeviceException salsaDeviceException = new SalsaDeviceException(
                    "Error while trying to read the state of the TangORB attribute value for the device "
                            + name + ".", e);
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()) {
View Full Code Here

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

        // Do not test if the device is running, it is overload the database
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(scanServerName, false);
        if (proxy != null) {
            try {

                DevState devState = proxy.state();
                state = StateUtilities.getNameForState(devState);
            } catch (DevFailed devFailed) {
                LOGGER.error("Cannot execute " + scanServerName + "/State" + " " + DevFailedUtils.toString(devFailed));
            } catch (Exception e) {
                LOGGER.error("Cannot execute " + scanServerName + "/State" + " " + e.getMessage());
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
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.