泰安网站建设与优化/搜索引擎优化的基本内容

泰安网站建设与优化,搜索引擎优化的基本内容,生物公司网站建设方案,作弊的网站前言 SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块: 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 4.2.2 Req…

前言
SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:

1. SOME/IP协议讲解

2. SOME/IP-SD协议讲解

3. python/C++举例调试讲解


4.2.2 Request/Response Communication

One of the most common communication patterns is the request/response pattern.
One communication partner (Client) sends a request message, which is answered by
another communication partner (Server).
最常用的通信模型 就是 请求/响应模型,client请求 server回复响应.

[PRS_SOMEIP_00920]发送请求包 按照下面的步骤 就没错
Upstream requirements: RS_SOMEIP_00007
For the SOME/IP request message the client has to do the following for payload and
header:
• Construct the payload
• Set the Message ID based on the method the client wants to call
• Set the Length field to 8 bytes (for the part of the SOME/IP header after the length
field) + length of the serialized payload
8个字节是header length字段 后面的长度 
  +
payload的长度
• Optionally set the Request ID to a unique number (shall be unique for client only)
• Set the Protocol Version according [PRS_SOMEIP_00052]
• Set the Interface Version according to the interface definition
• Set the Message Type to REQUEST (i.e. 0x00)
• Set the Return Code to 0x00

[PRS_SOMEIP_00921]
Upstream requirements: RS_SOMEIP_00028, RS_SOMEIP_00007
To construct the payload of a request message, all input or inout arguments of the
method shall be serialized according to the order of the arguments within the signature
of the method.
不管是请求还是响应的参数列表 ,在序列化payload的时必须要按照规范的参数顺序进行序列化。

[PRS_SOMEIP_00922]
Upstream requirements: RS_SOMEIP_00007
The server builds the header of the response based on the header of the client’s
request and does in addition:
• Construct the payload
• take over the Message ID from the corresponding request
• Set the length to the 8 Bytes + new payload size
8个字节是header length字段 后面的长度 
  +
payload的长度
• take over the Request ID from the corresponding request
• Set the Message Type to RESPONSE (i.e. 0x80) or ERROR (i.e. 0x81)
• set Return Code to a return code according to [PRS_SOMEIP_00191].

[PRS_SOMEIP_00923]
Upstream requirements: RS_SOMEIP_00028, RS_SOMEIP_00007
To construct the payload of a response message, all output or inout arguments of the
method shall be serialized according to the order of the arguments within the signature
of the method.

[PRS_SOMEIP_00927]
Upstream requirements: RS_SOMEIP_00007
A server shall not sent a response message for a request with a specific Request ID
until the corresponding request message has been received.
如果client请求的 requestID 与pending的回复中的requestID 重复,则忽略这个消息 不做回复。

[PRS_SOMEIP_00928]
Upstream requirements: RS_SOMEIP_00007
A client shall ignore the reception of a response message with a specific Request ID,
when the corresponding request message has not yet been sent completely.
client收到重复的 requestID 的回复不做处理

4.2.3 Fire&Forget Communication

Requests without response message are called fire&forget.
不需要响应的请求 称为 fire&forget 很多需求规范也可以简写为F&F

[PRS_SOMEIP_00924] 组装格式如下
Upstream requirements: RS_SOMEIP_00006
For the SOME/IP request-no-return message the client has to do the following for
payload and header:
• Construct the payload
• Set the Message ID based on the method the client wants to call
• Set the Length field to 8 bytes (for the part of the SOME/IP header after the length
field) + length of the serialized payload
8个字节是header length字段 后面的长度 
  +
payload的长度
• Optionally set the Request ID to a unique number (shall be unique for client only)
• Set the Protocol Version according [PRS_SOMEIP_00052]
• Set the Interface Version according to the interface definition
• Set the Message Type to REQUEST_NO_RETURN (i.e. 0x01)
• Set the Return Code to 0x00

