jmri.jmrix.nce
Class NceBinaryCommand

java.lang.Object
  extended by jmri.jmrix.nce.NceBinaryCommand

public class NceBinaryCommand
extends Object

NCE Binary Commands Also see NceMessage.java for additional commands

Author:
Daniel Boudreau (C) 2007, 2010

Field Summary
static int ACC_CMD
           
static int CLOCK_1224_CMD
           
static int CLOCK_RATIO_CMD
           
static int DUMMY_CMD
           
static int LOCO_CMD
           
static byte LOCO_CMD_DELETE_LOCO_CONSIST
           
static byte LOCO_CMD_FG1
           
static byte LOCO_CMD_FG2
           
static byte LOCO_CMD_FG3
           
static byte LOCO_CMD_FG4
           
static byte LOCO_CMD_FG5
           
static byte LOCO_CMD_FWD_128SPEED
           
static byte LOCO_CMD_FWD_28SPEED
           
static byte LOCO_CMD_FWD_CONSIST_LEAD
           
static byte LOCO_CMD_FWD_CONSIST_MID
           
static byte LOCO_CMD_FWD_CONSIST_REAR
           
static byte LOCO_CMD_FWD_ESTOP
           
static byte LOCO_CMD_KILL_CONSIST
           
static byte LOCO_CMD_REV_128SPEED
           
static byte LOCO_CMD_REV_28SPEED
           
static byte LOCO_CMD_REV_CONSIST_LEAD
           
static byte LOCO_CMD_REV_CONSIST_MID
           
static byte LOCO_CMD_REV_CONSIST_REAR
           
static byte LOCO_CMD_REV_ESTOP
           
static int OPS_PROG_ACCY_CMD
           
static int OPS_PROG_LOCO_CMD
           
static int READ_AUI4_CMD
           
static int READ_CLOCK_CMD
           
static int READ1_CMD
           
static int READ16_CMD
           
static int SET_CLOCK_CMD
           
static int START_CLOCK_CMD
           
static int STOP_CLOCK_CMD
           
static int SW_REV_CMD
           
static int WRITE1_CMD
           
static int WRITE2_CMD
           
static int WRITE4_CMD
           
static int WRITE8_CMD
           
static int WRITEn_CMD
           
 
Constructor Summary
NceBinaryCommand()
           
 
Method Summary
static byte[] accDecoder(int number, boolean closed)
           
static byte[] accMemoryRead(int address)
           
static byte[] accMemoryRead1(int address)
          Read one byte from NCE command station memory
static byte[] accMemoryWrite1(int address)
           
static byte[] accMemoryWrite2(int address)
           
static byte[] accMemoryWrite4(int address)
           
static byte[] accMemoryWrite8(int address)
           
static byte[] accMemoryWriteN(int address, int num)
           
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, Reply Format: VV.MM.mm
static byte[] nceLocoCmd(int locoAddr, byte locoSubCmd, byte locoData)
           
static byte[] usbOpsModeAccy(int accyAddr, int cvAddr, int cvData)
          create an NCE USB compatible ops mode accy message
static byte[] usbOpsModeLoco(NceTrafficController tc, int locoAddr, int cvAddr, int cvData)
          create an NCE USB compatible ops mode loco message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ_CLOCK_CMD

public static final int READ_CLOCK_CMD
See Also:
Constant Field Values

STOP_CLOCK_CMD

public static final int STOP_CLOCK_CMD
See Also:
Constant Field Values

START_CLOCK_CMD

public static final int START_CLOCK_CMD
See Also:
Constant Field Values

SET_CLOCK_CMD

public static final int SET_CLOCK_CMD
See Also:
Constant Field Values

CLOCK_1224_CMD

public static final int CLOCK_1224_CMD
See Also:
Constant Field Values

CLOCK_RATIO_CMD

public static final int CLOCK_RATIO_CMD
See Also:
Constant Field Values

READ_AUI4_CMD

public static final int READ_AUI4_CMD
See Also:
Constant Field Values

DUMMY_CMD

public static final int DUMMY_CMD
See Also:
Constant Field Values

WRITEn_CMD

public static final int WRITEn_CMD
See Also:
Constant Field Values

READ16_CMD

public static final int READ16_CMD
See Also:
Constant Field Values

WRITE1_CMD

public static final int WRITE1_CMD
See Also:
Constant Field Values

WRITE2_CMD

public static final int WRITE2_CMD
See Also:
Constant Field Values

WRITE4_CMD

