荔湾做网站公/针对本地的免费推广平台

荔湾做网站公,针对本地的免费推广平台,上海app系统开发,策划公司网站前言 SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块: 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 5.1.3.1 E…

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

1. SOME/IP协议讲解

2. SOME/IP-SD协议讲解

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


5.1.3.1 Eventgroup Entry 订阅、订阅回复、停止订阅Entry

sub/suback/subnack报文中 有显示订阅组 按组订阅的 不是具体eventID
具体eventID 在SOME/IP报文中有体现

5.1.3.1.1 Subscribe Eventgroup Entry 订阅事件组entry

[PRS_SOMEIPSD_00385]
Upstream requirements: RS_SOMEIPSD_00015
The Subscribe Eventgroup entry type shall be used to subscribe to an eventgroup.
Subscribe Eventgroup entry 用于订阅 事件组 -- 容易理解的陈述

[PRS_SOMEIPSD_00386]
Upstream requirements: RS_SOMEIPSD_00015
下面是订阅报文的entry格式。
Subscribe Eventgroup entries shall set the entry fields in the following way:
• Type shall be set to 0x06 (SubscribeEventgroup).
• Service ID shall be set to the Service ID of the service instance that includes the
eventgroup subscribed to.
• Instance ID shall be set to the Instance ID of the service instance that includes
the eventgroup subscribed to.
• Major Version shall be set to the Major Version of the service instance of the
eventgroup subscribed to.
• Eventgroup ID shall be set to the Eventgroup ID of the eventgroup subscribed to.
• TTL shall be set to the lifetime of the subscription.
– If set to 0xFFFFFF, the Subscribe Eventgroup entry shall be considered valid
until the next reboot.
– TTL shall not be set to 0x000000 since this is considered to be the Stop
Offer Service Entry.
• Reserved shall be set to 0x000 until further notice.
• Counter shall be used to differentiate between parallel subscribes to the same
eventgroup of the same service (only difference in endpoint). If not used, set to
0x0. Counter不太常用。其实通过客户端的的端点(IP+PORT)就可以区分客户端了,counter只是可以作为辅助

[PRS_SOMEIPSD_00846]
Upstream requirements: RS_SOMEIPSD_00015, RS_SOMEIPSD_00025
A SubscribeEventgroup entry reference the endpoints (IP address, port, and protocol)
where the client wishes to receive the events. A client service could subscribe to
the same Eventgroup either with a client unicast endpoint or with a client multicast
endpoint: 
• If a client subscribes with a client unicast endpoint via an Endpoint Option, the
client announces its desire to receive the events as unicast events transmitted to
the given unicast endpoint.
• If a client subscribes with a client multicast endpoint via an Endpoint Option, the
client announces its desire to receive the events as multicast events transmitted
to the given multicast endpoint.
订阅entry对应的 endpoint - option  只能是单播 或 UDP组播。option中的IP-PORT是client自己的(希望server往这里发送的地址)

[PRS_SOMEIPSD_00387]
Upstream requirements: RS_SOMEIPSD_00015, RS_SOMEIPSD_00025
SubscribeEventgroup entries shall reference options according to the following rules:
• either up to two IPv4 or up to two IPv6 Endpoint Options (one for UDP, one for
TCP)
• either up to one IPv4 Multicast Option or up to one IPv6 Multicast Option (only
UDP supported)

Note:
This explicitly rules out that a single service instance is offered via IPv4 and IPv6 at the
same time.
### **1. 是否不能同时支持 IPv4 和 IPv6?**
是的,根据规范描述,**同一个服务实例不能同时通过 IPv4 和 IPv6 提供**。

#### 规范原文:
> This explicitly rules out that a single service instance is offered via IPv4 and IPv6 at the same time.

#### 解释:
- 在 `SubscribeEventgroup` 消息中,服务实例的端点选项(Endpoint Options)**只能选择 IPv4 或 IPv6**,而不能同时支持两者。
- 具体规则:
  - 最多可以包含 **两个 IPv4 端点选项**(一个用于 UDP,一个用于 TCP)。
  - 或者,最多可以包含 **两个 IPv6 端点选项**(一个用于 UDP,一个用于 TCP)。

#### 示例:
- **允许**:
  - 两个 IPv4 端点选项(UDP 和 TCP)。
  - 两个 IPv6 端点选项(UDP 和 TCP)。
- **不允许**:
  - 一个 IPv4 端点选项和一个 IPv6 端点选项。

---

### **2. 是否可以同时支持 UDP 单播和 UDP 组播?**
是的,**可以同时支持 UDP 单播和 UDP 组播**。

