All Is Kasjfd
All Is Kasjfd
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.
Table of Contents
1 Introduction 6
1.1 Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Requirements Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 ARXML Serialization Rules 10
2.1 Physical Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.1 File separation . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.2 File names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.1 XML Character Encoding . . . . . . . . . . . . . . . . . . . . 10
2.2.2 XML Version . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.3 XML Comments and Processing Instructions . . . . . . . . . 11
2.2.4 XML Root Element . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.5 XML Formating / Indention . . . . . . . . . . . . . . . . . . . 15
3 Glossary 19
A Change History 23
A.1 Change History of R4.3.0 . . . . . . . . . . . . . . . . . . . . . . . . . 23
A.1.1 Added Traceables . . . . . . . . . . . . . . . . . . . . . . . . 23
A.1.2 Changed Traceables . . . . . . . . . . . . . . . . . . . . . . . 24
A.1.3 Deleted Traceables . . . . . . . . . . . . . . . . . . . . . . . 24
B Mentioned Class Tables 24
Bibliography
[1] XML Schema Production Rules
AUTOSAR_TPS_XMLSchemaProductionRules
[2] Software Component Template
AUTOSAR_TPS_SoftwareComponentTemplate
[3] System Template
AUTOSAR_TPS_SystemTemplate
[4] Specification of ECU Configuration
AUTOSAR_TPS_ECUConfiguration
[5] Meta Model
AUTOSAR_MMOD_MetaModel
[6] Meta Model-generated XML Schema
AUTOSAR_MMOD_XMLSchema
[7] Standardization Template
AUTOSAR_TPS_StandardizationTemplate
[8] Requirements on Interoperability of AUTOSAR Tools
AUTOSAR_RS_InteroperabilityOfAutosarTools
[9] Extensible Markup Language (XML), v1.0
http://www.w3.org/TR/REC-xml/
[10] XML Schema 1.0
http://www.w3.org/TR/xmlschema-1
[11] Generic Structure Template
AUTOSAR_TPS_GenericStructureTemplate
[12] Unified Modeling Language: Superstructure, Version 2.0, OMG Available Specifi-
cation, ptc/05-07-04
http://www.omg.org/cgi-bin/apps/doc?formal/05-07-04
[13] Interoperability of AUTOSAR Tools
AUTOSAR_TR_InteroperabilityOfAutosarTools
[14] Software Process Engineering Meta-Model Specification
http://www.omg.org/spec/SPEM/2.0/
1 Introduction
This document specifies rules on how AUTOSAR models are serialized into AUTOSAR
XML descriptions. The intention of this specification is to support the interoperability
between AUTOSAR tools by specifying additional constraints on the AUTOSAR XML
descriptions that go beyond the definition of the XML structure that is defined by the
AUTOSAR XML schema. Benefits include:
• Comparison of AUTOSAR XML descriptions is simplified by defining a normalized
representation that avoids meaningless differences such as indention, character
encoding.
• Effort for tool implementation is reduced by restricting the amount of different fla-
vors of XML. E.g. different namespace prefixes, character encoding, files names,
etc.
AUTOSAR template specifications define the AUTOSAR Data Exchange Format. Fig-
ure 1.1 shows the relationship between the AUTOSAR ARXML Serialization Rules (this
specification) and other template specifications:
• The AUTOSAR XML Schema Production Rules [1] and this document focus on
the physical representation and the XML data format.
• The Software Component Template [2], System Template [3], ECU Configuration
Template [4], etc. address the data structure and its semantics.
AUTOSAR AUTOSAR
TPS TPS
ARXMLSerializationRules XMLSchemaProductionRules
AUTOSAR formalizes and maintains the data structure and semantics of the
AUTOSAR Data Exchange Format in the AUTOSAR Meta Model [5]. The mapping be-
tween that meta model and the AUTOSAR XML Schema [6] is described in AUTOSAR
XML Schema Production Rules [1] (see figure 1.2). An AUTOSAR Tool that produces
an AUTOSAR XML Description has to serialize the AUTOSAR model in a way that it
validates successfully against the AUTOSAR XML Schema. Additional constraints that
go beyond XML Schema validation are described in this document.
AUTOSAR
TPS
AUTOSAR
AUTOSAR XMLSchemaProductionRules
MMOD
MMOD XMLSchema
MetaModel
instanceOf
instanceOf
AUTOSAR
TPS
ARXMLSerializationRules AUTOSAR
AUTOSAR XML Description
User Model
Figure 1.2: Relationship between XML Schema Production Rules and ARXML Serializa-
tion Rules
Class AUTOSAR
Package M2::AUTOSARTemplates::AutosarTopLevelStructure
Note Root element of an AUTOSAR description, also the root element in corresponding
XML documents.
Tags: xml.globalElement=true
Base ARObject
Attribute Type Mul. Kind Note
adminData AdminData 0..1 aggr This represents the administrative data of an
Autosar file.
Tags: xml.sequenceOffset=10
arPackage ARPackage * aggr This is the top level package in an AUTOSAR
model.
Tags: xml.sequenceOffset=20
Kind: Specifies, whether the attribute is aggregated in the class (aggr aggregation),
an UML attribute in the class (attr primitive attribute), or just referenced by it (ref
reference). Instance references are also indicated (iref instance reference) in this
field.
Note: The comment the modeler gave for the class attribute (role note). Stereotypes
and UML tags of the class are also denoted here.
Please note that the chapters that start with a letter instead of a numerical value rep-
resent the appendix of the document. The purpose of the appendix is to support the
explanation of certain aspects of the document and does not represent binding con-
ventions of the standard.
The verbal forms for the expression of obligation specified in [TPS_STDT_00053] shall
be used to indicate requirements, see Standardization Template, chapter Support for
Traceability ([7]).
The representation of requirements in AUTOSAR documents follows the table specified
in [TPS_STDT_00078], see Standardization Template, chapter Support for Traceability
([7]).
Example 2.1
Some files could contain data types others could contain interfaces, etc.
Example 2.2
[TPS_ASR_00006] Avoid UTF BOM d AUTOSAR XML descriptions should NOT start
with a "UTF Byte Order Mask" (BOM). c(RS_IOAT_00001)
The byte order mask is a unicode character that can be used at the start of a text
stream in order to communicate information about:
• The fact that the stream is encoded in unicode
• Which unicode encoding is used (UTF-8, UTF-16, ...)
• The endianness of the unicode encoding
According to [TPS_ASR_00004] and [TPS_ASR_00005] the character encoding of
AUTOSAR XML descriptions shall be UTF-8 and this information shall be explicitly
described in the XML declaration. Additionally, UTF-8 doesn’t support different endi-
annesses.
Thus, using a BOM does not add additional information.
Example 2.3
Note: AUTOSAR tools may silently ignore XML Processing instructions and do not
need to serialize them again.
xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-3-0.xsd"
With the advent of the AUTOSAR adaptive platform, AUTOSAR decided to implement
a different versioning scheme for the releases of the adaptive platform (the classic
platform would just keep the existing approach to versioning). This new version scheme
for the adaptive platform consists of just two elements, the year and month of release.
The original approach was to simply use the two-element scheme of the adaptive re-
leases also for the definition of the xsi:schemaLocation for ARXML files containing
models for the adaptive platform.
xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_2017-03.xsd"
Over time, this approach would have created a hard-to-disentangle history of three-
element and two-element values for xsi:schemaLocation and it would have been
hard to guess which releases of the AUTOSAR XML Schema were actually backwards-
compatible to a given ARXML file.
In order to mitigate the problem, AUTOSAR also decided to invent a completely new
versioning scheme for the schema releases, independent of whether the individual
schema release would be triggered by the AUTOSAR classic platform or the AUTOSAR
adaptive platform.
The new versioning scheme for being used in the xsi:schemaLocation foresees the
existence of just one element, a positive number that is increased with every AUTOSAR
release, whether the release focuses on the classic or adaptive platform does not mat-
ter.
xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_00044.xsd"
Figure 2.1: Releases of AUTOSAR standards that are contained in the AUTOSAR XML
Schema
Example 2.4
Example 2.5
Example 2.6
<AUTOSAR ...
xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-3-0.xsd>
</AUTOSAR>
[TPS_ASR_00013] Pattern for AUTOSAR XML Schema location hint URI d The
AUTOSAR XML Schema location hint URI in the AUTOSAR XML description
shall be the file name of a XML Schema document provided by AUTOSAR. This file
name follows the pattern:
AUTOSAR_{number}.xsd
{number} corresponds to the specific AUTOSAR release the given AUTOSAR XML
Schema belongs to.
In particular no path shall be part of the AUTOSAR XML Schema location hint
URI. c(RS_IOAT_00001)
The formating and indention that is specified in this section does not change the se-
mantics of the AUTOSAR model. The main purpose is the reduction of meaningless
differences when comparing two AUTOSAR XML descriptions using textual diff tools.
[TPS_ASR_00019] Formating of AUTOSAR XML Descriptions d The XML descrip-
tion should be formatted as shown in Table 2.1 c(RS_IOAT_00001)
Applied to Strategy description
default approach NewLine: Element is a NewLine means in particular:
block of its own
• indentation should be 2 characters per level
• the start tag of the element should be on a new line
• the XML attributes should be sorted alphabetically. If more than
one XML attribute, each one should be on its own line
• the start should be indented according to the nesting level of
XML tag
• the end tag should be on a new line and indented like the start
tag
• the content should be indented one step more than the start tag
Primitives (either OneLine Element is The element should start on a new line. The end tag should be in the
modeled as displayed in one line same line as the start tag and the content of the element.
UML-attribute or as
aggregation of a
primitive
Properties of InLine: Element is Surrounding whitespace of the element should not be changed. No new
atpMixedString floating within text line should be inserted before or after the tags. Whitespace within the
element should not be changed. In the following example the element
<E> is formatted according to the InLine approach.
<L-1 L="EN">This
is <E>bold </E> style </L-1>
-->
</DESC>
<DISPLAY-NAME>%/s</DISPLAY-NAME> <!-- OneLine -->
</UNIT>
Example 2.7
The AUTOSAR meta model explicitly defines if the order of elements that are owned
by an attribute is relevant. The order of an attribute is relevant if
3 Glossary
Artifact This is a Work Product Definition that provides a description and definition for
tangible work product types. Artifacts may be composed of other artifacts ([14]).
At a high level, an artifact is represented as a single conceptual file.
AUTOSAR Tool This is a software tool which supports one or more tasks defined as
AUTOSAR tasks in the methodology. Depending on the supported tasks, an
AUTOSAR tool can act as an authoring tool, a converter tool, a processor tool or
as a combination of those (see separate definitions).
AUTOSAR Authoring Tool An AUTOSAR Tool used to create and modify AUTOSAR
XML Descriptions. Example: System Description Editor.
AUTOSAR Converter Tool An AUTOSAR Tool used to create AUTOSAR XML files by
converting information from other AUTOSAR XML files. Example: ECU Flattener
AUTOSAR Definition This is the definition of parameters which can have values. One
could say that the parameter values are Instances of the definitions. But in the
meta model hierarchy of AUTOSAR, definitions are also instances of the meta
model and therefore considered as a description. Examples for AUTOSAR def-
initions are: EcucParameterDef, PostBuildVariantCriterion, SwSys-
temconst.
AUTOSAR XML Description In AUTOSAR this means "filled Template". In fact an
AUTOSAR XML description is the XML representation of an AUTOSAR model.
The AUTOSAR XML description can consist of several files. Each individual file
represents an AUTOSAR partial model and shall validate successfully against the
AUTOSAR XML schema.
AUTOSAR Meta-Model This is an UML2.0 model that defines the language for de-
scribing AUTOSAR systems. The AUTOSAR meta-model is an UML represen-
tation of the AUTOSAR templates. UML2.0 class diagrams are used to describe
the attributes and their interrelationships. Stereotypes, UML tags and OCL ex-
pressions (object constraint language) are used for defining specific semantics
and constraints.
AUTOSAR Meta-Model Tool The AUTOSAR Meta-Model Tool is the tool that gener-
ates different views (class tables, list of constraints, diagrams, XML Schema etc.)
on the AUTOSAR meta-model.
AUTOSAR Model This is a representation of an AUTOSAR product. The AUTOSAR
model represents aspects suitable to the intended use according to the
AUTOSAR methodology.
Strictly speaking, this is an instance of the AUTOSAR meta-model. The infor-
mation contained in the AUTOSAR model can be anything that is representable
according to the AUTOSAR meta-model.
Profile Authoring Support Data Data that is used for efficient authoring of a profile.
E.g. list of referable constraints, meta-classes, meta-attributes or other reusable
model assets (blueprints)
Profile Authoring Tool A specialized AUTOSAR Tool which focuses on the authoring
of profiles for data exchange points. It e.g. provides support for the creation of
profiles from scratch, modification of existing profiles or composition of existing
profiles.
Profile Compatibility Checker Tool A specialized AUTOSAR Tool which focuses on
checking the compatibility of profiles for data exchange. Note that this compat-
ibility check includes manual compatibility checks by engineers and automated
assistance using more formal algorithms.
Profile Consistency Checker Tool A specialized AUTOSAR Tool which focuses on
checking the consistency of profiles.
Property A property is a structural feature of an object. As an example a “connector”
has the properties “receive port” and “send port”
Properties are made variant by the atpVariation.
Prototype This is the implementation of a role of a type within the definition of another
type. In other words a type may contain Prototypes that in turn are typed by
"Types". Each one of these prototypes becomes an instance when this type is
instantiated.
Type A type provides features that can appear in various roles of this type.
Value This is a particular value assigned to a “Definition”.
Variability Variability of a system is its quality to describe a set of variants. These
variants are characterized by variant specific property settings and / or selections.
As an example, such a system property selection manifests itself in a particular
“receive port” for a connection.
This is implemented using the atpVariation.
Variant A system variant is a concrete realization of a system, so that all its proper-
ties have been set respectively selected. The software system has no variability
anymore with respect to the binding time.
This is implemented using EvaluatedVariantSet.
Variation Binding A variant is the result of a variation binding process that resolves
the variability of the system by assigning particular values/selections to all the
system’s properties.
This is implemented by VariationPoint.
Variation Binding Time The variation binding time determines the step in the method-
ology at which the variability given by a set of variable properties is resolved.
A Change History
none
none
Primitive VerbatimString
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::Primitive
Types
Note This primitive represents a string in which white-space needs to be preserved.
Tags: atp.Status=shallBecomeMandatory
xml.attribute=true; xml.attributeRef=true;
xml.name=space; xml.nsPrefix=xml