Skip to content

[Messaging] Make output configurable depending on message metadata#2101

Open
VeithMetro wants to merge 8 commits intomasterfrom
development/direct-output-config
Open

[Messaging] Make output configurable depending on message metadata#2101
VeithMetro wants to merge 8 commits intomasterfrom
development/direct-output-config

Conversation

@VeithMetro
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 11:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces configurable message output routing based on message metadata, allowing messages to be routed to the MessageControl plugin buffer, direct output, or both.

Changes:

  • Added OutputMode enum and JSON-configurable output fields at section and per-entry level.
  • Added settings-side routing map and lookup (EffectiveOutput) plus direct-mode buffer creation override (HasPluginOutput).
  • Updated MessageUnit::Push() to route each message according to the effective output mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
Source/messaging/MessageUnit.h Adds OutputMode, JSON config fields, routing map, and routing resolution logic used to decide buffer creation and per-message routing.
Source/messaging/MessageUnit.cpp Adds enum<->string conversion and updates Push() to send messages direct/plugin/both based on the new routing logic.

Comment thread Source/messaging/MessageUnit.h Outdated
Comment thread Source/messaging/MessageUnit.h Outdated
Comment thread Source/messaging/MessageUnit.cpp Outdated
Comment thread Source/messaging/MessageUnit.h Outdated
Comment thread Source/messaging/MessageUnit.h Outdated
Comment thread Source/messaging/MessageUnit.h
Copilot AI review requested due to automatic review settings April 24, 2026 07:26
Comment thread Source/messaging/MessageUnit.h Outdated
uint8_t routeMode = Core::NumberType<uint8_t>(iterator.Current()).Value();
if ((type >= Core::Messaging::Metadata::type::TRACING) && (type <= Core::Messaging::Metadata::type::TELEMETRY) &&
(routeMode <= static_cast<uint8_t>(MessageUnit::BOTH))) {
_outputRouting[{static_cast<Core::Messaging::Metadata::type>(type), category, module}] = static_cast<OutputMode>(routeMode);
Comment thread Source/messaging/MessageUnit.h Outdated
uint8_t routeMode = Core::NumberType<uint8_t>(iterator.Current()).Value();
if ((type >= Core::Messaging::Metadata::type::TRACING) && (type <= Core::Messaging::Metadata::type::TELEMETRY) &&
(routeMode <= static_cast<uint8_t>(MessageUnit::BOTH))) {
_outputRouting[{static_cast<Core::Messaging::Metadata::type>(type), category, module}] = static_cast<OutputMode>(routeMode);
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread Source/messaging/MessageUnit.h Outdated
Comment thread Source/messaging/MessageUnit.h
Copilot AI review requested due to automatic review settings April 24, 2026 07:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread Source/messaging/MessageUnit.h
Copilot AI review requested due to automatic review settings April 24, 2026 07:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread Source/messaging/MessageUnit.h
Comment thread Source/messaging/MessageUnit.h
Comment thread Source/messaging/MessageUnit.h
Comment thread Source/messaging/MessageUnit.h
@VeithMetro VeithMetro requested a review from sebaszm April 24, 2026 08:34
Copy link
Copy Markdown
Contributor

@sebaszm sebaszm left a comment

Choose a reason for hiding this comment

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

Rename enums 'plugin' to 'handler' and 'both' to 'all'. Simplify by making the output mode a control property as discussed.

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.

4 participants