#### 规范原文:
> either up to one IPv4 Multicast Option or up to one IPv6 Multicast Option (only UDP supported)

#### 解释:
- 在 `SubscribeEventgroup` 消息中,可以同时包含以下选项:
  - **单播端点选项**(Unicast Endpoint Option):
    - 用于 UDP 单播通信。
    - 例如:`IPv4 Endpoint Option` 或 `IPv6 Endpoint Option`。
  - **组播端点选项**(Multicast Option):
    - 用于 UDP 组播通信。
    - 例如:`IPv4 Multicast Option` 或 `IPv6 Multicast Option`。
- 需要注意的是:
  - 组播选项 **仅支持 UDP**,不支持 TCP。
  - 单播和组播选项的 IP 版本必须一致(即 IPv4 单播 + IPv4 组播,或 IPv6 单播 + IPv6 组播)。

#### 示例:
- **允许**:
  - 一个 IPv4 单播端点选项(UDP) + 一个 IPv4 组播选项(UDP)。
  - 一个 IPv6 单播端点选项(UDP) + 一个 IPv6 组播选项(UDP)。
- **不允许**:
  - 一个 IPv4 单播端点选项(UDP) + 一个 IPv6 组播选项(UDP)。

---

### **3. 总结**
- **IPv4 和 IPv6**:
  - 同一个服务实例 **不能同时支持 IPv4 和 IPv6**。
  - 必须选择其中一种 IP 版本(IPv4 或 IPv6)。
- **UDP 单播和 UDP 组播**:
  - 可以同时支持 **UDP 单播和 UDP 组播**。
  - 单播和组播的 IP 版本必须一致(IPv4 或 IPv6)。

---

### **示例配置**
#### 示例 1:IPv4 单播 + IPv4 组播
- **单播**:
  - `IPv4 Endpoint Option`(UDP):`192.168.1.1:5000`
- **组播**:
  - `IPv4 Multicast Option`(UDP):`239.255.0.1:5001`

#### 示例 2:IPv6 单播 + IPv6 组播
- **单播**:
  - `IPv6 Endpoint Option`(UDP):`2001:db8::1:5000`
- **组播**:
  - `IPv6 Multicast Option`(UDP):`ff02::1:5001`

---

### **注意事项**
1. **IP 版本一致性**:
   - 单播和组播选项的 IP 版本必须一致。
   - 例如,不能混合使用 IPv4 单播和 IPv6 组播。

2. **TCP 不支持组播**:
   - 组播选项 **仅支持 UDP**,TCP 不支持组播。

3. **端点选项数量限制**:
   - 最多两个端点选项(单播 + 组播)。
   - 例如,不能同时配置两个单播端点选项和一个组播端点选项。

---

[PRS_SOMEIPSD_00828]
Upstream requirements: RS_SOMEIPSD_00015, RS_SOMEIPSD_00025
When receiving a SubscribeEventgroup or StopSubscribeEventgroup the Service ID,
Instance ID, Eventgroup ID, and Major Version shall match exactly to the configured
values to identify an Eventgroup of a Service Instance.
当server收到 sub/stop sub报文时要 严格核对 Service ID,
Instance ID, Eventgroup ID, and Major Version 是否匹配

[PRS_SOMEIPSD_00810]
Upstream requirements: RS_SOMEIPSD_00015, RS_SOMEIPSD_00025
If the server receives a Subscribe Eventgroup entry without a UDP Endpoint Option
(see [PRS_SOMEIPSD_00387]) and the MULTICAST_THRESHOLD for the Eventgroup is not configured with value 1 then SubscribeEventGroupNack shall be sent
back to the client. 
如果server 没有收到 udp单播的订阅(但是订阅的组又只支持UDP单播-- 客户矩阵表定义 并且MULTICAST_THRESHOLD!=1)则需要回复 sub nack报文

5.1.3.1.2 Stop Subscribe Eventgroup Entry  停止订阅事件组 entry
[PRS_SOMEIPSD_00388]
Upstream requirements: RS_SOMEIPSD_00017
The Stop Subscribe Eventgroup entry type shall be used to stop subscribing to eventgroups.
stop sub Eventgroup entry 类型报文用来 停止订阅事件组 -- 简单的陈述
[PRS_SOMEIPSD_00389]
Upstream requirements: RS_SOMEIPSD_00017
Stop Subscribe Eventgroup entries shall set the entry fields exactly like the Subscribe
Eventgroup entry they are stopping, except:
• TTL shall be set to 0x000000.
stop sub的报文 就是把 sub报文中的TTL修改为0x000000

