Package jmri.jmrit.logixng
Interface LogixNG_Manager
-
- All Superinterfaces:
Manager<LogixNG>
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeProvider
- All Known Implementing Classes:
DefaultLogixNGManager
public interface LogixNG_Manager extends Manager<LogixNG>
Manager for LogixNG
-
-
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 Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
activateAllLogixNGs()
Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.void
activateAllLogixNGs(boolean runDelayed, boolean runOnSeparateThread)
Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.LogixNG
createLogixNG(java.lang.String userName)
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.LogixNG
createLogixNG(java.lang.String userName, boolean inline)
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.LogixNG
createLogixNG(java.lang.String systemName, java.lang.String userName)
Create a new LogixNG if the LogixNG does not exist.LogixNG
createLogixNG(java.lang.String systemName, java.lang.String userName, boolean inline)
Create a new LogixNG if the LogixNG does not exist.void
deActivateAllLogixNGs()
DeActivate all LogixNGs, stops LogixNG processing by disconnecting all inputs that are included the ConditionalNGs in this LogixNG.void
deleteLogixNG(LogixNG x)
Delete LogixNG by removing it from the manager.void
executeModule(Module module, java.lang.Object parameter)
Executes a LogixNG Module.void
executeModule(Module module, java.util.Map<java.lang.String,java.lang.Object> parameters)
Executes a LogixNG Module.java.lang.String
getAutoSystemName()
Create a new system name for a LogixNG.LogixNG
getBySystemName(java.lang.String name)
Locate an existing instance based on a system name.LogixNG
getByUserName(java.lang.String name)
Locate an existing instance based on a user name.Clipboard
getClipboard()
Get the clipboardLogixNG
getLogixNG(java.lang.String name)
Locate via user name, then system name if needed.Manager<? extends MaleSocket>
getManager(java.lang.String className)
Get manager by class nameboolean
isActive()
Is LogixNGs active?boolean
isStartLogixNGsOnLoad()
Should the LogixNGs not be started when the configuration file is loaded?default void
printTree(java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.default void
printTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.void
printTree(Base.PrintTreeSettings settings, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.void
printTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.void
registerManager(Manager<? extends MaleSocket> manager)
Register a manager for later retrieval by getManager()void
registerSetupTask(java.lang.Runnable task)
Register a task to be run when setup LogixNGsvoid
setLoadDisabled(boolean value)
Should the LogixNGs be disabled when the configuration file is loaded?void
setupAllLogixNGs()
Setup all LogixNGs.void
startLogixNGsOnLoad(boolean value)
Should the LogixNGs be started when the configuration file is loaded?static Manager.NameValidity
validSystemNameFormat(java.lang.String subSystemNamePrefix, java.lang.String systemName)
Test if parameter is a properly formatted system name.-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getBeanTypeHandled, 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
-
createLogixNG
LogixNG createLogixNG(java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Create a new LogixNG if the LogixNG does not exist.- Parameters:
systemName
- the system nameuserName
- the user name- Returns:
- a new LogixNG or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
createLogixNG
LogixNG createLogixNG(java.lang.String systemName, java.lang.String userName, boolean inline) throws java.lang.IllegalArgumentException
Create a new LogixNG if the LogixNG does not exist.- Parameters:
systemName
- the system nameuserName
- the user nameinline
- true if this LogixNG is an inline LogixNG- Returns:
- a new LogixNG or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
createLogixNG
LogixNG createLogixNG(java.lang.String userName) throws java.lang.IllegalArgumentException
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.- Parameters:
userName
- the user name- Returns:
- a new LogixNG or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
createLogixNG
LogixNG createLogixNG(java.lang.String userName, boolean inline) throws java.lang.IllegalArgumentException
For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.- Parameters:
userName
- the user nameinline
- true if this LogixNG is an inline LogixNG- Returns:
- a new LogixNG or null if unable to create
- Throws:
java.lang.IllegalArgumentException
-
getLogixNG
LogixNG getLogixNG(java.lang.String name)
Locate via user name, then system name if needed. Does not create a new one if nothing found- Parameters:
name
- User name or system name to match- Returns:
- null if no match found
-
getByUserName
LogixNG getByUserName(java.lang.String name)
Locate an existing instance based on a user name.- Specified by:
getByUserName
in interfaceManager<LogixNG>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getBySystemName
LogixNG getBySystemName(java.lang.String name)
Locate an existing instance based on a system name.- Specified by:
getBySystemName
in interfaceManager<LogixNG>
- Parameters:
name
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getAutoSystemName
java.lang.String getAutoSystemName()
Create a new system name for a LogixNG.- Returns:
- a new system name
-
setLoadDisabled
void setLoadDisabled(boolean value)
Should the LogixNGs be disabled when the configuration file is loaded?- Parameters:
value
- true if they should be disabled, false otherwise.
-
startLogixNGsOnLoad
void startLogixNGsOnLoad(boolean value)
Should the LogixNGs be started when the configuration file is loaded?- Parameters:
value
- true if they should be started, false otherwise.
-
isStartLogixNGsOnLoad
boolean isStartLogixNGsOnLoad()
Should the LogixNGs not be started when the configuration file is loaded?- Returns:
- true if they should be started, false otherwise.
-
setupAllLogixNGs
void setupAllLogixNGs()
Setup all LogixNGs. This method is called after a configuration file is loaded.
-
activateAllLogixNGs
void activateAllLogixNGs()
Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.A LogixNG must be activated before it will calculate any of its ConditionalNGs.
-
activateAllLogixNGs
void activateAllLogixNGs(boolean runDelayed, boolean runOnSeparateThread)
Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.A LogixNG must be activated before it will calculate any of its ConditionalNGs.
- Parameters:
runDelayed
- true if execute() should run on LogixNG thread delayed, false otherwise.runOnSeparateThread
- true if the activation should run on a separate thread, false otherwise
-
deActivateAllLogixNGs
void deActivateAllLogixNGs()
DeActivate all LogixNGs, stops LogixNG processing by disconnecting all inputs that are included the ConditionalNGs in this LogixNG.A LogixNG must be activated before it will calculate any of its ConditionalNGs.
-
isActive
boolean isActive()
Is LogixNGs active?- Returns:
- true if LogixNGs are active, false otherwise
-
deleteLogixNG
void deleteLogixNG(LogixNG x)
Delete LogixNG by removing it from the manager. The LogixNG must first be deactivated so it stops processing.- Parameters:
x
- the LogixNG to delete
-
printTree
default void printTree(java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
writer
- the stream to print the tree toindent
- the indentation of each levellineNumber
- the line number
-
printTree
void printTree(Base.PrintTreeSettings settings, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
settings
- settings for what to printwriter
- the stream to print the tree toindent
- the indentation of each levellineNumber
- the line number
-
printTree
default void printTree(java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
locale
- The locale to be usedwriter
- the stream to print the tree toindent
- the indentation of each levellineNumber
- the line number
-
printTree
void printTree(Base.PrintTreeSettings settings, java.util.Locale locale, java.io.PrintWriter writer, java.lang.String indent, MutableInt lineNumber)
Print the tree to a stream.- Parameters:
settings
- settings for what to printlocale
- The locale to be usedwriter
- the stream to print the tree toindent
- the indentation of each levellineNumber
- the line number
-
validSystemNameFormat
static Manager.NameValidity validSystemNameFormat(java.lang.String subSystemNamePrefix, java.lang.String systemName)
Test if parameter is a properly formatted system name.This method should only be used by the managers of the LogixNG system.
- Parameters:
subSystemNamePrefix
- the sub system prefixsystemName
- the system name- Returns:
- enum indicating current validity, which might be just as a prefix
-
getClipboard
Clipboard getClipboard()
Get the clipboard- Returns:
- the clipboard
-
registerManager
void registerManager(Manager<? extends MaleSocket> manager)
Register a manager for later retrieval by getManager()- Parameters:
manager
- the manager
-
getManager
Manager<? extends MaleSocket> getManager(java.lang.String className)
Get manager by class name- Parameters:
className
- the class name of the manager- Returns:
- the manager
-
registerSetupTask
void registerSetupTask(java.lang.Runnable task)
Register a task to be run when setup LogixNGs- Parameters:
task
- the task
-
executeModule
void executeModule(Module module, java.lang.Object parameter) throws java.lang.IllegalArgumentException
Executes a LogixNG Module. Note that the module must be a Digital Action Module.- Parameters:
module
- The module to be executedparameter
- The parameter. The module must have exactly one parameter.- Throws:
java.lang.IllegalArgumentException
- If module is null or if module is not a DigitalActionModule.
-
executeModule
void executeModule(Module module, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.lang.IllegalArgumentException
Executes a LogixNG Module. Note that the module must be a Digital Action Module.- Parameters:
module
- The module to be executedparameters
- The parameters- Throws:
java.lang.IllegalArgumentException
- If module or parameters is null or if module is not a DigitalActionModule.
-
-