Class NceBinaryCommand


  • public class NceBinaryCommand
    extends java.lang.Object
    NCE Binary Commands Also see NceMessage.java for additional commands
    • 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)
      • usbMemoryRead

        public static byte[] usbMemoryRead​(int num)
      • usbMemoryPointer

        public static byte[] usbMemoryPointer​(int cab,
                                              int loc)
      • accSetClock

        public static byte[] accSetClock​(int hours,
                                         int minutes)
      • 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; ignored
        locoAddr - locomotive address
        cvAddr - CV to set
        cvData - 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 address
        cvAddr - CV to set
        cvData - value to set CV to
        Returns:
        ops mode message