SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:
1. SOME/IP协议讲解
2. SOME/IP-SD协议讲解
3. python/C++举例调试讲解
SOME/IP(Scalable service-Oriented MiddlewarE over IP)是由宝马的Lars Völker博士在2011年设计并提出的。
设计SOME/IP协议的主要动机是为了满足汽车电子系统对高效、可靠通信的需求。随着汽车电子系统的日益复杂,传统的通信协议如CAN、LIN等已经难以满足高数据吞吐量和复杂通信模式的要求。SOME/IP协议作为一种面向服务的通信协议,支持远程过程调用(RPC)、事件通知和底层序列化/线格式,能够很好地适应汽车电子系统的发展趋势。
具体来说,SOME/IP协议的设计目的包括:
综上所述,SOME/IP协议的设计是为了满足汽车电子系统对高效、可靠、灵活和可扩展通信的需求,以适应汽车电子系统日益复杂的发展趋势。
Search AUTOSAR
我在附件中有规范的pdf文件,不同的是这份文件 有我对使用场景的真实理解,而不是直译。
SOME/IP协议之所以能在AUTOSAR的官网下载,是因为SOME/IP是AUTOSAR(AUTomotive Open System ARchitecture)体系中的一个重要组成部分。AUTOSAR是一个开放的、标准化的汽车电子软件架构,旨在创建一个标准化的软件架构,以便更好地开发汽车电子系统。SOME/IP作为AUTOSAR中支持车载以太网通信的重要协议,自然也被纳入到了AUTOSAR的官方文档中,供开发者下载和使用。
除了AUTOSAR的官网,确实也可能在其他地方找到SOME/IP协议的官方下载。这主要得益于SOME/IP协议的开放性和标准化。例如,一些专业的软件开发网站、汽车电子领域的论坛或社区,以及相关的开源项目网站等,都可能会提供SOME/IP协议的下载链接或相关资料。然而,为了确保下载到的是最新、最准确的SOME/IP协议文档,建议开发者还是优先考虑从AUTOSAR的官网或其他官方渠道进行下载。
此外,需要注意的是,由于SOME/IP协议涉及到汽车电子系统的核心技术和知识产权,因此在使用SOME/IP协议时,开发者需要遵守相关的法律法规和许可协议,确保合法合规地进行开发和使用。
综上所述,SOME/IP协议可以在AUTOSAR的官网下载,同时也可能在其他官方或非官方渠道找到相关资料。但为了确保下载到的是最新、最准确的文档,并遵守相关的法律法规和许可协议,建议开发者优先考虑从AUTOSAR的官网或其他官方渠道进行下载。
1. 协议版本
2. 声明
Disclaimer
This work (specification and/or software implementation) and the material contained in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the companies that have contributed to it shall not be liable for any use of the work. The material contained in this work is protected by copyright and other types of intellectual property rights. The commercial exploitation of the material contained in this work requires a license to such intellectual property rights. This work may be utilized or reproduced without any modification, in any form or by any means, for informational purposes only. For any other purpose, no part of the work may be utilized or reproduced, in any form or by any means, without permission in writing from the publisher. The work has been developed for automotive applications only. It has neither been developed, nor tested for non-automotive applications. The word AUTOSAR and the AUTOSAR logo are registered trademarks.
目的与责任:
知识产权:
使用和复制:
应用范围:
商标:
1 Introduction and overview
This protocol specification specifies the format, message sequences and semantics of the AUTOSAR Protocol "Scalable service-Oriented MiddlewarE over IP (SOME/IP)". SOME/IP is an automotive/embedded communication protocol which supports remote procedure calls, event notifications and the underlying serialization/wire format. The only valid abbreviation is SOME/IP. Other abbreviations (e.g. Some/IP) are wrong and shall not be used.
协议说明:
协议特点:
缩写规范:
1.1 Protocol purpose and objectives
SOME/IP was created as existing solutions were not compatible to automotive use cases as well as incompatible to the AUTOSAR Classic Platform architecture. The major design goals were as follows: • Fulfills the hard requirements regarding resource consumption of embedded ECUs • Is compatible through as many use-cases and communication partners as possible • Compatible with AUTOSAR at least on the wire-format level; i.e., SOME/IP was introduced with minimal architecture changes in the AUTOSAR Classic Platform. • Provides the features required by automotive use-cases • Is scalable from tiny to large platforms
SOME/IP 的创建背景
SOME/IP 协议的产生是为了弥补现有解决方案在以下两个方面的不足:
设计目标
SOME/IP 的主要设计目标包括:
1.2 Applicability of the protocol
SOME/IP shall be implemented on different operating system (i.e., AUTOSAR, GENIVI/COVESA, and OSEK) and even embedded devices without operating system. SOME/IP shall be used for inter-ECU Client/Server Serialization. An implementation of SOME/IP allows AUTOSAR to parse the RPC PDUs and transport the parameters to the application.
协议适用范围
操作系统支持:
使用场景:
功能支持:
1.2.1 Constraints and assumptions
The "Support for serialization of extensible data structs" has been introduced - which SOME/IP serializers based on AUTOSAR Foundation Standard 1.0.0 (AUTOSAR Classic Standard 4.3.0) as well as most non-AUTOSAR implementations cannot process.To indicate this interoperability issue [PRS_SOMEIP_00220] requires to increase the major interface version of the respective serialized data.
扩展数据结构的序列化支持:
互操作性问题:
1.3 Dependencies
There are no dependencides to AUTOSAR SWS modules.
不对AUTOSAR协议的其它软件模块有依赖
SOME/IP是一套独立的通信协议,不用和其它协议组合使用。双方同时运行SOME/IP协议,就能通信。
1.4 Document Structure
The SOME/IP PRS will describe the following two aspects of SOME/IP.
Specification of SOME/IP on wire-format (Serialization)
• Structure of Header Format
• How the different data types are serialized as per SOME/IP
Specification of Protocol for Event and RPC-based communication
• Transport Protocol
• Rules that govern the RPC for SOME/IP
In addition to this document, the PRS SOME/IP-SD [1] describes the Service Discovery and other functionalities of SOME/IP.
文档内容概述
SOME/IP PRS 将描述以下两个方面的内容:
SOME/IP 的传输格式规范(序列化):
基于事件和远程过程调用(RPC)的通信协议规范:
此外,除了本文件外,PRS SOME/IP-SD [1] 还描述了 SOME/IP 的 服务发现(Service Discovery) 和其他功能。--- 这个文档后面文章也有讲解,属于第二大块。
文章中的缩写和关键词解释
4 Protocol specification
SOME/IP provides service oriented communication over a network. It is based on
service definitions that list the functionality that the service provides. A service can
consist of combinations of zero or multiple events, methods and fields.
Events provide data that are sent cyclically or on change from the provider to the subscriber.
Methods provide the possibility to the subscriber to issue remote procedure calls which
are executed on provider side.
Fields are combinations of one or more of the following three
• a notifier which sends data from the provider to the subscribers on change, on
epsilon change, or cyclically based on configuration.
• a getter which can be called by the subscriber to explicitly query(明确的查询,
这个明确这里无法理解,体现到具体就是指定field ID) the provider for
the value
• a setter which can be called by the subscriber when it wants to change the value
on provider side
The major difference between the notifier of a field and an event is that events are
only sent on change, the notifier of a field additionally sends the data directly after
subscription(field 的notify 订阅后会立马给client发送事件,event 只在需要时才发送)
SOME/IP 提供基于服务的网络通信。它基于 服务定义,列出了服务提供的功能。一个服务可以由零个或多个事件、方法和字段的组合组成。
事件(Events):
方法(Methods):
字段(Fields):
字段由以下三种类型中的一个或多个组合而成:
0voice · GitHub