Search in sources :

Example 1 with IEEE802154SystemConnectionMemo

use of jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo in project JMRI by JMRI.

the class NodeConfigFrame method discoverButtonActionPerformed.

/**
     * Method to handle discover button
     */
public void discoverButtonActionPerformed() {
    if (xtc.getXBee().getNetwork().isDiscoveryRunning()) {
        log.debug("Discovery process already running");
        discoverButton.setEnabled(false);
        statusText1.setText(Bundle.getMessage("FeedBackDiscover"));
        return;
    }
    jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo memo = xtc.getAdapterMemo();
    if (memo instanceof XBeeConnectionMemo) {
        XBeeConnectionMemo m = (XBeeConnectionMemo) memo;
        // call the node discovery code in the node manager.
        m.getXBeeNodeManager().startNodeDiscovery();
        discoverButton.setEnabled(false);
    }
    // provide user feedback
    statusText1.setText(Bundle.getMessage("FeedBackDiscover"));
    errorInStatus1 = true;
    resetNotes2();
}
Also used : XBeeConnectionMemo(jmri.jmrix.ieee802154.xbee.XBeeConnectionMemo)

Example 2 with IEEE802154SystemConnectionMemo

use of jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo in project JMRI by JMRI.

the class NodeConfigActionTest method testDefaultCtor.

@Test
public void testDefaultCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    IEEE802154SystemConnectionMemo memo = new IEEE802154SystemConnectionMemo();
    IEEE802154TrafficController tc = new IEEE802154TrafficController() {

        @Override
        public void setInstance() {
        }

        @Override
        protected jmri.jmrix.AbstractMRReply newReply() {
            return null;
        }

        @Override
        public jmri.jmrix.ieee802154.IEEE802154Node newNode() {
            return null;
        }
    };
    InstanceManager.setDefault(IEEE802154SystemConnectionMemo.class, memo);
    NodeConfigAction action = new NodeConfigAction();
    Assert.assertNotNull("exists", action);
}
Also used : IEEE802154TrafficController(jmri.jmrix.ieee802154.IEEE802154TrafficController) IEEE802154SystemConnectionMemo(jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo) Test(org.junit.Test)

Example 3 with IEEE802154SystemConnectionMemo

use of jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo in project JMRI by JMRI.

the class NodeConfigActionTest method testStringCtor.

@Test
public void testStringCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    IEEE802154SystemConnectionMemo memo = new IEEE802154SystemConnectionMemo();
    IEEE802154TrafficController tc = new IEEE802154TrafficController() {

        @Override
        public void setInstance() {
        }

        @Override
        protected jmri.jmrix.AbstractMRReply newReply() {
            return null;
        }

        @Override
        public jmri.jmrix.ieee802154.IEEE802154Node newNode() {
            return null;
        }
    };
    InstanceManager.setDefault(IEEE802154SystemConnectionMemo.class, memo);
    NodeConfigAction action = new NodeConfigAction("IEEE 802.15.4 test Action");
    Assert.assertNotNull("exists", action);
}
Also used : IEEE802154TrafficController(jmri.jmrix.ieee802154.IEEE802154TrafficController) IEEE802154SystemConnectionMemo(jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo) Test(org.junit.Test)

Example 4 with IEEE802154SystemConnectionMemo

use of jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo in project JMRI by JMRI.

the class PacketGenActionTest method testDefaultCtor.

@Test
public void testDefaultCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    IEEE802154SystemConnectionMemo memo = new IEEE802154SystemConnectionMemo();
    IEEE802154TrafficController tc = new IEEE802154TrafficController() {

        @Override
        public void setInstance() {
        }

        @Override
        protected jmri.jmrix.AbstractMRReply newReply() {
            return null;
        }

        @Override
        public jmri.jmrix.ieee802154.IEEE802154Node newNode() {
            return null;
        }
    };
    InstanceManager.setDefault(IEEE802154SystemConnectionMemo.class, memo);
    PacketGenAction action = new PacketGenAction();
    Assert.assertNotNull("exists", action);
}
Also used : IEEE802154TrafficController(jmri.jmrix.ieee802154.IEEE802154TrafficController) IEEE802154SystemConnectionMemo(jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo) Test(org.junit.Test)

Example 5 with IEEE802154SystemConnectionMemo

use of jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo in project JMRI by JMRI.

the class NodeConfigActionTest method testMemoCtor.

@Test
public void testMemoCtor() {
    Assume.assumeFalse(GraphicsEnvironment.isHeadless());
    NodeConfigAction action = new NodeConfigAction(new IEEE802154SystemConnectionMemo());
    Assert.assertNotNull("exists", action);
}
Also used : IEEE802154SystemConnectionMemo(jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo) Test(org.junit.Test)

Aggregations

IEEE802154SystemConnectionMemo (jmri.jmrix.ieee802154.IEEE802154SystemConnectionMemo)12 Test (org.junit.Test)12 IEEE802154TrafficController (jmri.jmrix.ieee802154.IEEE802154TrafficController)4 XBeeConnectionMemo (jmri.jmrix.ieee802154.xbee.XBeeConnectionMemo)1