[PRS_SOMEIP_00171]
Upstream requirements: RS_SOMEIP_00006
Fire & Forget messages shall not return an error. Error handling and return codes
shall be implemented by the application when needed.
没有错误返回 上层应用自己记录处理

4.2.4 Notification Events

Notifications describe a general Publish/Subscribe-Concept. Usually the server publishes a service to which a client subscribes. On certain cases the server will send the
client an event, which could be for example an updated value or an event that occurred.
SOME/IP is used only for transporting the updated value and not for the publishing and
subscription mechanisms. These mechanisms are implemented by SOME/IP-SD.
服务端给向自己订阅的client端 发布 事件, 这些事件可能是周期 或者变化事件。
订阅的逻辑是在SOME/IP-SD协议中实现

[PRS_SOMEIP_00925]
Upstream requirements: RS_SOMEIP_00004
For the SOME/IP notification message the server has to do the following for payload
and header:
• Construct the payload
• Set the Message ID based on the event the server wants to send
• Set the Length field to 8 bytes (for the part of the SOME/IP header after the length
field) + length of the serialized payload
• Set the Client ID to 0x00. Set the Session ID according to
[PRS_SOMEIP_00932], [PRS_SOMEIP_00933], and [PRS_SOMEIP_00521].
In case of active Session Handling the Session ID shall be incremented upon
each transmission.
clientID  --- 设置为0
SessionID -- 按照之前的规范 要递增

• Set the Protocol Version according [PRS_SOMEIP_00052]
• Set the Interface Version according to the interface definition
• Set the Message Type to NOTIFICATION (i.e. 0x02)
• Set the Return Code to 0x00

[PRS_SOMEIP_00926]
Upstream requirements: RS_SOMEIP_00004
The payload of the notification message shall consist of the serialized data of the
event.
payload 要按照要求 序列化数据

[PRS_SOMEIP_00930]
Upstream requirements: RS_SOMEIP_00042
When more than one subscribed client on the same ECU exists, the system shall handle the replication of notifications in order to save transmissions on the communication
medium.

This is especially important, when notifications are transported using multicast messages

这段内容([PRS_SOMEIP_00930])描述了在 **SOME/IP** 中,当同一 ECU(电子控制单元)上有多个订阅客户端时,系统应如何处理通知消息的复制,以减少通信介质上的传输负载。以下是详细解释:

---

### 核心要求
1. **多客户端订阅**:
   - 当同一 ECU 上有多个客户端订阅了相同的服务或事件时,系统需要高效地处理通知消息的复制和分发。

2. **减少传输负载**:
   - 系统应优化通知消息的传输,避免在通信介质上重复发送相同的通知消息。
   - 特别是在使用 **组播(multicast)** 传输通知消息时,这种优化尤为重要。

---

### 关键点
1. **通知消息的复制**:
   - 当多个客户端订阅了相同的服务或事件时,服务端可能会生成相同的通知消息。
   - 系统需要在 ECU 内部复制这些通知消息,而不是通过通信介质多次发送。

2. **组播传输的优化**:
   - 组播是一种高效的通信方式,允许将单个消息发送给多个接收方。
   - 如果通知消息通过组播传输,系统应确保同一 ECU 上的多个客户端共享同一组播消息,而不是为每个客户端单独发送。

3. **通信介质的负载**:
   - 减少重复传输可以显著降低通信介质的负载,提高网络效率。
   - 这对于资源受限的嵌入式系统(如汽车电子系统)尤为重要。

---

### 实现建议
1. **ECU 内部消息复制**:
   - 在 ECU 内部实现消息复制机制,确保多个客户端可以共享同一通知消息。
   - 例如,使用共享内存或消息队列来分发通知消息。

2. **组播消息的共享**:
   - 如果通知消息通过组播传输,ECU 应确保所有订阅客户端都能接收到同一组播消息。
   - 避免为每个客户端单独发送组播消息。

