Skip to content

Add SharedMemoryPlugin Implementation - #564

Open
Ohisemega wants to merge 12 commits into
masterfrom
convert_shared_mem_ctrlr_to_plugin
Open

Ohisemega wants to merge 12 commits into
masterfrom
convert_shared_mem_ctrlr_to_plugin

Conversation

@Ohisemega

@Ohisemega Ohisemega commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #565

This is in-view of odin-data release 2.0. See Issue #517 (Roadmap) for details.

@Ohisemega Ohisemega added this to the in-progress milestone Sep 8, 2026
@Ohisemega Ohisemega self-assigned this Sep 8, 2026
@Ohisemega Ohisemega added the enhancement Next stage development or improvement of an existing feature or utility. label Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.02703% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.65%. Comparing base (577bd9b) to head (19e763a).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
...pp/frameProcessor/src/FrameProcessorController.cpp 0.00% 7 Missing ⚠️
cpp/frameProcessor/src/SharedMemoryPlugin.cpp 89.79% 4 Missing and 1 partial ⚠️
cpp/frameProcessor/src/FrameProcessorPlugin.cpp 0.00% 4 Missing ⚠️
cpp/frameProcessor/src/SharedMemoryController.cpp 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #564      +/-   ##
==========================================
+ Coverage   48.02%   49.65%   +1.62%     
==========================================
  Files          95       97       +2     
  Lines        7725     7732       +7     
  Branches      669      657      -12     
==========================================
+ Hits         3710     3839     +129     
+ Misses       3823     3691     -132     
- Partials      192      202      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Ohisemega and others added 10 commits September 8, 2026 16:01
Remove SharedMemoryController object, it's associated methods and configuration strings from the FrameProcessorController class.
Add an inject_EOA() method to the FrameProcessorPlugin to allow the controller inject the EOF object to the SharedMemoryPlugin.
Delete deprecated methods from the SharedMemoryController class.
Comment thread cpp/frameProcessor/src/SharedMemoryPlugin.cpp Outdated
@Ohisemega Ohisemega changed the title WIP: Add SharedMemoryPlugin Implementation Add SharedMemoryPlugin Implementation Sep 23, 2026
Comment on lines +52 to +54
static void dummy_timer()
{
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider renaming this as dummy timer suggests the implementation is not fully thought out. We can discuss.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed at meeting, timer is necessary to allow the reactor to tick and terminate cleanly, so this should be named more clearly.

Comment on lines +397 to +398
std::string plugin_name = config.get_param<std::string>(FrameProcessorController::CONFIG_EOA);
if (plugins_.count(plugin_name)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the client API, as injecting an EOA frame now requires the name of the plugin to inject into, where as before it was always injected into the shared memory controller. This probably is not used by many detectors but worth noting.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed - let's look at putting EOA back in to core application, with it sent to all plugins that are head of chain.

@ajgdls ajgdls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some points of discussion before we fully approve. We should probably check through the source code documentation.

@timcnicholls timcnicholls left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some comments as per discussion in meeting. Let's also target this PR at a dev_2.0 branch, as suggested in the 2.0 roadmap issue #517

Comment on lines +52 to +54
static void dummy_timer()
{
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed at meeting, timer is necessary to allow the reactor to tick and terminate cleanly, so this should be named more clearly.

Comment on lines +397 to +398
std::string plugin_name = config.get_param<std::string>(FrameProcessorController::CONFIG_EOA);
if (plugins_.count(plugin_name)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed - let's look at putting EOA back in to core application, with it sent to all plugins that are head of chain.

* \param[in] frSubscriberString - Endpoint for receiving frame ready notifications.
*/
void SharedMemoryPlugin::setupFrameReceiverInterface(
const std::string& frPublisherString,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

References to "publisher" and "subscriber" for IPC channels should be renamed to "release" and "ready" for consistency with the meaning of the channel, rather than the type.

reply.set_param(this->get_name() + '/' + SharedMemoryPlugin::CONFIG_FR_RELEASE, this->frReleaseEndpoint_);
}

void SharedMemoryPlugin::status(OdinData::IpcMessage& reply)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be good to add some statistics reporting for e.g. frames received

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Next stage development or improvement of an existing feature or utility.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Convert SharedMemoryController Module into a Plugin in the FP

3 participants