Package jmri.jmrit.logixng
Interface LogixNG_Manager
- All Superinterfaces:
Manager<LogixNG>,PropertyChangeProvider,SilenceablePropertyChangeProvider,VetoableChangeProvider
- All Known Implementing Classes:
DefaultLogixNGManager
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
FieldsModifier and TypeFieldDescriptionstatic final StringThis is the name of the error handling module.static final StringThis property is fired when thesetupAllLogixNGs()method is completed.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 TypeMethodDescriptionvoidActivate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.voidactivateAllLogixNGs(boolean runDelayed, boolean runOnSeparateThread) Activate all LogixNGs, starts LogixNG processing by connecting all inputs that are included the ConditionalNGs in this LogixNG.createLogixNG(String userName) For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.createLogixNG(String userName, boolean inline) For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.createLogixNG(String systemName, String userName) Create a new LogixNG if the LogixNG does not exist.createLogixNG(String systemName, String userName, boolean inline) Create a new LogixNG if the LogixNG does not exist.voidDeActivate all LogixNGs, stops LogixNG processing by disconnecting all inputs that are included the ConditionalNGs in this LogixNG.voidDelete LogixNG by removing it from the manager.voidexecuteModule(Module module, Object parameter) Executes a LogixNG Module.voidexecuteModule(Module module, Map<String, Object> parameters) Executes a LogixNG Module.Create a new system name for a LogixNG.getBySystemName(String name) Locate an existing instance based on a system name.getByUserName(String name) Locate an existing instance based on a user name.Get the clipboardGet the female socket of the error handling module.getLogixNG(String name) Locate via user name, then system name if needed.Manager<? extends MaleSocket>getManager(String className) Get manager by class namebooleanisActive()Is LogixNGs active?booleanIs the error handling module enabled?booleanShould the LogixNGs not be started when the configuration file is loaded?default voidprintTree(PrintWriter writer, String indent, MutableInt lineNumber) Print the tree to a stream.default voidprintTree(Locale locale, PrintWriter writer, String indent, MutableInt lineNumber) Print the tree to a stream.voidprintTree(Base.PrintTreeSettings settings, PrintWriter writer, String indent, MutableInt lineNumber) Print the tree to a stream.voidprintTree(Base.PrintTreeSettings settings, Locale locale, PrintWriter writer, String indent, MutableInt lineNumber) Print the tree to a stream.voidregisterManager(Manager<? extends MaleSocket> manager) Register a manager for later retrieval by getManager()voidregisterSetupTask(Runnable task) Register a task to be run when setup LogixNGsvoidsetLoadDisabled(boolean value) Should the LogixNGs be disabled when the configuration file is loaded?voidSetup all LogixNGs.voidstartLogixNGsOnLoad(boolean value) Should the LogixNGs be started when the configuration file is loaded?static Manager.NameValidityvalidSystemNameFormat(String subSystemNamePrefix, 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, 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_SETUP
This property is fired when thesetupAllLogixNGs()method is completed.- See Also:
-
ERROR_HANDLING_MODULE_NAME
This is the name of the error handling module.- See Also:
-
-
Method Details
-
createLogixNG
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:
IllegalArgumentException- when needed
-
createLogixNG
LogixNG createLogixNG(String systemName, String userName, boolean inline) throws 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:
IllegalArgumentException- when needed
-
createLogixNG
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:
IllegalArgumentException- when needed
-
createLogixNG
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:
IllegalArgumentException- when needed
-
getLogixNG
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
Locate an existing instance based on a user name.- Specified by:
getByUserNamein interfaceManager<LogixNG>- Parameters:
name- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getBySystemName
Locate an existing instance based on a system name.- Specified by:
getBySystemNamein interfaceManager<LogixNG>- Parameters:
name- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getAutoSystemName
Create a new system name for a LogixNG.- Returns:
- a new system name
-
setLoadDisabled
Should the LogixNGs be disabled when the configuration file is loaded?- Parameters:
value- true if they should be disabled, false otherwise.
-
startLogixNGsOnLoad
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
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
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
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, PrintWriter writer, 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
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, Locale locale, PrintWriter writer, 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
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
Get the clipboard- Returns:
- the clipboard
-
registerManager
Register a manager for later retrieval by getManager()- Parameters:
manager- the manager
-
getManager
Get manager by class name- Parameters:
className- the class name of the manager- Returns:
- the manager
-
registerSetupTask
Register a task to be run when setup LogixNGs- Parameters:
task- the task
-
executeModule
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:
IllegalArgumentException- If module is null or if module is not a DigitalActionModule.
-
executeModule
Executes a LogixNG Module. Note that the module must be a Digital Action Module.- Parameters:
module- The module to be executedparameters- The parameters- Throws:
IllegalArgumentException- If module or parameters is null or if module is not a DigitalActionModule.
-
getErrorHandlingModuleSocket
Get the female socket of the error handling module.- Returns:
- the socket.
-
isErrorHandlingModuleEnabled
boolean isErrorHandlingModuleEnabled()Is the error handling module enabled? It's enabled if it exists and the root socket is connected.- Returns:
- true if it's in use, false otherwise.
-