Open jeff-tcs opened 3 months ago
Hi Jeff -- Yes, code is here, and gets included into JMRI during the build process as openlcb.jar.
The configuration tool code is here: https://github.com/openlcb/OpenLCB_Java/tree/master/src/org/openlcb/swing/networktree
Maybe tell us what you want to do, and we can help point the way.
David
The user-visible panel is built in this class in the OpenLCB_Java library: https://github.com/openlcb/OpenLCB_Java/blob/master/src/org/openlcb/cdi/swing/CdiPanel.java
It uses a representation of the CDI information that comes from here: https://github.com/openlcb/OpenLCB_Java/blob/master/src/org/openlcb/cdi/CdiRep.java
The basic sequence is to
Then the user can edit those, and hit buttons that do write or read operations back to the node.
Maybe tell us what you want to do, and we can help point the way.
@jeff-tcs and I are working on getting the CDI from the device, then using that info to change settings on the device. We can make our GUI from there. This explains it: https://github.com/bobjacobsen/PythonOlcbNode/issues/31
@dpharris Thanks, that answers it but the original issue post above has a web page link with ambiguity. Can someone edit that web page to clarify it is talking about this repo? It seems like that clarification would resolve the issue.
I read https://www.jmri.org/help/en/package/jmri/jmrix/openlcb/swing/networktree/NetworkTreePane.shtml and I can not find any incorrect statement on it. It also doesn't talk about where the code or repository is, which it should not, because this is a user-facing documentation. Could you be more specific about what the ambiguity is on this page?
There is not an explanation of what project contains the code it cites, nor what program such code is eventually compiled into. For example, given the comments above, a minimal way to resolve these two pieces of missing information would be to change:
The "Configure Nodes" OpenLCB tool
to
The "Configure Nodes" OpenLCB tool (source) distributed with JMRI
Even though the statement is on the JMRI website, the code being discussed is in a separate repo. That would be confusing to contributors and prevent them from understanding how to help or which public-licensed code (and what license) they can utilize to use the feature discussed. Given that it is in a separate repo though, that adds an additional question, so it needs to be further clarified that it is the CDI screen that comes with JMRI, rather than an optional feature provided separately--that is why I added the "distributed with JMRI" part.
Hi Dave, Thanks for reaching out to me...I'll check out the link. Jeff
On Thu, May 16, 2024 at 1:07 PM Jacob Gustafson @.***> wrote:
There is not an explanation of what project contains the code it cites, nor what program such code is eventually compiled into. For example, given the comments above, a minimal way to resolve these two pieces of missing information would be to change:
The "Configure Nodes" OpenLCB tool
to
The "Configure Nodes" OpenLCB tool (source https://github.com/openlcb/OpenLCB_Java) distributed with JMRI
— Reply to this email directly, view it on GitHub https://github.com/openlcb/OpenLCB_Java/issues/257#issuecomment-2115788745, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGIWXFBQP777HFXP6K5YI4TZCTRU7AVCNFSM6AAAAABFHO7YUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVG44DQNZUGU . You are receiving this because you were mentioned.Message ID: @.***>
There is not an explanation of what project contains the code it cites, nor what program such code is eventually compiled into.
I think that’s referring to the https://www.jmri.org/help/en/package/jmri/jmrix/openlcb/swing/networktree/NetworkTreePane.shtml page. As Balazs pointed out, this is user facing documentation. It’s not meant to delve into the source code, project packaging, etc.
In general, the place for that would be the Javadoc. The user-level help page URLs map onto the visible classes, which in turn map onto Javadoc pages. The Javadoc for the NetworkTreePane is here: https://www.jmri.org/JavaDoc/doc/jmri/jmrix/openlcb/swing/networktree/NetworkTreePane.html
I’ll add some more to that about how it uses the OpenLCB_Java classes.
See JMRI/JMRI#13104 for update
Thanks, as the merge uses standard means to clarify what code is required, that looks good to me.
The following link sayys that openlcb has its own configuration tool: https://www.jmri.org/help/en/package/jmri/jmrix/openlcb/swing/networktree/NetworkTreePane.shtml
I found this link above by searching google...the page doesn't say where the code is for this. Is it this repo...or is there another link you can provide?
I am trying to look for example code for creating a configuration tool. Looking in the JMRI code was hard to navigate... The readme in OpenLCB_Java seems to indicate that the code is here and not in JMRI...Please advise. Thanks Jeff