Class NceConsistEngines
- java.lang.Object
-
- java.lang.Thread
-
- jmri.jmrit.operations.rollingstock.engines.tools.NceConsistEngines
-
- All Implemented Interfaces:
java.lang.Runnable
,java.util.EventListener
,AbstractMRListener
,NceListener
public class NceConsistEngines extends java.lang.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 0x03NCE 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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<java.lang.String>
consists
(package private) java.util.List<Engine>
engineList
(package private) EngineManager
engineManager
(package private) javax.swing.JLabel
indexNumber
(package private) NceTrafficController
tc
(package private) javax.swing.JLabel
textConsist
-
Constructor Summary
Constructors Constructor Description NceConsistEngines(NceTrafficController tc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
message(NceMessage m)
void
reply(NceReply r)
void
run()
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
engineManager
EngineManager engineManager
-
engineList
java.util.List<Engine> engineList
-
consists
java.util.List<java.lang.String> consists
-
textConsist
javax.swing.JLabel textConsist
-
indexNumber
javax.swing.JLabel indexNumber
-
-
Constructor Detail
-
NceConsistEngines
public NceConsistEngines(NceTrafficController tc)
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
message
public void message(NceMessage m)
- Specified by:
message
in interfaceNceListener
-
reply
public void reply(NceReply r)
- Specified by:
reply
in interfaceNceListener
-
-