jmri.jmrit.operations.rollingstock.engines
Class NceConsistEngines

java.lang.Object
  extended by java.lang.Thread
      extended by jmri.jmrit.operations.rollingstock.engines.NceConsistEngines
All Implemented Interfaces:
Runnable, EventListener, AbstractMRListener, NceListener

public class NceConsistEngines
extends Thread
implements NceListener

Routine to synchronize operation's engines with NCE consist memory. NCE Consists are stored in Command Station (CS) memory starting at address xF500 and ending xFAFF. NCE supports up to 127 consists, numbered 1 to 127. They track the lead loco, rear loco, and four mid locos in the consist file. Consist lead locos are stored in memory locations xF500 through xF5FF. Consist rear locos are stored in memory locations xF600 through xF6FF. Mid consist locos (four max) are stored in memory locations xF700 through xFAFF. If a long address is in use, bits 6 and 7 of the high byte are set. Example: Long address 3 = 0xc0 0x03 Short address 3 = 0x00 0x03 NCE file format: :F500 (con 0 lead loco) (con 1 lead loco) ....... (con 7 lead loco) :F510 (con 8 lead loco) ........ (con 15 lead loco) . . :F5F0 (con 120 lead loco) ..... (con 127 lead loco) :F600 (con 0 rear loco) (con 1 rear loco) ....... (con 7 rear loco) . . :F6F0 (con 120 rear loco) ..... (con 127 rear loco) :F700 (con 0 mid loco1) (con 0 mid loco2) (con 0 mid loco3) (con 0 mid loco4) . . :FAF0 (con 126 mid loco1) .. (con 126 mid loco4)(con 127 mid loco1) .. (con 127 mid loco4) :0000

Author:
Dan Boudreau Copyright (C)2008

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
NceConsistEngines(NceTrafficController tc)
           
 
Method Summary
 void message(NceMessage m)
           
 void reply(NceReply r)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NceConsistEngines

public NceConsistEngines(NceTrafficController tc)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

message

public void message(NceMessage m)
Specified by:
message in interface NceListener

reply

public void reply(NceReply r)
Specified by:
reply in interface NceListener


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