78
Explanation of Adaptive Platform Software Architecture AUTOSAR AP R20-11 Document Title Explanation of Adaptive Platform Software Architecture Document Owner AUTOSAR Document Responsibility AUTOSAR Document Identification No 982 Document Status published Part of AUTOSAR Standard Adaptive Platform Part of Standard Release R20-11 Document Change History Date Release Changed by Description 2020-11-30 R20-11 AUTOSAR Release Management Initial release 1 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Document Title Software Architecture - AUTOSAR

  • Upload
    others

  • View
    8

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Document Title Explanation of Adaptive PlatformSoftware Architecture

Document Owner AUTOSAR

Document Responsibility AUTOSAR

Document Identification No 982

Document Status published

Part of AUTOSAR Standard Adaptive Platform

Part of Standard Release R20-11

Document Change HistoryDate Release Changed by Description

2020-11-30 R20-11AUTOSARReleaseManagement

• Initial release

1 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 2: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Disclaimer

This work (specification and/or software implementation) and the material contained init, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and thecompanies 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 thiswork requires a license to such intellectual property rights.

This work may be utilized or reproduced without any modification, in any form or byany means, for informational purposes only. For any other purpose, no part of the workmay be utilized or reproduced, in any form or by any means, without permission inwriting from the publisher.

The work has been developed for automotive applications only. It has neither beendeveloped, nor tested for non-automotive applications.

The word AUTOSAR and the AUTOSAR logo are registered trademarks.

2 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 3: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Table of Contents

1 Introduction 6

1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.3 Document Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Definition of Terms and Acronyms 8

2.1 Acronyms and Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Definition of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Related Documentation 9

4 Overview and Goals 10

4.1 Requirements Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 104.2 Quality Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.3 Stakeholders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5 Architecture Constraints 13

5.1 Internal Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.2 Distributed Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

6 Quality Requirements 15

6.1 Quality Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.1.1 AUTOSAR Adaptive Platform Standard . . . . . . . . . . . . 156.1.2 AUTOSAR Adaptive Platform Stack . . . . . . . . . . . . . . 186.1.3 AUTOSAR Adaptive Application . . . . . . . . . . . . . . . . 18

6.2 Quality Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7 System Scope and Context 20

7.1 Adaptive Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207.2 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

7.2.1 Crypto Provider . . . . . . . . . . . . . . . . . . . . . . . . . 217.2.2 Operating System . . . . . . . . . . . . . . . . . . . . . . . . 217.2.3 Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

7.3 External Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217.3.1 AUTOSAR Adaptive Application . . . . . . . . . . . . . . . . 227.3.2 AUTOSAR Classic Platform . . . . . . . . . . . . . . . . . . . 227.3.3 Third-party Platform . . . . . . . . . . . . . . . . . . . . . . . 227.3.4 Diagnostic Client . . . . . . . . . . . . . . . . . . . . . . . . . 227.3.5 Backend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

8 Solution Strategy 23

8.1 Architectural Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . 238.2 Decomposition Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . 238.3 Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

8.3.1 Implementation Language . . . . . . . . . . . . . . . . . . . 24

3 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 4: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

8.3.2 Parallel Processing . . . . . . . . . . . . . . . . . . . . . . . 248.4 Design Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

8.4.1 Leveraging existing standards . . . . . . . . . . . . . . . . . 258.4.2 SOLID principles . . . . . . . . . . . . . . . . . . . . . . . . . 258.4.3 Acyclic Dependencies Principle . . . . . . . . . . . . . . . . 26

8.5 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268.6 Verification and Validation . . . . . . . . . . . . . . . . . . . . . . . . . 27

9 Building Block View 28

9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289.1.1 Stereotypes . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

9.2 Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299.2.1 Execution Management . . . . . . . . . . . . . . . . . . . . . 309.2.2 State Management . . . . . . . . . . . . . . . . . . . . . . . 339.2.3 Log and Trace . . . . . . . . . . . . . . . . . . . . . . . . . . 359.2.4 Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369.2.5 Operating System Interface . . . . . . . . . . . . . . . . . . . 37

9.3 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389.3.1 Communication Management . . . . . . . . . . . . . . . . . . 399.3.2 Network Management . . . . . . . . . . . . . . . . . . . . . . 419.3.3 Time Synchronization . . . . . . . . . . . . . . . . . . . . . . 42

9.4 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439.4.1 Persistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

9.5 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459.5.1 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . 469.5.2 Identity and Access Management . . . . . . . . . . . . . . . 48

9.6 Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.6.1 Platform Health Management . . . . . . . . . . . . . . . . . . 49

9.7 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519.7.1 Update and Configuration Management . . . . . . . . . . . . 519.7.2 Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

9.8 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549.8.1 Diagnostic Management . . . . . . . . . . . . . . . . . . . . 54

10 Runtime View 56

10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5610.2 AUTOSAR Runtime for Adaptive Applications Lifecycle . . . . . . . . . 56

10.2.1 Machine Startup . . . . . . . . . . . . . . . . . . . . . . . . . 5610.2.2 Machine Shutdown . . . . . . . . . . . . . . . . . . . . . . . 5710.2.3 Function Group State Transition . . . . . . . . . . . . . . . . 5810.2.4 Failure Recovery . . . . . . . . . . . . . . . . . . . . . . . . . 59

10.3 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6010.4 Update and Configuration Management . . . . . . . . . . . . . . . . . 61

10.4.1 Update of an Adaptive Application . . . . . . . . . . . . . . . 61

11 Deployment View 63

11.1 Vehicle Software Deployment . . . . . . . . . . . . . . . . . . . . . . . 63

4 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 5: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

12 Cross-cutting Concepts 65

12.1 Overview of Platform Entities . . . . . . . . . . . . . . . . . . . . . . . 6512.2 Function Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6612.3 Function Group State . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6612.4 Software Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6612.5 Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6912.6 Manifest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7012.7 Application Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7112.8 Execution Manifest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7212.9 Service Instance Manifest . . . . . . . . . . . . . . . . . . . . . . . . . 7212.10 Machine Manifest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7312.11 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7312.12 Trusted Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7412.13 Secure Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 75

13 Risks and Technical Debt 76

13.1 Risks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7613.1.1 Risk Assessment . . . . . . . . . . . . . . . . . . . . . . . . 7613.1.2 Risk List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

13.2 Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

5 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 6: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

1 Introduction

This explanatory document provides an overview of the software architecture of theAUTOSAR Adaptive Platform standard.

1.1 Objectives

This document is an architecture description of the AUTOSAR Adaptive Platform inaccordance to [1, ISO/IEC 42010] and has the following main objectives:

• Identify the stakeholders of the AUTOSAR Adaptive Platform and their con-cerns.

• Identify the system scope and provide overview information of the AUTOSARAdaptive Platform.

• Provide definitions for all used architecture viewpoints and a mapping of allstakeholder concerns to those viewpoints.

• Provide an architecture view and its architecture models for each architectureviewpoint used in this architecture description.

• Provide correspondence rules and correspondences among the contents ofthis architecture description.

• Provide an architecture rationale (explanation, justification, reasoning for de-cisions made) on a high level. A more in-depth documentation of decisions isprovided in [2, EXP_SWArchitecturalDecisions].

• Provide a record of known inconsistencies among the architecture description.

Please note that the AUTOSAR Adaptive Platform standard is defined by means ofrequirements and software specification documents. Those documents deliberatelylack specifications of dependencies and interfaces between the building blocks of theAUTOSAR Adaptive Platform to provide more degrees of freedom for stack vendors intheir solution design. This document describes the original architectural design of theAUTOSAR Adaptive Platform including details how the building blocks should interactwith each other. It is an example how an implementation of the standard should workinternally. However, a stack vendor is free to choose another design as long as itcomplies with the binding AUTOSAR Adaptive Platform standard.

1.2 Scope

This explanatory document applies to the AUTOSAR Adaptive Platform. It is recom-mended to get an overview of the AUTOSAR Adaptive Platform for all members of theworking groups, stack vendors, and application developers.

6 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 7: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

1.3 Document Structure

This document is organized as follows. Section 4 provides an overview of the mainrequirements for the AUTOSAR Adaptive Platform, the top quality goals of its architec-ture, and a list of stakeholders that are affected by it. Section 5 lists requirements thatconstrain design and implementation decisions or decisions about the developmentprocess.

Section 6 is the base for discovering trade-offs and sensitivity points in the architectureof the AUTOSAR Adaptive Platform by introducing a quality attribute tree followed bythe most important quality scenarios. The system context in which the AUTOSARAdaptive Platform is intended to be used is outlined in section 7. Section 8 summarizesthe fundamental decisions and solution strategies, that shape the architecture of theAUTOSAR Adaptive Platform such as technology decisions or architectural patterns tobe used.

Sections 9 to 11 explain the software architecture from different view points. First, sec-tion 9 explains the decomposition of the AUTOSAR Adaptive Platform into FunctionalClusters and their interdependencies. Then, section 10 demonstrates how the mainuse cases are realized using the Functional Clusters in the AUTOSAR Adaptive Plat-form. Section 11 shows different scenarios how applications based on the AUTOSARAdaptive Platform may be deployed.

Section 12 provides an overview of concepts and patterns used by the AUTOSARAdaptive Platform. Section 13 lists and rates risks associated with the architecture ofthe AUTOSAR Adaptive Platform and technical debt.

7 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 8: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

2 Definition of Terms and Acronyms

2.1 Acronyms and Abbreviations

Abbreviation / Acronym DescriptionDoIP Diagnostics over Internet ProtocolPOSIX Portable Operating System InterfaceSecOC AUTOSAR Secure Onboard CommunicationTLS Transport Layer SecurityUML Unified Modeling Language

2.2 Definition of Terms

This section lists terms that are specific to this document. A list of general terms forAUTOSAR is provided in the [3, glossary].

Term DescriptionFunctional Cluster A logical group of functionality within the AUTOSAR Adaptive

Platform. Functional Clusters are the second level of ab-straction in the building block view (cf. Chapter 9). They are alsosubject of the individual specification documents that make upthe AUTOSAR Adaptive Platform standard.

Function Group A set of modeled Processes. See Section 12.2 for details.Thread The smallest sequence of instructions the can be managed in-

dependently by a scheduler. Multiple Threads can be exe-cuted concurrently within one Process sharing resources suchas memory.

Watchdog An external component that supervises execution of the AU-TOSAR Adaptive Platform. See Section 7.2.3 for details.

8 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 9: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

3 Related Documentation

This document provides a high-level overview of the AUTOSAR Adaptive Platform ar-chitecture. It is closely related to general requirements for AUTOSAR Adaptive Plat-form specified in [4, RS_Main] and [5, RS_General], and the architectural decisionsdocumented in [2, EXP_SWArchitecturalDecisions].

The individual building blocks of the architecture (Functional Clusters) are spec-ified in separate documents. Each Functional Cluster defines one or morerequirements specification(s) (RS document), one or more software specification(s)(SWS document) and one or more explanatory document(s) (EXP document). Pleaserefer to these documents for any details on the AUTOSAR Adaptive Platform standard.

9 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 10: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

4 Overview and Goals

In conventional automotive systems ECUs are used to replace or augment electro-mechanical systems. Those resource constrained,deeply-embedded ECUs typicallyperform basic control functions by creating electrical output signals (e.g. for actors)based on input signals (e.g. from sensors) and information from other ECUs con-nected to the vehicle network. Much of the control software is specifically designedand implemented for the target vehicle and does not change significantly during vehi-cle lifetime. The AUTOSAR Classic Platform standard addresses the needs of thesedeeply-embedded systems.

Recent and future vehicle functions, such as highly automated driving, will introducecomplex and computing resource demanding software that shall fulfill strict safety, in-tegrity and security requirements. Such software performs for example, environmentperception and behavior planning, and interacts with external backend and infrastruc-ture systems. The software in the vehicle regularly needs to be updated during thelife-cycle of the vehicle, due to evolving external systems, improved or added function-ality, or security problems. The AUTOSAR Classic Platform standard cannot fulfill theneeds of such systems. Therefore, AUTOSAR specifies a second software platform,the AUTOSAR Adaptive Platform. It provides high-performance computing and com-munication mechanisms as well as a flexible software configuration, for example, tosupport software update over-the-air. Features that are specifically defined for the AU-TOSAR Classic Platform, such as access to electrical signals and automotive specificbus systems, can be integrated into the AUTOSAR Adaptive Platform but is not in thefocus of standardization.

