Package fr.esrf.Tango

Examples of fr.esrf.Tango.DevState


     */
    public static String getState(ITimebase timebase) throws SalsaDeviceException {
        String state = null;
        try {
            DeviceProxy proxy = getDeviceProxy(timebase);
            DevState tmpDevState = proxy.state();
            state = StateUtilities.getNameForState(tmpDevState);

        }
        catch (DevFailed e) {
            state = StateUtilities.getNameForState(DevState.UNKNOWN);
View Full Code Here


    public IScanStatus getScanStatus(String scanServerName) throws SalsaDeviceException {
        try {

            ScanStatusImpl result = new ScanStatusImpl();
            DeviceProxy scanServerProxy = getScanServerProxy(scanServerName);
            DevState state = scanServerProxy.read_attribute("State").extractState();
            result.setState("" + state.value());

            result.setStatus(scanServerProxy.read_attribute("Status").extractString());
            result.setRunStartDate(scanServerProxy.read_attribute("runStartDate").extractString());
            result
                    .setScanStartDate(scanServerProxy.read_attribute("scanStartDate")
View Full Code Here

    public IScanStatus getScanStatus(String scanServerName) throws SalsaDeviceException {
        try {

            IScanStatus result = new ScanStatusImpl();
            DeviceProxy scanServerProxy = getScanServerProxy(scanServerName);
            DevState state = scanServerProxy.read_attribute("State").extractState();
            result.setState("" + state.value());

            result.setStatus(scanServerProxy.read_attribute("Status").extractString());
            result.setRunStartDate(scanServerProxy.read_attribute("runStartDate").extractString());
            result
                    .setScanStartDate(scanServerProxy.read_attribute("scanStartDate")
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:
                            throw new SalsaDeviceException("Error : not supported state for scanserver "
                                    + scanServerName + " " + devState.toString());
                    }
                } else {
                    throw new SalsaDeviceException("Error : unknown state for scanserver " + scanServerName);
                }
            } catch (DevFailed e) {
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()) {
                    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

        }

        @Override
        public void run() {

            DevState devState = DevState.UNKNOWN;
            String state = StateUtilities.getNameForState(devState);
            String status = null;

            DeviceProxy deviceProxy = getDevice(deviceName);

            if (deviceProxy != null) {
                try {
                    devState = deviceProxy.state();
                    state = StateUtilities.getNameForState(devState);
                    if (state != null && !state.isEmpty()) {
                        synchronized (m_stateList) {
                            m_stateList.put(deviceName, state);
                        }
                        synchronized (m_stateList) {
                            m_stateNumberList.put(deviceName, Integer.valueOf(devState.value()));
                        }
                    }

                    status = deviceProxy.status();
                    if (status != null) {
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()) {
                    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

        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

        .state1(IDevice.FAULT).jframe(this.jf1).build();
    Sleeper.SECONDS.sleep(3);
    widget.setAskConfirmation(true);
    final JButton b = (JButton) this.tth.findFirstComponent(JButton.class,
        this.jf1);
    final DevState oldState = this.m_deviceProxy.state();
    this.tth.click(b);
    Sleeper.SECONDS.sleep(3);
    assertThat(this.m_deviceProxy.state()).isEqualTo(oldState);
    widget.stop();
    this.jf1.dispose();
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.