Skip to content

Only one single RPC client is possible per port. #412

@serges147

Description

@serges147

Multiple RPC clients, all on the same port but for different remote (server) node should be a valid scenario.
Currently, transport layer accepts the very first attempt to create Response RX session for a port,
but rejects all other consequent attempts with "already exists" failure for the same port.

  • For message RX sessions, the described above "single rx session per port" behavior is desired one (presentation layer deals with it by allowing to have multiple presentation::Subscriber instances if needed).
  • Even for service request RX sessions it's also desired (b/c only one server could be per port).
  • But for service response RX sessions it's causing the problem (namely see title of this issue).

Problem found as part of OCVSMD work, where there was an attempt to create multiple concurrent RPC uavcan/node/435.ExecuteCommand.1.3 clients, one per distinct node id, so that distribute a single command (like "COMMAND_RESTART" or "COMMAND_BEGIN_SOFTWARE_UPDATE") to multiple destination nodes.
Currently, the only workaround is execute such command in serial manner (create rpc client, send request, wait for response, release the client, repeat with next node).

  • Unit test for UDP transport
  • Fix UDP transport
  • Unit test for CAN transport
  • Fix CAN transport
  • Try at OCVSMD

Metadata

Metadata

Assignees

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