SOMEIP学习总结

本文概述了SOMEIP协议的基本概念,包括其支持的TCP/UDP传输、RPC/Messaging功能、ServiceDiscovery、Publish/Subscribe等特性,以及MagicCookie的作用、SD消息结构、OfferService的管理方法和消息头部的MessageType字段。
摘要由CSDN通过智能技术生成

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值