3. **订阅管理**:
   - 实现高效的订阅管理机制,跟踪哪些客户端订阅了哪些服务或事件。
   - 在通知消息生成时,根据订阅列表进行消息分发。

4. **性能优化**:
   - 在 ECU 内部优化消息复制和分发的性能,确保实时性和低延迟。
   - 避免因消息复制导致的性能瓶颈。

---

### 示例场景
假设一个 ECU 上有三个客户端(Client A、Client B 和 Client C)订阅了同一个服务的事件通知。

#### 传统方式(未优化):
- 服务端为每个客户端单独发送通知消息,导致通信介质上传输三次相同的消息。

#### 优化方式:
1. 服务端通过组播发送一次通知消息。
2. ECU 接收到组播消息后,在内部复制并分发给 Client A、Client B 和 Client C。
3. 通信介质上只传输一次通知消息,减少了传输负载。

---

### 总结
[PRS_SOMEIP_00930] 强调了在 SOME/IP 中,当同一 ECU 上有多个订阅客户端时,系统应优化通知消息的复制和分发,以减少通信介质上的传输负载。特别是在使用组播传输通知消息时,这种优化可以显著提高网络效率和系统性能。实现时需要注意 ECU 内部的消息复制机制、组播消息的共享以及订阅管理的高效性。

4.2.4.1 Strategy for sending notifications

For different use cases different strategies for sending notifications are possible. The
following examples are common:
• Cyclic update — send an updated value in a fixed interval (e.g. every 100 ms for
safety relevant messages with Alive)
• Update on change — send an update as soon as a "value" changes (e.g. door
open)
• Epsilon change — only send an update when the difference to the last value is
greater than a certain epsilon. This concept may be adaptive, i.e. the prediction is
based on a history; thus, only when the difference between prediction and current
value is greater than epsilon an update is transmitted.
notifications 通知的 三种发送策略
1. 周期
2. 变化
3. 门限 -- 接触几家车企的规范 没看到使用这个

4.2.5 Fields

A field represents a status and has a valid value. The consumers subscribing for the
field instantly after subscription get the field value as an initial event.
一个Field 代表一种状态 并带有个有效值
client第一次订阅后 能立刻收到event的值

[PRS_SOMEIP_00179]
Upstream requirements: RS_SOMEIP_00009
A field shall be a combination of getter, setter and notification event.
Field是 getter / setter / notify的集合体

[PRS_SOMEIP_00180]
Upstream requirements: RS_SOMEIP_00009
A field without a setter and without a getter and without a notifier shall not exist. The
field shall contain at least a getter, a setter, or a notifier.
field 至少含有 getter/ setter/ notify 一种

[PRS_SOMEIP_00181]
Upstream requirements: RS_SOMEIP_00009
The getter of a field shall be a request/response call that has an empty payload in the
request message and the value of the field in the payload of the response message.
getter的 请求报文 不能带参数 ,只能响应包中携带返回值

[PRS_SOMEIP_00182]
Upstream requirements: RS_SOMEIP_00009
The setter of a field shall be a request/response call that has the desired value of the
field in the payload of the request message and the value that was set to the field in
the payload of the response message.
Note:
If the value of the request payload was adapted (e.g. because it was out of limits) the
adapted value will be transported in the response payload.
setter有请求 有响应。
请求 是想要设置的值。
返回 是设置后的实际值(如果请求的值超范围 server端会把调整后的值返回回去)

[PRS_SOMEIP_00909]
Upstream requirements: RS_SOMEIP_00002, RS_SOMEIP_00009
The notifier shall send an event message that transports the value of the field to the
client when the client subscribes to the field.
谁订阅field给谁发送 事件

