SOME IP协议规范文档
资源文件列表:

Some IP协议规范/AUTOSAR_PRS_SOMEIPProtocol.pdf 1.97MB
Some IP协议规范/
资源介绍:
OME/IP,全称为Scalable service-Oriented MiddlewarE over IP,是一种面向服务的可伸缩的协议,用于控制消息的汽车中间件的解决方案。
SOME/IP Protocol Specification
AUTOSAR FO Release 1.3.0
Document Title SOME/IP Protocol Specification
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 696
Document Status Final
Part of AUTOSAR Standard Foundation
Part of Standard Release 1.3.0
Document Change History
Date Release Changed by
Description
2017-12-08 1.3.0
AUTOSAR
Release
Management
• No content changes
2017-10-27 1.2.0
AUTOSAR
Release
Management
• Editorial changes
2017-03-31 1.1.0
AUTOSAR
Release
Management
• Serialization of Structured Datatypes
and Arguments with Identifier and
optional members
2016-11-30 1.0.0
AUTOSAR
Release
Management
Initial Release
1 of 64
— AUTOSAR CONFIDENTIAL —
Document ID 696: AUTOSAR_PRS_SOMEIPProtocol

SOME/IP Protocol Specification
AUTOSAR FO Release 1.3.0
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 intel-
lectual 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.
2 of 64
— AUTOSAR CONFIDENTIAL —
Document ID 696: AUTOSAR_PRS_SOMEIPProtocol

SOME/IP Protocol Specification
AUTOSAR FO Release 1.3.0
Table of Contents
1 Introduction and overview 5
1.1 Protocol purpose and objectives . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Applicability of the protocol . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Constraints and assumptions . . . . . . . . . . . . . . . . . . 5
1.2.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Document Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Protocol Requirements 8
2.1 Requirements Traceability . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Acronyms and Abbreviations 15
4 Protocol specification 16
4.1 Specification of SOME/IP on wire-format (Serialization) . . . . . . . . . 16
4.1.1 Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.1.1 Message ID [32 Bit] . . . . . . . . . . . . . . . . . . 17
4.1.1.2 Length [32 Bit] . . . . . . . . . . . . . . . . . . . . . 17
4.1.1.3 Request ID [32 Bit] . . . . . . . . . . . . . . . . . . . 18
4.1.1.4 Protocol Version [8 Bit] . . . . . . . . . . . . . . . . . 19
4.1.1.5 Interface Version [8 Bit] . . . . . . . . . . . . . . . . 20
4.1.1.6 Message Type [8 Bit] . . . . . . . . . . . . . . . . . . 20
4.1.1.7 Return Code [8 Bit] . . . . . . . . . . . . . . . . . . . 21
4.1.1.8 Payload [variable size] . . . . . . . . . . . . . . . . . 21
4.1.2 Event, Field and Eventgroup . . . . . . . . . . . . . . . . . . 22
4.1.3 Endianess . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.1.4 Serialization of Data Structures . . . . . . . . . . . . . . . . . 22
4.1.4.1 Basic Datatypes . . . . . . . . . . . . . . . . . . . . 24
4.1.4.2 Structured Datatypes (structs) . . . . . . . . . . . . . 24
4.1.4.3 Structured Datatypes and Arguments with Identifier
and optional members . . . . . . . . . . . . . . . . . 25
4.1.4.4 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.4.5 Arrays (fixed length) . . . . . . . . . . . . . . . . . . 34
4.1.4.6 Dynamic Length Arrays . . . . . . . . . . . . . . . . 35
4.1.4.7 Enumeration . . . . . . . . . . . . . . . . . . . . . . 37
4.1.4.8 Bitfield . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1.4.9 Union / Variant . . . . . . . . . . . . . . . . . . . . . 37
4.2 Specification of SOME/IP Protocol . . . . . . . . . . . . . . . . . . . . 39
4.2.1 Transport Protocol Bindings . . . . . . . . . . . . . . . . . . . 39
4.2.1.1 UDP Binding . . . . . . . . . . . . . . . . . . . . . . 40
4.2.1.2 TCP Binding . . . . . . . . . . . . . . . . . . . . . . 40
4.2.1.3 Multiple Service-Instances . . . . . . . . . . . . . . . 42
4.2.1.4 Transporting large SOME/IP messages of UDP
(SOME/IP-TP) . . . . . . . . . . . . . . . . . . . . . 43
3 of 64
— AUTOSAR CONFIDENTIAL —
Document ID 696: AUTOSAR_PRS_SOMEIPProtocol

SOME/IP Protocol Specification
AUTOSAR FO Release 1.3.0
4.2.2 Request/Response Communication . . . . . . . . . . . . . . 49
4.2.3 Fire&Forget Communication . . . . . . . . . . . . . . . . . . 50
4.2.4 Notification Events . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.4.1 Strategy for sending notifications . . . . . . . . . . . 52
4.2.5 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.2.6 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2.6.1 Return Code . . . . . . . . . . . . . . . . . . . . . . 54
4.2.6.2 Error Message . . . . . . . . . . . . . . . . . . . . . 54
4.2.6.3 Error Processing Overview . . . . . . . . . . . . . . 55
4.2.6.4 Communication Errors and Handling of Communica-
tion Errors . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3 Compatibility Rules for Interface Version . . . . . . . . . . . . . . . . . 57
5 Configuration Parameters 61
6 Protocol usage and guidelines 62
6.1 Choosing the transport protocol . . . . . . . . . . . . . . . . . . . . . . 62
6.2 Transporting CAN and FlexRay Frames . . . . . . . . . . . . . . . . . . 62
6.3 Insert Padding for structs . . . . . . . . . . . . . . . . . . . . . . . . . . 63
7 References 64
4 of 64
— AUTOSAR CONFIDENTIAL —
Document ID 696: AUTOSAR_PRS_SOMEIPProtocol

SOME/IP Protocol Specification
AUTOSAR FO Release 1.3.0
1 Introduction and overview
This protocol specification specifies the format, message sequences and seman-
tics 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
The basic motivation to specify "Yet another RPC-Mechanism" instead of using an
existing infrastructure/technology is the goal to have a technology that:
• Fulfills the hard requirements regarding resource consumption in an embedded
world
• Is compatible through as many use-cases and communication partners as possi-
ble
• compatible with AUTOSAR at least on the wire-format level; i.e. can commu-
nicate with PDUs AUTOSAR can receive and send without modification to the
AUTOSAR standard. The mappings within AUTOSAR shall be chosen according
to the SOME/IP specification.
• Provides the features required by automotive use-cases
• Is scalable from tiny to large platforms
1.2 Applicability of the protocol
SOME/IP shall be implemented on different operating system (i.e. AUTOSAR, GENIVI,
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 signals to the application.
1.2.1 Constraints and assumptions
This document specifies the SOME/IP protocol on networ k level. It was created during
elaboration of the AUTOSAR Foundation Standard 1.0.0 which took place in parallel
to the development of the AUTOSAR Classic Standard 4.3.0. It already reflects all
changes implied to SOME/IP by the work which was done for AUTOSAR Classic
5 of 64
— AUTOSAR CONFIDENTIAL —
Document ID 696: AUTOSAR_PRS_SOMEIPProtocol