use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class NceConsistEngines method getNceConsist.
// Read 16 bytes of NCE CS memory
private void getNceConsist(int cR) {
NceMessage m = readConsistMemory(cR);
tc.sendNceMessage(m, this);
// wait for read to complete
readWait();
}
use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class NceConsistEngines method readConsistMemory.
// Reads 16 bytes of NCE consist memory
private NceMessage readConsistMemory(int num) {
int nceConsistAddr = (num * REPLY_16) + CS_CONSIST_MEM;
// Expect 16 byte response
replyLen = REPLY_16;
waiting++;
byte[] bl = NceBinaryCommand.accMemoryRead(nceConsistAddr);
NceMessage m = NceMessage.createBinaryMessage(tc, bl, REPLY_16);
return m;
}
use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class NceShowCabPanel method setUsbCabMemoryPointer.
// USB set cab memory pointer
private void setUsbCabMemoryPointer(int cab, int offset) {
// Expect 1 byte response
replyLen = NceMessage.REPLY_1;
waiting++;
byte[] bl = NceBinaryCommand.usbMemoryPointer(cab, offset);
NceMessage m = NceMessage.createBinaryMessage(tc, bl, NceMessage.REPLY_1);
tc.sendNceMessage(m, this);
}
use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class ClockMonPanel method issueClockRatio.
private void issueClockRatio(int r) {
byte[] cmd = jmri.jmrix.nce.NceBinaryCommand.accSetClockRatio(r);
NceMessage cmdNce = jmri.jmrix.nce.NceMessage.createBinaryMessage(tc, cmd, CMD_CLOCK_SET_REPLY_SIZE);
waiting++;
waitingForCmdRatio = true;
tc.sendNceMessage(cmdNce, this);
}
use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class ClockMonPanel method issueClockSetMem.
private void issueClockSetMem(int hh, int mm, int ss) {
byte[] cmd = jmri.jmrix.nce.NceBinaryCommand.accMemoryWriteN(CS_CLOCK_MEM_ADDR + CS_CLOCK_SECONDS, 3);
cmd[4] = (byte) ss;
cmd[5] = (byte) mm;
cmd[6] = (byte) hh;
NceMessage cmdNce = jmri.jmrix.nce.NceMessage.createBinaryMessage(tc, cmd, CMD_MEM_SET_REPLY_SIZE);
waiting++;
waitingForCmdTime = true;
tc.sendNceMessage(cmdNce, this);
}
Aggregations