public static final int WRITE4_CMD
See Also:
Constant Field Values

WRITE8_CMD

public static final int WRITE8_CMD
See Also:
Constant Field Values

READ1_CMD

public static final int READ1_CMD
See Also:
Constant Field Values

ACC_CMD

public static final int ACC_CMD
See Also:
Constant Field Values

LOCO_CMD

public static final int LOCO_CMD
See Also:
Constant Field Values

SW_REV_CMD

public static final int SW_REV_CMD
See Also:
Constant Field Values

OPS_PROG_LOCO_CMD

public static final int OPS_PROG_LOCO_CMD
See Also:
Constant Field Values

OPS_PROG_ACCY_CMD

public static final int OPS_PROG_ACCY_CMD
See Also:
Constant Field Values

LOCO_CMD_REV_28SPEED

public static final byte LOCO_CMD_REV_28SPEED
See Also:
Constant Field Values

LOCO_CMD_FWD_28SPEED

public static final byte LOCO_CMD_FWD_28SPEED
See Also:
Constant Field Values

LOCO_CMD_REV_128SPEED

public static final byte LOCO_CMD_REV_128SPEED
See Also:
Constant Field Values

LOCO_CMD_FWD_128SPEED

public static final byte LOCO_CMD_FWD_128SPEED
See Also:
Constant Field Values

LOCO_CMD_REV_ESTOP

public static final byte LOCO_CMD_REV_ESTOP
See Also:
Constant Field Values

LOCO_CMD_FWD_ESTOP

public static final byte LOCO_CMD_FWD_ESTOP
See Also:
Constant Field Values

LOCO_CMD_FG1

public static final byte LOCO_CMD_FG1
See Also:
Constant Field Values

LOCO_CMD_FG2

public static final byte LOCO_CMD_FG2
See Also:
Constant Field Values

LOCO_CMD_FG3

public static final byte LOCO_CMD_FG3
See Also:
Constant Field Values

LOCO_CMD_FG4

public static final byte LOCO_CMD_FG4
See Also:
Constant Field Values

LOCO_CMD_FG5

public static final byte LOCO_CMD_FG5
See Also:
Constant Field Values

LOCO_CMD_REV_CONSIST_LEAD

public static final byte LOCO_CMD_REV_CONSIST_LEAD
See Also:
Constant Field Values

LOCO_CMD_FWD_CONSIST_LEAD

public static final byte LOCO_CMD_FWD_CONSIST_LEAD
See Also:
Constant Field Values

LOCO_CMD_REV_CONSIST_REAR

public static final byte LOCO_CMD_REV_CONSIST_REAR
See Also:
Constant Field Values

LOCO_CMD_FWD_CONSIST_REAR

public static final byte LOCO_CMD_FWD_CONSIST_REAR
See Also:
Constant Field Values

LOCO_CMD_REV_CONSIST_MID

public static final byte LOCO_CMD_REV_CONSIST_MID
See Also:
Constant Field Values

LOCO_CMD_FWD_CONSIST_MID

public static final byte LOCO_CMD_FWD_CONSIST_MID
See Also:
Constant Field Values

LOCO_CMD_DELETE_LOCO_CONSIST

public static final byte LOCO_CMD_DELETE_LOCO_CONSIST
See Also:
Constant Field Values

LOCO_CMD_KILL_CONSIST

public static final byte LOCO_CMD_KILL_CONSIST
See Also:
Constant Field Values
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 -
Returns:
binary command to read one byte

accMemoryWriteN

public static byte[] accMemoryWriteN(int address,
                                     int num)

accMemoryWrite8

public static byte[] accMemoryWrite8(int address)

accMemoryWrite4

public static byte[] accMemoryWrite4(int address)

accMemoryWrite2

public static byte[] accMemoryWrite2(int address)

accMemoryWrite1

public static byte[] accMemoryWrite1(int address)

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, Reply Format: VV.MM.mm


usbOpsModeLoco

public static byte[] usbOpsModeLoco(NceTrafficController tc,
                                    int locoAddr,
                                    int cvAddr,
                                    int cvData)
create an NCE USB compatible ops mode loco message

Parameters:
locoAddr -
cvAddr -
cvData -
Returns:
byte[] containing message

usbOpsModeAccy

public static byte[] usbOpsModeAccy(int accyAddr,
                                    int cvAddr,
                                    int cvData)
create an NCE USB compatible ops mode accy message

Parameters:
accyAddr -
cvAddr -
cvData -
Returns:
byte[] containing message


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads