jmri.jmrix.loconet
Class LocoNetConsist

java.lang.Object
  extended by jmri.DccConsist
      extended by jmri.jmrix.loconet.LocoNetConsist
All Implemented Interfaces:
EventListener, Consist, SlotListener, ProgListener, ThrottleListener

public class LocoNetConsist
extends DccConsist
implements SlotListener, ThrottleListener


Field Summary
 
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
LocoNetConsist(DccLocoAddress address, LocoNetSystemConnectionMemo lm)
           
LocoNetConsist(int address, LocoNetSystemConnectionMemo lm)
           
 
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 notifyChangedSlot(LocoNetSlot s)
           
 void notifyFailedThrottleRequest(DccLocoAddress address, String reason)
          Get notification that an attempt to request a throttle has failed
 void notifyThrottleFound(DccThrottle t)
          Get notification that a throttle has been found as you requested.
 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
 

Constructor Detail

LocoNetConsist

public LocoNetConsist(int address,
                      LocoNetSystemConnectionMemo lm)

LocoNetConsist

public LocoNetConsist(DccLocoAddress address,
                      LocoNetSystemConnectionMemo lm)
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)

notifyChangedSlot

public void notifyChangedSlot(LocoNetSlot s)
Specified by:
notifyChangedSlot in interface SlotListener

notifyThrottleFound

public void notifyThrottleFound(DccThrottle t)
Description copied from interface: ThrottleListener
Get notification that a throttle has been found as you requested.

Specified by:
notifyThrottleFound in interface ThrottleListener
Parameters:
t - An instantiation of the DccThrottle with the address requested.

notifyFailedThrottleRequest

public void notifyFailedThrottleRequest(DccLocoAddress address,
                                        String reason)
Description copied from interface: ThrottleListener
Get notification that an attempt to request a throttle has failed

Specified by:
notifyFailedThrottleRequest in interface ThrottleListener
Parameters:
address - DccLocoAddress of the failed loco request.
reason - The reason why the throttle request failed.


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