4.1 Requirements Overview

This section provides an overview of the basic requirements for the AUTOSAR Adap-tive Platform that impact its architecture. The corresponding requirement identifiers areprovided in square brackets. Please refer to [4, RS_Main] and [5, RS_General] for anydetails, rationale or intended use-cases of these requirements.

Support of state-of-the-art Technology

The AUTOSAR Adaptive Platform aims to support resource-intensive (memory, cpu)applications on state-of-the-art hardware. Therefore, the AUTOSAR Adaptive Platformshall support high performance computing platforms [RS_Main_00002] as well as vir-tualized environments [RS_Main_00511]. The AUTOSAR Adaptive Platform shall beable to run multiple applications in parallel [RS_Main_00049], each with concurrentapplication internal control flows [RS_Main_00050].

10 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 11: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Software Update and Configuration

The AUTOSAR Adaptive Platform shall support a flexible (configuration) data and soft-ware update. Hereby, AUTOSAR Adaptive Platform shall support up- and download ofsuch update packages [RS_Main_00650] and change of communication and applica-tion software at runtime [RS_Main_00503].

AUTOSAR shall provide a unified way to describe software systems deployed toAdaptive and / or Classic platforms [RS_Main_00161]. That kind of descriptionshall also support the deployment and reallocation of AUTOSAR Application Software[RS_Main_00150], and shall provide means to describe interfaces of the entire system[RS_Main_00160].

Security

The AUTOSAR Adaptive Platform shall support the development of secure systems[RS_Main_00514] with secure access to ECU data and services [RS_Main_00170],and secure onboard communication [RS_Main_00510].

Safety

The AUTOSAR Adaptive Platform shall support the development of safety relatedsystems [RS_Main_00010] that are reliable [RS_Main_00011] and highly available[RS_Main_00012]. The AUTOSAR Adaptive Platform specifications shall be analyz-able and support methods to demonstrate the achievement of safety related propertiesaccordingly [RS_Main_00350].

Reuse and Interoperability

The AUTOSAR Adaptive Platform shall support standardized interoperability withnon-AUTOSAR software [RS_Main_00190] as well as (source code) portability forAUTOSAR Adaptive Applications across different implementations of the platform[RS_AP_00111]. Hereby, the AUTOSAR Adaptive Platform shall provide means todescribe a component model for application software [RS_Main_00080], and supportbindings for different programming languages [RS_Main_00513].

Communication

The AUTOSAR Adaptive Platform shall support standardized automotive communica-tion protocols [RS_Main_00280] for intra ECU communication [RS_Main_01001] withdifferent network topologies [RS_Main_00230].

11 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 12: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Diagnostics

The AUTOSAR Adaptive Platform shall provide diagnostics means during runtime forproduction and services purposes [RS_Main_00260].

4.2 Quality Goals

This section will list the top quality goals for the architecture whose fulfillment is ofhighest importance to the major stakeholders in a future version of this document.Please refer to the currently un-prioritized list of Quality Attributes in Section 6.1.

4.3 Stakeholders

This section lists the stakeholders of the AUTOSAR Adaptive Platform architecture andtheir main expectations.

Role ExpectationProject Leader Overview of technical risks and technical debt in the AUTOSAR

Adaptive Platform.Working Group Architecture Concise yet thorough documentation of the goals and driving

forces of the AUTOSAR Adaptive Platform. Documentation ofthe original architectural design of the AUTOSAR Adaptive Plat-form standard. Documentation of identified technical risks andtechnical debt in the AUTOSAR Adaptive Platform.

Working Group Consolidated overview of the AUTOSAR Adaptive Platform ar-chitecture. Realization of use-cases that span multiple Func-tional Clusters. Usage of interfaces within the AUTOSARAdaptive Platform. Guidelines and patterns for FunctionalCluster and interface design.

Stack Developer Consolidated overview of the original architectural design of theAUTOSAR Adaptive Platform. Realization of use-cases that spanmultiple Functional Clusters. Usage of interfaces within theAUTOSAR Adaptive Platform.

Application Developer Overview of the building blocks of the AUTOSAR Adaptive Plat-form and their purpose and provided functionality. Explanation ofthe concepts used in the AUTOSAR Adaptive Platform.

Table 4.1: Stakeholder table with roles and expectations

12 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 13: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

5 Architecture Constraints

AUTOSAR is a worldwide development partnership of vehicle manufacturers, suppli-ers, service providers and companies from the automotive electronics, semiconductorand software industry. AUTOSAR standardizes the AUTOSAR Adaptive Platform au-tomotive middleware. The AUTOSAR Adaptive Platform is not a concrete implemen-tation. The AUTOSAR Adaptive Platform standard leaves a certain degree of freedomto implementers of the standard, as most standards do. On the one hand, more free-dom enables competition among the different implementations and a broader choiceof properties for users of the AUTOSAR Adaptive Platform. On the other hand, a morestrict standardization makes the different implementations compatible and exchange-able (within the standardized scope). Naturally, those attributes are in conflict. It isusually a choice of the standardization organization to evaluate the attributes and de-fine the desired level of strictness.

The AUTOSAR Classic Platform is rather strict in that sense by specifying a detailedlayered software architecture imposing many constraints on its implementations. TheAUTOSAR Adaptive Platform launched with a less strict approach. That less strictapproach puts constraints on the AUTOSAR Adaptive Platform architecture as outlinedbelow.

5.1 Internal Interfaces

An important architectural constraint is that only interfaces that are intended to beused by applications or interfaces that are used to extend the functionality of theAUTOSAR Adaptive Platform shall be standardized. Internal interfaces between thebuilding blocks of the AUTOSAR Adaptive Platform shall not be standardized. Thisapproach leaves a lot of freedom to design and optimize the internals of an AUTOSARAdaptive Platform stack. However, it also imposes constraints on how the AUTOSARAdaptive Platform architecture can be defined and described in this document. Also,this means that it might not be possible to use different functional clusters from differentAUTOSAR Adaptive Platform stack vendors.

First, the existence of internal interfaces and their usage by other building blocks is inmost cases a recommendation and reflects the original design approach of the authorsof the standard. The same applies to any interactions described in this document thatmake use of such internal interfaces.

Second, some quality attributes may be hard to ensure in general by the architec-ture of the standard. Additional measures like security or safety considerations lackwell-defined inputs such as data flows or specifications of interdependencies. Con-sequently, a more thorough design phase is required when an AUTOSAR AdaptivePlatform stack is implemented.

13 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 14: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

5.2 Distributed Work

Standardization of the AUTOSAR Adaptive Platform is a worldwide distributed effort.The individual building blocks are specified by dedicated working groups in separatedocuments to be able to scale in that distributed setup. This impacts the way theAUTOSAR Adaptive Platform architecture is described in this document.

First, this document shows interfaces on an architectural level only. This documentdoes not specify details of interfaces such as individual operations. This keeps redun-dancies and thus dependencies between this document and the documents actuallyspecifying the individual building blocks manageable. Another consequence is that theinteractions shown in this document are not based on actual operations specified in theinterfaces but rather on an architectural level as well.

Second, this document aims to provide guidance for the working groups in specify-ing the individual building blocks by defining patterns and concepts to solve commonproblems. This guidance should help to build a uniform and consistent standard fromground up.

14 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 15: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

6 Quality Requirements

Quality requirements define the expectations of AUTOSAR Adaptive Platform stake-holders for the quality and the attributes of the AUTOSAR Adaptive Platform standardthat indicate whether the quality factors are satisfied or not. Section 6.1 starts by list-ing the quality attributes that, in the end, are used to assess whether the AUTOSARAdaptive Platform and its software architecture satisfies the expected quality factors ornot. Section 6.2 then provides quality scenarios that operationalize quality attributesand turn them into measurable quantities by describing the reaction of the system to astimulus in a certain situation.

6.1 Quality Attributes

The AUTOSAR Adaptive Platform has many stakeholders with different concerns.Thus, this document uses the following three quality attribute categories that corre-spond to the three main stakeholder groups in order to make the requirements andtheir impact on the architecture more comprehensible:

• AUTOSAR Adaptive Platform Standard: Quality requirements for the AU-TOSAR standard itself. These requirements may directly affect the architectureof the AUTOSAR Adaptive Platform.

• AUTOSAR Adaptive Platform Stack: Quality requirements for an implementa-tion of the AUTOSAR standard as an AUTOSAR stack. These requirements mayindirectly affect the architecture of the AUTOSAR Adaptive Platform.

• AUTOSAR Adaptive Application: Quality requirements for an application basedon an AUTOSAR stack. These requirements may transitively affect the architec-ture of the AUTOSAR Adaptive Platform.

The quality attributes are organized according to the Architecture Tradeoff AnalysisMethod (ATAM) [6] as a tree, one for each of the quality attribute categories. The leafsof those trees are the individual quality attributes.

6.1.1 AUTOSAR Adaptive Platform Standard

• Functional suitability

– The software architecture shall reflect the project objectives (POs) and bethe consistent source for all specifications (here: completeness with respectto the PO; see also usability below).

– The standard shall not contain elements that are not traceable to POs,change requests (CRs), or concepts.

15 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 16: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

– The standard shall contain at least one element derived from each PO, CR,or concept.

• Performance efficiency

– The specification shall allow for a run-time efficient implementation. Run-time efficiency refers to all resource consumption, CPU, RAM, ROM.

• Compatibility

– The standard shall retain older versions of its elements in the face of change.

– The standard shall be interoperable with pre-existing standards, especiallythe AUTOSAR Classic Platform. Pre-existing standards means network pro-tocols and the like.

– The standard shall adopt new versions of pre-existing standards only afteran impact analysis.

• Usability

– The use of the standard shall be as easy as possible for suppliers and appli-cation developers. Easy means: not much material and resources required.

– The holistic approach shall not be broken (avoid different approaches in onestandard).

– The standard shall contain application sample code for all its elements.

– The standard shall contain documentation of the use cases for its elements.

– The standard shall document the semantics of its elements.

– The standard shall document its decisions, consequences, and implemen-tation restrictions (both for stack & apps) including their rationale.

– The standards elements shall be easy to use and hard to misuse.

– The standard shall stick to pre-existing standards, as far as no functionalrequirements are compromised.

– The standard shall be as stable as possible.

– AUTOSAR standards shall not change disruptive but rather evolve evolution-ary (for example, backward-compatibility can be a help).

– The software architecture shall reflect the PO and be the consistent sourcefor all specifications (here: consistency; see also functional suitabilityabove).

• Reliability

– The standard shall classify its elements with respect to safety relevance (thatis, functional clusters shall be marked if they participate in safety criticaloperations of the platform).

16 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 17: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

– The standard shall specify control flow restrictions between its elements inorder to achieve freedom from interference.

– The standard shall contain use case driven argumentation for safety sce-narios that can be used to build a safety case. (This should help the stackimplementers in getting a certification, if they follow the standard.)

• Security

– The standard shall specify data flow restrictions between its elements, andbetween applications.

– The standard shall classify its elements with respect to security sensitivity(that is, functional clusters shall be marked if they handle sensitive data.)

– The standard shall contain use case driven argumentation for security sce-narios that can be used to build a security case. (This should help the stackimplementers in getting a certification, if they follow the standard.)

• Maintainability

– It shall be possible in an efficient way to maintain AUTOSAR Adaptive Plat-form without preventing the introduction of new technologies (efficient interms of effort on the modification of the standard).

– The impact set of a change shall be available.

– The standard shall be structured in a way that minimizes change impact.

– It shall be possible to drop/deprecate elements of the standard.

– It shall be easy to add new features/needs without breaking the maintain-ability or the need to redesign the software architecture. Easy means quick,with low effort, local changes only and no heavy side effects.