[PRS_SOMEIP_00183]
Upstream requirements: RS_SOMEIP_00005, RS_SOMEIP_00009
The notifier shall send an event message that transports the value of a field and shall
follow the rules for events. Sending strategies include on change, on epsilon change,
and cyclic sending.
field的notify 发送事件 也是支持这三种模式:
周期 、变化、门限

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/70441.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Spring框架基本使用(Maven详解)

前言: 当我们创建项目的时候,第一步少不了搭建环境的相关准备工作。 那么如果想让我们的项目做起来方便快捷,应该引入更多的管理工具,帮我们管理。 Maven的出现帮我们大大解决了管理的难题!! Maven&#xf…

用大内存主机下载Visual Studio

用一台内存达到128G的主机下载Visual Studio 2022,用的是公司网络。下载速度让我吃了一惊,没人用网络了?还是网站提速了?以前最大只能达到5MB/秒。记录这段经历,是用来分析公司网络用的......

Mac系统下使用Docker快速部署MaxKB:打造本地知识库问答系统

随着大语言模型的广泛应用,知识库问答系统逐渐成为提升工作效率和个人学习的有力工具。MaxKB是一款基于LLM(Large Language Model)大语言模型的知识库问答系统,支持多模型对接、文档上传和自动爬取等功能。本文将详细介绍如何在Ma…

idea连接gitee(使用idea远程兼容gitee)

文章目录 先登录你的gitee拿到你的邮箱找到idea的设置选择密码方式登录填写你的邮箱和密码登录成功 先登录你的gitee拿到你的邮箱 具体位置在gitee–>设置–>邮箱管理 找到idea的设置 选择密码方式登录 填写你的邮箱和密码 登录成功

嵌入式开发岗位认识

目录 1.核心定义2.岗位方向3.行业方向4.技术方向5.工作职责6.核心技能7.等级标准8.优势与劣势9.市场薪资10. 发展路径11. 市场趋势12. 技术趋势 1.核心定义 嵌入式系统: 以应用为中心,以计算机技术为基础,软硬件可裁剪的专用计算机系统 特点…

图解循环神经网络(RNN)

目录 1.循环神经网络介绍 2.网络结构 3.结构分类 4.模型工作原理 5.模型工作示例 6.总结 1.循环神经网络介绍 RNN(Recurrent Neural Network,循环神经网络)是一种专门用于处理序列数据的神经网络结构。与传统的神经网络不同&#xff0c…

MySQL数据库入门到大蛇尚硅谷宋红康老师笔记 高级篇 part 2

第02章_MySQL的数据目录 1. MySQL8的主要目录结构 1.1 数据库文件的存放路径 MySQL数据库文件的存放路径:/var/lib/mysql/ MySQL服务器程序在启动时会到文件系统的某个目录下加载一些文件,之后在运行过程中产生的数据也都会存储到这个目录下的某些文件…

http 响应码影响 video 标签播放视频

背景 使用后端给的文件下载接口地址实现视频播放,但是 video 标签一直无法播放视频如下图,把接口地址放到浏览器请求能直接下载。但就是不能播放 原因 http 响应码不正确,返回201是无法播放视频200可以如下图 状态码的影响: 20…

OneNote手机/平板“更多笔记本”中有许多已经删掉或改名的,如何删除

问题描述: OneNote 在手机或平板上添加“更多笔记本”中,有许多已经删掉或改名的笔记本!如何删除? OR:如何彻底删除OneNote中的笔记本? 处理做法: 这个列表对应365里面的【最近打开】&#…

