Skip to content

someipd create initial modular architecture proposal#44

Open
TimofteBogdan1900 wants to merge 9 commits intoeclipse-score:mainfrom
etas-contrib:bot6abt/96528_Configurable_vsomeip-someipd
Open

someipd create initial modular architecture proposal#44
TimofteBogdan1900 wants to merge 9 commits intoeclipse-score:mainfrom
etas-contrib:bot6abt/96528_Configurable_vsomeip-someipd

Conversation

@TimofteBogdan1900
Copy link
Copy Markdown
Contributor

@TimofteBogdan1900 TimofteBogdan1900 commented Mar 12, 2026

Gateway Functionality minor Update

**To accommodate future developments, the gateway functionality was kept intentionally simple. gatewayd now passes a Service ID via IPC (mw::com) to someipd. someipd then checks this ID against a newly added JSON configuration file, which can store k number of defined services. If the passed Service ID matches any of these configured services during the Service Discovery phase (offered or requested), event data is successfully exchanged to and from the network. Previously, this process was entirely hardcoded, and the dummy Service IDs passed by the gateway (0x00) were ignored.

//on the gateway proxy GetNewSamples() callback
...
                const auto instance_id = LookupInstanceId(service_id);
                if (instance_id == kAnyInstance) {
                    score::mw::log::LogError()
                        << "No offered service configured for service_id "
                        << score::mw::log::LogHex16{service_id} << ". Dropping message.";
                    return;
                }

                const auto* payload = data + kSomeipFullHeaderSize;
                const auto payload_size = size - kSomeipFullHeaderSize;
                network_stack_->Notify(service_id, instance_id, event_id, payload, payload_size);
...

for the receive part, only for the services configured to be subscribed in the someip .json file , the network stack callback is registered

for ev in  json subscribed_services
  network_stack_->RegisterMessageHandler(
                  svc.service_id, svc.instance_id, ev.event_id,
                  [this](ServiceId /*service_id*/, InstanceId /*instance_id*/, EventId /*event_id*/,
                         const std::byte* payload_data, std::size_t payload_size) {
                      const std::size_t total_size = kSomeipFullHeaderSize + payload_size;
....
...
                      internal_ipc_->SendToGatewayd(buffer, total_size);
                  });



There are no integration tests defined for multiple channel of communication between gatewayd and someipd ( there is only one pair of proxy/skeleton) .

  auto internal_ipc =
        std::make_unique<MwcomAdapter>("someipd/gatewayd_messages", "someipd/someipd_messages", 10);

For testing for service discovery and event data tranfer to and from vsomeip the opened PR integration tests passsed.
**

Architecture
image

The architecture is designed so that both the network stack and the IPC framework can be swapped independently, without touching the core routing logic.

Bridge: GatewayRouting holds references to two Implementor interfaces. IInternalIpc, INetworkStack
It delegates all stack-specific and IPC-specific work through those interfaces.

Adapter: Object Adapter classes VsomeipAdapter , MwcomAdapter

With this architecture we can for example :

  • switch easily vsomeip SOMEIP implementation with another SOMEIP stack
  • switch IPC communic concerete implementation (mw:com) with another (socom)

Swap the SOME/IP network stack

  1. Create a new class that inherits INetworkStack (e.g., SomeIpPosixAdapter)
  2. Implement all pure virtual methods using the new stack's API
  3. In main.cpp, replace std::make_unique<VsomeipAdapter>(...) with std::make_unique<SomeIpPosixAdapter>(...)
  4. Update BUILD.bazel to link the new adapter library instead of :vsomeip_adapter

In theory ; no changes to GatewayRouting, MwcomAdapter, or any other file.

Swap the IPC framework

  1. Create a new class that inherits IInternalIpc (e.g., Socom)
  2. Implement Init(), SendToGatewayd(), and ReceiveFromGatewayd() using the new framework's API
  3. In main.cpp, replace std::make_unique<MwcomAdapter>(...) with std::make_unique<Socom>(...)
  4. Update BUILD.bazel to link the new adapter library instead of :mwcom_adapter

