SOMEIP学习总结

发布时间:2024年01月14日

SOMEIP学习总结(包含VSOMEIP库)

一.基本概念

1.SOMEIP支持TCP和UDP两种传输方式

? 其中,SOMEIP-SD的消息都是通过UDP发送的

2.SOMEIP支持如下中间件特性:

  • Serialization – transforming into and from on-wire representation.

  • Remote Procedure Call (RPC) and Messaging – implementing remote invocation of functions as well as other messages.

  • Service Discovery (SD) – dynamically finding and functionality and configuring its access.

  • Publish/Subscribe (Pub/Sub) – dynamically configuring which data is needed and shall be sent to the client.

  • Segmentation of UDP messages – allowing the transport of large SOME/IP messages over UDP without the need of fragmentation.

    在这里插入图片描述

3.Remote Procedure Call (RPC) and Messaging支持下列消息

  • Request/Response Methods: A request sent from a client to the server and a response sent back from server to client. Additionally, SOME/IP allows error responses to be sent back from server to client instead of the regular response. This feature might be used to implement a different payload format in error cases.
  • Fire and Forget Methods: A request is sent from a client to the server.
  • Event: An event is sent from the server to a relevant clients. Which client needs this event will be determined via SOME/IP-SD.
  • Field: A field can have an option notifier (event to be sent cyclically or on-change), an optional setter (a request/response method to update the field), and an optional getter (a request/response method to read out the current value of the field.)

4.服务和事件组的关系

在这里插入图片描述

5.Magic Cookie的作用

当SOMEIP在TCP传输写一下,当发生流错误时,可以通过magic cookie找到流中下一条报文的开头位置

6.SOMEIP-SD消息的结构

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

7.Entry携带Option的内容

在这里插入图片描述

8.停止OfferService的方式

? Offer和StopOffer的SD报文中,service entry的type都是1(offer),唯一不同的是TTL,在停止service的offer时,发布的SD报文中,service entry的ttl值为0

9.SOMEIP普通消息的结构

在这里插入图片描述

10.消息头中的Message Type字段的含义

img

? 可以看到,Message Type字段(一个字节)的第七个BIT位是TP FLAG,当使用UDP传输并且payload超过1400字节时,会启用TP传输,此时,Message Type字段的TP FLAG会变成1

https://www.some-ip.com/details.shtml

https://blog.csdn.net/Aliven888/article/details/123333466

文章来源:https://blog.csdn.net/CHALLENG_EVERYTHING/article/details/135581634
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。