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 void
dispose()
DccThrottle
getThrottle()
void
notifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question)
No steal or share decisions made locallyvoid
notifyFailedThrottleRequest(LocoAddress address, java.lang.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 requested.(package private) boolean
requestThrottle(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:ThrottleListener
Get notification that a throttle has been found as requested.- Specified by:
notifyThrottleFound
in interfaceThrottleListener
- Parameters:
t
- the throttle with the requested address
-
notifyFailedThrottleRequest
public void notifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)
Description copied from interface:ThrottleListener
Get notification that an attempt to request a throttle has failed.- Specified by:
notifyFailedThrottleRequest
in 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:
notifyDecisionRequired
in 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)
-
-