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();
}
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);
}
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);
}
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);
}
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);
}
Aggregations