Package jmri.jmrit.withrottle
Class ConsistFunctionController
- java.lang.Object
-
- jmri.jmrit.withrottle.ConsistFunctionController
-
- All Implemented Interfaces:
java.util.EventListener,ThrottleListener
public class ConsistFunctionController extends java.lang.Object implements ThrottleListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType
-
-
Constructor Summary
Constructors Constructor Description ConsistFunctionController(ThrottleController tc)ConsistFunctionController(ThrottleController tc, RosterEntry re)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()DccThrottlegetThrottle()voidnotifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question)No steal or share decisions made locallyvoidnotifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)Get notification that an attempt to request a throttle has failed.voidnotifyThrottleFound(DccThrottle t)Get notification that a throttle has been found as requested.(package private) booleanrequestThrottle(DccLocoAddress loco)
-
-
-
Constructor Detail
-
ConsistFunctionController
public ConsistFunctionController(ThrottleController tc)
-
ConsistFunctionController
public ConsistFunctionController(ThrottleController tc, RosterEntry re)
-
-
Method Detail
-
notifyThrottleFound
public void notifyThrottleFound(DccThrottle t)
Description copied from interface:ThrottleListenerGet notification that a throttle has been found as requested.- Specified by:
notifyThrottleFoundin interfaceThrottleListener- Parameters:
t- the throttle with the requested address
-
notifyFailedThrottleRequest
public void notifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)
Description copied from interface:ThrottleListenerGet notification that an attempt to request a throttle has failed.- Specified by:
notifyFailedThrottleRequestin interfaceThrottleListener- Parameters:
address- address of the failed requestreason- failure cause
-
notifyDecisionRequired
public void notifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question)
No steal or share decisions made locally- Specified by:
notifyDecisionRequiredin interfaceThrottleListener- Parameters:
address- The LocoAddress that needs the decision.question- The question being asked, steal / cancel, share / cancel, steal / share / cancel
-
dispose
public void dispose()
-
getThrottle
public DccThrottle getThrottle()
-
requestThrottle
boolean requestThrottle(DccLocoAddress loco)
-
-