In theory ;) no changes to GatewayRouting, VsomeipAdapter, or any other file.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/03/17 15:46:10 Downloading https://releases.bazel.build/8.3.0/release/bazel-8.3.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: bbf4480d-ecc0-41d3-803d-42d6e5b3af7c
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'googletest', the root module requires module version googletest@1.17.0, but got googletest@1.17.0.bcr.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 5 packages loaded
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Loading: 5 packages loaded
    currently loading: 
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)
Analyzing: target //:license-check (6 packages loaded, 0 targets configured)

Analyzing: target //:license-check (29 packages loaded, 9 targets configured)

Analyzing: target //:license-check (91 packages loaded, 9 targets configured)

Analyzing: target //:license-check (96 packages loaded, 9 targets configured)

Analyzing: target //:license-check (128 packages loaded, 89 targets configured)

Analyzing: target //:license-check (167 packages loaded, 2618 targets configured)

Analyzing: target //:license-check (170 packages loaded, 5643 targets configured)

Analyzing: target //:license-check (172 packages loaded, 7609 targets configured)

Analyzing: target //:license-check (173 packages loaded, 7620 targets configured)

Analyzing: target //:license-check (173 packages loaded, 7620 targets configured)

Analyzing: target //:license-check (173 packages loaded, 7620 targets configured)

Analyzing: target //:license-check (180 packages loaded, 9645 targets configured)

Analyzing: target //:license-check (182 packages loaded, 9889 targets configured)

Analyzing: target //:license-check (182 packages loaded, 9889 targets configured)

Analyzing: target //:license-check (182 packages loaded, 9889 targets configured)

Analyzing: target //:license-check (182 packages loaded, 9889 targets configured)

Analyzing: target //:license-check (182 packages loaded, 9889 targets configured)

INFO: Analyzed target //:license-check (183 packages loaded, 11824 targets configured).
[8 / 13] Creating runfiles tree bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/score_tooling+/dash/tool/formatters/dash_format_converter.runfiles [for tool]; 0s local
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[10 / 13] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[11 / 13] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 247.490s, Critical Path: 2.69s
INFO: 13 processes: 9 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 13 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@TimofteBogdan1900 TimofteBogdan1900 force-pushed the bot6abt/96528_Configurable_vsomeip-someipd branch 4 times, most recently from 5cba0b1 to d8d73cd Compare March 12, 2026 17:25
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the bot6abt/96528_Configurable_vsomeip-someipd branch from d8d73cd to cdd3eb8 Compare March 12, 2026 17:42
@TimofteBogdan1900 TimofteBogdan1900 changed the title Configurable someipd Someipd initial architecture proof of concept Mar 13, 2026
@TimofteBogdan1900 TimofteBogdan1900 changed the title Someipd initial architecture proof of concept someipd initial architecture and design Mar 13, 2026
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the bot6abt/96528_Configurable_vsomeip-someipd branch from 8ef2436 to 93423f6 Compare March 13, 2026 17:39
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the bot6abt/96528_Configurable_vsomeip-someipd branch from 8b13d45 to b140dc8 Compare March 17, 2026 14:03
@TimofteBogdan1900 TimofteBogdan1900 force-pushed the bot6abt/96528_Configurable_vsomeip-someipd branch from b140dc8 to e5ec98c Compare March 17, 2026 14:20
@TimofteBogdan1900 TimofteBogdan1900 marked this pull request as ready for review March 17, 2026 14:21
@TimofteBogdan1900 TimofteBogdan1900 changed the title someipd initial architecture and design someipd create flexible architecture and design Mar 17, 2026
@TimofteBogdan1900 TimofteBogdan1900 changed the title someipd create flexible architecture and design someipd create initial modular architetcure proposal Mar 19, 2026
@TimofteBogdan1900 TimofteBogdan1900 changed the title someipd create initial modular architetcure proposal someipd create initial modular architecture proposal Mar 20, 2026
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