VLink  2.0.0
A high-performance communication middleware
someip_conf.h 文件参考

Transport configuration for the someip:// AUTOSAR SOME/IP transport. 更多...

此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

详细描述

Transport configuration for the someip:// AUTOSAR SOME/IP transport.

SomeipConf binds the someip:// URL scheme to vsomeip, the reference open-source implementation of the AUTOSAR SOME/IP (Scalable service-Oriented MiddlewarE over IP) protocol. SOME/IP is the standard service-oriented communication protocol used in modern automotive Ethernet backbones; it carries RPC method calls, event broadcasts and notifiable field updates between ECUs. Unlike string-named transports, SOME/IP identifies endpoints purely through 16-bit numeric identifiers.

Supported Node Types
Publisher Subscriber Server Client Getter Setter
yes yes yes yes yes yes
SOME/IP Identifier Model
Field Applies to Description
service all node types 16-bit SOME/IP Service ID
instance all node types 16-bit Service Instance ID
method Server / Client 16-bit Method ID for RPC interfaces
groups Pub/Sub + Field Set of 16-bit Event Group IDs
event Pub/Sub + Field 16-bit Event ID within the selected groups
field Setter / Getter true marks the endpoint as a SOME/IP field
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

Numeric values are parsed by Helpers::to_int(), so decimal, 0x-prefixed hexadecimal, and leading-zero octal forms are all accepted. service and instance must be non-zero.

Example
// RPC server: service 0x1234, instance 0x5678, method 0x0001
auto server = vlink::Server<MyReq, MyResp>::create_unique("someip://4660/22136?method=1");
// Event publisher: service 0x1234, instance 0x5678, group 0x0001, event 0x0010
auto pub = vlink::Publisher<MyMsg>::create_unique("someip://4660/22136?groups=1&event=16");
// Direct construction:
vlink::SomeipConf conf(0x1234, 0x5678, {0x0001}, 0x0010);
vsomeip Configuration
A vsomeip JSON configuration file can be loaded process-wide before any endpoint is created:
vlink::SomeipConf::load_global_config_file("/etc/vsomeip/vsomeip.json");
注解
Compiled only when VLINK_SUPPORT_SOMEIP is defined.
service and instance must both be non-zero; otherwise is_valid() returns false.
For kPublisher / kSubscriber / kSetter / kGetter, both groups and event must be set.
For kSetter / kGetter, field must be true.