– The maturity of parts of the standard shall be visible.

– The process shall enforce an architectural impact analysis in a very earlystage of the change process.

– The process shall enforce minimizing changes, that is not adding similarfunctionality multiple times.

• Portability

– Applications shall be portable between different stack implementations anddifferent machines.

– It shall be possible to scale the software architecture to the given projectneeds.

17 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 18: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

6.1.2 AUTOSAR Adaptive Platform Stack

• Compatibility

– An AUTOSAR Adaptive Platform stack implementation shall be capable tooffer multiple versions of the same service.

– An instance of an AUTOSAR Adaptive Platform stack implementation shallbe able to co-exist with other instances on different machines, within thesame vehicle.

• Usability

– An AUTOSAR Adaptive Platform stack implementation shall explicitly doc-ument restrictions on the application development that go beyond the stan-dard.

• Maintainability

– An AUTOSAR Adaptive Platform stack implementation shall be traceable tothe contents of the standard.

– An AUTOSAR Adaptive Platform stack implementation shall support multipleversions of the same service.

• Portability

– An AUTOSAR Adaptive Platform stack shall be portable to a different customhardware.

– An AUTOSAR Adaptive Platform stack shall provide mechanisms to replaceparts.

6.1.3 AUTOSAR Adaptive Application

• Usability

– No Goal: An application developer shall be able to supply custom implemen-tation for pre-defined platform functionality.

• Maintainability

– An application shall explicitly state which parts of the standard it uses.

• Portability

– An application entirely based on AUTOSAR Adaptive Platform (i.e. with-out custom extensions) shall be portable to another AUTOSAR AdaptivePlatform stack of the same version without modifications to the applicationsource code itself (source code compatibility).

18 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 19: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

6.2 Quality Scenarios

There are currently no quality scenarios defined for the AUTOSAR Adaptive Platform.

19 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 20: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

7 System Scope and Context

This chapter provides an overview of the AUTOSAR Adaptive Platform system contextby separating the AUTOSAR Adaptive Platform and its communication partners (e.g.,external systems). Considering Figure 7.1, there are three categories of communica-tion partners for the AUTOSAR Adaptive Platform.

Operating System

Adaptive Application

Watchdog Crypto Provider

«externalInterfac...Multi-Process System

Interface

«platformExtension...Crypto Provider

«externalInterfac...TCP/IP Stack

«externalInterface»Watchdog Driver

«externalInterfac...Non-volatile Storage

AUTOSAR Adaptive Platform

«externalInterface»Single-Process POSIX API

«use»

«use»«use» «use»«use» «use» «use»

Figure 7.1: Overview of AUTOSAR Adaptive Platform and its context

The AUTOSAR Adaptive Platform is conceptually a middleware. AUTOSAR AdaptivePlatform provides services to Adaptive Applications (cf. Section 7.1) beyondthose available from the underlying operating system, drivers, and extensions (cf. Sec-tion 7.2). Section 7.3 describes the third category that are external systems communi-cating with (an Adaptive Application via) AUTOSAR Adaptive Platform.

7.1 Adaptive Application

Adaptive Applications are built on the functionality provided by the AUTOSARAdaptive Platform. They directly use the various interfaces provided by the individualbuilding blocks of AUTOSAR Adaptive Platform described in more detail in chapter 9.

20 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 21: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

7.2 Dependencies

7.2.1 Crypto Provider

Crypto Provider is a component that provides implementations of cryptographicroutines and hash functions to the AUTOSAR Adaptive Platform.

7.2.2 Operating System

The Operating System is the main component that AUTOSAR Adaptive Plat-form uses to provide its services. The Operating System controls processes andthreads, and provides inter-process communication facilities. The Operating Sys-tem also provides access to network interfaces, protocols like TCP/IP, and access tonon-volatile storage.

7.2.3 Watchdog

The Watchdog is a component to control the hardware watchdog of the machine anAUTOSAR Adaptive Platform runs on.

7.3 External Systems

AUTOSAR ClassicPlatform

Backend

Diagnostic Client

Third-party Platform

AUTOSAR Adaptive Platform

Adaptive Application

«flow»

«flow»

«flow»

«flow» «flow»

Figure 7.2: Overview of the AUTOSAR Adaptive Platform and external systems

The AUTOSAR Adaptive Platform supports applications that are operated in heteroge-neous environments. This section lists the external systems that AUTOSAR AdaptivePlatform is intended to interface.

21 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 22: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

7.3.1 AUTOSAR Adaptive Application

There may be many Adaptive Applications deployed in a vehicle on different Ma-chines. An Adaptive Application that does not run on the current instance of theAUTOSAR Adaptive Platform is therefore an external system to the AUTOSAR Adap-tive Platform. Such Adaptive Applications may exchange data such as sensoror status information. During a software update of the entire vehicle, the update of theindividual AUTOSAR Adaptive Platforms could be coordinated by a central AdaptiveApplication that makes use of the UCM Master addon to UCM.

7.3.2 AUTOSAR Classic Platform

The AUTOSAR Classic Platform is the main platform for deeply-embedded applicationssuch as sensor/actor systems. Adaptive Applications may require access forexample to sensor data provided by an AUTOSAR Classic Platform ECU and viceversa.

7.3.3 Third-party Platform

Besides the both platforms (AUTOSAR Adaptive Platform and AUTOSAR Classic Plat-form) provided by AUTOSAR, there may be ECUs in a vehicle and other systems thatare built on different platforms that need to communicate with an Adaptive Appli-cation via AUTOSAR Adaptive Platform.

7.3.4 Diagnostic Client

A Diagnostic Client uses the diagnostic services provided by the AUTOSARAdaptive Platform.

7.3.5 Backend

A Backend system provides Software Packages for download and controls theupdate process via Update and Configuration Management.

22 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 23: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

8 Solution Strategy

The AUTOSAR Adaptive Platform is a standard for an automotive middleware. It isnot a concrete implementation. The AUTOSAR Adaptive Platform standard leaves acertain degree of freedom to its implementers by defining requirements and softwarespecifications that need to be fulfilled without specifying how.

8.1 Architectural Approach

To support the complex applications, while allowing maximum flexibility and scalabil-ity in processing distribution and compute resource allocations, AUTOSAR AdaptivePlatform follows the concept of a service-oriented architecture (SOA). In a service-oriented architecture a system consists of a set of services, in which one may useanother in turn, and applications that use one or more of the services depending onits needs. Often service-oriented architectures exhibit system-of-system characteris-tics, which AUTOSAR Adaptive Platform also has. A service, for instance, may resideon a local ECU that an application also runs, or it can be on a remote ECU, which isalso running another instance of AP. The application code is the same in both cases -the communication infrastructure will take care of the difference providing transparentcommunication. Another way to look at this architecture is that of distributed comput-ing, communicating over some form of message passing. At large, all these representthe same concept. This message passing, communication-based architecture can alsobenefit from the rise of fast and high-bandwidth communication such as Ethernet.

8.2 Decomposition Strategy

The building blocks of the AUTOSAR Adaptive Platform architecture are refined step-by-step in this document according to the model depicted in figure 8.1. The top-levelcategories are chosen to give an overview from a users perspective what kind of func-tionality the AUTOSAR Adaptive Platform provides. A category contains one or moreFunctional Clusters. The Functional Clusters of the AUTOSAR AdaptivePlatform are defined to group a specific coherent technical functionality. FunctionalClusters themselves specify a set of interfaces and components to provide and real-ize that technical functionality. The building block view also contains information of theFunctional Clusters interdependencies based on interfaces from other Func-tional Clusters they use. However, note that these interdependencies are recom-mendations rather than strict specifications because they would constrain implementa-tions.

23 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 24: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Category

Functional Cluster

Interface Component

1..*1..*

1..*

Figure 8.1: Type model of building blocks

8.3 Technology

8.3.1 Implementation Language

C++ is the programming language of choice for the AUTOSAR Adaptive Platform andAdaptive Applications. C++ was chosen due to its safer programming model(compared to C) and availability of certified compilers that produce highly optimizedmachine code. Such properties are especially important for safety- and performance-critical, real-time applications (such as typical Adaptive Applications) where C++has become more and more popular in the software industry and academics.

8.3.2 Parallel Processing

Although the design for AUTOSAR Adaptive Platform as a service-oriented architectureinherently leverages parallel processing, the advancement of (heterogeneous) many-core processors offers additional opportunities. The AUTOSAR Adaptive Platform isdesigned to scale its functionality and performance as (heterogeneous) many-coretechnologies advance. Hardware and platform interface specifications are one partof that equation. However, advancements in operating system and hypervisor tech-nologies as well as development tools (for example automatic parallelization) are alsocrucial and are to be fulfilled by AUTOSAR Adaptive Platform providers, the softwareindustry, and academics.

8.4 Design Principles

The architecture of the AUTOSAR Adaptive Platform is based on several design prin-ciples that are outlined below.

24 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 25: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

8.4.1 Leveraging existing standards

AUTOSAR Adaptive Platform aims to leverage existing standards and specificationswherever possible. For example, AUTOSAR Adaptive Platform ist built on the existingand open C++ standard (cf. Section 8.3.1) to facilitate a faster development of theAUTOSAR Adaptive Platform itself and benefiting from the eco-systems of such stan-dards. It is, therefore, a critical focus in developing the AUTOSAR Adaptive Platformspecification not to casually introduce a new replacement functionality that an existingstandard already offers. For instance, no new interfaces are casually introduced justbecause an existing standard provides the functionality required but the interface issuperficially hard to understand.

8.4.2 SOLID principles

The SOLID principles [7] are a central part of the design principles of AUTOSAR. Whilethese five principles are all valid, only the Single-responsibility Principle, the InterfaceSegregation Principle and the Dependency Inversion Principle are relevant on the ab-straction level of this document. Therefore, they are elaborated in the following.

8.4.2.1 Single-responsibility Principle

The single-responsibility principle (SRP,SWEBOK3) [7] states that a component or classshould be responsible for a single part of the overall functionality provided by the soft-ware. That responsibility should be encapsulated by the component or class. Theservices provided by the component or class (via its interface(s)) should be closelyaligned with its responsibility.

The single-responsibility principle minimizes the reasons (i.e. a change to the singleresponsibility) that require a change to its interface. Thus, it minimizes impact on clientsof such an interface and leads to a more maintainable architecture (or code).

8.4.2.2 Interface Segregation Principle

The interface segregation principle (ISP) [7], [8] states that clients should not be forcedto depend on methods that they don’t use. As a consequence of the interface segre-gation principle, interfaces should be split up to reflect different roles of clients.

Similar to the single-responsibility principle, the segregation of interfaces reduce theimpact of a change to an interface to the clients and suppliers of an segregated inter-face.

25 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 26: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

8.4.2.3 Dependency Inversion Principle

The dependency inversion principle (DIP) [7], [8] states that high-level building blocksshould not depend on low-level building blocks. Both should depend on abstractions(e.g. interfaces). Furthermore, the dependency inversion principle states that abstrac-tions (e.g. interfaces) should not depend on details. Details (e.g. a concrete imple-mentation) should depend on abstractions.

The dependency inversion principle results in a decoupling of the implementations ofbuilding blocks. This is important to scale implementation efforts (cf. Section 5.2) andto perform proper integration tests.

8.4.3 Acyclic Dependencies Principle

The acyclic dependencies principle (ADP) [7], [8] states that dependencies betweenbuilding blocks should form a directed acyclic graph.

The acyclic dependencies principle helps to identify participating building blocks andreason about error propagation and freedom from interference. In general, it also re-duces the extend of building blocks to consider during activities such as test, build anddeployment.

8.5 Deployment

