Skip to content

Add discovered_readers()/discovered_writers() snapshot accessors#418

Open
lakshay2010sharma wants to merge 1 commit into
Atostek:masterfrom
cerulion-inc:cer725-endpoint-snapshot
Open

Add discovered_readers()/discovered_writers() snapshot accessors#418
lakshay2010sharma wants to merge 1 commit into
Atostek:masterfrom
cerulion-inc:cer725-endpoint-snapshot

Conversation

@lakshay2010sharma

Copy link
Copy Markdown

What

Adds discovered_readers() / discovered_writers() snapshot accessors, mirroring the existing discovered_topics() at all three delegation layers (DomainParticipantDomainParticipantDiscDomainParticipantInner), backed by two new DiscoveryDB getters over the external_topic_readers / external_topic_writers maps.

Why

The status-event channel can lose discovery events for a consumer that attaches late or drains slowly — but DiscoveryDB retains the full current state. A snapshot accessor lets applications harvest remote endpoint discovery loss-free at any point, instead of reconstructing state from an event stream they may have partially missed.

Our concrete use case: ROS 2 nodes publish REP-2011 type hashes in endpoint USER_DATA QoS. Since user_data is carried on DiscoveredReaderData / DiscoveredWriterData, these accessors expose remote endpoints' USER_DATA (and the rest of the endpoint QoS) directly from the DB snapshot — we use this to drive type_description_interfaces lookups against live robots.

Notes

  • Additive only — no existing signatures or behavior changed.
  • Snapshot semantics (cloned Vec), same shape as discovered_topics().
  • Includes an in-module DiscoveryDB test + doctests.

Happy to adjust naming/placement to whatever fits the project's conventions.

Mirror discovered_topics() at all three delegation layers, backed by two
new DiscoveryDB getters over the external_topic_readers/writers maps.
Snapshot semantics (cloned Vec): a consumer that attaches late or drains
the status-event channel slowly can miss discovery events, but the
DiscoveryDB retains full current state. Since user_data is now carried on
DiscoveredReaderData/DiscoveredWriterData, these accessors expose remote
endpoints' USER_DATA QoS (e.g. ROS 2 REP-2011 type hashes) loss-free.

Additive only; in-module DB test + doctests included.
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

Successfully merging this pull request may close these issues.

1 participant