Package jmri.jmrix.rps
Class RpsBlock
java.lang.Object
jmri.jmrix.rps.RpsBlock
- All Implemented Interfaces:
PropertyChangeListener,EventListener,ThrottleListener
Create a Block that can control a locomotive within a specific Block based on
an RpsSensor. It sets speed based on aspect of a specific signal.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType -
Field Summary
FieldsModifier and TypeFieldDescription(package private) float(package private) RpsSensor(package private) SignalHead(package private) float(package private) static Hashtable<Integer,DccThrottle> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidacquireThrottle(Integer num) (package private) void(package private) voidvoiddispose()(package private) voidhandleParameterChange(String property, Object oldState, Object newState, Object source) (package private) voidvoidnotifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question) No steal or share decisions made locallyvoidnotifyFailedThrottleRequest(LocoAddress address, String reason) Get notification that an attempt to request a throttle has failed.voidGet notification that a throttle has been found as requested.void(package private) void(package private) void
-
Field Details
-
Constructor Details
-
RpsBlock
-
RpsBlock
-
-
Method Details
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
handleParameterChange
-
arriving
-
leaving
-
appearance
void appearance() -
acquireThrottle
-
notifyThrottleFound
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
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
No steal or share decisions made locallyGet notification that a throttle request is in use by another device, and a "steal", "share", or "steal/share" decision may be required.
- Specified by:
notifyDecisionRequiredin interfaceThrottleListener- Parameters:
address- The LocoAddress that needs the decision.question- The question being asked, steal / cancel, share / cancel, steal / share / cancel
-
updateCurrentThrottles
void updateCurrentThrottles() -
updateOneThrottle
-
dispose
-