Package jmri
Interface SignalMastLogicManager
- All Superinterfaces:
Manager<SignalMastLogic>,PropertyChangeProvider,SilenceablePropertyChangeProvider,VetoableChangeProvider
- All Known Implementing Classes:
DefaultSignalMastLogicManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringString constant for property change auto generate complete.static final StringString constant for property change auto generate update.static final StringString constant for Property Change auto signal mast generate complete.static final StringString constant for Property Change auto Signal mast generate start.Fields inherited from interface jmri.Manager
ANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_GLOBAL_VARIABLES, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, PROPERTY_BEANS, PROPERTY_CAN_DELETE, PROPERTY_DISPLAY_LIST_NAME, PROPERTY_DO_DELETE, PROPERTY_DO_NOT_DELETE, PROPERTY_LENGTH, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS -
Method Summary
Modifier and TypeMethodDescriptionvoidDiscover all possible valid source + destination signal mast pairs on all Layout Editor Panels and create the corresponding SMLs.voidDisable the use of info from the Layout Editor Panels to configure a Signal Mast Logic for a specific Signal Mast.voiddiscoverSignallingDest(SignalMast source, LayoutEditor layout) Discover valid destination signal masts for a given source Signal Mast on a given Layout Editor Panel.voiddispose()Remove references to and from this object, so that it can eventually be garbage-collected.getLogicsByDestination(SignalMast destination) Gather a list of all the Signal Mast Logics, by destination Signal Mast.intgetSignalMastLogic(SignalMast source) Return the Signal Mast Logic for a specific Source Signal Mast.Return a list of all existing Signal Mast LogicsvoidInitialise all the Signal Mast Logics.booleanisSignalMastUsed(SignalMast mast) Check if a Signal Mast is in use as either a Source or Destination mast in any Signal Mast LogicnewSignalMastLogic(SignalMast source) Create a new Signal Mast Logic for a source Signal Mast.voidremoveSignalMast(SignalMast mast) Completely remove a Signal Mast from all the SMLs that use it.voidCompletely remove a specific Signal Mast Logic by name.voidremoveSignalMastLogic(SignalMastLogic sml, SignalMast dest) Remove a destination Signal Mast and its settings from a Signal Mast Logic.voidIterate over the signal masts setting up direction Section sensors.voidreplaceSignalMast(SignalMast oldMast, SignalMast newMast) Replace all instances of an old SignalMast (either source or destination) with the new signal mast instance.voidsetSignalLogicDelay(int l) intIterate over the signal masts setting up direction Section sensors.voidswapSignalMasts(SignalMast mastA, SignalMast mastB) Replace the complete Signal Mast Logic configurations between two Source Signal Masts.Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, getBeanTypeHandled, getBeanTypeHandled, getBySystemName, getByUserName, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanClass, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, getXMLOrder, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, typeLetter, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormatMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilencedMethods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
PROPERTY_AUTO_SIGNALMAST_GENERATE_START
String constant for Property Change auto Signal mast generate start.- See Also:
-
PROPERTY_AUTO_SIGNALMAST_GENERATE_COMPLETE
String constant for Property Change auto signal mast generate complete.- See Also:
-
PROPERTY_AUTO_GENERATE_UPDATE
String constant for property change auto generate update.- See Also:
-
PROPERTY_AUTO_GENERATE_COMPLETE
String constant for property change auto generate complete.- See Also:
-
-
Method Details
-
replaceSignalMast
Replace all instances of an old SignalMast (either source or destination) with the new signal mast instance. This is for use with such tools as the Layout Editor where a signal mast at a certain location can be replaced with another, while the remainder of the configuration stays the same.- Parameters:
oldMast- Current Signal MastnewMast- Replacement (new) Signal Mast
-
automaticallyDiscoverSignallingPairs
Discover all possible valid source + destination signal mast pairs on all Layout Editor Panels and create the corresponding SMLs.- Throws:
JmriException- if there is an error discovering signaling pairs
-
discoverSignallingDest
void discoverSignallingDest(@Nonnull SignalMast source, @Nonnull LayoutEditor layout) throws JmriException Discover valid destination signal masts for a given source Signal Mast on a given Layout Editor Panel.- Parameters:
source- Source Signal Mastlayout- Layout Editor panel to check- Throws:
JmriException- if there is an error discovering signaling destinations
-
dispose
void dispose()Remove references to and from this object, so that it can eventually be garbage-collected.- Specified by:
disposein interfaceManager<SignalMastLogic>
-
getLogicsByDestination
Gather a list of all the Signal Mast Logics, by destination Signal Mast.- Parameters:
destination- The destination Signal Mast- Returns:
- a list of logics for destination or an empty list if none
-
getSignalMastLogic
Return the Signal Mast Logic for a specific Source Signal Mast.- Parameters:
source- The Source Signal Mast- Returns:
- The Signal Mast Logic for that mast
-
getSignalMastLogicList
Return a list of all existing Signal Mast Logics- Returns:
- An List of all Signal Mast Logics
-
initialise
void initialise()Initialise all the Signal Mast Logics. Primarily used after loading a configuration. -
newSignalMastLogic
@Nonnull SignalMastLogic newSignalMastLogic(@Nonnull SignalMast source) throws IllegalArgumentException Create a new Signal Mast Logic for a source Signal Mast.- Parameters:
source- The source Signal Mast- Returns:
- source The new SML instance
- Throws:
IllegalArgumentException- when needed
-
removeSignalMastLogic
Remove a destination Signal Mast and its settings from a Signal Mast Logic.- Parameters:
sml- The Signal Mast Logicdest- The destination mast
-
removeSignalMastLogic
Completely remove a specific Signal Mast Logic by name.- Parameters:
sml- The Signal Mast Logic to be removed
-
removeSignalMast
Completely remove a Signal Mast from all the SMLs that use it.- Parameters:
mast- The Signal Mast to be removed
-
disableLayoutEditorUse
Disable the use of info from the Layout Editor Panels to configure a Signal Mast Logic for a specific Signal Mast.- Parameters:
mast- The Signal Mast for which LE info is to be disabled
-
swapSignalMasts
Replace the complete Signal Mast Logic configurations between two Source Signal Masts.- Parameters:
mastA- Signal Mast AmastB- Signal Mast B
-
isSignalMastUsed
Check if a Signal Mast is in use as either a Source or Destination mast in any Signal Mast Logic- Parameters:
mast- the signal mast to check- Returns:
- true if mast is used by at least one Signal Mast Logic
-
getSignalLogicDelay
int getSignalLogicDelay()- Returns:
- characteristic delay time in msec, used to control roughly when signal system computations are done. (Some are half this, some twice)
-
setSignalLogicDelay
- Parameters:
l- characteristic delay time in msec, used to control roughly when signal system computations are done. (Some are half this, some twice)
-
setupSignalMastsDirectionSensors
Iterate over the signal masts setting up direction Section sensors.- Returns:
- error count
-
removeSignalMastsDirectionSensors
Iterate over the signal masts setting up direction Section sensors.
-