Examples of DeviceAttribute


Examples of fr.esrf.TangoApi.DeviceAttribute

            final AttributeBooleanCombo widget, final JComboBox txtField, final String attName,
            final boolean withSetAttUpdate, final long sleepValue) throws DevFailed {

        final boolean value = getBooleanValue(widget);

        devProx.write_attribute(new DeviceAttribute(attName, !value));

        if (withSetAttUpdate) {
            widget.setAttributeName(attName);
        }
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

            final AttributeBooleanCombo widget, final String attName) throws DevFailed {
        final BooleanAttributeListenerImpl listenerTest = new BooleanAttributeListenerImpl();
        widget.addBooleanAttributeListener(listenerTest);

        final boolean value = !getBooleanValue(widget);
        devProx.write_attribute(new DeviceAttribute(attName, value));

        assertTrue("Notification never called",
                listenerTest.isLaterNotified("readBooleanValueChange", 5000L));
        final Object booleanNotification = listenerTest.getNotification("writeBooleanValueChange");
        final boolean currentValueTest = (booleanNotification instanceof Boolean) ? ((Boolean) booleanNotification)
                .booleanValue() : !value;

        assertTrue("Notification value different from original", value == currentValueTest);

        // v�rifier que le remove du listener est correctement trait�
        widget.removeBooleanAttributeListener(listenerTest);
        listenerTest.reset();

        devProx.write_attribute(new DeviceAttribute(attName, !value));

        assertFalse(listenerTest.isLaterNotified("readBooleanValueChange", 5000L));
    }
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

        // Initialiser le composant
        initFirstDevice();
        final String attributeName = "boolean_scalar_rw";

        final boolean initialValue = true;
        m_deviceProxy.write_attribute(new DeviceAttribute(attributeName, initialValue));

        final AttributeBooleanCombo widget = new AttributeBooleanCombo.Builder(m_deviceName,
                attributeName).alarmEnable(false).jframe(jf1).confirmation(true).build();
        Sleeper.SECONDS.sleep(2);
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

                attributeName).setTrueLabel(tLbael).setFalseLabel(fLabel).jframe(jf1).build();
        Sleeper.SECONDS.sleep(3);

        assertThat(getSelectedItem(widget)).isEqualTo(tLbael);

        m_deviceProxy.write_attribute(new DeviceAttribute(attributeName, false));
        Sleeper.SECONDS.sleep(2);

        assertThat(getSelectedItem(widget)).isEqualTo(fLabel);

        // change device name and check labels are still the same
        widget.setDeviceName(m_deviceName2);
        Sleeper.SECONDS.sleep(2);
        assertThat(getSelectedItem(widget)).isEqualTo(tLbael);

        m_deviceProxy2.write_attribute(new DeviceAttribute(attributeName, false));
        Sleeper.SECONDS.sleep(2);

        assertThat(getSelectedItem(widget)).isEqualTo(fLabel);

        widget.stop();
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

    final JButton b = (JButton) this.tth.findFirstComponent(JButton.class,
        this.jf1);
    assertThat(b.getText()).isEqualTo(expectedText);

    m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
    Sleeper.SECONDS.sleep(3);
    assertThat(b.getText()).isEqualTo(expectedText);

    // clean
    widget.stop();
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

    final JButton b = (JButton) this.tth.findFirstComponent(JButton.class,
        this.jf1);
    assertThat(b.getText()).isEqualTo("TRUE");

    m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
    Sleeper.SECONDS.sleep(3);
    assertThat(b.getText()).isEqualTo("FALSE");
    // clean
    widget.stop();
    jf1.dispose();
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

    final JButton b = (JButton) this.tth.findFirstComponent(JButton.class,
        this.jf1);
    assertThat(b.getText()).isEmpty();

    m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
    Sleeper.SECONDS.sleep(3);
    assertThat(b.getText()).isEmpty();
    // clean
    widget.stop();
    jf1.dispose();
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

      final JButton b = (JButton) tth.findFirstComponent(JButton.class,
          this.jf1);
      assertThat(b.getText()).isEqualTo("TRUE");

      m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
      Sleeper.SECONDS.sleep(3);
      assertThat(b.getText()).isEqualTo("FALSE");
    }

    // clean
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

    if (chosenLabelType.equalsIgnoreCase("booleanLabel")) {
      label = m_deviceProxy.get_attribute_info(attr).label;
      b = (JButton) tth.findFirstComponent(JButton.class, this.jf1);
      assertThat(b.getText()).isEqualTo("OK");

      m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
      Sleeper.SECONDS.sleep(3);
      assertThat(b.getText()).isEqualTo("KO");

    } else if (chosenLabelType.equalsIgnoreCase("label")) {
      label = m_deviceProxy.get_attribute_info(attr).label;
      b = (JButton) tth.findFirstComponent(JButton.class, this.jf1);
      assertThat(b.getText()).isEqualTo(label);

      m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
      Sleeper.SECONDS.sleep(3);
      assertThat(b.getText()).isEqualTo(label);

    } else if (chosenLabelType.equalsIgnoreCase("labelAndBoolean")) {
      label = m_deviceProxy.get_attribute_info(attr).label;
      b = (JButton) tth.findFirstComponent(JButton.class, this.jf1);
      assertThat(b.getText()).isEqualTo(label + ":OK");

      m_deviceProxy.write_attribute(new DeviceAttribute(attr, false));
      Sleeper.SECONDS.sleep(3);
      assertThat(b.getText()).isEqualTo(label + ":KO");
    }
  }
View Full Code Here

Examples of fr.esrf.TangoApi.DeviceAttribute

    if (isOpaque) {
      assertThat(btn.getBackground()).isEqualTo(Color.BLUE);
    }

    // change attr value on device and check bean is correctly updated
    m_deviceProxy.write_attribute(new DeviceAttribute(attribute, false));
    Sleeper.SECONDS.sleep(2);

    assertThat(btn.isOpaque()).isEqualTo(isOpaque);
    if (isOpaque) {
      assertThat(btn.getBackground()).isEqualTo(Color.BLUE);
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.