Package jmri.jmrit.ctc
Class TurnoutLock
java.lang.Object
jmri.jmrit.ctc.TurnoutLock
This only works with Digitrax DS54's and DS64's configured to LOCALLY change the switch via either
a pushbutton or toggle switch. Specifically in JMRI / DS64 programmer, OpSw 21 SHOULD
be checked. DS54's should be similarly configured.
The other way:
One would NOT check OpSw21, and then one would have to write JMRI software (or a script)
to process the message from the DS54/DS64, and then send the appropriate turnout
"CLOSED/THROWN" command to the turnout to effect the change.
Advantage: No turnout movement when crew requests change unless allowed by Dispatcher.
Disadvantage: Software MUST be running in order to throw turnout "normally". In other
words cannot run the layout without the computer, and with all turnouts
controlled by the dispatcher set to "local control".
This modules way:
The purpose of this module is to "countermand" attempts by the field crews to throw
a switch that is under dispatcher control. This works ONLY for switches that have feedback.
Advantage: Computer NOT necessary to throw switch.
Disadvantage: Switch will "partially throw" until the feedback contact changes and sends
a message to the software, which then countermands it. If a train is on the
switch, it may be derailed.
NOTES:
If a route is cleared thru, you MUST be prevented from UNLOCKING a locked switch.
Failure to provide such an object will just allow unlocking while a route is cleared thru.
If dispatcherSensorLockToggle is None, then INSURE that you call "ExternalLockTurnout" at some
point to lock the turnout, since this starts up with the turnout unlocked!
See the documentation for the matrix regarding Command and Feedback normal/reversed.
-
Constructor Summary
ConstructorsConstructorDescriptionTurnoutLock(String userIdentifier, NBHSensor dispatcherSensorLockToggle, NBHTurnout actualTurnout, boolean actualTurnoutFeedbackDifferent, NBHSensor dispatcherSensorUnlockedIndicator, boolean noDispatcherControlOfSwitch, int ndcos_WhenLockedSwitchState, CodeButtonHandlerData.LOCK_IMPLEMENTATION _mLockImplementation, boolean turnoutLocksEnabledAtStartup, NBHTurnout additionalTurnout1, boolean additionalTurnout1FeebackReversed, NBHTurnout additionalTurnout2, boolean additionalTurnout2FeebackReversed, NBHTurnout additionalTurnout3, boolean additionalTurnout3FeebackReversed) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispatcherCommandedState(int commandedState) voidvoidbooleanvoidbooleanboolean
-
Constructor Details
-
TurnoutLock
public TurnoutLock(String userIdentifier, NBHSensor dispatcherSensorLockToggle, NBHTurnout actualTurnout, boolean actualTurnoutFeedbackDifferent, NBHSensor dispatcherSensorUnlockedIndicator, boolean noDispatcherControlOfSwitch, int ndcos_WhenLockedSwitchState, CodeButtonHandlerData.LOCK_IMPLEMENTATION _mLockImplementation, boolean turnoutLocksEnabledAtStartup, NBHTurnout additionalTurnout1, boolean additionalTurnout1FeebackReversed, NBHTurnout additionalTurnout2, boolean additionalTurnout2FeebackReversed, NBHTurnout additionalTurnout3, boolean additionalTurnout3FeebackReversed)
-
-
Method Details
-
removeAllListeners
-
getDispatcherSensorLockToggle
-
externalLockTurnout
-
externalUnlockTurnout
-
codeButtonPressed
-
dispatcherCommandedState
-
turnoutPresentlyLocked
-
getNewLockedState
-
tryingToChangeLockStatus
-