jmri.jmrix.lenz
Class XNetConsist

java.lang.Object
  extended by jmri.DccConsist
      extended by jmri.jmrix.lenz.XNetConsist
All Implemented Interfaces:
EventListener, Consist, AbstractMRListener, XNetListener, ProgListener

public class XNetConsist
extends DccConsist
implements XNetListener


Field Summary
protected  XNetTrafficController tc
           
 
Fields inherited from class jmri.DccConsist
ConsistAddress, ConsistDir, ConsistID, ConsistList, ConsistPosition, ConsistType
 
Fields inherited from interface jmri.Consist
ADVANCED_CONSIST, CS_CONSIST, POSITION_LEAD, POSITION_TRAIL
 
Fields inherited from interface jmri.ProgListener
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted
 
Constructor Summary
XNetConsist(DccLocoAddress address, XNetTrafficController controller)
           
XNetConsist(int address, XNetTrafficController controller)
           
 
Method Summary
 void add(DccLocoAddress LocoAddress, boolean directionNormal)
           
protected  void addToAdvancedConsist(DccLocoAddress LocoAddress, boolean directionNormal)
           
 boolean contains(DccLocoAddress address)
           
 void dispose()
           
 boolean getLocoDirection(DccLocoAddress address)
           
 boolean isAddressAllowed(DccLocoAddress address)
           
 void message(XNetMessage l)
          Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout.
 void message(XNetReply l)
          Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.
 void notifyTimeout(XNetMessage msg)
          Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue.
 void remove(DccLocoAddress LocoAddress)
           
protected  void removeFromAdvancedConsist(DccLocoAddress LocoAddress)
           
 void removeFromCSConsist(DccLocoAddress LocoAddress)
           
 void restore(DccLocoAddress LocoAddress, boolean directionNormal)
           
 void setConsistType(int consist_type)
           
 int sizeLimit()
          is there a size limit for this type of consist?
 
Methods inherited from class jmri.DccConsist
addConsistListener, getConsistAddress, getConsistID, getConsistList, getConsistType, getPosition, notifyConsistListeners, programmingOpReply, removeConsistListener, reverse, setConsistID, setPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tc

protected XNetTrafficController tc
Constructor Detail

XNetConsist

public XNetConsist(int address,
                   XNetTrafficController controller)

XNetConsist

public XNetConsist(DccLocoAddress address,
                   XNetTrafficController controller)
Method Detail

dispose

public void dispose()
Specified by:
dispose in interface Consist
Overrides:
dispose in class DccConsist

setConsistType

public void setConsistType(int consist_type)
Specified by:
setConsistType in interface Consist
Overrides:
setConsistType in class DccConsist

isAddressAllowed

public boolean isAddressAllowed(DccLocoAddress address)
Specified by:
isAddressAllowed in interface Consist
Overrides:
isAddressAllowed in class DccConsist

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
Overrides:
sizeLimit in class DccConsist

contains

public boolean contains(DccLocoAddress address)
Specified by:
contains in interface Consist
Overrides:
contains in class DccConsist

getLocoDirection

public boolean getLocoDirection(DccLocoAddress address)
Specified by:
getLocoDirection in interface Consist
Overrides:
getLocoDirection in class DccConsist

add

public void add(DccLocoAddress LocoAddress,
                boolean directionNormal)
Specified by:
add in interface Consist
Overrides:
add in class DccConsist

restore

public void restore(DccLocoAddress LocoAddress,
                    boolean directionNormal)
Specified by:
restore in interface Consist
Overrides:
restore in class DccConsist

remove

public void remove(DccLocoAddress LocoAddress)
Specified by:
remove in interface Consist
Overrides:
remove in class DccConsist

addToAdvancedConsist

protected void addToAdvancedConsist(DccLocoAddress LocoAddress,
                                    boolean directionNormal)
Overrides:
addToAdvancedConsist in class DccConsist

removeFromAdvancedConsist

protected void removeFromAdvancedConsist(DccLocoAddress LocoAddress)
Overrides:
removeFromAdvancedConsist in class DccConsist

removeFromCSConsist

public void removeFromCSConsist(DccLocoAddress LocoAddress)

message

public void message(XNetReply l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.

message

public void message(XNetMessage l)
Description copied from interface: XNetListener
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. Normally, this function will do nothing.

Specified by:
message in interface XNetListener
Parameters:
l - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.

notifyTimeout

public void notifyTimeout(XNetMessage msg)
Description copied from interface: XNetListener
Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue.

Specified by:
notifyTimeout in interface XNetListener


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