use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method testOpcAnalogIO.
public void testOpcAnalogIO() {
LocoNetMessage l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x01, 0x01, 0x03, 0x32, 0x11, 0x35 });
assertEquals("OpcAnalogIO message test 1", "Lissy 3 Wheel Report: 6417 wheels moving north\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x01, 0x21, 0x55, 0x01, 0x00, 0x35 });
assertEquals("OpcAnalogIO message test ", "Lissy 85 Wheel Report: 128 wheels moving south\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x02, 0x21, 0x55, 0x01, 0x00, 0x35 });
assertEquals("Unable to parse LocoNet message.\ncontents: E4 08 02 21 55 01 00 35\n", f.displayMessage(l));
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method textOpcPeerXfer.
public void textOpcPeerXfer() {
LocoNetMessage l;
l = new LocoNetMessage(new int[] { 0xE5, 0x05, 0x00, 0x00, 0x7f });
assertEquals("PeerXfer 1", "Unable to parse LocoNet message.\ncontents: E5 05 00 00 7F\n", f.displayMessage(l));
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LnPr2PowerManagerTest method hearOn.
/**
* service routines to simulate receiving on, off from interface
*/
@Override
protected void hearOn() {
LocoNetMessage l = new LocoNetMessage(2);
l.setOpCode(LnConstants.OPC_GPON);
controller.sendTestMessage(l);
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LocoMonPaneTest method testInput.
@Test
public void testInput() throws Exception {
pane.initComponents();
LocoNetMessage m = new LocoNetMessage(new int[] { 0xA0, 0x07, 0x00, 0x58 });
((LocoMonPane) pane).message(m);
new org.netbeans.jemmy.QueueTool().waitEmpty(100);
Assert.assertEquals("shows message", "Set speed of loco in slot 7 to 0.\n", ((LocoMonPane) pane).getFrameText());
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LocoMonPaneTest method testFilterSimple.
@Test
public void testFilterSimple() throws Exception {
pane.initComponents();
// filter A0
pane.setFilterText("A0");
new org.netbeans.jemmy.QueueTool().waitEmpty(100);
Assert.assertEquals("filter set", "A0", pane.getFilterText());
LocoNetMessage m = new LocoNetMessage(new int[] { 0xA0, 0x07, 0x00, 0x58 });
((LocoMonPane) pane).message(m);
new org.netbeans.jemmy.QueueTool().waitEmpty(100);
Assert.assertEquals("shows message", "", ((LocoMonPane) pane).getFrameText());
}
Aggregations