Open ElenaGrigore opened 4 years ago
Looking at the resources for the remoteplace:
<workstation-hostname>/DESK--MX8QM_mek--1/NetworkSerialPort/ControllerPort
<workstation-hostname>/DESK--MX8QM_mek--1/NetworkSerialPort/USBSerialPort
<workstation-hostname>/DESK--MX8QM_mek--1/NetworkService/NetworkService
<workstation-hostname>/DESK--MX8QM_mek--1-console-0/NetworkSerialPort/USBSerialPort -> 0
<workstation-hostname>/DESK--MX8QM_mek--1-console-1/NetworkSerialPort/USBSerialPort -> 1
<workstation-hostname>/DESK--MX8QM_mek--1-console-2/NetworkSerialPort/USBSerialPort -> 2
<workstation-hostname>/DESK--MX8QM_mek--1-console-3/NetworkSerialPort/USBSerialPort -> 3
You have six NetworkSerialPorts
available, of which four are set up with add-named-match
and are thus resolvable by the named binding mechanism. However these two:
<workstation-hostname>/DESK--MX8QM_mek--1/NetworkSerialPort/ControllerPort
<workstation-hostname>/DESK--MX8QM_mek--1/NetworkSerialPort/USBSerialPort
do not have a named binding setup. You'll need to remove the *
match and setup separate named bindings for each port.
The ControllerPort
is also none standard and not supported by upstream Labgrid, why did you add this new resource?
Hi,
I was reading the docs and the examples , but maybe I missed something. Are the name and bindings options from drivers sections taken into consideration at target creation ? Or the comment from target.py bind_driver " Currently, we only support binding all suppliers at once." means just that: all the resources/drivers of that type will be matched ignoring name and binding ?
My case is that I want to have a SerialDriver for the board itself and a SerialDriver for a controller that is linked to that board (this second one will be part of a PowerDriver, but now is just its serial that I'am interested in ). Also I configured for this board to have multiple consoles available.
Board resources:
Environment file - I tried to assign name and bindings to every driver, to avoid confusion:
Trying to access a function from labgrid-client that uses target = self._get_target(place) which with a configuration file as parameter will access self.env.get_target(self.role) (where self.role is "main" in this case) it will fail, first with multiple resources of the same type (NetworkSerialPort) and then (if a create one of the SerialDrivers outside the env file) it will fail with multiple drivers matching ConsoleProtocol.