[PRS_SOMEIPSD_00574]
Upstream requirements: RS_SOMEIPSD_00017
A Stop Subscribe Eventgroup Entry shall reference the same options the Subscribe
Eventgroup Entry referenced. This includes but is not limited to Endpoint and Configuration options.
停止订阅和订阅报文不同的另一点 就是 不用携带 options 配置项

5.1.3.1.3 Subscribe Eventgroup Acknowledgement (Subscribe Eventgroup
Ack) Entry 订阅事件组 回复报文
[PRS_SOMEIPSD_00390]
Upstream requirements: RS_SOMEIPSD_00015
The Subscribe Eventgroup Acknowledgment entry type shall be used to indicate that
Subscribe Eventgroup entry was accepted.
回复报文 用来说明 接受client的订阅
[PRS_SOMEIPSD_00391]
Upstream requirements: RS_SOMEIPSD_00015
Subscribe Eventgroup Acknowledgment entries shall set the entry fields in the following way:
• Type shall be set to 0x07 (SubscribeEventgroupAck). -- 固定值
• Service ID, Instance ID, Major Version, Eventgroup ID, TTL, Reserved and
Counter shall be the same value as in the Subscribe Eventgroup that is being
answered.
Service ID, Instance ID, Major Version, Eventgroup ID, TTL, Reserved and
Counter 这些字段的值和 订阅包的保持一致 (entry)

[PRS_SOMEIPSD_00392]
Upstream requirements: RS_SOMEIPSD_00015
Subscribe Eventgroup Ack entries referencing events and notification events that are
transported via multicast shall reference an IPv4 Multicast Option and/or and IPv6
Multicast Option. The Multicast Options state to which Multicast address and port the
events and notification events will be sent to.
options只能携带 IPv4 或 IPv6 组播地址 和 port 

[PRS_SOMEIPSD_00829]
Upstream requirements: RS_SOMEIPSD_00015
When receiving a SubscribeEventgroupAck or SubscribeEventgroupNack the Service
ID, Instance ID, Eventgroup ID, and Major Version shall match exactly to the corresponding SubscribeEventgroup Entry to identify an Eventgroup of a Service Instance
收到订阅ack和 订阅失败ack -- 要检查Service ID, Instance ID, Eventgroup ID, and Major Version 等字段严格匹配
 


5.1.3.1.4 Subscribe Eventgroup Negative Acknowledgement (Subscribe Eventgroup Nack) Entry 
[PRS_SOMEIPSD_00393]
Upstream requirements: RS_SOMEIPSD_00015
The Subscribe Eventgroup Negative Acknowledgment entry type shall be used to
indicate that Subscribe Eventgroup entry was NOT accepted.
拒绝订阅回复 -- 表示不接收client的订阅

[PRS_SOMEIPSD_00394]
Upstream requirements: RS_SOMEIPSD_00015
Subscribe Eventgroup Negative Acknowledgment entries shall set the entry fields in
the following way:
• Type shall be set to 0x07 (SubscribeEventgroupAck). -- 固定值
• Service ID, Instance ID, Major Version, Eventgroup ID, Counter, and Reserved
shall be the same value as in the Subscribe that is being answered.
Service ID, Instance ID, Major Version, Eventgroup ID, Counter, and Reserved 字段和订阅包保持一致。

• The TTL shall be set to 0x000000. -- 固定值

[PRS_SOMEIPSD_00566]
Upstream requirements: RS_SOMEIPSD_00015
Reasons to not accept a Subscribe Eventgroup include (but are not limited to):
拒绝订阅的情况可能包含这些 -- 但不仅限于这些
• Combination of Service ID, Instance ID, Eventgroup ID, and Major Version is unknown
• Required TCP-connection was not opened by client
• Problems with the references options occurred
• Resource problems at the Server
• Security association not yet established

[PRS_SOMEIPSD_00527]
Upstream requirements: RS_SOMEIPSD_00015
When the client receives a SubscribeEventgroupNack as answer on a SubscribeEventgroup for which a TCP connection is required, the client shall check the
TCP connection and shall restart the TCP connection if needed.
当client收到 tcp 事件组 订阅失败回复时 要检查自己的TCP是否建链

Note: [PRS_SOMEIPSD_00527] involves checking the state of the network security
protocol
Rational:
The server might have lost the TCP connection and the client has not.
Checking the TCP connection might include the following:
• Checking whether data is received for e.g. other Eventgroups.
• Sending out a Magic Cookie message and waiting for the TCP ACK.
• Reestablishing the TCP connection.
[PRS_SOMEIPSD_00842] Overview of currently supported Entry Types
Upstream requirements: RS_SOMEIPSD_00015
**TCP 连接状态检查** 和 **Entry Types** 的详细解析:

---

### **TCP 连接状态检查**
#### **背景**
在 SOME/IP 协议中,TCP 连接的可靠性非常重要。如果服务器和客户端之间的 TCP 连接出现问题(例如服务器丢失连接,但客户端未感知),可能会导致通信中断或数据丢失。因此,规范 **[PRS_SOMEIPSD_00527]** 提出了检查 TCP 连接状态的机制。

#### **检查方法**
规范中提到了以下几种检查 TCP 连接状态的方法:
1. **检查是否接收到其他事件组的数据**:
   - 如果客户端仍然可以接收到其他事件组(Eventgroup)的数据,说明 TCP 连接可能仍然有效。
   - 如果没有任何数据接收,可能表明 TCP 连接已断开。

2. **发送 Magic Cookie 消息并等待 TCP ACK**:
   - 客户端可以发送一个特殊的 **Magic Cookie 消息** 到服务器,并等待服务器的 TCP ACK 响应。
   - 如果收到 ACK,说明 TCP 连接仍然有效。
   - 如果未收到 ACK,说明 TCP 连接可能已断开。

3. **重新建立 TCP 连接**:
   - 如果检测到 TCP 连接已断开,客户端应尝试重新建立 TCP 连接。
   - 重新建立连接的过程包括重新发送 `SubscribeEventgroup` 消息等。

#### **Magic Cookie 消息**
- **作用**:用于检测 TCP 连接是否仍然有效。
- **实现**:
  - 客户端发送一个特殊的消息(Magic Cookie)到服务器。
  - 服务器收到后,必须回复一个 TCP ACK。
  - 如果客户端未收到 ACK,可以认为 TCP 连接已断开。

#### **示例流程**
1. 客户端检测到长时间未收到服务器的数据。
2. 客户端发送 Magic Cookie 消息到服务器。
3. 如果收到服务器的 TCP ACK,继续维持连接。
4. 如果未收到 TCP ACK,客户端尝试重新建立 TCP 连接。

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

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

相关文章

【Linux】learning notes(3)make、copy、move、remove

