Gateway Daemon Architecture#

Overview#

gatewayd (SOME/IP Gateway Daemon (comp__gatewayd)) is the ASIL_B SOME/IP Gateway Daemon in the S-CORE communication stack. It bridges local ASIL_B and QM applications communicating over score::mw::com (LoLa shared-memory IPC) with the QM someipd network daemon (SOME/IP Network Daemon (comp__someipd)), isolating local safety-critical applications from the third-party SOME/IP network stack while handling SOME/IP header framing and sample serialization within the ASIL_B process boundary.

Description#

Rationale Behind Architecture Decomposition#

gatewayd separates process-level safety isolation and startup coordination from per-service directional bridging:

  • ASIL_B isolation from the QM network stack: To maintain freedom from interference (FFI) between vsomeip (QM) and ASIL_B applications, gatewayd runs as a separate ASIL_B process with zero dependency on vsomeip. It runs score_com_serializer and frames or strips the 16-byte SOME/IP header contiguously in shared memory inside the ASIL_B domain (where E2E protection will run), while someipd (QM) owns the network sockets and vsomeip routing.

  • Startup synchronization before service bridging (main.cpp): main.cpp initializes the configuration, serializer plugin, mw::com runtime, and socom::Runtime, creates the gateway_ipc_binding client, and waits for binding_client->is_connected() before creating any service adapters so someipd is guaranteed to have registered the bridged IPC services first.

  • Directional split (LocalServiceInstance vs RemoteServiceInstance): Outbound and inbound services have opposite discovery and mw::com roles — LocalServiceInstance discovers local mw::com providers via GenericProxy and publishes framed SOME/IP events into a socom server connector, whereas RemoteServiceInstance offers a local GenericSkeleton up front and subscribes to incoming SOME/IP events via a socom client connector.

Static Architecture#

Gateway Daemon Static Architecture
status: valid
security: NO
safety: ASIL_B
version: 1

Component structure of gatewayd and its dependencies on mw::com, socom, gateway_ipc_binding, and serializer.

Fig. 7 Gateway Daemon Static Component Diagram#

Dynamic Architecture#

Gateway Daemon Event Forwarding
status: valid
security: NO
safety: ASIL_B
version: 1

Runtime sequence for local service event forwarding (Application to gatewayd to someipd) and remote service event forwarding (someipd to gatewayd to Application).

Fig. 8 Gateway Daemon Event Forwarding Sequence Diagram#

Interfaces#

gatewayd is an executable daemon process and does not expose a C++ library header to external applications. Internally, main.cpp uses two adapter factory interfaces in namespace score::someip_gateway::gatewayd.

LocalServiceInstance Adapter Interface
status: valid
security: NO
safety: ASIL_B

Internal C++ factory and discovery interface declared in score/gatewayd/impl/local_service_instance.h (namespace score::someip_gateway::gatewayd) for bridging locally provided mw::com services to someipd.

CreateAsyncLocalServices and Create
status: valid
security: NO
safety: ASIL_B
version: 1
  • LocalServiceInstance::CreateAsyncLocalServices: Starts asynchronous mw::com::GenericProxy discovery for a configured local service instance and instantiates LocalServiceInstance (stopping discovery) once the provider is found.

  • LocalServiceInstance::Create: Enables the socom server connector toward someipd and subscribes to configured GenericProxyEvent updates to frame, serialize, and forward application samples.

RemoteServiceInstance Adapter Interface
status: valid
security: NO
safety: ASIL_B

Internal C++ factory interface declared in score/gatewayd/impl/remote_service_instance.h (namespace score::someip_gateway::gatewayd) for bridging remotely provided SOME/IP services from someipd to local mw::com consumer applications.

CreateAsyncRemoteService and Create
status: valid
security: NO
safety: ASIL_B
version: 1
  • RemoteServiceInstance::CreateAsyncRemoteService: Queries event type size and alignment from score_com_serializer, creates the local mw::com::GenericSkeleton, and delegates to RemoteServiceInstance::Create.

  • RemoteServiceInstance::Create: Offers the mw::com::GenericSkeleton to local applications and registers a socom client connector that subscribes to remote SOME/IP events when on_service_state_change(Service_state::available) fires, strips the 16-byte header, and publishes deserialized LoLa samples.