This is pretty much how JMRI works already using system names.
Bob
On Dec 12, 2018, at 9:30 AM, Donald <kinney@...> wrote:
From: Bob Jacobsen
Here¡¯s a concrete proposal to consider. _Please_ add/change/remove until we can get some kind of consensus! Happy to work during the holidays on whatever emerges.
Proposed updates to the JMRI MQTT support
0) Create a JMRI MQTT hardware page (will do this shortly)
--
Bob Jacobsen
rgj1927@...
This might seam really outside the box:-)
What about having all the data from the outside world go to a In/Out router. (Everything but the mouse/keyboard).
Have the objects in JMRI turnouts/turntables/signals/sensors will have an Internal definition of how it operates within the operating program.
An overall subpart of the object would be on how the objects connects to the world. ei: LocoNet on COM2, OpenLCB on COM4, WiFi, Binary-ASCII on Serial port 1.
Another overall subpart would be where the object is operating at. ei: NW section, BNSF9999, UP4141.
Another overall subpart would be what system the object is operating. ei: LocoNet, OpenLCB, ,Binary, ASCII, DCC Plus.
These two subparts are different because the first one would tell the router where to send the data and the third one would define what the data is.
Each object would define the different states that it could be in. Each of these states would then have the values required to operate.
Maybe have each state with the different types of requirements. Like DCC Address, CV, EventID, value...
The router would use the type values to send the proper message data to that system.
The internal router would strip the first part of the header as it should not be required on the outside as it is would be just to tell JMRI on how to connect to the proper comm/link route.
Major examples:
Module using WiFi as the way to talk with JMRI, has SPI to talk to 7 different microchips:
WiFi/NW section/device 1/pin 2/ON
Another module using WiFi has 8 outputs in parallel:
WiFi/SW section/pin all/10110001
WiFi/SW section/ pin 3/1
OpenLCB on COM4/0102AE6C
The first part is striped off as the router knows the final connection and needs only to send the last parts.
The router would also add the first part on incoming messages/data.
--
Bob Jacobsen
rgj1927@...