Package jmri.jmrit.ctc
Class CodeButtonHandler
java.lang.Object
jmri.jmrit.ctc.CodeButtonHandler
This is the "master" class that handles everything when a code button is
pressed. As such, it has a LOT of external data passed into it's constructor,
and operates and modifies all objects it contains on a dynamic basis both
when the button is pressed, and when external events happen that affect this
object.
Notes:
Changing both signal direction to non signals normal and switch direction at the same time "is allowed". Lock/Unlock is the LOWEST priority! Call on is the HIGHEST priority.
As of V1.04 of the CTC system, preconditioning (a.k.a. stacking) is supported. It is enabled by setting the internal sensor (automatically created) "IS:PRECONDITIONING_ENABLED" to active. Any other value inactivates this feature. For example, the user can create a toggle switch to activate / inactivate it.
-
Constructor Summary
ConstructorsConstructorDescriptionCodeButtonHandler(boolean turnoutLockingOnlyEnabled, LockedRoutesManager lockedRoutesManager, String userIdentifier, int uniqueID, NBHSensor codeButtonInternalSensor, int codeButtonDelayInMilliseconds, NBHSensor osSectionOccupiedExternalSensor, NBHSensor osSectionOccupiedExternalSensor2, SignalDirectionIndicatorsInterface signalDirectionIndicators, SignalDirectionLever signalDirectionLever, SwitchDirectionIndicators switchDirectionIndicators, SwitchDirectionLever switchDirectionLever, Fleeting fleeting, CallOn callOn, TrafficLocking trafficLocking, TurnoutLock turnoutLock, IndicationLockingSignals indicationLockingSignals) -
Method Summary
Modifier and TypeMethodDescriptionvoidSignalDirectionIndicators calls us here when time locking is done.voidvoidThis routine SHOULD ONLY be called by CTCMain when the CTC system is shutdown in order to clean up all resources prior to a restart.booleanuniqueIDMatches(int uniqueID)
-
Constructor Details
-
CodeButtonHandler
public CodeButtonHandler(boolean turnoutLockingOnlyEnabled, LockedRoutesManager lockedRoutesManager, String userIdentifier, int uniqueID, NBHSensor codeButtonInternalSensor, int codeButtonDelayInMilliseconds, NBHSensor osSectionOccupiedExternalSensor, NBHSensor osSectionOccupiedExternalSensor2, SignalDirectionIndicatorsInterface signalDirectionIndicators, SignalDirectionLever signalDirectionLever, SwitchDirectionIndicators switchDirectionIndicators, SwitchDirectionLever switchDirectionLever, Fleeting fleeting, CallOn callOn, TrafficLocking trafficLocking, TurnoutLock turnoutLock, IndicationLockingSignals indicationLockingSignals)
-
-
Method Details
-
removeAllListeners
This routine SHOULD ONLY be called by CTCMain when the CTC system is shutdown in order to clean up all resources prior to a restart. Nothing else should call this. -
cancelLockedRoute
SignalDirectionIndicators calls us here when time locking is done. -
uniqueIDMatches
-
getOSSectionOccupiedExternalSensor
-
externalLockTurnout
-