Search in sources :

Example 81 with LocoNetMessage

use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.

the class LlnmonTest method testLACK.

public void testLACK() {
    LocoNetMessage l;
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x23, 0x07 });
    assertEquals("LACK 0x6f 0x23", "LONG_ACK: DCS51 programming reply, thought to mean OK.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x30, 0x00, 0x7B });
    assertEquals("LACK 0x30 0x00", "LONG_ACK: Switch request Failed!\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x3F, 0x00, 0x7B });
    assertEquals("LACK 0x3f 0x00", "LONG_ACK: NO FREE SLOTS!\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x39, 0x00, 0x7B });
    assertEquals("LACK 0x39 0x00", "LONG_ACK: Invalid consist, unable to link.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x3d, 0x00, 0x7B });
    assertEquals("LACK 0x3d 0x00", "LONG_ACK: The Command Station FIFO is full, the switch command was rejected.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x3d, 0x7f, 0x7B });
    assertEquals("LACK 0x3d 0x7f", "LONG_ACK: The Command Station accepted the switch command.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x3d, 0x01, 0x7B });
    assertEquals("LACK 0x3d 0x01", "LONG_ACK: Unknown response to Request Switch with ACK command, value 0x01.\ncontents: B4 3D 01 7B\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x3d, 0x7e, 0x7B });
    assertEquals("LACK 0x3d 0x7e", "LONG_ACK: Unknown response to Request Switch with ACK command, value 0x7E.\ncontents: B4 3D 7E 7B\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x00, 0x7B });
    assertEquals("LACK 0x6f 0x00", "LONG_ACK: The Slot Write command was rejected.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x01, 0x7B });
    assertEquals("LACK 0x6f 0x01", "LONG_ACK: The Slot Write command was accepted.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x23, 0x7B });
    assertEquals("LACK 0x6f 0x23", "LONG_ACK: DCS51 programming reply, thought to mean OK.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x2B, 0x7B });
    assertEquals("LACK 0x6f 0x2B", "LONG_ACK: DCS51 programming reply, thought to mean OK.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x6b, 0x7B });
    assertEquals("LACK 0x6f 0x6b", "LONG_ACK: DCS51 programming reply, thought to mean OK.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x40, 0x7B });
    assertEquals("LACK 0x6f 0x40", "LONG_ACK: The Slot Write command was accepted blind (no response will be sent).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7f, 0x7B });
    assertEquals("LACK 0x6f 0x7f", "LONG_ACK: Function not implemented, no reply will follow.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7e, 0x7B });
    assertEquals("LACK 0x6f 0x7e", "LONG_ACK: Unknown response to Write Slot Data message value 0x7E.\n" + "contents: B4 6F 7E 7B\n", f.displayMessage(l));
}
Also used : LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage)

Example 82 with LocoNetMessage

use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.

the class LlnmonTest method testTranspondingMessages.

public void testTranspondingMessages() {
    LocoNetMessage l;
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x7D, 0x03, 0x00, 0x00, 0x00, 0x2D });
    assertEquals(" basic Transponding Test 01", "Transponding Find query for loco address 3(short).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xD0, 0x20, 0x12, 0x7D, 0x03, 0x63 });
    assertEquals(" basic Transponding Test 02", "Transponder address 3(short) present at LR19 () (BDL16x Board ID 2 RX4 zone B).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB2, 0x0B, 0x70, 0x36 });
    assertEquals(" basic Transponding Test 03", "Sensor LS24 () is High.  (BDL16 # 2, DS8; DS54/DS64/SE8c # 3, SwiD/S4/DS08).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2D });
    assertEquals(" basic Transponding Test 04", "Transponding Find query for loco address 128.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x00, 0x7D, 0x03, 0x00, 0x12, 0x00, 0x7F });
    assertEquals(" basic Transponding Test 05", "Transponder Find report: address 3(short) present at LR19 (BDL16x Board 2 RX4 zone B).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xD0, 0x00, 0x12, 0x7D, 0x03, 0x43 });
    assertEquals(" basic Transponding Test 06", "Transponder address 3(short) absent at LR19 () (BDL16x Board ID 2 RX4 zone B).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB2, 0x0B, 0x60, 0x26 });
    assertEquals(" basic Transponding Test 07", "Sensor LS24 () is Low.  (BDL16 # 2, DS8; DS54/DS64/SE8c # 3, SwiD/S4/DS08).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2D });
    assertEquals(" basic Transponding Test 08", "Transponding Find query for loco address 1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x02, 0x01, 0x00, 0x00, 0x00, 0x2D });
    assertEquals(" basic Transponding Test 09", "Transponding Find query for loco address 257.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE5, 0x09, 0x40, 0x00, 0x71, 0x00, 0x00, 0x00, 0x2D });
    assertEquals(" basic Transponding Test 10", "Transponding Find query for loco address 113 (b3).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xD0, 0x20, 0x12, 0x00, 0x03, 0x63 });
    assertEquals(" basic Transponding Test 11", "Transponder address 3 present at LR19 () (BDL16x Board ID 2 RX4 zone B).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xD0, 0x20, 0x15, 0x00, 0x03, 0x63 });
    assertEquals(" basic Transponding Test 12", "Transponder address 3 present at LR22 () (BDL16x Board ID 2 RX4 zone (Unknown 5)).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xD0, 0x00, 0x15, 0x00, 0x03, 0x63 });
    assertEquals(" basic Transponding Test 12", "Transponder address 3 absent at LR22 () (BDL16x Board ID 2 RX4 zone (Unknown 5)).\n", f.displayMessage(l));
}
Also used : LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage)

Example 83 with LocoNetMessage

use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.

the class LlnmonTest method testLissy.

public void testLissy() {
    LocoNetMessage l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x00, 0x60, 0x01, 0x42, 0x35, 0x05 });
    assertEquals("Lissy message test 1", "Lissy 1 IR Report: Loco 8501 moving south\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x00, 0x40, 0x01, 0x42, 0x35, 0x25 });
    assertEquals("Lissy message test 2", "Lissy 1 IR Report: Loco 8501 moving north\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x09, 0x00, 0x69, 0x00, 0x01, 0x18, 0x00, 0x62 });
    assertEquals("Lissy message test 3", "Unrecognized Signal State report (typically sent by CML SIGM10, SIGM20).\ncontents: E4 09 00 69 00 01 18 00 62\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0A, 0x00, 0x69, 0x00, 0x01, 0x18, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 4", "SE106 (105) reports AX:0 XA:0 no reservation; Turnout Closed Occupied.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0B, 0x00, 0x69, 0x01, 0x01, 0x18, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 5", "Unable to parse LocoNet message.\ncontents: E4 0B 00 69 01 01 18 00 00 62\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0A, 0x00, 0x69, 0x00, 0x11, 0x18, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 6", "SE106 (105) reports AX:0 XA:0 AX reserved; Turnout Closed Occupied.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0A, 0x00, 0x69, 0x00, 0x21, 0x18, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 7", "SE106 (105) reports AX:0 XA:0 XA reserved; Turnout Closed Occupied.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0A, 0x00, 0x69, 0x00, 0x31, 0x19, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 8", "SE106 (105) reports AX:0 XA:0 AX, XA reserved; Turnout Thrown Occupied.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x0A, 0x00, 0x69, 0x00, 0x00, 0x19, 0x00, 0x00, 0x62 });
    assertEquals("Lissy message test 9", "SE106 (105) reports AX:0 XA:0 no reservation; Turnout Thrown Not occupied.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x01, 0x60, 0x02, 0x42, 0x35, 0x05 });
    assertEquals("Lissy message test 10", "Lissy 2 Wheel Report: 8501 wheels moving south\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE4, 0x08, 0x01, 0x40, 0x14, 0x42, 0x35, 0x25 });
    assertEquals("Lissy message test 11", "Lissy 20 Wheel Report: 8501 wheels moving north\n", f.displayMessage(l));
}
Also used : LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage)

Example 84 with LocoNetMessage

use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.

the class LlnmonTest method testSwichMessages.

public void testSwichMessages() {
    LocoNetMessage l;
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x00, 0x00 });
    assertEquals("Switch test 1", "Requesting Switch at LT1 () to Thrown (Off (open)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x20, 0x00 });
    assertEquals("Switch test 2", "Requesting Switch at LT1 () to Closed (Off (open)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x10, 0x00 });
    assertEquals("Switch test 3", "Requesting Switch at LT1 () to Thrown (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x30, 0x00 });
    assertEquals("Switch test 4", "Requesting Switch at LT1 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x01, 0x30, 0x00 });
    assertEquals("Switch test 5", "Requesting Switch at LT2 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x02, 0x30, 0x00 });
    assertEquals("Switch test 6", "Requesting Switch at LT3 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x04, 0x30, 0x00 });
    assertEquals("Switch test 7", "Requesting Switch at LT5 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x08, 0x30, 0x00 });
    assertEquals("Switch test 8", "Requesting Switch at LT9 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x10, 0x30, 0x00 });
    assertEquals("Switch test 9", "Requesting Switch at LT17 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x20, 0x30, 0x00 });
    assertEquals("Switch test 10", "Requesting Switch at LT33 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x40, 0x30, 0x00 });
    assertEquals("Switch test 11", "Requesting Switch at LT65 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x31, 0x00 });
    assertEquals("Switch test 12", "Requesting Switch at LT129 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x32, 0x00 });
    assertEquals("Switch test 13", "Requesting Switch at LT257 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x34, 0x00 });
    assertEquals("Switch test 14", "Requesting Switch at LT513 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x38, 0x00 });
    assertEquals("Switch test 15", "Requesting Switch at LT1025 () to Closed (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x10, 0x00 });
    assertEquals("Switch test 16", "Requesting Switch at LT1 () to Thrown (On (sink)), with acknowledgment.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x00, 0x00 });
    assertEquals("Switch test 17", "Request status of switch LT1 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x01, 0x00, 0x00 });
    assertEquals("Switch test 18", "Request status of switch LT2 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x02, 0x00, 0x00 });
    assertEquals("Switch test 19", "Request status of switch LT3 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x04, 0x00, 0x00 });
    assertEquals("Switch test 20", "Request status of switch LT5 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x08, 0x00, 0x00 });
    assertEquals("Switch test 21", "Request status of switch LT9 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x10, 0x00, 0x00 });
    assertEquals("Switch test 22", "Request status of switch LT17 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x20, 0x00, 0x00 });
    assertEquals("Switch test 23", "Request status of switch LT33 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x40, 0x00, 0x00 });
    assertEquals("Switch test 24", "Request status of switch LT65 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x01, 0x00 });
    assertEquals("Switch test 25", "Request status of switch LT129 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x02, 0x00 });
    assertEquals("Switch test 26", "Request status of switch LT257 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x04, 0x00 });
    assertEquals("Switch test 27", "Request status of switch LT513 ().\n", f.displayMessage(l));
    LnTurnout t = (LnTurnout) lntm.provideTurnout("LT513");
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x04, 0x00 });
    assertEquals("Switch test 27", "Request status of switch LT513 ().\n", f.displayMessage(l));
    t.setUserName("This User Name");
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x04, 0x00 });
    assertEquals("Switch test 27", "Request status of switch LT513 (This User Name).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x08, 0x00 });
    assertEquals("Switch test 28", "Request status of switch LT1025 ().\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x40, 0x02 });
    assertEquals("Switch test 29", "Unable to parse LocoNet message.\ncontents: BD 00 40 02\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x10, 0x53 });
    assertEquals("Switch test 30", "Unable to parse LocoNet message.\ncontents: BC 00 10 53\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x20, 0x63 });
    assertEquals("Switch test 31", "Unable to parse LocoNet message.\ncontents: BC 00 20 63\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBC, 0x00, 0x40, 0x33 });
    assertEquals("Switch test 32", "Unable to parse LocoNet message.\ncontents: BC 00 40 33\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xBD, 0x00, 0x40, 0x00 });
    assertEquals("Switch test 33", "Unable to parse LocoNet message.\ncontents: BD 00 40 00\n", f.displayMessage(l));
}
Also used : LnTurnout(jmri.jmrix.loconet.LnTurnout) LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage)

Example 85 with LocoNetMessage

use of jmri.jmrix.loconet.LocoNetMessage in project JMRI by JMRI.

the class LlnmonTest method testProgrammingMessages.

public void testProgrammingMessages() {
    LocoNetMessage l;
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x67, 0x00, 0x28, 0x23, 0x00, 0x02, 0x10, 0x54, 0x33, 0x44, 0x3F });
    assertEquals("OpsModeProg test 1", "Byte Write (No feedback) on Main Track: Decoder address 5155: CV17 value 212 (0xD4, 11010100b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x40, 0x64 });
    assertEquals("OpsModeProg test 2", "LONG_ACK: The Slot Write command was accepted blind (no response will be sent).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x2F, 0x00, 0x28, 0x23, 0x00, 0x02, 0x11, 0x54, 0x33, 0x44, 0x76 });
    assertEquals("OpsModeProg test 3", "Byte Read on Main Track (Ops Mode): Decoder address 5155: CV18.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7F, 0x5B });
    assertEquals("OpsModeProg test 4", "LONG_ACK: Function not implemented, no reply will follow.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7C, 0x2F, 0x10, 0x28, 0x23, 0x00, 0x00, 0x11, 0x23, 0x33, 0x44, 0x1B });
    assertEquals("OpsModeProg test 5", "Programming Response: Byte Read on Main Track (Ops Mode) Was successful via RX4/BDL16x: Decoder address 5155: CV18 value 35 (0x23, 00100011b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x67, 0x00, 0x28, 0x23, 0x00, 0x00, 0x11, 0x23, 0x33, 0x44, 0x4B });
    assertEquals("OpsModeProg test 7", "Byte Write (No feedback) on Main Track: Decoder address 5155: CV18 value 35 (0x23, 00100011b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x2F, 0x00, 0x28, 0x23, 0x00, 0x00, 0x11, 0x23, 0x33, 0x44, 0x03 });
    assertEquals("OpsModeProg test 8", "Byte Read on Main Track (Ops Mode): Decoder address 5155: CV18.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7F, 0x5B });
    assertEquals("OpsModeProg test 9", "LONG_ACK: Function not implemented, no reply will follow.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7C, 0x2F, 0x10, 0x28, 0x23, 0x00, 0x00, 0x11, 0x23, 0x33, 0x44, 0x1B });
    assertEquals("OpsModeProg test 10", "Programming Response: Byte Read on Main Track (Ops Mode) Was successful via RX4/BDL16x: Decoder address 5155: CV18 value 35 (0x23, 00100011b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x2F, 0x00, 0x28, 0x23, 0x00, 0x00, 0x10, 0x23, 0x33, 0x44, 0x02 });
    assertEquals("OpsModeProg test 11", "Byte Read on Main Track (Ops Mode): Decoder address 5155: CV17.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7F, 0x5B });
    assertEquals("OpsModeProg test 12", "LONG_ACK: Function not implemented, no reply will follow.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7C, 0x2F, 0x10, 0x28, 0x23, 0x00, 0x02, 0x10, 0x54, 0x33, 0x44, 0x6F });
    assertEquals("OpsModeProg test 13", "Programming Response: Byte Read on Main Track (Ops Mode) Was successful via RX4/BDL16x: Decoder address 5155: CV17 value 212 (0xD4, 11010100b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x2F, 0x00, 0x28, 0x23, 0x00, 0x02, 0x11, 0x54, 0x33, 0x44, 0x76 });
    assertEquals("OpsModeProg test 14", "Byte Read on Main Track (Ops Mode): Decoder address 5155: CV18.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xB4, 0x6F, 0x7F, 0x5B });
    assertEquals("OpsModeProg test 15", "LONG_ACK: Function not implemented, no reply will follow.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7C, 0x2F, 0x10, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x33, 0x44, 0x1B });
    assertEquals("OpsModeProg test 16", "Programming Response: Byte Read on Main Track (Ops Mode) Was successful via RX4/BDL16x: Decoder address 128: CV2 value 64 (0x40, 01000000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7C, 0x2F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x65, 0x23, 0x33, 0x44, 0x02 });
    assertEquals("OpsModeProg test 17", "Byte Read on Main Track (Ops Mode): Decoder address 1: CV102.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7C, 0x2F, 0x10, 0x00, 0x01, 0x00, 0x02, 0x7f, 0x00, 0x33, 0x44, 0x6F });
    assertEquals("OpsModeProg test 19", "Programming Response: Byte Read on Main Track (Ops Mode) Was successful via RX4/BDL16x: Decoder address 1: CV128 value 128 (0x80, 10000000b).\n", f.displayMessage(l));
    /*
        PSTAT       mode
        0x28/0x68   Direct mode byte Read/Write on Service track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("direct Mode direct write test 1", "Byte Write in Direct Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("byte mode direct write test 2", "Byte Write in Direct Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Byte mode direct read test 3", "Programming Response: Write Byte in Direct Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Byte mode direct read test 4", "Byte Read in Direct Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("byte mode direct test 5", "Programming Response: Read Byte in Direct Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("byte mode direct test 5", "Programming Response: Read Byte in Direct Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       mode
        0x08/0x48   Direct mode bit Read/WRite on Service track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x48, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Bit Write in Direct Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x48, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Bit Write in Direct Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x48, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Write Bit in Direct Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x08, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Bit Read in Direct Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x08, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Bit in Direct Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x08, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Bit in Direct Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x20/0x60   Paged mode byte Read/Write on Service track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x60, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write in Paged Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x60, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write in Paged Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x60, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Write Byte in Paged Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x20, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read in Paged Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x20, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Paged Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x20, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Paged Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x28/0x68   Direct mode byte Read/Write on Service track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write in Direct Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write in Direct Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x68, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Write Byte in Direct Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read in Direct Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Direct Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x28, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Direct Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x10/0x50   Physical Register byte Read/Write on Service Track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x50, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write in Physical Register Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x50, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write in Physical Register Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x50, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Write Byte in Physical Register Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x10, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read in Physical Register Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x10, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Physical Register Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x10, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Physical Register Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x30/0x70   Physical Register byte Read/Write on Service Track
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x70, 0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write in Physical Register Mode on Service Track: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x70, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write in Physical Register Mode on Service Track: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x70, 0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Write Byte in Physical Register Mode on Service Track Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x30, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read in Physical Register Mode on Service Track: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x30, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Physical Register Mode on Service Track Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x30, 0, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Read Byte in Physical Register Mode on Service Track Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x24/0x64   Ops Mode Byte Read/Write, no feedback
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x64, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write (No feedback) on Main Track: Decoder address 128: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x64, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write (No feedback) on Main Track: Decoder address 2: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x64, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Byte Write (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x24, 0, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read (No feedback) on Main Track (Ops Mode): Decoder address 1040: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x24, 0, 0x10, 0x20, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Byte Read (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 2080: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x24, 0, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Byte Read (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x2c/0x6c   Ops Mode Byte Read/Write, feedback
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x6C, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Byte Write on Main Track (Ops Mode): Decoder address 128: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x6C, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Byte Write on Main Track (Ops Mode): Decoder address 2: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x6C, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Byte Write on Main Track (Ops Mode) Was Successful: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x2C, 0, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Byte Read on Main Track (Ops Mode): Decoder address 1040: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x2C, 0, 0x10, 0x20, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Byte Read on Main Track (Ops Mode) Was Successful: Decoder address 2080: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x2C, 0, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Byte Read on Main Track (Ops Mode) Was Successful: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x04/0x44   Ops Mode Bit Read/Write, no feedback
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x44, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Bit Write (No feedback) on Main Track (Ops Mode): Decoder address 128: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x44, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Bit Write (No feedback) on Main Track (Ops Mode): Decoder address 2: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x44, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x04, 0, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Bit Read (No feedback) on Main Track (Ops Mode): Decoder address 1040: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x04, 0, 0x10, 0x20, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 2080: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x04, 0, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read (No feedback) on Main Track (Ops Mode) Was Successful: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /*
        PSTAT       Meaning
        0x0c/0x4c   Ops Mode Bit Read/Write, feedback
        */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x4c, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Bit Write on Main Track (Ops Mode): Decoder address 128: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x4c, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Bit Write on Main Track (Ops Mode): Decoder address 2: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x4c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write on Main Track (Ops Mode) Was Successful: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x0c, 0, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Bit Read on Main Track (Ops Mode): Decoder address 1040: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0, 0x10, 0x20, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Was Successful: Decoder address 2080: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Was Successful: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x4c, 1, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write on Main Track (Ops Mode) Failed, Service Mode programming track empty: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x4c, 2, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write on Main Track (Ops Mode) Failed, No Write Acknowledge from decoder: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x4c, 4, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write on Main Track (Ops Mode) Failed, Read Compare Acknowledge not detected: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x4c, 8, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Bit Write on Main Track (Ops Mode) Failed, User Aborted: Decoder address 520: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0x01, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Failed, Service Mode programming track empty: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0x02, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Failed, No Write Acknowledge from decoder: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0x04, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Failed, Read Compare Acknowledge not detected: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x0c, 0x08, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Bit Read on Main Track (Ops Mode) Failed, User Aborted: Decoder address 3(short): CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x41, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Uhlenbrock IB-COM / Intellibox II Programming Write: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x42, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Uhlenbrock IB-COM / Intellibox II Programming Write: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x43, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Uhlenbrock IB-COM / Intellibox II Programming Write Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x01, 0, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 4", "Uhlenbrock IB-COM / Intellibox II Programming Read: CV1.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x02, 0, 0x10, 0x20, 0x00, 0x00, 0x00, 0x02, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Uhlenbrock IB-COM / Intellibox II Programming Read Was Successful: CV1 value 2 (0x02, 00000010b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x03, 0, 0x7d, 0x03, 0x00, 0x02, 0x01, 0x08, 0, 0, 0x6F });
    assertEquals("Bit mode direct test 5", "Programming Response: Uhlenbrock IB-COM / Intellibox II Programming Read Was Successful: CV2 value 136 (0x88, 10001000b).\n", f.displayMessage(l));
    /* oddball cases */
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x58, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Service Track RESERVED MODE Write Detected!: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x18, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Service Track RESERVED MODE Read Detected!: CV129.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x78, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Service Track RESERVED MODE Write Detected!: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEf, 0x0E, 0x7c, 0x38, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Service Track RESERVED MODE Read Detected!: CV129.\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x78, 0, 0x01, 0x00, 0x00, 0x00, 0x01, 0x59, 0, 0, 0x6F });
    assertEquals("Bit Mode direct write test 1", "Programming Response: Service Track RESERVED MODE Write Detected! Was Successful: CV2 value 89 (0x59, 01011001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x38, 0, 0x00, 0x02, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct write test 2", "Programming Response: Service Track RESERVED MODE Read Detected! Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x14, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 20 (0x14).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x14, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 20 (0x14) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x1c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 28 (0x1C).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x1c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 28 (0x1C) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x34, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 52 (0x34).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x34, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 52 (0x34) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x3c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 60 (0x3C).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x3c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 60 (0x3C) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x54, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 84 (0x54).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x54, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 84 (0x54) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x5c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 92 (0x5C).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x5c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 92 (0x5C) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x74, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 116 (0x74).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x74, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 116 (0x74) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xEF, 0x0E, 0x7c, 0x7c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Unknown Programming slot access with programming mode 124 (0x7C).\n", f.displayMessage(l));
    l = new LocoNetMessage(new int[] { 0xE7, 0x0E, 0x7c, 0x7c, 0, 0x04, 0x08, 0x00, 0x01, 0x00, 0x09, 0, 0, 0x6F });
    assertEquals("Bit mode direct read test 3", "Programming Response: Unknown Programming slot access with programming mode 124 (0x7C) Was Successful: CV129 value 9 (0x09, 00001001b).\n", f.displayMessage(l));
}
Also used : LocoNetMessage(jmri.jmrix.loconet.LocoNetMessage)

Aggregations

LocoNetMessage (jmri.jmrix.loconet.LocoNetMessage)103 Test (org.junit.Test)8 JFrame (javax.swing.JFrame)3 LocoNetInterfaceScaffold (jmri.jmrix.loconet.LocoNetInterfaceScaffold)3 LocoNetSystemConnectionMemo (jmri.jmrix.loconet.LocoNetSystemConnectionMemo)3 LocoStatsPanel (jmri.jmrix.loconet.locostats.swing.LocoStatsPanel)3 JmriJFrame (jmri.util.JmriJFrame)3 LocoNetSlot (jmri.jmrix.loconet.LocoNetSlot)2 SpjFile (jmri.jmrix.loconet.spjfile.SpjFile)2 BufferedReader (java.io.BufferedReader)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 StringTokenizer (java.util.StringTokenizer)1 LnPacketizer (jmri.jmrix.loconet.LnPacketizer)1 LnReporter (jmri.jmrix.loconet.LnReporter)1 LnTrafficController (jmri.jmrix.loconet.LnTrafficController)1 LnTurnout (jmri.jmrix.loconet.LnTurnout)1