Package fr.esrf.Tango

Examples of fr.esrf.Tango.DevState


        .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


        .jframe(this.jf1).build();
    Sleeper.SECONDS.sleep(4);

    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(2);
    final JDialog dialogConfirm = this.tth
        .findDialog("MyTitleConfirmation");
View Full Code Here

    Sleeper.SECONDS.sleep(3);

    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);

    final JDialog dialogConfirm = this.tth.findDialog("Confirmation");
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

    DeviceStateButton widget = new DeviceStateButton.Builder(m_deviceName)
        .jframe(jf).build();
    Sleeper.SECONDS.sleep(4);

    final DevState state = m_deviceProxy.state();
    Assert.assertEquals("text given by bean is invalid.", getLabel(widget),
        DeviceState.toString(state));
    Assert.assertTrue(
        "color given by bean is invalid.",
        getBackgroundColor(widget).equals(
View Full Code Here

    initFirstDevice();

    DeviceStateButton widget = new DeviceStateButton.Builder(m_deviceName).jframe(jf).build();
    Sleeper.SECONDS.sleep(4);

    final DevState state = m_deviceProxy.state();
    Assert.assertEquals("text given by bean is invalid.", getLabel(widget), DeviceState.toString(state));
    Assert.assertTrue("color given by bean is invalid.", getBackgroundColor(widget).equals(ColorDeviceState.getColorForState(state)));

    // clean
    widget.stop();
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

    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

    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

        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

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.