VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
someip_conf.h File Reference

Transport configuration for the someip:// SOME/IP (vsomeip) backend. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Transport configuration for the someip:// SOME/IP (vsomeip) backend.

SomeipConf configures the SOME/IP (Scalable service-Oriented MiddlewarE over IP) transport via the vsomeip library. SOME/IP is the standard automotive middleware protocol used in AUTOSAR environments over Ethernet.

Supported Node Types
someip:// supports all six node types: kPublisher, kSubscriber, kServer, kClient, kSetter, and kGetter.
SOME/IP Identifier Model
SOME/IP uses a numeric identifier hierarchy rather than string topic names:
Field Use case Description
service All SOME/IP Service ID (16-bit hex)
instance All Service Instance ID (16-bit hex)
method RPC only Method ID for kServer / kClient
groups Event/Field Event group set for pub/sub and field nodes
event Event/Field Event ID within the group
field Field only true when node is a field (getter/setter)
URL Format
// RPC (Server/Client):
someip://<service>/<instance>?method=<method_id>
// Event (Publisher/Subscriber):
someip://<service>/<instance>?groups=<g1,g2,...>&event=<event_id>
// Field (Setter/Getter):
someip://<service>/<instance>?groups=<g1,g2,...>&event=<event_id>&field=1

All numeric values are decimal. Service and instance must be non-zero.

Example
// RPC server on service 0x1234, instance 0x5678, method 0x0001:
vlink::Server<MyReq, MyResp> server("someip://4660/22136?method=1");
// Event publisher on service 0x1234, instance 0x5678, group 0x0001, event 0x0010:
vlink::Publisher<MyMsg> pub("someip://4660/22136?groups=1&event=16");
// Or construct directly:
vlink::SomeipConf pub_conf(0x1234, 0x5678, {0x0001}, 0x0010);
vsomeip Configuration
A vsomeip JSON configuration file can be loaded at startup:
vlink::SomeipConf::load_global_config_file("/etc/vsomeip/vsomeip.json");
Note
This header is compiled only when VLINK_SUPPORT_SOMEIP is defined.
service and instance must both be non-zero for is_valid() to return true.
For kPublisher / kSubscriber / kSetter / kGetter, both groups and event must be set; otherwise is_valid() returns false.
For kSetter / kGetter, field must be true.