use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method testTransponding.
public void testTransponding() {
LocoNetMessage l;
l = new LocoNetMessage(new int[] { 0xD0, 0x01, 0x20, 0x08, 0x20, 0x26 });
assertEquals("out A", "Transponder address 1056 absent at LR161 () (BDL16x Board ID 11 RX4 zone A).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x20, 0x08, 0x20, 0x04 });
assertEquals(" in A", "Transponder address 1056 present at LR161 () (BDL16x Board ID 11 RX4 zone A).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x22, 0x08, 0x20, 0x24 });
assertEquals(" in B", "Transponder address 1056 present at LR163 () (BDL16x Board ID 11 RX4 zone B).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x24, 0x7d, 0x70, 0x04 });
assertEquals(" in C", "Transponder address 112(short) (b2) present at LR165 () (BDL16x Board ID 11 RX4 zone C).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x26, 0x08, 0x20, 0x04 });
assertEquals(" in D", "Transponder address 1056 present at LR167 () (BDL16x Board ID 11 RX4 zone D).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x28, 0x08, 0x20, 0x04 });
assertEquals(" in E", "Transponder address 1056 present at LR169 () (BDL16x Board ID 11 RX4 zone E).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x2A, 0x08, 0x20, 0x04 });
assertEquals(" in F", "Transponder address 1056 present at LR171 () (BDL16x Board ID 11 RX4 zone F).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x21, 0x2C, 0x08, 0x20, 0x04 });
assertEquals(" in G", "Transponder address 1056 present at LR173 () (BDL16x Board ID 11 RX4 zone G).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x20, 0x2E, 0x08, 0x20, 0x04 });
assertEquals(" in H", "Transponder address 1056 present at LR47 () (BDL16x Board ID 3 RX4 zone H).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xD0, 0x20, 0x2E, 0x7d, 0x01, 0x04 });
assertEquals("another in H", "Transponder address 1(short) present at LR47 () (BDL16x Board ID 3 RX4 zone H).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x7D, 0x03, 0x00, 0x00, 0x00, 0x2D });
assertEquals("find loco 3(short)", "Transponding Find query for loco address 3(short).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x7D, 0x03, 0x00, 0x12, 0x00, 0x7F });
assertEquals(" in H", "Transponder Find report: address 3(short) present at LR19 (BDL16x Board 2 RX4 zone B).\n", f.displayMessage(l));
LnReporter r = (LnReporter) lnrm.provideReporter("LR19");
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x7D, 0x03, 0x00, 0x14, 0x00, 0x7F });
assertEquals("Transponding no reporter user name", "Transponder Find report: address 3(short) present at LR21 (BDL16x Board 2 RX4 zone C).\n", f.displayMessage(l));
r.setUserName("AUserName");
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x7D, 0x03, 0x00, 0x12, 0x00, 0x7F });
assertEquals("Transponding in B, with reporter user name", "Transponder Find report: address 3(short) present at LR19 (AUserName) (BDL16x Board 2 RX4 zone B).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x01, 0x7D, 0x03, 0x00, 0x12, 0x00, 0x7F });
assertEquals("Transponding Bad Message 1", "Unable to parse LocoNet message.\ncontents: E5 09 01 7D 03 00 12 00 7F\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2D });
assertEquals("find loco 4 (long)", "Transponding Find query for loco address 4.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x16, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR23 (BDL16x Board 2 RX4 zone D).\n", f.displayMessage(l));
assertNotNull("reporter Got Created", lnrm.getBySystemName("LR23"));
assertNull("reporter is Not Yet Created", lnrm.getBySystemName("LR25"));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x18, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR25 (BDL16x Board 2 RX4 zone E).\n", f.displayMessage(l));
assertNotNull("reporter Created", lnrm.getBySystemName("LR25"));
((LnReporter) lnrm.getBySystemName("LR25")).setUserName("Friendly name E");
assertEquals("check setting of username", lnrm.getBySystemName("LR25").getUserName(), "Friendly name E");
((LnReporter) lnrm.provideReporter("LR31")).setUserName("Friendly Name H");
((LnReporter) lnrm.provideReporter("LR29")).setUserName("Friendly Name G");
((LnReporter) lnrm.provideReporter("LR27")).setUserName("Friendly Name F");
((LnReporter) lnrm.provideReporter("LR23")).setUserName("Friendly Name D");
((LnReporter) lnrm.provideReporter("LR21")).setUserName("Friendly Name C");
((LnReporter) lnrm.provideReporter("LR19")).setUserName("Friendly Name B");
((LnReporter) lnrm.provideReporter("LR17")).setUserName("Friendly Name A");
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x18, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR25 (Friendly name E) (BDL16x Board 2 RX4 zone E).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x14, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR21 (Friendly Name C) (BDL16x Board 2 RX4 zone C).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR19 (Friendly Name B) (BDL16x Board 2 RX4 zone B).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR17 (Friendly Name A) (BDL16x Board 2 RX4 zone A).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x1A, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR27 (Friendly Name F) (BDL16x Board 2 RX4 zone F).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x1C, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR29 (Friendly Name G) (BDL16x Board 2 RX4 zone G).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x1E, 0x00, 0x7F });
assertEquals(" in D", "Transponder Find report: address 4 present at LR31 (Friendly Name H) (BDL16x Board 2 RX4 zone H).\n", f.displayMessage(l));
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method testBasicImmediatePacketMessages.
public void testBasicImmediatePacketMessages() {
LocoNetMessage l;
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x43, 0x07, 0x4F, 0x2D, 0x5E, 0x08, 0x00, 0x16 });
assertEquals(" Immediate Packet test 01", "Send packet immediate: Locomotive 4013 set F13=Off, F14=Off, F15=Off, F16=On, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xB4, 0x6D, 0x7F, 0x59 });
assertEquals(" Immediate Packet test 02", "LONG_ACK: the Send IMM Packet command was accepted.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x07, 0x4F, 0x2D, 0x28, 0x00, 0x00, 0x1F });
assertEquals(" Immediate Packet test 03", "Send packet immediate: Locomotive 4013 set F9=Off, F10=Off, F11=Off, F12=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x01, 0x42, 0x23, 0x24, 0x05, 0x06, 0x1F });
assertEquals(" Immediate Packet test 04", "Send packet immediate: 4 bytes, repeat count 4(68)\n\tDHI=0x01, IM1=0x42, IM2=0x23, IM3=0x24, IM4=0x05, IM5=0x06\n\tpacket: C2 23 24 05 .\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x07, 0x4F, 0x2D, 0x28, 0x00, 0x00, 0x1F });
assertEquals(" Immediate Packet test 05", "Send packet immediate: Locomotive 4013 set F9=Off, F10=Off, F11=Off, F12=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x05, 0x4B, 0x6D, 0x2C, 0x00, 0x00, 0x5D });
assertEquals(" Immediate Packet test 06", "Send packet immediate: Locomotive 2925 set F9=Off, F10=Off, F11=On, F12=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x43, 0x07, 0x4F, 0x2D, 0x5E, 0x08, 0x00, 0x16 });
assertEquals(" Immediate Packet test 07", "Send packet immediate: Locomotive 4013 set F13=Off, F14=Off, F15=Off, F16=On, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x43, 0x07, 0x4C, 0x0F, 0x5F, 0x08, 0x00, 0x36 });
assertEquals(" Immediate Packet test 08", "Send packet immediate: Locomotive 3215 set F21=Off, F22=Off, F23=Off, F24=On, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x13, 0x07, 0x4F, 0x2D, 0x5E, 0x08, 0x00, 0x16 });
assertEquals(" Immediate Packet test 09", "Unable to parse LocoNet message.\ncontents: ED 0B 7F 13 07 4F 2D 5E 08 00 16\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x03, 0x07, 0x4F, 0x2D, 0x5E, 0x08, 0x00, 0x16 });
assertEquals(" Immediate Packet test 10", "Unable to parse LocoNet message.\ncontents: ED 0B 7F 03 07 4F 2D 5E 08 00 16\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x23, 0x00, 0x4F, 0x2D, 0x5E, 0x08, 0x35, 0x16 });
assertEquals(" Immediate Packet test 11", "Send packet immediate: 2 bytes, repeat count 3(35)\n\tDHI=0x00, IM1=0x4F, IM2=0x2D, IM3=0x5E, IM4=0x08, IM5=0x35\n\tpacket: 4F 2D .\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x52, 0x07, 0x4B, 0x0F, 0x5F, 0x08, 0x52, 0x36 });
assertEquals(" Immediate Packet test 12", "Send packet immediate: Locomotive 2959 set F21=Off, F22=Off, F23=Off, F24=On, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x52, 0x06, 0x4B, 0x0F, 0x5F, 0x08, 0x52, 0x36 });
assertEquals(" Immediate Packet test 13", "Send packet immediate: 5 bytes, repeat count 2(82)\n\tDHI=0x06, IM1=0x4B, IM2=0x0F, IM3=0x5F, IM4=0x08, IM5=0x52\n\tpacket: 4B 8F DF 08 52 .\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x7F, 0x04, 0x3D, 0x7F, 0x00, 0x0D });
assertEquals(" Immediate Packet test 14", "Playable Whistle control - Loco 16260 whistle to 0 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xB4, 0x6D, 0x7F, 0x59 });
assertEquals(" Immediate Packet test 15", "LONG_ACK: the Send IMM Packet command was accepted.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x7F, 0x04, 0x3D, 0x7F, 0x7E, 0x73 });
assertEquals(" Immediate Packet test 16", "Playable Whistle control - Loco 16260 whistle to 126 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x7F, 0x04, 0x3D, 0x7F, 0x40, 0x73 });
assertEquals(" Immediate Packet test 17", "Playable Whistle control - Loco 16260 whistle to 64 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x7F, 0x04, 0x3D, 0x7F, 0x46, 0x73 });
assertEquals(" Immediate Packet test 18", "Playable Whistle control - Loco 16260 whistle to 70 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x7F, 0x04, 0x3D, 0x7F, 0x01, 0x73 });
assertEquals(" Immediate Packet test 19", "Playable Whistle control - Loco 16260 whistle to 1 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x40, 0x02, 0x3D, 0x7F, 0x01, 0x73 });
assertEquals(" Immediate Packet test 20", "Playable Whistle control - Loco 130 whistle to 1 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x51, 0x03, 0x40, 0x02, 0x3D, 0x7F, 0x3a, 0x73 });
assertEquals(" Immediate Packet test 21", "Playable Whistle control - Loco 130 whistle to 58 (repeat 1 times).\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x06, 0x00, 0x3E });
assertEquals(" Immediate Packet test 22", "Send packet immediate: Locomotive 130 set F21=Off, F22=On, F23=On, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x02, 0x00, 0x73 });
assertEquals(" Immediate Packet test 23", "Send packet immediate: Locomotive 130 set F21=Off, F22=On, F23=Off, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x07, 0x00, 0x73 });
assertEquals(" Immediate Packet test 24", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x0F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 25", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=On, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x1F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 26", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x07, 0x40, 0x02, 0x5F, 0x3F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 27", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x0F, 0x40, 0x02, 0x5F, 0x3F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 28", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=Off, F28=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x0F, 0x40, 0x02, 0x5F, 0x7F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 29", "Send packet immediate: Locomotive 130 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=On, F28=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x05, 0x59, 0x57, 0x24, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 30", "Send packet immediate: Locomotive 6487 set F9=Off, F10=Off, F11=On, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x05, 0x59, 0x57, 0x2C, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 31", "Send packet immediate: Locomotive 6487 set F9=Off, F10=Off, F11=On, F12=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x01, 0x00, 0x7d });
assertEquals(" Immediate Packet test 32", "Send packet immediate: Locomotive 6487 set F13=On, F14=Off, F15=Off, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x03, 0x00, 0x7d });
assertEquals(" Immediate Packet test 33", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=Off, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x07, 0x00, 0x7d });
assertEquals(" Immediate Packet test 34", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x0f, 0x00, 0x7d });
assertEquals(" Immediate Packet test 35", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=On, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x1f, 0x00, 0x7d });
assertEquals(" Immediate Packet test 36", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x3f, 0x00, 0x7d });
assertEquals(" Immediate Packet test 37", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x05, 0x59, 0x57, 0x5E, 0x7f, 0x00, 0x7d });
assertEquals(" Immediate Packet test 38", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=On, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x0D, 0x59, 0x57, 0x5E, 0x7F, 0x00, 0x7d });
assertEquals(" Immediate Packet test 39", "Send packet immediate: Locomotive 6487 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=On, F20=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x05, 0x59, 0x57, 0x21, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 40", "Send packet immediate: Locomotive 6487 set F9=On, F10=Off, F11=Off, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x05, 0x59, 0x57, 0x22, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 41", "Send packet immediate: Locomotive 6487 set F9=Off, F10=On, F11=Off, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x24, 0x02, 0x1F, 0x26, 0x00, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 42", "Send packet immediate: Locomotive 31 set F9=Off, F10=On, F11=On, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x24, 0x02, 0x1F, 0x2E, 0x00, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 43", "Send packet immediate: Locomotive 31 set F9=Off, F10=On, F11=On, F12=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x24, 0x02, 0x1F, 0x20, 0x00, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 44", "Send packet immediate: Locomotive 31 set F9=Off, F10=Off, F11=Off, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x24, 0x02, 0x1F, 0x21, 0x00, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 45", "Send packet immediate: Locomotive 31 set F9=On, F10=Off, F11=Off, F12=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x01, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 46", "Send packet immediate: Locomotive 31 set F13=On, F14=Off, F15=Off, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x03, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 47", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=Off, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x07, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 48", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=Off, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x0F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 49", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=On, F17=Off, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x1F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 50", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=Off, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x3F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 51", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=Off, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5e, 0x7F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 52", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=On, F20=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x06, 0x1F, 0x5e, 0x7F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 53", "Send packet immediate: Locomotive 31 set F13=On, F14=On, F15=On, F16=On, F17=On, F18=On, F19=On, F20=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x00, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 54", "Send packet immediate: Locomotive 31 set F21=Off, F22=Off, F23=Off, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x01, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 55", "Send packet immediate: Locomotive 31 set F21=On, F22=Off, F23=Off, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x03, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 56", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=Off, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x07, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 57", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=Off, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x0F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 58", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=On, F25=Off, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x1F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 59", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=Off, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x3F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 60", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=Off, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x02, 0x1F, 0x5f, 0x7F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 61", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=On, F28=Off.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x06, 0x1F, 0x5f, 0x7F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 62", "Send packet immediate: Locomotive 31 set F21=On, F22=On, F23=On, F24=On, F25=On, F26=On, F27=On, F28=On.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x34, 0x06, 0x1F, 0x01, 0x7F, 0x00, 0x00, 0x7d });
assertEquals(" Immediate Packet test 63", "Send packet immediate: 3 bytes, repeat count 4(52)\n\tDHI=0x06, IM1=0x1F, IM2=0x01, IM3=0x7F, IM4=0x00, IM5=0x00\n\tpacket: 1F 81 FF .\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x0B, 0x7F, 0x44, 0x0F, 0x40, 0x02, 0x01, 0x3F, 0x00, 0x73 });
assertEquals(" Immediate Packet test 64", "Send packet immediate: 4 bytes, repeat count 4(68)\n\tDHI=0x0F, IM1=0x40, IM2=0x02, IM3=0x01, IM4=0x3F, IM5=0x00\n\tpacket: C0 82 81 BF .\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 65", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 0 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 66", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 1 CV: 0 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x42, 0x5e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 67", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 128 CV: 0 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 68", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 256 CV: 0 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x00, 0x7f, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 69", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 32,512 CV: 0 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x00, 0x00, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 70", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 1 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5e, 0x00, 0x00, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 71", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 127 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 72", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 128 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 73", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 384 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x7f, 0x70, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 74", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 32767 Value: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x7f, 0x70, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 75", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 32767 Value: 1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x7f, 0x70, 0x7f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 76", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 32767 Value: 2.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x5e, 0x00, 0x00, 0x7f, 0x72, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 77", "Write CV on Main Track (Ops Mode) for Uhlenbrock IB-COM / Intellibox - Address: 0 CV: 32767 Value: 128.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x5d, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 78", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 5D 00 00 00 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x6c, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 79", "Read CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x6d, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 80", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x42, 0x6e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 81", "Read CV in Paged Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 128.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x6F, 0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 82", "Write CV in Paged Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 256.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x70, 0x00, 0x7f, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 83", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 32512.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 84", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0 Value: 1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x72, 0x00, 0x00, 0x7F, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 85", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 86", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 87", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x02, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 88", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 2.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x04, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 89", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 4.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 90", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 8.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x10, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 91", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 16.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x20, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 92", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 32.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x72, 0x40, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 93", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 64.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x4a, 0x72, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 94", "Read CV in Direct Byte Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 128.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x71, 0x01, 0x00, 0x7f, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 95", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 1 Value: 255.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x71, 0x02, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 96", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 2 Value: 128.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x04, 0x00, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 97", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 4 Value: 1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x08, 0x00, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 98", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 8 Value: 2.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x10, 0x00, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 99", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 16 Value: 4.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x48, 0x71, 0x20, 0x00, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 100", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 32 Value: 136.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x40, 0x00, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 101", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 64 Value: 16.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x20, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 102", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0 Value: 32.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 103", "Write CV in Register Mode from PT for Uhlenbrock IB-COM / Intellibox - CV: 0 Value: 64.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x00, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 104", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 00 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1e, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 105", "Unable to parse LocoNet message.\ncontents: ED 1E 01 49 42 40 71 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x04, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 106", "Unable to parse LocoNet message.\ncontents: ED 1F 04 49 42 40 71 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x51, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 107", "Unable to parse LocoNet message.\ncontents: ED 1F 01 51 42 40 71 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x30, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 108", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 30 40 71 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x00, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 109", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 00 00 00 40 70 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 110", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 71 00 00 40 6F 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x15, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 111", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 71 00 00 40 70 15 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xED, 0x1f, 0x01, 0x49, 0x42, 0x40, 0x71, 0x00, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals(" Immediate Packet test 112", "Unable to parse LocoNet message.\ncontents: ED 1F 01 49 42 40 71 00 00 40 70 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", f.displayMessage(l));
/*
*/
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method testOpcPeerXfer7Byte.
public void testOpcPeerXfer7Byte() {
LocoNetMessage l;
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x1D });
assertEquals("not a known 7byte opcPeerXfer", "Unable to parse LocoNet message.\ncontents: E5 07 00 00 00 00 1D\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x01, 0x49, 0x42, 0x40, 0x00 });
assertEquals("Uhlenbrock stop programming track", "Uhlenbrock IB-COM / Intellibox II Stop Programming Track.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x01, 0x49, 0x42, 0x41, 0x00 });
assertEquals("Uhlenbrock start programming track", "Uhlenbrock IB-COM / Intellibox II Start Programming Track.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x01, 0x49, 0x42, 0x42, 0x55 });
assertEquals("Uhlenbrock unknown programming track operation 1", "Unable to parse LocoNet message.\ncontents: E5 07 01 49 42 42 55\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x01, 0x49, 0x41, 0x40, 0x54 });
assertEquals("Uhlenbrock unknown programming track operation 2", "Unable to parse LocoNet message.\ncontents: E5 07 01 49 41 40 54\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x01, 0x48, 0x42, 0x40, 0x56 });
assertEquals("Uhlenbrock unknown programming track operation 3", "Unable to parse LocoNet message.\ncontents: E5 07 01 48 42 40 56\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x07, 0x00, 0x49, 0x42, 0x40, 0x56 });
assertEquals("Uhlenbrock unknown programming track operation 4", "Unable to parse LocoNet message.\ncontents: E5 07 00 49 42 40 56\n", f.displayMessage(l));
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LnSensorManagerTest method testLocoNetMessages.
@Test
public void testLocoNetMessages() {
// send messages for 21, 22
// notify the Ln that somebody else changed it...
LocoNetMessage m1 = new LocoNetMessage(4);
// OPC_INPUT_REP
m1.setOpCode(0xb2);
// all but lowest bit of address
m1.setElement(1, 0x15);
// Aux (low addr bit high), sensor high
m1.setElement(2, 0x60);
m1.setElement(3, 0x38);
lnis.sendTestMessage(m1);
// see if sensor exists
Assert.assertTrue(null != l.getBySystemName("LS44"));
}
use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.
the class LlnmonTest method testDownloadFirmware.
public void testDownloadFirmware() {
LocoNetMessage l;
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x01, 0x02, 0x04, 0x00, 0x08, 0x10, 0x20, 0x40, 0x00 });
assertEquals("IPL firmware setup 1", "Download setup message: manufacturer=0, H/W version=2, S/W version=4, device=0x01, options=8.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x10, 0x02, 0x04, 0x08, 0x00, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware setup 2", "Download setup message: manufacturer=16, H/W version=4, S/W version=8, device=0x02, options=1.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x10, 0x02, 0x00, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 1", "Download set address 0x100200.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x10, 0x02, 0x01, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 2", "Download set address 0x100201.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x41, 0x00, 0x02, 0x01, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 3", "Download set address 0x800201.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x42, 0x00, 0x02, 0x01, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 4", "Download set address 0x008201.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x43, 0x00, 0x00, 0x01, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 5", "Download set address 0x808001.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x01, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 6", "Download set address 0x000001.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x03, 0x00, 0x08, 0x10, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 7", "Download set address 0x000300.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x03, 0x00, 0x08, 0x63, 0x01, 0x02, 0x04, 0x08, 0x00 });
assertEquals("IPL firmware address 7", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7F 40 00 03 00 08 63 01 02 04 08 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 1a", "Download send data 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x41, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 1b", "Download send data 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x41, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 1c", "Download send data 0xC0 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 2a", "Download send data 0x00 0x03 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x42, 0x00, 0x07, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 2b", "Download send data 0x00 0x87 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 3a", "Download send data 0x00 0x00 0x03 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x44, 0x00, 0x00, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 3b", "Download send data 0x00 0x00 0x87 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x19, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 4a", "Download send data 0x00 0x00 0x00 0x19 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x48, 0x00, 0x00, 0x00, 0x31, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 4b", "Download send data 0x00 0x00 0x00 0xB1 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x21, 0x75, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 5a", "Download send data 0x00 0x00 0x00 0x00 0xF5 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 5b", "Download send data 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x63, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 6a", "Download send data 0x00 0x00 0x00 0x00 0x00 0xE3 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x55, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware write data 6b", "Download send data 0x00 0x00 0x00 0x00 0x00 0x55 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x10, 0x00, 0x00 });
assertEquals("IPL firmware write data 7a", "Download send data 0x00 0x00 0x00 0x00 0x00 0x00 0x90 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x63, 0x00, 0x00 });
assertEquals("IPL firmware write data 7b", "Download send data 0x00 0x00 0x00 0x00 0x00 0x00 0x63 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x34, 0x00 });
assertEquals("IPL firmware write data 8a", "Download send data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xB4.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware write data 8b", "Download send data 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x12.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 1a", "Download verify request 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x41, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 1b", "Download verify request 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x41, 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 1c", "Download verify request 0xC0 0x00 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 2a", "Download verify request 0x00 0x03 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x42, 0x00, 0x07, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 2b", "Download verify request 0x00 0x87 0x00 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 3a", "Download verify request 0x00 0x00 0x03 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x44, 0x00, 0x00, 0x07, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 3b", "Download verify request 0x00 0x00 0x87 0x00 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 4a", "Download verify request 0x00 0x00 0x00 0x19 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x48, 0x00, 0x00, 0x00, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 4b", "Download verify request 0x00 0x00 0x00 0xB1 0x00 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x31, 0x75, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 5a", "Download verify request 0x00 0x00 0x00 0x00 0xF5 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 5b", "Download verify request 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x63, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 6a", "Download verify request 0x00 0x00 0x00 0x00 0x00 0xE3 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x55, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware verify data 6b", "Download verify request 0x00 0x00 0x00 0x00 0x00 0x55 0x00 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x10, 0x00, 0x00 });
assertEquals("IPL firmware verify data 7a", "Download verify request 0x00 0x00 0x00 0x00 0x00 0x00 0x90 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x63, 0x00, 0x00 });
assertEquals("IPL firmware verify data 7b", "Download verify request 0x00 0x00 0x00 0x00 0x00 0x00 0x63 0x00.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x34, 0x00 });
assertEquals("IPL firmware verify data 8a", "Download verify request 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xB4.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware verify data 8b", "Download verify request 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x12.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7E, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware verify data 8b", "Unable to parse LocoNet message.\ncontents: E5 10 7E 7F 7F 40 00 00 00 00 30 00 00 00 12 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7E, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware verify data 8b", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7E 7F 40 00 00 00 00 30 00 00 00 12 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7F, 0x7E, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware verify data 8b", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7E 40 00 00 00 00 30 00 00 00 12 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7F, 0x7E, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware verify data 8b", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7E 30 00 00 00 00 30 00 00 00 12 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("IPL firmware end 1", "Download end operation.\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x12, 0x00 });
assertEquals("Unknown firmware 1", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7F 40 00 00 00 00 50 00 00 00 12 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware end 1", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7F 40 00 00 00 00 60 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware end 1", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7F 40 00 00 00 00 61 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00 });
assertEquals("IPL firmware end 1", "Unable to parse LocoNet message.\ncontents: E5 10 7F 7F 7F 40 00 00 00 00 70 00 00 00 00 00\n", f.displayMessage(l));
l = new LocoNetMessage(new int[] { 0xE5, 0x10, 0x7F, 0x7f, 0x7f, 0x40, 0x00, 0x01, 0x02, 0x04, 0x00, 0x08, 0x10, 0x20, 0x40, 0x00 });
assertEquals("IPL firmware setup 1", "Download setup message: manufacturer=0, H/W version=2, S/W version=4, device=0x01, options=8.\n", f.displayMessage(l));
}
Aggregations