Skip to content

feat: add DataProvider and OperationProvider plugin interfaces#355

Draft
bburda wants to merge 10 commits intomainfrom
feature/plugin-entity-framework
Draft

feat: add DataProvider and OperationProvider plugin interfaces#355
bburda wants to merge 10 commits intomainfrom
feature/plugin-entity-framework

Conversation

@bburda
Copy link
Copy Markdown
Collaborator

@bburda bburda commented Apr 6, 2026

Pull Request

Summary

Add per-entity provider routing for gateway plugins, enabling plugins to serve standard SOVD data and operation endpoints on entities they create via IntrospectionProvider.

  • New DataProvider and OperationProvider interfaces (per-entity routing, unlike singleton Log/Script/Update providers)
  • PluginLoader discovers providers via dlsym (get_data_provider, get_operation_provider)
  • PluginManager tracks entity ownership (entity_id -> plugin) for handler delegation
  • IntrospectionProvider now works in all discovery modes (not just hybrid)
  • PluginLayer tags entities with source = "plugin"
  • Data/operation handlers delegate to plugin providers for owned entities
  • Capability auto-deduction from registered providers

Issue


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

  • 7 new unit tests for entity ownership tracking and provider resolution
  • Full gateway test suite: 1932 tests, 0 failures, 0 skipped

Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

@bburda bburda self-assigned this Apr 6, 2026
bburda added 9 commits April 6, 2026 12:06
New provider interfaces for plugins that serve standard SOVD data
and operation resources on plugin-created entities. Per-entity routing
(unlike singleton Log/Script/Update providers) allows multiple plugins
to each handle their own entity sets.
PluginLoader queries get_data_provider() and get_operation_provider()
C exports from plugin .so files, following the same pattern as
existing get_log_provider/get_script_provider queries.
Entity ownership map (entity_id -> plugin_name) enables per-entity
routing to DataProvider/OperationProvider. Populated from
IntrospectionProvider results.
Plugin entities now appear in the entity cache regardless of discovery
mode (runtime_only, manifest_only, hybrid). In hybrid mode, plugins
participate in the merge pipeline as before. In other modes, entities
are injected during the regular cache refresh cycle.

All plugin entities get source='plugin'. Entity ownership is tracked
in PluginManager for per-entity provider routing.
EntityInfo now has is_plugin and plugin_name fields, populated during
entity lookup from PluginManager's ownership map. Enables handlers to
check entity ownership without querying PluginManager directly.
Data handlers (list, read, write) check EntityInfo.is_plugin and
delegate to the owning plugin's DataProvider instead of querying
ROS 2 topics via DataAccessManager.
Operation handlers (list, execute) check EntityInfo.is_plugin and
delegate to the owning plugin's OperationProvider instead of looking
up ROS 2 services/actions via OperationManager.
When a plugin entity has DataProvider or OperationProvider registered,
the entity detail response automatically includes 'data' and
'operations' in the capabilities array.
Tests verify entity ownership tracking in PluginManager: registration,
lookup, multi-plugin coexistence, provider resolution via add_plugin
(in-process dynamic_cast), and nullptr returns for unknown entities
and plugins without providers.
@bburda bburda force-pushed the feature/plugin-entity-framework branch from daf6a84 to 81db09c Compare April 6, 2026 10:11
… ops

The move constructor and move assignment operator were missing
data_provider and operation_provider fields, causing them to be
silently lost during plugin loading. This made
get_data_provider_for_entity() always return nullptr even though
dlsym successfully discovered the providers.
@bburda bburda requested a review from mfaferek93 April 6, 2026 15:00
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.

Plugin entity framework: DataProvider and OperationProvider for standard SOVD endpoints

1 participant