Closed hnez closed 3 years ago
I see some potential issues with this:
I see some potential issues with this:
* the hex-encoding is confusing compared to the decimal label
This is true. We could change to decimal representation in list and URLs.
* the product ID is not really relevant to the user, especially in config files
I would say that the product-ID is a relevant as the IOMux
-prefix in the example above.
Even worse IOMux
is neither part of the product label nor is it printed on the PCB.
* zero padding requires deciding on a fixed length now without much benefit
I can agree on that.
* there would be multiple URLs per node (or there would need to be an API to "resolve" user-level names to node URLs, requiring more coordination between labgrid and the iobus server)
I guess this discussion boils down to the question how we want to represent our nodes in the UI. We currently plan to have the following label on PCBs and housings:
I think we should try to make it as intuitive as possible to map this label to the node in the UI and to the URL. I see the following ways to archive this:
What do you think?
A consensus was found on how the device names should be formatted and i will start implementing it and update this PR accordingly.
http://iobus-server/nodes/4DO-3DI-3AI-00005.00026/pins/
.http://iobus-server/nodes/Ethernet-Mux-00003.00026/pins/
.I've updated the PR with an implementation that results in URLs formatted as shown above. Feel free to review the changes.
Hi Florian,
I've changed Pin.write
so that it returns RuntimeError
instead of ValueError
.
I've also rebased this branch on top of master
to resolve a merge conflict in lxa_iobus/lpc11xxcanisp/firmware/versions.py
.
IOBus devices sold by the Linux Automation GmbH are delivered with a serial number printed on them that looks something like this:
00005.00026
. These are two blocks of zero-padded decimal numbers (product class.serial number).CANOpen addresses are formatted as hexadecimal numbers and contain the serial number as last component. The device above has the address:
00001287.00000002.00000003.0000001a
. The iobus-server abbreviates this toIOMux-0000001a
and uses it in the REST URLs. Due to the serial number being expressed as hexadecimal these URLs do however look nothing like the serial number printed on the device.This commit tries to fix that by allowing both the
00005.00026
format, as well as theIOMux-0000001a
format in URLs and prefering the former when listing nodes.This change affects the following projects. An [x] indicates that the documentation was updated accordingly: