jmri.jmrix
Class AbstractConsistManager

java.lang.Object
  extended by jmri.jmrix.AbstractConsistManager
All Implemented Interfaces:
ConsistManager
Direct Known Subclasses:
EasyDccConsistManager, LocoNetConsistManager, XNetConsistManager

public abstract class AbstractConsistManager
extends Object
implements ConsistManager

An Abstract Consist Manager on top of which system specific consist managers can be built.

Author:
Paul Bender Copyright (C) 2004

Field Summary
protected  ArrayList<DccLocoAddress> consistList
           
protected  Hashtable<DccLocoAddress,Consist> consistTable
           
 
Constructor Summary
AbstractConsistManager()
           
 
Method Summary
abstract  Consist addConsist(DccLocoAddress address)
          Add a new Consist with the given address to the consistTable/consistList
abstract  boolean csConsistNeedsSeperateAddress()
          Does a CS consist require a seperate consist address?
 String decodeErrorCode(int ErrorCode)
          Translate Error Codes recieved by a consistListener into Strings
 void delConsist(DccLocoAddress address)
          Remove an old Consist
 Consist getConsist(DccLocoAddress address)
          Find a Consist with this consist address, and return it.
 ArrayList<DccLocoAddress> getConsistList()
          Return the list of consists we know about.
abstract  boolean isCommandStationConsistPossible()
          Does this implementation support a command station consist?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consistTable

protected Hashtable<DccLocoAddress,Consist> consistTable

consistList

protected ArrayList<DccLocoAddress> consistList
Constructor Detail

AbstractConsistManager

public AbstractConsistManager()
Method Detail

getConsist

public Consist getConsist(DccLocoAddress address)
Find a Consist with this consist address, and return it.

Specified by:
getConsist in interface ConsistManager

addConsist

public abstract Consist addConsist(DccLocoAddress address)
Add a new Consist with the given address to the consistTable/consistList


delConsist

public void delConsist(DccLocoAddress address)
Description copied from interface: ConsistManager
Remove an old Consist

Specified by:
delConsist in interface ConsistManager

isCommandStationConsistPossible

public abstract boolean isCommandStationConsistPossible()
Does this implementation support a command station consist?

Specified by:
isCommandStationConsistPossible in interface ConsistManager

csConsistNeedsSeperateAddress

public abstract boolean csConsistNeedsSeperateAddress()
Does a CS consist require a seperate consist address? (or is the lead loco to be used for the consist address)

Specified by:
csConsistNeedsSeperateAddress in interface ConsistManager

getConsistList

public ArrayList<DccLocoAddress> getConsistList()
Return the list of consists we know about.

Specified by:
getConsistList in interface ConsistManager

decodeErrorCode

public String decodeErrorCode(int ErrorCode)
Description copied from interface: ConsistManager
Translate Error Codes recieved by a consistListener into Strings

Specified by:
decodeErrorCode in interface ConsistManager


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