JMRI: OpenLCB Support
The support on this page is rapidly evolving; the actual code might be ahead or behind the documentation on any given day.JMRI provides support for general JMRI Sensors and Turnouts in terms of OpenLCB "events".
See also the main help page for JMRI CAN support, including links to various general tools, and the page on the technical details of JMRI's OpenLCB support.
Naming
The system letter for OpenLCB connections is "M". Details of OpenLCB event and object names are described below, with technical details on a separate page.
JMRI associates OpenLCB events with individual
JMRI objects (Sensors, Turnouts, etc) via the
JMRI system names. A system name like
"MS1.2.3.4.5.6.7.8;1.2.3.4.5.6.7.9"
defines a Sensor that follows the "1.2.3.4.5.6.7.8"
and "1.2.3.4.5.6.7.9" OpenLCB events
to change state.
These system names can get very long, in which
case the "user names" become much more useful.
Sensors
OpenLCB messages coming into JMRI applications can be accessed via JMRI Sensor objects. The Sensor's system name determines which OpenLCB message(s) it corresponds to.A sensor is defined by two events: The one that sets it ACTIVE, and the one that sets it INACTIVE. The event numbers are essentially arbitrary, and must both be specified. Because events are not intrinsically associated with specific hardware objects, and because people can use event IDs in many ways, the specific event IDs for a sensor must be supplied. You create Sensors using the Add... button on the Sensor Table.
Turnouts
(To be written, but the scheme is similar to Sensors above, except JMRI is emitting the OpenLCB frames instead of receiving them, and the type letter is "T" instead of "S", e.g.MT1.2.3.4.5.6.7.8;1.2.3.4.5.6.7.9)