Search in sources :

Example 41 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class ClockMonPanel method issueReadAllRequest.

private void issueReadAllRequest() {
    if (!waitingForCmdRead) {
        byte[] cmd = jmri.jmrix.nce.NceBinaryCommand.accMemoryRead(CS_CLOCK_MEM_ADDR);
        NceMessage cmdNce = jmri.jmrix.nce.NceMessage.createBinaryMessage(tc, cmd, CS_CLOCK_MEM_SIZE);
        waiting++;
        waitingForCmdRead = true;
        tc.sendNceMessage(cmdNce, this);
    }
    updateTimeFromRead = true;
    updateRatioFromRead = true;
    updateFormatFromRead = true;
    updateStatusFromRead = true;
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage)

Example 42 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class ClockMonPanel method issueClockStop.

private void issueClockStop() {
    byte[] cmd = jmri.jmrix.nce.NceBinaryCommand.accStopClock();
    NceMessage cmdNce = jmri.jmrix.nce.NceMessage.createBinaryMessage(tc, cmd, CMD_CLOCK_SET_REPLY_SIZE);
    waiting++;
    waitingForCmdStop = true;
    tc.sendNceMessage(cmdNce, this);
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage)

Example 43 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class NceConsistBackup method getNceConsist.

// Read 16 bytes of NCE CS memory
private void getNceConsist(int cN) {
    NceMessage m = readConsistMemory(cN);
    tc.sendNceMessage(m, this);
    // wait for read to complete 
    readWait();
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage)

Example 44 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class NceShowCabPanel method readAiuData.

// USB Read AIU 
private void readAiuData(int cabId) {
    // Expect 2 byte response
    replyLen = NceMessage.REPLY_2;
    waiting++;
    byte[] bl = NceBinaryCommand.accAiu2Read(cabId);
    NceMessage m = NceMessage.createBinaryMessage(tc, bl, replyLen);
    tc.sendNceMessage(m, this);
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage)

Example 45 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class NcePacketGenPanelTest method testPacketNull.

public void testPacketNull() {
    NcePacketGenPanel t = new NcePacketGenPanel();
    NceMessage m = t.createPacket("");
    Assert.assertEquals("null pointer", null, m);
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage)

Aggregations

NceMessage (jmri.jmrix.nce.NceMessage)46 IOException (java.io.IOException)3 BufferedReader (java.io.BufferedReader)2 File (java.io.File)2 FileNotFoundException (java.io.FileNotFoundException)2 FileReader (java.io.FileReader)2 JFileChooser (javax.swing.JFileChooser)2 JPanel (javax.swing.JPanel)2 NceReply (jmri.jmrix.nce.NceReply)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1