jmri
Class DccConsist
java.lang.Object
jmri.DccConsist
- All Implemented Interfaces:
- EventListener, Consist, ProgListener
- Direct Known Subclasses:
- EasyDccConsist, XNetConsist
public class DccConsist
- extends Object
- implements Consist, ProgListener
This is the Default DCC consist.
It utilizes the fact that IF a Command Station supports OpsMode
Programing, you can write the consist information to CV19, so ANY
Command Station that supports Ops Mode Programing can write this
address to a Command Station that supports it.
- Author:
- Paul Bender Copyright (C) 2003-2008
| Fields inherited from interface jmri.ProgListener |
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsistList
protected ArrayList<DccLocoAddress> ConsistList
ConsistDir
protected Hashtable<DccLocoAddress,Boolean> ConsistDir
ConsistPosition
protected Hashtable<DccLocoAddress,Integer> ConsistPosition
ConsistType
protected int ConsistType
ConsistAddress
protected DccLocoAddress ConsistAddress
ConsistID
protected String ConsistID
DccConsist
public DccConsist(int address)
DccConsist
public DccConsist(DccLocoAddress address)
dispose
public void dispose()
- Specified by:
dispose in interface Consist
setConsistType
public void setConsistType(int consist_type)
- Specified by:
setConsistType in interface Consist
getConsistType
public int getConsistType()
- Specified by:
getConsistType in interface Consist
getConsistAddress
public DccLocoAddress getConsistAddress()
- Specified by:
getConsistAddress in interface Consist
isAddressAllowed
public boolean isAddressAllowed(DccLocoAddress address)
- Specified by:
isAddressAllowed in interface Consist
sizeLimit
public int sizeLimit()
- Description copied from interface:
Consist
- is there a size limit for this type of consist?
returns -1 if no limit
returns 0 if the Consist Type is not supported
returns the total number of useable spaces if the consist has a
limit (do not subtract used spaces).
- Specified by:
sizeLimit in interface Consist
getConsistList
public ArrayList<DccLocoAddress> getConsistList()
- Specified by:
getConsistList in interface Consist
contains
public boolean contains(DccLocoAddress address)
- Specified by:
contains in interface Consist
getLocoDirection
public boolean getLocoDirection(DccLocoAddress address)
- Specified by:
getLocoDirection in interface Consist
add
public void add(DccLocoAddress LocoAddress,
boolean directionNormal)
- Specified by:
add in interface Consist
restore
public void restore(DccLocoAddress LocoAddress,
boolean directionNormal)
- Specified by:
restore in interface Consist
remove
public void remove(DccLocoAddress LocoAddress)
- Specified by:
remove in interface Consist
removeFromAdvancedConsist
public void removeFromAdvancedConsist(DccLocoAddress LocoAddress)
setPosition
public void setPosition(DccLocoAddress address,
int position)
- Specified by:
setPosition in interface Consist
getPosition
public int getPosition(DccLocoAddress address)
- Specified by:
getPosition in interface Consist
addConsistListener
public void addConsistListener(ConsistListener Listener)
- Specified by:
addConsistListener in interface Consist
removeConsistListener
public void removeConsistListener(ConsistListener Listener)
- Specified by:
removeConsistListener in interface Consist
setConsistID
public void setConsistID(String ID)
- Specified by:
setConsistID in interface Consist
getConsistID
public String getConsistID()
- Specified by:
getConsistID in interface Consist
notifyConsistListeners
protected void notifyConsistListeners(DccLocoAddress LocoAddress,
int ErrorCode)
programmingOpReply
public void programmingOpReply(int value,
int status)
- Description copied from interface:
ProgListener
- Receive a callback at the end of a programming operation.
- Specified by:
programmingOpReply in interface ProgListener
- Parameters:
value - Value from a read operation, or value written on a writestatus - Denotes the completion code. Note that this is a
bitwise combination of the various status coded defined
in this interface.
Copyright © 1997 - 2009 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: