Package jmri
Interface SignalMastLogicManager
-
- All Superinterfaces:
Manager<SignalMastLogic>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultSignalMastLogicManager
public interface SignalMastLogicManager extends Manager<SignalMastLogic>
-
-
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
-
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, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
automaticallyDiscoverSignallingPairs()
Discover all possible valid source + destination signal mast pairs on all Layout Editor Panels and create the corresponding SMLs.void
disableLayoutEditorUse(SignalMast mast)
Disable the use of info from the Layout Editor Panels to configure a Signal Mast Logic for a specific Signal Mast.void
discoverSignallingDest(SignalMast source, LayoutEditor layout)
Discover valid destination signal masts for a given source Signal Mast on a given Layout Editor Panel.void
dispose()
Remove references to and from this object, so that it can eventually be garbage-collected.java.util.List<SignalMastLogic>
getLogicsByDestination(SignalMast destination)
Gather a list of all the Signal Mast Logics, by destination Signal Mast.int
getSignalLogicDelay()
SignalMastLogic
getSignalMastLogic(SignalMast source)
Return the Signal Mast Logic for a specific Source Signal Mast.java.util.List<SignalMastLogic>
getSignalMastLogicList()
Return a list of all existing Signal Mast Logicsvoid
initialise()
Initialise all the Signal Mast Logics.boolean
isSignalMastUsed(SignalMast mast)
Check if a Signal Mast is in use as either a Source or Destination mast in any Signal Mast LogicSignalMastLogic
newSignalMastLogic(SignalMast source)
Create a new Signal Mast Logic for a source Signal Mast.void
removeSignalMast(SignalMast mast)
Completely remove a Signal Mast from all the SMLs that use it.void
removeSignalMastLogic(SignalMastLogic sml)
Completely remove a specific Signal Mast Logic by name.void
removeSignalMastLogic(SignalMastLogic sml, SignalMast dest)
Remove a destination Signal Mast and its settings from a Signal Mast Logic.void
removeSignalMastsDirectionSensors()
Iterate over the signal masts setting up direction Section sensors.void
replaceSignalMast(SignalMast oldMast, SignalMast newMast)
Replace all instances of an old SignalMast (either source or destination) with the new signal mast instance.void
setSignalLogicDelay(int l)
int
setupSignalMastsDirectionSensors()
Iterate over the signal masts setting up direction Section sensors.void
swapSignalMasts(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, validSystemNameFormat
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilenced
-
Methods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Method Detail
-
replaceSignalMast
void replaceSignalMast(SignalMast oldMast, SignalMast newMast)
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
void automaticallyDiscoverSignallingPairs() throws JmriException
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:
dispose
in interfaceManager<SignalMastLogic>
-
getLogicsByDestination
@Nonnull java.util.List<SignalMastLogic> getLogicsByDestination(@Nonnull SignalMast destination)
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
SignalMastLogic getSignalMastLogic(@Nonnull SignalMast source)
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
@Nonnull java.util.List<SignalMastLogic> 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(SignalMast source) throws java.lang.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:
java.lang.IllegalArgumentException
-
removeSignalMastLogic
void removeSignalMastLogic(@Nonnull SignalMastLogic sml, @Nonnull SignalMast dest)
Remove a destination Signal Mast and its settings from a Signal Mast Logic.- Parameters:
sml
- The Signal Mast Logicdest
- The destination mast
-
removeSignalMastLogic
void removeSignalMastLogic(@Nonnull SignalMastLogic sml)
Completely remove a specific Signal Mast Logic by name.- Parameters:
sml
- The Signal Mast Logic to be removed
-
removeSignalMast
void removeSignalMast(@Nonnull SignalMast mast)
Completely remove a Signal Mast from all the SMLs that use it.- Parameters:
mast
- The Signal Mast to be removed
-
disableLayoutEditorUse
void disableLayoutEditorUse(@Nonnull SignalMast mast)
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
void swapSignalMasts(@Nonnull SignalMast mastA, @Nonnull SignalMast mastB)
Replace the complete Signal Mast Logic configurations between two Source Signal Masts.- Parameters:
mastA
- Signal Mast AmastB
- Signal Mast B
-
isSignalMastUsed
boolean isSignalMastUsed(@Nonnull SignalMast mast)
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
void setSignalLogicDelay(int l)
- Parameters:
l
- characteristic delay time in msec, used to control roughly when signal system computations are done. (Some are half this, some twice)
-
setupSignalMastsDirectionSensors
int setupSignalMastsDirectionSensors()
Iterate over the signal masts setting up direction Section sensors.- Returns:
- error count
-
removeSignalMastsDirectionSensors
void removeSignalMastsDirectionSensors()
Iterate over the signal masts setting up direction Section sensors.
-
-