【 Avalonia UI 语言国际化 I18n】图文结合教学,保姆级教学,语言国际化就是这么简单(.Net C#)

完整项目地址 github : https://github.com/Crazy-GrowUp/AvaloniaI18nTest/tree/master gitee :https://gitee.com/jack_of_disco/avalonia-i18n-test 0.项目新建 Properties 文件夹 对应的项目配置文件里面就会增加 <Folder Include"Properties\" /> 1.项…

点击el-dialog弹框跳到其他页面浏览器的滚动条消失了多了 el-popup-parent--hidden

点击el-dialog弹框跳到其他页面浏览器的滚动条消失了 在使用 el-dialog 弹框时&#xff0c;Element Plus 会在弹框打开时自动给 body 添加 el-popup-parent–hidden 类&#xff0c;以隐藏滚动条。如果在跳转到其他页面时滚动条没有恢复&#xff0c;可能是因为 el-dialog 没有正…

JWT认证机制

Session认证机制中需要配合cookie才能实现&#xff0c;由于cookie默认不支持跨域访问&#xff0c;当涉及到前端跨域请求后端接口时&#xff0c;需要做很多额外的配置&#xff0c;才能实现跨域session认证。所以这里不推荐使用session身份认证机制&#xff0c;一般推荐使用jwt认…

qt:常见标签操作,倒计时功能,进度条与日历

1.标签常见函数 函数功能void setext(const QString &text)设置文本QString text()const获取文本void setPixmap(const QPixmap)与Pixmap()const设置和获取图像void setAlignment(Qt::Alignment alignment)设置对齐&#xff08;获取和上面一样&#xff09;void setWordWr…

DeepSeek等大模型功能集成到WPS中的详细步骤

记录下将**DeepSeek功能集成到WPS中**的步骤&#xff0c;以备忘。 1. 下载并安装OfficeAI插件 访问OfficeAI插件下载地址&#xff1a;https://www.office-ai.cn/&#xff0c;下载插件&#xff08;目前只支持windows系统&#xff09;。 注意&#xff0c;有两个插件&#xff0…

MATLAB学习之旅:从入门到基础实践

在当今科技飞速发展的时代,MATLAB作为一款强大的数学软件,犹如一把神奇的钥匙,能够打开众多领域的大门。无论是工程计算、数据分析,还是算法开发、可视化呈现,MATLAB都展现出了无与伦比的魅力。今天,就让我们踏上这段奇妙的MATLAB学习之旅,从最基础的部分开始,逐步探索…

栈,优先级队列,map,set

文章目录 栈题目解析代码 优先级队列题解代码 map题解代码 set题解代码 栈 题目解析 1.先把元素push进栈中&#xff0c;如果栈非空并且栈中的元素按顺序和k相等就出栈&#xff0c;直到栈为空或者k ! sk.top() 代码 #include<iostream> #include<stack> #include&l…

C++ Primer 类的静态成员

欢迎阅读我的 【CPrimer】专栏 专栏简介&#xff1a;本专栏主要面向C初学者&#xff0c;解释C的一些基本概念和基础语言特性&#xff0c;涉及C标准库的用法&#xff0c;面向对象特性&#xff0c;泛型特性高级用法。通过使用标准库中定义的抽象设施&#xff0c;使你更加适应高级…

Unity 全局屏幕点击特效

思路&#xff1a; 1、生成一个点击特效实例&#xff0c;每点击屏幕&#xff0c;就调整特效实例的位置并控制特效的显隐状态即可。 2、需要注意要保证在编辑器开发时或手机上运行时都要显示点击效果。 方案一 &#xff08;推荐&#xff09; using UnityEngine; using UnityEn…

什么是业务流程分类框架

业务流程分类框架是一个用于组织和系统化地分类业务流程的结构化方法。它旨在帮助企业理解、管理、分析和改进其运营流程。 可以把它想象成一个图书馆的图书分类系统&#xff0c;帮助快速找到和理解不同类型的书籍。对于业务流程来说&#xff0c;分类框架帮助快速了解不同类型的…

基于springboot校园健康系统的设计与实现(源码+文档)

大家好我是风歌&#xff0c;今天要和大家聊的是一款基于springboot的园健康系统的设计与实现。项目源码以及部署相关请联系风歌&#xff0c;文末附上联系信息 。 项目简介&#xff1a; 基于springboot校园健康系统的设计与实现的主要使用者管理员具有最高的权限&#xff0c;通…