The AUTOSAR Adaptive Platform supports the incremental deployment of applica-tions, where resources and communications are managed dynamically to reduce theeffort for software development and integration, enabling short iteration cycles. Incre-mental deployment also supports explorative software development phases. For prod-uct delivery, the AUTOSAR Adaptive Platform allows the system integrator to carefullylimit dynamic behavior to reduce the risk of unwanted or adverse effects allowing safetyqualification. Dynamic behavior of an application will be limited by constraints statedin the Execution Manifest (cf. Section 12.8), for example, dynamic allocation ofresources and communication paths are only possible in defined ways, within config-ured ranges. Implementations of an AUTOSAR Adaptive Platform may further removedynamic capabilities from the software configuration for production use. Examples ofreduced behavioral dynamics might be:

• Pre-determination of the service discovery process

• Restriction of dynamic memory allocation to the startup phase only

• Fair scheduling policy in addition to priority-based scheduling

• Fixed allocation of processes to CPU cores

• Access to pre-existing files in the file-system only

26 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 27: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

• Constraints for AUTOSAR Adaptive Platform API usage by applications

• Execution of authenticated code only

8.6 Verification and Validation

The AUTOSAR Adaptive Platform standard uses a dedicated implementation of thestandard (AUTOSAR Adaptive Platform Demonstrator) to validate the requirementsand to verify the (still abstract) software design imposed by the individual softwarespecifications.

27 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 28: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9 Building Block View

This chapter provides an overview of the static structure of the AUTOSAR AdaptivePlatform by describing the high-level building blocks and their inter-dependencies.Please note that the use of interfaces between Functional Clusters in the AU-TOSAR Adaptive Platform is currently not standardized. Some aspects, for example,access management, are also not yet fully incorporated and standardized in all Func-tional Clusters.

9.1 Overview

Figure 9.1 provides an overview of the different categories of building blocks availablein the AUTOSAR Adaptive Platform. The categories are explained in more detail in thesubsequent sections.

AUTOSAR Adaptive Platform

Runtime Communication Storage

Security Safety Configuration

Diagnostics

Figure 9.1: Overview of AUTOSAR Adaptive Platform and its building blocks

9.1.1 Stereotypes

The UML diagrams presented in this chapter use a UML profile to provide a moreprecise semantics of the elements and relationships. Table 9.1 provides an overviewof the stereotypes in that profile and their semantics.

28 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 29: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Stereotype Metaclass SemanticsapplicationInterface Interface An interface that is intended to be used by

Adaptive Applications directly. Com-ponents within the AUTOSAR Adaptive Plat-form may use such interfaces as well.

externalInterface Interface An interface that is provided by an externalcomponent.

internalInterface Interface An interface that is intended to be used onlyby components within the AUTOSAR Adap-tive Platform itself.

platformExtension-Interface

Interface An interface that is used to extend the func-tionality of the AUTOSAR Adaptive Platform.Such interfaces are not intended to be usedby Adaptive Applications directly.

restrictedApplication-Interface

Interface An applicationInterface that is re-stricted to be used by specific applicationcomponents only. This applies in particularto interfaces used by State Management.State Management is considered to be apart of an Adaptive Application. How-ever, State Management access to inter-faces, for example, provided by ExecutionManagement, that are not intended to beused by any other part of an Adaptive Ap-plication.

Table 9.1: Overview of Stereotypes

9.2 Runtime

State ManagementExecution Management Log and Trace Core

Operating System Interface

Figure 9.2: Overview of Runtime and its building blocks

29 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 30: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.2.1 Execution Management

Platform Health Monitor

Execution Management

State Management

Operating System

«restrictedApplicationInterface»State Client

+ SetState(FunctionGroupState): Future

«externalInterface»Multi-Process System Interface

+ SetProcessConfiguration()+ StartProcess()+ TerminateProcess()

«applicationInterface»Execution Client

+ ReportExecutionState(ExecutionState): Result

«applicationInterface»Deterministic Client

+ GetActivationTime()+ GetNextActivationTime()+ GetRandom()+ RunWorkerPool()+ WaitForNextActivation()

«internalInterface»Request Execution Info

+ GetFunctionGroupStates()+ GetProcessStates()

«use»

«use»

«use»

Figure 9.3: Overview of Execution Management

9.2.1.1 Responsibilities

Execution Management is responsible to control Processes of the AUTOSARAdaptive Platform and Adaptive Applications. That is, it starts, configures, andstops Processes as configured in Function Group States using interfaces of theOperating System. The Operating System is responsible for runtime schedulingof those Process. The configuration of Processes that Execution Managementperforms includes limiting their resource consumption (CPU time, memory) using Re-source Groups provided by the Operating System.

Execution Management is the entry point of AUTOSAR Adaptive Platform and isstarted by the Operating System during system boot. Execution Managementthen controls the startup and shutdown of the AUTOSAR Adaptive Platform (see Sec-tion 10.2.1 for details). Execution Management optionally supports authenticated

30 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 31: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

startup where it maintains the chain of trust when starting from a Trust Anchor. Dur-ing authenticated startup Execution Management validates the authenticity and in-tegrity of Processes and will prevent their execution if violations are detected. Throughthese mechanisms, a trusted platform can be established (cf. Section 12.12).

9.2.1.2 Provided Interfaces

Deterministic Client (applicationInterface)

The Deterministic Client interface provides the functionality to run a cyclic de-terministic execution.

Deterministic execution provides a mechanism such that a calculation using a giveninput data set always produces a consistent output within a bounded time. There isa distinction between time and data determinism. Time determinism states that theoutput is always produced by a fixed deadline. Data determinism refers to generat-ing always the same output from the same input data set and internal state. In theAUTOSAR Adaptive Platform, time determinism has to be handled by the provisioningof sufficient resources. The support for data determinism is provided by ExecutionManagement through the Deterministic Client interface.

If a software lockstep is used, Execution Management interacts with the softwarelockstep framework to ensure identical behavior of the redundantly executed Pro-cesses.

Execution Management also interacts with Communication Management to syn-chronize data handling with cycle activation.

Execution Client (applicationInterface)

The Execution Client interface provides functionality for a Process to report itsexecution state to Execution Management.

State Client (restrictedApplicationInterface)

The State Client interface provides functionality to request entering a FunctionGroup State. This interface is intended to be used by State Management only.

State Management determines the desired state of the Function Groups that runon an AUTOSAR Adaptive Platform and requests corresponding state transitions viathe State Client interface. Execution Management will start/stop Processesto reflect the configuration of the Function Group State made by the integratorand report the result back to State Management.

31 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 32: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Request Execution Info (internalInterface)

The Request Execution Info interface provides functionality to retrieve informa-tion about Processes and Function Group States.

9.2.1.3 Required Interfaces

Multi-Process System Interface

Execution Management should use this interface for starting, controlling, and stop-ping Processes via the Operating System.

32 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 33: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.2.2 State Management

Platform Health Monitor

Execution Management

State Management

«restrictedApplicationInterface»State Client

+ SetState(FunctionGroupState): Future

«restrictedApplicationInterf...Machine Manager

+ ResetMachine()

«restrictedApplicationInterface»NetworkState

+ NetworkCurrentState()+ NetworkRequestedState()

Network Management

DiagnosticManagement

Update andConfigurationManagement

«applicationInterface»Package Management

+ CurrentStatus

+ GetSwClusterInfo()+ GetSwPackages()

«internalInterface»Function Group State

+ FunctionGroupState

+ ReleaseRequest()+ RequestState()

Interface is obsolete and creates dependency cycles.

«applicationInterface»Execution Client

+ ReportExecutionState(ExecutionState): Result

«use»«use»

«use»

«use»«use»

«use»

«use»

Figure 9.4: Overview of State Management

9.2.2.1 Responsibilities

State Management determines the desired target state of the AUTOSAR Runtimefor Adaptive Applications based on various application-specific inputs. That target stateis the set of active Function Group States of all Function Groups running on

33 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 34: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

the AUTOSAR Runtime for Adaptive Applications. State Management delegates toExecution Management to switch the individual Function Groups to the respec-tive Function Group States.

State Management is a unique component in the AUTOSAR Adaptive Platform be-cause it is not part of a AUTOSAR Adaptive Platform stack. The logic of State Man-agement currently needs to be implemented as application-specific code and thenconfigured and integrated with an AUTOSAR Adaptive Platform stack.

9.2.2.2 Provided Interfaces

Function Group State (internalInterface)

The (obsolete) Function Group State interface provides functionality to request aswitch to a Function Group State. It is still included in the current release due tocompatibility reasons with Update and Configuration Management.

9.2.2.3 Required Interfaces

Execution Client

State Management should use the Execution Client interface to report its ownexecution state back to Execution Management.

State Client

State Management should use the State Client interface to request transitionsto Function Group States.

Network State

State Management should use the Network State interface to trigger activationand deactivation of (partial) networks and to subscribe for corresponding activation anddeactivation events.

Package Management

State Management should use the Package Management interface to subscribefor status changes of Update and Configuration Management. State Man-agement shall use this information to prevent shutdown of the AUTOSAR Runtime for

34 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 35: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Adaptive Applications while an update session is running and to reload/restart rele-vant parts of the application and AUTOSAR Runtime for Adaptive Applications after anupdate has been applied.

9.2.3 Log and Trace

Log and Trace

«applicationInterface»Logger

+ LogDebug(): void+ LogError(): void+ LogFatal(): void+ LogInfo(): void+ LogVerbose(): void+ LogWarn(): void

«applicationInterface»Time Base Resource

Time Synchronization

«use»

Figure 9.5: Overview of Log and Trace

9.2.3.1 Responsibilities

Log and Trace provides functionality to build and log messages of different severity.An Adaptive Application can be configured to forward log messages to varioussinks, for example to a network, a serial bus, the console, and to non-volatile storage.

9.2.3.2 Provided Interfaces

Logger (applicationInterface)

The Logger interface provides functionality to log textual messages.

35 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 36: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.2.3.3 Required Interfaces

Time Base Resource

The Time Base Resource interface should be used to determine timestamps for logmessages.

9.2.4 Core

Core

«applicationInterface»Runtime Controller

+ Deinitialize()+ Initialize()

«applicationInterface»Process Termination

+ Abort()+ SetAbortHandler()

Figure 9.6: Overview of Core

9.2.4.1 Responsibilities

Core provides functionality for initialization and de-initialization of the AUTOSAR Run-time for Adaptive Applications as well as termination of Processes.

9.2.4.2 Provided Interfaces

Runtime Controller (applicationInterface)

The Runtime Controller interface provides functionality for initialization and de-initialization of the AUTOSAR Runtime for Adaptive Applications.

Process Termination (applicationInterface)

The Process Termination interface provides functionality to terminate the currentProcess.

9.2.4.3 Required Interfaces

Application Initializer does not require any standardized interfaces.

36 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 37: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.2.5 Operating System Interface

Operating System Interface

«applicationInterface»Operating System Interface

Operating System

«externalInterface»Single-Process POSIX API

«use»

Figure 9.7: Overview of Operating System Interface

9.2.5.1 Responsibilities

The Operating System Interface provides functionality for implementing multi-threaded real-time embedded applications and corresponds to the [9, POSIX PSE51profile]. That profile provides support to create Threads that may be executed inparallel on modern multi-core processors and to control their properties such as stackmemory or their scheduling. In addition, primitives for shared resource access areprovided such as Semaphores or memory locking. Asynchronous (real-time) signalsand message passing enable inter-process communication. High resolution timers andclocks are provided to control real-time behavior precisely. Some input/output functionsare provided as well but no file system APIs.

POSIX PSE51 and the Operating System Interface do not provide any meansto execute and control Processes. Processes (of the AUTOSAR Adaptive Platform)are entirely controlled by Execution Management via non-standardized interfaces.

Note that a typical AUTOSAR Adaptive Platform stack will not provide an actual im-plementation of the Operating System Interface because all functionality is al-ready provided by standard libraries of the programming language (e.g. Standard C++Library).

37 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 38: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.2.5.2 Provided Interfaces

Operating System Interface (applicationInterface)

The Operating System Interface is used by Adaptive Applications to cre-ate, configure and control multiple Threads with support for real-time guarantees.

9.2.5.3 Required Interfaces

Single-Process POSIX API

The Single-Process POSIX API is used to delegate creation, configuration andcontrol of Threads to the Operating System.

9.3 Communication

