jmri.jmrit.withrottle
Class MultiThrottleController

java.lang.Object
  extended by jmri.jmrit.withrottle.ThrottleController
      extended by jmri.jmrit.withrottle.MultiThrottleController
All Implemented Interfaces:
PropertyChangeListener, EventListener, ThrottleListener

public class MultiThrottleController
extends ThrottleController

Author:
Brett Hoffman Copyright (C) 2011

Field Summary
 
Fields inherited from class jmri.jmrit.withrottle.ThrottleController
controllerListeners, listeners
 
Constructor Summary
MultiThrottleController(char id, String key, ThrottleControllerListener tcl, ControllerInterface ci)
           
 
Method Summary
 String buildPacketWithChar(char chr)
          Builds a header to send to the wi-fi device for use in a message.
 void propertyChange(PropertyChangeEvent event)
           
 void sendAddress()
          + indicates the address was acquired, - indicates released
 void sendAllFunctionStates(DccThrottle t)
          This replaces the previous method of sending a string of function states, and now sends them individually, the same as a property change would.
protected  void sendAllMomentaryStates(DccThrottle t)
           
protected  void sendCurrentDirection(DccThrottle t)
           
protected  void sendCurrentSpeed(DccThrottle t)
           
 void sendFunctionLabels(RosterEntry re)
           
protected  void sendSpeedStepMode(DccThrottle t)
           
 
Methods inherited from class jmri.jmrit.withrottle.ThrottleController
addControllerListener, addressDispatch, addressRelease, addThrottleControllerListener, buildFStatesHeader, eStop, findRosterEntry, forceFunction, getCurrentAddress, getCurrentAddressString, getFunctionThrottle, getThrottle, handleFunction, handleMomentary, handleRequest, handleSpeedStepMode, idle, notifyFailedThrottleRequest, notifyThrottleFound, removeControllerListener, removeThrottleControllerListener, requestEntryFromID, setAddress, setDirection, setFunctionThrottle, setLocoForConsistFunctions, setRosterLocoForConsistFunctions, setSpeed, setWhichThrottle, shutdownThrottle, sort, syncThrottleFunctions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiThrottleController

public MultiThrottleController(char id,
                               String key,
                               ThrottleControllerListener tcl,
                               ControllerInterface ci)
Method Detail

buildPacketWithChar

public String buildPacketWithChar(char chr)
Builds a header to send to the wi-fi device for use in a message. Includes a separator - <;>

Parameters:
chr - the character indicating what action is performed
Returns:
a pre-assembled header for this DccThrottle

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class ThrottleController

sendFunctionLabels

public void sendFunctionLabels(RosterEntry re)
Overrides:
sendFunctionLabels in class ThrottleController

sendAllFunctionStates

public void sendAllFunctionStates(DccThrottle t)
This replaces the previous method of sending a string of function states, and now sends them individually, the same as a property change would.

Overrides:
sendAllFunctionStates in class ThrottleController
Parameters:
t - the throttle to send the staes of

sendCurrentSpeed

protected void sendCurrentSpeed(DccThrottle t)
Overrides:
sendCurrentSpeed in class ThrottleController

sendCurrentDirection

protected void sendCurrentDirection(DccThrottle t)
Overrides:
sendCurrentDirection in class ThrottleController

sendSpeedStepMode

protected void sendSpeedStepMode(DccThrottle t)
Overrides:
sendSpeedStepMode in class ThrottleController

sendAllMomentaryStates

protected void sendAllMomentaryStates(DccThrottle t)
Overrides:
sendAllMomentaryStates in class ThrottleController

sendAddress

public void sendAddress()
+ indicates the address was acquired, - indicates released

Overrides:
sendAddress in class ThrottleController


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