文章目录 1、mkdir (make directory)2、rmdir (remove directory)3、rm(remove)4、>5、touch 新建文件6、mv(move)7、cp(copy) 1、mkdir (make…

智能AI替代专家系统(ES)、决策支持系统(DSS)?

文章目录 前言一、专家系统(ES)是什么?二、决策支持系统(DSS)是什么?1.决策支持系统定义2.决策系统的功能与特点3.决策支持系统的组成 三、专家系统(ES)与决策支持系统(D…

实现Python+Django+Transformers库中的BertTokenizer和BertModel来进行BERT预训练,并将其应用于商品推荐功能

一、环境安装准备 #git拉取 bert-base-chinese 文件#创建 虚拟运行环境python -m venv myicrplatenv#刷新source myicrplatenv/bin/activate#python Django 集成nacospip install nacos-sdk-python#安装 Djangopip3 install Django5.1#安装 pymysql settings.py 里面需要 # 强制…

Qt Creator + CMake 构建教程

此教程基于: Qt 6.7.4Qt Creator 15.0.1CMake 3.26.4 Qt 6 以下的版本使用 CMake 构建可能会存在一些问题. 目录 新建窗体工程更新翻译添加资源软件部署(Deploy) 此教程描述了如何一步步在 Qt Creator 中使用 CMake 构建应用程序工程. 涉及 新建窗体工程, 更新翻译, 添加资源, …

5个GitHub热点开源项目!!

1.自托管 Moonlight 游戏串流服务:Sunshine 主语言:C,Star:14.4k,周增长:500 这是一个自托管的 Moonlight 游戏串流服务器端项目,支持所有 Moonlight 客户端。用户可以在自己电脑上搭建一个游戏…

【Mark】记录用宝塔+Nginx+worldpress+域名遇到的跨域,301,127.0.0.1,CSS加载失败问题

背景 想要用宝塔搭建worldpress,然后用域名直接转https,隐藏掉ipport。 结果被折磨了1天,一直在死活在301,127.0.0.1打转 还有css加载不了的情况 因为worldpress很多是301重定向的,所以改到最后我都不知道改了什么&am…

基于Kerberos认证对接华为云Elasticsearch

可以通过华为官方提供的Elasticsearch Java客户端(基于Elasticsearch官方版本改造),实现基于Kerberos认证访问和操作华为云Elasticsearch;亦可以使用更加通用的开源Elasticsearch Java客户端bboss,实现基于Kerberos认证…

【湖北省计算机信息系统集成协会主办,多高校支持 | ACM出版,EI检索,往届已见刊检索】第二届边缘计算与并行、分布式计算国际学术会议(ECPDC 2025)

第二届边缘计算与并行、分布式计算国际学术会议(ECPDC 2025)将于2025年4月11日至13日在中国武汉盛大召开。本次会议旨在为边缘计算、并行计算及分布式计算领域的研究人员、学者和行业专家提供一个高水平的学术交流平台。 随着物联网、云计算和大数据技术…

CSS—背景属性与盒子模型(border、padding、margin)

目录 一.背景属性 二.盒子模型 1.边框border a. 圆角属性border-radius b. 图像属性border-image 2. 内边距padding 3. 外边距margin 3. 宽度width与高度height 一.背景属性 浏览器背景图默认是平铺效果(复制图片直至填满设置的区域大小) 背景…

【文献阅读】A Survey Of Resource-Efficient LLM And Multimodal Foundation Models

发表时间:二〇二四年九月二十三日 摘要 大型基础模型,包括大语言模型(LLMs)、视觉Transformer(ViTs)、扩散模型以及基于大语言模型的多模态模型,正在革新整个机器学习的生命周期,…

蓝桥 发现环

0发现环 - 蓝桥云课 找到环 不过在最近一次维护网络时,管理员误操作使得某两台电脑之间增加了一条数据链接,于是网络中出现了环路。环路上的电脑由于两两之间不再是只有一条路径,使得这些电脑上的数据传输出现了BUG。 为了恢复正常传输&am…

不同版本的BLE和WiFi有什么区别?

一、蓝牙技术对比:从 Bluetooth 4.0 到 5.3 的演进与室内定位应用 蓝牙技术自推出以来,经历了多次重大升级,每一代都在传输速率、功耗、覆盖范围和功能上有所改进。本文将从 Bluetooth 4.0 到 5.3,逐一对比各版本的特点&#xff0…

华为hcia——Datacom实验指南——STP工作基本原理及STP/RSTP基本功能配置

什么时候需要用到STP 在二层交换网络中,为了避免环路产生。 什么是STP STP生成树协议,是用来在冗余链路上消除二层环路。在众多交换机中,需要设置出一个根桥,其余的交换机称为非根桥,根桥是整个交换网络的核心&…

【后端】Docker一本通

长期更新补充,建议关注收藏点赞 目录 Docker概述安装部署Docker基本操作使用docker部署tomcat使用docker部署mysql Docker概述 docker是⼀个应⽤级隔离的虚拟化技术docker三大核心概念 镜像:是具有源的所有特征的⼀个标记⽂件 仓库:存放镜像…

linux中断调用流程(arm)

文章目录 ARM架构下Linux中断处理全流程解析:从硬件触发到驱动调用 ⚡**一、中断触发与硬件层响应** 🔌**1. 设备触发中断** 📡 **二、CPU阶段:异常入口与上下文处理** 🖥️**1. 异常模式切换** 🔄**2. 跳转…

第十四届蓝桥杯大赛软件赛国赛C/C++大学C组

A 【跑步计划——日期问题】-CSDN博客 B 【残缺的数字】-CSDN博客 C 题目 代码 #include <bits/stdc.h> using namespace std;void change(int &x) {int sum 0, t x;while(t){sum t % 10;t / 10;}x - sum; } int main() {int n;cin >> n;int ans 0;…

汽车低频发射天线介绍

汽车低频PKE天线是基于RFID技术的深度研究及产品开发应用的一种天线&#xff0c;在汽车的智能系统中发挥着重要作用&#xff0c;以下是关于它的详细介绍&#xff1a; 移动管家PKE低频天线结构与原理 结构&#xff1a;产品一般由一个高Q值磁棒天线和一个高压电容组成&#xff…

蓝桥杯web第三天

展开扇子题目&#xff0c; #box:hover #item1 { transform:rotate(-60deg); } 当悬浮在父盒子&#xff0c;子元素旋转 webkit display: -webkit-box&#xff1a;将元素设置为弹性伸缩盒子模型。-webkit-box-orient: vertical&#xff1a;设置伸缩盒子的子元素排列方…

ubuntu22.04系统如何自建2级ntp服务器

一&#xff1a;ntp服务器详情 服务器型号 系统版本 IP地址 主机名 ntp服务版本 虚拟机8c-32g-1T Ubuntu22.04 10.20.30.2 DMZ-NTP-SERVER 4.2.8p15 二&#xff1a;ntp服务端部署配置脚本 #!/bin/bash # 脚本信息 echo "--------------------------…

计算机毕业设计SpringBoot+Vue.js汽车资讯网站(源码+文档+PPT+讲解)

温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 作者简介&#xff1a;Java领…