Skip to content

Impossible to retain transfer ids. #416

@serges147

Description

@serges147

Please see corresponding topic at PyCyphal : https://pycyphal.readthedocs.io/en/stable/api/pycyphal.presentation.html#pycyphal.presentation.Presentation.output_transfer_id_map

Problem was found during OCVSMD development, where multiple, quick (1Hz) in succession runs of SDK CLI tool fail to deliver "exec cmd" invocations. The use case and the reason of the failure is well described in the above link.

Todo:

  • Introduce at the presentation layer a new ITransferIdMap interface. Extend Presentation class with setTransferIdMap method.
  • Implement default (out of box) realization (DefaultTransferIdMap?TBD - nullptr fallback)
    Will do nothing, always return zeros for a new publisher or rpc client. Will be used as default fallback to the current behavior. It will be up to libcyphal client to setup his own better suited implementation.
  • Use the interface to get/set transfer ids at presentation ...
    • PublisherImpl
    • SharedClient
  • Mock and unit tests
  • Try at OCVSMD:
    • Implement ITransferIdMap with map in memory (std::unordered_map); maybe flushing expired records (1Hz, TBD). Persisting to file (on exit) probably not need (b/c the daemon supposed to be restarted quite rarely; can be easily added later if needed).
    • Demo the use case.

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