AUTOSAR AP EXP PlatformDesign
AUTOSAR AP EXP PlatformDesign
AUTOSAR AP EXP PlatformDesign
AUTOSAR AP R23-11
4
• A new chapter Firewall
4
• Updated the architecture logical view
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Contents
1 Introduction 9
1.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Prereads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Relationship to other AUTOSAR specifications . . . . . . . . . . . . . . . 9
2 Related Documentation 10
5.2 POSIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.3 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.4 Memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.5 Resource control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.6 Device management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.7 Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6 Execution Management 36
6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2 System Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3 Execution Management Responsibilities . . . . . . . . . . . . . . . . . . 37
6.4 Resource Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.5 Trusted Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7 State Management 39
8 Communication Management 42
8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.2 Service Oriented Communication . . . . . . . . . . . . . . . . . . . . . . 42
8.3 Language binding and Network binding . . . . . . . . . . . . . . . . . . . 43
8.4 Generated Proxies and Skeletons of C++ Language Binding . . . . . . . 44
8.5 Static and dynamic configuration . . . . . . . . . . . . . . . . . . . . . . 44
8.6 Service Contract Versioning . . . . . . . . . . . . . . . . . . . . . . . . . 45
9 Diagnostics 46
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.2 Software Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.3 Diagnostic communication sub-cluster . . . . . . . . . . . . . . . . . . . 47
9.4 Diagnostic in Adaptive Application (AA) . . . . . . . . . . . . . . . . . . . 48
9.5 Typed vs generic interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.6 Diagnostic conversations . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.7 Event memory sub-cluster . . . . . . . . . . . . . . . . . . . . . . . . . . 49
9.8 Service Oriented Vehicle Diagnostics . . . . . . . . . . . . . . . . . . . . 49
10 Persistency 50
10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.2 Key-Value Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
10.3 File Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
10.4 Use cases for handling persistent data for UCM . . . . . . . . . . . . . . 52
11 Time Synchronization 54
11.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
11.2 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
11.3 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
12 Network Management 56
12.1 Overview on Network Management Algorithm . . . . . . . . . . . . . . . 56
12.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
13 Update and Config Management 58
13.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
13.2 Update protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
13.2.1 Data transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.3 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.3.1 Software package . . . . . . . . . . . . . . . . . . . . . . . . . 60
13.3.2 Backend package . . . . . . . . . . . . . . . . . . . . . . . . . 62
13.3.3 Vehicle Package . . . . . . . . . . . . . . . . . . . . . . . . . . 63
13.3.4 Software release and packaging workflow . . . . . . . . . . . . 64
13.4 UCM processing and activating Software Packages . . . . . . . . . . . . 65
13.5 V-UCM update campaign coordination . . . . . . . . . . . . . . . . . . . 67
13.5.1 Adaptive applications interacting with V-UCM . . . . . . . . . . 69
13.5.1.1 OTA Client . . . . . . . . . . . . . . . . . . . . . . . . . 69
13.5.1.2 Vehicle driver . . . . . . . . . . . . . . . . . . . . . . . 69
13.5.1.3 Vehicle state manager . . . . . . . . . . . . . . . . . . 69
13.5.1.4 Flashing Adapter . . . . . . . . . . . . . . . . . . . . . 70
13.6 Software information reporting . . . . . . . . . . . . . . . . . . . . . . . . 70
13.7 Software update consistency and authentication . . . . . . . . . . . . . . 70
13.8 Securing the update process . . . . . . . . . . . . . . . . . . . . . . . . 71
13.9 Appropriate State Management during an update process . . . . . . . . 71
14 Identity and Access Management 73
15 Cryptography 75
15.1 Security Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
15.2 Key Management Architecture . . . . . . . . . . . . . . . . . . . . . . . . 76
15.3 Remarks on API Extension . . . . . . . . . . . . . . . . . . . . . . . . . 77
16 Log and Trace 78
16.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
16.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
17 Safety 80
17.1 Functional Safety Architecture . . . . . . . . . . . . . . . . . . . . . . . . 80
17.2 Protection of Information Exchange (E2E-Protection) . . . . . . . . . . . 81
17.3 Platform Health Management . . . . . . . . . . . . . . . . . . . . . . . . 82
17.4 System Health Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 84
18 Core Types 86
18.1 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
18.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
18.1.2 ErrorCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
18.1.3 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
18.1.4 Future and Promise . . . . . . . . . . . . . . . . . . . . . . . . 87
18.2 Advanced data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
20 Firewall 91
1 Introduction
1.1 Contents
This specification describes the AUTOSAR Adaptive Platform (AP) design. The pur-
pose of this document is to provide an overview of AP but is not to detail all the elements
of AP design. It is to provide the overall design of the AP and key concepts for both AP
users and AP implementers.
The document is organized as follows. It starts with Technical Scope and Approach
to provide some background of AP, followed by Architecture describing both logical
and physical views of AP. Independent chapters of Methodology and Manifest and all
Functional Clusters follow, which are the units of functionalities of AP, each containing
its overview and introductions to their key concepts.
The detailed specification and discussions on the explained concepts are defined in
the relevant RS, SWS, TR and EXP documents.
1.2 Prereads
This document is one of the high-level conceptual documents of AUTOSAR. Useful
pre-reads are [1], [2], and [3].
2 Related Documentation
[1] Glossary
AUTOSAR_FO_TR_Glossary
[2] Main Requirements
AUTOSAR_FO_RS_Main
[3] Methodology for Adaptive Platform
AUTOSAR_AP_TR_Methodology
[4] Explanation of Adaptive Platform Software Architecture
AUTOSAR_AP_EXP_SWArchitecture
[5] The 4+1 View Model of Architecture
[6] Specification of Manifest
AUTOSAR_AP_TPS_ManifestSpecification
[7] Specification of Execution Management
AUTOSAR_AP_SWS_ExecutionManagement
[8] Specification of Platform Types for Adaptive Platform
AUTOSAR_AP_SWS_PlatformTypes
[9] Specification of Synchronized Time-Base Manager
AUTOSAR_CP_SWS_SynchronizedTimeBaseManager
[10] Specification of State Management
AUTOSAR_AP_SWS_StateManagement
[11] Explanation of Identity and Access Management
AUTOSAR_AP_EXP_IdentityAndAccessManagement
[12] Explanation of Safety Overview
AUTOSAR_FO_EXP_SafetyOverview
[13] Safety Requirements for AUTOSAR Adaptive Platform and AUTOSAR Classic
Platform
AUTOSAR_FO_RS_Safety
[14] ISO 26262:2018 (all parts) – Road vehicles – Functional Safety
https://www.iso.org
[15] E2E Protocol Specification
AUTOSAR_FO_PRS_E2EProtocol
[16] Specification of Communication Management
AUTOSAR_AP_SWS_CommunicationManagement
[17] Requirements on Health Monitoring
AUTOSAR_FO_RS_HealthMonitoring
MCU, though it can support multicore. Also, as the computing power swells, the power
efficiency is already becoming an issue even in data centers, and it is in fact much more
significant for these intelligent ECUs. From semiconductor and processor technologies
point of view, constrained by Pollack’s Rule, it is physically not possible to increase
the processor frequency endlessly and the only way to scale the performance is to
employ multiple (and many) cores and execute in parallel. Also, it is known that the
best performance-per-watt is achieved by a mix of different computing resources like
manycore, co-processors, GPU, FPGA, and accelerators. This is called heterogeneous
computing - which is now being exploited in HPC (High-Performance Computing) -
certainly overwhelms the scope of CP by far.
It is also worthwhile to mention that there is a combined effect of both processors
and faster communications. As more processing elements are being combined in a
single chip like manycore processors, the communication between these processing
elements is becoming orders of magnitude faster and efficient than legacy inter-ECU
communications. This has been made possible by the new type of processor inter-
connect technologies such as Network-on-Chip (NoC). Such combined effects of more
processing power and faster communication within a chip also prompts the need for a
new platform that can scale over ever-increasing system requirements.
3.3.1 C++
From top-down, the applications can be programmed in C++. It is now the language of
choice for the development of new algorithms and application software in performance
critical complex applications in the software industry and in academics. This should
bring faster adaptations of novel algorithms and improve application development pro-
ductivity if properly employed.
3.3.2 SOA
To support the complex applications, while allowing maximum flexibility and scalabil-
ity in processing distribution and compute resource allocations, AP follows service-
oriented-architecture (SOA). The SOA is based on the concept that a system consists
of a set of services, in which one may use another in turn, and applications that use
one or more of the services depending on its needs. Often SOA exhibits system-of-
system characteristics, which AP also has. A service, for instance, may reside on
a local ECU that an application also runs, or it can be on a remote ECU, which is
also running another instance of AP. The application code is the same in both cases -
the communication infrastructure will take care of the difference providing transparent
communication. Another way to look at this architecture is that of distributed comput-
ing, communicating over some form of message passing. At large, all these represent
the same concept. This message passing, communication-based architecture can also
benefit from the rise of fast and high-bandwidth communication such as Ethernet.
The systems that AP targets often require some level of safety and security, possibly at
its highest level. The introduction of new concepts and technologies should not under-
mine such requirements although it is not trivial to achieve. To cope with the challenge,
AP combines architectural, functional, and procedural approaches. The architecture is
based on distributed computing based on SOA, which inherently makes each compo-
nent more independent and free of unintended interferences, dedicated functionalities
to assist achieving safety and security, and guidelines such as C++ coding guideline,
which facilitates the safe and secure usage of complex language like C++, for example.
3.3.7 Agile
Although not directly reflected in the platform functionalities, the AP aims to be adaptive
to different product development processes, especially agile based processes. For
agile based development, it is critical that the underlying architecture of the system is
incrementally scalable, with the possibility of updating the system after its deployment.
The architecture of AP should allow this.
4 Architecture
4.1.1 ARA
Figure 4.1 shows the architecture of AP. The Adaptive Applications (AA),or just Ap-
plications run on top of ARA, AUTOSAR Runtime for Adaptive applications. ARA
consists of application interfaces provided by Functional Clusters, or FCs which be-
long to either Adaptive Platform Foundation, Adaptive Platform Services, Stan-
dard Application/Interfaces or Vehicle Services. Adaptive Platform Foundation pro-
vides fundamental functionalities of AP, and Adaptive Platform Services provide plat-
form standard services of AP. Standard Application/Interfaces FCs are the Applications
or Interfaces standardized by AP, and Vehicle Service FCs are the services that pro-
vide vehicle-level functionalities. Note that Any AA can also provide Services to other
AA.
The interface of Functional Clusters, either they are those of Adaptive Platform Foun-
dation or Adaptive Platform Services, are indifferent from AA point of view - they just
provide specified C++ interface or any other language bindings AP may support in fu-
ture. There are indeed differences under the hood. Also, note that underneath the
ARA interface, including the libraries of ARA invoked in the AA contexts, may use other
interfaces than ARA to implement the specification of AP and it is up to the design of
AP implementation.
Be aware that Figure 4.1 contains Functional Clusters that are not part of the current
release of AP, to provide a better idea of overall structure. Further new Functional
Clusters not shown here may well be added future releases of AP.
Adaptive Platform supports a series of well-known protocols, safety and security fea-
tures. The figures and tables below provide overviews.
The language binding of these API is based on C++, and the C++ Standard library is
also available as part of ARA. Regarding the OS API, only PSE51 interface, a single-
process profile of POSIX standard is available as part of ARA. The PSE51 has been
selected to offer portability for existing POSIX applications and to achieve freedom of
interference among applications.
Note that the C++ Standard Library contains many interfaces based on POSIX, in-
cluding multi-threading APIs. It is recommended not to mix the C++ Standard library
threading interface with the native PSE51 threading interface to avoid complications.
Unfortunately, the C++ Standard Library does not cover all the PSE51 functionalities,
such as setting a thread scheduling policy. In such cases, the combined use of both
interfaces may be necessary.
Note that decisions on which and when the application starts or terminates are not
made by EM. A special FC, called State Management (SM), is the controller, com-
manding EM based on the design of a system, arbitrating different states thus control-
ling the overall system behavior. Since the system here refers to the whole machine
AP and its application are running, the internal behavior thus the implementation is
project specific. The SM also interact with other FCs to coordinate the overall machine
behavior. The SM should use only the standard ARA interface to maintain portability
among different AP stack implementations.
Regarding the interaction between AAs, PSE51 do not include IPC (Inter-Process-
Communication), so there is no direct interface to interact between AAs. Communi-
cation Management (CM) is the only explicit interface. CM also provides Service Ori-
ented Communication for both intra-machine and inter-machine, which are transparent
to applications. CM handles routing of Service requests/replies regardless of the topo-
logical deployment of Service and client applications. Note that other ARA interfaces
may internally trigger interactions between AAs, however, this is not an explicit com-
munication interface but just a byproduct of functionalities provided by the respective
ARA interfaces.
AA and Functional Clusters may use any non-standard interfaces, provided that they
do not conflict with the standard AP functionalities and also that they conform to the
safety/security requirements of the project. Unless they are pure application local run-
time libraries, care should be taken to keep such use minimal, as this will impact the
software portability onto other AP implementations.
The physical architecture 1 of AP is discussed here. Note that most of the contents in
this section are for illustration purpose only, and do not constitute the formal require-
ment specification of AP, as the internals of AP is implementation-defined. Any formal
requirement on the AP implementation is explicitly stated. As an additional source of
information, refer to [4] which describes the AP internal architecture in more detail.
cesses belong to. If they are AAs running on top of ARA, then they should only use
PSE51. If a process is one of the Functional Clusters, it is free to use any OS interface
available.
In summary, from the OS point of view, the AP and AA forms just a set of processes,
each containing one or multiple threads - there is no difference among these pro-
cesses, though it is up to the implementation of AP to offer any sort of partitioning.
These processes do interact with each other through IPC or any other OS functionali-
ties available. Note that AA processes, may not use IPC directly and can only commu-
nicate via ARA.
In general, the Functional Clusters may interact with each other in the AP
implementation-specific ways, as they are not bound to ARA interfaces, like for ex-
ample PSE51, that restricts the use of IPC. It may indeed use ARA interfaces of other
Functional Clusters, which are public interfaces. One typical interaction model be-
4.2.4 Machine/hardware
4.4 Manifest
A Manifest represents a piece of AUTOSAR model description that is created to sup-
port the configuration of an AUTOSAR AP product and which is uploaded to the AU-
TOSAR AP product, potentially in combination with other artifacts (like binary files) that
contain executable code to which the Manifest applies.
The usage of a Manifest is limited to the AUTOSAR AP. This does not mean, however,
that all ARXML produced in a development project that targets the AUTOSAR AP is au-
tomatically considered a Manifest. In fact, the AUTOSAR AP is usually not exclusively
used in a vehicle project.
A typical vehicle will most likely be also equipped with a number of ECUs developed
on the AUTOSAR CP and the system design for the entire vehicle will, therefore, have
to cover both - ECUs built on top of the AUTOSAR CP and ECUs created on top of the
AUTOSAR AP.
In principle, the term Manifest could be defined such that there is conceptually just
one "Manifest" and every deployment aspect would be handled in this context. This
does not seem appropriate because it became apparent that manifest-related model-
elements exist that are relevant in entirely different phases of a typical development
project.
This aspect is taken as the main motivation that next to the application design it is
necessary to subdivide the definition of the term Manifest in three different partitions:
• Application Design This kind of description specifies all design-related aspects
that apply to the creation of application software for the AUTOSAR AP. It is not
necessarily required to be deployed to the adaptive platform machine, but the
application design aids the definition of the deployment of application software in
the Execution manifest and Service Instance Manifest.
• Execution Manifest his kind of Manifest is used to specify the deployment-
related information of applications running on the AUTOSAR AP. An Execution
manifest is bundled with the actual executable code to support the integration of
the executable code onto the machine.
• Service Instance Manifest This kind of Manifest is used to specify how service-
oriented communication is configured in terms of the requirements of the under-
lying transport protocols. A Service Instance Manifest is bundled with the actual
executable code that implements the respective usage of service-oriented com-
munication.
• Machine Manifest This kind of Manifest is supposed to describe deployment-
related content that applies to the configuration of just the underlying machine
(i.e. without any applications running on the machine) that runs an AUTOSAR AP.
A Machine Manifest is bundled with the software taken to establish an instance
of the AUTOSAR AP.
The temporal division between the definition (and usage) of different kinds of Manifest
leads to the conclusion that in most cases different physical files will be used to store
the content of the three kinds of Manifest.
In addition to the Application Design and the different kinds of Manifest, the AUTOSAR
Methodology supports a System Design with the possibility to describe Software Com-
ponents of both AUTOSAR Platforms that will be used in a System in one single model.
The Software Components of the different AUTOSAR platforms may communicate in
a service-oriented way with each other. But it is also possible to describe a mapping
of Signals to Services to create a bridge between the service-oriented communication
and the signal-based communication.
• 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 for
the transport on the network
• 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 deployment
of the application software and thus ease the reuse of application implementations for
different deployment scenarios.
5 Operating System
5.1 Overview
The Operating System (OS) is responsible for run-time scheduling, resource manage-
ment (including policing memory and time constraints) and inter-process communica-
tion for all Applications on the Adaptive Platform. The OS works in conjunction with
Execution Management which is responsible for platform initialization and uses the OS
to perform the start-up and shut-down of Applications.
The Adaptive Platform does not specify a new Operating System for highly performant
processors. Rather, it defines an execution context and Operating System Interface
(OSI) for use by Adaptive Applications.
The OSI specification contains application interfaces that are part of ARA, the standard
application interface of Adaptive Application. The OS itself may very well provide other
interfaces, such as creating processes, that are required by Execution Management
to start an Application. However, the interfaces providing such functionality, among
others, are not available as part of ARA and it is defined to be platform implementation
dependent.
The OSI provides both C and C++ interfaces. In the case of a C program, the applica-
tion’s main source code business logic include C function calls defined in the POSIX
standard, namely PSE51 defined in IEEE1003.13 [1]. During compilation, the com-
piler determines which C library from the platform’s operating system provides these C
functions and the applications executable shall be linked against at runtime. In case of
a C++ program, application software component’s source code includes function calls
defined in the C++ Standard and its Standard C++ Library.
5.2 POSIX
There are several operating systems on the market, e.g. Linux, that provide POSIX
compliant interfaces. However, applications are required to use a more restricted API
to the operating systems as compared to the platform services and foundation.
The general assumption is that a user Application shall use PSE51 as OS interface
whereas platform Application may use full POSIX. In case more features are needed on
application level they will be taken from the POSIX standard and NOT newly specified
wherever possible.
The implementation of Adaptive Platform Foundation and Adaptive Platform Services
functionality may use further POSIX calls. The use of specific calls will be left open to
the implementer and not standardized.
5.3 Scheduling
The Operating System provides multi-threading and multi-process support. The stan-
dard scheduling policies are SCHED_FIFO and SCHED_RR, which are defined by the
POSIX standard. Other scheduling policies such as SCHED_DEADLINE or any other
operating system specific policies are allowed, with the limitation that this may not be
portable across different AP implementations.
5.7 Networking
The main interconnection mechanism between multiple Machines, as well as with other
sensors is expected to be based on Ethernet. Consequently, the use of TCP/IP- and
UDP/IP-based protocols is clearly described. It is therefore expected that the Operating
System will provide such a networking stack.
Applications will transparently benefit from the networking support by using Communi-
cation Management. As part of the Adaptive Platform Foundation, additional features
like VLAN, IPSEC and more are enabling secure communications within and across
systems.
6 Execution Management
6.1 Overview
Execution Management is responsible for all aspects of system execution management
including initialization of the Adaptive Platform and the startup/shutdown of Processes.
Execution Management works in conjunction with the Operating System to configure
the run-time scheduling of Processes.
7 State Management
State Management is a unique Functional Cluster that is intended to be mostly an ECU
development project specific, and generally, the final implementation is to be performed
by the system integrator. It is responsible for all aspects of the operational state of the
AUTOSAR Adaptive Platform, including handling of incoming events, prioritization of
these events/requests to set the corresponding internal states. State Management
may consist of one or more state machines depending on the project needs.
The State Management interact with Adaptive Applications via project specific ara::com
service interface consisting of ’Fields’ as described below. The interaction between
State Management and other Function Clusters shall be done via a standardized inter-
face(s) defined by each Function Cluster.
• Recover from (supervision) errors when being informed by Platform Health Man-
agement or by Execution Management
• Execution of project specific reset per Diagnostic Addresses on request from Di-
agnostics
• Preparation and verification of software clusters for being installed, updated or
removed on request from Update and Configuration Management
State Management provides a set of ’Trigger’ and ’Notifier’ fields via ara::com. The SM
essentially listens to the ’Triggers’, and perform implementation-specific state machine
processing internally, and provides the effect to the ’Notifier’ fields if there is any.
Since State Management functionality is critical, access from other Functional Clusters
or Applications must be secured, e.g. by IAM (Identity and Access Management). State
Management is monitored and supervised by Platform Health Management.
The ’lightweight’ StateMachine approach has been introduced by State Management to
help user of Adaptive Platform, in creation of State Management functionality. StateMa-
chines are designed to cover standard use-cases with minimal configuration effort.
Please note that StateMachines are a complementary part of AUTOSAR and thus are
optional to use. It is expected that complex use-cases will still require user provided
source code.
The StateMachine does not implement project-specific logic. Instead it provides in-
put interface for a project-specific Adaptive Application (i.e. SMControlApplication).
This application contains project-specific logic and makes decision which state of the
StateMachine should be requested next. Please note that error reaction, to errors re-
ported by Execution Management and/or Platform Health Management, is configured
directly inside the StateMachine.
To provide an overview to the StateMachine approach, the following figure shows how
the different StateMachine instances, the interfaces for the corresponding StateMa-
chine, the TransitionTables and the ErrorRecoveryTables interact.
8 Communication Management
8.1 Overview
The Communication Management is responsible for all aspects of communication be-
tween applications in a distributed real-time embedded environment.
The concept behind is to abstract from the actual mechanisms to find and connect
communication partners such that implementers of application software can focus on
the specific purpose of their application.
Each application that provides services registers these services at the Service Reg-
istry. To use a service a consuming application needs to find the requested service
by querying the Service Registry, this process is known as Service Discov-
ery.
The Network Binding defines how the actual data of a configured service is serial-
ized and bound to a specific network. It can be implemented based on Communication
Management configuration (interface definition of the AUTOSAR meta model) either
by interpreting a generated service specific recipe or by directly generating the seri-
alizing code itself. Currently, Communication Management supports SOME/IP, DDS,
IPC (Inter-Process-Communication or any other custom binding), Signal PDU (Signal-
Based Network binding) and Signal-Based Static Network binding.
• No discovery by application code The clients know the server but the server
does not know the clients. Event subscription is the only dynamic communication
pattern in the application.
• Full service discovery in the application No communication paths are known
at configuration time. An API for Service discovery allows the application code to
choose the service instance at runtime.
9 Diagnostics
9.1 Overview
The Diagnostic Management (DM) realizes the ISO 14229-5 (UDSonIP) which is based
on the ISO 14229-1 (UDS) and ISO 13400-2 (DoIP).
Diagnostic Management represents a functional cluster of the Adaptive Platform on the
foundation layer.
The configuration is based on the AUTOSAR Diagnostic Extract Template (DEXT) of
the Classic Platform.
The supported Transport Layer is DoIP. DoIP is a vehicle discovery protocol and
designed for off-board communication with the diagnostic infrastructure (diagnostic
clients, production-/workshop tester).
In-vehicle or for remote diagnostics often other transport protocols are used, wherefore
an API to extend the platform with a custom transport layer is provided.
UDS is typically used within the production of a vehicle and within the workshops to be
able to repair the vehicle.
:DiagnosticContributionSet :DiagnosticContributionSet
:DiagnosticContributionSet :DiagnosticContributionSet
- diagnosticAddress = 0x1234
- DID 0x2314
- DID 0x4321
Platform Core: Software Cluster Platform: Software Cluster
- category = PLATFORM_CORE - category = PLATFORM
according UDS request and is dynamically allocated during run-time in the Adaptive
Platform.
10 Persistency
10.1 Overview
Persistency offers mechanisms to applications and other functional clusters of the
Adaptive Platform to store information in the non-volatile memory of an Adaptive Ma-
chine. The data is available over boot and ignition cycles. Persistency offers standard-
ized interfaces to access the non-volatile memory.
The Persistency API takes InstanceSpecifiers for PersistencyInterfaces
(for applications) or FunctionalClusterInteractsWithPersistencyDeploy-
mentMappings (for other functional clusters) as parameters to address different stor-
age locations. The available storage locations fall into two categories:
• Key-Value Storage
• File Storage
Every application or functional cluster may use a combination of multiple of these stor-
age types.
«process»
Adaptive Application
«subsystem,entity»
Persistency
«entity» «entity»
Key-Value Storage A File Storage C
«entity» «entity»
Key-Value Storage B File Storage D
Persistent data is always private to one process of one application. There is no mech-
anism available to share data between different processes using the Persistency. This
decision was taken to prevent a second communication path besides the functionality
provided by Communication Management.
Persistency is prepared to handle concurrent access from multiple threads of the same
application, running in the context of the same Process. To create shared access to a
Key-Value Storage or File Storage, either the SharedHandle returned by OpenKeyVal-
ueStorage and OpenFileStorage can be passed on (i.e. copied) to another thread or
OpenKeyValueStorage and OpenFileStorage can be called in independent threads for
the same Key-Value Storage or File Storage, respectively.
Persistency is able to take care of the integrity of the stored data. It uses redundant in-
formation to detect data corruption. The redundant information consists of CRC codes,
Hash values, and "M out of N" copies. These mechanisms can be used either together
or independently.
Persistency offers also safe storage. This is basically implemented using redundancy,
but with the additional feature of letting the application know if there was any problem
with the stored data, even if it could be recovered using redundant data.
Persistency offers statistics regarding the number of used resources. It can also ensure
that a given quota is not exceeded.
Persistency offers encryption for stored data to make sure that sensitive data will be
encrypted before storing it on a physical device, ensuring confidentiality of the stored
data. Persistency also offers authentication using a MAC (message authentication
code) to ensure authenticity of stored data.
then configuration from the application design will be considered for the deployment of
persistent data.
11 Time Synchronization
11.1 Overview
Time Synchronization (TS) between different applications and/or ECUs is of paramount
importance when the correlation of different events across a distributed system is
needed, either to be able to track such events in time or to trigger them at an accu-
rate point in time.
For this reason, a Time Synchronization API is offered to the Application, so it can
retrieve the time information synchronized with other Entities / ECUs.
The Time Synchronization functionality is then offered by means of different "Time
Base Resources" (from now on referred to as TBR) which are present in the system
via a pre-build configuration.
11.2 Design
For the Adaptive Platform, the following three different technologies were considered
to fulfill all necessary Time Synchronization requirements:
• StbM of the Classic Platform
• Library chrono - either std::chrono (C++11) or boost::chrono
• The Time POSIX interface
After an analysis of the interfaces of these modules and the Time Synchronization fea-
tures they cover, the motivation is to design a Time Synchronization API that provides
a functionality wrapped around the StbM module of the Classic Platform, but with a
std::chrono like flavor.
The following functional aspects are considered by the Time Synchronization module:
• Startup Behavior
• Shutdown Behavior
• Constructor Behavior (Initialization)
• Normal Operation
• Error Handling
The following functional aspects will be considered in future releases:
• Error Classification
• Version Check
11.3 Architecture
The application will have access to a different specialized class implementation for
each TBR.
The TBRs are classified in different types. These types have an equivalent design to
the types of the time bases offered in the Synchronized Time Base Manager specifica-
tion [9]. The classification is the following:
• Synchronized Master Time Base
• Offset Master Time Base
• Synchronized Slave Time Base
• Offset Slave Time Base
As in StbM, the TBRs offered by the Time Synchronization module (TS from now on),
are also synchronized with other Time Bases on other nodes of a distributed system.
From this handle, the Application will be able to inquire about the type of Time Base
offered (which shall be one of the four types presented above) to then obtain a spe-
cialized class implementation for that type of Time Base. Moreover, the Application will
also be able to create a timer directly.
The TS module itself does not provide means to synchronize TBRs to Time Bases on
other nodes and/or ECUs like network time protocols or time agreement protocols.
An implementation of TBRs may have a dedicated cyclic functionality, which retrieves
the time information from the Time Synchronization Ethernet module or alike to syn-
chronize the TBRs.
The Application consumes the time information provided and managed by the TBRs.
Therefore, the TBRs serve as Time Base brokers, offering access to Synchronized
Time Bases. By doing so, the TS module abstracts from the "real" Time Base provider.
12 Network Management
12.2 Architecture
The Adaptive Platform specification describes the functionality, the API design and the
configuration of the Network Management for the AUTOSAR Adaptive Platform inde-
pendently of the underlying communication media used. At the moment only Ethernet
is considered but the architecture is kept bus - independent.
The Network Management (NM) is intended to be controlled via State Management
as the control of partial network needs to be coordinated with the set of the relevant
application via Function Group State of EM controlled by SM. The contents in this
chapter do not yet reflect the design.
Its main purpose is to coordinate the transition between normal operation and bus-
sleep mode of the underlying networks (Partial Networks, VLANs or physical channel)
in internally coordinated state machines.
It provides a Serviceinterface to the Statemanagement for requesting and releasing
networks and querying their actual state. It coordinates the requests of different in-
stances (Network Handles) and provides an aggregated machine request over the net-
work..
If the Partial Networking feature is used the Nm messages can contain Partial Network
(PN) requests, giving the ECU the possibility to ignore Nm messages which do not
request any PN which is relevant to the ECU. This gives the possibility to shut down the
ECU (or parts of it), although communication is still going on in other Partial Networks.
13.1 Overview
One of the declared goals of the AUTOSAR Adaptive Platform is the ability to flexi-
bly update the software and its configuration through over-the-air updates (OTA). To
support changes in the software on an Adaptive Platform, the Update and Configura-
tion Management (UCM) provides an Adaptive Platform service that handles software
update requests.
UCM is responsible for updating, installing, removing and keeping a record of the soft-
ware on an Adaptive Platform. Its role is similar to known package management sys-
tems like dpkg or YUM in Linux, with additional functionality to ensure a safe and secure
way to update or modify the software on the Adaptive Platform.
V-UCM is providing a standard Adaptive Platform solution to update vehicle software
over-the-air or by a diagnostic tester. It is coordinating and distributing packages within
a vehicle among several UCMs. Therefore, V-UCM can be considered as an AUTOSAR
standard UCM Client.
Vehicle
«device»
ECU
«executionEnvironment»
Machine Backend
«deployment ...
«executionEnvironment» VehiclePackage
Autosar Adaptive Application layer
SoftwarePackage
Vehicle Driver Vehicle State OTA Client
A
Interface Manager «deploy»
ara::com Backend
«use» SoftwarePackage
ara::com ara::com
B
Flashing Adapter Diagnostic
Application
«use» ara::com
«use» PackageManagement
VehicleDriverApplicationInterface
«executionEnvironment»
VehicleStateManagerInterface
AUTOSAR Adaptive Platform
Diagnostic
VehiclePackageManagement Manager
VDI VSM VPM
«service»
VUCM
UCM
PackageManagement
Sub
SM «serv...
UCM
UpdateRequest
D-PDU API ISO22900-2
DoIP EM
socket
Data transfer is done over ara::com. This enables transferring data into UCM or V-UCM
without the need to buffer data on the way from the backend or diagnostic tester. UCM
can store packages into a local repository where packages can be processed in the
order requested by the UCM client or V-UCM.
The transfer phase can be separated from the processing phase, UCM supports re-
ceiving data from multiple clients without limitations.
V-UCM is relying on the same transfer API as UCM but accessible through its own ded-
icated service interface. It allows the same features as UCM like pausing or resuming
of parallel transfers.
13.3 Packages
The unit of installation which is the input for the UCM is a Software Package.
The package includes, for example, one or several executables of (Adaptive) Applica-
tions, operating system or firmware updates, or updated configuration and calibration
data that shall be deployed on the Adaptive Platform. This constitutes the Updatable
Package part in Software Packages and contains the actual data to be added to or
changed in the Adaptive Platform. Beside application and configuration data, each
Software Package contains a Software Package Manifest providing metadata like the
package name, version, dependencies and possible some vendor-specific information
for processing the package.
The format of the Software Package is not specified, which enables using different kind
of solutions for the implementation of UCM. Software Package consists of updates to
be performed in software and metadata. This content is packaged by the UCM vendor
tooling to generate a Software Package which will be processed by the targeted UCM.
Software Package A
Signed container
SoftwareCluster A
Signed container
Executables
Data
Software Package A
Manifests
Signed container
SoftwareCluster
Executables Software Cluster
Manifest
Data
Authentication tag
Manifests
Software Package
Software Package Manifest
Manifest
Authentication tag
Authentication tag
Figure 13.2: Overview Software Package
UCM processes the vendor-specific Software Package based on the provided meta-
data. You can find below for information purpose a description of the fields that must
be contained in a Software Package Manifest:
General information
• Package name: fully qualified short-name.
• Version: Version from Software Cluster model that has to follow
https://semver.org semantic versioning specification with the exception that
build number is mandatory for debugging/tracking purposes. Used primitive
name is StrongRevisionLabelString
• deltaPackageApplicableVersion: Version of the Software Cluster to which this
delta package can be applied
• Minimum supported UCM version: to make sure that the Software Package can
be parsed properly by the UCM.
• Dependencies between Software Clusters: TPS Manifest Specification document
contains a model describing dependencies between Software Cluster after it is
updated or installed.
Sizes to allow checking if there is enough memory available:
• uncompressedSoftwareClusterSize: Size of Software Cluster in the targeted plat-
form
• compressedSoftwareClusterSize: Size of Software Package
For information and tracking purpose
• Vendor: vendor id
• Vendor authentication tag
• Packager: vendor id
• Packager authentication tag: for package consistency check and security pur-
poses (for UCM to check if the Software Package is trustable)
• Type approval: optional, homologation information. Could, for instance, be
RXSWIN from UN ECE WP.29
• Release notes: description of this release changes
• License: for instance, MIT, GPL, BSD, proprietary.
• Estimated duration of operation: estimated duration including, transfer, process-
ing and verification.
To distribute the package to the correct UCM within the vehicle:
• Diagnostic address: coming from the Software Cluster model, used in case pack-
age is coming from the tester via UDS for instance
• Action type: can be update, install, or remove
• Activation action: can be nothing, reboot (Machine) and restartApplication
For an OEM backend to understand packages contents from several package suppli-
ers, a backend package format is proposed as described in Figure 13.3.
You can find below for information purpose a description of the fields that should be
contained in Vehicle Package Manifest:
• Repository: uri, repository or diagnostic address, for history, tracking and security
purposes
• Minimum supported V-UCM version: to make sure that the Vehicle Package can
be parsed properly by the V-UCM.
• For update campaign orchestration:
– UCM identifier: unique identifier within vehicle architecture, to allow V-UCM
identifying UCM subordinates in the vehicle
– Associations of Software Packages to describe the sequence of transfer,
processing, and activation
– Vehicle driver notification: to interact with vehicle driver, asking for his con-
sent or notifying him at several steps of the vehicle update of the optional
safety measures to be taken during update.
The Vehicle Package could be used by a garage to fix a car having issues downloading
an update for instance. Therefore, like backend Package, Vehicle Package Manifest
shall be an ARXML file format for interoperability purposes.
Backend Packages assembled by integrator can then be put in the backend database
or repository. When a vehicle needs an update or new installation, the backend server
will query software packages from backend package database and associate the re-
lated Software Package Manifests into a Vehicle Package. In this package, backend
server embeds a campaign orchestration selected based on the vehicle specific elec-
tronic architecture, deducted for instance from Vehicle Identifying Number.
UCM sequence has been designed to support for example A/B update scenario or ’in-
place’ scenario where package manager provides the possibility to roll back into the
previous version if this is needed.
PackageManagerStatus
Initial Cancel
ProcessSwPackage
kRollingBackFailed kIdle kProcessing
Rollback RevertProcessedSwPackages
ProcessSwPackage
kCleaningUp Cancelled,
kRolledBack
OnFailure Finish PackageProcessed
do / clean up
[ProcessedPackages>0]
RevertProcessedSwPackages kReady
OnSuccess Finish
kRollingBack kActivated
Rollback
do / roll back to old version
Activate OnFailure
Rollback
OnSuccess
OnFailure
kVerifying kActivating
OnSuccess
do / MonitorApplicationRestart do / DependencyCheck
To keep implementation simpler and more robust, only one client at a time can request
to process a Software Package with the ProcessSwPackage method, switching UCM
state to PROCESSING. Several clients can request to process transferred packages
in sequence. In the case of A/B partition update scenario, several clients can process
the inactive /B partition being updated; in case of software cluster cross dependencies,
each client must update in sequence into "B partition". Once, processing is finished,
UCM state switches to READY for activation or another processing.
Activation of changes with the Activate method is done for all processed packages re-
gardless of the requesting client. V-UCM is coordinating this multi-client scenario. UCM
might not know if all targeted Software Packages have been processed, but it shall per-
form a dependency check to see that system is consistent with the requirements of the
installed software in "B partition". In case of dependencies are not fulfilled, UCM shall
reject the activation and switch back to READY state.
When updates are being activated, UCM opens an UpdateSession at SM via ara::com.
For each Function Group in each affected Software Cluster the PrepareUpdate method
is called. It executes Function Group specific preparation steps. On success, the state
changes to VERIFYING. UCM then requests either a machine reset or a Function
Group restart depending on the type of update via SM interface. For instance, if the
update includes the operating system or functional cluster updates, UCM might want
to reset the machine. However, if the update is only about a low criticality function,
only restarting Function Groups could be enough, reducing annoyance to the driver. In
this phase, UCM requests from SM to verify that targeted Function Groups are running
properly. Once these restarts are finished successfully, UCM switches to ACTIVATED
state.
When updates have been ACTIVATED, other processing requests will be rejected until
activation has been resolved. In this phase, UCM Client or V-UCM can either call Finish
for confirming the changes or Rollback for ignoring the changes and going back to the
previous version of the software. This is intended for instance in case such update is
part of a global update campaign coordinated by V-UCM, during which the update of
another ECU has failed. After Finish is called, UCM cleans all unneeded resources
and returns to IDLE.
In the case of Rollback is called, UCM is switched to the ROLLING-BACK state to re-
activate the old versions of the software clusters by calling PrepareRollback method
for each Function Group in each affected Software Cluster. For instance, in this state,
in case of an A/B partition scenario, UCM will prepare the "A partition" to be reacti-
vated/executed at the next restart. Then, when the restart takes place by calling the
SM interface and the "A partition" is reactivated, UCM switches to the ROLLED-BACK
state.
In both cases, Rollback and successful activation, UCM has to finish the update ses-
sion at SM.
Processing while transferring is supported by UCM design in order to avoid storing Soft-
ware Packages in Adaptive Platform, reducing costs and update time. For instance, in
the case of Software Cluster containing only Adaptive application, UCM could decom-
press received blocks, place files to its target location, finally authenticate and check
integrity of the Software Package.
stm DOC_V-UCM_StM_CampaignState
SYNCING
Campaign TRANSFERRING
do / ComputeUpdates transferData()
start
VEHICLEPACKAGE_TRANSFERRING
[SyncingDone]
SwPackageInventory(), do / VehiclePackageReceiving
transferVehiclePackage()
GetSwClusterInfo() [All CurrentStatus==Idle]
/ApprovalRequired:=False
IDLE
cancelCampaign(),
[not (InvalidPackageManifest |
UCMMaster.deleteTransfer()
LackResources |
transferExit() FailedDependency) &
[All CurrentStatus==Idle] approvalRequired
[transfer]==True)]
Campaign
[InvalidPackageManifest | /ApprovalRequired := True
aborted
[All CurrentStatus LackResources |
== Idle] FailedDependency |
NonRecoverableFailure] DriverApproval(True)
[ApprovalRequired==True]
CANCELLING
/ApprovalRequired :=
do / Cancelling False
cancelCampaign(),
NonRecoverableFailure
[InvalidPackageManifest]
[not (InvalidPackageManifest |
LackResources | FailedDependency) &
[Any CurrentStatus == approvalRequired[transfer]==False)]
kRollingBackFailed]
DriverApproval(True) [approvalRequired[process]==True
&& All CurrentStatus==Idle]
[(Start Proc. first SWP || A ll SWPs transferred) & /ApprovalRequired := False
ApprovalRequired[process]==False & All
CurrentStatus==Idle]
Transfer
finished
Campaign Update
successful Campaign failed start
UPDATING
VehicleCheck(True)
VehicleCheck(False),
cancelCampaign() All Packages processed successfully [All
NonRecoverableFailure,
cancelCampaign() SoftwarePackageStates == kProcessed &
VEHICLE_CHECKING approvalRequired[activate]==True]
/ApprovalRequired := True
do / VehicleSanityCheck
ActivationFailure,
cancelCampaign() PROCESSING
do / ProcessingSoftwarePackages
All CurrentStatus == Activated
The V-UCM state machine is not completely matching the UCM state machine as spe-
cific vehicle aspects have to be considered. For instance, the vehicle package transfer,
synchronization of available software in vehicle and backend or vehicle integrity check
after update, are specific to V-UCM.
As vehicle update involves OEM specificities, OEM specific aspects are pushed by de-
sign into the Adaptive Application side. In order to have interoperability and exchange-
ability for those applications with several vendors platforms, the V-UCM interface is
standardized as a Platform Service, like UCM. V-UCM assumes three applications to
interact with itself, as described below.
OTA Client sets the communication channel between backend and V-UCM. The com-
munication protocol between backend and OTA Client is not specified. OTA Client
could include a scheduler regularly triggering synchronization of databases (managed
by backend or V-UCM) containing available software from backend and present soft-
ware in the vehicle. Updatable, installable or removable software are computed by the
difference between these two in backend or V-UCM.
If a V-UCM is failing, it could be replaced by another one present in the vehicle. OTA
Client should then include the decision mechanism to choose with which V-UCM to
interact.
During an update, it could be necessary to interact with the vehicle human driver to:
• get consent to download (impacting data transfer costs), process or activate the
software (safety measures acknowledgment)
• put the vehicle in a specific state (to guarantee safety during a critical update, it
could be asked to stop vehicle and shutdown engine)
Vehicle State Manager Adaptive Application is collecting states from all vehicle ECUs or
Machines. From these collected states, Vehicle State Manager is computing a vehicle
state based on the SafetyConditions field exposed by V-UCM, which is contained in the
Vehicle Package. If the computed vehicle state is changing, the Vehicle State Manager
has to call V-UCM’s method PublishSafetyState. If the update’s safety is not met, the
V-UCM can decide to postpone, pause or cancel an update.
The Flashing Adapter is an Adaptive Application exposing same interface as UCM Sub-
ordinate to V-UCM but includes OEM specific sequences related to flashing via diag-
nostic. It uses an implementation of diagnostic protocol data unit application program-
ming interface (D-PDU API following ISO22900) to communicate with Classic ECUs.
A ctivating
D ependencyCheck()
StartU pdateSession()
:ReadyForU pdate
PrepareU pdate(vector<FunctionGroup>)
SetState(Off) ara::core::Deinitialize should
SIGTERM() be the last call
ara::core::D einitialize()
Close storages
& Free
:e xitstatus resources()
:Prepared
:A ctivate success
V erifying
Sym links or
A /B switch() Machine reset is optional and
defined in SWP Manifest
alt ReparseManifest
[Reset]
ResetMachine()
D ata backup()
Install and/or
update persistent
data()
:V erified
Cleaning-up
StopU pdateSession()
SetState()
N orm al()
O penXXX()
CleanUp
backup data()
IAM is broadly implemented by two logical entities. The PDP (Policy Decision Point)
and PEP (Policy Enforcement Point) work together to verify if a subject can access a
particular resource and then grant access to the said resource. The PDP represents
the logic in which the access control decision is made. It determines if the application
is allowed to perform the requested task. The PEP represents the logic in which the
Access Control Decisions are enforced. It communicates directly with the associated
PDP to receive the Access Control Decision.
A more detailed explanation of Identity and Access Management can be found in AU-
TOSAR_AP_EXP_IdentityAndAccessManagement [11].
15 Cryptography
AUTOSAR Adaptive Platform supports an API for common cryptographic operations
and secure key management. The API supports the dynamic generation of keys and
crypto jobs at runtime, as well as operating on data streams. To reduce storage require-
ments, keys may be stored internally in the crypto backend or externally and imported
on demand.
The API is designed to support encapsulation of security-sensitive operations and deci-
sions in a separate component, such as a Hardware Security Module (HSM). Additional
protection of keys and key usage can be provided by constraining keys to particular us-
ages (e.g., decrypt-only), or limiting the availability of keys to individual applications as
reported by IAM.
Depending on application support, the API can also be used to protect session keys
and intermediate secrets when processing cryptographic protocols such as TLS and
SecOC.
The FC Crypto offers applications and other Adaptive AUTOSAR Functional Clusters
a standardized interface, which provides operations for cryptographic and related cal-
culations. These operations include cryptographic operations, key management and
certificate handling. FC Crypto handles the actual implementation of all operations,
including all necessary configuration and brokering of operations between requesting
application and stack-provided implementation. The standardized interface is exposed
by the CryptoAPI.
X.509 Certificate Management Provider (CMP, namespace ara::crypto::x509) is re-
sponsible for X.509 certificates parsing, verification, authentic storage and local
searching by different attributes. In addition, CMP is responsible for storage, manage-
ment, and processing of Certificate Revocation Lists (CRLs) and Delta CRLs. CMP
supports of requests preparation and responses parsing for On-line Certificate Status
Protocol (OCSP).
API this way is expected to be a typical implementation strategy: The Crypto Driver
may implement the complete set of key management and crypto functions in order to
accelerate crypto operations and shield managed keys from malicious applications.
In order to realize this layered security architecture, the Crypto Stack API does not
only perform typical crypto operations like encryption and decryption but also provides
native support for:
1. Operating with encrypted keys or key handles
2. Managing keys securely despite possible application compromise
3. Constraining application access to and allowed operations on keys
16.1 Overview
The Log and Trace Functional Cluster is responsible for managing and instrument-
ing the logging features of the AUTOSAR Adaptive Platform. The logging and tracing
features can be used by the platform during development as well as in and after pro-
duction. These two use cases differ, and the Log and Trace component allows flexible
instrumentation and configuration of logging in order to cover the full spectrum. The
logging information can be forwarded to multiple sinks, depending on the configura-
tion, such as the communication bus, a file on the system and a serial console. The
provided logging information is marked with severity levels and the Log and Trace com-
ponent can be instrumented to log the information only above a certain severity level,
this enables complex filtering and straightforward fault detection of issues on the log-
ging client side. For each severity level, a separate method is provided to be used by
Adaptive applications or by Functional Clusters.
The AUTOSAR Adaptive Platform and the logging Functional Cluster are responsible
for maintaining the platform stability to not overload the system resources.
Log and Trace relies on the LT protocol standardized within the AUTOSAR consortium.
The protocol ensures that the logging information is packed into a standardized delivery
and presentation format. Furthermore, the LT protocol can add additional information
to the logging messages, such as an ECU ID. This information can be used by a logging
client to relate, sort or filter the received logging frames.
In addition, utility methods are provided, e.g. to convert decimal values into the hex-
adecimal numeral system or into the binary numeral system. These are necessary to
enable applications to provide data to Log and Trace which conforms to the standard-
ized serialization format of the LT protocol.
The Log And Trace Functional Cluster also offers two principal "classes" of log mes-
sages: Modeled and Non-Modeled messages. Both these support adding one or more
"arguments" to a log message. A log message without any arguments serves no pur-
pose and is discarded.
Non-Modeled messages are the traditional way of composing log messages: All ar-
guments of the message are added to an internal message buffer and then eventually
serialized for output, either to a console/file, or via network. All parts of the messages
will be sent via network. In the DLT protocol, these messages are called "verbose"
messages.
Modeled messages are designed to reduce traffic on the network, by omitting certain
static (i.e. unchanging) parts of a message from the network. As the name suggests,
these parts are instead added to the application ARXML model. In the DLT protocol,
these messages are called "non-verbose" messages. A log message viewer applica-
tion is able to display the full message by combining the static parts from the model
with the dynamic parts from the received message.
Non-modeled messages are mainly used during development, as the information re-
quired for the modeled messages may not be available at that time. However, nonmod-
eled messages can impose a high load on the network, making modeled messages
usually the preferred choice in production systems.
16.2 Architecture
The Log and Trace interfaces are provided in the namespace ara::log for applications
to forward logging onto one of the aforementioned logging sinks.
The Log and Trace interfaces rely on the back-end implementation that is a part of the
Logging framework. The Logging framework can use other Functional Clusters to fulfill
certain features, such as Time Synchronization.
17 Safety
Adaptive Platform safety measures and mechanisms. The architecture of the AU-
TOSAR Adaptive Platform can, in the best case, only be considered to be a Safety
Element out-of Context (SEooC).
Alive Supervision checks that a supervised entity is not running too frequently and not
too rarely.
Deadline supervision checks that steps in a supervised entity are executed in a time
that is within the configured minimum and maximum limits.
Logical supervision checks that the control flow during execution matches the designed
control flow.
Alive, Deadline and Logical Supervision are performed based on reporting of
checkpoints by applications/non-platform services or functional clusters via API Re-
portCheckpoint.
Health channel supervision provides the possibility to hook external supervision results
(like RAM test, voltage monitoring, etc.) to the Platform Health Management.
Health channel supervision is performed based on reporting of Health statuses via API
ReportHealthStatus.
Platform Health Management notifies State Manager if a failure is detected in the su-
pervised entities via API RecoveryHandler of RecoveryAction.
In case a failure in Execution Management or State Management is detected, Platform
Health Management will trigger a reset through watchdog.
Known limitations for this release:
• Dependency on the Diagnostic Manager is not yet defined.
Functionality shared by CP and AP is described in the foundation documents and
named "Health Monitoring" (RS_HealthMonitoring [17] and ASWS_HealthMonitoring
[18]). Additional specifications for AP only are described in the AP documents
and named "Platform Health Management" (RS_PlatformHealthManagement [19],
SWS_PlatformHealthManagement [20]).
Note that the architectural elements EM, SM and PHM are highly safety-relevant; safe
execution management and safe health monitoring are fundamental to the safe opera-
tion of an Adaptive Application. The EM, PHM, SM elements are inter-dependent and
coordinate their activities to ensure functional safety within the AUTOSAR Adaptive
Platform.
18 Core Types
Core Types defines common classes and functionality used by multiple Functional
Clusters as part of their public interfaces. One of the rationale to define Core Types was
to include common complex data types that are often used in the interface definition.
18.1.1 Overview
Handling errors is a crucial topic for any software development. For safety-critical soft-
ware, it is even more important, because lives can depend on it. However, current
standards for the development of safety-critical software impose significant restrictions
on the build toolchain, especially with regard to C++ exceptions. For ASIL applications,
using C++ exceptions is usually not possible due to the lack of exceptions support with
ASIL-certified C++ compilers.
The Adaptive Platform introduces a concept that enables error handling without C++
exceptions and defines a number of C++ data types to aid in this.
From an application programmer’s point of view, the central types implementing this
concept are ara::core::ErrorCode and ara::core::Result.
18.1.2 ErrorCode
18.1.3 Result
Because the error type has a default, most declarations of ara::core::Result only
need to give the type of the value, e.g. ara::core::Result<int> for a Result type
that contains either an int or an ara::core::ErrorCode.
The contained value or error can be accessed via the member functions
Result::Value or Result::Error. It is the caller’s responsibility to ensure that these
access functions are called only if the Result instance contains a value or an error, re-
spectively. The type of the content of a Result, i.e. a value or an error, can be queried
by Result::HasValue. None of these member functions throw any exceptions and
thus can be used in environments that do not support C++ exceptions.
In addition to the
exception-less workflow described above, the class
ara::core::Result allows to convert a contained ara::core::ErrorCode ob-
ject into a C++ exception, by calling ara::core::Result::ValueOrThrow. This
call returns any contained value as-is, but treats a contained error by throwing the
corresponding exception type, which is automatically derived from the contents of the
contained ara::core::ErrorCode.
Similar to the way ara::core::Result is used as a generalized return type for syn-
chronous function calls, ara::core::Future is used as a generalized return type for
asynchronous function calls.
ara::core::Future is closely modeled on std::future, but has been extended to
interoperate with ara::core::Result.
Similar to ara::core::Result, ara::core::Future is a class that either contains a
value or an error. This content can be extracted in two ways:
1. by calling ara::core::Future::get, which returns the contained value, if it ex-
ists, or throws an exception otherwise
2. by calling
ara::core::Future::GetResult, which returns a
ara::core::Result object which contains the value or the error from the
Future
Both of these calls will block until the value or error has been made available by the
asynchronous function call.
for this is that the memory allocation behavior of the std:: types is often unsuitable for
automotive purposes. Thus, the ara::core ones define their own memory allocation
behavior.
Examples of such data types are Vector, Map, and String.
Other types defined in ara::core have been defined in or proposed for a newer C++
standard, and the Adaptive Platform includes them into the ara::core namespace, be-
cause they are necessary for supporting certain constructs of the Manifest, or because
they are deemed very useful to use in an API.
Examples of such data types are StringView, Span, Optional, and Variant.
teraction with the ARA is possible, except for very few that are explicitly defined
in [SWS_CORE_15002] because they are required for the initialization and de-
initialization itself. The call to ara::core::Deinitialize() must be made inside
of main(), i.e., in a place where it is guaranteed that the static initialization has com-
pleted and destruction of statically initialized data has not yet started. Calls made to
ARA APIs after a call to ara::core::Deinitialize() but before destruction of stat-
ically initialized data will lead to implementation-defined behavior. Calls made to ARA
APIs after the destruction of statically initialized data will lead to undefined behavior.
20 Firewall
AP supports filtering of Ethernet traffic based on a pattern-matching algorithm based
on firewall rules. The functional cluster Firewall is responsible for managing these rules
and configuring the firewall engine.
For every AP instance where the firewall is deployed, a set of firewall rules can be
configured. Every firewall rule consists of a pattern against which the network packets
are matched and an action to be carried out by the firewall in case of a match (i.e.,
allow or block the network packet). The firewall iterates over this list of firewall rules and
performs the associated action in case of a pattern match. If no firewall rule matches,
a default action is carried out.
Network packet
Pattern
#2 Network packet pattern match Firewall action
Pattern
no-match
The firewall rule format is specified within the AUTOSAR MetaModel, hence the rules
can be configured and deployed to the AP instances by means of the Machine Mani-
fest. The firewall supports filtering within three categories: stateless network inspec-
tion, stateful network inspection (focusing on TCP) and deep packet inspection of ap-
plication layer protocols.
The network packet inspection is carried out by a firewall engine, which is typically lo-
cated at a low layer (TCP/IP stack or below). AP specifies a Functional Cluster Firewall
that acts as a management cluster: it takes the firewall rules configuration from the
manifest and configures the underlying firewall engine accordingly.
OEM
IdsM
application
Firewall Raise
State SEvs
Machine Manifest
Filter rule
Filter rule
Filter rule
FC Firewall
Provides firewall
configuration
Configures
firewall engine
Firewall Engine