Package jmri.jmrix.nce
Class NceBinaryCommand
- java.lang.Object
-
- jmri.jmrix.nce.NceBinaryCommand
-
public class NceBinaryCommand extends java.lang.Object
NCE Binary Commands Also see NceMessage.java for additional commands
-
-
Constructor Summary
Constructors Constructor Description NceBinaryCommand()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
accAiu2Read(int cabId)
static byte[]
accDecoder(int number, boolean closed)
static byte[]
accMemoryRead(int address)
static byte[]
accMemoryRead1(int address)
Read one byte from NCE command station memorystatic byte[]
accMemoryWrite1(int address, byte data)
static byte[]
accMemoryWrite2(int address, byte[] data)
static byte[]
accMemoryWrite4(int address, byte[] data)
static byte[]
accMemoryWrite8(int address, byte[] data)
static byte[]
accMemoryWriteN(int address, byte[] data)
static byte[]
accSetClock(int hours, int minutes)
static byte[]
accSetClock1224(boolean flag)
static byte[]
accSetClockRatio(int ratio)
static byte[]
accStartClock()
static byte[]
accStopClock()
static byte[]
getNceEpromRev()
Create NCE EPROM revision message.static byte[]
nceLocoCmd(int locoAddr, byte locoSubCmd, byte locoData)
static byte[]
usbMemoryPointer(int cab, int loc)
static byte[]
usbMemoryRead(int num)
static byte[]
usbMemoryWrite1(byte data)
static byte[]
usbOpsModeAccy(int accyAddr, int cvAddr, int cvData)
Create a NCE USB compatible ops mode accessory message.static byte[]
usbOpsModeLoco(NceTrafficController tc, int locoAddr, int cvAddr, int cvData)
Create a NCE USB compatible ops mode loco message.static byte[]
usbSetCabId(int cab)
-
-
-
Constructor Detail
-
NceBinaryCommand
public NceBinaryCommand()
-
-
Method Detail
-
accDecoder
public static byte[] accDecoder(int number, boolean closed)
-
accMemoryRead
public static byte[] accMemoryRead(int address)
-
accMemoryRead1
public static byte[] accMemoryRead1(int address)
Read one byte from NCE command station memory- Parameters:
address
- address to read from- Returns:
- binary command to read one byte
-
accMemoryWriteN
public static byte[] accMemoryWriteN(int address, byte[] data)
-
accMemoryWrite8
public static byte[] accMemoryWrite8(int address, byte[] data)
-
accMemoryWrite4
public static byte[] accMemoryWrite4(int address, byte[] data)
-
accMemoryWrite2
public static byte[] accMemoryWrite2(int address, byte[] data)
-
accMemoryWrite1
public static byte[] accMemoryWrite1(int address, byte data)
-
accAiu2Read
public static byte[] accAiu2Read(int cabId)
-
usbSetCabId
public static byte[] usbSetCabId(int cab)
-
usbMemoryWrite1
public static byte[] usbMemoryWrite1(byte data)
-
usbMemoryRead
public static byte[] usbMemoryRead(int num)
-
usbMemoryPointer
public static byte[] usbMemoryPointer(int cab, int loc)
-
accStopClock
public static byte[] accStopClock()
-
accStartClock
public static byte[] accStartClock()
-
accSetClock
public static byte[] accSetClock(int hours, int minutes)
-
accSetClock1224
public static byte[] accSetClock1224(boolean flag)
-
accSetClockRatio
public static byte[] accSetClockRatio(int ratio)
-
nceLocoCmd
public static byte[] nceLocoCmd(int locoAddr, byte locoSubCmd, byte locoData)
-
getNceEpromRev
public static byte[] getNceEpromRev()
Create NCE EPROM revision message. The reply format is: VV.MM.mm- Returns:
- the revision message
-
usbOpsModeLoco
public static byte[] usbOpsModeLoco(NceTrafficController tc, int locoAddr, int cvAddr, int cvData)
Create a NCE USB compatible ops mode loco message.- Parameters:
tc
- traffic controller; ignoredlocoAddr
- locomotive addresscvAddr
- CV to setcvData
- value to set CV to- Returns:
- ops mode message
-
usbOpsModeAccy
public static byte[] usbOpsModeAccy(int accyAddr, int cvAddr, int cvData)
Create a NCE USB compatible ops mode accessory message.- Parameters:
accyAddr
- locomotive addresscvAddr
- CV to setcvData
- value to set CV to- Returns:
- ops mode message
-
-