AUTOSAR_TR_SomeIpExample_4.2.1.pdf

所需积分/C币:50 2019-11-04 17:49:59 1.82MB PDF
99
收藏 收藏
举报

AutoSAR SOME/IP协议,初级,入门,学习资料。车载网络
AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 Table of contents Introduction and functional overview 6 2 Acronyms and Abbreviations 8 3 Related documentation 10 3.1 Input documents 10 3.2 Related standards and norms 3.3 Related specification 4 Constraints and assumptions 12 4.1 Limitations ,,12 4.2 Applicability to car domains 12 5 Dependencies to other modules 13 5.1 File structure 13 5.1.1 Code file structure 13 5.1.2 Header file structure 13 6 Functional specification 14 6.1 Definition of identifiers 14 6.2 Specification of the SoME/IP on-wire format 15 6.2.1 Transport Protocol 15 6.2.1.1 lesage Length Limitations 15 6.2.2 Endianess 16 6.2.3 Header 16 6.2.3.1 IP-Address/port numbers ......17 62.3.2 Message ID 32 Bit 17 62.3.3 Length 32 Bit] ·画画画“ 18 62.3.4 Request ID [32 Bit 19 62.3.5 Protocol Version 8 Bit 20 623.6 Interface Version [8 Bit 20 6.2.3.7 Message Type [8 Bit 20 62.3.8 Return Code [8 Bit 21 62.3.9 Payload [variable size 22 6.24 Serialization of parameters and data structures 22 6.2.4.1 Basic Datatypes 22 624.2 Structured Datatypes(structs) 23 624.3 Strings(fixed length) 25 62.4.4 Strings(dynamic length) 25 62.4.5 Arrays(fixed length 26 624.6 Optional parameters /Optional elements 27 62.4.7 Dynamic Length Arrays 27 624.8 Enumeration 29 6.24.9 Bitfield 29 30f104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 62.4.10 Union/ Variant 29 6.2.4.11 Example Map/Dictionary 31 6.3 RPC Protocol specification 31 6.3.1 Transport Protocol Bindings 31 6.3.1.1 UDP Binding 32 6.3.1.2 TCP Binding 32 6.3.13 Multiple Service-Instances 35 6.3.2 Request/Response Communication 36 6.3.2.1 AUTOSAR Specific 36 6.3.3 Fire&Forget Communication 37 6.3.3.1 AUTOSAR Specific 37 6.3.4 Notification Events 37 6.3.4.1 Strategy for sending notifications 37 6.3.4.2 Publish/Subscribe Handling 38 6.3.4.3 AUTOSAR Specific 38 6.3.5 Fields 38 6.3.6 Error handling 39 6.3.6.1 Transporting Application Error Codes and Exceptions 39 6.3.62 Return Code 39 6.3.63 Error Message Format 41 6.3.6.4 Error Processing Overview 41 6.3.6.5 Communication Errors and Handling of Communica tion errors 43 6.4 Guidelines on SOME/IP 45 6.4.1 Choosing the transport protocol 45 6.4.2 Implementing Advanced Features in AUTOSAR Applications 45 64.3 Serialization of Data Structures Containing Pointers 46 6.4.3.1 Array of data structures with implicit ID 46 64.3.2 Array of data structures with explicit ID 46 6.5 Compatibility rules for Interface Design(informational) 46 6.6 Transporting Can and Flex Ray Frames................. 48 6.6.1 AUTOSAR specific 49 6.7 SOME/IP Service Discovery(SOME/IP-SD) 49 6.7.1 General 49 6.7.1.1 Terms and Definitions 49 6.7.2 SOME/P-SD ECU-internal Interface 50 6.7.3 SOME/P-SD Message Format 51 6.7.3.1 General requirements 51 6.732 SOME/P-SD Header 52 67.3.3 Entry Format 54 67.3.4 Options Format 57 67.3.5 Referencing Options from Entries 67 6.7.3.6 Handling missing redundant, and conflicting options 68 67.3.7 Example 69 6.74 Service Discovery Messages 70 6.7.4.1 Service Entries 70 40f104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 6.7.4.2 Eventgroup Entry 72 6.7.5 Service Discovery Communication Behavior 74 6.7.5.1 Startup Behavior 74 6.7.52 Server Answer Behavior 67.5.3 Shutdown Behavior 77 6.7.54 State Machines 78 67.55 Error Handling 81 6.7.6 Announcing non- SOME/P protocols with SoME/IP-SD 82 6.7.7 Publish/Subscribe with soMe/iP and Some/IP-SD 85 67.8 Endpoint handling for Services and Events 94 6.7.8.1 Service Endpoints 94 67.8.2 Eventgroup Endpoints 95 67.83 Example 96 6.7.9 Mandatory Feature Set and Basic Behavior 97 6.7.10 SOME/IP-SD Mechanisms and Errors 101 6.8 Migration and compatibility 102 6.8.1 Supporting multiple versions of the same service 102 6.9 Reserved and special identifiers for SoME/P and SoME/IP-SD 103 5of104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SOME/P AUTOSAR Release 4.2.1 1 ntroduction and functional overview This document specifies the Scalable service-Oriented middlewarE over IP SOME/P)-an automotive/embedded RPc mechanism and the underlying serial- ization /wire format -as an example for a serializatier called by the rte The only valid abbreviation iS SOME/IP. Other abbreviations(e. g. Some/P)are wrong and shall not be used 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- e 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/P specification Provides the features required by automotive use-cases Is scalable from tiny to large platforms Can be implemented on different operating system(i.e. AUTOSAR, GENIVI, and OSEK) and even embedded devices without operating system SOME/P is only an example for a serializer which can be used for inter-ECU Clien t/Server Serialization An implementation of SoME/IP allows AUTOSAR to parse the RPC PDUs and transport the signals to the application As a consequence this example defines several feature sets. The feature set"basic"is compatible to AUTOSAR 4.1.1. The other feature sets are in progress to be integrated into AUTOSAR. The goal is to increase the compatibility towards higher sophisticated feature sets. It is however possible to use these features in non -AUTOSaR nodes or to implement them inside the aUTOSAR application with a carefully designed interface (see Chapter 6.4)and suitable tool chain For ecus not using AUTOSAR the complete feature set can be supported as of today but a limited set of features can be used in the communication with aUtoSAR ECUs SOME/P and SoME/IP-sd may be implemented in autosaR in different modules Currently the Socket Adaptor may write the Message-Id and Length field by means of the header mode For the data path( SOME/P), the message may be serialized/deserialized by the Com, an pluggable serializer in the RtE, or a proxy sWS 6of104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SOME/IP AUTOSAR Release 4.2.1 For the control path (SoME/IP-SD), the Service Discovery Module implements SOME/IP-SD including the some/iP headers without the message-ID and Length field tself SOME/IP SW-C SW-C PROXY RTE BswM Com Cul-Palu Data-Pah SD Pdur SD EthDiagMM SoAd DNS TCP/IP 日 shanes Team3 DHCP TCP ICME EthIne Figure 1.1: Example for soME/P in AUTOSAR 70f104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 2 Acronyms and Abbreviations The glossary below includes acronyms and abbreviations relevant to the SOME/IP specification that are not included in the [1, autosar glossary Abbreviation Acronym: Description: Method a method, procedure, function, or subroutine that is called/invoked Parameters input, output, or input/output arguments of a method or an event Remote Procedure Call a method call from one ECU to another that is trans- (RPC) mitted using messages a message of the client to the server invoking a Request method Response a message of the server to the client transporting re sults of a method invocation Request/Response com a rPc that consists of request and response munication Fire&Forget communica- a rPc call that consists only of a request message tion Event a "Fire Forget callback" that is only invoked on changes or cyclically and is sent from Server to Client a field does represent a status and thus has an valid Field value at all times on which getter, setter and notfier act upon an event message the notifier of an field sends the message of such a notifier cannot be distinguished Notification event from the event message; therefore, when refering to the message of an event this shall also be true for the messages of notifiers of fields Getter a request/Response call that allows read access to a field Sett a request/ Response call that allows write access to a field sends out event message with a new value on change Notifier of the value of the field a logical combination of zero or more methods, zero or more events, and zero or more fields(empty service is Service allowed, e.g. for announcing non-SOME/P services in SOME/P-SD) Eventgrou a logical grouping of events and notification events of fields inside a service in order to allow subscription Service Interface the formal specification of the service including its methods, events, and fields 8of104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 Abbreviation /Acronym: Description: sottware implementation of the service intertace Service Instance which can exist more than once in the vehicle and more than once on an ecu Server The ECU offering a service instance shall be called server in the context of this service instance Client The ECu using the service instance of a server shal be called client in the context of this service instance Union or variant a data structure that dynamically assumes different data types that one ecu implements an instance of a service and Offering a service instance tells other ECUs using SOME/IP-SD that they may use it to send a Some/IP-SD message in order to find Finding a service instance needed service instance to send a SoME/IP-SD message to the ECU imple Requiring a service in menting the required service instance with the mean stance ing that this service instance is needed by the other ECU. This may be also sent if the service instance is not running; thus, was not offered yet Releasing a service in to sent a SomE/P-sd message to the ecu hosting this service instances with the meaning that the ser stance vice instance is not longer needed The configuration and required data of a service Server-Service-Instance- instance the local ECU offers, is called Server- Entry Service-Instance-Entry at the ECU offering this ser vice(Server) Client-Service-Instance The configuration and required data of a service in stance another ecu offers is called client -service- Entr Instance-Entry at the ECU using this service(Client) to offer an eventgroup of a service instance to other Publishing an eventgroup ECUs using a SOME/IP-SD message Subscribing an eventgroup to require an eventgroup of a service instance using a SOME/P-SD message 9of104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL AUTOSAR Example for a Serialization Protocol (SoME/IP AUTOSAR Release 4.2.1 3 Related documentation 3.1 Input documents References [1] Glossary AUTOSAR TR Glossary [2 Specification of SoME/IP Transformer AUTOSAR SWS SOMEIPTransformer 3 Specification of Socket Adaptor AUTOSAR SWS SocketAdaptor 4 Specification of Service Discovery AUTOSAR_ SWS_ Service Discovery 100f104 Document ID 637: AUTOSAR TR SomelpExample AUTOSAR CONFIDENTIAL

...展开详情
立即下载 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
AUTOSAR_TR_SomeIpExample_4.2.1.pdf 50积分/C币 立即下载
1/0