Communication Management Network Management Time Synchronization

Figure 9.8: Overview of Communication and its building blocks

38 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 39: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.3.1 Communication Management

Communication Management

Log and Trace

«applicationInterface»Logger

+ LogDebug(): void+ LogError(): void+ LogFatal(): void+ LogInfo(): void+ LogVerbose(): void+ LogWarn(): void

«externalInterface»TCP/IP Stack

Operating System Identity and AccessManagement

«applicationInterface»Service Interface

+ GetField()+ InvokeMethod()+ ReceiveEvent()+ RegisterMethod()+ SendEvent()+ SetField()

«internalInterface»Policy Decision Point

+ CheckAccess(): boolean

«internalInterface»Manifest Accessor

RegistryCryptography

«applicationInterface»Crypto Stack

«applicationInterface»Service Registry

+ FindService()+ OfferService()

«applicationInterface»Raw Data Interface

+ ReadRawData()+ WriteRawData()

«applicationInterface»Operating System

Interface

Operating SystemInterface

«use»«use»«use» «use»«use»«use»

Figure 9.9: Overview of Communication Management

9.3.1.1 Responsibilities

Communication Management is responsible for all levels of service-oriented andraw communication between applications in a distributed real-time embedded environ-ment. That is, intra-process communication, inter-process communication and inter-machine communication. The latter is also possible with AUTOSAR Classic Platformsand third-party platforms. Communication paths can be established at design-, start-up-, and run-time. Communication Management consists of a generic part that han-dles brokering and configuration as well as (potentially generated) skeletons for serviceproviders and respective proxies for service consumers.

39 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 40: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.3.1.2 Provided Interfaces

Service Interface (applicationInterface)

The Service Interface is used for service-oriented communication.

A service consists of a combination of Events, Fields, and Methods. The Ser-vice Interface supports both synchronous callback-based communication (e.g.,service method calls) and asynchronous communication (e.g., field changes, events).Extensions are provided for secure communication and quality of service.

Raw Data Interface (applicationInterface)

The Raw Data Interface provides functionality to send and receive streams of rawdata.

Service Registry (applicationInterface)

The Service Registry provides functionality to register and to discover servicesduring runtime.

9.3.1.3 Required Interfaces

Logger

The Logger interface should be used to log for example failed checks.

TCP/IP Stack

The TCP/IP Stack interface should be used to control network connections for inter-machine communication.

Operating System Interface

The Operating System Interface interface should be used to control connec-tions for intra- and inter-process communication.

40 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 41: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Crypto Application Interface

The Crypto Application Interface should be used for end-to-end protection(integrity, authenticity, confidentiality) of communication channels.

Manifest Accessor

The Manifest Accessor should be used to read service configuration from theManifests.

Policy Decision Point

The Policy Decision Point interface should be used to check access.

9.3.2 Network Management

State Management

«restrictedApplicationInterface»NetworkState

+ NetworkCurrentState()+ NetworkRequestedState()

Network Management

«externalInterface»TCP/IP Stack

«use»

«use»

Figure 9.10: Overview of Network Management

9.3.2.1 Responsibilities

Network Management provides functionality to request and query the network statesfor logical network handles that can be mapped to physical or partial networks.

41 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 42: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.3.2.2 Provided Interfaces

Network State (restrictedApplicationInterface)

The Network State interface is used to request and query the network states forlogical network handles. It is intended to be used by State Management only.

9.3.2.3 Required Interfaces

TCP/IP Stack

Network Management should use the functionality of the underlying TCP/IP Stackto send or receive Network Management messages on the physical networks.

9.3.3 Time Synchronization

«applicationInterface»Time Base Resource

Time Synchronization

«externalInterface»TCP/IP Stack

«use»

Figure 9.11: Overview of TimeSynchronization

9.3.3.1 Responsibilities

Time Synchronization provides synchronized time information in distributed ap-plications. Synchronized time information between different applications and/or Ma-chines is of paramount importance when the correlation of different events across adistributed system is needed, either to be able to track such events in time or to triggerthem at an accurate point in time.

42 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 43: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.3.3.2 Provided Interfaces

Time Base Resource (applicationInterface)

The Time Base Resource interface is used retrieve and update time information.

9.3.3.3 Required Interfaces

TCP/IP Stack

The TCP/IP Stack should be used to perform synchronization via network.

9.4 Storage

Persistency

Figure 9.12: Overview of Storage and its building blocks

9.4.1 Persistency

Persistency

«applicationInterface»Key-Value Storage

«applicationInterface»File Storage

«applicationInterface»Data Management

+ RegisterApplicationDataUpdateCallback()+ ResetPersistency()+ UpdatePersistency()

«applicationInterface»Crypto Stack

Cryptography

«externalInterface»Non-volatile Storage

Operating System

«applicationInterface»Redundancy Handling

+ RegisterRecoveryReportCallback()

«use»«use»

Figure 9.13: Overview of Persistency

43 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 44: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.4.1.1 Responsibilities

Persistency provides functionality to store and retrieve information to/from non-volatile storage of a Machine.

Persistent data is always private to one Process and is persisted across boot andignition cycles. There is no mechanism available to share data between different Pro-cesses using Persistency to prevent a second path of data exchange besidesCommunication Management. However, Persistency supports concurrent ac-cess from multiple threads of the same application running in the context of the sameProcess.

Persistency offers integrity of the stored data and provides error detection and cor-rection schemes. Persistency also offers confidentiality of the stored data usingencryption.

Persistency offers statistics, for example, the number of used resources.

9.4.1.2 Provided Interfaces

File Storage (applicationInterface)

The File Storage interface provides read and write access to plain files that maybe used to store arbitrary data.

Key-Value Storage (applicationInterface)

The Key-Value Storage interface provides read and write access to data struc-tured as key-value pairs. It supports strings as keys and all primitive types supportedby AUTOSAR Adaptive Platform as values. Besides the plain types, Persistencyshall store serialized binary data which are given by ara::core::Vector of ara:-:core::Byte as well as arbitrary CppImplementationDataTypes.

Redundancy Handling (applicationInterface)

As Persistency supports redundant storage of data and files, an error in the storeddata can be fixed implicitly by using the redundantly stored data. Only if this fails,an error will occur. The Redundancy Handling interface provides a way to trackwhether storage errors have been fixed using the available redundancy.

44 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 45: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Data Management (applicationInterface)

The Data Management interface provides functionality to trigger data migration (e.g.,after an software update) and data reset.

9.4.1.3 Required Interfaces

Crypto Stack

The Crypto Stack interface should be used to ensure integrity and confidentiality ofthe stored data.

Non-volatile Storage

The Non-volatile Storage interface should be used to access non-volatile stor-age.

9.5 Security

Cryptography Identity and Access Management

Figure 9.14: Overview of Security and its building blocks

45 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 46: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.5.1 Cryptography

«platformExtensionInterface»Crypto Provider

Crypto Provider

«applicationInterface»Crypto Stack

Cryptography

Identity and AccessManagement

«internalInterface»Policy Decision Point

+ CheckAccess(): boolean

«internalInterface»Crypto Service Manager

DiagnosticManagement

Persistency CommunicationManagement

Update andConfigurationManagement

«use»

«use» «use»

«use»

«use»«use»

Figure 9.15: Overview of Cryptography

9.5.1.1 Responsibilities

Cryptography provides various cryptographic routines to ensure confidentiality ofdata, to ensure integrity of data (e.g., using hashes), and auxiliary functions for ex-ample key management and random number generation. Cryptography is designedto support encapsulation of security-sensitive operations and decisions in a separatecomponent, such as a Hardware Security Module (HSM). Additional protection of keysand key usage can be provided by constraining keys to particular usages (e.g., decrypt-only), or limiting the availability of keys to individual applications as reported by Iden-tity and Access Management.

Depending on application support, Cryptography can also be used to protect sessionkeys and intermediate secrets when processing cryptographic protocols such as TLSand SecOC.

46 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 47: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.5.1.2 Provided Interfaces

Crypto Stack (applicationInterface)

The Crypto Stack provides cryptographic routines and auxiliary functions to Adap-tive Applications.

Crypto Service Manager (internalInterface)

The Crypto Service Manager provides internal functionality for access manage-ment and certificate storage.

9.5.1.3 Required Interfaces

Crypto Provider

Cryptography should use the Crypto Provider interface to access the actualimplementation of cryptographic routines and auxiliary functions provided by externallibraries or hardware drivers.

Policy Decision Point

Cryptography should use the Policy Decision Point interface to make accesscontrol decisions, for example on keys.

47 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 48: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.5.2 Identity and Access Management

Identity and AccessManagement

«internalInterface»Policy Decision Point

+ CheckAccess(): boolean

«internalInterface»Manifest Accessor

Registry

CryptographyCommunication Management Diagnostic Management

«use»

«use»

«use»

«use»

Figure 9.16: Overview of Identity and Access Management

9.5.2.1 Responsibilities

Identity and Access Management checks access to resources of the AUTOSARAdaptive Platform, for example, on Service Interfaces and Functional Clus-ters. Identity and Access Management hereby introduces access control forAdaptive Applications and protection against privilege escalation in case of at-tacks. In addition, Identity and Access Management enables integrators to ver-ify access on resources requested by Adaptive Applications in advance duringdeployment.

9.5.2.2 Provided Interface

Policy Decision Point (internalInterface)

The Policy Decision Point interface provides functionality to make an accesscontrol decision.

48 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 49: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.5.2.3 Required Interfaces

Manifest Accessor

Intents of Adaptive Applications are stored in the application manifest and needto be extracted by Identity and Access Management.

9.6 Safety

Platform Health Monitor

Figure 9.17: Overview of Safety and its building blocks

9.6.1 Platform Health Management

Platform Health Monitor

Execution ManagementState Management

«externalInterface»Watchdog Driver

+ Disable()+ Enable()+ Reset()

Watchdog

«applicationInterface»Supervised Entity

+ GetSupervisionStatus(): void+ ReportCheckpoint()

«restrictedApplicationInt...Machine Manager

+ ResetMachine()

«internalInterface»Request Execution Info

+ GetFunctionGroupStates()+ GetProcessStates()

«use»

«use» «use»

«use»

«use»

Figure 9.18: Overview of Platform Health Management

49 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 50: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.6.1.1 Responsibilities

Platform Health Management performs (aliveness, logical, and deadline) super-vision of Processes in safety-critical setups and reports failures to State Manage-ment. Platform Health Management also controls the Watchdog that in turnsupervises the Platform Health Management.

Alive Supervision checks that a supervised entity is not running too frequentlyand not too rarely. Deadline Supervision checks that steps in a supervised entityare executed within the configured minimum and maximum time. Logical Super-vision checks that the control flow during execution matches the designed controlflow. All types of supervision can be used independently and are performed based onreporting of Checkpoints by the supervised entity.

State Management and Execution Management are the fundamental Func-tional Clusters of the AUTOSAR Adaptive Platform and need to run and workproperly in any case. Therefore, Platform Health Management shall alwayssupervise the corresponding Processes for State Management and ExecutionManagement. Supervision failures in these Processes shall be recovered by a resetof the Machine since the normal way of error recovery (via Execution Managementand State Management) is no longer reliable.

9.6.1.2 Provided Interfaces

Machine Manager (restrictedApplicationInterface)

The Machine Manager interface provides functionality to trigger a reset of the Ma-chine.

Supervised Entity (applicationInterface)

The Supervised Entity interface provides functionality to report Checkpoints toPlatform Health Management, for example that a certain milestone in the controlflow has been reached.

9.6.1.3 Required Interfaces

Watchdog Driver

Platform Health Management shall use the Watchdog Driver to control theWatchdog.

50 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 51: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Request Execution Info

Platform Health Management should use the Request Execution Info toretrieve information about active Processes and Function Group States and en-able / disable its supervisions accordingly.

9.7 Configuration

RegistryUpdate and Configuration Management

Figure 9.19: Overview of Configuration and its building blocks

9.7.1 Update and Configuration Management

Update and Configuration Management

CommunicationManagement

Cryptography

«applicationInterface»Crypto Stack

«applicationInterface»Logger

+ LogDebug(): void+ LogError(): void+ LogFatal(): void+ LogInfo(): void+ LogVerbose(): void+ LogWarn(): void

Log and Trace

«applicationInterface»Package Management

+ CurrentStatus

+ GetSwPackages()

State Management

«applicationInterface»Raw Data Interface

+ ReadRawData()+ WriteRawData()

«internalInterface»Function Group State

+ FunctionGroupState

+ ReleaseRequest()+ RequestState()

«applicationInterface»Vehicle Package

Management

+ GetSwPackages()+ SwPackageInventory()

«use»

«use»

«use» «use»

«use»

Figure 9.20: Overview of Update and Configuration Management

51 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 52: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.7.1.1 Responsibilities

Update and Configuration Management is responsible for updating, installing,removing and keeping a record of the software on an AUTOSAR Adaptive Platform in asafe and secure way. Hereby, Update and Configuration Management enablesto update the software and its configuration flexibly through over-the-air updates (OTA).

9.7.1.2 Provided Interfaces

Package Management (applicationInterface)

The Package Management interface provides provides functionality to download,process, activate and remove Software Packages. Additionally, Package Man-agement provides the status of ongoing updates to State Management in order toprevent switching into unsafe states during updates and shutdowns of the system dur-ing the update process.

Vehicle Package Management (applicationInterface)

The Vehicle Package Management interface provides functionality methods todownload, process, activate and remove Vehicle Packages.

9.7.1.3 Required Interfaces

Raw Data Interface

Update and Configuration Management should use the Raw Data Inter-face for raw data transfers, for example transfer of Software Packages.

Crypto Stack

Update and Configuration Management should check the integrity and authen-ticity of software packages using functionality of the Crypto Stack.

Logger

Update and Configuration Management should use the Logger interface towrite log messages.

52 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 53: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Function Group State

Update and Configuration Management should use the Function GroupState interface to bring the AUTOSAR Runtime for Adaptive Applications into a statethat is safe before applying a software update.

9.7.2 Registry

Registry

«internalInterface»Manifest Accessor

CommunicationManagement

Identity and AccessManagement

«use» «use»

Figure 9.21: Overview of Registry

9.7.2.1 Responsibilities

The Registry is an internal component of the AUTOSAR Adaptive Platform that pro-vides access the information stored in Manifests. It is not intended to be used byAdaptive Applications directly.

9.7.2.2 Provided Interfaces

Manifest Accessor (internalInterface)

The Manifest Accessor interface is used to access data stored in Manifests, forexample configuration settings.

9.7.2.3 Required Interfaces

This component does not require any standardized interfaces.

53 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 54: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.8 Diagnostics

Diagnostic Management

Figure 9.22: Overview of Diagnostics and its building blocks

9.8.1 Diagnostic Management

Diagnostic Management

«applicationInterface»Diagnostic Interface

«applicationInterface»File Storage

«applicationInterface»Logger

+ LogDebug(): void+ LogError(): void+ LogFatal(): void+ LogInfo(): void+ LogVerbose(): void+ LogWarn(): void

«externalInterface»TCP/IP Stack

Persistency Log and TraceOperating System

«applicationInterface»Crypto Stack

Cryptography

«internalInterface»Policy Decision Point

+ CheckAccess(): boolean

Identity and AccessManagement

«platformExtensionInterface»UDS Transport Protocol API

«use»«use»«use» «use»«use»

Figure 9.23: Overview of Diagnostic Management

9.8.1.1 Responsibilities

Diagnostic Management is responsible for handling diagnostic events produced bythe individual Processes running in an AUTOSAR Runtime for Adaptive Applications.Diagnostic Management stores such events and the associated data persistentlyaccording to rendition policies. Diagnostic Management also provides access to di-agnostic data for external Diagnostic Clients via standardized network protocols(ISO 14229-5 (UDSonIP) which is based on the ISO 14229-1 (UDS) and ISO 13400-2(DoIP)).

54 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 55: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

9.8.1.2 Provided Interfaces

Diagnostic Interface (applicationInterface)

The Diagnostic Interface provides functionality to create diagnostic events andstore them persistently.

UDS Transport Protocol API (platformExtensionInterface)

The UDS Transport Protocol API provides functionality to extend the AUTOSARAdaptive Platform with UDS transport layer implementations, for example with an OEMspecific implementation.

9.8.1.3 Required Interfaces

File Storage

DM should use the File Storage interface to store diagnostic data persistently.

TCP/IP Stack

The TCP/IP Stack is used to accept and control network connections from externalDiagnostic Clients using the UDSonIP protocol.

Logger

DM should use the Logger interface to log errors and diagnostic events.

Policy Decision Point

DM should use the Policy Decision Point interface to check access of Diag-nostic Clients.

Crypto Stack

DM should use the Crypto Stack interface for example to perform authentication ofdiagnostic sessions.

55 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 56: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

10 Runtime View

This chapter shows the original design approach of the AUTOSAR Adaptive Platformfor implementing selected use cases. The presented use cases currently cover justa small part of the functionality of the AUTOSAR Adaptive Platform. More use caseswill be added in future versions of this document. Please note that individual imple-mentations of the AUTOSAR Adaptive Platform may always choose a different designinternally. Thus, interaction partners, the type of messages, and their order may differ.

10.1 Overview

The use cases are categorized in the subsequent sections. Section 10.2 groups theuse cases that control the lifecycle of an AUTOSAR Runtime for Adaptive Applica-tions. Section 10.3 lists use cases for communication with external systems. Section10.4 demonstrates how Adaptive Applications can be installed and how they and theAUTOSAR Runtime for Adaptive Applications can be updated.

10.2 AUTOSAR Runtime for Adaptive Applications Lifecycle

10.2.1 Machine Startup

During the startup of a machine the Operating System performs initialization stepsin an implementation-specific way. These steps include starting any middleware relatedto the Operating System, including device-drivers and services handling low-levelmiddleware. In addition, Execution Management is started as the entry point ofthe AUTOSAR Runtime for Adaptive Applications. Execution Management thencontrols the startup of the AUTOSAR Runtime for Adaptive Applications by startingState Management and Platform Health Management Processes.

After State Management and Platform Health Management are started,State Management takes control over the initialization of the AUTOSAR AdaptivePlatform by requesting a transition to the standardized Machine State Startupfrom Execution Management. After the rest of the AUTOSAR Adaptive Plat-form has been initialized, State Management requests application-specific statesfor the other Function Groups on the Machine from Execution Managementin the same way. Platform Health Management always supervises the Pro-cesses of Execution Management and State Management with a (probablyfixed) implementation-specific set of rules. Platform Health Management itselfis supervised by the Watchdog. In addition, Platform Health Management su-pervises application Processes according to the configuration in the Machine Man-ifest.

56 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 57: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

:Operating System

loop all Processes

TBC: This currently leaves us with a gap in watchdog supervision between start of EM and activation of thewatchdog.

EM: Execution Management

SM: State Management

:Watchdog Driver

PHM: Platform HealthMonitor

app: Adaptive Application

:Core

loop all Function Groups

refFunction Group State Transition(Startup)

An application must call the Initialize function before interacting with the Adaptive Runtime.

Activate the standard state "Startup" of the Machine State. This will start the rest of the platform processes.

EM needs to be added for supervision. This should be done by firing an ProcessChanged event.

ReportExecutionState(running): Result

ReportExecutionState(running): Result

ReportExecutionState(runing): Result

GetProcessStates()

SetState(FunctionGroupState): Future

GetFunctionGroupStates()

Initialize()

StartProcess()

StartProcess()

StartProcess()

Enable()

Figure 10.1: Startup of the AUTOSAR Runtime for Adaptive Applications

10.2.2 Machine Shutdown

A shutdown is requested by State Management after an application-specific event.First, the application Function Groups may be brought to a corresponding state (not

57 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 58: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

shown). Afterwards, State Management triggers a transition to the Shutdown Ma-chine State. The shutdown procedure is controlled by Execution Management.Execution Management stops all platform Processes. Then, Execution Man-agement terminates the State Management and Platform Health Manage-ment Processes and requests a shutdown of the underlying operating system.

SM: State Management :Operating SystemEM: ExecutionManagement

PHM: Platform HealthMonitor

All application and platform processes will be terminated. This is not shown for brevity. Then, the Machine State "Shutdown" is requested.

:Watchdog Driver

refFunction Group State Transition(Shutdown)

TerminateProcess(SM)

ReportExecutionState(terminating): Result

ReportExecutionState(terminating): Result

Disable()

event()

TerminateProcess(PHM)

Shutdown()

ProcessChanged(terminating, SM)

Figure 10.2: Shutdown of the AUTOSAR Runtime for Adaptive Applications

10.2.3 Function Group State Transition

A switch to another Function Group State is requested by State Managementbased on its inputs and internal state. The transition to the new Function GroupState is controlled by Execution Management. First, all Processes are termi-nated that are either not active in the target state, or do have a different StartupConfiguration in the target state. The latter may also include different startup de-pendencies. Then, all Processes are started by Execution Management in theorder imposed by their dependencies. During the state transition, Execution Man-agement notifies Platform Health Management on any change of the state of theProcesses. Platform Health Management adapts its supervisions accordingly.

58 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 59: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

:ExecutionManagement

loop all processes of requestedFGState

:Operating System :Platform Health Monitor

loop all running processes

alt

[process not active in requestedFGState]

[process active, but with different startupConfig]

opt process not running

:State Management

StartProcess()

TerminateProcess()

PerformDependencyResolution(requestedFGState)

SetState(requestedFGState): Future

GetProcessStates()

TerminateProcess()

GetFunctionGroupStates()

currentFGState= :requestedFGState

Figure 10.3: Transition to another Function Group State

10.2.4 Failure Recovery

In case Platform Health Management detects a failure in an entity it supervises itinforms Execution Management about the supervision failure. Execution Man-agement maps the supervised Process to the corresponding Function Group anddelegates to State Management to handle that failure in the Function Group andperform recovery actions. State Management is an application-specific componentthat, depending on its various inputs, internal state etc., may decide upon actions to betaken to recover from a failure. There are two main possibilities:

• recover by switching Function Group State to another Function GroupState (e.g., for degradation)

• recover by re-entering the same Function Group State and essentiallyrestarting all Processes in the Function Group

59 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 60: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

• as a last resort, advise Platform Health Management to reset the Machine

:Platform Health Monitor :Execution Management :State Management:Supervised Entity

alt

[recover]

[else]

app1: Adaptive Application

Checkpoint reported too late. Deadline missed.

MapProcessToFunctionGroup(app1): fg1

HandleFailure(fg1, deadline missed)

GetSupervisionStatus(): deadline missed

ResetMachine()

ReportCheckpoint()

SetSupervisionState(app1, deadline missed)

SetState(fg2): Future

Figure 10.4: Failure recovery scenarios

10.3 Communication

Service-oriented communication in the AUTOSAR Adaptive Platform is guarded byIdentity and Access Management that provides access control. All service-requests are handled by Communication Management. Communication Man-agement determines the Adaptive Application Identity (AAID) of the senderProcess using Execution Management. Then, Communication Managementrequests an access control decision from Identity and Access Management us-ing the identity of the sender and information about the called service. Communica-tion Management enforces the access control decision by forwarding the request tothe service in case the access was granted or dropping the request in case the accesswas denied.

60 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 61: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

app1: Adaptive Application :Communication Management :Identity and Access Management

alt

[Access allowed]

[Access denied]

:Execution Management app2: Adaptive Application

Drop()

Send(request, target)

GetAppID(): appID

CheckAccess(appID, target): boolean

Deliver(request, targetIP)

Figure 10.5: Access control in service-oriented communication

10.4 Update and Configuration Management

10.4.1 Update of an Adaptive Application

When an Adaptive Application has to be updated, the new version of the ap-plication first has to be transferred to the Update and Configuration Manage-ment instance. The state of the application as well as Update and ConfigurationManagement are monitored by State Management. Only if there is nothing else run-ning (state kIdle), the actual update process starts.

Update and Configuration Management then receives the signal to start pro-cessing the transferred data. After successful processing, the update enters activa-tion phase and Update and Configuration Management checks dependenciesin the transferred Software Packages. After successful activation, the AdaptiveApplication is restarted and after successful restart, running the updated software.

The last step for Update and Configuration Management is to finish the updateprocess by cleaning up and deleting temporary data, old software version or storeddata which are no longer required for the execution of the Adaptive Application.

61 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 62: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

:Backend :Update and ConfigurationManagement

:Adaptive Application:State Manager

CurrentStatus= :kCleaning-up

restart()

TransferData(): TransferId

Finish(): FinishReturnType

cleanup()

Activate(): ActivateReturnType

:FinishReturnType

:ActivateReturnType

CheckPackageDependencies()

CurrentStatus= :kIdle

ProcessSwPackage(TransferId)

CurrentStatus= :kIdle

CurrentStatus= :kActivating

CurrentStatus= :kProcessing

CurrentStatus= :kActivated

CurrentStatus= :kVerifying

Figure 10.6: Successful update of an Adaptive Application

62 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 63: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

11 Deployment View

This chapter provides an overview of exemplary deployment scenarios for an AU-TOSAR Adaptive Platform. Since the AUTOSAR Adaptive Platform is highly config-urable in its deployment, this section rather provides constraints on supported deploy-ments and a selection of relevant deployment scenarios.

11.1 Vehicle Software Deployment

«device»Vehicle

«device»machine1: Machine

«executionEnvironment»:Adaptive Runtime

«device»gateway: Machine

«executionEnvironment»:Adaptive Runtime

:Backend System :Diagnostic Client

«executable»OTA Client Application

«executable»Update and

ConfigurationManagement

«deployment spec»UCM Master

«executable»Update and

ConfigurationManagement

«deployment spec»UCM Subordinate

«device»ecu1: ECU

«executionEnvironment»:Classic Platform

Figure 11.1: Exemplary vehicle software update scenario

63 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 64: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Update and Configuration Management allows to install and update softwareon the AUTOSAR Adaptive Platform and AUTOSAR Classic Platform. For the AU-TOSAR Adaptive Platform, Update and Configuration Management also al-lows to remove software. The software packages can be received either from a Di-agnostic Client or from a specific Backend System for over-the-air updates. Ina vehicle, one Adaptive Application takes the role of a master that controls theupdate process in the vehicle and distributes individual software packages to the Ma-chines and ECUs within a vehicle.

64 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 65: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

12 Cross-cutting Concepts

This section provides an overview of cross-cutting concepts and patterns used in theAUTOSAR Adaptive Platform.

12.1 Overview of Platform Entities

The AUTOSAR Adaptive Platform defines design entities that several FunctionalClusters depend on. Figure 12.1 provides an overview of these entities, their logicalrelationships, and the Functional Clusters that depend on them. For the sake ofbrevity, this overview uses simplifications and abstractions over the actual specifica-tions in the [10, manifest specification].

Software Package Software Cluster

- diagnosticConfig [0..1]- version

Function Group

ProcessExecutable

ExecutionManagement

StateManagement

Update and Configuration Management

Function Group State

Platform HealthMonitor

PhmSupervision Supervision Checkpoint

Startup Configuration

- options- schedulingPriority

Adaptive Application

+process 1

1

+/requiredCluster 0..*

+/checkpoints

1..*

+executionDependecy 0..*

0..*

+executable1

1..* +state

0..*

0..*

Figure 12.1: Overview of platform entities and their logical relationships

A Software Package is a digitally signed package that can be installed/uninstalledvia Update and Configuration Management. A Software Package containsexactly one Software Cluster (see Section 12.4 for details). A Software Clus-ter refers to a set of Executables (and other files). The corresponding executablefile then holds the executable code for the Machine that the AUTOSAR Adaptive Plat-form runs on.

65 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 66: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Additionally, a Software Cluster configuration collects a set of Processes (cf.Section 12.4) and related entities. A Process refers to an Executable and providesdifferent Startup Configuration values, for example parameters, a schedulingpriority, and resource constraints. A Startup Configuration of a Process ap-plies to one or more Function Group States. Function Group States belongto a Function Group.

During runtime, State Management requests to enter a Function Group Statefrom Execution Management. Execution Management then terminates andstarts the Processes accordingly using the underlying Operating System.

For safety-critical systems, Platform Health Management performs supervisionof Processes according to rules (logical sequence, deadlines) defined in PhmSuper-visions. A PhmSupervision refers to a number of Supervision Checkpoints.During runtime, a process reports whenever it has reached such a checkpoint in itscontrol flow.

12.2 Function Group

A Function Group is (logically) made up a set of modeled Processes that providea certain functionality. For example, a Function Group could be an application,or a service. A special Function Group is the Machine State that groups theProcess of the AUTOSAR Adaptive Platform itself. A Function Group contains aset of Function Group States.

12.3 Function Group State

A Function Group State defines which Processes of a Function Group withwhat configuration parameters shall be running or not. The Machine State (thatrefers to the Processes of the AUTOSAR Adaptive Platform itself) defines at least thefollowing Function Group States: Off, Startup, Shutdown, and Restart.

12.4 Software Cluster

A Software Cluster configuration refers to a set of modeled Processes. ThoseProcesses are (transitively) used by one or more Function Group(s). Hereby, aFunction Group and its associated entities shall be part of only one SoftwareCluster. In other words, Function Groups that span several Software Clus-ters are invalid. A Software Cluster is packaged into one Software Package- the atomic installable/updateable unit managed by Update and ConfigurationManagement. A Software Cluster may depend on other Software Clusters.Such dependencies are expressed by version constraints. A Software Clustermay also specify structural dependencies to Sub Software Clusters in order to

66 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 67: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

build larger installable units. The top of such a structural dependency hierarchy iscalled a Root Software Cluster. Please note that a Software Cluster is onlyused to configure deployment aspects. A Software Cluster is not a runtime entity.

A Root Software Cluster may specify a diagnostic configuration, in particular, adiagnostic address. In contrast, a Sub Software Cluster may depend on a diag-nostic configuration of its Root Software Cluster. The diagnostic configurationapplies to Processes that are (transitively) contained in a Root Software Clus-ter and its Sub Software Cluster(s). That means, at runtime, any diagnosticevent produced by those Processes will be associated with the diagnostic address.

An exemplary Software Cluster during application design is shown in Figure 12.2.The application Software Cluster(s) are modeled/configured in the same way asthe platform Software Cluster by defining Function Groups with FunctionGroup States and associating StartupConfigurations of Processes to them.

A Software Cluster serves as a grouping entity during application design. As aresult, entities within a Software Cluster, in particular the Function Groups, donot need to have a unique (simple) name within the overall model because their path isstill unique. This allows to design Software Clusters independently, for example,by external suppliers.

67 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 68: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

a: Software Cluster

e1: Executable

fg1: Function Group

normal: FunctionGroup State

off: Function GroupState

degraded: FunctionGroup State

executionManifest: Manifest

p1: Process

cfg1: StartupConfiguration

platform: Software Cluster

:Manifest

EM: Process

:StartupConfiguration

Other elements not shown for brevity.

b: Software Cluster

e2: Executable

executionManifest: Manifest

fg2: Function Group

off: Function GroupState

normal: FunctionGroup State

p2: Process

cfg2: StartupConfiguration

Figure 12.2: Exemplary Software Cluster during application design

From such a standardized model, an equivalent implementation-specific configura-tion for Execution Management is derived that is used during runtime (see Figure12.3). That configuration advises Execution Management to start and configureprocesses accordingly when a Function Group State is requested. Hereby, Ex-ecution Management (logically) merges configurations contributed by all installedSoftware Packages. Other Functional Clusters that depend on configurationprovided in the Manifests merge the configurations contributed by all installed Soft-ware Packages in the same way. Please also note that there is no correspondingruntime entity for a Software Cluster (see Figure 12.3).

68 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 69: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

:Execution ManagementPlatform EMConfiguration

fg1 EMConfiguration

Start Executable "e1" as process "p1" with configuration "cfg1" if "fg1::running" is requested.

fg2 EMConfiguration

e1: Executable

fg1: Function Group

normal: FunctionGroup State

off: Function GroupState

degraded: FunctionGroup State

p1: Process

cfg1: StartupConfiguration

e2: Executable

fg2: Function Group

off: Function GroupState

normal: FunctionGroup State

p2: Process

cfg2: StartupConfiguration

Start Executable "e2" as process "p2" with configuration "cfg2" if "fg2::running" is requested.

Figure 12.3: Impact of exemplary Software Cluster during runtime

All Processes related to the Functional Clusters of the AUTOSAR AdaptivePlatform should be referenced only in Software Clusters of category PLAT-FORM_CORE or PLATFORM. This allows for platform-independent development ofSoftware Clusters of category APPLICATION_LAYER.

In case a Functional Cluster may need multiple logical instances (for example,Diagnostic Management has a logical instance per diagnostic address), an imple-mentation of the Functional Cluster should still use a single physical (daemon)process.

An AUTOSAR Adaptive Platform vendor may deviate from this design guide but shouldprovide additional countermeasures to keep Adaptive Applications portable.

12.5 Machine

The AUTOSAR Adaptive Platform regards hardware it runs on as a Machine. The ra-tionale behind that is to achieve a consistent platform view regardless of any virtualiza-tion technology which might be used. The Machine might be a real physical machine,a fully-virtualized machine, a para-virtualized OS, an OS-level-virtualized container orany other virtualized environment.

69 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 70: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

On hardware, there can be one or more Machine, and only a single instance of AU-TOSAR Adaptive Platform runs on a machine. It is generally assumed that this hard-ware includes a single chip, hosting a single or multiple Machines. However, it is alsopossible that multiple chips form a single Machine if the AUTOSAR Adaptive Platformimplementation allows it.

12.6 Manifest

A Manifest represents a piece of AUTOSAR model description that is created tosupport the configuration of an AUTOSAR Adaptive Platform product and which is up-loaded to the AUTOSAR Adaptive Platform product, potentially in combination withother artifacts (like binary files) that contain executable code to which the Manifestapplies. Please note that a typical Adaptive Application will make use of severaldistinct but interrelated Manifests. Hereby, the individual Manifests contribute in-formation to the complete application model. For example, each Software Clustermay contribute a self-contained set of Manifests to configure its functionality.

The usage of a Manifest is limited to the AUTOSAR Adaptive Platform. This doesnot mean, however, that all ARXML produced in a development project that targetsthe AUTOSAR Adaptive Platform is automatically considered a Manifest. In fact,the AUTOSAR Adaptive Platform is usually not exclusively used in a vehicle project.A typical vehicle will most likely be also equipped with a number of ECUs developedon the AUTOSAR Classic Platform and the system design for the entire vehicle will,therefore, have to cover both, ECUs built on top of the AUTOSAR Classic Platform andMachines created on top of the AUTOSAR Adaptive Platform.

In principle, the term Manifest could be defined such that there is conceptually justone "Manifest" and every deployment aspect would be handled in this context. Thisdoes not seem appropriate because it became apparent that Manifest-related model-elements exist that are relevant in entirely different phases of a typical developmentproject.

This aspect is taken as the main motivation that next to the application design it isnecessary to subdivide the definition of the term Manifest in three different partitions:

Application Design This kind of description specifies all design-related aspects thatapply to the creation of application software for the AUTOSAR Adaptive Platform. Itis not necessarily required to be deployed to the adaptive platform machine, but theapplication design aids the definition of the deployment of application software in theExecution Manifest and Service Instance Manifest. See Section 12.7 fordetails.

Execution Manifest This kind of Manifest is used to specify the deployment-relatedinformation of applications running on the AUTOSAR Adaptive Platform. An Execu-tion Manifest is bundled with the actual executable code to support the integrationof the executable code onto the machine. See Section 12.8 for details.

