JMRI: LogixNG Documentation
Author: Daniel Bergqvist
Keywords: logixng model railroad JMRI LogixNG PanelPro

# LogixNG - Package structure

## The package structure of LogixNG

A major design principle for LogixNG is modularity. In order to achieve that, LogixNG has the following structure.

### jmri.jmrit.logixng.<type>

<type> can be "analog", "digital", "generic" or "string".

The package jmri.jmrit.logixng.analog has everything that is related to analog actions and analog expressions.

The package jmri.jmrit.logixng.digital has everything that is related to digital actions and digital expressions.

The package jmri.jmrit.logixng.string has everything that is related to string actions and string expressions.

### jmri.jmrit.logixng.<type>.actions

The package jmri.jmrit.logixng.<type>.actions has the actions that are shipped with JMRI. These are registered by a factory class and should not be accessed directly. An action class should not use another action class directly.

There should not be any assumptions on which actions are included in JMRI. The lists of action classes is supplied by the AnalogActionManager, DigitalActionManager and StringActionManager. This ensures that action classes can be added later, either to the JMRI source code or at runtime as plugins.

### jmri.jmrit.logixng.<type>.actions.swing

The package jmri.jmrit.logixng.<type>.actions.swing has the swing classes that are used to configure action classes. Each action class must have its own swing class in this package.

### jmri.jmrit.logixng.<type>.actions.configurexml

The package jmri.jmrit.logixng.<type>.actions.configurexml has the xml classes that are used to configure action classes. Each action class must have its own xml class in this package.

### jmri.jmrit.logixng.<type>.expressions

The package jmri.jmrit.logixng.<type>.expressions has the expressions that are shipped with JMRI. These are registered by a factory class and should not be accessed directly. An expression class should not use another expression class directly.

There should not be any assumptions on which expressions are included in JMRI. The lists of expression classes is supplied by the AnalogExpressionManager, DigitalActionManager and StringActionManager. This ensures that expression classes can be added later, either to the JMRI source code or at runtime as plugins.

### jmri.jmrit.logixng.<type>.expressions.swing

The package jmri.jmrit.logixng.<type>.expressions.swing has the swing classes that are used to configure expression classes. Each expression class must have its own swing class in this package.

### jmri.jmrit.logixng.<type>.expressions.configurexml

The package jmri.jmrit.logixng.<type>.expressions.configurexml has the xml classes that are used to configure expression classes. Each expression class must have its own xml class in this package.

### jmri.jmrit.logixng.<type>.implementation

The package jmri.jmrit.logixng.<type>.implementation has some classes that are used by actions and expressions, for example implementation of managers and implementation of male and female sockets.

### jmri.jmrit.logixng.<type>.implementation.configurexml

The package jmri.jmrit.logixng.<type>.implementation.configurexml has the xml classes that are used to configure implementation classes.

### jmri.jmrit.logixng.<type>.log

The package jmri.jmrit.logixng.<type>.log has classes used for logging of the current state of the actions and expressions.

### jmri.jmrit.logixng.implementation

The package jmri.jmrit.logixng.implementation has implementations of everything that is not actions, expressions or tools. No other parts of JMRI nor LogixNG should access this package directly.

### jmri.jmrit.logixng.implementation.configurexml

The package jmri.jmrit.logixng.implementation.configurexml has the xml classes that are used to configure implementation classes.

### jmri.jmrit.tools.swing

The package jmri.jmrit.logixng.tools.swing has the editor, debugger and time diagram of LogixNG.

### Exceptions to the above rules

The ImportLogix tool uses many expressions in the jmri.jmrit.logixng.expressions package and many actions in the jmri.jmrit.logixng.actions package.

The XML schema xml/schema/types/logixng-4.13.4.xsd uses the default managers in the jmri.jmrit.logixng.implementation package.