Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to retain transfer ids. #416

Closed
9 tasks done
serges147 opened this issue Jan 28, 2025 · 2 comments
Closed
9 tasks done

Impossible to retain transfer ids. #416

serges147 opened this issue Jan 28, 2025 · 2 comments
Assignees

Comments

@serges147
Copy link
Collaborator

serges147 commented Jan 28, 2025

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.
@serges147 serges147 changed the title Impossible to maintain transfer ids. Impossible to retain transfer ids. Jan 28, 2025
@serges147 serges147 self-assigned this Jan 28, 2025
@thirtytwobits
Copy link
Contributor

This seems well-aligned with pycyphal. Seems like a reasonable design.

@serges147
Copy link
Collaborator Author

Fixed by pr #420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants