Package jmri.jmrix.nce
Class NceConsist
java.lang.Object
jmri.implementation.DccConsist
jmri.jmrix.nce.NceConsist
- All Implemented Interfaces:
EventListener,Consist,AbstractMRListener,NceListener,ProgListener
The Consist definition for a consist on an NCE system. It uses the NCE
specific commands to build a consist.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class jmri.implementation.DccConsist
consistAddress, consistDir, consistID, consistList, consistPosition, consistRoster, consistTypeFields inherited from interface jmri.Consist
ADVANCED_CONSIST, CS_CONSIST, POSITION_LEAD, POSITION_TRAILFields inherited from interface jmri.ProgListener
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted -
Constructor Summary
ConstructorsConstructorDescriptionNceConsist(int address, NceSystemConnectionMemo m) NceConsist(DccLocoAddress locoAddress, NceSystemConnectionMemo m) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(DccLocoAddress locoAddress, boolean directionNormal) Add a Locomotive to a Consistvoidvoiddispose()A method for cleaning up the consistgetLocoAddressByPosition(int position) booleanisValid()Used to determine if consist has been initialized properly.(package private) voidkillConsist(int address, boolean isLong) Kills consist using lead loco addressvoidvoidremove(DccLocoAddress locoAddress) Remove a locomotive from this consistvoidvoidrestore(DccLocoAddress locoAddress, boolean directionNormal, int position) voidsetConsistType(int consist_type) Set the Consist Type.intIs there a size limit for this consist?Methods inherited from class jmri.implementation.DccConsist
addConsistListener, addToAdvancedConsist, contains, getConsistAddress, getConsistID, getConsistList, getConsistType, getLocoDirection, getPosition, getRosterId, isAddressAllowed, loadDecoderFile, loadDecoderFromLoco, notifyConsistListeners, programmingOpReply, removeConsistListener, removeFromAdvancedConsist, resetRosterEntryCVValue, restore, restore, reverse, setConsistID, setPosition, setRosterEntryCVValue, setRosterId, updateRosterCV
-
Field Details
-
CONSIST_MIN
- See Also:
-
CONSIST_MAX
- See Also:
-
-
Constructor Details
-
NceConsist
-
NceConsist
-
-
Method Details
-
dispose
Description copied from interface:ConsistA method for cleaning up the consist- Specified by:
disposein interfaceConsist- Overrides:
disposein classDccConsist
-
setConsistType
Description copied from interface:ConsistSet the Consist Type.- Specified by:
setConsistTypein interfaceConsist- Overrides:
setConsistTypein classDccConsist- Parameters:
consist_type- the consist type
-
sizeLimit
Description copied from class:DccConsistIs there a size limit for this consist? For Decoder Assisted Consists, returns -1 (no limit) return 0 for any other consist type.- Specified by:
sizeLimitin interfaceConsist- Overrides:
sizeLimitin classDccConsist- Returns:
- -1 if no limit; 0 if the Consist Type is not supported; or the total number of usable spaces if the consist has a limit (do not subtract used spaces).
-
add
Add a Locomotive to a Consist- Specified by:
addin interfaceConsist- Overrides:
addin classDccConsist- Parameters:
locoAddress- is the Locomotive address to add to the consistdirectionNormal- is True if the locomotive is traveling the same direction as the consist, or false otherwise.
-
restore
-
remove
Remove a locomotive from this consist- Specified by:
removein interfaceConsist- Overrides:
removein classDccConsist- Parameters:
locoAddress- is the locomotive address to remove from this consist
-
checkConsist
-
getLocoAddressByPosition
-
isValid
Used to determine if consist has been initialized properly.- Returns:
- true if command station memory has been read for this consist number.
-
killConsist
Kills consist using lead loco address- Parameters:
address- loco addressisLong- true if long address
-
message
- Specified by:
messagein interfaceNceListener
-
reply
- Specified by:
replyin interfaceNceListener
-