70 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 71: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Service Instance Manifest This kind of Manifest is used to specify how service-oriented communication is configured in terms of the requirements of the underlyingtransport protocols. A Service Instance Manifest is bundled with the actualexecutable code that implements the respective usage of service-oriented communi-cation. See Section 12.9 for details.

Machine Manifest This kind of Manifest is supposed to describe deployment-relatedcontent that applies to the configuration of just the underlying machine (i.e. without anyapplications running on the machine) that runs an AUTOSAR Adaptive Platform. AMachine Manifest is bundled with the software taken to establish an instance ofthe AUTOSAR Adaptive Platform. See Section 12.10 for details.

The temporal division between the definition (and usage) of different kinds of Mani-fest leads to the conclusion that in most cases different physical files will be used tostore the content of the three kinds of Manifest. In addition to the Application Designand the different kinds of Manifest, the AUTOSAR Methodology supports a Sys-tem Design with the possibility to describe Software Components of both AUTOSARPlatforms that will be used in a System in one single model. The Software Compo-nents of the different AUTOSAR platforms may communicate in a service-oriented waywith each other. But it is also possible to describe a mapping of Signals to Servicesto create a bridge between the service-oriented communication and the signal-basedcommunication.

12.7 Application Design

The application design describes all design-related modeling that applies to the cre-ation of application software for the AUTOSAR AP. Application Design focuses on thefollowing aspects:

• Data types used to classify information for the software design and implementa-tion

• Service interfaces as the pivotal element for service-oriented communication

• Definition how service-oriented communication is accessible by the application

• Persistency Interfaces as the pivotal element to access persistent data and files

• Definition how persistent storage is accessible by the application

• Definition how files are accessible by the application

• Definition how crypto software is accessible by the application

• Definition how the Platform Health Management is accessible by the application

• Definition how Time Bases are accessible by the application

• Serialization properties to define the characteristics of how data is serialized forthe transport on the network

71 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 72: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

• REST service interfaces as the pivotal element to communicate with a web ser-vice by means of the REST pattern

• Description of client and server capabilities

• Grouping of applications in order to ease the deployment of software.

The artifacts defined in the application design are independent of a specific deploymentof the application software and thus ease the reuse of application implementations fordifferent deployment scenarios.

12.8 Execution Manifest

The purpose of the execution manifest is to provide information that is needed for theactual deployment of an application onto the AUTOSAR AP. The general idea is tokeep the application software code as independent as possible from the deploymentscenario to increase the odds that the application software can be reused in differentdeployment scenarios. With the execution manifest the instantiation of applications iscontrolled, thus it is possible to

• instantiate the same application software several times on the same machine, orto

• deploy the application software to several machines and instantiate the applica-tion software per machine.

The Execution manifest focuses on the following aspects:

• Startup configuration to define how the application instance shall be started. Thestartup includes the definition of startup options and access roles. Each startupmay be dependent on machines states and/or function group states.

• Resource Management, in particular resource group assignments.

12.9 Service Instance Manifest

The implementation of service-oriented communication on the network requires con-figuration which is specific to the used communication technology (e.g. SOME/IP).Since the communication infrastructure shall behave the same on the provider and therequesters of a service, the implementation of the service shall be compatible on bothsides.

The Service Instance Manifest focuses on the following aspects:

• Service interface deployment to define how a service shall be represented on thespecific communication technology.

72 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 73: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

• Service instance deployment to define for specific provided and required serviceinstances the required credentials for the communication technology.

• The configuration of E2E protection

• The configuration of Security protection

• The configuration of Log and Trace

12.10 Machine Manifest

The machine manifest allows to configure the actual adaptive platform instance runningon specific hardware (machine).

The Machine Manifest focuses on the following aspects:

• Configuration of the network connection and defining the basic credentials for thenetwork technology (e.g. for Ethernet this involves setting of a static IP addressor the definition of DHCP).

• Configuration of the service discovery technology (e.g. for SOME/IP this involvesthe definition of the IP port and IP multi-cast address to be used).

• Definition of the used machine states.

• Definition of the used function groups.

• Configuration of the adaptive platform functional cluster implementations (e.g.the operating system provides a list of OS users with specific rights).

• The configuration of the Crypto platform Module.

• The configuration of Platform Health Management.

• The configuration of Time Synchronization.

• Documentation of available hardware resources (e.g. how much RAM is avail-able; how many processor cores are available).

12.11 Error Handling

Proper handling of errors during runtime is an important aspect to build safe and se-cure systems. The AUTOSAR Adaptive Platform does provide means for raising andhandling of such errors on different levels in the platform.

Platform Health Management detects errors (errors in the logical control flow,missed deadlines, and missed liveness reporting) at the level of Processes andperforms recovery actions (for example, degradation) according to rules defined inthe Manifest. Execution Management detects unexpected termination of Pro-cesses and reports to State Management for handling of such errors.

73 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 74: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

During execution of a Process of an Adaptive Application, different abnormalconditions might be detected and need to be handled and/or reported. The follow-ing types of unsuccessful operations are distinguished within the AUTOSAR AdaptivePlatform:

• An Error is the inability of an AUTOSAR Runtime for Adaptive Applications APIfunction to fulfill its specified purpose. An Error it is often a consequence ofinvalid and/or unexpected input data. An Error is considered to be recoverableand therefore shall be handled by applications.

• A Violation is the consequence of failed pre- or post-conditions of internalstate of the AUTOSAR Runtime for Adaptive Applications. A Violation is con-sidered to be non-recoverable.

• A Corruption is the consequence of the corruption of a system resource, e.g.stack or heap overflow, or a hardware memory flaw (for example, a detected bitflip). A Corruption is considered to be non-recoverable.

• A failed default allocation is the inability of the AUTOSAR Runtime forAdaptive Applications’s default memory allocation mechanism to satisfy an allo-cation request (for example, there is not enough free memory available).

It is expected that a Violation or Corruption will not be experienced by a user ofthe AUTOSAR Adaptive Platform (i.e. an application developer), unless there is some-thing seriously wrong in the overall system. For example, faulty hardware may lead to aCorruption. A Violation may occur if basic assumptions about resource require-ments are violated, or the user runs the AUTOSAR Runtime for Adaptive Applicationsin a configuration that is not supported by its vendor.

12.12 Trusted Platform

To guarantee the correct function of the system, it is crucial to ensure that the code ex-ecuted on the AUTOSAR Adaptive Platform is unaltered (integrity) and has legitimateorigin (authenticity). Keeping this property allows the integrator to build a TrustedPlatform. A key property of a system that implements a Trusted Platform is aTrust Anchor (also called Root of Trust). A Trust Anchor is often realizedas a public key that is stored in a secure environment, e.g. in non-modifiable persistentmemory or in an Hardware Security Module. A system designer is responsibleto ensure that the system starts beginning with a Trust Anchor and that the chain oftrust is kept until the Execution Management is launched. Depending on the mech-anism that is chosen by the system designer to establish the chain of trust, the integrityand authenticity of the entire system (including all executables) may be checked duringsystem start-up. Alternatively, the system designer might only ensure that the alreadyexecuted software has been checked regarding integrity and authenticity and Execu-tion Management takes over responsibility on continuing the chain of trust when ittakes over control of the system. In the latter case, the system integrator is responsibleto ensure that the Execution Management is configured accordingly.

74 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 75: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

Passing trust requires that a trusted entity checks (using trusted functionality) that theentity down the chain is authentic. The Trust Anchor (the first entity in the chain) isauthentic by definition. An example of such a chain of trust could look like this: TheTrust Anchor authenticates the bootloader before the bootloader is being started.In each subsequent step in the boot process, the to-be-started executable shall be au-thenticated first, for example by the executable started previously or by some externalentity like an Hardware Security Module. After the relevant parts of the Operat-ing System have been authentically started, it shall launch Execution Manage-ment as one of its first processes in the same manner passing trust to the AUTOSARAdaptive Platform. Then, Execution Management takes over the responsibility ofauthenticating Adaptive Applications before launching them.

As stated above, if authenticity is not checked by the functionality of the Trust An-chor itself, which is authentic by definition, the functionality that shall be applied toverify authenticity of an executable has to be authenticated as well before it is applied.For instance, if the Crypto Functional Cluster shall be used to verify authentic-ity of executables, the Crypto Functional Cluster itself shall be authenticated bysome trusted entity before it is used.

12.13 Secure Communication

AUTOSAR supports different protocols that provide communication security over a net-work. Integrity of messages can be ensured by the end-to-end protection offered by the[11, AUTOSAR E2E library]. End-to-end protection assumes that safety- and security-related data exchange shall be protected at runtime against the effects of faults withinthe communication link. Such faults include random hardware faults (e.g. corrupt regis-ters of a transceiver), interference (e.g. electromagnetic interference), and systematicfaults in the communication stack. The configuration of end-to-end-protection is donevia Service Instance Manifest on level of Service events, methods, and fields(notifier, get, and set methods). Confidentiality and authenticity of messages can beensured by dedicated configurations for the individual transport protocols (e.g. TLS,SecOC) in the Service Instance Manifest on level of Service events, meth-ods, and fields (notifier, get, and set methods).

75 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 76: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

13 Risks and Technical Debt

This chapter lists and rates risks associated with the overall architecture of the AU-TOSAR Adaptive Platform in Section 13.1. These risks usually might cause that someof the quality attributes of the AUTOSAR Adaptive Platform are not (fully) meat. Sec-tion 13.2 lists technical debt of the AUTOSAR Adaptive Platform that may impact itsmaintainability.

13.1 Risks

13.1.1 Risk Assessment

This document categorizes risks according to their severity. The severity is a functionof the probability and the impact of a risk. The probabilities are categorized as follows:

• very low - probability is less than 1 thousandth

• low - probability is between 1 thousandth and 1 percent

• medium - probability is between 1 percent and 10 percent

• high - probability is between 10 percent and 50 percent

• very high - probability is more than 50 percent

The impact of a risk is categorized as follows:

• very low - at most one quality scenario will take additional significant effort to besatisfied

• low - more than one quality scenario will take additional significant effort to besatisfied

• medium - at most one quality scenario is not satisfied with small gaps

• high - at most one quality scenario is not satisfied with big gaps

• very high - more than one quality scenario is not satisfied with big gaps

The final severity of a risk is then calculated according to table 13.1.

ProbabilityImpact very low low medium high very highvery low low (1) low (2) low (3) medium (4) medium (5)low low (2) medium (4) medium (6) high (8) high (10)medium low (3) medium (6) high (9) high (12) high (15)high medium (4) high (8) high (12) extreme (16) extreme (20)very high medium (5) high (10) high (15) extreme (20) extreme (25)

Table 13.1: Risk Severity Matrix

76 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 77: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

13.1.2 Risk List

No architectural risks were identified yet.

13.2 Technical Debt

No technical debt has been identified yet.

77 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture

Page 78: Document Title Software Architecture - AUTOSAR

Explanation of Adaptive Platform SoftwareArchitecture

AUTOSAR AP R20-11

References

[1] ISO 42010:2011 – Systems and software engineering – Architecture descriptionhttp://www.iso.org

[2] Explanation of Adaptive Platform Software Architectural DecisionsAUTOSAR_EXP_SWArchitecturalDecisions

[3] GlossaryAUTOSAR_TR_Glossary

[4] Main RequirementsAUTOSAR_RS_Main

[5] General Requirements specific to Adaptive PlatformAUTOSAR_RS_General

[6] ATAMSM: Method for Architecture Evaluationhttps://resources.sei.cmu.edu/asset_files/TechnicalReport/2000_005_001_13706.pdf

[7] Agile Software Development: Principles, Patterns, and Practices

[8] Guide to the Software Engineering Body of Knowledge, Version 3.0www.swebok.org

[9] API standards for Open Systemshttp://www.opengroup.org/austin/papers/wp-apis.txt

[10] Specification of ManifestAUTOSAR_TPS_ManifestSpecification

[11] Specification of SW-C End-to-End Communication Protection LibraryAUTOSAR_SWS_E2ELibrary

78 of 78 Document ID 982: AUTOSAR_EXP_SWArchitecture