SOME/IP-SD -- 协议英文原文讲解2
前言
SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:
1. SOME/IP协议讲解
2. SOME/IP-SD协议讲解
3. python/C++举例调试讲解
5.1.2.2 SOME/IP-SD Header
[PRS_SOMEIPSD_00252]
Upstream requirements: RS_SOMEIPSD_00001
SOME/IP-SD shall be transported using SOME/IP.
SD报文 是基于SOME/IP协议头传输的在其基础上继续叠加SD头
[PRS_SOMEIPSD_00252] can be seen in Figure 5.2.
[PRS_SOMEIPSD_00253]
Upstream requirements: RS_SOMEIPSD_00006
The SOME/IP-SD Header shall start with an 8 Bit field called flags.
See a representation of Flags in Figure 5.3.
SD header 最开始是个8位的flags
如果仅Reboot Flag是 1 则flag字节的值是0x80.
rebootFlag 为 1 表示新的一段 订阅关系的开始
[PRS_SOMEIPSD_00254]
Upstream requirements: RS_SOMEIPSD_00006
The first flag of the SOME/IP-SD Flags field (highest order bit) shall be called Reboot
Flag.
For flags see Figure 5.3.
[PRS_SOMEIPSD_00255]
Upstream requirements: RS_SOMEIPSD_00006
The Reboot Flag of the SOME/IP-SD Header shall be set to one for all messages
after reboot until the Session-ID in the SOME/IP-Header wraps around and thus starts
with 1 again. After this wrap around the Reboot Flag is set to 0.
reboot_flag sessionID
1 1 --->开机
0 2
0 3
0 4
... ...
... ...
... ...
0 0xffff
1 1 --> sessionID 绕回
0 2
0 3
0 4
... ...
... ...
[PRS_SOMEIPSD_00256]
Upstream requirements: RS_SOMEIPSD_00002, RS_SOMEIPSD_00003
The information for the reboot flag and the Session ID shall be kept for multicast and
unicast separately.
(reboot flag and the Session ID )的值 多播和 单播的情况要分开
[PRS_SOMEIPSD_00631]
Upstream requirements: RS_SOMEIPSD_00002, RS_SOMEIPSD_00003
The information for the reboot flag and the Session ID shall be kept for every senderreceiver relation (i.e. source address and destination address) separately.
不通的发送-接收 关系 要分开使用 (reboot flag and the Session ID)
Note:
This means there shall be separate counters for sending and receiving.
Sending
client / server的sessionID 没联系,各自管理,
比如 client sub server的sessionID 和 server suback client的sessionID 不相关。
• There shall be a counter for multicast.(对于发送端来说 多播只配一路)
• There shall be a separate counter for each peer for unicast.
Receiving
• There shall be a counter for each peer for multicast.
• There shall be a counter for each peer for unicast.
[PRS_SOMEIPSD_00258]
Upstream requirements: RS_SOMEIPSD_00006
The detection of a reboot shall be done as follows (with the new values of the current
packet from the communication partner and old the last value received before):
if old.reboot==0 and new.reboot==1 then Reboot detected
OR
if old.reboot==1 and new.reboot==1 and old.session_id>=new.session_id then Reboot
detected
reboot_flag sessionID
1 1 --->开机 reboot
0 2
0 3
0 4
... ...
... ...
0 999
1 1000
1 1001 ---> 主动发起reboot (old.reboot==1 and new.reboot==1 and old.session_id>=new.session_id)
0 1002
... ...
... ...
0 0xffff
1 1 --> sessionID 绕回 -- reboot
0 2
0 3
0 4
... ...
... ...
[PRS_SOMEIPSD_00259]
Upstream requirements: RS_SOMEIPSD_00002
The second flag of the SOME/IP-SD Flags (second highest order bit) shall be called
Unicast Flag.
Flag第二高位 表示 单播标志
For flags see Figure 5.3.
[PRS_SOMEIPSD_00540]
Upstream requirements: RS_SOMEIPSD_00002
The Unicast Flag of the SOME/IP-SD Header shall be set to Unicast (that means 1)
for all SD Messages since this means that receiving using unicast is supported.
Note:
The Unicast Flag is left over from historical SOME/IP versions and is only kept for
compatibility reasons. Its use besides this is very limited.
此标志设置为1 表示支持单播接收 -- 目前都是单播接收 -- 而没移除的原因是 历史版本的兼容保留了下来
For flags see Figure 5.3.
[PRS_SOMEIPSD_00702]
Upstream requirements: RS_SOMEIPSD_00002
Undefined bits within the Flag field shall be set to ’0’ when sending and ignored on
receiving.
发送端flag的其他位要设置为0,接收端要忽略这些位。
[PRS_SOMEIPSD_00261]
Upstream requirements: RS_SOMEIPSD_00006
After the Flags the SOME/IP-SD Header shall have a field of 24 bits called Reserved.
Flag剩下的24位保留 设置为0
[PRS_SOMEIPSD_00262]
Upstream requirements: RS_SOMEIPSD_00006
After the SOME/IP-SD Header the Entries Array(条目数组:提供、订阅的 事件组们) shall follow.
[PRS_SOMEIPSD_00263]
Upstream requirements: RS_SOMEIPSD_00006
The entries shall be processed exactly in the order they arrive.接收端 按接收的顺序 解析处理。
[PRS_SOMEIPSD_00264]
Upstream requirements: RS_SOMEIPSD_00006
After the Entries Array in the SOME/IP-SD Header an Option Array shall follow.
配置组:和上面的 事件组一一对应,是事件组的详细配置 下面有讲
[PRS_SOMEIPSD_00265]
Upstream requirements: RS_SOMEIPSD_00006
The Entries Array and the Options Array of the SOME/IP-SD message shall start with
a length field as uint32 that counts the number of bytes of the following data; i.e. the
entries or the options.
事件组 和 配置组 前都有 4个字节的长度段,描述对应数组的字节数(不包含长度段本身的4个字节)
5.1.2.3 Entry Format
[PRS_SOMEIPSD_00266]
Upstream requirements: RS_SOMEIPSD_00006
The service discovery shall support multiple entries that are combined in one service
discovery message.
一条SD报文中可以有多条 事件组描述 -- 称为聚包。
Note:
The entries are used to synchronize the state of services instances and the Publish/-
Subscribe handling.
这些条目 体现了 发布 和 订阅的实例状态
[PRS_SOMEIPSD_00267]
Upstream requirements: RS_SOMEIPSD_00006
Two types of entries exist: A Service Entry Type for Services and an Eventgroup Entry
Type for Eventgroups.
分两类条目:find/offer/stopoffer是一类条目格式
Subscribe (0x06), StopSubscribeEventgroup (0x06), SubscribeAck (0x07) and SubscribeEventgroupNack (0x07) 是一类条目格式
[PRS_SOMEIPSD_00268]
Upstream requirements: RS_SOMEIPSD_00006
A Service Entry Type shall be 16 Bytes of size and include the following fields in this
order:
• Type Field [uint8]: encodes FindService (0x00), OfferService (0x01) and StopOfferService (0x01)
offer 和 stopOffer 都是 0x01 -->TTL为0时表示停止订阅 ,>0 为提供服务
48页 有对find 报文的详解
50页 有对offer报文的详解
• Index First Option Run [uint8]: Index of this runs first option in the option array.
• Index Second Option Run [uint8]: Index of this runs second option in the option
array.
• Number of Options 1 [uint4]: Describes the number of options the first option run
uses.
• Number of Options 2 [uint4]: Describes the number of options the second option
run uses.
833条有解释 作用
5.1.2.4.1节解释了 为啥一条entry可以有多个配置
因为一个服务可以既有ipv4 又有ipv6 ,既有UDP又有TCP,既有ipv4多播又有ipv6多播,还可能有key-value(下面介绍)或者还有负载均衡选项(下面有介绍)
52页有介绍不同类型SD报文 可以使用哪些端点配置。
Option 0: Load Balancing Option
Option 1: IPv4 Endpoint Option
Option 2: IPv6 Endpoint Option
Option 3: Configuration Option
某 Entry 的字段值为:
Index First Option Run: 1
Number of Options 1: 2
Index Second Option Run: 3
Number of Options 2: 1
解析:
第一个 Option Run:
起始位置:Index First Option Run = 1(指向 Option 1)
选项数量:Number of Options 1 = 2(包含 Option 1 和 Option 2)
包含选项:[Option 1, Option 2](IPv4 和 IPv6 Endpoint Option)
第二个 Option Run:
起始位置:Index Second Option Run = 3(指向 Option 3)
选项数量:Number of Options 2 = 1(包含 Option 3)
包含选项:[Option 3](Configuration Option)
4. 重点总结
Index First Option Run 和 Index Second Option Run:
指向选项数组中的起始位置。
用于关联具体的选项数据。
Number of Options 1 和 Number of Options 2:
描述从起始位置开始的连续选项数量。
用于定义关联的 Option Run 长度。
关联关系:
通过这些字段,Entry 和 Option 数组之间建立了灵活的映射。
支持每个 Entry 使用多个不连续的 Option Run。
实际应用:
这套机制允许在服务发现协议中以高效和结构化的方式携带附加信息
为什么有Index1可以指定连续多个options, 还要index2?
因为有时 两个options不一定是连续的,中间隔了几个。
• Service ID [uint16]: Describes the Service ID of the Service or Service Instance
this entry is concerned with.
提供 或 需要 的serviceID
• Instance ID [uint16]: Describes the Service Instance ID of the Service Instance
this entry is concerned with or is set to 0xFFFF if all service instances of a service
are meant.
offer报文中需要指定具体的 instanceID < 0xffff
sub报文中 可指定 订阅具体的instanceID 或者用0xffff 通配订阅所有的instance。
suback报文 响应 具体的instanceID
• Major Version [uint8]: Encodes the major version of the service (instance).
此服务id的 主版本号 -- 表示已有的接口有重大变化,表示不兼容的变化 --- client对比不一致 会拒绝订阅。
另外:一般客户在矩阵表服务更新时,为了减少工作量 不会改变这个版本号,因为会把矩阵表同步更新释放到 所有ECU供应商
• TTL [uint24]: Describes the lifetime of the entry in seconds.
服务的生存周期 单位是秒
为0的含义:停止offer
推荐值
低频更新场景:
推荐 TTL:60 ~ 120 秒。
应用于较低频的场景,如不频繁变动的配置类服务。
高频实时场景:
推荐 TTL:10 ~ 30 秒。
适用于需要快速检测失效的场景,如实时数据订阅(状态或传感器数据)。
测试或调试场景:
推荐 TTL:5 ~ 15 秒。
短 TTL 用于快速观察服务和订阅行为的变化。
实际设置的考虑
网络延迟:
如果网络延迟较大,应设置较高的 TTL 值,以避免误判服务失效。
服务的动态性:
对动态性较高的服务,TTL 可以短一些,以确保订阅列表保持更新。
4. 如何处理 TTL 到期
客户端:
客户端需要在 TTL 到期前主动续订(发送新的订阅请求)。
续订的时间间隔一般可以略小于 TTL 值,例如 TTL 的 80%。
服务端:
服务端在 TTL 到期后清除对应订阅信息,节省资源。
不会主动通知客户端失效,需要客户端自行维护续订逻辑。
• Minor Version [uint32]: Encodes the minor version of the service
服务id的次版本号 -- 是向后兼容的变化 --- 表示新增了接口 不影响之前的接口使用 -- 可兼容 -- client对比不一致 打印报警信息 可继续订阅
另外:一般客户在矩阵表服务更新时,为了减少工作量 不会改变这个版本号,因为会把矩阵表同步更新释放到 所有ECU供应商
[PRS_SOMEIPSD_00270]
Upstream requirements: RS_SOMEIPSD_00006
dAn Eventgroup Entry (Type 2) shall be 16 Bytes of size and include the following fields
in this order:
• Type Field [uint8]: encodes Subscribe (0x06), StopSubscribeEventgroup (0x06),
SubscribeAck (0x07) and SubscribeEventgroupNack (0x07).
• Index of first option run [uint8]: Index of this runs first option in the option array.
• Index of second option run [uint8]: Index of this runs second option in the option
array.
• Number of Options 1 [uint4]: Describes the number of options the first option run
uses.
• Number of Options 2 [uint4]: Describes the number of options the second option
run uses.
• Service-ID [uint16]: Describes the Service ID of the Service or Service Instance
this entry is concerned with.
这 5 个 字段的含义 同 268条
• Instance ID [uint16]: Describes the Service Instance ID of the Service Instance
this entry is concerned with. The Service Instance ID shall not be set to 0xFFFF
for any Instance.
订阅、订阅回复的 具体instanceID ,不能用0xffff通配
• Major Version [uint8]: Encodes the major version of the service instance this
eventgroup is part of.
• TTL [uint24]: Descibes the lifetime of the entry in seconds.
• Reserved [uint12]: Shall be set to 0x000.
这几个的含义 同 268条
• Counter [uint4]: Is used to differentiate identical Subscribe Eventgroups of the
same subscriber. Set to 0x0 if not used.
最大到15
为0表示不使用。
client发送 1-15 递增表示更新TTL 或是groupID , 或是由于网络问题 导致重发,server端发现counter值未变化 则表示已订阅过 不做处理。
• Eventgroup ID [uint16]: Transports the ID of an Eventgroup.
订阅的serviceID所在的事件组。
[PRS_SOMEIPSD_00845]
Upstream requirements: RS_SOMEIPSD_00006
The Major Version of an entry (according to [PRS_SOMEIPSD_00268] and
[PRS_SOMEIPSD_00270]) shall match the version of the corresponding Service Interface
主版本号要做一致性检查
Note: While SOME/IP-SD defines the Major and Minor version of a service interface,
SOME/IP messages themselves only use the major version in the interface version
field of the SOME/IP header.
sub 仅对比 Major版本号
5.1.2.3.1 Referencing Options from Entries
[PRS_SOMEIPSD_00833]
Upstream requirements: RS_SOMEIPSD_00025
Using the following fields of the entries, options are referenced by the entries:
• Index First Option Run: Index into array of options for first option run. Index 0
means first option of this SOME/IP-SD message.
配置项1 位于队列的起始位置 (0表示第一个)
• Index Second Option Run: Index into array of options for second option run. Index
0 means first option of this SOME/IP-SD message.
配置项2 位于队列的起始位置
• Number of Options 1: Length of first option run. Length 0 means no option in
option run.
配置项1 起始位置连续多少项对应全是配置项1 的配置(一般只有 1 项)
• Number of Options 2: Length of second option run. Length 0 means no option in
option run.
配置项2 起始位置连续多少项对应全是配置项2 的配置
Two different option runs exist: First Option Run and Second Option Run.
Rationale for the support of two option runs: Two different types of options are expected: options common between multiple SOME/IP-SD entries and options different
for each SOME/IP-SD entry. Supporting two different options runs is the most efficient
way to support these two types of options, while keeping the wire format highly efficient.
意思这中 位置 加 长度的设计 对序列化来说比较灵活高效
[PRS_SOMEIPSD_00341]
Upstream requirements: RS_SOMEIPSD_00025
Each option run shall reference the first option and the number of options for this run.
每个选项的应用是 从它起始位置起连续 number of options 个
[PRS_SOMEIPSD_00342]
Upstream requirements: RS_SOMEIPSD_00025
If the number of options is set to zero, the option run is considered empty.
如果options的数量设置为0 则option的 index引用可以认为是无效的
[PRS_SOMEIPSD_00343]
Upstream requirements: RS_SOMEIPSD_00025
For empty runs the Index (i.e. Index First Option Run and/or Index Second Option
Run) shall be set to zero.
如果 options number是0 表示无效 则index也需要设置为0
[PRS_SOMEIPSD_00834]
Upstream requirements: RS_SOMEIPSD_00025
Implementations shall accept and process incoming SD messages with option run
length set to zero and option index not set to zero by ignoring this option run
接收端 看到无效的option则可忽略 不要“大惊小怪”报错
相关文章:
SOME/IP-SD -- 协议英文原文讲解2
前言 SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块: 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 5.1.2.2 S…...
Matlab——图像保存导出成好看的.pdf格式文件
点击图像的右上角,点击第一个保存按钮键。...
Mybatis常用动态 SQL 相关标签
1. <if> 用于条件判断,当满足条件时执行对应的 SQL 片段。 示例: <select id"findUser" resultType"User">SELECT * FROM usersWHERE 11<if test"name ! null and name ! ">AND name #{name}</if><if…...
计算机网络与通讯知识总结
计算机网络与通讯知识总结 基础知识总结 1)FTP:文件传输 SSH:远程登录 HTTP:网址访问 2)交换机 定义:一种基于MAC地址实现局域网(LAN)内数据高速转发的网络设备,可为接入设备提供独享通信通道。 - 核心功能: 1.数据链路层(OSI第二层)工作,通过MAC地址…...
Redis 通用命令
Redis 通用命令 文章目录 Redis 通用命令 1. 启动redis 1.1 前台启动1.2 后台启动1.3 开机自启 2.Redis命令行客户端3. 常见命令 3.1 help3.2 KEYS3.3 DEL3.4 EXISTS3.5 EXPIRE&TTL 1. 启动redis 1.1 前台启动 在安装好redis后,我们可以在任意目录输入以…...
【idea问题排查技巧】
以下是针对 IDEA 中 日志打标(动态标记) 和 全链路追踪 功能的分步详解,结合具体场景和操作截图说明,帮助快速掌握实战技巧。 一、动态日志打标:不修改代码输出关键信息 1. 断点日志打印(非侵入式打标) 场景:在调试时,需要临时查看某个变量的值,但不想修改代码添加…...
VSCode自定义快捷键和添加自定义快捷键按键到状态栏
VSCode自定义快捷键和添加自定义快捷键按键到状态栏 📄在VSCode中想实现快捷键方式执行与某些指令操作进行绑定,可以通过配置组合式的键盘按键映射来实现,另外一种方式就是将执行某些特定的指令嵌入在面板菜单上,在想要执行的时候…...
【Redis 原理】通信协议 内存回收
文章目录 通信协议--RESP内存回收内存过期策略惰性删除周期删除 内存淘汰策略 通信协议–RESP Redis是一个CS架构的软件,通信一般分两步(不包括pipeline和PubSub): 客户端(client)向服务端(se…...
AWS - Redshift - 外部表读取 Parquet 文件中 timestamp 类型的数据
问题: 通过 Redshift Spectrum 功能可以读取 S3 中的文件,当读取 Parquet 文件时,如果列格式设置为 timestamp, 通过 psql 客户端读取会出现以下错误: testdb# select * from myspectrum_schema_0219.test_ns; ERROR…...
H5--开发适配
在 H5 开发中,适配不同设备和屏幕尺寸至关重要,它能确保页面在各种环境下都有良好的显示效果和用户体验。以下介绍几种常见的 H5 开发适配方案: 视口(Viewport)设置 视口单位是相对于浏览器视口的尺寸进行度量的单位&…...
llama-factory部署微调方法(wsl-Ubuntu Windows)
llama-factory项目GitHub地址:GitHub - hiyouga/LLaMA-Factory: Unified Efficient Fine-Tuning of 100 LLMs & VLMs (ACL 2024) wsl-Ubuntu: 1.获取项目 git clone https://github.com/hiyouga/LLaMA-Factory.gitcd LLaMA-Factory/ 2.安装环境…...
【Unity】鱼群效果模拟
鱼群效果模拟 文章目录 鱼群效果模拟Boid算法实现方式version1_CPUversion2_GPUversion3_Multilaterationversion4_Bitonic_Sorting (GPU友好)version5_Skinning (TODO) 细节项优化项参考链接 Boid算法 Boid算法是一种模拟群体行…...
C++ 编程语言简介
C 是一种通用编程语言,它是作为 C 语言的增强而开发的,以包含面向对象的范例。它是一种命令式和编译语言。 C 是一种高级的通用编程语言,专为系统和应用程序编程而设计。它由贝尔实验室的 Bjarne Stroustrup 于 1983 年开发,作为…...
Day15-后端Web实战-登录认证——会话技术JWT令牌过滤器拦截器
目录 登录认证1. 登录功能1.1 需求1.2 接口文档1.3 思路分析1.4 功能开发1.5 测试 2. 登录校验2.1 问题分析2.2 会话技术2.2.1 会话技术介绍2.2.2 会话跟踪方案2.2.2.1 方案一 - Cookie2.2.2.2 方案二 - Session2.2.2.3 方案三 - 令牌技术 2.3 JWT令牌2.3.1 介绍2.3.2 生成和校…...
迪威模型:引领 3D 模型轻量化技术革新
在数字化时代,3D 模型的应用领域愈发广泛,从影视制作、游戏开发到工业设计、建筑仿真等,都离不开 3D 模型的支持。然而,随着模型复杂度的不断提高,文件体积也日益庞大,这给存储、传输和加载带来了极大的挑战…...
大学本科教务系统设计方案,涵盖需求分析、架构设计、核心模块和技术实现要点
以下是大学本科教务系统的设计方案,涵盖需求分析、架构设计、核心模块和技术实现要点: 大学本科教务系统设计方案 一、需求分析 1. 核心用户角色 角色功能需求学生选课/退课、成绩查询、课表查看、学分统计、考试报名、学业预警教师成绩录入、课程大纲上传、教学进度管理、…...
安装Liunx(CentOS-6-x86_64)系统
一:下载与安装Liunx(CentOS-7-x86_64) 1.下载: CentOS-6.10-x86_64-bin-DVD1.iso 2.安装: 按照自己的需求来 下载的镜像文件地址 加载完成后设置 查看网络和本地ip 3.配置仓库(用于yum下载࿰…...
DeepSeek开源周 Day01:从FlashMLA背后原理回顾KV Cache
FlashMLA 今天DeepSeek开源周第一天,开放了FlashMLA仓库,1小时内星标1.6k! FlashMLA 是一个高效的 MLA 解码内核,专为 Hopper GPU 优化,适用于可变长度序列。该项目目前发布了 BF16 和具有 64 块大小分页 kvcache 的功…...
java23种设计模式-工厂方法模式
工厂方法模式(Factory Method Pattern)学习笔记 🌟 定义 工厂方法模式属于创建型设计模式,定义一个创建对象的接口,但让子类决定实例化哪一个类。将类的实例化操作延迟到子类,是面向对象设计中"开闭…...
数据驱动未来!天合光能与永洪科技携手开启数字化新篇章
在信息化时代的今天,企业间的竞争早就超越了传统产品与服务的范畴,新的核心竞争力即——数据处理能力和信息技术的应用。作为数据技术领域的领军者,永洪科技凭借其深厚的技术积累和丰富的行业经验,成功助力天合光能实现数字化升级…...
【C++设计模式】工厂方法设计模式:深入解析从基础到进阶
1. 引言 在软件开发的世界里,设计模式如同巧妙的建筑蓝图,为解决常见问题提供了行之有效的方案。工厂方法模式作为一种广受欢迎的创建型设计模式,以其独特的优势在众多项目中得到广泛应用。它不仅能够为对象的创建提供通用且灵活的方式,还能有效隐藏实现细节,提升代码的可…...
Vue 3 + Vite 项目中配置代理解决开发环境中跨域请求问题
在 Vue 3 Vite 项目中,配置代理是解决开发环境中跨域请求问题的常见方法。通过在 Vite 的配置文件中设置代理,可以将前端请求转发到后端服务器,从而避免浏览器的同源策略限制。 1. 创建 Vue 3 Vite 项目 首先,确保你已经安装了…...
2.3 变量
版权声明:本文为博主原创文章,转载请在显著位置标明本文出处以及作者网名,未经作者允许不得用于商业目的。 变量是用来存放某个值的数据,它可以表示一个数字、一个字符串、一个结构、一个类等。变量包含名称、类型和值。在代码中…...
16、Python面试题解析:python中的浅拷贝和深拷贝
在 Python 中,浅拷贝(Shallow Copy) 和 深拷贝(Deep Copy) 是处理对象复制的两种重要机制,它们的区别主要体现在对嵌套对象的处理方式上。以下是详细解析: 1. 浅拷贝(Shallow Copy&a…...
BUUCTF-Web方向21-25wp
目录 [HCTF 2018]admin弱口令session伪造 [MRCTF2020]你传你🐎呢[护网杯 2018]easy_tornado[ZJCTF 2019]NiZhuanSiWei[MRCTF2020]Ez_bypass第一层第二层 [HCTF 2018]admin 打开环境,有三处提示,一个跳转链接,一个登录注册&#x…...
elementPlus 中表单验证方法(手机号、正整数、邮箱)
1、手机号验证 <el-form ref"formRef" :model"form" :rules"rule" label-width"100px"><el-form-item label"联系电话" prop"mobile"><el-input type"tel" v-model"form.mobile&q…...
阿里云 ACS:高效、弹性、低成本的容器计算解决方案
阿里云的 容器计算服务(Alibaba Cloud Container Service, ACS) 是一种 Serverless 容器计算 解决方案,提供高度弹性、低成本、易管理的 Kubernetes(K8s)容器运行环境。用户无需关注底层服务器资源,而是直接…...
启动Redis报错记录
突然启动Redis就报了个错:‘Could not create server TCP listening socket 127.0.0.1:6379: bind: 操作成功完成。‘ 查了下解决方案,应该是6379端口已绑定,服务没有关闭。 需要输入命令redis-cli 再输入shutdown 但又出现了新的问题&…...
springBoot统一响应类型2.0版本
前言: 通过实践而发现真理,又通过实践而证实真理和发展真理。从感性认识而能动地发展到理性认识,又从理性认识而能动地指导革命实践,改造主观世界和客观世界。实践、认识、再实践、再认识,这种形式,循环往…...
ubuntu离线安装Ollama并部署Llama3.1 70B INT4
文章目录 1.下载Ollama2. 下载安装Ollama的安装命令文件install.sh3.安装并验证Ollama4.下载所需要的大模型文件4.1 加载.GGUF文件(推荐、更容易)4.2 加载.Safetensors文件(不建议使用) 5.配置大模型文件 参考: 1、 如…...
Unity游戏制作中的C#基础(4)数组声明和使用
一、数组的声明 在 C# 中,声明数组有多种方式,每种方式都有其适用的场景,下面为你逐一详细介绍: 1. 直接初始化声明 这种方式直观且便捷,在声明数组的同时就为其赋初值,让数组从诞生之初就拥有了具体的数据…...
自定义SpringBoot Starter
✅自定义SpringBoot Starter SpringBoot 的 starter 可以帮我们简化配置,非常的方便,定义起来其实也不复杂,我的项目中定义了很多 starter,比如business-job就是一个 stater,以他为例,介绍下如何定义 star…...
电脑经常绿屏(蓝屏)怎么办(解决方法)?
一、排查系统与驱动问题 进入安全模式修复系统 强制重启电脑 3 次触发恢复环境,选择 疑难解答 > 高级选项 > 启动设置 > 重启,按 F5 或 5 进入带网络连接的安全模式3。 在安全模式下,尝试卸载最近安装的软件或更新,尤其…...
IO/网络IO基础全览
目录 IO基础CPU与外设1. 程序控制IO(轮询)2. 中断中断相关知识中断分类中断处理过程中断隐指令 3. DMA(Direct Memory Access) 缓冲区用户空间和内核空间IO操作的拷贝概念传统IO操作的4次拷贝减少一个CPU拷贝的mmap内存映射文件(m…...
DPVS-5: 后端服务监控原理与测试
后端监控原理 被动监测 DPVS自带了被动监控,通过监控后端服务对外部请求的响应情况,判断服务器是否可用。 DPVS的被动监测,并不能获取后端服务器的详细情况,仅仅通过丢包/拒绝情况来发觉后端服务是否可用。 TCP session state…...
前端基础知识
1. 变量和常量 1.1 变量 // 变量let name Jacklet age 20name lisiage 18 1.2 常量 // 常量const PI 3.14// PI 3.1415926 // error,常量不可重新赋值const articleList []const user {name: vue3,age: 10} 1.3 const 声明的数组和对象 因为数组和对象在…...
从零到一学习c++(基础篇--筑基期十一-类)
从零到一学习C(基础篇) 作者:羡鱼肘子 温馨提示1:本篇是记录我的学习经历,会有不少片面的认知,万分期待您的指正。 温馨提示2:本篇会尽量用更加通俗的语言介绍c的基础,用通俗的语言去…...
Linux 第三次脚本作业
源码编译安装httpd 2.4,提供系统服务管理脚本并测试(建议两种方法实现) 一、第一种方法 1、把 httpd-2.4.63.tar.gz 这个安装包上传到你的试验机上 2、 安装编译工具 (俺之前已经装好了) 3、解压httpd包 4、解压后的httpd包的文…...
C#与AI的交互(以DeepSeek为例)
C#与ai的交互 与AI的交互使用的Http请求的方式,通过发送请求,服务器响应ai生成的文本 下面是完整的代码,我这里使用的是Ollama本地部署的deepseek,在联网调用api时,则url会有不同 public class OllamaRequester {[Se…...
Sky Hackathon 清水湾的水 AI美食助手
这里写自定义目录标题 视频 视频 video...
基于SpringBoot的校园消费点评管理系统
作者:计算机学姐 开发技术:SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等,“文末源码”。 专栏推荐:前后端分离项目源码、SpringBoot项目源码、Vue项目源码、SSM项目源码、微信小程序源码 精品专栏:…...
企业财务数据分析-投资回报指标ROA
上一篇文章主要介绍了关于投资回报的核心指标ROE,其实还有一个比较关键的指标资产回报率指标(ROA),资产收益率是用来衡量企业盈利能力的重要财务分析指标。资产收益率越高,说明企业资产的利用效率越高,利用…...
PostgreSQL 支持字段类型
PostgreSQL 支持多种字段类型,以下是常见的主要类别和具体类型的简要概述: 数值类型 SMALLINT:2字节整数,范围 -32768 到 32767 INTEGER:4字节整数,范围 -2147483648 到 2147483647 BIGINT:8字节…...
Deepseek引爆AI热潮 防静电地板如何守护数据中心安全
近期,Deepseek的爆火将人工智能推向了新的高度,也引发了人们对AI背后基础设施的关注。作为AI运行的“大脑”,数据中心承载着海量数据的存储、处理和传输,其安全稳定运行至关重要。而在这背后,防静电地板扮演着不可或缺…...
【ARM】MDK如何生成指定大小的bin文件,并指定空区域的填充数据
1、 文档目标 解决MDK如何生成指定大小的bin文件,并指定空区域的填充数据 2、 问题场景 客户有这样的需求,客户本身的工程编译生成bin文件后,bin文件大小为200k。整体芯片的内存有512k。客户想要最终生成的bin文件可以达到512k的一个情况&a…...
开源基准测试模拟器:BlueROV2 水下机器人的控制
拜读An Open-Source Benchmark Simulator: Control of a BlueROV2 Underwater Robot 非常感谢Esben Uth的帮助。 本文介绍了在 Simulink™ 中实现的常用且低成本的遥控潜水器 (ROV) BlueROV2 的仿真模型环境,该环境已针对水下航行器的基准控…...
Nginx 请求超时
Nginx 请求超时详解 在现代 Web 服务中,Nginx 作为一个高效的 Web 服务器和反向代理服务器,广泛应用于处理大量的 HTTP 请求。随着 Web 应用和服务的复杂性增加,Nginx 在处理客户端请求时,可能会出现超时问题。请求超时是指当客户…...
2022 年学习 Spring Boot 开发的最佳书籍
在我们之前的文章中,我们查看了学习 Java 编程的必读书籍我们在其中探索了一些您可以利用的资源来加快 Java 开发的速度。在此基础上,在用 vanilla Java 编写一段时间后,您将意识到组织文件和其他内容(例如设置 getter 和 setter、…...
JavaScript 前端面试 5()
十:new操作符 1:new操作符是什么 在JavaScript中new操作符是用于创建一个给定构造函数的实例对象 function Person(name,age){ this.name name; this.age age; } Person.protoype.sayName function (){ console,log(this.name) } cost person1 new…...
【Jenkins】显示 HTML 标签
需求 在 Jenkins 中显示 HTML 标签内容(例如格式化的文本、颜色、图标等)是一个常见的需求,如下,编译工程显示当前编译的分支: 但 Jenkins 默认会出于安全考虑(防止 XSS 攻击)转义 HTML 标签&a…...