Skip to content

Question about configuration tool document #257

Open

Description

@jeff-tcs

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

Activity

  1. dpharris commented on Mar 25, 2024

    @dpharris
    Contributor

    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

  2. bobjacobsen commented on Mar 25, 2024

    @bobjacobsen
    Contributor

    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

    • read the CDI XML from the node with a series of Read datagrams using the memory configuration protocol
    • pass through that XML, processing each element as its encountered, and turning each of them (as appropriate) into GUI elements and creating the representation of what's stored where in node memory
    • go through that representation, reading each element's value from the node memory and show those

    Then the user can edit those, and hit buttons that do write or read operations back to the node.

  3. Poikilos commented on Mar 26, 2024

    @Poikilos

    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: bobjacobsen/python-openlcb#31

  4. Poikilos commented on Apr 4, 2024

    @Poikilos

    @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.

  5. balazsracz commented on Apr 6, 2024

    @balazsracz
    Collaborator
  6. Poikilos commented on May 16, 2024

    @Poikilos

    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.

  7. jeff-tcs commented on May 17, 2024

    @jeff-tcs
    Author
  8. bobjacobsen commented on May 17, 2024

    @bobjacobsen
    Contributor
  9. bobjacobsen commented on May 17, 2024

    @bobjacobsen
    Contributor

    See JMRI/JMRI#13104 for update

  10. Poikilos commented on May 23, 2024

    @Poikilos

    Thanks, as the merge uses standard means to clarify what code is required, that looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions