jmri.jmrix.loconet
Class LnPr2ThrottleManager

java.lang.Object
  extended by jmri.jmrix.AbstractThrottleManager
      extended by jmri.jmrix.loconet.LnPr2ThrottleManager
All Implemented Interfaces:
ThrottleManager

public class LnPr2ThrottleManager
extends AbstractThrottleManager

LocoNet implementation of a ThrottleManager for the PR2

Does direct "push" writes to the extended slot in the PR2.

The PR2 only allows a single locomotive address to be active, because it implements a single-slot command station.

Author:
Bob Jacobsen Copyright (C) 2001, 2006
See Also:
AbstractThrottleManager

Constructor Summary
LnPr2ThrottleManager()
          Constructor, works via superclass.
 
Method Summary
 boolean addressTypeUnique()
          Are there any ambiguous addresses (short vs long) on this system?
 boolean canBeLongAddress(int address)
          Address 128 and above is a long address
 boolean canBeShortAddress(int address)
          Address 127 and below is a short address
 DccLocoAddress getActiveAddress()
          Make the active address available to the power manager, which needs it to turn on and off "neutral mode" in the locomotive
 boolean hasDispatchFunction()
          PR2 does not have a Dispatch function
 void requestThrottleSetup(LocoAddress address)
          Get a new Throttle object.
protected  boolean singleUse()
          PR2 allows only one throttle
 
Methods inherited from class jmri.jmrix.AbstractThrottleManager
cancelThrottleRequest, cancelThrottleRequest, notifyThrottleKnown, requestThrottle, requestThrottle, supportedSpeedModes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LnPr2ThrottleManager

public LnPr2ThrottleManager()
Constructor, works via superclass.

Method Detail

singleUse

protected boolean singleUse()
PR2 allows only one throttle

Overrides:
singleUse in class AbstractThrottleManager

requestThrottleSetup

public void requestThrottleSetup(LocoAddress address)
Get a new Throttle object. This immediately invokes the callback with the a new throttle object.

Specified by:
requestThrottleSetup in class AbstractThrottleManager

hasDispatchFunction

public boolean hasDispatchFunction()
PR2 does not have a Dispatch function

Specified by:
hasDispatchFunction in interface ThrottleManager
Overrides:
hasDispatchFunction in class AbstractThrottleManager

canBeLongAddress

public boolean canBeLongAddress(int address)
Address 128 and above is a long address


canBeShortAddress

public boolean canBeShortAddress(int address)
Address 127 and below is a short address


addressTypeUnique

public boolean addressTypeUnique()
Are there any ambiguous addresses (short vs long) on this system?


getActiveAddress

public DccLocoAddress getActiveAddress()
Make the active address available to the power manager, which needs it to turn on and off "neutral mode" in the locomotive



Copyright © 1997 - 2008 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: SourceForge_Logo