use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class NceShowCabPanel method readCabMemory1.
// Reads 1 byte of NCE cab memory
private void readCabMemory1(int cabNum, int offset) {
int nceCabAddr = getNceCabAddr(cabNum, offset);
// Expect 1 byte response
replyLen = NceMessage.REPLY_1;
waiting++;
byte[] bl = NceBinaryCommand.accMemoryRead1(nceCabAddr);
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 NceShowCabPanel method writeUsbCabMemory1.
// USB Write 1 byte of NCE cab memory
private void writeUsbCabMemory1(int value) {
// Expect 1 byte response
replyLen = NceMessage.REPLY_1;
waiting++;
byte[] bl = NceBinaryCommand.usbMemoryWrite1((byte) value);
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 NceShowCabPanel method writeCabMemory1.
// Write 1 byte of NCE cab memory
private void writeCabMemory1(int cabNum, int offset, int value) {
int nceCabAddr = getNceCabAddr(cabNum, offset);
// Expect 1 byte response
replyLen = NceMessage.REPLY_1;
waiting++;
byte[] bl = NceBinaryCommand.accMemoryWrite1(nceCabAddr);
bl[3] = (byte) value;
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 issueReadFormatRequest.
@SuppressWarnings("unused")
private void issueReadFormatRequest() {
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);
}
updateFormatFromRead = true;
}
use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.
the class ClockMonPanel method issueReadRatioRequest.
@SuppressWarnings("unused")
private void issueReadRatioRequest() {
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);
}
updateRatioFromRead = true;
}
Aggregations