前言
SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:
1. SOME/IP协议讲解
2. SOME/IP-SD协议讲解
3. python/C++举例调试讲解
Note: This means that the implementer of an ECU can define the Client-IDs as required by his implementation and the provider does not need to know this layout or definitions because he just copies the complete Request-ID in the response.
server不需要关心requestID的布局和内容 ,只需要拷贝回复就行
ClientID可用于区分不同的 ECUs
[PRS_SOMEIP_00702]
Upstream requirements: RS_SOMEIP_00025, RS_SOMEIP_00027
The Client ID is the unique identifier for the calling client inside the ECU. The Client
ID allows an ECU to differentiate calls from multiple clients to the same method.
每个ECU有唯一ClientID , 用来区分对同一方法的请求。一般情况client的IP port 足以区分不同的client,server端不用校验关心clientID。
也意味着每个ECU 如果运行多个SOME/IP-Client(ip/port会不一样)但ClientID必须一样。
[PRS_SOMEIP_00703]
Upstream requirements: RS_SOMEIP_00002, RS_SOMEIP_00025, RS_SOMEIP_00027
The Session ID is a unique identifier that allows to distinguish sequential messages
or requests originating from the same sender from each other.
# 对于server而言clientID 是区分不通ECU,但是同一个ECU发送的连续消息(notify)或请求(method/getter/setter)
就需要通过sessionID来的唯一性来区分了。
两种情况:
1. method/getter/setter --> client在未超时等待回复之前,继续请求 则用sessionID来区分
2. 不区分情况(除了下面的情况)sessionID 只管加1。
另外:
3. notify --> 大消息需要分包发送 --> 在分包发送的所有子包seesionID都一样。
注:一个ECU多个client的情况对于同一请求时sessionID可以相同,i
p/port有做区分了。
[PRS_SOMEIP_00532]
Upstream requirements: RS_SOMEIP_00025, RS_SOMEIP_00027
The Client ID shall also support being unique in the overall vehicle by having a
configurable prefix or fixed value (e.g. the most significant byte of Client ID being the
diagnostics address or a configured Client ID for a given application/SW-C).
# 每个ECU有唯一ClientID , 用来区分对同一方法的请求。又是在车辆中ClientID 又分出来前8位作为前缀来区分车辆(SOMEIP有可能跨车辆通信)
[PRS_SOMEIP_00932]
Upstream requirements: RS_SOMEIP_00027
In case Session Handling is not active, the Session ID shall be set to 0x00.
未激活态(没有请求-回复成对出现的场景)需要设置为0
一问:SOME/IP的offer报文中 s