Provides access to LocoNet systems, along with a lot of Swing-based tools.
Initialization Sequence
This section describes the LocoNet implementation of the new (2010)
configuration system.
jmri.jmrix.loconet.NN.configurexml.ConnectionConfigXml is invoked
by the configurexml when the specific class is named in an XML
input file.
It is a child of the jmri.jmrix.configurexml.AbstractConnectionConfigXml,
which invokes the getInstance() method of it (not a static
method) in its load() method
to load the "adapter" member variable with a
specific *Adapter class, e.g. MS100Adapter.
More importantly, that getInstance()
Later, after the port is (hopefully) up,
AbstractConnectionConfigXml invokes the Adapter's
configure() method.
That Adapter configure() method does, in order:
sets up Packetizer/port/etc as needed
configureCommandStation() from LnPortController
configureManagers() from LnPortController,
but overridden in e.g. PR3Adapter.
does any other initialization of it's own, e.g. startThreads()
At this point, the system is basically up and ready for operation.
Finally, a jmri.jmrix.loconet.LocoNetSystemConnectionMemo object is
created and registered with the InstanceManager.
Later, jmri.jmrix.ActiveSystemsMenu
wants to create user menus, and finds the LocoNetSystemConnectionMemo
object in the InstanceManager
The menu code asks that specific SystemConnectionMemo object
to create and return the menu. It does so, in the process
connecting each Action to itself so that the individual tools
will be able to connect to the proper e.g. TrafficController,
SlotMonitor, etc.
When an Action is fired later on, the invoked class(es) enquire
of the LocoNetSystemConnectionMemo when they need a resource,
instead of referring to an instance() method in the
resource's class.
To adapt a type, e.g. Turnout:
Basic manager needs to have getSystemPrefix in addition to letter
ProxyManager has to check for system prefix, not letter
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see: