Function ros2_medkit_gateway::handlers::detail::compute_bulkdata_source_filters

Function Documentation

std::vector<std::string> ros2_medkit_gateway::handlers::detail::compute_bulkdata_source_filters(const ThreadSafeEntityCache &cache, const EntityInfo &entity)

Compute rosbag source filters for an entity based on its type.

Pure helper that drives BulkDataHandlers::get_source_filters. Lives in a detail namespace to signal “not part of the public API” while still being directly unit-testable without spinning up a GatewayNode.

  • APP / AREA: returns the entity’s FQN or namespace path (single filter).

  • FUNCTION: aggregates non-empty effective_fqn() values across all hosted apps (no fallback - functions are pure aggregated views).

  • COMPONENT: aggregates from hosted apps; falls back to FQN/namespace_path only when the component has no hosted apps (manifest deployments where the component groups topics rather than nodes). This avoids the synthetic-component bug where empty fqn + empty namespace_path produced zero source filters.

Parameters:
  • cache – Entity cache to resolve hosted apps in (used for FUNCTION / COMPONENT only)

  • entity – Entity information

Returns:

Vector of source filter strings (empty if no valid filters)