AUTOSAR TPS SoftwareComponentTemplate
AUTOSAR TPS SoftwareComponentTemplate
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 27
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3 Organization of the Meta-Model . . . . . . . . . . . . . . . . . . . . . . 28
1.4 Structure of the Template . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.4.1 Description of Software Components on VFB Level . . . . . 30
1.4.2 Description of Software Components on RTE Level . . . . . 30
1.4.3 Descriptions of Software Components on Implementation Level 31
1.5 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.6 Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.7 Requirements Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2 Conceptual Aspects 44
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.2 Measurement and Calibration . . . . . . . . . . . . . . . . . . . . . . . 44
2.2.1 Basic Approach of Measurement and Calibration . . . . . . . 44
2.2.2 Calibration Parameters Overview . . . . . . . . . . . . . . . . 44
2.2.3 Using Calibration Parameters . . . . . . . . . . . . . . . . . . 45
2.2.3.1 Sharing Calibration Parameters within Compositions 45
2.2.3.2 Sharing Calibration Parameters between SwCompo-
nentPrototypes of the Same SwComponentType . . 48
2.2.3.3 Providing Instance Individual Characteristic Data . . 49
2.3 Runtime and Data Consistency Aspects . . . . . . . . . . . . . . . . . 50
2.3.1 Background: the Issues . . . . . . . . . . . . . . . . . . . . . 50
2.3.1.1 Mutual Exclusion with Semaphores . . . . . . . . . . 51
2.3.1.2 Interrupt Disabling . . . . . . . . . . . . . . . . . . . 51
2.3.1.3 Priority Ceiling . . . . . . . . . . . . . . . . . . . . . 52
2.3.1.4 Implicit Communication by Means of Variable Copies 52
2.3.2 Data Consistency at Runtime . . . . . . . . . . . . . . . . . . 53
2.3.3 Modeling Aspects of Data Consistency . . . . . . . . . . . . 53
2.4 Variant Handling in the Software Component Template . . . . . . . . . 54
2.5 Communication Specification of Composition Component Types . . . . 56
2.5.1 Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.6 PRPortPrototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.6.1 Use Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.6.2 Use Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.6.3 Use Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.6.4 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.7 Pretended Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.8 Variable-size Array Data Types . . . . . . . . . . . . . . . . . . . . . . 62
2.8.1 Overview and Use cases . . . . . . . . . . . . . . . . . . . . 62
2.8.1.1 “Old-world” dynamic-size Arrays . . . . . . . . . . . 62
2.8.1.2 “New-world” variable-size Arrays . . . . . . . . . . . 63
2.8.2 Modeling Aspects regarding Application Data Types . . . . . 66
References
[1] Standardization Template
AUTOSAR_TPS_StandardizationTemplate
[2] Specification of RTE Software
AUTOSAR_SWS_RTE
[3] Virtual Functional Bus
AUTOSAR_EXP_VFB
[4] Methodology
AUTOSAR_TR_Methodology
[5] Layered Software Architecture
AUTOSAR_EXP_LayeredSoftwareArchitecture
[6] Basic Software Module Description Template
AUTOSAR_TPS_BSWModuleDescriptionTemplate
[7] Specification of Timing Extensions
AUTOSAR_TPS_TimingExtensions
[8] Requirements on Timing Extensions
AUTOSAR_RS_TimingExtensions
[9] Specification of ECU Resource Template
AUTOSAR_TPS_ECUResourceTemplate
[10] System Template
AUTOSAR_TPS_SystemTemplate
[11] Generic Structure Template
AUTOSAR_TPS_GenericStructureTemplate
[12] Requirements on Software Component Template
AUTOSAR_RS_SoftwareComponentTemplate
[13] Supplementary material of general blueprints for AUTOSAR
AUTOSAR_TR_GeneralBlueprintsSupplement
[14] Specification of Basic Software Mode Manager
AUTOSAR_SWS_BSWModeManager
[15] Information technology – Universal Coded Character Set (UCS)
http://www.iso.org
[16] Specification of Manifest
AUTOSAR_TPS_ManifestSpecification
[17] Specification of I/O Hardware Abstraction
AUTOSAR_SWS_IOHardwareAbstraction
[18] ISO 17356-4: Road vehicles – Open interface for embedded automotive applica-
tions – Part 4: OSEK/VDX Communication (COM)
[19] Specification of SW-C End-to-End Communication Protection Library
AUTOSAR_SWS_E2ELibrary
[20] Specification of Communication Manager
AUTOSAR_SWS_COMManager
[21] Specification of Communication
AUTOSAR_SWS_COM
[22] Specification of Platform Types
AUTOSAR_SWS_PlatformTypes
[23] ISO/IEC 9899:1990
http://www.iso.org
[24] ASAM MCD 2MC ASAP2 Interface Specification
http://www.asam.net
ASAP2-V1.51.pdf
[25] ASAM MCD 2 Harmonized Data Objects Version 1.1
harmonized-data-objects-V1.1.pdf
[26] Collection of blueprints for AUTOSAR M1 models
AUTOSAR_MOD_GeneralBlueprints
[27] ISO 26262 (Part 1-10) – Road vehicles – Functional Safety, First edition
http://www.iso.org
[28] ASAM AE Calibration Data Format V2.0.0
http://www.asam.net
ASAM-AE-CDF-V2_0_0-Users-Guide.pdf
[29] Specification of Operating System
AUTOSAR_SWS_OS
[30] ISO 17356-3: Road vehicles – Open interface for embedded automotive applica-
tions – Part 3: OSEK/VDX Operating System (OS)
[31] Specification of ECU Configuration Parameters (XML)
AUTOSAR_MOD_ECUConfigurationParameters
[32] Glossary
AUTOSAR_TR_Glossary
[33] Specification of NVRAM Manager
AUTOSAR_SWS_NVRAMManager
[34] ASAM AE Functional Specification Exchange Format V1.0.0
http://www.asam.net
AE-FSX_V1.0.0.pdf
1 Introduction
1.1 Overview
This document contains the specification of the AUTOSAR Software-Component
Template. Actually, it has been created as a supplement to the formal definition of
the Software-Component Template by means of the AUTOSAR meta-model. In
other words, this document in addition to the formal specification provides introductory
description and rationale for the part of the AUTOSAR meta-model relevant for the
definition of software-components.
In this context, the term software-component refers to a formally described piece of
software existing that needs the AUTOSAR RTE [2] for execution.
Please note that the general ideas behind the semantics of application software-
components have been described in the specification of the Virtual Functional
Bus [3]. The latter, however, represents conceptual work that strongly influences but
does not totally govern the formal definition of software-components.
Note further that this document does not provide any “best practice” recommendations
of software-component modeling nor does it require or enforce a certain methodol-
ogy. Note however, that the methodology aspect is covered by the specification of the
AUTOSAR methodology [4].
Although it is beyond any doubt reasonable to use a suitable AUTOSAR Authoring Tool
for dealing with AUTOSAR software-components, this specification does not make any
assumptions nor does it give recommendations regarding the tooling.
1.2 Scope
As already mentioned in chapter 1.1, the Scope of this document is the description of
AUTOSAR software-components. This work covers the following three aspects:
• A general description of SwComponentTypes using PortPrototypes and
PortInterfaces, i.e. this document defines the SwComponentType as an en-
tity which can be described through PortPrototypes which provide or require
PortInterfaces.
• A description of CompositionSwComponentTypes which are sub-systems
consisting out of connected instances of software-components, i.e. software-
components may be defined in the form of hierarchical subsystems which in turn
consist of software-components again. The description of such hierarchical struc-
tures is in scope of this document.
• A description of AtomicSwComponentType which is implemented as a piece of
software that can be mapped to an AUTOSAR ECU.
An AtomicSwComponentType therefore shows up in the ECU Software Archi-
tecture depicted in Figure 1.1. In this figure, the green (vertically striped) and
blue (diagonally striped) borders show the aspects that are described by the
Software-Component Template.
Aspects of AUTOSAR Basic Software not relevant for the RTE are out of scope; these
are covered by the Basic Software Module Description Template [6].
Also, the document does not cover aspects of timing analysis with respect to the ex-
ecution of AUTOSAR software-components. This issue is explained in the Speci-
fication of Timing Extensions [7] as well as the corresponding requirements
specification [8].
SWComponentTemplate EcuResourceTemplate
AdaptivePlatform
SystemTemplate
DiagnosticExtract
ECUCDescriptionTemplate
ECUCParameterDefTemplate
BswModuleTemplate
For clarification, please note that the package GenericStructure contains some
fundamental infrastructure meta-classes and common patterns that are described
in [11]. As these are used by all other template specification the dependency asso-
ciations are not depicted in the diagram for the sake of clarity.
«atpVariation,atpSplitable»
+internalBehavior 0..1
SwcInternalBehavior
+behavior 1
SwcImplementation
The highest (most abstract) description level is the Virtual Functional Bus [3].
In this document SwComponentTypes are described with the means of DataTypes,
PortInterfaces, PortPrototypes, and connections between them. At this level,
the fundamental communication properties of components and their communication
relationships among each other are expressed.
In the diagram depicted in Figure 1.3, this aspect is expressed by means of the de-
scription of AtomicSwComponentType1 .
The lowest level of description specifies the implementation (i.e. in terms of the
AUTOSAR meta-model: the SwcImplementation) of a given SwcInternalBe-
havior description. More precisely, the RunnableEntitys of such a behavior are
mapped to code (source code or object code).
There may be different SwcImplementations that reference a specific SwcInter-
nalBehavior description, e.g. in different programming languages, or with differently
optimized code.
Please note that Implementation has been described in previous versions of this
document. In response to the evolution of the AUTOSAR concept the description of the
Implementation aspect has been moved to the “CommonStructure” (see Figure 1.2)
because it is also used for creating the Basic Software Module Description
Template [6].
However, the SwcImplementation still remains in the scope of this document as it
exclusively covers aspects of software-components rather than basic software mod-
ules.
1.5 Abbreviations
The following table contains a list of abbreviations used in the scope of this document
along with the spelled-out meaning of each of the abbreviations.
Abbreviation Meaning
API Application Programming Interface
BOM Byte Order Mark
CAN Controller Area Network
CSE Codes for Scaling Units
DCM Diagnostics Communication Manager
5
4
Abbreviation Meaning
DCY Driving Cycle
DEM Diagnostics Event Manager
DID Diagnostic Identifier
DTC Diagnostic Trouble Code
DoIp Diagnostics over IP
ECU Electrical Control Unit
EPROM Erasable Programmable Read-Only Memory
EEPROM Electrically Erasable Programmable Read-Only Memory
FID Function Identifier
GID Group Identifier
ID Identifier
IO Input/Output
IP Internet Protocol
IUMPR In-Use Monitor Performance Ratio
ISO International Standardization Organization
MAC Message Authentication Code
MCAL Micro-Controller Abstraction
LIN Local Interconnect Network
MCD Measurement, Calibration, Diagnostics
NM Network Management
NV Non-Volatile
OBD On-Board Diagnostic
OEM Original Equipment Manufacturer
OS Operating System
PDU Protocol Data Unit
PID Parameter Identifier
PTO Power Take Off
RA Routing Activation
RAM Random Access Memory
ROM Read-Only Memory
RPT Rapid Prototyping
RTE Runtime Environment
SWC Software Component
TID Test Identifier
UDS Unified Diagnostic Services
UML Unified Modeling Language
VFB Virtual Functional Bus
WWH-OBD World-Wide Harmonized On-Board Diagnostics
XML Extensible Markup Language
XSD XML Schema Definition
Package: The UML package the class is defined in. This is only listed to help locating
the class in the overall meta model.
Note: The comment the modeler gave for the class (class note). Stereotypes and UML
tags of the class are also denoted here.
Base Classes: If applicable, the list of direct base classes.
The headers in the table have the following meaning:
Attribute: The name of an attribute of the class. Note that AUTOSAR does not distin-
guish between class attributes and owned association ends.
Type: The type of an attribute of the class.
Mul.: The assigned multiplicity of the attribute, i.e. how many instances of the given
data type are associated with the attribute.
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 ([1]).
The representation of requirements in AUTOSAR documents follows the table specified
in [TPS_STDT_00078], see Standardization Template, chapter Support for Traceability
([1]).
[TPS_SWCT_01634] [TPS_SWCT_01639]
[TPS_SWCT_01640] [TPS_SWCT_01654]
[TPS_SWCT_01655] [TPS_SWCT_01656]
[TPS_SWCT_01657] [TPS_SWCT_01690]
[TPS_SWCT_01691] [TPS_SWCT_01697]
[TPS_SWCT_01698] [TPS_SWCT_01706]
[TPS_SWCT_01707] [TPS_SWCT_01708]
[TPS_SWCT_01709] [TPS_SWCT_01711]
[TPS_SWCT_01712] [TPS_SWCT_01715]
[TPS_SWCT_01739] [TPS_SWCT_01765]
[TPS_SWCT_01766] [TPS_SWCT_01767]
[TPS_SWCT_01789] [TPS_SWCT_01790]
[TPS_SWCT_01791] [TPS_SWCT_02002]
[TPS_SWCT_02003] [TPS_SWCT_02004]
[TPS_SWCT_02005] [TPS_SWCT_02007]
[TPS_SWCT_02008] [TPS_SWCT_02009]
[TPS_SWCT_02010] [TPS_SWCT_02011]
[TPS_SWCT_02012] [TPS_SWCT_02013]
[TPS_SWCT_02014] [TPS_SWCT_02015]
[TPS_SWCT_02016] [TPS_SWCT_02505]
[RS_SWCT_00190] AUTOSAR shall support [TPS_SWCT_01032] [TPS_SWCT_01033]
hierarchical design methods [TPS_SWCT_01034] [TPS_SWCT_01035]
[TPS_SWCT_01036] [TPS_SWCT_01037]
[TPS_SWCT_01697] [TPS_SWCT_01698]
[RS_SWCT_00200] Definitions of relations [TPS_SWCT_01002] [TPS_SWCT_01322]
between SW components are [TPS_SWCT_01323] [TPS_SWCT_01325]
exhaustive and formal [TPS_SWCT_01326] [TPS_SWCT_01328]
[TPS_SWCT_01329] [TPS_SWCT_01330]
[TPS_SWCT_01331] [TPS_SWCT_01333]
[TPS_SWCT_01334] [TPS_SWCT_01335]
[TPS_SWCT_01336] [TPS_SWCT_01337]
[TPS_SWCT_01338] [TPS_SWCT_01339]
[TPS_SWCT_01340] [TPS_SWCT_01341]
[TPS_SWCT_01342] [TPS_SWCT_01343]
[TPS_SWCT_01344] [TPS_SWCT_01345]
[TPS_SWCT_01346] [TPS_SWCT_01347]
[TPS_SWCT_01348] [TPS_SWCT_01349]
[TPS_SWCT_01350] [TPS_SWCT_01351]
[TPS_SWCT_01352] [TPS_SWCT_01353]
[TPS_SWCT_01557] [TPS_SWCT_01558]
[TPS_SWCT_01567] [TPS_SWCT_01663]
[RS_SWCT_00210] SW components are [TPS_SWCT_01002]
protected from illegal access
[RS_SWCT_00220] Management of vehicle [TPS_SWCT_01038] [TPS_SWCT_01039]
diversity is supported by [TPS_SWCT_01040] [TPS_SWCT_01041]
AUTOSAR [TPS_SWCT_01042] [TPS_SWCT_01447]
[RS_SWCT_00230] The Software Component [TPS_SWCT_01635]
Template shall provide the
ability to define naming
conventions for public
symbols
[RS_SWCT_02000] AUTOSAR shall support a [TPS_SWCT_01032] [TPS_SWCT_01033]
top-down hierarchical design [TPS_SWCT_01034] [TPS_SWCT_01035]
[TPS_SWCT_01036] [TPS_SWCT_01037]
[TPS_SWCT_02016] [TPS_SWCT_02505]
[RS_SWCT_03200] The SW-Component template [TPS_SWCT_01008] [TPS_SWCT_01009]
shall support vehicle and [TPS_SWCT_01010] [TPS_SWCT_01011]
application mode [TPS_SWCT_01016] [TPS_SWCT_01017]
management [TPS_SWCT_01018] [TPS_SWCT_01019]
[TPS_SWCT_01020] [TPS_SWCT_01021]
[TPS_SWCT_01063] [TPS_SWCT_01064]
[TPS_SWCT_01065] [TPS_SWCT_01066]
[TPS_SWCT_01067] [TPS_SWCT_01071]
[TPS_SWCT_01126] [TPS_SWCT_01450]
[TPS_SWCT_01451] [TPS_SWCT_01552]
[TPS_SWCT_01553] [TPS_SWCT_01554]
[TPS_SWCT_01572] [TPS_SWCT_01581]
[TPS_SWCT_01664]
[RS_SWCT_03201] The SW-Component template [TPS_SWCT_01063] [TPS_SWCT_01064]
shall support Portgroups [TPS_SWCT_01065] [TPS_SWCT_01066]
[TPS_SWCT_01096] [TPS_SWCT_01126]
[TPS_SWCT_01169] [TPS_SWCT_01173]
[TPS_SWCT_01174]
[RS_SWCT_03202] The SW-Component template [TPS_SWCT_01086] [TPS_SWCT_01201]
shall support enabling SWCs [TPS_SWCT_01353] [TPS_SWCT_01554]
to request dedicated modes [TPS_SWCT_01572]
[RS_SWCT_03203] The SW-Component template [TPS_SWCT_01086] [TPS_SWCT_01087]
shall support propagation of [TPS_SWCT_01200] [TPS_SWCT_01201]
mode information [TPS_SWCT_01202] [TPS_SWCT_01552]
[TPS_SWCT_01553] [TPS_SWCT_01566]
[TPS_SWCT_01664]
[RS_SWCT_03210] The SW-Component template [TPS_SWCT_01023] [TPS_SWCT_01024]
shall support integrity and [TPS_SWCT_01099] [TPS_SWCT_01100]
scaling at ports [TPS_SWCT_01101] [TPS_SWCT_01102]
[TPS_SWCT_01103] [TPS_SWCT_01104]
[TPS_SWCT_01105] [TPS_SWCT_01158]
[TPS_SWCT_01159] [TPS_SWCT_01160]
[TPS_SWCT_01161] [TPS_SWCT_01162]
[TPS_SWCT_01163] [TPS_SWCT_01164]
[TPS_SWCT_01165] [TPS_SWCT_01166]
[TPS_SWCT_01167] [TPS_SWCT_01168]
[TPS_SWCT_01449] [TPS_SWCT_01543]
[TPS_SWCT_01549] [TPS_SWCT_01550]
[TPS_SWCT_01551] [TPS_SWCT_01560]
[TPS_SWCT_01561] [TPS_SWCT_01583]
[TPS_SWCT_01768]
[RS_SWCT_03215] The SW-Component template [TPS_SWCT_01072] [TPS_SWCT_01073]
shall define the need to add [TPS_SWCT_01074] [TPS_SWCT_01189]
application data type on top of [TPS_SWCT_01229] [TPS_SWCT_01231]
implementation data type [TPS_SWCT_01235] [TPS_SWCT_01236]
2 Conceptual Aspects
2.1 Introduction
For the sake of a compact description of relevant meta-model elements the discussion
and explanation of conceptual aspects has been concentrated in this chapter.
Reading this chapter is not a pre-requisite for understanding the subsequent chapters.
It just provides a central place for the detailed description of conceptual aspects used
in various other chapters of this document.
The actual explanation of the concept of a software-component starts in chapter 3.
While performing the calibration process using a MCD tool (Measurement, Calibration,
and Diagnostic) the calibration engineer needs to have a specific insight to the data
within the CPU at runtime.
This insight is provided by access to ECU internal variables (also called measure-
ments) as well as calibration parameters (sometimes also called characteristic value).
For more details, please refer to [TPS_SWCT_01418]
The description of measurement variables and calibration parameters is basically the
same. In AUTOSAR both appear finally as DataPrototypes.
Class ParameterSwComponentType
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note The ParameterSwComponentType defines parameters and characteristic values accessible via provided
Ports. The provided values are the same for all connected SwComponentPrototypes
Tags: atp.recommendedPackage=SwComponentTypes
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
Identifiable, MultilanguageReferrable, PackageableElement, Referrable, SwComponentType
Attribute Type Mul. Kind Note
constant ConstantSpecification * ref Reference to the ConstanSpecificationMapping to be
Mapping MappingSet applied for the particular ParameterSwComponentType
Stereotypes: atpSplitable
Tags: atp.Splitkey=constantMapping
dataType DataTypeMappingSet * ref Reference to the DataTypeMapping to be applied for the
Mapping particular ParameterSwComponentType
Stereotypes: atpSplitable
Tags: atp.Splitkey=dataTypeMapping
instantiation InstantiationDataDef * aggr The purpose of this is that within the context of a given
DataDefProps Props SwComponentType some data def properties of individual
instantiations can be modified.
The aggregation of InstantiationDataDefProps is subject
to variability with the purpose to support the conditional
existence of PortPrototypes
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
The compatibility rules for ParameterInterfaces are described in chapter 6.4; the
compatibility rules for ParameterDataPrototypes are described in chapter 6.4.4.
[TPS_SWCT_01422] Delegation of PortPrototypes typed by a Parameter-
Interface d Access to shared calibration parameters can be provided and re-
quired even over CompositionSwComponentTypes using DelegationSwConnec-
tors and AssemblySwConnectors.
This means that each access to calibration parameters between SwComponentPro-
totypes is explicitly visible. If a SwConnector spans after the mapping of SwCom-
ponentPrototypes over two different ECUs the system generation process has to
ensure the proper allocation of the ParameterDataPrototype while the calibration
system has to cope with setting the parameter synchronously on the affected ECUs. c
()
AtpBlueprintable
AtpPrototype
PortPrototype
AbstractProvidedPortPrototype AbstractRequiredPortPrototype
PPortPrototype RPortPrototype
«isOfType»
«isOfType»
1 1
{redefines {redefines
+providedInterface atpType} +requiredInterface atpType}
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
AtpPrototype
DataInterface
DataPrototype
ParameterInterface AutosarDataPrototype
ParameterDataPrototype «atpVariation»
SwDataDefProps
AutosarDataPrototype
AtpStructureElement
ParameterDataPrototype
InternalBehavior +constantMemory
«atpVariation,atpSplitable» 0..*
SwcInternalBehavior +perInstanceParameter
«atpVariation,atpSplitable» *
AtpPrototype
DataPrototype
«atpVariation,atpSplitable» «instanceRef»
AutosarParameterRef
+accessedParameter 1
+runnable 0..*
AtpStructureElement
ExecutableEntity
AbstractAccessPoint
RunnableEntity
+parameterAccess AtpStructureElement
+ canBeInvokedConcurrently: Boolean Identifiable
+ symbol: CIdentifier «atpVariation,atpSplitable» 0..* ParameterAccess
This section gives some background information and lists possible strategies concern-
ing the implementation of the RunnableEntitys and the RTE with respect to efficient
communication between the RunnableEntitys.
The communication among RunnableEntitys can very efficiently be implemented
by means of “sharing memory”1 .
1
Please note that the term “sharing memory” can be interpreted on different levels. It is e.g. in the C
language possible to use variables with external linkage (a.k.a. “global variables”, although this term is
not officially defined by the C language) for the purpose of inter-Runnable communication.
Priority ceiling allows for a non-blocking protection of shared resources. Provided that
the priority scheme is static, the AUTOSAR OS is capable of temporarily raising the
priority of a task that attempts to access a shared resource to the highest priority of all
tasks that would ever attempt to access the resource.
By this means is technically impossible that a task in temporary possession of a re-
source is ever preempted by a task that attempts to access the resource as well.
Another alternative is the usage of copies of concurrently accessed variables with state
message semantics. Note that this approach directly corresponds to the semantics of
“implicit” sender-receiver communication (see 7.5.1.2).
This means in particular that for a concurrently used variable a copy is created on
which a RunnableEntity entity can work without any danger of data inconsistency.
This concept requires additional code to write the value of the concurrently accessed
variable to the copy before the RunnableEntity that accesses the variable is exe-
cuted. The value of the copy shall be written back to the concurrently accessed variable
after the RunnableEntity has been terminated.
This concept is sketched in Figure 2.4. Since it would be too expensive and error-prone
to manually care about the copy routines it would be a good idea to leave the creation
of the additional code to a suitable code generator.
The additional copy routines as sketched in Figure 2.4 already protect the particular
RunnableEntitys from unintended changes of concurrently accessed variables. It
would, however, be possible to further optimize the process by reducing the additional
code at the beginning and end of each task (see Figure 2.5).
In addition, copy routines will only be inserted where appropriate, e.g. a copy routine
for writing the value of a copy back to the concurrently accessed variable will only be
inserted if the RunnableEntity has write access to the concurrently used variable.
Please note that the copy routines have to temporarily make sure that the copy process
is not interrupted in order to be capable of consistently copying the values from and to
the concurrently accessed variable.
These periods, however, are supposed to be very short compared with the overall
run-time consumption of the RunnableEntity and thus would not have a significant
impact on the runtime behavior.
Further optimization criteria can be applied, for example: it would be perfectly safe
to avoid the creation of copies for RunnableEntitys that are scheduled in the task
with the highest priority of all tasks that (via contained RunnableEntitys) access a
certain concurrently accessed variable.
In order to keep the application code free of any dependencies from the code gener-
ation, access to concurrently accessed variables will be guarded by macros that are
later resolved by the code generator.
The presence of the guard macros directly supports the reuse on the level of source
code. The reuse on the level of object code is only possible if the scheduling scenario
(in terms of the assignment of RunnableEntitys to priority levels) does not change.
This concept can only be implemented properly with the aid of a code generator if the
variables in question can be identified. In other words: the description of an Atomic-
SwComponentType has to expose all concurrently accessed variables to the outside
world.
The intrinsic meaning of the terms “explicit communication” and “implicit communica-
tion” is explained in section 7.5.1.1. It would be fair to say that the distinction between
implicit and explicit communication establishes a usage pattern in the application do-
main, i.e. in the world of the developer of AUTOSAR software-components and their
implementation.
There is another facet to this subject, however, namely the question how this pattern is
implemented in the meta-model. With respect to the application of the pattern for port-
based communication the details can be found in section 7.5.1.2, more specifically in
section 7.5.1.3. The consideration of the internal communication based on so-called
“inter-runnable variables” is described in section 7.4.2.
By reading the respective text sections it becomes apparent that the two applications
of the pattern are modeled differently. The port-based communication uses the Vari-
ableAccess to formalize different roles of accessing communication elements. Some
of the roles used for this purpose imply explicit communication (e.g. dataSendPoint)
and some represent implicit communication (e.g. dataWriteAccess).
The important thing about using the VariableAccess, however, is that the modeling
of communication roles is abstracted from the actual communication elements and
represents a uniform (meaning: it can refer to the target directly or by a so-called
InstanceRef) modeling approach that is applied for all use cases2 .
Admittedly, this is handled in a different way for the internal communication. Here,
the additional layer of abstraction is not used (although it would have been techni-
cally feasible to do so) with respect to the clear separation of “inter-runnable variables
with implicit behavior” and “inter-runnable variables with explicit behavior” in the RTE.
The implementation of different communication roles (i.e. implicit vs. explicit) is done
by directly aggregating VariableDataPrototype in the roles explicitInter-
RunnableVariable and implicitInterRunnableVariable.
On the other hand, access to internal communication never requires the usage of an
InstanceRef and therefore the abstraction might be considered unnecessary over-
head that blows up the M1 model.
For the same reason that applies on the existence of PortPrototype the latest
Binding Time of these kinds of variability is preCompileTime.
In the meta-model, all locations that may exhibit variability are marked with the stereo-
type atpVariation. This allows the definition of possible variation points.
Tagged Values are used to specify additional information, for example the latest binding
time.
[TPS_SWCT_01042] Four types of locations in the meta-model which may exhibit
variability d There are four types of locations in the meta-model which may exhibit
variability:
• Aggregations
• Associations
• Attribute Values
• Classes providing property sets
c(RS_SWCT_00220, RS_SWCT_03100)
The reasons for the attachment of the stereotype atpVariation to certain model
elements and the consequences for other model elements are explained in class tables
in the following chapters. More details about the AUTOSAR Variant Handling Concept
can be found in the AUTOSAR Generic Structure Template [11].
2.5.1 Rationale
The idea is that the supplier takes over the initValues attached to the delegation
PortPrototypes and copies them to the PortPrototypes owned by SwCompo-
nentPrototypes of the CompositionSwComponentType.
[TPS_SWCT_01568] Consideration of RPortComSpec or PPortComSpec depend-
ing on the ownership d The RTE Generator shall take the attributes of the RPortCom-
Spec or PPortComSpec of the PortPrototypes owned by AtomicSwComponent-
Types or ParameterSwComponentType and ignore the attributes of the RPortCom-
Spec or PPortComSpec attached to PortPrototypes owned by Composition-
SwComponentType. c(RS_SWCT_03220)
Therefore, the initValues of the delegation PortPrototype would be taken as
mere templates for the detailing of PortPrototypes connected to the delegation
PortPrototypes.
It is not required that the initValues of delegated PortPrototype and a Port-
Prototype connected by means of a DelegationSwConnector match.
Although this would certainly make sense in many cases it is eventually still left to the
supplier to decide on the specific initValues applicable inside the Composition-
SwComponentType.
On the other hand, a requirement that the initValues defined on the surface of Com-
positionSwComponentType and the inside of the CompositionSwComponent-
Type shall be consistent in any case might effectively prevent the reuse of existing
AtomicSwComponentTypes.
Please note that the ability to define a ComSpec in the context of a Composition-
SwComponentType implies that it shall be possible to define mappings of Applica-
tionDataTypes used in a PortInterface to their corresponding Implementa-
tionDataTypes.
For this purpose the CompositionSwComponentType owns a DataTypeMap-
pingSet in the role dataTypeMapping and a ConstantSpecificationMap-
pingSet in the role constantValueMapping.
SwComponentType
CompositionSwComponentType
«atpSplitable» «atpSplitable»
ARElement ARElement
AtpBlueprint ConstantSpecificationMappingSet
AtpBlueprintable
DataTypeMappingSet
2.6 PRPortPrototype
In some cases SwComponentTypes need to read and write the same piece of data.
One of the most prominent examples for this use case is the NvBlockSwComponent-
Type that factually ready and writes blocks of NvRAM.
Without the ability to combine read and write semantics in a kind of PortPrototype
that supports both read and write semantics work-arounds have to be implemented
that come with a certain footprint on memory and processing time.
Without the ability to define a combined read and write semantics the definition of an
RPortPrototype and a PPortPrototype is required for reading and writing the
applicable data.
Technically, this read and write access is related to the same data item in an NVRAM
Block. This requires a consistent connection of the PortPrototypes between
an NvBlockSwComponentType and ApplicationSwComponentType as well as a
consistent mapping of the corresponding RPortPrototype and a PPortPrototype
of the NvBlockSwComponentType and the related element of the ramBlock.
It may happen that a SwComponentType need to consume the same data that it pro-
duces. If the only way to achieve this was the connection of a PPortPrototype to an
RPortPrototype of the same SwComponentType then the creator of the SwCom-
ponentType cannot enforce this connection as it is created on a higher level of ab-
straction in the context of a CompositionSwComponentType.
In other words, it is impossible to fully specify the semantics of the otherwise self-
contained SwComponentType.
This means that only in the in best case one buffer for the data is needed. But depend-
ing on the mapping RunnableEntitys to OS tasks additional buffers may need to be
allocated by the RTE to fully implement the implicit communication pattern.
As an alternative, the ApplicationSwComponentType could utilize inter-runnable
variables but unfortunately this inhibits any optimization in the RTE and will consume
additional RAM. In contrast to the previous approach at least two buffers are needed.
For example, this scenario may apply for video signal processing in camera applica-
tions. Typically, such applications will not be distributed over several ECUs.
It is clear that in this case the allocation of several buffers in the RTE is required to im-
plement the individual connections between the ApplicationSwComponentTypes.
In most cases, the processing has to be executed at a certain point in time in a dedi-
cated order.
2.6.4 Solution
The solution to the above-mentioned use cases is the ability to define a PortProto-
type that can read and write the same piece of data. This solves both the described
problem of resource consumption as well as the problem of having to define multiple
PortPrototypes as outlets for same piece of data item.
The technical details of the definition of PRPortPrototype are explained in chap-
ters 3.2.2 and 4.2.1.
AUTOSAR supports the definition of array data types where the size of the actual
payload varies at run-time. As far as the configuration is concerned, it is possible to
specify a maximum number of array elements that shall not be exceeded at run-time.
In order to properly understand the approach, it is necessary to understand that the
support for Variable-Size Array Data Types has been introduced in two waves
that each had a different motivation.
In the first wave, the support for Variable-Size Array Data Types was limited
to data types that basically boil down to an array where the base type is an unsigned
integer data type with a length of exactly one byte.
The main use cases for this scenario are derived from diagnostics requirements as
well as support for the J1939 communication protocol.
In both cases the actual length of a Variable-Size Array Data Type could be
determined from the context, i.e. either by the diagnostic basic-software module or by
the implementation of the J1939 TP.
For the lack of a better terminology, this specification distinguishes between “old-world”
dynamic-size arrays and “new-world” Variable-Size Array Data Types. It will
be necessary to clearly define the characteristics that allow for an disambiguation be-
tween the “old-world” dynamic-size arrays and “new-world” Variable-Size Array
Data Types.
[TPS_SWCT_01641] Definition of an “old-world” dynamic-size array data type by
means of an ApplicationArrayDataType d An ApplicationArrayDataType
that doesn’t define attribute dynamicArraySizeProfile and that aggregates an
ApplicationArrayElement where attribute arraySizeSemantics exists and is
set to the value variableSize shall be considered an “old-world” dynamic-size array
data type. c(RS_SWCT_03181)
Please note that [TPS_SWCT_01641] can’t go any deeper into the specifics of the
given data type because it is intentionally focused on ApplicationDataTypes.
There are use cases where the distinction between “old-world” dynamic-size arrays and
“new-world” Variable-Size Array Data Types must be done in the absence of
a corresponding ImplementationDataType.
In general, the disambiguation becomes multi-faceted (but not necessarily easier)
if the definition of a corresponding ImplementationDataType is available (see
[TPS_SWCT_01642]).
In contrast to this, the second wave of support for Variable-Size Array Data
Types was motivated by the application software layer itself.
Here, the situation is entirely different because the actual size cannot be determined
by any context software module. The application itself is responsible for maintaining
the proper length of a Variable-Size Array Data Type at run-time.
As a consequence, the specification of the actual array size at run-time needs to be re-
flected by the structure of the data types used for hosting the Variable-Size Array
Data Type.
[TPS_SWCT_01644] Definition of a “new-world” variable-size array data type by
means of an ApplicationArrayDataType d An ApplicationArrayDataType
that fulfills all of the following conditions shall be considered an “new-world” dynamic-
size array data type.
• The ApplicationArrayDataType defines attribute ApplicationArray-
DataType.dynamicArraySizeProfile.
• ApplicationArrayDataType aggregates an ApplicationArrayElement
that defines attribute ApplicationArrayElement.arraySizeHandling.
c(RS_SWCT_03181)
[TPS_SWCT_01645] Definition of a “new-world” variable-size array data type by
means of an ImplementationDataType d An ImplementationDataType that
fulfills all of the following conditions shall be considered an “new-world” dynamic-size
array data type.
• The ImplementationDataType defines attribute Implementation-
DataType.dynamicArraySizeProfile.
• ImplementationDataType aggregates an ImplementationDataType-
Element that defines attribute ImplementationDataTypeElement.array-
SizeHandling.
c(RS_SWCT_03181)
In contrast to the first use case described above, the application-motivated Variable-
Size Array Data Type cannot be limited in terms of the base type of the array data
type, i.e. limiting the underlying data type to an unsigned integer data type with a length
of exactly one byte is not an option.
On top of that, several possible structures of Variable-Size Array Data Types
have been required. This aspect is depicted in Figure 2.10.
[TPS_SWCT_01636] Definition of profiles for the definition of Variable-Size
Array Data Types d The possible variants for Variable-Size Array Data
Types are:
Linear The data type of the elements of the Variable-Size Array Data Type
itself does not consist of a Variable-Size Array Data Type.
This case corresponds to the possible value VSA_LINEAR of attribute dynami-
cArraySizeProfile.
Square The data type of the elements of the Variable-Size Array Data Type
itself consists of Variable-Size Array Data Types where the maximum
number of elements in all “second order” arrays is identical to the maximum
number of elements in the “first order” array.
This case corresponds to the possible value VSA_SQUARE of attribute dynami-
cArraySizeProfile.
Rectangular The data type of the elements of the Variable-Size Array Data
Type itself consists of Variable-Size Array Data Types data types where
the maximum number of elements in “second order” arrays is identical but this
value is typically not identical3 to the maximum number of elements in the “first
order” array.
This case corresponds to the possible value VSA_RECTANGULAR of attribute dy-
namicArraySizeProfile.
Fully Flexible The data type of the elements of the Variable-Size Array Data
Type itself consists of Variable-Size Array Data Types where the maxi-
mum number of elements in “second order” arrays is not necessarily identical
with each other and (obviously) not necessarily identical to the maximum num-
ber of elements in the “first order” array.
This case corresponds to the possible value VSA_FULLY_FLEXIBLE of attribute
dynamicArraySizeProfile.
c(RS_SWCT_03181)
The described cases directly correspond to the portrayal of different kinds of variable-
size arrays in Figure 2.10:
• The value VSA_LINEAR corresponds to the tag (a).
• The value VSA_SQUARE corresponds to the tag (b).
• The value VSA_RECTANGULAR corresponds to the tag ca).
• The value VSA_FULLY_FLEXIBLE corresponds to the tag (d).
Figure 2.10: Structural variety of array data types with variable size
Please note that the leaf elements in a Variable-Size Array Data Type doesn’t
have to be primitive data types. As mentioned before, it is possible to define multiple-
dimension Variable-Size Array Data Types.
The “terminal” elements can be recognized as such in that they don’t establish further
Variable-Size Array Data Types.
3
If it was, the case boils down to the rectangular scenario tagged (b).
Please note further that the modeling of Variable-Size Array Data Types is a
complex step governed by a collection of rules and constraints.
It is the expressed intent of this specification to keep the complexity of the rule set as
low as possible while still providing the user with a powerful modeling framework.
The major consequence of this conclusion is to keep the modeling as straightforward
as possible; in other words: intentionally cut away certain modeling variants for which
acceptable workarounds within the modeling framework itself exist.
One concrete example for such a restriction is that for ImplementationDataTypes,
Variable-Size Array Data Types can only be defined on the level of an Au-
tosarDataType.
It is intentionally not supported to define a Variable-Size Array Data Type on
the level of an ImplementationDataTypeElement because the intended seman-
tics can be realized by assigning the value TYPE_REFERENCE to the Implemen-
tationDataTypeElement.category and then let it reference to another Imple-
mentationDataType that in turn implements the Variable-Size Array Data
Type.
In the context of the AUTOSAR layered data type concept, the level of Application-
DataTypes is not concerned about the structure of how the Variable-Size Array
Data Types.
In other words, aspects of the implementation of this kind of data type is intentionally
abstracted as much as possible in order to support the idea behind the definition of
ApplicationDataTypes as a concept that is independent from an implementation
to the applicable degree.
Consequently, the support for Variable-Size Array Data Types on the level of
ApplicationDataTypes requires the addition of a couple of additional attributes.
Details can be found in chapter 5.2.4.2.
If a Variable-Size Array Data Type is modeled on the level of Application-
DataType it is necessary to also provide a companion ImplementationDataType
as well as a DataTypeMap that refers to both the ApplicationDataType and the
ImplementationDataType.
The contrary is not applicable, i.e. it is possible to define a Variable-Size Array
Data Type with only an ImplementationDataType, see [TPS_SWCT_01622].
On the other hand, the data type used for the actual hosting of the Variable-
Size Array Data Type corresponds directly to the level of the Implementation-
DataType.
Here, it is possible to define how an ImplementationDataType can be used to
define a Variable-Size Array Data Type.
The definition of ImplementationDataType in the AUTOSAR meta-model comes
with a certain level of generic nature the support for Variable-Size Array Data
Types on this level comes as a mixture of dedicated attributes in the meta-model and
a set of recipes how to support different use cases of Variable-Size Array Data
Types.
This means that the definition of ImplementationDataTypes for the purpose of
creating Variable-Size Array Data Types only has a chance to take off if the
structure of these data types is replicated in different implementations of AUTOSAR
software.
Therefore, AUTOSAR defines a common way of how ImplementationDataTypes
for the purpose of creating Variable-Size Array Data Types shall be defined
such that the ImplementationDataType shall be of category STRUCTURE with
the following sub-elements:
1. A numerical value that determines the actual size. This element shall be called
the Size Indicator throughout this document.
2. An array of the base-type of the Variable-Size Array Data Type that im-
plements the payload of the Variable-Size Array Data Type. The dimen-
sion of the array shall be defined such that the intended maximum number of
elements fits in.
A Size Indicator of a Variable-Size Array Data Type holds the number of
valid elements of the array. This information is necessary for the RTE to handle the
array efficiently.
On the sender-side this indicator is actively updated by the software-component which
is the only instance that knows how many elements of the array are valid.
So the number of valid elements and the Size Indicator have to be kept consistent
by the application. When the software-component sends the data over the RTE the
RTE hands the data over to the transformer.
The transformer may evaluate the Size Indicator (depends on the transformer)
and only work on the valid array elements. The output of the transformer can vary in
length and only contain necessary data. Therefore it can be more resource saving.
On the receiver side, the last transformer in the execution order restores the data ele-
ments of the array and the value of the Size Indicator. This output is handed over
by the RTE to the software-component. The application now is aware of the number of
valid elements in the array.
The details of how ImplementationDataTypes need to be modeled for the imple-
mentation of Variable-Size Array Data Types can be found in chapter 5.2.5
and a couple of examples is available in the appendix E.1.
2.9.1 Background
The AUTOSAR classic platform supports the usage of a TLV4 data encoding on the
SOME/IP transport layer. TLV is typically used where at least a part of the transmitted
data is only optionally existing and filled with meaningful values.
In other words: an optional part of a data structure may exist and carry meaningful val-
ues in one instance of data transmission and be completely missing in another instance
of the data transmission.
The receiving software needs to be able to identify whether the optional part exists and
read its value accordingly.
The receiving software also needs to be able to still execute in a meaningful way if
the optional part of such a data structure does not exist in the specific communication
instance.
Consequently, it is necessary to be able to precisely identify the parts of a data struc-
ture that may become optional for specific instances of data transmission.
In terms of the AUTOSAR meta-model, the identification could - in principle - be at-
tached at various levels of abstraction:
AutosarDataType In this case the optionality that is only needed for communication
purposes would still be existing in all other usages of data types. This seems
unbalanced.
Admittedly, the definition of different optionality configurations for the same data
type may lead to the existence of a bunch of structurally identical data types that
only vary in terms of optionality. The existence of variation points may help to
mitigate this effect, though.
PortInterface In this case the optionality is defined where it is actually required.
However, different optionality could - in principle - be defined for DataProto-
types typed by the same AutosarDataType.
This would lead to an increased effort for the definition of C data types in the
context of the same PortInterface.
4
This abbreviation stands for tag-length-value
Additional constraints have been identified in the context of the definition of RTE
APIs of the AUTOSAR classic platform that finally render this option as not viable.
ComSpec In this case (for more information please refer to section 4.5) the definition
of optionality would even be more specific in comparison to the definition of op-
tionality on the level of PortInterfaces.
On top of that, the task to define optionality in the vast majority of cases is done by
an OEM, whereas the model definition on the level of ComSpec requires the exis-
tence of SwComponentTypes and this definition is in many cases in the domain
of a supplier.
As a result of this consideration, AUTOSAR has opted for implementation of the con-
cept of defining the optionality on the level of the AutosarDataType.
3.1 Introduction
The detailed introduction of all aspects of the Software Component Template in
one move is considered too complex. This chapter therefore provides an overview
of the main conceptual aspects of software components, ports and interfaces. The
overview will then be broken down into further details in chapter 4.
One of the goals of the AUTOSAR concept is the support of re-usability on the level of
application software. In other words: it should be possible to re-use existing artifacts to
create further model elements instead of being forced to create every single modeling
detail from scratch. One of the consequences of this approach is the application of the
so-called type-prototype pattern [11].
Among other things, this concept allows for creating hierarchical structures of software-
components with arbitrary complexity. However, the creation of hierarchical structures
itself does not have an impact on the run-time behavior of the overall system. The
actual behavior is completely defined within the individual software-components.
This conclusion is backed by the understanding that software-components are devel-
oped against the so-called Virtual Functional Bus (VFB), an abstract communication
channel without direct dependency on ECUs and communication buses. The VFB does
not provide any means for expressing a hierarchy of software-components.
Of course, the usage of the VFB has further consequences on the design of software-
components which shall not directly call the operating system or the communication
hardware. As a result, software-components can be deployed to actual ECUs at a
rather late stage in the development process.
In order to make the description more precise, the following text preferably uses accu-
rate meta-model terms instead of the rather vague terminology of “composition” and
“software-component”.
3.2.1 Overview
4
Class SwComponentType (abstract)
unitGroup UnitGroup * ref This allows for the specification of which UnitGroups are
relevant in the context of referencing SwComponentType.
3.2.2 PortPrototype
4
Class PortPrototype (abstract)
triggerPort TriggerPortAnnotation * aggr Annotations on this trigger port.
Annotation
Table 3.2: PortPrototype
AtpBlueprintable
AtpPrototype
PortPrototype
AbstractProvidedPortPrototype AbstractRequiredPortPrototype
Class RPortPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note Component port requiring a certain port interface.
Base ARObject, AbstractRequiredPortPrototype, AtpBlueprintable, AtpFeature, AtpPrototype, Identifiable,
MultilanguageReferrable, PortPrototype, Referrable
Attribute Type Mul. Kind Note
required PortInterface 1 tref The interface that this port requires, i.e. the port depends
Interface on another port providing the specified interface.
Stereotypes: isOfType
Class PPortPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note Component port providing a certain port interface.
Base ARObject, AbstractProvidedPortPrototype, AtpBlueprintable, AtpFeature, AtpPrototype, Identifiable,
MultilanguageReferrable, PortPrototype, Referrable
Attribute Type Mul. Kind Note
provided PortInterface 1 tref The interface that this port provides.
Interface
Stereotypes: isOfType
Class PRPortPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note This kind of PortPrototype can take the role of both a required and a provided PortPrototype.
Base ARObject, AbstractProvidedPortPrototype, AbstractRequiredPortPrototype, AtpBlueprintable, Atp
Feature, AtpPrototype, Identifiable, MultilanguageReferrable, PortPrototype, Referrable
Attribute Type Mul. Kind Note
provided PortInterface 1 tref This represents the PortInterface used to type the PRPort
Required Prototype
Interface
Stereotypes: isOfType
ARElement
AtpBlueprint AtpBlueprintable
AtpBlueprintable +port AtpPrototype
AtpType PortPrototype
«atpVariation,atpSplitable» 0..*
SwComponentType
AbstractRequiredPortPrototype AbstractProvidedPortPrototype
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
3.2.3 AtomicSwComponentType
allow for adding the SwcInternalBehavior in a later process step. In other words,
it is possible to completely develop the VFB view of a software-component and later
add more details like InternalBehavior. c()
Class AtomicSwComponentType (abstract)
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note An atomic software component is atomic in the sense that it cannot be further decomposed and
distributed across multiple ECUs.
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
Identifiable, MultilanguageReferrable, PackageableElement, Referrable, SwComponentType
Subclasses ApplicationSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponent
Type, NvBlockSwComponentType, SensorActuatorSwComponentType, ServiceProxySwComponent
Type, ServiceSwComponentType
Attribute Type Mul. Kind Note
internalBehavior SwcInternalBehavior 0..1 aggr The SwcInternalBehaviors owned by an AtomicSw
ComponentType can be located in a different physical file.
Therefore the aggregation is «atpSplitable».
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=internalBehavior, variationPoint.short
Label
vh.latestBindingTime=preCompileTime
symbolProps SymbolProps 0..1 aggr This represents the SymbolProps for the AtomicSw
ComponentType.
Stereotypes: atpSplitable
Tags: atp.Splitkey=shortName
ARElement AtpPrototype
AtpBlueprint SwComponentPrototype
AtpBlueprintable +type
AtpType
1 «isOfType»
SwComponentType {redefines
atpType}
+component 0..*
«atpVariation,atpSplitable»
3.2.4 ParameterSwComponentType
«atpSplitable» «atpVariation» «atpSplitable»
ARElement ARElement
InstantiationDataDefProps
AtpBlueprint ConstantSpecificationMappingSet
AtpBlueprintable
DataTypeMappingSet
+ symbol: CIdentifier
SwComponentType SymbolProps
AtomicSwComponentType +symbolProps
«atpSplitable» 0..1
3.3 Composition
3.3.1 Overview
+component 0..*
CompositionSwComponentType
«atpVariation,atpSplitable»
3.3.2 SwComponentPrototype
4
Class CompositionSwComponentType
dataType DataTypeMappingSet * ref Reference to the DataTypeMapping to be applied for the
Mapping used ApplicationDataTypes in PortInterfaces.
Background: when developing subsystems it may happen
that ApplicationDataTypes are used on the surface of
CompositionSwComponentTypes. In this case it would be
reasonable to be able to also provide the intended
mapping to the ImplementationDataTypes. However, this
mapping shall be informal and not technically binding for
the implementers mainly because the RTE generator is
not concerned about the CompositionSwComponent
Types.
Rationale: if the mapping of ApplicationDataTypes on the
delegated and inner
PortPrototype matches then the mapping to
ImplementationDataTypes is not impacting compatibility.
Stereotypes: atpSplitable
Tags: atp.Splitkey=dataTypeMapping
instantiation InstantiationRTEEvent * aggr This allows to define instantiation specific properties for
RTEEventProps Props RTE Events, in particular for instance specific scheduling.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortLabel, variationPoint.shortLabel
vh.latestBindingTime=codeGenerationTime
Class SwComponentPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::Composition
Note Role of a software component within a composition.
Base ARObject, AtpFeature, AtpPrototype, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
type SwComponentType 1 tref Type of the instance.
Stereotypes: isOfType
ARElement AtpBlueprintable
AtpBlueprint +port AtpPrototype
AtpBlueprintable PortPrototype
AtpType «atpVariation,atpSplitable» 0..*
SwComponentType
AtpStructureElement
+portGroup Identifiable
«atpVariation» 0..* PortGroup
AtpStructureElement
CompositionSwComponentType
+connector SwConnector
«atpVariation,atpSplitable» *
AtpPrototype
+component SwComponentPrototype
«atpVariation,atpSplitable» 0..*
InstantiationRTEEventProps
+instantiationRTEEventProps
+ shortLabel: Identifier
«atpVariation,atpSplitable» 0..*
3.3.3 Connectors
The ability to use one or the other meta-class arbitrarily is considered confusing. There-
fore, [TPS_SWCT_01515] has been defined to remove the unnecessary degree of
freedom.
[TPS_SWCT_01515] PPortInCompositionInstanceRef shall be used for at-
taching DelegationSwConnector to an inner PRPortPrototype d For the im-
plementation of the attachment of a DelegationSwConnector to an inner PRPort-
Prototype the meta-class PPortInCompositionInstanceRef shall be used. c
()
[constr_1100] Unconnected RPortPrototype typed by a DataInterface d For
any element in an unconnected RPortPrototype typed by a DataInterface there
shall be a requiredComSpec that defines an initValue. c()
Class SwConnector (abstract)
Package M2::AUTOSARTemplates::SWComponentTemplate::Composition
Note The base class for connectors between ports. Connectors have to be identifiable to allow references from
the system constraint template.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Subclasses AssemblySwConnector, DelegationSwConnector, PassThroughSwConnector
Attribute Type Mul. Kind Note
mapping PortInterfaceMapping 0..1 ref Reference to a PortInterfaceMapping specifying the
mapping of unequal named PortInterface elements of the
two different PortInterfaces typing the two PortPrototypes
which are referenced by the ConnectorPrototype.
Class AssemblySwConnector
Package M2::AUTOSARTemplates::SWComponentTemplate::Composition
Note AssemblySwConnectors are exclusively used to connect SwComponentPrototypes in the context of a
CompositionSwComponentType.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable, SwConnector
Attribute Type Mul. Kind Note
provider AbstractProvidedPort 0..1 iref Instance of providing port.
Prototype
requester AbstractRequiredPort 0..1 iref Instance of requiring port.
Prototype
Class DelegationSwConnector
Package M2::AUTOSARTemplates::SWComponentTemplate::Composition
Note A delegation connector delegates one inner PortPrototype (a port of a component that is used inside the
composition) to a outer PortPrototype of compatible type that belongs directly to the composition (a port
that is owned by the composition).
5
4
Class DelegationSwConnector
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable, SwConnector
Attribute Type Mul. Kind Note
innerPort PortPrototype 1 iref The port that belongs to the ComponentPrototype in the
composition
Tags: xml.typeElement=true
outerPort PortPrototype 1 ref The port that is located on the outside of the Composition
Type
One specific use case for the application of SwConnectors is exemplified by the fig-
ures 3.9 and 3.11. A specific CompositionSwComponentType exists in two variants
where one (more complex) variant foresees the existence of a SwComponentPro-
totype inside the CompositionSwComponentType (depicted by 3.9) and the other
(because it is implementing a simpler semantics) does not need the SwComponent-
Prototype.
Composition SW Component
Application SW Component
RTO Trigger
RunA1
Class PassThroughSwConnector
Package M2::AUTOSARTemplates::SWComponentTemplate::Composition
Note This kind of SwConnector can be used inside a CompositionSwComponentType to connect two
delegation PortPrototypes.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable, SwConnector
Attribute Type Mul. Kind Note
providedOuter AbstractProvidedPort 1 ref This represents the provided outer delegation Port
Port Prototype Prototype of the PassThroughSwConnector.
requiredOuter AbstractRequiredPort 1 ref This represents the required outer delegation Port
Port Prototype Prototype of the PassThroughSwConnector.
AtpStructureElement
SwConnector
«instanceRef» «instanceRef»
AtpBlueprintable
«instanceRef» AbstractProvidedPortPrototype
AtpPrototype
PortPrototype
AbstractRequiredPortPrototype
Composition SW Component
Application SW Component
PortInterfaceMapping
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
SwComponentType
AtomicSwComponentType CompositionSwComponentType
«atpVariation,atpSplitable» «atpVariation,atpSplitable»
InternalBehavior
InstantiationRTEEventProps
SwcInternalBehavior
+ shortLabel: Identifier
+ handleTerminationAndRestart: HandleTerminationAndRestartEnum
+ supportsMultipleInstantiation: Boolean
«atpVariation,atpSplitable» «atpVariation,atpSplitable»
AtpStructureElement AbstractEvent
ExecutableEntity +startOnEvent AtpStructureElement
RunnableEntity RTEEvent «instanceRef»
0..1
+ canBeInvokedConcurrently: Boolean
+ symbol: CIdentifier
+refinedEvent
+waitPoint *
Identifiable
WaitPoint +trigger
+ timeout: TimeValue 1
TimingEvent InstantiationTimingEventProps
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
DataInterface
Please find more details about the specialization of the PortInterface concept in
chapter 4.2.3 and 4.2.2.
Class PortInterface (abstract)
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Abstract base class for an interface that is either provided or required by a port of a software component.
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
Identifiable, MultilanguageReferrable, PackageableElement, Referrable
Subclasses ClientServerInterface, DataInterface, ModeSwitchInterface, TriggerInterface
Attribute Type Mul. Kind Note
isService Boolean 1 attr This flag is set if the PortInterface is to be used for
communication between an
• ApplicationSwComponentType or
• ServiceProxySwComponentType or
• SensorActuatorSwComponentType or
• ComplexDeviceDriverSwComponentType
• ServiceSwComponentType
• EcuAbstractionSwComponentType
and a ServiceSwComponentType (namely an
AUTOSAR Service) located on the same ECU.
Otherwise the flag is not set.
serviceKind ServiceProviderEnum 0..1 attr This attribute provides further details about the nature of
the applied service.
ARElement
AtpBlueprint ImplementationProps
AtpBlueprintable SymbolProps
AtpType
PortInterface
«atpVariation»
DataInterface «atpVariation»
*
+argument {ordered}
AutosarDataPrototype
ArgumentDataPrototype
However, the creation of a valid connection does not need to be based on the usage of
identical PortInterfaces. It is also possible to use different, but compatible Port-
Interfaces. The details about compatibility of PortInterfaces are described in
chapter 6.
[constr_1036] Connect kinds of PortInterfaces d It shall not be possible to con-
nect PortPrototypes typed by PortInterfaces of different kinds. Subclasses of
DataInterface make an exception from this rule and can be used for creating con-
nections to each other. c()
For clarification, a connection between a PortPrototype typed by a Sender-
ReceiverInterface and a PortPrototype typed by a ClientServerInter-
face shall not be possible. However, the creation of a connection between a Port-
Prototype typed by a SenderReceiverInterface and a PortPrototype typed
by a ParameterInterface is supported.
The information contained in serviceKind can be used in various ways. The primary
intent is to distinguish between the usage of standardized AUTOSAR services from
the usage of a vendor-specific service. This information may have an impact on the
development- and build process of software-components that use the PortInter-
face.
In addition, it is also possible to use the information contained in serviceKind for
filtering the presentation of an AUTOSAR model in an AUTOSAR authoring tool and
e.g. display the nature of the service PortPrototypes independently of the content
of the corresponding PortInterface.
[TPS_SWCT_01003] Inconsistencies regarding the value of serviceKind and
the actual implementation of the PortInterface d In case of inconsistencies
between the value of serviceKind and the actual implementation of the PortIn-
terface the implementation of the PortInterface wins over the value of attribute
PortInterface.serviceKind (which, for the intended purpose shall be considered
an annotation rather than a semantically binding information). c()
[TPS_SWCT_01004] Default value if serviceKind is not defined d if the attribute
serviceKind is not defined in the context of a specific PortInterface the default
value anyStandardized shall be assumed. c()
[constr_1174] PortInterfaces used in the context of CompositionSwCompo-
nentTypes cannot refer to AUTOSAR services d CompositionSwComponent-
Types shall not own PortPrototypes typed by PortInterfaces where the at-
tribute isService is set to true. c()
Enumeration ServiceProviderEnum
Package M2::AUTOSARTemplates::CommonStructure::ServiceNeeds
Note This represents a list of possible service providers
Literal Description
anyStandardized This value means that the specific nature is either unknown or it is not important for the given
purpose. This is also the default value for any attribute of type ServiceProviderEnum
Tags: atp.EnumerationValue=0
basicSoftwareMode The service relates to the Basic Software Mode Manager (BswM)
Manager
Tags: atp.EnumerationValue=1
comManager The service relates to the COM Manager (ComM).
Tags: atp.EnumerationValue=2
cryptoService The service relates to the Crypto Service Manager (CsM).
Manager
Tags: atp.EnumerationValue=3
defaultErrorTracer The service relates to the Default Error Tracer (DET)
Tags: atp.EnumerationValue=4
diagnostic The service relates to the Diagnostic Communication Manager (DCM).
Communication
Tags: atp.EnumerationValue=6
Manager
diagnosticEvent The service relates to the Diagnostic Event Manager (DEM).
Manager
Tags: atp.EnumerationValue=7
diagnosticLogAnd The service relates to the Diagnostic Log and Trace (DLT).
Trace
Tags: atp.EnumerationValue=8
ecuManager The service relates to the ECU Manager (EcuM).
Tags: atp.EnumerationValue=9
functionInhibition The service relates to the Function Inhibition Manager (FIM).
Manager
Tags: atp.EnumerationValue=10
j1939Request The service relates to the J1939Rm.
Manager
Tags: atp.EnumerationValue=11
nonVolatileRam The service relates to the Non-Volatile RAM Manager (NvM).
Manager
Tags: atp.EnumerationValue=12
operatingSystem The service relates to the Operating System (OS).
Tags: atp.EnumerationValue=13
secureOnBoard The service relates to the SecOc module.
Communication
Tags: atp.EnumerationValue=14
syncBaseTime The service relates to the Sync Time Base Manager (StbM).
Manager
Tags: atp.EnumerationValue=15
vendorSpecific This value denotes a vendor-specific service.
Tags: atp.EnumerationValue=16
watchDogManager The service relates to the Watchdog Manager (WdgM).
Tags: atp.EnumerationValue=17
Please find more details about the relation of PortInterfaces to AUTOSAR services
in chapter 11.
4.1 Introduction
The specification of the Virtual Functional Bus (VFB) [3] explains the main commu-
nication paradigms for communication among software-components: client/server for
operation-based communication, and sender/receiver for data-based communication.
The nature of the two communication paradigms is quite different, and so is the mod-
eling of SenderReceiverInterfaces and ClientServerInterfaces and their
related meta-classes.
[TPS_SWCT_01516] PortInterface describes the static structure of informa-
tion interchange d PortInterfaces are limited to the description of the static
structure of the exchanged information; the dynamic attributes relevant for commu-
nication are attached to PortPrototypes. c(RS_SWCT_00010, RS_SWCT_00080,
RS_SWCT_00110, RS_SWCT_02030, RS_SWCT_03010)
Please note that the dynamic attributes relevant for communication are described in
chapter 4.5.
4.2.1 Introduction
The usage of value encodings (for more information please refer to section 5.2.6) is
limited within the context of PortInterfaces.
[constr_1045] Supported value encodings for SwBaseType in the context of
PortInterfaces d The supported value encodings for the usage within a Port-
Interface are:
• 2C: Two’s complement
• IEEE754: floating point numbers
• ISO-8859-1: single-byte coded character
• ISO-8859-2: single-byte coded character
• WINDOWS-1252: single-byte coded character
• UTF-8: UCS Transformation Format 8
• UTF-16: Character encoding for Unicode code points based on 16 bit code
units [15]
• UCS-2: Universal Character Set 2
Class InvalidationPolicy
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Specifies whether the component can actively invalidate a particular dataElement.
If no invalidationPolicy points to a dataElement this is considered to yield the identical result as if the
handleInvalid attribute was set to dontInvalidate.
Base ARObject
Attribute Type Mul. Kind Note
dataElement VariableDataPrototype 1 ref Reference to the dataElement for which the Invalidation
Policy applies.
handleInvalid HandleInvalidEnum 0..1 attr This attribute controls how invalidation is applied to the
dataElement.
Table 4.2: InvalidationPolicy
Enumeration HandleInvalidEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Strategies of handling the reception of invalidValue.
Literal Description
dontInvalidate Invalidation is switched off.
Tags: atp.EnumerationValue=0
external Replace a received invalidValue. The replacement value is sourced from the externalReplacement.
Replacement
Tags: atp.EnumerationValue=1
keep The application software is supposed to handle signal invalidation on RTE API level either by Data
ReceiveErrorEvent or check of error code on read access.
Tags: atp.EnumerationValue=2
replace Replace a received invalidValue. The replacement value is specified by the initValue.
Tags: atp.EnumerationValue=3
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
DataPrototype
DataInterface
AutosarDataPrototype
SenderReceiverInterface VariableDataPrototype
+dataElement
1..*
+invalidationPolicy 0..*
InvalidationPolicy
+dataElement
+ handleInvalid: HandleInvalidEnum [0..1]
1
«enumeration»
HandleInvalidEnum
keep
replace
dontInvalidate
externalReplacement
Please note that the definition of VariableDataPrototype may possibly come very
close to the reader’s idea of a signal. However, different kinds of signals have a specific
meaning in the AUTOSAR concept, especially in the context of the AUTOSAR System
Template [10].
[TPS_SWCT_01117] Communication patterns for sender-receiver communica-
tion d PortPrototypes typed by a SenderReceiverInterface may be connected
to establish a 1:n (i.e. one sender, multiple receivers) communication relationship. It
is also possible to establish a n:1 (i.e. many senders, one receiver) communication
pattern. c()
[constr_1033] Communication scenarios for sender/receiver communication d
For sender/receiver communication, it is not allowed to create a communication sce-
nario where n sender are connected to m receivers where m and n are both greater
than 1. c()
Factually, [constr_1033] is not applicable to a scenario where several PRPortPro-
totypes are connected by a chain of AssemblySwConnectors or PassThrough-
SwConnectors.
[constr_1202] Supported connections by AssemblySwConnector for PortPro-
totypes typed by a SenderReceiverInterface or NvDataInterface d For
the modeling of AssemblySwConnectors between PortPrototypes typed by a
SenderReceiverInterface or NvDataInterface, only the connections docu-
mented in Table 4.4 are supported by AUTOSAR. c()
RPortPrototype PPortPrototype PRPortPrototype
RPortPrototype No Yes Yes
PPortPrototype Yes No Yes
PRPortPrototype Yes Yes Yes
Table 4.4: Supported connections for PortPrototypes typed by a Sender-
ReceiverInterface or NvDataInterface
2
However, different connection patterns apply, see [constr_1037]
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
ClientServerInterface
«atpVariation»
+operation 1..*
AtpStructureElement DataPrototype
Identifiable AutosarDataPrototype
ClientServerOperation
«atpVariation»
+argument * {ordered}
ArgumentDataPrototype
in
out
inout
1
+type {redefines atpType}
«enumeration»
ServerArgumentImplPolicyEnum ARElement
AtpType
useArgumentType AutosarDataType
useVoid
Class ClientServerOperation
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note An operation declared within the scope of a client/server interface.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
argument (or- ArgumentDataPrototype * aggr An argument of this ClientServerOperation
dered)
Stereotypes: atpVariation
Tags: vh.latestBindingTime=blueprintDerivationTime
possibleError ApplicationError * ref Possible errors that may by raised by the referring
operation.
Class ArgumentDataPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note An argument of an operation, much like a data element, but also carries direction information and is
owned by a particular ClientServerOperation.
Base ARObject, AtpFeature, AtpPrototype, AutosarDataPrototype, DataPrototype, Identifiable, Multilanguage
Referrable, Referrable
Attribute Type Mul. Kind Note
direction ArgumentDirection 1 attr This attribute specifies the direction of the argument
Enum prototype.
serverArgument ServerArgumentImpl 0..1 attr This defines how the argument type of the servers
ImplPolicy PolicyEnum RunnableEntity is implemented.
If the attribute is not defined this has the same semantics
as if the attribute is set to the value useArgumentType for
primitive arguments and structures.
It also does not define explicitly how information is passed between an implementation
of the client and the server and the underlying RTE (for example: through “pointers” or
“by value”).
[constr_1204] Supported connections by AssemblySwConnector for Port-
Prototypes typed by a ClientServerInterface, ModeSwitchInterface,
or TriggerInterface d For the modeling of AssemblySwConnectors between
PortPrototypes typed by a ClientServerInterface, ModeSwitchInter-
face, or TriggerInterface, only the connections documented in Table 4.11 are
supported by AUTOSAR. c()
RPortPrototype PPortPrototype PRPortPrototype
RPortPrototype No Yes Yes
PPortPrototype Yes No No
PRPortPrototype Yes No No
Table 4.11: Supported connections for PortPrototypes typed by a
ClientServerInterface, ModeSwitchInterface, or TriggerInterface
This section describes the handling of errors occurring either within an application
software-component or during the communication across the VFB [3]. Errors that are
created and consumed by basic software modules are not in the scope of this docu-
ment and therefore will not be discussed.
Therefore, errors in the scope of this document are divided into two simple classes:
• infrastructure errors and
• application errors.
«atpVariation»
AtpStructureElement Identifiable
Identifiable +possibleError ApplicationError
ClientServerOperation
0..* + errorCode: Integer
Class TriggerInterface
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note A trigger interface declares a number of triggers that can be sent by an trigger source.
Tags: atp.recommendedPackage=PortInterfaces
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType, CollectableElement,
Identifiable, MultilanguageReferrable, PackageableElement, PortInterface, Referrable
Attribute Type Mul. Kind Note
trigger Trigger 1..* aggr The Trigger of this trigger interface.
Class Trigger
Package M2::AUTOSARTemplates::CommonStructure::TriggerDeclaration
Note A trigger which is provided (i.e. released) or required (i.e. used to activate something) in the given
context.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
swImplPolicy SwImplPolicyEnum 0..1 attr This attribute, when set to value queued, allows for a
queued processing of Triggers.
triggerPeriod MultidimensionalTime 0..1 aggr Optional definition of a period in case of a periodically
(time or angle) driven external trigger.
Class MultidimensionalTime
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::MultidimensionalTime
Note This is used to specify a multidimensional time value based on ASAM CSE codes. It is specified by a
code which defined the basis of the time and a scaling factor which finally determines the time value.
If for example the cseCode is 100 and the cseCodeFactor is 360, it represents 360 angular degrees.
If the cseCode is 0 and the cseCodeFactor is 50 it represents 50 microseconds.
Base ARObject
Attribute Type Mul. Kind Note
cseCode CseCodeType 1 attr Specifies the time base by means of CSE codes.
cseCodeFactor Integer 1 attr The scaling factor for the time value based on the
specified CSE code.
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
TriggerInterface
+trigger 1..*
AtpStructureElement
Identifiable
Trigger
+triggerPeriod 0..1
MultidimensionalTime
+ cseCode: CseCodeType
+ cseCodeFactor: Integer
the side of the Trigger sink. To support this use case it is possible to process trigger
event communication in a queued manner.
In this case the Triggers are added to a queue from where the foremost trigger is
dequeued and processed when the processing of the current Trigger is done. Please
note that the queue size is not subject to definition in the scope of this document. The
actual queue size is defined during the process of RTE configuration.
The specification of whether or not a Trigger is subject to queued processing is
controlled by the attribute Trigger.swImplPolicy. c()
[constr_1169] Allowed values for Trigger.swImplPolicy d The only allowed val-
ues for the attribute Trigger.swImplPolicy are either STANDARD (in which case the
Trigger processing does not use a queue) or QUEUED (in which case the processing
of Triggers positively uses a queue). c()
Please note that the value of Trigger.swImplPolicy is not the final word on the
implementation of a queue for the specific Trigger. The integrator still has the power
to overrule the application software developer’s verdict if applicable.
For more information regarding the ability to connect different kinds of PortProto-
types typed by a TriggerInterface to each others please refer to [constr_1204]
and [constr_1205].
There are two distinctive use cases for the communication of modes via ports:
1. An actual mode transition can be communicated from a mode manager compo-
nent to its client components to enforce a mode switch.
2. A request for a mode transition can be communicated from any component to a
mode manager.
[TPS_SWCT_01087] Propagation of mode information d For communicating a
mode switch (i.e. the first use case), the Software-Component Template describes
the concept of the communication of ModeDeclarationGroupPrototypes simi-
lar to the communication of VariableDataPrototypes but is uses a special type
of PortInterface: the collections of ModeDeclarations that are required or
provided by a SwComponentType are defined by means of ModeSwitchInter-
faces used to type the PortPrototypes owned by the SwComponentType. c
(RS_SWCT_03203)
This aspect is depicted in Figure 4.5.
Due to the strong interaction with the RTE for handling the mode switches, this first use
case does not allow communication across ECU boundaries:
[constr_4000] Local communication of mode switches d Ports with ModeSwitch-
Interfaces cannot be connected across ECU boundaries. c()
Class ModeDeclarationGroupPrototype
Package M2::AUTOSARTemplates::CommonStructure::ModeDeclaration
Note The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is
provided or required in the given context.
Tags: atp.ManifestKind=ExecutionManifest,MachineManifest
Base ARObject, AtpFeature, AtpPrototype, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
swCalibration SwCalibrationAccess 0..1 attr This allows for specifying whether or not the enclosing
Access Enum ModeDeclarationGroupPrototype can be measured at
run-time.
type ModeDeclarationGroup 1 tref The "collection of ModeDeclarations" ( = ModeDeclaration
Group) supported by a component
Stereotypes: isOfType
PortInterface
ModeSwitchInterface
+modeGroup 1
AtpPrototype
ModeDeclarationGroupPrototype
«isOfType»
1
+type {redefines atpType}
ARElement AtpStructureElement
AtpBlueprint +modeDeclaration Identifiable
AtpBlueprintable «atpVariation» 1..* ModeDeclaration
AtpType
ModeDeclarationGroup + value: PositiveInteger [0..1]
Please note that each SwComponentType can define (via their PortPrototypes
and ModeSwitchInterfaces) a list of required and provided ModeDeclara-
tionGroupPrototypes.
[TPS_SWCT_01201] CompositionSwComponentType requires and provides the
modes that are required or provided by its contained SwComponentPrototypes
d Eventually, a CompositionSwComponentType requires and provides the modes
that are required or provided by its contained SwComponentPrototypes. The dele-
gation of these modes from SwComponentPrototypes to the enclosing Composi-
tionSwComponentType is explicitly described by DelegationSwConnectors. c
(RS_SWCT_03202, RS_SWCT_03203)
The formal description of a software-component does not make any assumptions about
the semantics of the required and provided ModeDeclarationGroupPrototypes.
It just requires and provides the ModeDeclarationGroupPrototypes by name. For
more information about mode declaration refer to section 9.1.
[TPS_SWCT_01086] Request mode change d The ability to request a mode (i.e.
the second use case) is modeled on the VFB via a SenderReceiverInterface
and for the RTE it is like a usual communication, that means the connector can also
cross ECU boundaries and the communicated dataElements have to be based on
AutosarDataTypes. c(RS_SWCT_03202, RS_SWCT_03203)
However, for semantic consistency with the first use case, a communicated mode re-
quest shall also be mapped to a corresponding ModeDeclarationGroup. This can
be defined by a mapping class as shown in figure 4.6.
The ImplementationDataType mapped to a certain ModeDeclarationGroup
can then be used in a PortInterface to represent a ModeDeclaration of the
associated ModeDeclarationGroup as a numerical value:
«atpVariation»
+portInterfaceMapping 1..* 0..* +modeRequestTypeMap
AtpBlueprint AbstractImplementationDataType
ModeRequestTypeMap
AtpBlueprintable ImplementationDataType
Identifiable
PortInterfaceMapping + dynamicArraySizeProfile: String [0..1]
+ isStructWithOptionalElement: Boolean [0..1]
+ typeEmitter: NameToken [0..1]
ARElement
AtpBlueprint
AtpBlueprintable
ModeInterfaceMapping AtpType
+modeGroup 1 ModeDeclarationGroup
+type 1
{redefines
atpType}
«isOfType»
+modeMapping 1
Class ModeRequestTypeMap
Package M2::AUTOSARTemplates::CommonStructure::ModeDeclaration
Note Specifies a mapping between a ModeDeclarationGroup and an ImplementationDataType. This
ImplementationDataType shall be used to implement the ModeDeclarationGroup.
Base ARObject
Attribute Type Mul. Kind Note
implementation AbstractImplementation 1 ref This is the corresponding AbstractImplementationData
DataType DataType Type. It shall be modeled along the idea of an "unsigned
integer-like" data type.
modeGroup ModeDeclarationGroup 1 ref This is the corresponding ModeDeclarationGroup.
+modeRequestTypeMap 0..*
ARElement
ModeRequestTypeMap SwcInternalBehavior
AtpBlueprint
AtpBlueprintable
AtpType
SwComponentType
+internalBehavior 0..1
«atpVariation,atpSplitable»
«atpVariation,atpSplitable»
+type 1
{redefines
atpType}
ARElement AbstractProvidedPortPrototype
AtpBlueprint +providedInterface PPortPrototype
AtpBlueprintable
1 «isOfType»
AtpType
{redefines atpType}
PortInterface
AbstractProvidedPortPrototype
+providedRequiredInterface AbstractRequiredPortPrototype
1 «isOfType» PRPortPrototype
{redefines atpType}
AbstractRequiredPortPrototype
«isOfType» +requiredInterface
RPortPrototype
1 «isOfType»
{redefines atpType}
ModeSwitchInterface
+modeGroup 1
AtpPrototype ModeDeclarationGroupPrototypeMapping
+firstModeGroup
ModeDeclarationGroupPrototype
1
+secondModeGroup
«atpVariation»
+portInterfaceMapping 1..*
AtpBlueprint AtpStructureElement
AtpBlueprintable +mapping SwConnector
Identifiable
0..1
PortInterfaceMapping
c()
The compatibility of AutosarDataTypes is described in section 6.2. A description of the
conversion of data can be found in section 4.3.2.
PortInterfaceMapping
VariableAndParameterInterfaceMapping
+dataMapping 1..*
TextTableMapping
DataPrototypeMapping
+ identicalMapping: Boolean
+textTableMapping
+ mappingDirection: MappingDirectionEnum
0..2 «atpVariation»
+ bitfieldTextTableMaskFirst: PositiveInteger [0..1]
+ bitfieldTextTableMaskSecond: PositiveInteger [0..1]
+firstDataPrototype 1 +secondDataPrototype 1
DataPrototype
AutosarDataPrototype
VariableDataPrototype ParameterDataPrototype
Figure 4.9: Mapping of Sender Receiver Interface, Parameter Interface and Non Volatile
Data Interface elements
Class VariableAndParameterInterfaceMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of VariableDataPrototypes or ParameterDataPrototypes in context of two different
SenderReceiverInterfaces, NvDataInterfaces or ParameterInterfaces.
Base ARObject, AtpBlueprint, AtpBlueprintable, Identifiable, MultilanguageReferrable, PortInterfaceMapping,
Referrable
Attribute Type Mul. Kind Note
dataMapping DataPrototypeMapping 1..* aggr Defines the mapping of two particular VariableData
Prototypes or ParameterDataPrototypes with unequal
names and/or unequal semantic (resolution or range) in
context of two different SenderReceiverInterfaces, Nv
DataInterfaces or ParameterInterfaces
Table 4.22: VariableAndParameterInterfaceMapping
Class DataPrototypeMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of two particular VariableDataPrototypes, ParameterDataPrototypes or Argument
DataPrototypes with unequal names and/or unequal semantic (resolution or range) in context of two
different SenderReceiverInterface, NvDataInterface or ParameterInterface or Operations.
If the semantic is unequal following rules apply:
The textTableMapping is only applicable if the referred DataPrototypes are typed by AutosarDataType
referring to CompuMethods of category TEXTTABLE, SCALE_LINEAR_AND_TEXTTABLE or
BITFIELD_TEXTTABLE.
In the case that the DataPrototypes are typed by AutosarDataType either referring to CompuMethods of
category LINEAR, IDENTICAL or referring to no CompuMethod (which is similar as IDENTICAL) the
linear conversion factor is calculated out of the factorSiToUnit and offsetSiToUnit attributes of the referred
Units and the CompuRationalCoeffs of a compuInternalToPhys of the referred CompuMethods.
Base ARObject
Attribute Type Mul. Kind Note
firstData AutosarDataPrototype 1 ref First to be mapped DataPrototype in context of a Sender
Prototype ReceiverInterface, NvDataInterface, ParameterInterface
or Operation.
firstToSecond DataTransformation 0..1 ref This reference defines the need to execute the Data
Data Transformation <Mip>_<transformerId> functions of the
Transformation transformation chain when communicating from the Data
PrototypeMapping.firstDataPrototype to the Data
PrototypeMapping.secondDataPrototype.
This reference also specifies the reverse Data
Transformation <Mip>_Inv_<transformerId> functions of
the transformation chain (i.e. from the DataPrototype
Mapping.secondDataPrototype to the DataPrototype
Mapping.firstDataPrototype) if the referenced Data
Transformation is symmetric, i.e. attribute Data
Transformation.dataTransformationKind is set to
symmetric.
secondData AutosarDataPrototype 1 ref Second to be mapped DataPrototype in context of a
Prototype SenderReceiverInterface, NvDataInterface, Parameter
Interface or Operation.
secondToFirst DataTransformation 0..1 ref This defines the need to execute the reverse Data
Data Transformation <Mip>_Inv_<transformerId> functions of
Transformation the transformation chain when communicating from the
DataPrototypeMapping.secondDataPrototype to the Data
PrototypeMapping.firstDataPrototype.
subElement SubElementMapping * aggr This represents the owned SubelementMapping.
Mapping
textTable TextTableMapping 0..2 aggr Applied TextTableMapping(s)
Mapping
«atpVariation»
+operationMapping 1..* +operation 1..*
+firstOperation AtpStructureElement
ClientServerOperationMapping
Identifiable
1 ClientServerOperation
+secondOperation
0..1 +firstToSecondDataTransformation
Identifiable
Transformer::DataTransformation
PortInterface
ClientServerInterface
«atpVariation»
+operation 1..*
+firstOperation AtpStructureElement
ClientServerOperationMapping
Identifiable
1 ClientServerOperation
+secondOperation
«atpVariation»
*
+argument {ordered}
ArgumentDataPrototype
+argumentMapping 0..*
+firstDataPrototype DataPrototype
DataPrototypeMapping
AutosarDataPrototype
1
+secondDataPrototype
+textTableMapping 0..2
TextTableMapping
+ identicalMapping: Boolean
+ mappingDirection: MappingDirectionEnum
«atpVariation»
+ bitfieldTextTableMaskFirst: PositiveInteger [0..1]
+ bitfieldTextTableMaskSecond: PositiveInteger [0..1]
Class ClientServerInterfaceMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of ClientServerOperations in context of two different ClientServerInterfaces.
Base ARObject, AtpBlueprint, AtpBlueprintable, Identifiable, MultilanguageReferrable, PortInterfaceMapping,
Referrable
Attribute Type Mul. Kind Note
errorMapping ClientServerApplication * aggr Map two different ApplicationErrors defined in the context
ErrorMapping of two different ClientServerInterfaces.
operation ClientServerOperation 1..* aggr Mapping of two ClientServerOperations in two different
Mapping Mapping ClientServerInterfaces
Class ClientServerOperationMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of two particular ClientServerOperations in context of two different ClientServer
Interfaces.
Base ARObject
Attribute Type Mul. Kind Note
argument DataPrototypeMapping * aggr Defines the mapping of two particular ArgumentData
Mapping Prototypes with unequal names or unequal semantic
(resolution or range) in context of Operations.
firstOperation ClientServerOperation 1 ref First to-be-mapped ClientServerOperation of a Client
ServerInterface.
firstToSecond DataTransformation 0..1 ref This reference indicates that a DataTransformation is
Data intended in the context of the ClientServerOperation
Transformation Mapping.
second ClientServerOperation 1 ref Second to-be-mapped ClientServerOperation of a Client
Operation ServerInterface.
Class ClientServerApplicationErrorMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This meta-class represents the ability to map ApplicationErrors onto each other.
Base ARObject
Attribute Type Mul. Kind Note
firstApplication ApplicationError 1 ref This represents the first ApplicationError in the context of
Error the ClientServerApplicationErrorMapping.
second ApplicationError 1 ref This represents the second ApplicationError in the
ApplicationError context of the ClientServerApplicationErrorMapping.
Class ModeInterfaceMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of ModeDeclarationGroupPrototypes in context of two different ModeInterfaces.
Base ARObject, AtpBlueprint, AtpBlueprintable, Identifiable, MultilanguageReferrable, PortInterfaceMapping,
Referrable
Attribute Type Mul. Kind Note
modeMapping ModeDeclarationGroup 1 aggr Mapping of two ModeDeclarationGroupPrototypes in two
PrototypeMapping different ModeInterfaces
Class ModeDeclarationGroupPrototypeMapping
Package M2::AUTOSARTemplates::CommonStructure::ModeDeclaration
Note Defines the mapping of two particular ModeDeclarationGroupPrototypes (in the given context) that are
unequally named and/or require a reference to a ModeDeclarationMappingSet in order to become
compatible by definition of ModeDeclarationMappings.
Base ARObject
Attribute Type Mul. Kind Note
firstModeGroup ModeDeclarationGroup 1 ref ModeDeclarationGroupPrototype to be mapped.
Prototype
mode ModeDeclaration 0..1 ref This represents the available mappings of Mode
Declaration MappingSet Declarations in the context ot this ModeDeclarationGroup
MappingSet Prototype.
secondMode ModeDeclarationGroup 1 ref ModeDeclarationGroupPrototype to be mapped.
Group Prototype
PortInterfaceMapping PortInterface
ModeInterfaceMapping ModeSwitchInterface
+modeMapping 1 +modeGroup 1
+secondModeGroup AtpPrototype
ModeDeclarationGroupPrototypeMapping
1 ModeDeclarationGroupPrototype
+firstModeGroup + swCalibrationAccess: SwCalibrationAccessEnum [0..1]
1
«isOfType»
1
+modeDeclarationMappingSet 0..1 +type {redefines atpType}
ARElement ARElement
AtpType AtpBlueprint
ModeDeclarationMappingSet AtpBlueprintable
AtpType
ModeDeclarationGroup
«atpVariation»
Class ModeDeclarationMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This meta-class implements a concrete mapping of two ModeDeclarations.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
firstMode ModeDeclaration 1..* ref This represents the first ModeDeclaration of the Mode
DeclarationMapping. This reference has the multiplicity 1
.. * to support use cases where e.g. one mode of the
mode user is mapped to several modes of the mode
manager.
secondMode ModeDeclaration 1 ref This represents the second ModeDeclaration of the Mode
DeclarationMapping.
The mode that corresponds to the mapped ModeDeclaration of the mode user is
exited when any of the modes of the Mode Manager that correspond to ModeDec-
larations referenced by the applicable ModeDeclarationMapping is exited if the
new mode is not mapped to related mode of the mode user. c(RS_SWCT_03115)
Please note if one ModeDeclaration of a mode user is mapped to several Mod-
eDeclarations of a mode manager by means of several ModeDeclarationMap-
pings the intended semantics is defined in a way that the individual mode transitions
of the mode manager are representing “exit” and “enter” events for the Mode User. In
other words, the individual transitions are recognizable by the mode user.
If one ModeDeclaration of a mode user is (by utilizing the multiplicity of the role
firstMode) mapped to several ModeDeclarations of a mode manager in the con-
text of a single ModeDeclarationMapping the semantics is defined in a way that
the individual mode transitions of the Mode Manager are not recognizable to the Mode
User.
[constr_1209] Mapping of ModeDeclarations of mode user to ModeDeclara-
tion of mode manager d A configuration that maps several ModeDeclarations
representing modes of a mode user to one ModeDeclaration representing a mode
of a mode manager shall be rejected. c()
[constr_1210] Mapping of ModeDeclarations of mode user to all ModeDecla-
rations of mode manager d If a ModeDeclarationMapping exists that references
a ModeDeclaration representing a mode of the mode manager then ModeDecla-
rationMappings shall exist that map all modes of the mode manager to modes of
the mode user. c()
Please note that [constr_1210] prevents the existence of configurations where the
mode user is not in a defined mode when no transition is ongoing.
[TPS_SWCT_01545] ModeDeclaration of a mode user that is not mapped to a
ModeDeclaration of a mode manager d A ModeDeclaration of a mode user that
is not mapped to a ModeDeclaration of a mode manager represents a valid model.
In this case the related mode is never entered nor exit during runtime of the ECU. c
(RS_SWCT_03115)
Class TriggerInterfaceMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines the mapping of unequal named Triggers in context of two different TriggerInterfaces.
Base ARObject, AtpBlueprint, AtpBlueprintable, Identifiable, MultilanguageReferrable, PortInterfaceMapping,
Referrable
Attribute Type Mul. Kind Note
triggerMapping TriggerMapping 1..* aggr Mapping of two Trigger in two different TriggerInterface
Class TriggerMapping
Package M2::AUTOSARTemplates::CommonStructure::TriggerDeclaration
Note Defines the mapping of two particular unequally named Triggers in the given context.
Base ARObject
Attribute Type Mul. Kind Note
firstTrigger Trigger 1 ref A Trigger to be mapped.
secondTrigger Trigger 1 ref A Trigger to be mapped.
PortInterfaceMapping PortInterface
TriggerInterfaceMapping TriggerInterface
+textTableMapping 0..2
+subElementMapping 0..*
SubElementMapping
«atpVariation» «atpVariation»
SubElementRef
ApplicationCompositeDataTypeSubElementRef ImplementationDataTypeSubElementRef
DataPrototype AbstractImplementationDataTypeElement
ApplicationCompositeElementDataPrototype ImplementationDataTypeElement
+subElement 0..*
{ordered}
«atpVariation»
Class SubElementMapping
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This meta-class allows for the definition of mappings of elements of a composite data type.
Base ARObject
Attribute Type Mul. Kind Note
firstElement SubElementRef 0..1 aggr This represents the first element referenced in the scope
of the mapping.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
secondElement SubElementRef 0..1 aggr This represents the second element referenced in the
scope of the mapping.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
textTable TextTableMapping 0..2 aggr This allows for the text-table translation of individual
Mapping elements of a composite data type.
Class ImplementationDataTypeSubElementRef
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This meta-class represents the specialization of SubElementMapping with respect to Implementation
DataTypes.
Base ARObject, SubElementRef
Attribute Type Mul. Kind Note
implementation ArVariableIn 0..1 aggr This represents the referenced implementationDataType
DataType ImplementationData Element.
Element InstanceRef
parameter ArParameterIn 0..1 aggr This represents the referenced ImplementationDataType
Implementation ImplementationData Element.
DataType InstanceRef
Element
Table 4.35: ImplementationDataTypeSubElementRef
Class ApplicationCompositeDataTypeSubElementRef
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note This meta-class represents the specialization of SubElementMapping with respect to Application
CompositeDataTypes.
Base ARObject, SubElementRef
Attribute Type Mul. Kind Note
application ApplicationComposite 1 iref This represents the referenced ApplicationComposite
Composite ElementDataPrototype DataPrototype.
Element
Table 4.36: ApplicationCompositeDataTypeSubElementRef
SubElementRef
PortInterface
ApplicationCompositeDataTypeSubElementRef
DataInterface
+base 1
{redefines
atpBase}
«atpDerived»
1 +applicationCompositeElement
AtpPrototype AtpInstanceRef
DataPrototype ApplicationCompositeElementInPortInterfaceInstanceRef
«instanceRef»
1 0..*
{redefines {subsets
+applicationCompositeElement 1 +targetDataPrototype atpTarget} +contextDataPrototype atpContextElement}
ApplicationCompositeElementDataPrototype
AutosarDataPrototype
+rootDataPrototype
1
{subsets
atpContextElement}
Figure 4.15: Implementation of the InstanceRef for the mapping of elements of compos-
ite application data types
«instanceRef»
AbstractImplementationDataTypeElement
+contextDataPrototype ArVariableInImplementationDataInstanceRef
ImplementationDataTypeElement
0..*
+ arraySizeHandling: ArraySizeHandlingEnum [0..1] {ordered}
+ arraySizeSemantics: ArraySizeSemanticsEnum [0..1]
+ isOptional: Boolean [0..1] +targetDataPrototype
«atpVariation»
+ arraySize: PositiveInteger [0..1] 1
ARElement
AtpType
«atpVariation»
AutosarDataType
+type 1
«atpVariation» {redefines atpType}
«isOfType»
DataPrototype
AutosarDataPrototype
+rootVariableDataPrototype 0..1
AbstractImplementationDataType
VariableDataPrototype
ImplementationDataType
Figure 4.16: Implementation of the InstanceRef for the mapping of elements of a Vari-
ableDataPrototype typed by a composite implementation data type
«instanceRef»
AbstractImplementationDataTypeElement
+contextDataPrototype ArParameterInImplementationDataInstanceRef
ImplementationDataTypeElement
0..*
+ arraySizeHandling: ArraySizeHandlingEnum [0..1] {ordered}
+ arraySizeSemantics: ArraySizeSemanticsEnum [0..1]
+ isOptional: Boolean [0..1]
+targetDataPrototype
«atpVariation»
+ arraySize: PositiveInteger [0..1] 1
ARElement
AtpType
«atpVariation» AutosarDataType
+type 1
{redefines atpType}
«isOfType»
«atpVariation»
DataPrototype
AutosarDataPrototype
+rootParameterDataPrototype 0..1
AbstractImplementationDataType
ParameterDataPrototype
ImplementationDataType
Figure 4.17: Implementation of the InstanceRef for the mapping of elements of a Param-
eterDataPrototype typed by a composite implementation data type
• LINEAR,
• IDENTICAL,
• SCALE_LINEAR_AND_TEXTTABLE,
• TEXTTABLE,
• BITFIELD_TEXTTABLE, and
• RAT_FUNC - as long as the semantics of the latter comes down to a reciprocal
linear data scaling.
c(RS_SWCT_03210)
[TPS_SWCT_01561] Application of data conversion to composite Autosar-
DataTypes d Data conversion is also applicable for composite AutosarDataTypes.
The actual conversion, however, shall be individually applied to each leaf element of a
given composite AutosarDataType. c(RS_SWCT_03210)
• N2 =N3 =...=Ni =0
• D1 =D2 =...=Di =0
• N1 6=0
• D0 6=0
The coefficient N0 represents the offset and can take any value.
c(RS_SWCT_03210)
[TPS_SWCT_01550] Definition of reciprocal linear data scaling d The term Re-
ciprocal Linear Scaling is defined as follows:
1. The involved AutosarDataTypes refer to CompuMethods of category
RAT_FUNC.
2. The CompuMethods refer either to compatible Units or to Units that in turn
refer to compatible definitions of PhysicalDimension.
3. Both CompuMethods fulfill the following condition:
N0 ∗phys0 +N1 ∗phys1 +N2 ∗phys2 +...+Ni ∗physi
Int = D 0 1 2 i with
0 ∗phys +D1 ∗phys +D2 ∗phys +...+Di ∗phys
• N1 =N2 =...=Ni =0
• D2 =D3 =...=Di =0
• N0 6=0
• D1 6=0
The coefficient D0 represents the (reciprocal) offset and can take any value.
c(RS_SWCT_03210)
[TPS_SWCT_01168] Linear conversion factor can be calculated d In such cases
a linear conversion factor can be calculated out of the factorSiToUnit and off-
setSiToUnit attributes of the referred Units and the CompuRationalCoeffs of a
compuInternalToPhys/compuPhysToInternal of the referred CompuMethods. c
(RS_SWCT_03210)
can be totally independent from each other with respect to the semantics of the
data that match the mask.
In other words, the existence of semantically independent and potentially isolated parts
within the primitive ImplementationDataType creates a similar characteristic as
if the definitions of the isolated parts were created by means of defining primitive Im-
plementationDataTypeElements within the context of a composite Implemen-
tationDataType.
And because it is possible to regard the “mission statement” of a DataPrototype
that refers to a CompuMethod of category BITFIELD_TEXTTABLE as to mimic the
semantics of a structured data type it is also possible to apply some of the rules that
are already in place for structured data types in this specific case as well.
This conclusion, in combination with the existence of [TPS_SWCT_01551], sets the
stage for [TPS_SWCT_01583].
[TPS_SWCT_01583] Completeness of TextTableMapping is not a requirement
d If a DataPrototypeMapping contains one or more TextTableMapping(s) where
the DataPrototype on the sender side refers to a CompuMethod of category
BITFIELD_TEXTTABLE it is not required that for each possible value and each possi-
ble bit mask on the sender side corresponding values on the receiver side are specified.
c(RS_SWCT_03210)
With respect to [TPS_SWCT_01583] it is still important to observe that within a single
mask all values on the sender side shall have a mapping to the receiver side.
Otherwise the RTE generator would not be able to create mapping code that unam-
biguously takes care of mapping the correct values onto each other.
[constr_1313] Completeness of TextTableMapping for the values of a given bit
mask on the sender side d If a DataPrototypeMapping contains one or more
TextTableMapping(s) where the DataPrototype on the sender side refers to a
CompuMethod of category BITFIELD_TEXTTABLE then all DataPrototypeMap-
ping.textTableMapping shall aggregate a collection of TextTableMapping.val-
uePair where each possible value of the sender bit mask6 is represented by
exactly one TextTableValuePair.firstValue ([TPS_SWCT_01163]) or Text-
TableValuePair.secondValue ([TPS_SWCT_01164]). c()
[constr_1304] Existence of attribute bitfieldTextTableMaskFirst d The at-
tribute bitfieldTextTableMaskFirst shall be defined only if the firstDat-
aPrototype of a DataPrototypeMapping refers to a CompuMethod that has the
value of category set to BITFIELD_TEXTTABLE. c()
6
Depending on the applicable case this means either bitfieldTextTableMaskFirst (ap-
plies if [TPS_SWCT_01163] is in place) or bitfieldTextTableMaskSecond for the case of
[TPS_SWCT_01164].
Enumeration MappingDirectionEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Specifies the conversion direction for which the mapping is applicable.
Literal Description
bidirectional The TextTableMapping is applicable in both directions.
Tags: atp.EnumerationValue=0
firstToSecond The TextTableMapping is applicable in the direction from firstDataPrototype / firstOperationArgument
referring into the PortInterface of the PPortPrototype to secondDataPrototype / secondOperation
Argument referring into the PortInterface of the RPortPrototype.
Tags: atp.EnumerationValue=1
secondToFirst The TextTableMapping is applicable in the direction from secondDataPrototype / secondOperation
Argument referring into the PortInterface of the PPortPrototype to firstDataPrototype / firstOperation
Argument referring into the PortInterface of the RPortPrototype.
Tags: atp.EnumerationValue=2
Class TextTableValuePair
Package M2::AUTOSARTemplates::SWComponentTemplate::PortInterface
Note Defines a pair of text values which are translated into each other.
Base ARObject
Attribute Type Mul. Kind Note
firstValue Numerical 1 attr Value of first DataPrototype provided similar to a
numerical ValueSpecification which is intended to be
assigned to a Primitive data element.
Note that the numerical value is a variant, it can be
computed by a formula.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
secondValue Numerical 1 attr Value of second DataPrototype provided similar to a
numerical ValueSpecification which is intended to be
assigned to a Primitive data element.
Note that the numerical value is a variant, it can be
computed by a formula.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
+firstDataPrototype DataPrototype
DataPrototypeMapping
AutosarDataPrototype
1
+secondDataPrototype
+textTableMapping 0..2
TextTableMapping «enumeration»
MappingDirectionEnum
+ identicalMapping: Boolean
+ mappingDirection: MappingDirectionEnum bidirectional
firstToSecond
«atpVariation»
secondToFirst
+ bitfieldTextTableMaskFirst: PositiveInteger [0..1]
+ bitfieldTextTableMaskSecond: PositiveInteger [0..1]
+valuePair 0..*
TextTableValuePair
«atpVariation»
+ firstValue: Numerical
+ secondValue: Numerical
0..1
TransformationTechnology DataTransformation
protocol=SomeIp transformerChain dataTransformationKind=
asymmetricToByteArray
transformerChain firstToSecondDataTransformation
DataTransformation
dataTransformationKind=
secondToFirstDataTransformation
asymmetricFromByteArray
VariableAndParameterMapping
DataPrototypeMapping
SwComponentPrototype typed by
NvBlockSwComponentType SwComponentPrototype typed by
ServiceSwComponentType (Dcm)
NvDataInterface
RecordElement 1 dataElement
PRPortPrototype
RecordElement 2 Byte-Array
PRPortPrototype
RecordElement 3
RecordElement 4
Figure 4.20: Use case for the existence of asymmetric data transformation in both direc-
tions
Class DataTransformation
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note A DataTransformation represents a transformer chain. It is an ordered list of transformers.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
data DataTransformationKind 0..1 attr This attribute controls the kind of DataTransformation to
Transformation Enum be applied.
Kind
executeDespite Boolean 1 attr Specifies whether the transformer chain is executed even
Data if no input data are available.
Unavailability
transformer Transformation 1..* ref This attribute represents the definition of a chain of
Chain (ordered) Technology transformers that are supposed to be executed according
to the order of being referenced from DataTransformation.
Enumeration DataTransformationKindEnum
Package M2::AUTOSARTemplates::SystemTemplate::Transformer
Note This enumeration contributes to the definition of the scope of the DataTransformation.
Literal Description
asymmetricFrom The DataTransformation shall only be applied to the receiving end only, i.e. transform from byte array
ByteArray to data type.
Tags: atp.EnumerationValue=0
asymmetricToByte The DataTransformation shall be applied to the sending end only, i.e. from data type to byte array.
Array
Tags: atp.EnumerationValue=1
symmetric The DataTransformation shall be applied at both the sending and the receiving end of the
communication.
Tags: atp.EnumerationValue=2
4.4.1 Introduction
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
SwComponentType
«atpVariation,atpSplitable»
+port 0..*
AtpBlueprintable GeneralAnnotation
AtpPrototype SenderReceiverAnnotation
PortPrototype +senderReceiverAnnotation
constraints
0..* {"port's interface is a SenderReceiverInterface"}
GeneralAnnotation
DelegatedPortAnnotation
+delegatedPortAnnotation
constraints
0..1
{aggregating PortPrototype is a port of a CompositionSwComponentType (DelegatedPort)}
GeneralAnnotation
+failureMonitoring IoHwAbstractionServerAnnotation
0..1 constraints
{"port's interface is a client/server interface using the operations GET and SET"}
+ioHwAbstractionServerAnnotation
0..*
GeneralAnnotation
ParameterPortAnnotation
+parameterPortAnnotation
constraints
0..*
{"The corresponding port interface shall be a ParameterInterface."}
GeneralAnnotation
ModePortAnnotation
+modePortAnnotation
constraints
0..* {"The corresponding port interface shall be a ModeInterface."}
GeneralAnnotation
NvDataPortAnnotation
+nvDataPortAnnotation constraints
{"The corresponding port interface shall be a NvDataInterface."}
0..*
GeneralAnnotation
TriggerPortAnnotation
+triggerPortAnnotation
constraints
0..*
{"The corresponding port interface shall be a TriggerInterface."}
GeneralAnnotation
ClientServerAnnotation
+clientServerAnnotation
constraints
0..* {"The corresponding PortInterface shall be a ClientServerInterface."}
4.4.2 SenderReceiverAnnotation
Class SenderAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation of a sender port, specifying properties of data elements that don’t affect communication or
generation of the RTE.
Base ARObject, GeneralAnnotation, SenderReceiverAnnotation
Attribute Type Mul. Kind Note
– – – – –
Table 4.43: SenderAnnotation
Class ReceiverAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation of a receiver port, specifying properties of data elements that don’t affect communication or
generation of the RTE. The given attributes are requirements on the required data.
Base ARObject, GeneralAnnotation, SenderReceiverAnnotation
Attribute Type Mul. Kind Note
signalAge MultidimensionalTime 1 aggr The maximum allowed age of the signal since it was
originally read by a sensor. This is a requirement
specified on the receiver side.
Enumeration ProcessingKindEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Kind of processing which has been applied to a data element.
Literal Description
filtered Indicates that a raw signal has been manipulated by some application software components by using
filters.
Tags: atp.EnumerationValue=0
none Indicates that none of the other option apply.
Tags: atp.EnumerationValue=1
raw Specifies that a signal is taken directly from the basic software modules, i.e. from the ECU abstraction
layer. It indicates to a developer that the control algorithm in the software has to provide filters.
Tags: atp.EnumerationValue=2
Enumeration DataLimitKindEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Indicates whether the data element carries a minimum or maximum value, thereby limiting the current
range of another value.
Literal Description
max Limitation to maximum value
Tags: atp.EnumerationValue=0
min Limitation to minimum value
Tags: atp.EnumerationValue=1
none No limitation applicable
Tags: atp.EnumerationValue=2
[TPS_SWCT_01206] Min and Max annotations are valid for a certain amount of
time d The Min and Max annotations are valid for a certain amount of time. The value
is likely to change to another valid value while the ECU is running. E.g. the maximal
torque which can be requested from an engine is a typical use-case. c()
This value might vary depending on e.g. the status of the climate control system.
Therefore, these annotations shall not be mismatched with the min and max attributes
of CompuMethods.
AtpBlueprintable
AtpPrototype
PortPrototype
+senderReceiverAnnotation 0..*
GeneralAnnotation
SenderReceiverAnnotation
constraints
{"port's interface is a SenderReceiverInterface"}
«enumeration» «enumeration»
ProcessingKindEnum DataLimitKindEnum
SenderAnnotation ReceiverAnnotation
none none
raw min
filtered max
+signalAge 1
MultidimensionalTime
+ cseCode: CseCodeType
+ cseCodeFactor: Integer
4.4.3 ClientServerAnnotation
+clientServerAnnotation 0..*
GeneralAnnotation
ClientServerAnnotation
+operation 1
AtpStructureElement
Identifiable
ClientServerOperation
Within the ECU-Abstraction Layer there are ECU-signals defined. These signals rep-
resent the electrical signals as they arrive in the micro-controller peripheral and are
fetched from the registers via the MCAL.
Access to the I/O Hardware Abstraction Layer is done via service interfaces, i.e. the I/O
Hardware Abstraction Layer provides GET- and SET-operations at the specified service
ports of a SensorActuatorSwComponentType.
[TPS_SWCT_01524] Usage of IoHwAbstractionServerAnnotation d IoHwAb-
stractionServerAnnotation can be used for all kinds of PortInterfaces ex-
cept NvDataInterface. c()
AtpBlueprintable AtpStructureElement DataInterface
AtpPrototype Identifiable SenderReceiverInterface
PortPrototype ClientServerOperation
0..1 +failureMonitoring
«atpVariation»
*
+argument {ordered}
+ioHwAbstractionServerAnnotation
0..*
AutosarDataPrototype
GeneralAnnotation ArgumentDataPrototype
IoHwAbstractionServerAnnotation +argument
AutosarDataPrototype
+dataElement
VariableDataPrototype
0..1
AtpStructureElement
+trigger
Identifiable
Trigger
0..1
+ swImplPolicy: SwImplPolicyEnum [0..1]
+age 0..1
MultidimensionalTime +triggerPeriod
rawData disable
debounceData enable
waitTimeDate
Class IoHwAbstractionServerAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note The IoHwAbstractionServerAnnotation will only be used from a sensor- or an actuator component while
interacting with the IoHwAbstraction layer.
Note that the "server" in the name of this meta-class is not meant to restrict the usage to ClientServer
Interfaces.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
age MultidimensionalTime 0..1 aggr In case of a SET operation, the age will be interpreted as
Delay while in a GET operation (input) it specifies the
Lifetime of the signal within the IoHwAbstraction Layer
Tags: xml.sequenceOffset=10
argument ArgumentDataPrototype 0..1 ref Reference to the corresponding ArgumentDataPrototype.
Tags: xml.sequenceOffset=20
bswResolution Float 1 attr This value is determined by an appropriate combination
of the range, the unit as well as the data-elements type,
i.e. (ecuSignalRange.upperLimit-ecuSignalRange.lower
Limit) / (2d̂atatypelength - 1)
Tags: xml.sequenceOffset=30
dataElement VariableDataPrototype 0..1 ref Reference to the corresponding VariableDataPrototype.
Tags: xml.sequenceOffset=40
failure PortPrototype 0..1 ref This is only applicable in SET operations. If it is enabled,
Monitoring the IoHwAbstraction layer will monitor the result of the
operation and issue an diagnostic signal. This means
especially, that an additional client-server port has to be
created. Tools can use this information to cross-check
whether for each data-element in a SET operation with
FailureMonitoring enabled an additional port is created
The referenced port monitors a failure in the to be
monitored VariableDataPrototype of the IoHwAbstraction
layer. The referenced port has to be another port of the
same Actuator or Sensor Component.
Tags: xml.sequenceOffset=50
filtering FilterDebouncingEnum 1 attr This attribute is used to indicate what kind of
Debouncing filtering/debouncing has been put to the signal in the Io
HwAbstraction layer.
rawData means that no modification of the signal has
been applied. This is the default value
debounceData means that the signal is a mean value
waitTimeData means that the signal is delivered by a
GET operation after a certain amount of time
Tags: xml.sequenceOffset=60
pulseTest PulseTestEnum 1 attr This attribute indicates to the connected SensorActuator
SwComponentType whether the VariableDataPrototype
can be used to generate pulse test sequences using the
IoHwAbstraction layer
Tags: xml.sequenceOffset=70
trigger Trigger 0..1 ref Reference to the corresponding Trigger.
Tags: xml.sequenceOffset=80
Enumeration FilterDebouncingEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note This enumeration defines possible values for the filter debouncing strategy.
Literal Description
debounceData The signal is a
mean value
Tags: atp.EnumerationValue=0
rawData Means that no modification of the
signal has been applied. This is the default
value
Tags: atp.EnumerationValue=1
waitTimeDate The signal is delivered by a GET operation after a certain amount of time
Tags: atp.EnumerationValue=2
Enumeration PulseTestEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note This element indicates to the connected Actuator Software component whether the data-element can
be used to generate pulse test sequences using the IoHwAbstraction layer
Literal Description
disable Disables the pulse test
Tags: atp.EnumerationValue=0
enable Enables the pulse test
Tags: atp.EnumerationValue=1
Class ParameterPortAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation to a port used for calibration regarding a certain ParameterDataPrototype.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
parameter ParameterData 1 ref The instance of annotated ParameterDataPrototype.
Prototype
The main use-case is to allow easy access to the information which calibration param-
eters influence the data on the PortPrototype.
AtpBlueprintable
AtpPrototype
PortPrototype
+parameterPortAnnotation 0..*
GeneralAnnotation
ParameterPortAnnotation
constraints
{"The corresponding port interface shall be a ParameterInterface."}
+parameter 1
AutosarDataPrototype
ParameterDataPrototype
Class ModePortAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation to a port used for calibration regarding a certain ModeDeclarationGroupPrototype.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
modeGroup ModeDeclarationGroup 1 ref The instance of annotated ModeDeclarationGroup
Prototype Prototype.
The main use-case is to allow for the definition of additional information related to the
mode declaration group prototype.
AtpBlueprintable
AtpPrototype
PortPrototype
+modePortAnnotation 0..*
GeneralAnnotation
ModePortAnnotation
+modeGroup 1
AtpPrototype
ModeDeclarationGroupPrototype
Class TriggerPortAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation to a port used for calibration regarding a certain Trigger.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
trigger Trigger 1 ref The instance of annotated trigger.
The main use-case is to allow define additional information related to the trigger.
AtpBlueprintable
AtpPrototype
PortPrototype
+triggerPortAnnotation 0..*
GeneralAnnotation
TriggerPortAnnotation
+trigger 1
AtpStructureElement
Identifiable
Trigger
4
Class NvDataPortAnnotation
Attribute Type Mul. Kind Note
variable VariableDataPrototype 1 ref The instance of nv data annotated.
The main use-case is to allow define additional information related to the non volatile
data elements.
AtpBlueprintable
AtpPrototype
PortPrototype
+nvDataPortAnnotation 0..*
GeneralAnnotation
NvDataPortAnnotation
+variable 1
AutosarDataPrototype
VariableDataPrototype
Class DelegatedPortAnnotation
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Annotation to a "delegated port" to specify the Signal Fan In or Signal Fan Out inside the CompositionSw
ComponentType.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
signalFan SignalFanEnum 0..1 attr Specifies the Signal Fan In or Signal Fan Out inside the
Composition Type.
Enumeration SignalFanEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes
Note Signal Fan inside the Composition Component Type.
Literal Description
nfold The connections internally in the CompositionSwComponentType via DelegationSwConnectors and
AssemblySwConnectors are defined in a way that at least one data element present in the S/R
interface or one ClientServerOperation in the C/S interface of the outer PortPrototype is involved in a
1:n or n:1 communication pattern.
Tags: atp.EnumerationValue=0
single The connections internally in the CompositionSwComponentType via DelegationSwConnectors and
AssemblySwConnectors are defined in a way that each VariableDataPrototype present in the S/R
interface or ClientServerOperation in the C/S interface of the outer PortPrototype is involved in a 1:1
communication pattern only.
Tags: atp.EnumerationValue=1
+ annotationOrigin: String
«atpMixed» MultilanguageLongName
DocumentationBlock
AbstractProvidedPortPrototype
RPortPrototype
PRPortPrototype
+requiredComSpec 0..*
RPortComSpec
PortPrototype
AbstractProvidedPortPrototype
AbstractRequiredPortPrototype
PPortPrototype
PRPortPrototype
+providedComSpec 0..*
PPortComSpec
In other words, it is not allowed that two or more RPortComSpec exist in the context of
a one RPortPrototype that refer to the same dataElement or operation.
[TPS_SWCT_01454] PRPortPrototype can own both RPortComSpecs and
PPortComSpecs d In contrast to PPortPrototype and RPortPrototype, PR-
PortPrototype can own both RPortComSpecs and PPortComSpecs at the same
time. c(RS_SWCT_03250)
Nevertheless, the following restriction applies:
[constr_1292] Limitation on the number of RPortComSpecs/PPortComSpecs in
the context of one PRPortPrototype d Within the context of one PRPortProto-
type, there can only be one RPortComSpec and one PPortComSpec that references
a given dataElement or operation. c()
In other words, it is not allowed that two or more PPortComSpec exist in the context of
a one PRPortPrototype that refer to the same dataElement or operation. In the
same manner, it is not allowed that two or more RPortComSpec exist in the context of
one PRPortPrototype that refer to the same dataElement or operation.
The rationale for the existence of [constr_1290], [constr_1291], and [constr_1292] is
that the AUTOSAR communication layer needs an unambiguous specification of the
communication behavior. The existence of redundant RPortComSpecs/PPortCom-
Specs may easily be contradicting each other and this would inhibit the creation of a
valid configuration for the AUTOSAR Com.
Class PPortComSpec (abstract)
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes of a provided PortPrototype. This class will contain attributes that are valid for
all kinds of provide ports, independent of client-server or sender-receiver communication patterns.
Base ARObject
Subclasses ModeSwitchSenderComSpec, NvProvideComSpec, ParameterProvideComSpec, SenderComSpec,
ServerComSpec
Attribute Type Mul. Kind Note
– – – – –
Table 4.58: PPortComSpec
DataPrototype
ApplicationCompositeElementDataPrototype
+leafElement 1
«instanceRef»
PortPrototype
CompositeNetworkRepresentation
AbstractRequiredPortPrototype
0..* +compositeNetworkRepresentation
«atpVariation» Describable
RPortComSpec
SwDataDefProps TransformationComSpecProps
AbstractAccessPoint
ReceiverComSpec
AtpStructureElement +replaceWith
Identifiable + handleOutOfRange: HandleOutOfRangeEnum
VariableAccess 0..1 + handleOutOfRangeStatus: HandleOutOfRangeStatusEnum [0..1]
+ maxNoNewOrRepeatedData: PositiveInteger [0..1]
+ scope: VariableAccessScopeEnum [0..1] + syncCounterInit: PositiveInteger [0..1]
«atpVariation»
+ maxDeltaCounterInit: PositiveInteger [0..1]
DataPrototype + usesEndToEndProtection: Boolean [0..1]
+dataElement
AutosarDataPrototype
0..1
«enumeration»
HandleOutOfRangeEnum
+initValue 0..1 +timeoutSubstitutionValue 0..1 +filter 0..1
none
ignore
ValueSpecification DataFilter
saturate
default + shortLabel: Identifier [0..1] + dataFilterType: DataFilterTypeEnum
invalid + mask: UnlimitedInteger [0..1]
externalReplacement + max: UnlimitedInteger [0..1]
+ min: UnlimitedInteger [0..1]
+ offset: PositiveInteger [0..1]
+ period: PositiveInteger [0..1]
«enumeration» + x: UnlimitedInteger [0..1]
«enumeration»
HandleTimeoutEnum HandleOutOfRangeStatusEnum
replace silent
none indicate
replaceByTimeoutSubstitutionValue
4
Class ReceiverComSpec (abstract)
transformation TransformationCom * aggr This references the TransformationComSpecProps which
ComSpecProps SpecProps define port-specific configuration for data transformation.
usesEndToEnd Boolean 0..1 attr This indicates whether the corresponding dataElement
Protection shall be transmitted using end-to-end protection.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
Class NonqueuedReceiverComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes specific to non-queued receiving.
Base ARObject, RPortComSpec, ReceiverComSpec
Attribute Type Mul. Kind Note
aliveTimeout TimeValue 1 attr Specify the amount of time (in seconds) after which the
software component (via the RTE) needs to be notified if
the corresponding data item have not been received
according to the specified timing description.
If the aliveTimeout attribute is 0 no timeout monitoring
shall be performed.
enableUpdate Boolean 1 attr This attribute controls whether application code is entitled
to check whether the value of the corresponding Variable
DataPrototype has been updated.
filter DataFilter 0..1 aggr The applicable filter algorithm for filtering the value of the
corresponding dataElement.
handleData Boolean 0..1 attr If this attribute is set to true than the Rte_IStatus API shall
Status exist. If the attribute does not exist or is set to false then
the Rte_IStatus API may still exist in response to the
existence of further conditions.
handleNever Boolean 1 attr This attribute specifies whether for the corresponding
Received VariableDataPrototype the "never received" flag is
available. If yes, the RTE is supposed to assume that
initially the VariableDataPrototype has not been received
before.
After the first reception of the corresponding VariableData
Prototype the flag is cleared.
• If the value of this attribute is set to "true" the flag
is required.
• If set to "false", the RTE shall not support the
"never received" functionality for the
corresponding VariableDataPrototype.
handleTimeout HandleTimeoutEnum 1 attr This attribute controls the behavior with respect to the
Type handling of timeouts.
initValue ValueSpecification 0..1 aggr Initial value to be used in case the sending component is
not yet initialized. If the sender also specifies an initial
value the receiver’s value will be used.
timeout ValueSpecification 0..1 aggr This attribute represents the substitution value applicable
Substitution in the case of a timeout.
Value
Table 4.62: NonqueuedReceiverComSpec
Class QueuedReceiverComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes specific to queued receiving.
Base ARObject, RPortComSpec, ReceiverComSpec
Attribute Type Mul. Kind Note
queueLength PositiveInteger 1 attr Length of queue for received events.
Enumeration HandleTimeoutEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Strategies of handling a reception timeout violation.
Literal Description
none If set to none no replacement shall take place.
Tags: atp.EnumerationValue=0
replace If set to replace, the replacement value shall be the ComInitValue.
Tags: atp.EnumerationValue=1
replaceByTimeout If set to replace, the replacement value shall be the timeout substitution value.
SubstitutionValue
Tags: atp.EnumerationValue=2
Primitive TimeValue
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes
Note This primitive type is taken for expressing time values. The numerical value is supposed to be interpreted
in the physical unit second.
Tags: xml.xsd.customType=TIME-VALUE
xml.xsd.type=double
Figure 4.33 shows the model of the communication attributes relevant for defining data
filters.
[TPS_SWCT_01221] DataFilter d For every RPortPrototype typed by a
SenderReceiverInterface a DataFilter can be defined given that non-queued
communication is foreseen. c()
Fifteen filter algorithms formally described by the enumeration type DataFilter-
TypeEnum in the meta-model are taken from the ISO 17356-4 specification [18] that is
referenced by the RTE specification [2].
[TPS_SWCT_01222] Applicability of DataFilter d This ISO 17356-4 specifica-
tion states that “filtering is only used for messages that can be interpreted as C lan-
guage unsigned integer types (characters, unsigned integers and enumerations).” c
(RS_SWCT_03221)
[constr_1044] Applicability of DataFilter d According to the origin of DataFil-
ter, i.e. ISO 17356-4 specification [18], DataFilters can only be applied to values
with an integer base type. c()
Class DataFilter
Package M2::AUTOSARTemplates::CommonStructure::Filter
Note Base class for data filters. The type of the filter is specified in attribute dataFilterType. Some of the filter
types require additional arguments which are specified as attributes of this class.
Base ARObject
Attribute Type Mul. Kind Note
dataFilterType DataFilterTypeEnum 1 attr This attribute specifies the type of the filter.
5
4
Class DataFilter
mask UnlimitedInteger 0..1 attr Mask for old and new value.
max UnlimitedInteger 0..1 attr Value to specify the upper boundary
min UnlimitedInteger 0..1 attr Value to specify the lower boundary
offset PositiveInteger 0..1 attr Specifies the initial number of messages to occur before
the first message is passed
period PositiveInteger 0..1 attr Specifies number of messages to occur before the
message is passed again
x UnlimitedInteger 0..1 attr Value to compare with
Enumeration DataFilterTypeEnum
Package M2::AUTOSARTemplates::CommonStructure::Filter
Note This enum specifies the supported DataFilterTypes.
Literal Description
always No filtering is performed so that the message always passes.
Tags: atp.EnumerationValue=0
maskedNewDiffers Pass messages where the masked value has changed.
MaskedOld
(new_value&mask) !=(old_value&mask)
new_value: current value of the message
old_value: last value of the message (initialized with the initial value of the message, updated with
new_value if the new message value is not filtered out)
Tags: atp.EnumerationValue=1
maskedNewDiffers Pass messages whose masked value is not equal to a specific value x
X
(new_value&mask) != x
new_value: current value of the message
Tags: atp.EnumerationValue=2
maskedNewEquals Pass messages whose masked value is equal to a specific value x
X
(new_value&mask) == x
new_value: current value of the message
Tags: atp.EnumerationValue=3
never The filter removes all messages.
Tags: atp.EnumerationValue=4
newIsOutside Pass a message if its value is outside a predefined boundary.
(min > new_value) OR (new_value > max)
Tags: atp.EnumerationValue=5
newIsWithin Pass a message if its value is within a predefined boundary.
min <= new_value <= max
Tags: atp.EnumerationValue=6
oneEveryN Pass a message once every N message occurrences.
Algorithm: occurrence % period == offset
Start: occurrence = 0.
Each time the message is received or transmitted, occurrence is incremented by 1 after filtering.
Length of occurrence is 8 bit (minimum).
Tags: atp.EnumerationValue=7
+leafElement 1
«instanceRef»
PortPrototype CompositeNetworkRepresentation
AbstractProvidedPortPrototype
0..* +compositeNetworkRepresentation
PPortComSpec «atpVariation»
SwDataDefProps
0..1 +networkRepresentation
«enumeration» DataPrototype
SenderComSpec
HandleOutOfRangeEnum AutosarDataPrototype
+dataElement
+ handleOutOfRange: HandleOutOfRangeEnum
none
«atpVariation» 0..1
ignore
+ usesEndToEndProtection: Boolean [0..1]
saturate
default
invalid
externalReplacement
TransmissionAcknowledgementRequest ValueSpecification
Class QueuedSenderComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes specific to distribution of events (PPortPrototype, SenderReceiverInterface and
dataElement carries an "event").
Base ARObject, PPortComSpec, SenderComSpec
Attribute Type Mul. Kind Note
– – – – –
Table 4.69: QueuedSenderComSpec
Class NonqueuedSenderComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes for non-queued sender/receiver communication (sender side)
Base ARObject, PPortComSpec, SenderComSpec
Attribute Type Mul. Kind Note
initValue ValueSpecification 1 aggr Initial value to be sent if sender component is not yet fully
initialized, but receiver needs data already.
Class TransmissionAcknowledgementRequest
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Requests transmission acknowledgement that data has been sent successfully. Success/failure is
reported via a SendPoint of a RunnableEntity.
Base ARObject
Attribute Type Mul. Kind Note
timeout TimeValue 1 attr Number of seconds before an error is reported or in case
of allowed redundancy, the value is sent again.
Enumeration HandleOutOfRangeEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note A value of this type is taken for controlling the range checking behavior of the AUTOSAR RTE.
Literal Description
default The RTE will use the initValue if the actual value is out of the specified bounds.
Tags: atp.EnumerationValue=0
external This indicates that the value replacement is sourced from the attribute replaceWith.
Replacement
Tags: atp.EnumerationValue=1
ignore The RTE will ignore any attempt to send or receive the corresponding dataElement if the value is out
of the specified range.
Tags: atp.EnumerationValue=2
invalid The RTE will use the invalidValue if the value is out of the specified bounds.
Tags: atp.EnumerationValue=3
none A range check is not required.
Tags: atp.EnumerationValue=4
saturate The RTE will saturate the value of the dataElement such that it is limited to the applicable upper
bound if it is greater than the upper bound. Consequently, it is limited to the applicable lower bound if
the value is less than the lower bound.
Tags: atp.EnumerationValue=5
Please note that the decision whether or not to take the networkRepresentation
for data mapping is done in the context of the AUTOSAR System Template [10]. Please
find more detailed information about this aspect in the applicable specification.
[TPS_SWCT_01452] Applicability of networkRepresentation for Applica-
tionCompositeDataType d The aggregation of networkRepresentation at the
ReceiverComSpec or SenderComSpec only applies for dataElements typed by
ApplicationPrimitiveDataTypes. For the case of using an ApplicationCom-
positeDataType an additional mechanism shall be used.
In particular, compositeNetworkRepresentation shall be used to define the net-
workRepresentation of leaf elements of ApplicationCompositeDataTypes. c
()
[constr_1196] Existence of networkRepresentation vs. compositeNet-
workRepresentation d If a ReceiverComSpec or SenderComSpec aggregates
networkRepresentation it shall not aggregate compositeNetworkRepresen-
tation at the same time (and vice versa). c()
[constr_1197] Existence of compositeNetworkRepresentation shall be com-
prehensive d If at least one compositeNetworkRepresentation exists then for
each leaf ApplicationCompositeElementDataPrototype of the affected Ap-
plicationCompositeDataType exactly one compositeNetworkRepresenta-
tion shall be defined. c()
Granted, the definition of [constr_1197] to some extent has a recursive character. The
meaning is that if it is actually intended to define a compositeNetworkRepresen-
tation then the definition shall be completely covering the entire set of leaf elements
of the corresponding ApplicationCompositeDataType. In other words, it’s all or
nothing.
Class CompositeNetworkRepresentation
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note This meta-class is used to define the network representation of leaf elements of composite application
data types.
Base ARObject
Attribute Type Mul. Kind Note
leafElement ApplicationComposite 1 iref This represents that leaf element of an application
ElementDataPrototype composite data type.
network SwDataDefProps 1 aggr The SwDataDefProps owned by the CompositeNetwork
Representation Representation are used to define the network
representation of the leaf element of an Application
CompositeDataType.
The communication aspects relevant for client communication are sketched in Fig-
ure 4.35.
PortPrototype
AbstractRequiredPortPrototype
+requiredComSpec 0..*
RPortComSpec
ClientComSpec
Class ClientComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Client-specific communication attributes (RPortPrototype typed by ClientServerInterface).
Base ARObject, RPortComSpec
Attribute Type Mul. Kind Note
operation ClientServerOperation 0..1 ref This represents the corresponding ClientServerOperation.
transformation TransformationCom * aggr This references the TransformationComSpecProps which
ComSpecProps SpecProps define port-specific configuration for data transformation.
The server side looks very similar but provides an attribute for specifying the queue
length.
PortPrototype
AbstractProvidedPortPrototype
+providedComSpec 0..*
PPortComSpec
ServerComSpec
+ queueLength: PositiveInteger
AtpStructureElement Describable
Identifiable TransformationComSpecProps
ClientServerOperation
Class ServerComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes for a server port (PPortPrototype and ClientServerInterface).
Base ARObject, PPortComSpec
Attribute Type Mul. Kind Note
operation ClientServerOperation 0..1 ref Operation these communication attributes apply to.
queueLength PositiveInteger 1 attr Length of call queue on the server side. The queue is
implemented by the RTE. The value shall be greater or
equal to 1. Setting the value of queueLength to 1 implies
that incoming requests are rejected while another request
that arrived earlier is being processed.
transformation TransformationCom * aggr This references the TransformationComSpecProps which
ComSpecProps SpecProps define port-specific configuration for data transformation.
In analogy to the previous section, Figure 4.37 shows the meta-model elements rel-
evant for a mode switch communication. On the sender side it is possible to specify
that an acknowledgement is supposed to be returned that indicates the successful
processing of the mode switch request.
PortPrototype
AbstractProvidedPortPrototype
+providedComSpec 0..*
PPortComSpec
AtpPrototype
ModeSwitchSenderComSpec
+modeGroup ModeDeclarationGroupPrototype
+ enhancedModeApi: Boolean [0..1]
+ queueLength: PositiveInteger 1 + swCalibrationAccess: SwCalibrationAccessEnum [0..1]
+modeSwitchedAck 0..1
ModeSwitchedAckRequest
+ timeout: TimeValue
PortPrototype
AbstractRequiredPortPrototype
+requiredComSpec 0..*
RPortComSpec
AtpPrototype
ModeSwitchReceiverComSpec +modeGroup ModeDeclarationGroupPrototype
+ enhancedModeApi: Boolean [0..1] 0..1 +
+ supportsAsynchronousModeSwitch: Boolean swCalibrationAccess: SwCalibrationAccessEnum [0..1]
Class ModeSwitchSenderComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes of PPortPrototypes with respect to mode communication
Base ARObject, PPortComSpec
Attribute Type Mul. Kind Note
enhancedMode Boolean 0..1 attr This controls the creation of the enhanced mode API that
Api returns information about the previous mode and the next
mode. If set to "true" the enhanced mode API is
supposed to be generated. For more details please refer
to the SWS_RTE.
modeGroup ModeDeclarationGroup 1 ref ModeDeclarationGroupPrototype (of the same Port
Prototype Interface) to which these communication attributes apply.
modeSwitched ModeSwitchedAck 0..1 aggr If this aggregation exists an acknowledgement for the
Ack Request successful processing of the mode switch request is
required.
queueLength PositiveInteger 1 attr Length of call queue on the mode user side. The queue is
implemented by the RTE. The value shall be greater or
equal to 1. Setting the value of queueLength to 1 implies
that incoming requests are rejected while another request
that arrived earlier is being processed.
Class ModeSwitchedAckRequest
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Requests acknowledgements that a mode switch has been proceeded successfully
Base ARObject
Attribute Type Mul. Kind Note
timeout TimeValue 1 attr Number of seconds before an error is reported or in case
of allowed redundancy, the value is sent again.
Class ModeSwitchReceiverComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes of RPortPrototypes with respect to mode communication
Base ARObject, RPortComSpec
Attribute Type Mul. Kind Note
enhancedMode Boolean 0..1 attr This controls the creation of the enhanced mode API that
Api returns information about the previous mode and the next
mode. If set to "true" the enhanced mode API is
supposed to be generated. For more details please refer
to the SWS_RTE.
modeGroup ModeDeclarationGroup 0..1 ref ModeDeclarationGroupPrototype (of the same Port
Prototype Interface) to which these communication attributes apply.
Tags: atp.Status=shallBecomeMandatory
5
4
Class ModeSwitchReceiverComSpec
supports Boolean 1 attr This attribute controls the behavior of the corresponding
Asynchronous RPortPrototype with respect to the question whether it
ModeSwitch can deal with asynchronous mode switch requests, i.e. if
set to true, the RPortPrototype is able to deal with an
asynchronous mode switch request.
PortPrototype
AbstractProvidedPortPrototype
+providedComSpec 0..*
PPortComSpec
AutosarDataPrototype
ParameterProvideComSpec
+parameter ParameterDataPrototype
+initValue 0..1
ValueSpecification
Class ParameterProvideComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note "Communication" specification that applies to parameters on the provided side of a connection.
Base ARObject, PPortComSpec
Attribute Type Mul. Kind Note
initValue ValueSpecification 0..1 aggr The initial value applicable for the corresponding
ParameterDataPrototype.
parameter ParameterData 1 ref The ParameterDataPrototype to which the Parameter
Prototype ComSpec applies.
PortPrototype
AbstractRequiredPortPrototype
+requiredComSpec 0..*
RPortComSpec
AutosarDataPrototype
ParameterRequireComSpec
+parameter ParameterDataPrototype
+initValue 0..1
ValueSpecification
Class ParameterRequireComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note "Communication" specification that applies to parameters on the required side of a connection.
Base ARObject, RPortComSpec
Attribute Type Mul. Kind Note
initValue ValueSpecification 0..1 aggr The initial value applicable for the corresponding
ParameterDataPrototype.
parameter ParameterData 1 ref The ParameterDataPrototype to which the Parameter
Prototype RequireComSpec applies.
+requiredComSpec 0..*
RPortComSpec
AutosarDataPrototype
NvRequireComSpec
+variable VariableDataPrototype
+initValue 0..1
ValueSpecification
Class NvRequireComSpec
Package M2::AUTOSARTemplates::SWComponentTemplate::Communication
Note Communication attributes of RPortPrototypes with respect to Nv data communication on the required
side.
Base ARObject, RPortComSpec
Attribute Type Mul. Kind Note
initValue ValueSpecification 0..1 aggr The initial value owned by the NvComSpec
variable VariableDataPrototype 1 ref The VariableDataPrototype the ComSpec applies for.
PortPrototype
AbstractProvidedPortPrototype
+providedComSpec 0..*
PPortComSpec
AutosarDataPrototype
NvProvideComSpec
+variable VariableDataPrototype
ValueSpecification
Describable
TransformationComSpecProps
UserDefinedTransformationComSpecProps EndToEndTransformationComSpecProps
+ disableEndToEndCheck: Boolean
+ maxDeltaCounter: PositiveInteger [0..1]
+ maxErrorStateInit: PositiveInteger [0..1]
+ maxErrorStateInvalid: PositiveInteger [0..1]
+ maxErrorStateValid: PositiveInteger [0..1]
+ maxNoNewOrRepeatedData: PositiveInteger [0..1]
+ minOkStateInit: PositiveInteger [0..1]
+ minOkStateInvalid: PositiveInteger [0..1]
+ minOkStateValid: PositiveInteger [0..1]
+ syncCounterInit: PositiveInteger [0..1]
+ windowSize: PositiveInteger [0..1]
ARElement
DataPrototypeMapping
DataTransformationSet
«atpVariation,atpSplitable»
«atpVariation,atpSplitable» Identifiable
DataTransformation
FibexElement FibexElement
«enumeration» ISignal +iSignal ISignalGroup
DataTransformationKindEnum
+ dataTypePolicy: DataTypePolicyEnum 0..*
symmetric + iSignalType: ISignalTypeEnum [0..1]
asymmetricFromByteArray + length: Integer
asymmetricToByteArray
Describable
«atpVariation»
TransformationISignalProps
1..* +transformer
0..* +transformationTechnology {ordered} +transformerChain 1
Identifiable
TransformationTechnology
«atpVariation»
+transformationDescription 0..1 +bufferProperties 1
Describable
BufferProperties
TransformationDescription
+ headerLength: Integer
+ inPlace: Boolean
+bufferComputation 0..1
«enumeration» CompuScale
TransformerClassEnum
+ mask: PositiveInteger [0..1]
serializer + shortLabel: Identifier [0..1]
safety + symbol: CIdentifier [0..1]
security
«atpVariation»
custom
+ lowerLimit: Limit [0..1]
+ upperLimit: Limit [0..1]
4
Class TransformationTechnology
version String 1 attr Version of the implemented protocol.
4
Class EndToEndTransformationComSpecProps
maxErrorState PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to
Invalid E2E_P_ERROR was determined, within the last Window
Size checks, for the state E2E_SM_INVALID.
The minimum value is 0.
maxErrorState PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to
Valid E2E_P_ERROR was determined, within the last Window
Size checks, for the state E2E_SM_VALID.
The minimum value is 0.
maxNoNewOr PositiveInteger 0..1 attr EndToEndTransformationDescription holds these
RepeatedData attributes which are profile specific and have the same
value for all E2E transformers.
minOkStateInit PositiveInteger 0..1 attr Minimal number of checks in which ProfileStatus equal to
E2E_P_OK was determined, within the last WindowSize
checks, for the state E2E_SM_INIT.
The minimum value is 1.
minOkState PositiveInteger 0..1 attr Minimal number of checks in which ProfileStatus equal to
Invalid E2E_P_OK was determined, within the last WindowSize
checks, for the state E2E_SM_INVALID.
The minimum value is 1.
minOkState PositiveInteger 0..1 attr Minimal number of checks in which ProfileStatus equal to
Valid E2E_P_OK was determined, within the last WindowSize
checks, for the state E2E_SM_VALID.
The minimum value is 1.
syncCounterInit PositiveInteger 0..1 attr EndToEndTransformationDescription holds these
attributes which are profile specific and have the same
value for all E2E transformers.
windowSize PositiveInteger 0..1 attr Size of the monitoring window for the E2E state machine.
The meaning is the number of correct cycles
(E2E_P_OK) that are required in E2E_SM_INITCOM
before the transition to E2E_SM_VALID.
The minimum allowed value is 1.
Table 4.86: EndToEndTransformationComSpecProps
ARElement
AtpBlueprint AtpBlueprintable
+port AtpPrototype
AtpBlueprintable
AtpType PortPrototype
«atpVariation,atpSplitable» 0..*
SwComponentType
+outerPort 0..*
«atpVariation»
AtpStructureElement
+portGroup Identifiable
«atpVariation» PortGroup
0..*
+innerGroup
0..*
«instanceRef»
Class PortGroup
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note Group of ports which share a common functionality, e.g. need specific network resources. This
information shall be available on the VFB level in order to delegate it properly via compositions. When
propagated into the ECU extract, this information is used as input for the configuration of Services like
the Communication Manager. A PortGroup is defined locally in a component (which can be a
composition) and refers to the "outer" ports belonging to the group as well as to the "inner" groups which
propagate this group into the components which are part of a composition. A PortGroup within an atomic
SWC cannot be linked to inner groups.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
innerGroup PortGroup * iref Links a PortGroup in a composition to another PortGroup,
that is defined in a component which is part of this
CompositionSwComponentType.
outerPort PortPrototype * ref Outer PortPrototype of this AtomicSwComponentType
which belongs to the group. A port can belong to several
groups or to no group at all.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
Note that several end-to-end profiles are selectable for a specific application. The spe-
cific end-to-end profile is represented by the attribute category of meta-class End-
ToEndDescription.
Semantically, the category value represents an identification of the specific end-to-
end profile applicable for the communication of the corresponding data element. Ac-
cording to [19] there are two pre-defined profiles that can be used.
[TPS_SWCT_01089] end-to-end communication protection d The information
specific to each profile is expressed by the set of attributes of EndToEndDe-
scription owned by EndToEndProtection in the role endToEndProfile. c
(RS_SWCT_03240)
Class EndToEndDescription
Package M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection
Note This meta-class contains information about end-to-end protection. The set of applicable attributes
depends on the actual value of the category attribute of EndToEndProtection.
Base ARObject
Attribute Type Mul. Kind Note
category NameToken 1 attr The category represents the identification of the concrete
E2E profile. The applicable values are specified in a
semantic constraint and determine the applicable
attributes of EndToEndDescription.
Tags: xml.sequenceOffset=-100
counterOffset PositiveInteger 0..1 attr Bit offset of Counter from the beginning of the Array
representation of the Signal Group/VariableDataPrototype
(MSB order, bit numbering: bit 0 is the least important).
The offset shall be a multiplicity of 4 and it should be 8
whenever possible. For example, offset 8 means that the
counter will take the low nibble of the byte 1, i.e. bits 8 ..
11. If counterOffset is not present the value is defined by
the selected profile.
Tags: xml.sequenceOffset=-50
crcOffset PositiveInteger 0..1 attr Bit offset of CRC from the beginning of the Array
representation of the Signal Group/VariableDataPrototype
(MSB order, bit numbering: bit 0 is the least important).
The offset shall be a multiplicity of 8 and it should be 0
whenever possible. For example, offset 8 means that the
CRC will take the byte 1, i.e. bits 8..15. If crcOffset is not
present the value is defined by the selected profile.
Tags: xml.sequenceOffset=-60
dataId (ordered) PositiveInteger * attr This represents a unique numerical identifier.
Note: ID is used for protection against masquerading.
The details concerning the maximum number of values
(this information is specific for each E2E profile)
applicable for this attribute are controlled by a semantic
constraint that depends on the category of the EndToEnd
Protection.
Tags: xml.sequenceOffset=-90
5
4
Class EndToEndDescription
dataIdMode PositiveInteger 0..1 attr There are three inclusion modes how the implicit two-byte
Data ID is included in the one-byte CRC:
• dataIDMode = 0: Two bytes are included in the
CRC (double ID configuration) This is used in
variant 1A.
• dataIDMode = 1: One of the two bytes byte is
included, alternating high and low byte,
depending on parity of the counter (alternating ID
configuration). For even counter low byte is
included; For odd counters the high byte is
included. This is used in variant 1B.
• dataIDMode = 2: Only low byte is included, high
byte is never used. This is applicable if the IDs in
a particular system are 8 bits.
• dataIdMode = 3: The low byte is included in the
implicit CRC calculation, the low nibble of the
high byte is transmitted along with the data (i.e. it
is explicitly included), the high nibble of the high
byte is not used. This is applicable for the IDs up
to 12 bits.
Tags: xml.sequenceOffset=-85
dataIdNibble PositiveInteger 0..1 attr Bit offset of the low nibble of the high byte of Data ID. The
Offset applicability of this attribute is controlled by [constr_1261].
Tags: xml.sequenceOffset=-25
dataLength PositiveInteger 0..1 attr This attribute represents the length of the Array
representation of the Signal Group/VariableDataPrototype
including CRC and Counter in bits.
Tags: xml.sequenceOffset=-80
maxDelta PositiveInteger 0..1 attr Initial maximum allowed gap between two counter values
CounterInit of two consecutively received valid Data, i.e. how many
subsequent lost data is accepted. For example, if the
receiver gets Data with counter 1 and MaxDeltaCounter
Init is 1, then at the next reception the receiver can accept
Counters with values 2 and 3, but not 4.
Note that if the receiver does not receive new Data at a
consecutive read, then the receiver increments the
tolerance by 1.
Tags: xml.sequenceOffset=-70
maxNoNewOr PositiveInteger 0..1 attr The maximum amount of missing or repeated Data which
RepeatedData the receiver does not expect to exceed under normal
communication conditions.
Tags: xml.sequenceOffset=-40
syncCounterInit PositiveInteger 0..1 attr Number of Data required for validating the consistency of
the counter that shall be received with a valid counter
(i.e. counter within the allowed lock-in range) after the
detection of an unexpected behavior of a received
counter.
Tags: xml.sequenceOffset=-30
ARElement
EndToEndProtectionSet
«atpVariation,atpSplitable»
EndToEndDescription
0..* +endToEndProtection
+ category: NameToken
Identifiable + counterOffset: PositiveInteger [0..1]
EndToEndProtection +endToEndProfile + crcOffset: PositiveInteger [0..1]
+ dataId: PositiveInteger [0..*] {ordered}
«atpSplitable» 1 + dataIdMode: PositiveInteger [0..1]
+ dataIdNibbleOffset: PositiveInteger [0..1]
+ dataLength: PositiveInteger [0..1]
+ maxDeltaCounterInit: PositiveInteger [0..1]
+ maxNoNewOrRepeatedData: PositiveInteger [0..1]
+ syncCounterInit: PositiveInteger [0..1]
«atpVariation,atpSplitable»
+endToEndProtectionVariablePrototype 0..*
+sender
AtpInstanceRef
EndToEndProtectionVariablePrototype
0..1 VariableDataPrototypeInSystemInstanceRef
+ shortLabel: Identifier [0..1] +receiver
0..*
1
{redefines
+targetDataPrototype atpTarget}
+sender
AutosarDataPrototype
«instanceRef» 0..1 VariableDataPrototype
+receiver
«instanceRef» 0..*
Class EndToEndProtection
Package M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection
Note This meta-class represents the ability to describe a particular end to end protection.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
endToEnd EndToEndDescription 1 aggr This represents the particular EndToEndDescription.
Profile
Stereotypes: atpSplitable
Tags: atp.Splitkey=endToEndProfile
endToEnd EndToEndProtectionI * aggr Defines to which ISignalIPdu - ISignalGroup pair this End
Protection SignalIPdu ToEndProtection shall apply.
ISignalIPdu
In case several ISignalGroups are used to transport the
data (e.g. fan-out in the RTE) there may exist several End
ToEndProtectionISignalIPdu definitions.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
endToEnd EndToEndProtection * aggr Defines to which VariableDataPrototypes in the roles of
Protection VariablePrototype one sender and one or more receivers this EndTo
Variable Endprotection applies.
Prototype
It shall be possible to aggregate several EndToEnd
ProtectionVariablePrototype in case additional
hierarchical decompositions are introduced subsequently.
In this case one particular PortPrototype is split into
multiple PortPrototypes and connectors, all representing
the same data entity.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortLabel, variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
Class EndToEndProtectionVariablePrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection
Note It is possible to protect the data exchanged between software components. For this purpose, for each
communication to be protected, the user defines a separate EndToEndProtection (specifying a set of
protection settings) and refers to a variableDataPrototype in the role of sender and to one or many
variableDataPrototypes in the role of receiver. For details, see EndToEnd Library.
Base ARObject
Attribute Type Mul. Kind Note
receiver VariableDataPrototype * iref This represents the receiver. Note that 1:n
communication is supported for this use case.
sender VariableDataPrototype 0..1 iref This represents the sender.
Can be optional if an ecu extract is provided and the
sender is part of the extract.
shortLabel Identifier 0..1 attr This serves as part of the split key in case of more than
one EndToEndProtectionVariablePrototype is aggregated
in the bound model.
Table 4.91: EndToEndProtectionVariablePrototype
Please note that using end-to-end protection it is explicitly supported that one sender
may correspond to one or more receivers.
[constr_1183] EndToEndProtectionVariablePrototypes aggregated by End-
ToEndProtection d All EndToEndProtectionVariablePrototypes aggre-
gated by the same EndToEndProtection shall refer to the identical sender. c()
[TPS_SWCT_01175] Actively query the status of a partial network d Very much like
mode management, the concept of partial networking supports the ability to actively
query the status of a partial network.
This can be done by means of interfacing the BSW in three alternative (as in “one of”)
ways:
• ComM: ClientServerInterface using the standardized ComM_UserRe-
quest.GetCurrentComMode [20]
• ComM: ModeSwitchInterface using the standardized ComM_CurrentMode.
currentMode [20]
• BswM: ModeSwitchInterface using the standardized AppModeInter-
face.currentMode [14]
c(RS_SWCT_03241)
As mentioned above, the status of the ComM can be retrieved by either a
ClientServerInterface or a SenderReceiverInterface. Which of the two
alternatives applies in a specific case is up to the author of a software-component8 .
When using one of the possible SenderReceiverInterfaces, the correspondence
of the status port concept with mode management extends to the point that the status
of the partial network is returned as an actual ModeDeclaration.
This implies that all mechanisms foreseen by the Software Component Template to
react on mode changes are in place and can be used within the application software.
To assure that the communication via PortPrototypes that belong to a partial net-
work is valid the software component shall consider the status of the partial network
before communicating in order to assert its activity.
[TPS_SWCT_01174] Status port shall not become a member of the PortGroup d
A status port shall not become a member of the PortGroup that corresponds to the
partial network subject to the status port.
The relationship is implemented by means of a specific SwcServiceDependency
that owns a RoleBasedPortAssignment to the intended status port and refers
to a PortGroup (that comprises the VFC) in the role representedPortGroup. c
(RS_SWCT_03241, RS_SWCT_03201)
For further information, please refer to [TPS_SWCT_01126].
8
The usage of the ClientServerInterface effectively implements a “pull” approach for the mode
information while the usage of the SenderReceiverInterface resembles a “push” approach if it is
used in combination with a SwcModeSwitchEvent.
ARElement
AtpBlueprint
AtpBlueprintable
AtpType
SwComponentType
«atpVariation,atpSplitable»
+consistencyNeeds 0..*
AtpBlueprint
AtpBlueprintable
Identifiable
ConsistencyNeeds
«atpVariation,atpSplitable» «atpVariation,atpSplitable» «atpVariation,atpSplitable» «atpVariation,atpSplitable»
AtpStructureElement AtpStructureElement
«instanceRef» Identifiable Identifiable
«instanceRef»
RunnableEntityGroup DataPrototypeGroup
«instanceRef» «instanceRef»
AtpStructureElement AutosarDataPrototype
ExecutableEntity VariableDataPrototype
RunnableEntity
+ canBeInvokedConcurrently: Boolean
+ symbol: CIdentifier
DataInterface DataInterface
SenderReceiverInterface NvDataInterface
Please note that the two aspects stability and coherence are not necessarily con-
nected to each other. It is possible to require stability without coherence and vice
versa. For this purpose the roles dpgDoesNotRequireCoherency and regDoes-
NotRequireStability are needed.
[TPS_SWCT_01480] Stability and/or coherence is not required d In order to be
able to clearly separate the aspect of stability from coherence it is possible to use the
roles dpgDoesNotRequireCoherency to express that a group of VariableDat-
aPrototypes explicitly does not require consistency.
Likewise, regDoesNotRequireStability can be used to express that for a group
of RunnableEntitys stability with respect to data access is not required. c()
Class ConsistencyNeeds
Package M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior
Note This meta-class represents the ability to define requirements on the implicit communication behavior.
Base ARObject, AtpBlueprint, AtpBlueprintable, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
dpgDoesNot DataPrototypeGroup * aggr This group of VariableDataPrototypes does not require
Require coherency with respect to the implicit communication
Coherency behavior.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortName, variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
dpgRequires DataPrototypeGroup * aggr This group of VariableDataPrototypes requires coherency
Coherency with respect to the implicit communication behavior, i.e.
all read and write access to VariableDataPrototypes in the
DataPrototypeGroup by the RunnableEntitys of the
RunnableEntityGroup need to be handled in a coherent
manner.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortName, variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
regDoesNot RunnableEntityGroup * aggr This group of RunnableEntities does not require stability
RequireStability with respect to the implicit communication behavior.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortName, variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
regRequires RunnableEntityGroup * aggr This group of RunnableEntities requires stability with
Stability respect to the implicit communication behavior, i.e. all
read and write access to VariableDataPrototypes in the
DataPrototypeGroup by the RunnableEntitys of the
RunnableEntityGroup need to be handled in a stable
manner.
Stereotypes: atpSplitable; atpVariation
Tags: atp.Splitkey=shortName, variationPoint.shortLabel
vh.latestBindingTime=preCompileTime
Class RunnableEntityGroup
Package M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior
Note This meta-class represents the ability to define a collection of RunnableEntities. The collection can be
nested.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
runnableEntity RunnableEntity * iref This represents a collection of RunnableEntitys that
belong to the enclosing RunnableEntityGroup.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
runnableEntity RunnableEntityGroup * iref This represents the ability to define nested groups of
Group RunnableEntitys.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
Class DataPrototypeGroup
Package M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior
Note This meta-class represents the ability to define a collection of DataPrototypes that are subject to the
formal definition of implicit communication behavior. The definition of the collection can be nested.
Base ARObject, AtpClassifier , AtpFeature, AtpStructureElement, Identifiable, MultilanguageReferrable,
Referrable
Attribute Type Mul. Kind Note
dataPrototype DataPrototypeGroup * iref This represents the ability to define nested groups of
Group VariableDataPrototypes.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
implicitData VariableDataPrototype * iref This represents a collection of VariableDataPrototypes
Access that belong to the enclosing DataPrototypeGroup
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
4.9.3 Consistency Needs for Senders and receivers of the same Data inside on
RunnableEntityGroup
5 Data Description
5.1 Introduction
[TPS_SWCT_01229] Three different levels of abstraction regarding the definition
of data types d In the context of defining data types and prototypes, the AUTOSAR
concept distinguishes between three different levels of abstraction as depicted in Ta-
ble 5.1. c(RS_SWCT_03215, RS_SWCT_03216, RS_SWCT_03217)
interfaces. Using a uniform type system covering all these aspects is now fa-
vored.
• Calibration parameters were not completely incorporated into the data type con-
cept. Some of their attributes (especially for curves and maps) could be spec-
ified only on the level of prototypes or were not completely formalized within
AUTOSAR (like SwRecordLayout).
• The data type system was not compatible with the usage in calibration standards
like ASAM-MCD (namely the usage of categorys).
• Adding implementation specific elements like a base type, was not possible with-
out formally changing the data type used in a VFB design. A mapping mecha-
nism that could be used in later project phases and is common in other parts of
AUTOSAR (e.g. for mapping components to ECUs) was missing.
• The RTE Specification contained many default rules and assumptions on how to
implement certain data types or prototypes in C. With a more formal description
of all relevant implementation aspects, the generation of C-interfaces is better
determined. But these aspects should be separated from the application level
design.
• Since there could be many data types on the application level in a big system, the
probability of name clashes in the interfaces to the RTE was rather high. Using a
separate set of types to implement the RTE interfaces solves this issue.
[TPS_SWCT_01231] Application level may impose strong requirements on the
design of the corresponding implementation level d It should be pointed out, that
with the specification of computation methods and record layouts, the application level
imposes strong requirements on the design of the corresponding implementation level.
It might even be the case, that when anticipating different implementations, these ele-
ments might be chosen differently.
This is due to the nature of these elements which form a bridge from the physical
world to the numerical representation (and vice versa). Nonetheless we consider the
specification of these elements as belonging to the application level.
On the one hand, this information is required by MCD-tools and thus shall be part
of a rather high-level design. On the other hand, this approach will allow to use
a limited set of implementation data types. c(RS_SWCT_03215, RS_SWCT_03216,
RS_SWCT_03217)
Further information about the compatibility requirements between application level and
implementation level can be found in section 6.2.5.
[TPS_SWCT_01232] Implementation Data Level d The Implementation Data Level
is closer to the actual code implementation in a programming language like C, though
it is still an abstraction of the code.
Its values correspond to the actual binary numbers handled by the programming lan-
guage on the CPU. It contains concepts like pointers and unions which relate to the
organization of data in memory and are not relevant for the application level.
This level also defines structure, but it can be more granular. For example, the appli-
cation level may define a text to be transferred to an instrument cluster as a primitive
type (if the structure is not relevant for the application), whereas on the implementation
level it could be modeled as an array of bytes. c(RS_SWCT_03217)
[TPS_SWCT_01233] Use case for the Implementation Data Level d There are sev-
eral use cases for this level in AUTOSAR:
• First of all, the Implementation Data level can be used in the description of in-
terfaces, and data (e.g. debug data) within the basic software, see [6] for more
details on these use cases.
• ImplementationDataTypes should also be used to describe the interfaces of
libraries which operate on a purely numerical level.
• Implementation Data is also used for the description of interfaces between
software-components and and the basic software (namely AUTOSAR Services),
because these typically cover implementation aspects only.
• It is possible to define communication in a VFB system directly on this level if the
physical and semantical abstraction is not of interest.
• Last not least the input for the RTE generator is defined by data descriptions on
this level. This means that in case a SWC defines its data only on application level
a corresponding set of implementation data types shall be created (or generated)
as part of the ECU extract before the RTE can be generated.
c(RS_SWCT_03217)
[TPS_SWCT_01234] Base Level d The Base Type Level is used to describe the
primitive elements in terms of bits and bytes from which the implementation data is
built up. It is considered as a separate level in order to allow for reuse of the basic
types defined on this level.
These base types still do not completely determine the actual implementation on a
programming language, but they impose strong restrictions for this as they define for
example the number of bits and bytes to be used.
Depending on the use case, the base types can be defined as platform independent or
can also contain platform specific attributes (namely endianess and alignment). c()
[TPS_SWCT_01235] Mapping of data defined on the Application level to the Im-
plementation and Base Type level d It is important to understand, that the mapping
of data defined on the Application level to the Implementation and Base Type level
depends on the medium on which the data is transported.
For example, if a physical value can be expressed with sufficient accuracy and range
by a 16-bit unsigned integer, it still might look very different when sent over CAN, when
Note that in AUTOSAR R3.x the platform types are implemented manually and
could even not be expressed on ARXML model (see [SRS_Rte_00150]). In
AUTOSAR R4.1 the Platform Data Types can be represented in the ARXML
model. Subsequent releases of AUTOSAR may generate the Platform Data
Types directly from the ARXML Model.
Standard Type Defined on M1 - provided by AUTOSAR. Standard types are defined
by referring to platform types.
c(RS_SWCT_03215, RS_SWCT_03216, RS_SWCT_03217)
[TPS_SWCT_01237] SwDataDefProps d The properties of data are summarized in
the meta-class SwDataDefProps. This meta-class itself is the superset of all applica-
ble properties. c(RS_SWCT_03216, RS_SWCT_03217)
Subsets of SwDataDefProps are applicable in specific case, for a summary please
refer to the following tables:
• The data categorys are summarized in table 5.6.
• Properties for ApplicationDataTypes are summarized in table 5.7.
• Properties for ImplementationDataTypes are summarized in table 5.17.
• Properties for DataPrototypes typed by ApplicationDataTypes are sum-
marized in table 5.31.
• Properties for DataPrototypes typed by ImplementationDataTypes are
summarized in table 5.32.
• Applicability of SwDataDefProps is summarized in table 5.39.
5.2.1 Overview
ARElement «atpVariation»
AtpType +swDataDefProps SwDataDefProps
AutosarDataType
0..1
DataPrototype
DataTypeMap ModeRequestTypeMap
ApplicationCompositeElementDataPrototype
4
Class ApplicationDataType (abstract)
Subclasses ApplicationCompositeDataType, ApplicationPrimitiveDataType
Attribute Type Mul. Kind Note
– – – – –
Table 5.3: ApplicationDataType
As explained above, the concept of application data types as well as that of implemen-
tation data types can be used to instantiate a data prototype in an M1 model. However
there are use cases, especially in order to generate the RTE contract for Applica-
tionSwComponentTypes, where it is required to consider both levels for one given
data prototype.
[TPS_SWCT_01189] DataTypeMap d This is supported by the meta-class
DataTypeMap by which an ApplicationDataType and an Implementation-
DataType can be mapped to each others in order to describe both aspects of one
dataElement. c(RS_SWCT_03216, RS_SWCT_03217, RS_SWCT_03215)
Class DataTypeMap
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes
Note This class represents the relationship between ApplicationDataType and its implementing Abstract
ImplementationDataType.
Base ARObject
Attribute Type Mul. Kind Note
applicationData ApplicationDataType 1 ref This is the corresponding ApplicationDataType
Type
implementation AbstractImplementation 1 ref This is the corresponding AbstractImplementationData
DataType DataType Type.
ApplicationDataType ApplicationDataType
ImplementationDataType ImplementationDataType
shall also be
compatible
ApplicationValueSpecification
ImplementationDataTypeElement
ApplicationPrimitiveDataType
ApplicationRecordDataType
ApplicationArrayDataType
ApplicationRecordElement
ApplicationArrayElement
McDataInstance
SwSystemconst
SwServiceArg
Measurement
RTE + BSW
Calibration
3
[constr_1295] applies!
4
Category Applicable to ... Use Case Description
ApplicationValueSpecification
ImplementationDataTypeElement
ApplicationPrimitiveDataType
ApplicationRecordDataType
ApplicationArrayDataType
ApplicationRecordElement
ApplicationArrayElement
McDataInstance
SwSystemconst
SwServiceArg
Measurement
RTE + BSW
Calibration
4
Category Applicable to ... Use Case Description
ApplicationValueSpecification
ImplementationDataTypeElement
ApplicationPrimitiveDataType
ApplicationRecordDataType
ApplicationArrayDataType
ApplicationRecordElement
ApplicationArrayElement
McDataInstance
SwSystemconst
SwServiceArg
Measurement
RTE + BSW
Calibration
AtpBlueprint
AtpBlueprintable
ApplicationDataType
ApplicationCompositeDataType
ApplicationRecordElement
ApplicationArrayElement
ApplicationDataType
STRUCTURE
COM_AXIS
RES_AXIS
VAL_BLK
BOOLEAN
STRING
CUBOID
CUBE_4
CUBE_5
VALUE
ARRAY
CURVE
MAP
additionalNativeTypeQualifier
annotation x x x * * * * * * * * * * * * *
baseType
compuMethod x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
dataConstr.dataConstr-
x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
Rule.physConstrs
dataConstr.dataConstrRule.in-
ternalConstrs
x x x d/c4 d/c d/c d/c d/c d/c d/c d/c d/c
displayFormat x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
displayPresentation x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
implementationDataType
invalidValue x 0..1 0..1 0..1
stepSize x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAddrMethod x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAlignment
swBitRepresentation
swCalibrationAccess x x 0..1 0..1 0..1 0..1 0..1 0..1 1 1 1 1 1 1 1
swCalprmAxisSet x 1 1 1 1 1 1 1
swComparisonVariable
swDataDependency
swHostVariable
swImplPolicy x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIntendedResolution x x x 0..1
swInterpolationMethod x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIsVirtual
swPointerTargetProps
swRecordLayout x 0..1 0..15 0..1 1 1 1 1 1 1 1
swRefreshTiming x 0..1 0..1 0..1 0..1
swTextProps x 1
swValueBlockSize x 1
swValueBlockSizeMult x 1
unit x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
valueAxisDataType x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
Other Attributes below the Root Element
5
4
don’t care
5
This is required by [TPS_SWCT_01179].
4
element:
x x x 1..*
ApplicationRecordElement
element:
x x x 1
ApplicationArrayElement
ApplicationArrayElement.array-
x 0..1
SizeSemantics
ApplicationArrayEle-
x 1
ment.maxNumberOfElements
Class ApplicationPrimitiveDataType
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes
Note A primitive data type defines a set of allowed values.
Tags: atp.recommendedPackage=ApplicationDataTypes
Base ARElement, ARObject, ApplicationDataType, AtpBlueprint, AtpBlueprintable, AtpClassifier , AtpType,
AutosarDataType, CollectableElement, Identifiable, MultilanguageReferrable, PackageableElement,
Referrable
Attribute Type Mul. Kind Note
– – – – –
Table 5.8: ApplicationPrimitiveDataType
In contrast to prior versions (R3.x) of the AUTOSAR standard, the primitive application
data types on M2 level are no longer specified. Instead of this, the meta-class Appli-
cationPrimitiveDataType in combination with the attached swDataDefProps is
used on the level of the M2 (meta-) model to specify the details on M1 modeling level.
[TPS_SWCT_01242] category characterizes the nature of a data type on appli-
cation level d The category is used in addition to characterize the nature of a data
type on application level. c(RS_SWCT_03216)
For example, the IntegerType as of AUTOSAR R3.x allows for specifying lower and
upper ranges that constrain the applicable value interval. That aspect is still supported
by this version of AUTOSAR, but the meta-model is different from the former approach.
Especially it is no more considered of importance to specify that an Application-
PrimitiveDataType is actually represented by “integer” numbers.
Figure 5.4 provides a sketch of how limits are defined now. The key feature is the ag-
gregation of SwDataDefProps at AutosarDataType. The meta-class SwDataDef-
Props allows for creating a reference to a DataConstr that in turn aggregates a
DataConstrRule.
The latter aggregates PhysConstrs and this meta-class finally owns two Limits in
the roles lowerLimit and upperLimit.
ARElement
AtpType
AutosarDataType
+swDataDefProps 0..1
«atpVariation» AtpBlueprint
SwDataDefProps AtpBlueprintable
ApplicationDataType
+dataConstr 0..1
ARElement
ApplicationPrimitiveDataType
AtpBlueprint
AtpBlueprintable
DataConstr
+dataConstrRule 0..*
DataConstrRule
+physConstrs 0..1
PhysConstrs
ARElement AtpBlueprint
AtpType AtpBlueprintable
AutosarDataType ApplicationDataType
ApplicationPrimitiveDataType
+swDataDefProps 0..1
«atpVariation» ARElement
+compuMethod
SwDataDefProps AtpBlueprint
0..1 AtpBlueprintable
CompuMethod
+unit 0..1
ARElement
+unit
Unit
0..1
+invalidValue 0..1
ValueSpecification
Figure 5.6 illustrates the relationship between the data constraints for Application-
DataType, CompuMethod, ImplementationDataType, BaseType and also the
invalidValue for the case of an entirely linear or rational conversion.
Invalid Value
InvalidValue outside the scope of InvalidValue inside the scope of the
the CompuMethod is transparent CompuMethod is known to the
to the software-component software-component
Application
DataType Lower [unit] Upper [unit]
physConstrs of
ApplicationDataType
limits of CompuMethod
CompuMethod
computed internalConstrs of
ApplicationDataType
Implementation
DataType
internalConstrs of
ImplementationDataType
range by BaseType
BaseType
0 2n
Figure 5.6: Value ranges and invalid values for linear and rational CompuMethod
Please note that Figure 5.6 is only applicable for linear and rational CompuMethods.
Figure 5.7 and Figure 5.8 depict a similar situation for the case of mixed Com-
puMethods where the invalidValue is defined in the discrete part of a Com-
puMethod.
Invalid Value
InvalidValue appears in the textual
part of the CompuMethod and is
therefore known to the component
Application
DataType Lower [unit] Upper [unit]
physConstrs of
ApplicationDataType
limits of CompuMethod
CompuMethod
Textual Value defined as
computed internalConstrs of
part of the CompuMethod
ApplicationDataType
Implementation
DataType
internalConstrs of
ImplementationDataType
range by BaseType
BaseType
0 2n
Figure 5.7: Value ranges and invalid values with discrete invalidValue defined inside
the scope of the CompuMethod
Figure 5.7 sketches a case where a CompuMethod has a linear and a discrete part and
the invalidValue is defined by means of one value that is defined in the discrete part
of the CompuMethod.
As mentioned by [constr_1281], the invalidValue shall be defined in the physical
domain in this case. In other words, the invalidValue shall be defined by a symbol
according to [TPS_SWCT_01432].
As a consequence of the definition of an invalidValue inside the scope of a mixed
CompuMethod the invalidValue is visible to the software-component.
Invalid Value
InvalidValue does not appear in
the textual part of the
CompuMethod and is therefore
not known to the component
Application
DataType Lower [unit] Upper [unit]
physConstrs of
ApplicationDataType
limits of CompuMethod
CompuMethod
Textual Value defined as
computed internalConstrs of
part of the CompuMethod
ApplicationDataType
Implementation
DataType
internalConstrs of
ImplementationDataType
range by BaseType
BaseType
0 2n
Figure 5.8: Value ranges and invalid values with discrete invalidValue defined outside
the scope of the CompuMethod
Figure 5.8, on the other hand, sketches a case where a CompuMethod has a linear
and a discrete part and the invalidValue is not within the defined linear interval and
not defined by means of one value out of the discrete part of the CompuMethod.
As mentioned by [constr_1283], the invalidValue shall be defined in the internal
domain in this case. In other words, the invalidValue shall be defined by a Numer-
icalValueSpecification.
As a consequence of the definition of an invalidValue outside the scope of a mixed
CompuMethod the invalidValue is visible to the software-component.
If an ApplicationPrimitiveDataType does not define dataConstr then implicit
constraints can be derived from physical meaning of the ApplicationDataType.
For example, if the data type represents a temperature the lower bound will not be able
to exceed 0K.
For other physical meanings, it could be possible that the implicitly assumed limits go
from -INF to +INF.
In order to avoid ambiguity regarding the values of limits it is strongly recommended
to define a reasonable limit for ApplicationPrimitiveDataTypes.
[constr_2544] Limits need to be consistent d
«atpVariation»
SwDataDefProps
+compuMethod 0..1
ARElement
CompuContent
AtpBlueprint
AtpBlueprintable
CompuMethod
+compuContent 1
Compu CompuScales
«atpVariation»
0..*
+compuScale {ordered}
+compuDefaultValue 0..1 !"! #$!! CompuScale
%&'($&
+ mask: PositiveInteger [0..1]
CompuConst + shortLabel: Identifier [0..1]
+compuInverseValue + symbol: CIdentifier [0..1]
0..1 «atpVariation»
+ lowerLimit: Limit [0..1]
1 + upperLimit: Limit [0..1]
+compuConst
CompuConstTextContent
+ vt: VerbatimString
ARElement «atpVariation»
AtpType +swDataDefProps
SwDataDefProps
AutosarDataType
0..1 + additionalNativeTypeQualifier:
NativeDeclarationString [0..1]
+ displayFormat: DisplayFormatString [0..1]
+ displayPresentation: DisplayPresentationEnum
[0..1]
+ stepSize: Float [0..1]
AtpBlueprint + swAlignment: AlignmentType [0..1]
AtpBlueprintable + swCalibrationAccess:
ApplicationDataType SwCalibrationAccessEnum [0..1]
+ swImplPolicy: SwImplPolicyEnum [0..1]
+ swIntendedResolution: Numerical [0..1]
+ swInterpolationMethod: Identifier [0..1]
+ swIsVirtual: Boolean [0..1]
«atpVariation»
+ swValueBlockSize: Numerical [0..1]
ApplicationPrimitiveDataType
+ swValueBlockSizeMult: Numerical [0..*]
{ordered}
ARElement
SwRecordLayout +swRecordLayout
0..1
ValueSpecification
+invalidValue
+ shortLabel: Identifier [0..1]
0..1
+swTextProps 0..1
ApplicationValueSpecification SwTextProps
+baseType 0..1
AtpBlueprint
AtpBlueprintable
BaseType
SwBaseType
Class SwTextProps
Package M2::MSR::DataDictionary::DataDefProperties
Note This meta-class expresses particular properties applicable to strings in variables or calibration
parameters.
Base ARObject
Attribute Type Mul. Kind Note
5
4
Class SwTextProps
arraySize ArraySizeSemantics 1 attr This attribute controls the semantics of the arraysize for
Semantics Enum the array representing the string in an Implementation
DataType.
It is there to support a safe conversion between
ApplicationDatatype and ImplementationDatatype, even
for variable length strings as required e.g. for Support of
SAE J1939.
baseType SwBaseType 0..1 ref This is the base type of one character in the string. In
particular this baseType denotes the intended encoding of
the characters in the string on level of ApplicationData
Type.
Tags: xml.sequenceOffset=30
swFillCharacter Integer 0..1 attr Filler character for text parameter to pad up to the
maximum length swMaxTextSize.
The value will be interpreted according to the encoding
specified in the associated base type of the data object,
e.g. 0x30 (hex) represents the ASCII character zero as
filler character and 0 (dec) represents an end of string as
filler character.
The usage of the fill character depends on the arraySize
Semantics.
Tags: xml.sequenceOffset=40
swMaxTextSize Integer 1 attr Specifies the maximum text size in characters. Note the
size in bytes depends on the encoding in the
corresponding baseType.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
xml.sequenceOffset=20
<SW-DATA-DEF-PROPS-VARIANTS>
<SW-DATA-DEF-PROPS-CONDITIONAL>
<SW-TEXT-PROPS>
<ARRAY-SIZE-SEMANTICS>VARIABLE-SIZE</ARRAY-SIZE-SEMANTICS>
<SW-MAX-TEXT-SIZE>50</SW-MAX-TEXT-SIZE>
<BASE-TYPE-REF BASE="default" DEST="SW-BASE-TYPE">BaseTypes/
MyTextBaseType</BASE-TYPE-REF>
</SW-TEXT-PROPS>
<INVALID-VALUE>
<APPLICATION-VALUE-SPECIFICATION>
<CATEGORY>STRING</CATEGORY>
<SW-VALUE-CONT>
<SW-VALUES-PHYS>
<VT>inv</VT>
</SW-VALUES-PHYS>
</SW-VALUE-CONT>
</APPLICATION-VALUE-SPECIFICATION>
</INVALID-VALUE>
<SW-RECORD-LAYOUT-REF BASE="default" DEST="SW-RECORD-LAYOUT">
RecordLayouts/StringDescriptor</SW-RECORD-LAYOUT-REF>
</SW-DATA-DEF-PROPS-CONDITIONAL>
</SW-DATA-DEF-PROPS-VARIANTS>
</SW-DATA-DEF-PROPS>
</APPLICATION-PRIMITIVE-DATA-TYPE>
</ELEMENTS>
</AR-PACKAGE>
Note that the category is set to the value STRING. Also the ApplicationPrimi-
tiveDataType.swDataDefProps.swTextProps indicate the width of the string and
also define (by means of the reference to baseType) the encoding this string data type
is supposed to utilize.
Note further that the fact that an ApplicationDataType directly references (across
the implementation level) to a SwBaseType represents an exception to the rule that
ApplicationDataType should not be concerned about the lowest level of data
type definition in AUTOSAR.
If the bridging of the implementation level were accepted as a general pattern for the
modeling of ApplicationDataType it would easily be possible to bypass the imple-
mentation level to some extent and this would render ApplicationDataTypes less
versatile.
[TPS_SWCT_01128] SwRecordLayout needed for ApplicationPrimitive-
DataType of category STRING d As mentioned in [TPS_SWCT_01179], an Ap-
plicationPrimitiveDataType of category STRING is considered a Compound
Primitive Data Type.
Therefore, it needs a reference to the definition of a SwRecordLayout that presets
the approach for creating a matching ImplementationDataType. c()
In this specific example the definition of the SwRecordLayout foresees the Applica-
tionPrimitiveDataType of category STRING to be implemented as a structured
data type that consists of:
1. the size of an instance of the string data type in terms of the number of characters
plus
2. an array that can be used to store the individual characters contained in an in-
stance of the string data type.
Depending on the used encoding the array may need to be bigger (in terms of the
number of elements) than the corresponding value of the size. Furthermore, the defi-
nition of the SwRecordLayout already takes into account that the implementation of
an array data type by means of an ImplementationDataType requires the definition
of an ImplementationDataTypeElement.
The meaning of the standardized values of SwRecordLayoutV.swRecordLay-
outVProp are documented in [TPS_SWCT_01489]. In the scope of this example
the values COUNT and VALUE are used.
The fact that the swRecordLayoutGroupTo contains the value -1 means that the
iteration ends at the last element of the array.
Listing 5.2: Example for the definition of a SwRecordLayout for an ApplicationPrim-
itiveDataType of category STRING
<AR-PACKAGE>
<SHORT-NAME>RecordLayouts</SHORT-NAME>
<ELEMENTS>
<SW-RECORD-LAYOUT>
<SHORT-NAME>StringDescriptor</SHORT-NAME>
<LONG-NAME>
<L-4 L="EN">String by descriptor</L-4>
</LONG-NAME>
<INTRODUCTION>
<VERBATIM>
<L-5 L="EN" xml:space="default">
struct{
size,
char[]
}
</L-5>
</VERBATIM>
</INTRODUCTION>
<SW-RECORD-LAYOUT-GROUP>
<SW-RECORD-LAYOUT-V>
<SHORT-LABEL>size</SHORT-LABEL>
<SW-RECORD-LAYOUT-V-AXIS>STRING</SW-RECORD-LAYOUT-V-AXIS>
<SW-RECORD-LAYOUT-V-PROP>COUNT</SW-RECORD-LAYOUT-V-PROP>
</SW-RECORD-LAYOUT-V>
<SW-RECORD-LAYOUT-GROUP>
<SHORT-LABEL>chars</SHORT-LABEL>
<SW-RECORD-LAYOUT-GROUP-AXIS>STRING</SW-RECORD-LAYOUT-GROUP-AXIS>
<SW-RECORD-LAYOUT-GROUP-FROM>0</SW-RECORD-LAYOUT-GROUP-FROM>
<SW-RECORD-LAYOUT-GROUP-TO>-1</SW-RECORD-LAYOUT-GROUP-TO>
<SW-RECORD-LAYOUT-V>
<SHORT-LABEL>char</SHORT-LABEL>
<SW-RECORD-LAYOUT-V-PROP>VALUE</SW-RECORD-LAYOUT-V-PROP>
</SW-RECORD-LAYOUT-V>
</SW-RECORD-LAYOUT-GROUP>
</SW-RECORD-LAYOUT-GROUP>
</SW-RECORD-LAYOUT>
</ELEMENTS>
</AR-PACKAGE>
</SW-DATA-DEF-PROPS-CONDITIONAL>
</SW-DATA-DEF-PROPS-VARIANTS>
</SW-DATA-DEF-PROPS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
<IMPLEMENTATION-DATA-TYPE-ELEMENT>
<SHORT-NAME>string</SHORT-NAME>
<CATEGORY>ARRAY</CATEGORY>
<SUB-ELEMENTS>
<IMPLEMENTATION-DATA-TYPE-ELEMENT>
<SHORT-NAME>character</SHORT-NAME>
<CATEGORY>TYPE_REFERENCE</CATEGORY>
<ARRAY-SIZE>200</ARRAY-SIZE>
<ARRAY-SIZE-SEMANTICS>FIXED-SIZE</ARRAY-SIZE-SEMANTICS>
<SW-DATA-DEF-PROPS>
<SW-DATA-DEF-PROPS-VARIANTS>
<SW-DATA-DEF-PROPS-CONDITIONAL>
<IMPLEMENTATION-DATA-TYPE-REF DEST="IMPLEMENTATION-DATA
-TYPE">ImplementationDataTypes/uint8</IMPLEMENTATION
-DATA-TYPE-REF>
<INVALID-VALUE>
<ARRAY-VALUE-SPECIFICATION>
<ELEMENTS>
<NUMERICAL-VALUE-SPECIFICATION>
<VALUE>105</VALUE>
</NUMERICAL-VALUE-SPECIFICATION>
<NUMERICAL-VALUE-SPECIFICATION>
<VALUE>110</VALUE>
</NUMERICAL-VALUE-SPECIFICATION>
<NUMERICAL-VALUE-SPECIFICATION>
<VALUE>118</VALUE>
</NUMERICAL-VALUE-SPECIFICATION>
</ELEMENTS>
</ARRAY-VALUE-SPECIFICATION>
</INVALID-VALUE>
</SW-DATA-DEF-PROPS-CONDITIONAL>
</SW-DATA-DEF-PROPS-VARIANTS>
</SW-DATA-DEF-PROPS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
</SUB-ELEMENTS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
</SUB-ELEMENTS>
</IMPLEMENTATION-DATA-TYPE>
</ELEMENTS>
</AR-PACKAGE>
Please note that the size of the payload array in the the definition of the Implementa-
tionDataType in Listing 5.3 has been set to the value 200 in order to accommodate
for the definition of swMaxTextSize in the definition of the corresponding Applica-
tionDataType in combination with the fact that the value of baseTypeEncoding
has been set to UTF-8.
For background, the value of attribute SwTextProps.swMaxTextSize shall be spec-
ified as the number of code points in the string.
Each code point will be encoded by a sequence of bytes, depending on the applicable
encoding. In the case of UTF-8, for example, each code point will be encoded by up
to four bytes.
On the level of ImplementationDataType, an array designed to hold a string con-
sisting of code points encoded using UTF-8 needs to be big enough to carry the num-
ber of code points (which may have been described by SwTextProps.swMaxText-
Size) times 4 bytes.
The interesting part about this definition is the fact that on the implementation level, it
was (driven by the definition of the SwRecordLayout) decided to implement the string
as a structure of a size element (that goes by the shortName “size”) and a value
element (that goes by the shortName “string”) which in turn is defined as an array
data type and therefore has a sub-element that goes by the shortName “character”.
The latter references (in the role swDataDefProps.implementationDataType)
the Platform Data Type “uint8” (that, according to the rules of Platform Data
Types, is realized by an ImplementationDataType “uint8”).
Please note that the ApplicationPrimitiveDataType named “MyApplication-
StringType” references the SwBaseType named “MyTextBaseType” which is defined
in the following XML fragment:
Listing 5.4: Example for the definition of a string SwBaseType
<AR-PACKAGE>
<SHORT-NAME>BaseTypes</SHORT-NAME>
<ELEMENTS>
<SW-BASE-TYPE>
<SHORT-NAME>MyTextBaseType</SHORT-NAME>
<CATEGORY>FIXED_LENGTH</CATEGORY>
<BASE-TYPE-SIZE>8</BASE-TYPE-SIZE>
<BASE-TYPE-ENCODING>UTF-8</BASE-TYPE-ENCODING>
</SW-BASE-TYPE>
<SW-BASE-TYPE>
<SHORT-NAME>uint8BaseType</SHORT-NAME>
<CATEGORY>FIXED_LENGTH</CATEGORY>
<BASE-TYPE-SIZE>8</BASE-TYPE-SIZE>
</SW-BASE-TYPE>
</ELEMENTS>
</AR-PACKAGE>
<DATA-TYPE-MAPS>
<DATA-TYPE-MAP>
<APPLICATION-DATA-TYPE-REF BASE="default" DEST="APPLICATION-
PRIMITIVE-DATA-TYPE">ApplicationDataTypes/
MyApplicationStringType</APPLICATION-DATA-TYPE-REF>
<IMPLEMENTATION-DATA-TYPE-REF BASE="default" DEST="IMPLEMENTATION
-DATA-TYPE">ImplementationDataTypes/MyImplementationStringType
</IMPLEMENTATION-DATA-TYPE-REF>
</DATA-TYPE-MAP>
</DATA-TYPE-MAPS>
</DATA-TYPE-MAPPING-SET>
</ELEMENTS>
</AR-PACKAGE>
ARElement
AtpType
AutosarDataType
AtpBlueprint
AtpBlueprintable
ApplicationDataType
ApplicationCompositeDataType
ApplicationArrayDataType ApplicationRecordDataType
«atpVariation»
1..*
+element 1 +element {ordered}
ApplicationCompositeElementDataPrototype ApplicationCompositeElementDataPrototype
ApplicationArrayElement ApplicationRecordElement
«enumeration» «enumeration»
ArraySizeHandlingEnum ArraySizeSemanticsEnum
allIndicesSameArraySize fixedSize
allIndicesDifferentArraySize variableSize
inheritedFromArrayElementTypeSize
5.2.4.2.1 ApplicationArrayDataType
Class ApplicationArrayDataType
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes
Note An application data type which is an array, each element is of the same application data type.
Tags: atp.recommendedPackage=ApplicationDataTypes
Base ARElement, ARObject, ApplicationCompositeDataType, ApplicationDataType, AtpBlueprint, Atp
Blueprintable, AtpClassifier , AtpType, AutosarDataType, CollectableElement, Identifiable, Multilanguage
Referrable, PackageableElement, Referrable
Attribute Type Mul. Kind Note
dynamicArray String 0..1 attr Specifies the profile which the array will follow if it is a
SizeProfile variable size array.
element ApplicationArray 1 aggr This association implements the concept of an array
Element element. That is, in some cases it is necessary to be able
to identify single array elements, e.g. as input values for
an interpolation routine.
Class ApplicationArrayElement
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes
Note Describes the properties of the elements of an application array data type.
Base ARObject, ApplicationCompositeElementDataPrototype, AtpFeature, AtpPrototype, DataPrototype,
Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
arraySize ArraySizeHandling 0..1 attr The way how the size of the array is handled.
Handling Enum
arraySize ArraySizeSemantics 0..1 attr This attribute controls how the information about the array
Semantics Enum size shall be interpreted.
indexDataType ApplicationPrimitive 0..1 ref This reference can be taken to assign a CompuMethod of
DataType category TEXTTABLE to the array. The texttable entries
associate a textual value to an index number such that
the element with that index number is represented by a
symbolic name.
maxNumberOf PositiveInteger 0..1 attr The maximum number of elements that the array can
Elements contain.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
Please note that the information about the number of elements of a specific Appli-
cationArrayDataType is not absolute but allows for further interpretation.
[TPS_SWCT_01076] Number of elements of a specific ApplicationArray-
DataType might vary at run-time d That is, there are cases where the number of
elements of a specific ApplicationArrayDataType might vary at run-time.
To be precise, the number of elements might vary between 0 and the value denoted by
maxNumberOfElements.
For this purpose an additional attribute arraySizeSemantics is available that can
be used to clarify the meaning of maxNumberOfElements.
For clarification, it might indeed happen that the actual number of elements in a specific
ApplicationArrayDataType yields 0 simply because the respective DataProto-
type is part of a higher-level protocol where under certain circumstances the Dat-
aPrototype of ApplicationArrayDataType is simply not required for expressing
a given semantics. c(RS_SWCT_03180, RS_SWCT_03181, RS_SWCT_03144)
[TPS_SWCT_01752] Initialization of a variable-size array d If a DataProto-
type typed by an ApplicationArrayDataType where attribute arraySizeSe-
mantics set to the value variableSize is initialized by an ArrayValueSpecifi-
cation that does not aggregate an element then the semantics shall be that the
DataPrototype is initialized as empty. c(RS_SWCT_03180, RS_SWCT_03181,
RS_SWCT_03144)
Enumeration ArraySizeSemanticsEnum
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note This type controls how the information about the number of elements in an ApplicationArrayDataType
is to be interpreted.
Literal Description
fixedSize This means that the ApplicationArrayDataType will always have a fixed number of elements.
Tags: atp.EnumerationValue=0
variableSize This implies that the actual number of elements in the ApplicationArrayDataType might vary at
run-time. The value of arraySize represents the maximum number of elements in the array.
Tags: atp.EnumerationValue=1
Please note that the ability to define the semantic meaning of maxNumberOfEle-
ments is not only limited to the application data type level. The same approach also
applies for ImplementationDataType.
[constr_1152] category of ApplicationArrayElement and AutosarDataType
referenced in the role type shall be kept in sync d The value of category of an
ApplicationArrayElement shall always be identical to the value of category of
the AutosarDataType referenced by the ApplicationArrayElement. c()
[TPS_SWCT_01601] Size Indicator shall be updated by software-component
d If a software-component changes the number of valid elements in a variable size
array, it shall also update the Size Indicator in the ImplementationDataType.
c(RS_SWCT_03181)
[TPS_SWCT_01602] Size Indicator shall be read by the software-component
d If a software-component receives a variable size array, it shall use the Size Indi-
cator in the ImplementationDataType to determine the number of valid elements
in the array. c(RS_SWCT_03181)
Enumeration ArraySizeHandlingEnum
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes
Note This enumeration defines different ways to handle the sizes of variable size arrays.
Literal Description
allIndicesDifferent All elements of the variable size array may have different sizes.
ArraySize
Tags: atp.EnumerationValue=0
allIndicesSame All elements of the variable size array have the same size.
ArraySize
Tags: atp.EnumerationValue=1
inheritedFromArray The size of all dimensions of the variable size array is determined by the size of the contained array
ElementTypeSize element.
Tags: atp.EnumerationValue=2
As it is a general rule for the definition of custom profiles or values of category, the
custom value should start with a company-specific prefix in order to avoid clashes with
later extensions of the AUTOSAR standard.
dynamicArraySizeProfile is used to specify how the number of elements of the
multiple dimensions of a variable size array correlate. They could be totally indepen-
dent (VSA_FULLY_FLEXIBLE) on the one hand or each dimension has the same num-
ber of valid elements (VSA_SQUARE).
[TPS_SWCT_01623] Justification for the existence of attributes Application-
ArrayDataType.dynamicArraySizeProfile and ApplicationArrayEle-
ment.arraySizeHandling d At the first glance, the two attributes Application-
ArrayDataType.dynamicArraySizeProfile and ApplicationArrayEle-
ment.arraySizeHandling seem equivalent.
However, both are needed because they have to be used if multi dimensional variable
size arrays have to be described. In this case, multiple combinations of sizes could
occur which cannot be specified beforehand. c(RS_SWCT_03181)
The ImplementationDataType has to follow certain rules depending on the chosen
profile. See chapter 5.2.5 for details.
[constr_1314] Profile VSA_LINEAR for ApplicationArrayDataType d If
the dynamicArraySizeProfile of ApplicationArrayDataType is set to
VSA_LINEAR, the contained ApplicationArrayElement shall fulfill all of the fol-
lowing conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall set
to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesSameArraySize.
• The ApplicationArrayElement shall be typed by an Application-
DataType that is not an ApplicationArrayDataType where the attribute
dynamicArraySizeProfile exists.
c()
The part of [constr_1314] that demands that the ApplicationArrayElement
shall be typed by an ApplicationDataType that is not an ApplicationArray-
DataType where the attribute dynamicArraySizeProfile exists basically boils
down to the simple explanation that the “leaf” data type of the Variable-Size Ar-
ray Data Type can be anything but a Variable-Size Array Data Type.
[constr_1315] Profile VSA_SQUARE for ApplicationArrayDataType d If
the dynamicArraySizeProfile of ApplicationArrayDataType is set to
VSA_SQUARE, the contained ApplicationArrayElement shall fulfill all of the fol-
lowing conditions:
that the “leaf” data type of the Variable-Size Array Data Type can be anything
but a Variable-Size Array Data Type.
[constr_1316] Profile VSA_RECTANGULAR for ApplicationArrayDataType d
If the dynamicArraySizeProfile of ApplicationArrayDataType is set to
VSA_RECTANGULAR the contained ApplicationArrayElement shall fulfill all of the
following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall be
set to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesSameArraySize.
• The ApplicationArrayElement shall be typed by an ApplicationArray-
DataType.
The referred ApplicationArrayDataType shall refer over a chain (under consid-
eration of the number of dimensions of the “root” ApplicationArrayDataType) of
nested ApplicationArrayDataTypes with ApplicationArrayElements to an
ApplicationDataType that is not an ApplicationArrayDataType where the
attribute dynamicArraySizeProfile exists.
The last ApplicationArrayDataType in that chain shall have an Application-
ArrayElement that fulfills all of the following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall be
set to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesSameArraySize.
All ApplicationArrayDataTypes before shall have an ApplicationArrayEle-
ment that fulfills all of the following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall set
to the value variableSize
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesSameArraySize.
• The ApplicationArrayElement shall be typed by an ApplicationArray-
DataType.
c()
[constr_1317] Profile VSA_FULLY_FLEXIBLE for ApplicationArrayDataType
d If the dynamicArraySizeProfile of ApplicationArrayDataType is set to
VSA_FULLY_FLEXIBLE, the contained ApplicationArrayElement shall fulfill all
of the following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall be
set to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesDifferentArraySize.
• The ApplicationArrayElement shall be typed by an ApplicationArray-
DataType.
The referred ApplicationArrayDataType shall refer over a chain (under consid-
eration of the number of dimensions of the “root” ApplicationArrayDataType) of
nested ApplicationArrayDataTypes with ApplicationArrayElements to an
ApplicationDataType that is not an ApplicationArrayDataType where the
attribute dynamicArraySizeProfile exist.
The last ApplicationArrayDataType in that chain shall have an Application-
ArrayElement that fulfills all of the following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall be
set to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesSameArraySize.
All ApplicationArrayDataTypes before shall have an ApplicationArrayEle-
ment that fulfills all of the following conditions:
• The attribute ApplicationArrayElement.arraySizeSemantics shall be
set to the value variableSize.
• The attribute ApplicationArrayElement.maxNumberOfElements shall be
defined.
• The attribute ApplicationArrayElement.arraySizeHandling shall be set
to the value allIndicesDifferentArraySize.
• The ApplicationArrayElement shall be typed by an ApplicationArray-
DataType.
c()
+type
BOOLEAN_true_false_SysConDim2_SysConDim3:
ApplicationArrayDataType
category = ARRAY
+element +subElement
+type
BOOLEAN_true_false_SysConDim3: ApplicationArrayDataType
category = ARRAY
+element +subElement
+swDataDefProps
«atpVariation»
:SwDataDefProps
+type +implementationDataType
BOOLEAN_true_false: boolean:
ApplicationPrimitiveDataType ImplementationDataType
DefaultDataTypeMapping:
category = BOOLEAN DataTypeMappingSet category = VALUE
+dataTypeMap
:DataTypeMap
Figure 5.12 shows a three dimensional array described with a set of Application-
ArrayDataTypes on the left hand side. The array element is typed by an Applica-
tionPrimitiveDataType of category BOOLEAN. On the right hand side the im-
plementation of the three dimensional array is described with an Implementation-
DataType which contains three nested ImplementationDataTypeElements.
The usage of an array represents an elegant way to group data with identical proper-
ties. This allows for an easy processing of the same functionality by iterating over the
array elements.
From a functional point of view, however, each array element may have a distinct mean-
ing that could be visible to the application software. To create this visibility, it is possible
to take advantage of an existing mechanism: CompuMethods of category TEXT-
TABLE.
[TPS_SWCT_01699] Usage of ApplicationArrayElement.indexDataType d
The primary use case of the attribute ApplicationArrayElement.index-
DataType is the creation of composite data type mappings or the description of mea-
surement and calibration. Furthermore, the information could be used for documenta-
tion purposes. c(RS_SWCT_03230)
«atpVariation»
SwDataDefProps
+compuMethod 0..1
ARElement AtpBlueprint
AtpBlueprint AtpBlueprintable
AtpBlueprintable ApplicationDataType
CompuMethod
ApplicationCompositeDataType
ApplicationArrayDataType
+element 1
ApplicationCompositeElementDataPrototype
ApplicationPrimitiveDataType
ApplicationArrayElement
+indexDataType
+ arraySizeHandling: ArraySizeHandlingEnum [0..1]
+ arraySizeSemantics: ArraySizeSemanticsEnum [0..1] 0..1
«atpVariation»
+ maxNumberOfElements: PositiveInteger [0..1]
<COMPU-CONST>
<VT>Cylinder4</VT>
</COMPU-CONST>
</COMPU-SCALE>
</COMPU-SCALES>
</COMPU-INTERNAL-TO-PHYS>
</COMPU-METHOD>
5.2.4.2.2 ApplicationRecordDataType
Class ApplicationRecordElement
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes
Note Describes the properties of one particular element of an application record data type.
Base ARObject, ApplicationCompositeElementDataPrototype, AtpFeature, AtpPrototype, DataPrototype,
Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
isOptional Boolean 0..1 attr This attribute represents the ability to declare the
enclosing ApplicationRecordElement as optional. This
means the that, at runtime, the ApplicationRecord
Element may or may not have a valid value and shall
therefore be ignored.
5
5
4
Class ApplicationRecordElement
4
The underlying runtime software provides means to set
the ApplicationRecordElement as not valid at the sending
end of a communication and determine its validity at the
receiving end.
Tags: atp.Status=draft
ImplementationDataTypeElement
ImplementationDataType
SwPointerTargetProps
FUNCTION_REFERENCE
DATA_REFERENCE
TYPE_REFERENCE
SwServiceArg
STRUCTURE
VALUE
UNION
ARRAY
additionalNativeTypeQualifier x x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
annotation x x x x * * * * * * *
baseType x x x x 1
compuMethod x x x x 0..1 0..1
dataConstr.dataConstrRule.physConstrs x x x x d/c7 d/c d/c
dataConstr.dataConstrRule.internalConstrs x x x x 0..1 0..1 0..1
displayFormat x x 0..1 0..1 0..1 0..1
displayPresentation x x 0..1 0..1
implementationDataType x x x x 1
invalidValue x x x 0..1 0..1 0..18 0..19
stepSize x x 0..1
swAddrMethod x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAlignment x 0..1 0..1 0..1 0..1 0..1 0..1
swBitRepresentation
swCalibrationAccess x x 0..1 0..1 0..1 0..1 0..1
swCalprmAxisSet
swComparisonVariable
swDataDependency
swHostVariable
swImplPolicy x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIntendedResolution
swInterpolationMethod
swIsVirtual
swPointerTargetProps x x x x 1 1
swPointerTargetProps
x x x x 1
.swDataDefProps
swPointerTargetProps
x x x x 1
.functionPointerSignature
swRecordLayout
swRefreshTiming x x x x 0..1 0..1 0..1 0..1
5
7
don’t care
8
There is a use case for the definition of an invalidValue for category ARRAY and therefore
category STRUCTURE is also supported for the sake of symmetry.
9
This represents an exception such that it would make sense to use an entire ArrayValueSpeci-
fication as the invalidValue because a string semantically is more than just a bunch of characters
in a row.
4
Attributes of SwDataDefProps Root Element Attribute Existence per Category
ImplementationDataTypeElement
ImplementationDataType
SwPointerTargetProps
FUNCTION_REFERENCE
DATA_REFERENCE
TYPE_REFERENCE
SwServiceArg
STRUCTURE
VALUE
UNION
ARRAY
swTextProps
swValueBlockSize
swValueBlockSizeMult
unit
valueAxisDataType
Other Attributes
subElement: ImplementationDataTypeElement x x 1..* 1..* 1
subElement.arraySizeSemantics x x 0..1
subElement.arraySize x x 1
[TPS_SWCT_01251] Limited set of values for category are applicable for Im-
plementationDataType d Like any AutosarDataType, also the data types on im-
plementation level are characterized by its category and its SwDataDefProps. For
a given category, only a limited set of attributes of the SwDataDefProps makes
sense. c(RS_SWCT_03217)
[constr_1009] SwDataDefProps applicable to ImplementationDataTypes d A
complete list of the SwDataDefProps and other attributes and their multiplicities which
are allowed for a given category is shown in table 5.17. c()
This list makes use of the SwDataDefProps and other meta-model elements which
are explained in detail in the further sections of this chapter.
Regulations regarding the applicable categorys for attribute Implementation-
DataType.swDataDefProps.compuMethod can be found in [constr_1158] inside
section 5.5.1.3.2.
[constr_1383] Existence of CompuMethod and DataConstr for Implementa-
tionDataTypes of category TYPE_REFERENCE d The existence of Imple-
mentationDataType.swDataDefProps.compuMethod and Implementation-
DataType.swDataDefProps.dataConstr for ImplementationDataTypes of
category TYPE_REFERENCE is only allowed if the respective Implementation-
DataType, after all type references are resolved, ends up in an Implementation-
DataType of category VALUE. c()
ImplementationProps
ImplementationDataType
+symbolProps SymbolProps
+ dynamicArraySizeProfile: String [0..1]
+ isStructWithOptionalElement: Boolean [0..1] «atpSplitable» 0..1
+ typeEmitter: NameToken [0..1]
AtpStructureElement
Identifiable
AbstractImplementationDataTypeElement «atpVariation»
0..*
{ordered} +subElement
+subElement
ImplementationDataTypeElement 0..* {ordered}
+ arraySizeHandling: ArraySizeHandlingEnum [0..1]
+ arraySizeSemantics: ArraySizeSemanticsEnum [0..1]
+ isOptional: Boolean [0..1] «atpVariation»
«atpVariation»
+ arraySize: PositiveInteger [0..1]
«enumeration» «enumeration»
ArraySizeHandlingEnum ArraySizeSemanticsEnum
allIndicesSameArraySize fixedSize
allIndicesDifferentArraySize variableSize
inheritedFromArrayElementTypeSize
Class ImplementationDataType
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note Describes a reusable data type on the implementation level. This will typically correspond to a typedef in
C-code.
Tags: atp.recommendedPackage=ImplementationDataTypes
Base ARElement, ARObject, AbstractImplementationDataType, AtpBlueprint, AtpBlueprintable, AtpClassifier ,
AtpType, AutosarDataType, CollectableElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Attribute Type Mul. Kind Note
dynamicArray String 0..1 attr Specifies the profile which the array will follow in case this
SizeProfile data type is a variable size array.
isStructWith Boolean 0..1 attr This attribute is only valid if the attribute category is set to
Optional STRUCTURE.
Element
If set to True, this attribute indicates that the
ImplementationDataType has been created with the
intention to define at least one element of the structure as
optional.
Tags: atp.Status=draft
subElement (or- ImplementationData * aggr Specifies an element of an array, struct, or union data
dered) TypeElement type.
The aggregation of ImplementionDataTypeElement is
subject to variability with the purpose to support the
conditional existence of elements inside a Implementation
DataType representing a structure.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
symbolProps SymbolProps 0..1 aggr This represents the SymbolProps for the Implementation
DataType.
Stereotypes: atpSplitable
Tags: atp.Splitkey=shortName
typeEmitter NameToken 0..1 attr This attribute is used to control which part of the
AUTOSAR toolchain is supposed to trigger data type
definitions.
Table 5.18: ImplementationDataType
• If the value of attribute typeEmitter is set to anything else but “RTE” the RTE
generator shall silently not generate the corresponding data type definition re-
gardless of the existence of nativeDeclaration attribute.
c(RS_SWCT_03217)
Note that the rules listed above imply that the allowed values of the attribute type-
Emitter are not constrained with the singular exception that the definition of the be-
havior in case of “RTE” is claimed by AUTOSAR. Other values can be provided; the
consequences of this provision are implementation-dependent and outside the scope
of the definition of the AUTOSAR standard.
The usage of ImplementationDataTypes within an AnyInstanceRef is described
in detail in [11].
[TPS_SWCT_01248] Nested definition of ImplementationDataType d If an Im-
plementationDataTypeElement also represents a composite data type it can ag-
gregate ImplementationDataTypeElements in the role of subElement. Again,
the type-prototype pattern does not apply in this case. c(RS_SWCT_03217)
[constr_1106] Structure shall have at least one element d An Implementation-
DataType or ImplementationDataTypeElement of category STRUCTURE shall
own at least one ImplementationDataTypeElement. c()
[constr_1107] Union shall have at least one element d An Implementation-
DataType or ImplementationDataTypeElement of category UNION shall own
at least one ImplementationDataTypeElement. c()
Class ImplementationDataTypeElement
Package M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes
Note Declares a data object which is locally aggregated. Such an element can only be used within the scope
where it is aggregated.
This element either consists of further subElements or it is further defined via its swDataDefProps.
There are several use cases within the system of ImplementationDataTypes fur such a local declaration:
• It can represent the elements of an array, defining the element type and array size
• It can represent an element of a struct, defining its type
• It can be the local declaration of a debug element.
Base ARObject, AbstractImplementationDataTypeElement, AtpClassifier , AtpFeature, AtpStructureElement,
Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
arraySize PositiveInteger 0..1 attr The existence of this attributes (if bigger than 0) defines
the size of an array and declares that this Implementation
DataTypeElement represents the type of each single
array element.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
arraySize ArraySizeHandling 0..1 attr The way how the size of the array is handled in case of a
Handling Enum variable size array.
5
4
Class ImplementationDataTypeElement
arraySize ArraySizeSemantics 0..1 attr This attribute controls the meaning of the value of the
Semantics Enum array size.
isOptional Boolean 0..1 attr This attribute represents the ability to declare the
enclosing ImplementationDataTypeElement as optional.
This means that, at runtime, the ImplementationDataType
Element may or may not have a valid value and shall
therefore be ignored.
The underlying runtime software provides means to set
the CppImplementationDataTypeElement as not valid at
the sending end of a communication and determine its
validity at the receiving end.
Tags: atp.Status=draft
subElement (or- ImplementationData * aggr Element of an array, struct, or union in case of a nested
dered) TypeElement declaration (i.e. without using "typedefs").
The aggregation of ImplementionDataTypeElement is
subject to variability with the purpose to support the
conditional existence of elements inside a Implementation
DataType representing a structure.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
swDataDef SwDataDefProps 0..1 aggr The properties of this ImplementationDataTypeElement.
Props
MySimpleType: MyPointerType:
ImplementationDataType ImplementationDataType
:SwDataDefProps
:SwPointerTargetProps
targetCategory = TYPE_REFERENCE
:SwDataDefProps :SwDataDefProps
uint16: SwBaseType
category = FIXED_LENGTH
:BaseTypeDirectDefinition
baseTypeEncoding = NONE
nativeDeclaration = unsigned short
MyStructType: ImplementationDataType
category = STRUCTURE
:SwDataDefProps :SwDataDefProps
:BaseTypeDirectDefinition
baseTypeEncoding = NONE
nativeDeclaration = unsigned short
swImplPolicy = const
:BaseTypeDirectDefinition :BaseTypeDirectDefinition
The allowed existence and multiplicity of all the attributes of SwDataDefProps and
other properties depend on the category of the ImplementationDataType.
ARElement
AtpType
AutosarDataType
AtpBlueprint
AtpBlueprintable
AbstractImplementationDataType
0..1 +implementationDataType
ImplementationDataType
«atpVariation» «atpSplitable»
+subElement 0..*
0..* {ordered} +subElement {ordered} +symbolProps 0..1
AbstractImplementationDataTypeElement ImplementationProps
ImplementationDataTypeElement SymbolProps
ARElement «atpVariation»
AtpBlueprint +swAddrMethod SwDataDefProps
AtpBlueprintable
SwAddrMethod 0..1 + additionalNativeTypeQualifier: NativeDeclarationString [0..1]
+ displayFormat: DisplayFormatString [0..1]
+ displayPresentation: DisplayPresentationEnum [0..1]
+ stepSize: Float [0..1]
+ swAlignment: AlignmentType [0..1]
+ swCalibrationAccess: SwCalibrationAccessEnum [0..1]
SwBitRepresentation +swBitRepresentation + swImplPolicy: SwImplPolicyEnum [0..1]
+ swIntendedResolution: Numerical [0..1]
+ bitPosition: Integer [0..1] 0..1 + swInterpolationMethod: Identifier [0..1]
+ numberOfBits: Integer [0..1]
+ swIsVirtual: Boolean [0..1]
«atpVariation»
+ swValueBlockSize: Numerical [0..1]
+ swValueBlockSizeMult: Numerical [0..*] {ordered}
AtpBlueprint
AtpBlueprintable +baseType
BaseType
0..1
SwBaseType
0..1 +swDataDefProps
+swPointerTargetProps 0..1
ARElement
SwPointerTargetProps
AtpBlueprint
+functionPointerSignature
AtpBlueprintable + targetCategory: Identifier [0..1]
BswModuleEntry 0..1
A
• baseType
• swPointerTargetProps
• implementationDataType
c()
Please note that an ImplementationDataType manifests itself in the source code
of an RTE into which a DataPrototype typed by the ImplementationDataType
is deployed. This implies potential naming conflicts if ImplementationDataTypes
that have identical shortNames are deployed into a specific RTE.
[TPS_SWCT_01194] Symbolic name of an ImplementationDataType d To mit-
igate this potential hazard it is possible to provide the ImplementationDataType
along with an accompanying symbolic name that can be used for resolving the name
clash. The symbolic name is provided by means of the attribute symbol of the
meta-class SymbolProps owned by ImplementationDataType in the role sym-
bolProps. c()
For more information about symbolProps, please refer to Figure 5.14.
[TPS_SWCT_01441] Nature of a TYPE_REFERENCE d A type reference (formally rep-
resented by an ImplementationDataType of category TYPE_REFERENCE) imple-
ments a redirection to common ImplementationDataTypes. c()
[TPS_SWCT_01442] ImplementationDataType of category TYPE_REFERENCE
does not define own properties d As long as an ImplementationDataType of
category TYPE_REFERENCE does not define own properties the properties of the
refined ImplementationDataType apply. c()
[TPS_SWCT_01443] ImplementationDataType of category TYPE_REFERENCE
overwrites properties of refined ImplementationDataType d If an implementa-
tion data types of category TYPE_REFERENCE defines own properties (e.g. Com-
puMethod) this properties overwrite the properties of the refined Implementation-
DataType. c()
As explained by [constr_1050], Compatibility checks of ImplementationDataType
require a prior resolution of possible type references, i.e. the compatibility shall be
checked on the resolved ImplementationDataType.
Referrable
ImplementationProps
+ symbol: CIdentifier
Class SymbolProps
Package M2::AUTOSARTemplates::SWComponentTemplate::Components
Note This meta-class represents the ability to attach with the symbol attribute a symbolic name that is conform
to C language requirements to another meta-class, e.g. AtomicSwComponentType, that is a potential
subject to a name clash on the level of RTE source code.
Base ARObject, ImplementationProps, Referrable
Attribute Type Mul. Kind Note
– – – – –
Table 5.22: SymbolProps
[TPS_SWCT_01759] Use cases for unions d There are different use cases for the
definition of a union data type:
1. The DataPrototypes derived from the union data type shall be transported
over a communication network. For this purpose, it is necessary to apply a
special modeling in the form of a wrapped union data type, as explained by
[TPS_SWCT_01700].
2. The DataPrototypes created from the union data type are used internally
within the same ECU, e.g. as a PerInstanceMemory, romBlock, or ram-
Block. In this case the modeling of the union data type does not depend on
specific constraints.
c()
In summary, there are cases where unions can be used in PortInterfaces, but
these are restricted to the fulfillment of certain conditions that are explained in [con-
str_1607].
[constr_1607] Only Wrapped Union Data Types in PortInterface d Within the
scope of a PortInterface the usage of a Union data type is only supported
• for Wrapped Union Data Types.
• for a PortInterface that is used to type a PortPrototype that does not
appear as a context in an instanceRef owned by a DataMapping. See also
[1441].
c()
Please note that the content of this chapter has draft character
The definition of an ImplementationDataType that represents an Optional El-
ement Structure shall not only rely on the existence of optional elements.
Also the definition of the enclosing ImplementationDataType shall clearly signal
the intention by means of the dedicated attribute ImplementationDataType.is-
StructWithOptionalElement.
[TPS_SWCT_01772]{DRAFT} Semantics of attribute Implementation-
DataType.isStructWithOptionalElement d If attribute Implementation-
DataType.isStructWithOptionalElement is set to True then the Implemen-
tationDataType advertises the intention to represent an Optional Element
Structure such that the fulfillment of structural requirements for the existence of
optional elements can be formally checked.
Again, this attribute represents a formal specification that optionality is intended as
opposed to an ImplementationDataType that fulfills the structural requirements
out of different motivations. c(RS_SWCT_03320)
[TPS_SWCT_01773]{DRAFT} Definition of Optional Element Structure on
the level of ImplementationDataType d The modeling approach for the definition
of an Optional Element Structure on the level of ImplementationDataType
is to set the attribute ImplementationDataTypeElement.isOptional to the value
True.
If the attribute is not set or set to the value False then the respective Implementa-
tionDataTypeElement shall be considered mandatory. c(RS_SWCT_03320)
[constr_1637]{DRAFT} Existence of ImplementationDataTypeElement.isOp-
tional vs. ImplementationDataType.isStructWithOptionalElement d If
one ImplementationDataType.subElement sets attribute isOptional to the
value True then the enclosing ImplementationDataType shall also set attribute
isStructWithOptionalElement to True. c()
In order to be able to generate a proper RTE API for the access to optional elements of
data types in general it is necessary to impose structural requirements on the definition
of ImplementationDataType.
In particular, it is necessary at runtime to store the information about the availability
of a specific ImplementationDataTypeElement where attribute isOptional has
been set to the value True in the context of an ImplementationDataType of cat-
egory STRUCTURE.
Please note that nativeDeclaration shall yield a valid C data type symbol, whether
this is done by a typedef or a by using the symbol12 of an integral data type is princi-
pally all the same.
Of course, using the symbol of an integral data type as the value of nativeDeclara-
tion increases the odds that the enclosing SwBaseType can be used independently
of the availability of the definition of a typedef that may or may not be available in a
given context.
[TPS_SWCT_01563] Applicable values for nativeDeclaration d For the purpose
of avoiding portability issues the value nativeDeclaration should only consist of
the symbol of an integral C data type. c()
For more information on this refer to [22].
[TPS_SWCT_01263] Further use cases for SwBaseType d Within the basic software
description, SwBaseType can be used (together with ImplementationDataTypes)
for documentation or to specify variables for debugging. Furthermore, SwBaseTypes
are required in the generation of support data for measurement and calibration tools.
Please refer to [6] for details on these use cases. c()
A more detailed description of BaseTypes can also be found in ASAM MCD 2 Harmo-
nized Data Objects.13
Class BaseType (abstract)
Package M2::MSR::AsamHdo::BaseTypes
Note This abstract meta-class represents the ability to specify a platform dependant base type.
Base ARElement, ARObject, CollectableElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Subclasses SwBaseType
Attribute Type Mul. Kind Note
baseType BaseTypeDefinition 1 aggr This is the actual definition of the base type.
Definition
Tags: xml.roleElement=false
xml.roleWrapperElement=false
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
12
The symbol does not necessarily have to consist of a single token, i.e. for all intents and purposes
(for example) unsigned char is also considered the symbol of an integral C data type.
13
The definition of Harmonized Data Objects can be retrieved from ASAM at www.asam.net. Access
is limited to ASAM members.
Class SwBaseType
Package M2::MSR::AsamHdo::BaseTypes
Note This meta-class represents a base type used within ECU software.
Tags: atp.recommendedPackage=BaseTypes
Base ARElement, ARObject, AtpBlueprint, AtpBlueprintable, BaseType, CollectableElement, Identifiable,
MultilanguageReferrable, PackageableElement, Referrable
Attribute Type Mul. Kind Note
– – – – –
Table 5.24: SwBaseType
Class BaseTypeDirectDefinition
Package M2::MSR::AsamHdo::BaseTypes
Note This BaseType is defined directly (as opposite to a derived BaseType)
Base ARObject, BaseTypeDefinition
Attribute Type Mul. Kind Note
baseType BaseTypeEncoding 1 attr This specifies, how an object of the current BaseType is
Encoding String encoded, e.g. in an ECU within a message sequence.
Tags: xml.sequenceOffset=90
baseTypeSize PositiveInteger 0..1 attr Describes the length of the data type specified in the
container in bits.
Tags: xml.sequenceOffset=70
byteOrder ByteOrderEnum 0..1 attr This attribute specifies the byte order of the base type.
Tags: xml.sequenceOffset=110
memAlignment PositiveInteger 0..1 attr This attribute describes the alignment of the memory
object in bits. E.g. "8" specifies, that the object in
question is aligned to a byte while "32" specifies that it is
aligned four byte. If the value is set to "0" the meaning
shall be interpreted as "unspecified".
Tags: xml.sequenceOffset=100
native NativeDeclarationString 0..1 attr This attribute describes the declaration of such a base
Declaration type in the native programming language, primarily in the
Programming language C. This can then be used by a
code generator to include the necessary declarations into
a header file. For example
BaseType with
shortName: "MyUnsignedInt"
nativeDeclaration: "unsigned short"
5
5
4
Class BaseTypeDirectDefinition
4
Results in
ARElement
BaseType
+baseTypeDefinition 1
AtpBlueprint
BaseTypeDefinition
AtpBlueprintable
SwBaseType
BaseTypeDirectDefinition
+ baseTypeEncoding: BaseTypeEncodingString
+ baseTypeSize: PositiveInteger [0..1]
+ byteOrder: ByteOrderEnum [0..1]
+ memAlignment: PositiveInteger [0..1]
+ nativeDeclaration: NativeDeclarationString [0..1]
• The attribute baseTypeEncoding specifies how the values of the base type are
encoded.
[constr_1014] Supported value encodings for SwBaseType d The supported
values for attribute BaseTypeDirectDefinition.baseTypeEncoding are:
– 1C: One’s complement
– 2C: Two’s complement
– BCD-P: Packed Binary Coded Decimals
– BCD-UP: Unpacked Binary Coded Decimals
– DSP-FRACTIONAL: Digital Signal Processor
– SM: Sign Magnitude
– IEEE754: floating point numbers
– ISO-8859-1: single-byte coded character
– ISO-8859-2: single-byte coded character
– WINDOWS-1252: single-byte coded character
– UTF-8: UCS Transformation Format 8
– UTF-16: Character encoding for Unicode code points based on 16 bit code
units [15]
– UCS-2: Universal Character Set 2
– NONE: Unsigned Integer
– VOID: corresponds to a void in C. The encoding is not formally specified
here.
– BOOLEAN: This represents an unsigned integer to be interpreted as boolean.
The value shall be interpreted as true if the value of the unsigned integer
is 1 and it shall be interpreted as false if the value of the unsigned integer
is 0.
A CompuMethod shall be referenced by the corresponding Autosar-
DataType that implements the common sense behind the boolean concept,
i.e. define a TEXTTABLE with two CompuScales: e.g. true –> 1, false
–> 0.
c()
• [TPS_SWCT_01262] memAlignment and byteOrder are platform-specific
d The value of attributes BaseTypeDirectDefinition.memAlignment and
BaseTypeDirectDefinition.byteOrder is platform-specific and therefore
should be set only in use cases where this is really needed.
These attributes shall be considered as optional.
A further question that needs clarification is the usage of the so-called Byte Order
Mark which allows (at run-time) for determining the actual byte order directly from the
payload of a unicode string.
As AUTOSAR has means to formally and comprehensively define the byte order of any
given DataPrototype that can hold a string at run time it is not necessary to support
a further instrument that pretty much takes care of the same purpose.
[TPS_SWCT_01653] UTF-16-encoded strings are not allowed to start with a BOM
d If the value of attribute BaseTypeDirectDefinition.baseTypeEncoding is set
to UTF-16 then the value of a DataPrototype (which is effectively representing a
string) is not allowed to start with a Byte Order Mark (BOM). c()
Please note that [TPS_SWCT_01653] removes a possible redundancy in the definition
and execution of UTF-16-encoded strings.
The redundancy is not only regarded unnecessary but also potentially dangerous be-
cause it is not possible to check whether the definition is consistent with the execution
at configuration time.
From the formal point of view, [TPS_SWCT_01653] does not represent an actual con-
straint although it is formulated as such.
However, an AUTOSAR tool would not be able to properly check the condition at con-
figuration time and therefore this rule is published as a specification item.
There are uses of data types that on the one hand need a handy term (because this
kind of data type is used a lot) but on the other hand cannot easily be expressed in
simple terms of meta-model elements (like ApplicationDataType).
Therefore, it is not an option to fully describe the characteristics of these kinds of data
types precisely every time one of these is used. A definition of terminology is supposed
to associate the mentioned kinds of data types with the term under which their use shall
be paraphrased.
[21] imposes certain requirements on the characteristics of data that apply for the inte-
gral mapping.
[TPS_SWCT_01477] Integral Primitive Types d Data types that qualify for be-
ing used in the context of a The SenderReceiverToSignalMapping shall be called
Integral Primitive Types. c(RS_SWCT_03218)
[constr_1229] category of ImplementationDataType boils down to VALUE d
An ImplementationDataType qualifies as an Integral Primitive Type if and
only if either
• its category is VALUE or TYPE_REFERENCE that eventually boils down to
VALUE or
• its category is ARRAY and it has only one subElement and one of the following
conditions applies:
– subElement.category is set to VALUE or TYPE_REFERENCE that even-
tually boils down to VALUE and the subElement refers to a SwBaseType
where baseTypeSize is set to the value 8 and the baseTypeEncoding
is set to NONE.
– subElement.category is set to TYPE_REFERENCE and the swDataDef-
Props.implementationDataType literally represents the Platform
Data Type named “uint8”.
– subElement.category is set to TYPE_REFERENCE and the attribute sw-
DataDefProps.implementationDataType.shortName is set to “uint8”
and swDataDefProps.baseType.baseTypeDefinition.nativeDec-
laration does not exist.
c()
[constr_1230] ApplicationDataType that qualifies for Integral Primitive
Type d An ApplicationDataType qualifies as an Integral Primitive Type if
and only if all of the following conditions apply:
• ApplicationDataType.category is set to BOOLEAN, VALUE, STRING, or AR-
RAY
• in the applicable scope a DataTypeMap is available that refers to the given Ap-
plicationDataType
• the found DataTypeMap refers to an ImplementationDataType that fulfills
the requirements of [constr_1229]
c()
The definition of and further explanation regarding the term Variable-Size Array
Data Type can be found in chapter 2.8.
There are use cases for sending a DataPrototype that is effectively typed by a union
data type over a communication network. In this case, however, it is necessary to
not only send the DataPrototype itself but add an information about the applicable
member of the union as a form of “meta-data” to the transmission.
By this means the sender can identify the applicable member of the union and the
receiver can accordingly access the proper union element.
It is the nature of union data types that executable code shall symmetrically access
the union, i.e. the member that was written needs to be read, the usage of a union as a
“type converter” is heavily frowned upon (because it causes unspecified behavior from
ISO-C:90 [23] point of view) and shall be discouraged by AUTOSAR.
Thus, AUTOSAR needs to take this condition into account and define a specific mod-
eling for the handling of union data types.
[TPS_SWCT_01700] Definition of unions that can be transmitted over a commu-
nication network d If it is intended to send a data object typed by a union data type
over a communication bus then a specific modeling is required for this purpose.
• The union data type shall never be used as such, it shall always be enclosed in an
ImplementationDataType of category STRUCTURE that aggregates exactly
two ImplementationDataTypeElements:
– The first ImplementationDataTypeElement shall be used to identify
the applicable element of the actual union data type.
The shortName of this element shall be set to “memberSelector”, it shall
be of category VALUE, or of category TYPE_REFERENCE that finally
boils down to category VALUE.
Furthermore, it shall refer to a SwBaseType with attribute baseTypeEn-
coding set to NONE and attribute baseTypeSize set to the value 8, 16, or
32.
This ImplementationDataTypeElement shall be called the Member
Selector.
– The second ImplementationDataTypeElement shall be of category
UNION, it represents the actual union “payload”.
• The purpose of the Member Selector is to identify the element of the union
data type that applies for a given access to the union.
If the value of the Member Selector is set to 1 then the first subElement of
the ImplementationDataType of category UNION is applicable.
If the value of the Member Selector is set to 2 then the second subElement
is applicable and so on.
• The value of the Member Selector shall range between the value 1 and the
number of subElements of the ImplementationDataTypeElement of cat-
egory UNION. Once again, the index counting is 1-based!
• Obviously, the actual data type used to hold the Member Selector shall be
capable of storing a value that corresponds to the number of subElements of
the ImplementationDataTypeElement of category UNION.
• Constraint [constr_1441] applies.
c(RS_SWCT_03217)
[TPS_SWCT_01701] Wrapped Union Data Type d Data types that fulfill the require-
ments of [TPS_SWCT_01700] shall be called Wrapped Union Data Types. c
(RS_SWCT_03217)
[constr_1442] category TYPE_REFERENCE shall not be used for modeling the
“payload” of a Wrapped Union Data Type d For the modeling of the “payload”
part of a Wrapped Union Data Type it shall not be possible to use an Implemen-
tationDataTypeElement of category TYPE_REFERENCE that finally (i.e. after all
possible indirections are resolved) boils down to category UNION. c()
The definition of the Wrapped Union Data Type represents the canonical way of
how union data types shall be used in AUTOSAR on the application and communication
level. Consequentially, the usage of the category value UNION is effectively limited
to an ImplementationDataTypeElement.
[constr_1444] Limited applicability of Wrapped Union Data Type d There is
no support for the usage of Wrapped Union Data Type in PortInterfaceMap-
pings, and Diagnostics. c()
In response to existing constraints that are out of the control of AUTOSAR, the initial-
ization of a Wrapped Union Data Type is somehow complicated.
C90 [23], which is the standard language basis for AUTOSAR (see [RS_Main_00220]),
allows only for the initialization of the first member of a union.
Granted, this restriction may not be sufficient to cover all use cases connected with the
deployment of Wrapped Union Data Types in AUTOSAR, but that’s all that can be
reasonably supported for the time being.
One obvious consequence of this restriction is that for any given ValueSpecifi-
cation taken to initialize a Wrapped Union Data Type the value of the Member
Selector is strictly locked to 1.
<IMPLEMENTATION-DATA-TYPE-ELEMENT>
<SHORT-NAME>primitive</SHORT-NAME>
<CATEGORY>VALUE</CATEGORY>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
<IMPLEMENTATION-DATA-TYPE-ELEMENT>
<SHORT-NAME>array</SHORT-NAME>
<CATEGORY>ARRAY</CATEGORY>
<SUB-ELEMENTS>
<IMPLEMENTATION-DATA-TYPE-ELEMENT>
<SHORT-NAME>arraySub</SHORT-NAME>
<CATEGORY>VALUE</CATEGORY>
<ARRAY-SIZE>4</ARRAY-SIZE>
<ARRAY-SIZE-SEMANTICS>FIXED-SIZE</ARRAY-SIZE-SEMANTICS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
</SUB-ELEMENTS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
</SUB-ELEMENTS>
</IMPLEMENTATION-DATA-TYPE-ELEMENT>
</SUB-ELEMENTS>
</IMPLEMENTATION-DATA-TYPE>
As already mentioned in section 2.9, there are use cases for structured data types that
contain optional elements that may or may not exist at a given time.
These data types require a specific modeling on both the level of Application-
DataType and the level of ImplementationDataType.
[TPS_SWCT_01775]{DRAFT} Structured data types with optional elements d A
structured data type that contains at least one optional element shall be called an
Optional Element Structure. c(RS_SWCT_03320)
On the level of ApplicationDataType, the existence of optional elements is sig-
naled by setting the attribute ApplicationRecordElement.isOptional to True.
For more details, please refer to section 5.2.4.2.2.
The description of how an Optional Element Structure shall be modeled using
ImplementationDataType can be found in section 5.2.5.1.
5.3.1 Overview
This means formally that it has an is-of-type relation to a data type and is usually
aggregated by another element, e.g. the internal behavior or a port interface. c()
In the meta-model, various kinds of data prototypes are derived from the abstract Dat-
aPrototype as shown in figure 5.21.
The reason for the introduction of this hierarchy was the distinction between Autosar-
DataPrototype (which can be used for the application and implementation types as
well) and ApplicationCompositeElementDataPrototype (which is restricted to
be used within the application types).
ARElement AtpBlueprint
AtpType AtpBlueprintable
AutosarDataType ApplicationDataType
1 +type 1 +type
{redefines atpType} {redefines atpType}
0..1 +swDataDefProps
«atpVariation» AtpPrototype
«isOfType»
SwDataDefProps +/swDataDefProps DataPrototype
0..1
«isOfType»
AutosarDataPrototype ApplicationCompositeElementDataPrototype
4
Class DataPrototype (abstract)
swDataDef SwDataDefProps 0..1 aggr This property allows to specify data definition properties
Props which apply on data prototype level.
InstantiationDataDefProps
ParameterAccess
DataPrototype
STRUCTURE
COM_AXIS
RES_AXIS
VAL_BLK
BOOLEAN
STRING
CUBOID
CUBE_4
CUBE_5
VALUE
ARRAY
CURVE
MAP
additionalNativeTypeQualifier
annotation x x x * * * * * * * * * * * * *
baseType
compuMethod
dataConstr.dataConstrRule.physCon-
x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
strs
dataConstr.dataConstrRule.internal-
Constrs
x x d/c14 d/c d/c d/c d/c d/c d/c d/c d/c
displayFormat x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
displayPresentation x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
implementationDataType
invalidValue
stepSize x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAddrMethod x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAlignment x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swBitRepresentation
swCalibrationAccess x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swCalprmAxisSet
swCalprmAxisSet.swCalprmAxis/SwAxis-
x x 0..1 0..1 0..1 0..1 0..1 0..1
Grouped.swCalprmRef
swCalprmAxisSet.swCalprmAxis/SwAx-
x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
isIndividual.swVariableRef
swCalprmAxisSet.swCalprmAxis/SwAxis-
Grouped.sharedAxisType
swCalprmAxisSet.swCalprmAxis/SwAx-
isIndividual.inputVariableType
swCalprmAxisSet.swCalprmAxis/SwAx-
isIndividual.unit
5
14
don’t care
4
Attributes of SwDataDefProps Root El. Attribute Existence per Category
InstantiationDataDefProps
ParameterAccess
DataPrototype
STRUCTURE
COM_AXIS
RES_AXIS
VAL_BLK
BOOLEAN
STRING
CUBOID
CUBE_4
CUBE_5
VALUE
ARRAY
CURVE
MAP
swCalprmAxisSet.swCalprmAxis.base-
Type
swComparisonVariable x 0..1 0..1 0..1 0..1 0..1
swDataDependency x x 0..1 0..1 0..1 0..1 0..1 0..1
swHostVariable
swImplPolicy x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIntendedResolution
swInterpolationMethod x x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIsVirtual x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swPointerTargetProps
swRecordLayout
swRefreshTiming x x 0..1 0..1 0..1 0..1
swTextProps
swValueBlockSize
swValueBlockSizeMult
unit
valueAxisDataType
Table 5.31: Allowed Attributes vs. category for DataPrototypes typed by Application
Data Types
FUNCTION_REFERENCE
ParameterAccess
DATA_REFERENCE
TYPE_REFERENCE
DataPrototype
STRUCTURE
VALUE
UNION
ARRAY
4
Attributes of SwDataDefProps Root Element Attribute Existence per Category
additionalNativeTypeQualifier
annotation x x * * * * * * * *
baseType
compuMethod
dataConstr.dataConstrRule.physConstrs x x d/c15 d/c d/c
dataConstr.dataConstrRule.internalConstrs x x 0..1 0..1 0..1
displayFormat x x 0..1 0..1 0..1 0..1 0..1
displayPresentation x x 0..1 0..1 0..1
implementationDataType
invalidValue
stepSize x x 0..1 0..1
swAddrMethod x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swAlignment x x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swBitRepresentation
swCalibrationAccess x x 0..1 0..1 0..1 0..1 0..1
swCalprmAxisSet
swComparisonVariable
swDataDependency
swHostVariable
swImplPolicy x 0..1 0..1 0..1 0..1 0..1 0..1 0..1
swIntendedResolution
swInterpolationMethod
swIsVirtual
swPointerTargetProps
swPointerTargetProps.swDataDefProps
swPointerTargetProps.functionPointerSignature
swRecordLayout
swRefreshTiming x x 0..1 0..1 0..1 0..1 0..1
swTextProps
swValueBlockSize
swValueBlockSizeMult
unit
valueAxisDataType
Table 5.32: Allowed Attributes vs. category for DataPrototypes typed by Imple-
mentationDataTypes
Class ParameterDataPrototype
Package M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes
Note A parameter element used for parameter interface and internal behavior, supporting signal like parameter
and characteristic value communication patterns and parameter and characteristic value definition.
Base ARObject, AtpFeature, AtpPrototype, AutosarDataPrototype, DataPrototype, Identifiable, Multilanguage
Referrable, Referrable
Attribute Type Mul. Kind Note
initValue ValueSpecification 0..1 aggr Specifies initial value(s) of the ParameterDataPrototype
ValueSpecification
AutosarVariableRef
+autosarVariable 0..1
AtpInstanceRef
VariableInAtomicSWCTypeInstanceRef
AutosarDataPrototype
ArVariableInImplementationDataInstanceRef
VariableDataPrototype +rootVariableDataPrototype
0..1
Rules for the modeling and semantics of an AtpInstanceRef are defined in general
in [11].
[constr_2536] Target of an autosarVariable in AutosarVariableRef shall re-
fer to a variable d The target of autosarVariable (which in fact is an instance
ref) in AutosarVariableRef shall either be or be nested in VariableDataPro-
totype. This means that the target shall either be a VariableDataPrototype or
an ApplicationCompositeElementDataPrototype that in turn is owned by a
VariableDataPrototype. c()
by a dedicated algorithm. Note that in all cases where [constr_1173] does not apply
[constr_2535] shall be fulfilled.
Class AutosarParameterRef
Package M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements
Note This class represents a reference to a parameter within AUTOSAR which can be one of the following use
cases:
localParameter:
• localParameter which is used as whole (e.g. sharedAxis for curve)
autosarVariable:
• a parameter provided via PortPrototype which is used as whole (e.g. parameterAccess)
• an element inside of a composite local parameter typed by ApplicationDatatype (e.g. sharedAxis
for a curve)
• an element inside of a composite parameter provided via Port and typed by ApplicationDatatype
(e.g. sharedAxis for a curve)
autosarParameterInImplDatatype:
• an element inside of a composite local parameter typed by ImplementationDatatype
• an element inside of a composite parameter provided via PortPrototype and typed by
ImplementationDatatype
Base ARObject
Attribute Type Mul. Kind Note
autosar DataPrototype 0..1 iref This instance reference is used if the callibration
Parameter parameter is either imported via a port or is part of a
composite data structure.
localParameter DataPrototype 0..1 ref In the majority of cases this reference goes to Parameter
DataPrototypes rather than VariableDataPrototypes.
Pointing the reference to a VariableDataPrototype is
limited to special use cases, e.g. if the AutosarParameter
Ref is used in the context of an SwAxisGrouped.
This reference is used if the arParameter is local to the
current component.
Of course, it would technically also be feasible to use an
InstanceRef for this case. However, the InstanceRef
would not have a contextElement (because the current
instance is the context).
Hence, the local instance is a special case which may
provide further optimization. Therefore an explicit
reference is provided for this case.
SwComponentType AtpBlueprintable
AutosarParameterRef
AtomicSwComponentType AtpPrototype
PortPrototype
AtpInstanceRef
ParameterInAtomicSWCTypeInstanceRef
«instanceRef»
1
{subsets
+localParameter +autosarParameter
0..1 0..1 +targetDataPrototype atpTarget} 0..1
{subsets
AtpPrototype atpContextElement}
DataPrototype
+rootParameterDataPrototype
ApplicationCompositeElementDataPrototype +contextDataPrototype
0..*
{ordered,
subsets
atpContextElement}
SwComponentType AtpBlueprintable
AutosarVariableRef
AtomicSwComponentType AtpPrototype
PortPrototype
+autosarVariable 0..1
AtpInstanceRef
VariableInAtomicSWCTypeInstanceRef
«instanceRef»
1
{subsets
+autosarVariable 0..1 +targetDataPrototype atpTarget}
AtpPrototype
DataPrototype
0..*
{ordered,
subsets
+contextDataPrototype atpContextElement}
AutosarDataPrototype ApplicationCompositeElementDataPrototype
+localVariable 0..1
VariableDataPrototype
+rootVariableDataPrototype
0..1
{subsets
atpContextElement}
constitute the path leading from the root to the specified inner instance of a
dataElement inside of a VariableDataPrototype typed by an Implementa-
tionDataType. c()
This relation is also depicted in Figure 5.26.
ArVariableInImplementationDataInstanceRef
0..*
+portPrototype 0..1 +contextDataPrototype {ordered} +targetDataPrototype 1
AtpBlueprintable AtpPrototype AbstractImplementationDataTypeElement
AtpPrototype DataPrototype ImplementationDataTypeElement
PortPrototype
+ arraySizeHandling: ArraySizeHandlingEnum [0..1]
+ arraySizeSemantics: ArraySizeSemanticsEnum [0..1]
+ isOptional: Boolean [0..1]
«atpVariation»
+ arraySize: PositiveInteger [0..1]
ARElement
AutosarDataPrototype
«isOfType» +type AtpType
AutosarDataType
«atpVariation»
1
{redefines atpType}
+rootVariableDataPrototype 0..1
AbstractImplementationDataType
VariableDataPrototype ImplementationDataType
+type
:ImplementationDataType
!"#$% &'#
category = ARRAY
+subElement
+contextDataPrototype
:ImplementationDataTypeElement
{index = 1} category = ARRAY
+subElement
+contextDataPrototype :ImplementationDataTypeElement
{index = 2} category = TYPE_REFERENCE
(
+implementationDataType
:ImplementationDataType
category = STRUCTURE
+subElement +subElement
: :
ImplementationDataTypeElement ImplementationDataTypeElement
+subElement +subElement
+implementationDataType
:ImplementationDataType
category = VALUE
+baseType
:SwBaseType
category = FIXED_LENGTH
Please note that it is also possible to access the inside of a nested ParameterDat-
aPrototype typed by an ImplementationDataType in pretty much the same way
as this is possible for a VariableDataPrototype typed by an Implementation-
DataType.
[TPS_SWCT_01738] Context path in ArParameterInImplementationDataIn-
stanceRef d The references in the roles
• portPrototype
• rootParameterDataPrototype
• ordered collection of contextDataPrototype
• targetDataPrototype
constitute the path leading from the root to the specified inner instance of a parameter
inside of a ParameterDataPrototype typed by an ImplementationDataType. c
()
This relation is also depicted in Figure 5.28.
ArParameterInImplementationDataInstanceRef
0..*
+portPrototype 0..1 +contextDataPrototype {ordered} +targetDataPrototype 1
ARElement
AutosarDataPrototype
+type AtpType
AutosarDataType
«isOfType» «atpVariation»
1
{redefines atpType}
5.4.1 Overview
As it has already been shown in the previous chapters, various properties and asso-
ciations can be attached to the definition of data types as well as prototypes. These
are described by the meta-class SwDataDefProps which covers all properties of a
particular data object under various aspects.
In general, the properties specified within SwDataDefProps may apply to all kind of
data declared within the software-component template and within the basic software
module description template as well, e.g. component local data, data used for commu-
nication, data used for measurement as well as for calibration.
However, there are constraints for the attributes depending on the role of the data:
InstantiationDataDefProps
ImplementationDataType
FlatInstanceDescriptor
ApplicationDataType
PerInstanceMemory
ParameterAccess
McDataInstance
DataPrototype
SwSystemconst
SwServiceArg
Other Usage
ComSpec
RTE
A2L
additionalNativeTypeQualifier x x NA D I NA NA NA D NA S NA NA
annotation x D A A A A A D NA A D NA
baseType x x x NA D I I I R D NA S M NA
compuMethod x x x D AI I I NA R I AI S D NA
dataConstr x x x D C R R I NA R NA S D NA
displayFormat x D A R R I NA R NA S D NA
displayPresentation x x x D A R R NA NA NA NA S NA NA
implementationDataType x x NA D I I I NA D NA NA NA NA
invalidValue x x D A I I NA D NA NA S NA NA
stepSize x D A A A A NA NA A S NA NA
swAddrMethod x x x D R R R NA NA NA R NA NA D
swAlignment x x NA D R R NA NA NA NA NA NA NA
swBitRepresentation x x NA NA NA NA NA NA NA NA D NA NA
swCalibrationAccess x x D R R R NA NA R R S D NA
swCalprmAxisSet x x D NA I I I NA NA NA S NA NA
swCalprmAxisSet.swCalprmAxis
x NA NA NA D R NA NA NA S NA NA
/SwAxisGrouped.swCalprmRef
swCalprmAxisSet.swCalprmAxis
x NA NA NA D R NA NA NA S NA NA
/SwAxisIndividual.swVariableRef
swCalprmAxisSet.swCalprmAxis
x D NA NA NA NA NA NA NA S NA NA
/SwAxisGrouped.sharedAxisType
swCalprmAxisSet.swCalprmAxis
x D NA NA NA NA NA NA NA S NA NA
/SwAxisIndividual.inputVariableType
swCalprmAxisSet/SwAxisIndividual.unit opt. D NA I I I NA I NA S NA NA
swComparisonVariable x NA NA NA NA D NA NA NA S NA NA
swDataDependency x x NA NA D R NA NA NA NA S NA NA
swHostVariable x x NA NA NA NA NA NA NA NA D NA NA
swImplPolicy x x D A A NA NA NA D NA NA NA NA
swIntendedResolution x D16 NA NA NA NA NA NA NA NA NA NA
swInterpolationMethod x D I R R R NA NA NA S NA NA
swIsVirtual x NA NA D R NA NA NA NA S NA NA
swPointerTargetProps x NA D I NA NA NA D NA NA NA NA
swRecordLayout x x x D NA I I I NA NA NA S NA NA
5
16
swIntendedResolution is used only in an early phase of the definition of data types, namely
in the context of the definition of so-called blueprints. To that extent, swIntendedResolution rep-
resents a non-binding requirement that shall later be considered for the definition of an appropriate
CompuMethod.
4
Attributes of SwDataDefProps Usage For Place of Setting
InstantiationDataDefProps
ImplementationDataType
FlatInstanceDescriptor
ApplicationDataType
PerInstanceMemory
ParameterAccess
McDataInstance
DataPrototype
SwSystemconst
SwServiceArg
Other Usage
ComSpec
RTE
A2L
swRefreshTiming x D R R R NA NA R R R NA NA
swTextProps x x D I I I I NA NA NA S NA NA
swValueBlockSize x x D I I I I NA NA NA S NA NA
swValueBlockSizeMult x x D I I I I NA NA NA S NA NA
unit x x D I I I NA NA I NA S D NA
valueAxisDataType x x D I I I I NA NA NA S NA NA
17
In the beginning of ASAM and MSR measurements and calibration parameters (characteristics)
were separated and the properties were merged over the time.
4
Class «atpVariation» SwDataDefProps
additionalNative NativeDeclarationString 0..1 attr This attribute is used to declare native qualifiers of the
TypeQualifier programming language which can neither be deduced
from the baseType (e.g. because the data object
describes a pointer) nor from other more abstract
attributes. Examples are qualifiers like "volatile", "strict" or
"enum" of the C-language. All such declarations have to
be put into one string.
Tags: xml.sequenceOffset=235
annotation Annotation * aggr This aggregation allows to add annotations (yellow pads
...) related to the current data object.
Tags: xml.roleElement=true
xml.roleWrapperElement=true
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
baseType SwBaseType 0..1 ref Base type associated with the containing data object.
Tags: xml.sequenceOffset=50
compuMethod CompuMethod 0..1 ref Computation method associated with the semantics of
this data object.
Tags: xml.sequenceOffset=180
dataConstr DataConstr 0..1 ref Data constraint for this data object.
Tags: xml.sequenceOffset=190
displayFormat DisplayFormatString 0..1 attr This property describes how a number is to be rendered
e.g. in documents or in a measurement and calibration
system.
Tags: xml.sequenceOffset=210
display DisplayPresentation 0..1 attr This attribute controls the presentation of the related data
Presentation Enum for measurement and calibration tools.
implementation AbstractImplementation 0..1 ref This association denotes the ImplementationDataType of
DataType DataType a data declaration via its aggregated SwDataDefProps. It
is used whenever a data declaration is not directly
referring to a base type. Especially
• redefinition of an ImplementationDataType via a
"typedef" to another ImplementationDatatype
• the target type of a pointer (see SwPointerTarget
Props), if it does not refer to a base type directly
• the data type of an array or record element within
an ImplementationDataType, if it does not refer to
a base type directly
• the data type of an SwServiceArg, if it does not
refer to a base type directly
Tags: xml.sequenceOffset=215
invalidValue ValueSpecification 0..1 aggr Optional value to express invalidity of the actual data
element.
Tags: xml.sequenceOffset=255
stepSize Float 0..1 attr This attribute can be used to define a value which is
added to or subtracted from the value of a DataPrototype
when using up/down keys while calibrating.
swAddrMethod SwAddrMethod 0..1 ref Addressing method related to this data object. Via an
association to the same SwAddrMethod it can be
specified that several DataPrototypes shall be located in
the same memory without already specifying the memory
section itself.
Tags: xml.sequenceOffset=30
5
4
Class «atpVariation» SwDataDefProps
swAlignment AlignmentType 0..1 attr The attribute describes the intended alignment of the
DataPrototype. If the attribute is not defined the alignment
is determined by the swBaseType size and the memory
AllocationKeywordPolicy of the referenced SwAddr
Method.
Tags: xml.sequenceOffset=33
swBit SwBitRepresentation 0..1 aggr Description of the binary representation in case of a bit
Representation variable.
Tags: xml.sequenceOffset=60
swCalibration SwCalibrationAccess 0..1 attr Specifies the read or write access by MCD tools for this
Access Enum data object.
Tags: xml.sequenceOffset=70
swCalprmAxis SwCalprmAxisSet 0..1 aggr This specifies the properties of the axes in case of a
Set curve or map etc. This is mainly applicable to calibration
parameters.
Tags: xml.sequenceOffset=90
swComparison SwVariableRefProxy * aggr Variables used for comparison in an MCD process.
Variable
Tags: xml.sequenceOffset=170
xml.typeElement=false
swData SwDataDependency 0..1 aggr Describes how the value of the data object has to be
Dependency calculated from the value of another data object (by the
MCD system).
Tags: xml.sequenceOffset=200
swHostVariable SwVariableRefProxy 0..1 aggr Contains a reference to a variable which serves as a
host-variable for a bit variable. Only applicable to bit
objects.
Tags: xml.sequenceOffset=220
xml.typeElement=false
swImplPolicy SwImplPolicyEnum 0..1 attr Implementation policy for this data object.
Tags: xml.sequenceOffset=230
swIntended Numerical 0..1 attr The purpose of this element is to describe the requested
Resolution quantization of data objects early on in the design
process.
The resolution ultimately occurs via the conversion
formula present (compuMethod), which specifies the
transition from the physical world to the standardized
world (and vice-versa) (here, "the slope per bit" is present
implicitly in the conversion formula).
In the case of a development phase without a fixed
conversion formula, a pre-specification can occur through
swIntendedResolution.
The resolution is specified in the physical domain
according to the property "unit".
Tags: xml.sequenceOffset=240
swInterpolation Identifier 0..1 attr This is a keyword identifying the mathematical method to
Method be applied for interpolation. The keyword needs to be
related to the interpolation routine which needs to be
invoked.
Tags: xml.sequenceOffset=250
5
4
Class «atpVariation» SwDataDefProps
swIsVirtual Boolean 0..1 attr This element distinguishes virtual objects. Virtual objects
do not appear in the memory, their derivation is much
more dependent on other objects and hence they shall
have a swDataDependency .
Tags: xml.sequenceOffset=260
swPointerTarget SwPointerTargetProps 0..1 aggr Specifies that the containing data object is a pointer to
Props another data object.
Tags: xml.sequenceOffset=280
swRecord SwRecordLayout 0..1 ref Record layout for this data object.
Layout
Tags: xml.sequenceOffset=290
swRefresh MultidimensionalTime 0..1 aggr This element specifies the frequency in which the object
Timing involved shall be or is called or calculated. This timing
can be collected from the task in which write access
processes to the variable run. But this cannot be done by
the MCD system.
So this attribute can be used in an early phase to express
the desired refresh timing and later on to specify the real
refresh timing.
Tags: xml.sequenceOffset=300
swTextProps SwTextProps 0..1 aggr the specific properties if the data object is a text object.
Tags: xml.sequenceOffset=120
swValueBlock Numerical 0..1 attr This represents the size of a Value Block
Size
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
xml.sequenceOffset=80
swValueBlock Numerical * attr This attribute is used to specify the dimensions of a value
Size block (VAL_BLK) for the case that that value block has
Mult (ordered) more than one dimension.
The dimensions given in this attribute are ordered such
that the first entry represents the first dimension, the
second entry represents the second dimension, and so
on.
For one-dimensional value blocks the attribute swValue
BlockSize shall be used and this attribute shall not exist.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
unit Unit 0..1 ref Physical unit associated with the semantics of this data
object. This attribute applies if no compuMethod is
specified. If both units (this as well as via compuMethod)
are specified the units shall be compatible.
Tags: xml.sequenceOffset=350
valueAxisData ApplicationPrimitive 0..1 ref The referenced ApplicationPrimitiveDataType represents
Type DataType the primitive data type of the value axis within a
compound primitive (e.g. curve, map). It supersedes
CompuMethod, Unit, and BaseType.
Tags: xml.sequenceOffset=355
Primitive NativeDeclarationString
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes
Note This string contains a native data declaration of a data type in a programming language. It is basically a
string, but white-space must be preserved.
Tags: xml.xsd.customType=NATIVE-DECLARATION-STRING
xml.xsd.type=string
xml.xsd.whiteSpace=preserve
Class SwBitRepresentation
Package M2::MSR::DataDictionary::DataDefProperties
Note Description of the structure of a bit variable: Comprises of the bitPosition in a memory object (e.g. sw
HostVariable, which stands parallel to swBitRepresentation) and the numberOfBits . In this way,
interrelated memory areas can be described. Non-related memory areas are not supported.
Base ARObject
Attribute Type Mul. Kind Note
bitPosition Integer 0..1 attr If the "bit data object" is hosted within another data object
(e.g. if the memory can be accessed via byte as well as
bit address), this attribute specifies the position of the
data object. The count starts at zero (0).
Tags: xml.sequenceOffset=20
numberOfBits Integer 0..1 attr Number of bits allocated by a "bit data object" within its
host data object.
Tags: xml.sequenceOffset=30
Primitive DisplayFormatString
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes
Note This is a display format specifier for the display of values e.g. in documents or in measurement and
calibration systems.
The display format specifier is a subset of the ANSI C printf specifiers with the following
form:
4
Primitive DisplayFormatString
4
• f: Signed value having the form [-]dddd.dddd, where dddd is one or more decimal digits; the
number of digits before the decimal point depends on the magnitude of the number, and the
number of digits after the decimal point depends on the requested precision
• g: Signed value printed in f or e format, whichever is more compact for the given value and
precision; trailing zeros are truncated, and the decimal point appears only if one or more digits
follow it
• G: Identical to the g format, except that E, rather than e, introduces the exponent (where
appropriate)
Tags: xml.xsd.customType=DISPLAY-FORMAT-STRING
xml.xsd.pattern=%[ \-+#]?[0-9]*(\.[0-9])?[diouxXfeEgGcs]
xml.xsd.type=string
Class Annotation
Package M2::MSR::Documentation::Annotation
Note This is a plain annotation which does not have further formal data.
Base ARObject, GeneralAnnotation
Attribute Type Mul. Kind Note
– – – – –
Table 5.44: Annotation
Vs
tx tmot
Figure 5.29: Explanation of swComparisonVariable
Enumeration SwCalibrationAccessEnum
Package M2::MSR::DataDictionary::DataDefProperties
Note Determines the access rights to a data object w.r.t. measurement and calibration.
Literal Description
notAccessible The element will not be accessible via MCD tools, i.e. will not appear in the ASAP file.
Tags: atp.EnumerationValue=0
readOnly The element will only appear as read-only in an ASAP file.
Tags: atp.EnumerationValue=1
readWrite The element will appear in the ASAP file with both read and write access.
Tags: atp.EnumerationValue=2
4
Enumeration SwImplPolicyEnum
const forced implementation such that the running software within the ECU shall not modify it. For example
implemented with the "const" modifier in C. This can be applied for parameters (not for those in
NVRAM) as well as argument data prototypes.
Tags: atp.EnumerationValue=0
fixed This data element is fixed. In particular this indicates, that it might also be implemented e.g. as in
place data, (#DEFINE).
Tags: atp.EnumerationValue=1
measurementPoint The data element is created for measurement purposes only. The data element is never read directly
within the ECU software. In contrast to a "standard" data element in an unconnected provide port is,
this unconnection is guaranteed for measurementPoint data elements.
Tags: atp.EnumerationValue=2
queued The content of the data element is queued and the data element has ’event’ semantics, i.e. data
elements are stored in a queue and all data elements are processed in ’first in first out’ order.
The queuing is intended to be implemented by RTE Generator.
This value is not applicable for parameters.
Tags: atp.EnumerationValue=3
standard This is applicable for all kinds of data elements. For variable data prototypes the ’last is best’
semantics applies. For parameter there is no specific implementation directive.
Tags: atp.EnumerationValue=4
in role explicitInterRunnableVariable
in role arTypedPerInstanceMemory
in role perInstanceParameter
in SenderReceiverInterface
ParameterDataPrototype
ParameterDataPrototype
ParameterDataPrototype
ParameterDataPrototype
ParameterDataPrototype
VariableDataPrototype
VariableDataPrototype
VariableDataPrototype
VariableDataPrototype
VariableDataPrototype
VariableDataPrototype
ArgumentDataPrototype
VariableDataPrototype
in role sharedParameter
in ParameterInterface
in role constantMemory
in role staticMemory
in NvDataInterface
in role ramBlock
in role romBlock
SwServiceArg
4
const NA NA NA NA NA NA NA x NA x x x NA x
fixed NA NA NA NA NA NA NA x NA NA NA x NA NA
measurementPoint x NA NA NA NA x x NA NA NA NA NA NA NA
queued x NA NA NA NA NA NA NA NA NA NA NA NA NA
standard x x x x x x x x x x x x x x
Table 5.47: Allowed attributes values for swImplPolicy vs. DataPrototypes and their
roles
The diagram 5.5 shows that in addition to the semantics defined through the com-
puMethod (explained below in chapter 5.5.1), also an invalidValue can be spec-
ified. This is a requirement of the VFB [3], allowing to express which specific value is
used to indicate invalidation.
ARElement AtpPrototype
AtpType
DataPrototype
AutosarDataType
«atpVariation»
SwDataDefProps
+invalidValue 0..1
ValueSpecification
The invalidValue can be used in different flavors (also illustrated in Figure 5.6:
• [TPS_SWCT_01432] Keep the invalidValue transparent to the sending
and receiving software components d On the one hand it is possible to keep
the invalidValue transparent to the sending and receiving software compo-
nents. In this case the invalidation API of the RTE on the sender side has to be
used.
The receiving software component can either use the data receive status or the
DataReceiveErrorEvent respectively DataReceivedEvent to decide about
the validity of the received data or the receiving software component can rely on
the reception of an initValue as a default value in case of data invalidation.
In this case the invalid value should (and usually will) be outside of the range
limits defined by the compuMethod. c()
• [TPS_SWCT_01434] Sender and receiver have knowledge of invalid value d
On the other hand it is possible that the communicating software components do
have knowledge about the invalidValue and the invalidValue is visible for
them.
This is in particular the case if the sender and receiver are calculating a checksum
over a larger data structure to implement an end to end communication protec-
tion. To ensure the integrity of the checksums it is required to set invalid values
by the sending component directly and to receive invalid values unchanged.
In this case the invalid value should (and usually will) be inside of the range
limits defined by the compuMethod. c()
• [TPS_SWCT_01436] Different receivers require different handling of data
invalidation d It is possible that in case of 1:n communication different receivers
requiring a different handling of data invalidation depending on the criticality of
its functionality. For instance, one receiver applies the checksum based end to
AbstractRequiredPortPrototype
RPortPrototype
«isOfType»
1
+requiredInterface {redefines atpType}
ARElement
AtpBlueprint
AtpBlueprintable
AtpType RPortComSpec
PortInterface
+ isService: Boolean
+ serviceKind: ServiceProviderEnum [0..1]
DataInterface ReceiverComSpec
+ handleOutOfRange: HandleOutOfRangeEnum
+ handleOutOfRangeStatus: HandleOutOfRangeStatusEnum [0..1]
+ maxNoNewOrRepeatedData: PositiveInteger [0..1]
+ syncCounterInit: PositiveInteger [0..1]
«atpVariation»
SenderReceiverInterface
+ maxDeltaCounterInit: PositiveInteger [0..1]
+ usesEndToEndProtection: Boolean [0..1]
+dataElement 1..*
AutosarDataPrototype
NonqueuedReceiverComSpec
VariableDataPrototype
+ aliveTimeout: TimeValue
+ enableUpdate: Boolean
+dataElement 1 + handleDataStatus: Boolean [0..1]
+ handleNeverReceived: Boolean
+ handleTimeoutType: HandleTimeoutEnum
+invalidationPolicy 0..*
InvalidationPolicy
ARElement
SwCalprmAxis SwAxisIndividual +dataConstr AtpBlueprint
AtpBlueprintable
0..1
DataConstr
ARElement
AtpBlueprint
+compuMethod
AtpBlueprintable
0..1 CompuMethod
+unit 0..1
ARElement
+unit Unit
0..1
1 +swCalprmAxisTypeProps
SwCalprmAxisTypeProps
SwAxisGeneric
+swAxisGeneric
0..1
SwVariableRefProxy
+swVariableRef
0..*
{ordered}
ApplicationDataType
+inputVariableType ApplicationPrimitiveDataType
0..1
+sharedAxisType 0..1
SwAxisGrouped
SwCalprmRefProxy
+swCalprmRef
SwAxisGeneric
ARElement
SwGenericAxisParam
SwAxisType
«atpVariation»
+ vf: Numerical [1..*] {ordered}
Identifiable
SwGenericAxisParamType
Figure 5.34 shows how an individual axis is represented by the meta-model. The corre-
sponding M1 Model is illustrated in Figure 5.35. The SwAxisIndividual references
value-models to account the minimum and the maximum number of axis values as well
as the number of axis points.
Hence, the size of the structure to hold the functional values is determined by the
number of axis values for all axes. The type of the axis values is determined when the
type of the referenced input value (swVariableRef) has been set. For further details
see 5.4.5.
[TPS_SWCT_01107] swMinAxisPoints and swMaxAxisPoints represent varia-
tion points d The value of attributes swMinAxisPoints and swMaxAxisPoints is
subject to variant handling. c(RS_SWCT_03148)
ARElement ARElement
AtpBlueprint
SwRecordLayout
AtpBlueprintable
SwAddrMethod
+swAddrMethod
AtpBlueprint «atpVariation»
AtpBlueprintable +baseType SwDataDefProps
BaseType
SwBaseType 0..1
0..1
+baseType
ARElement ARElement
SwCalprmAxisSet
AtpBlueprint AtpBlueprint
AtpBlueprintable AtpBlueprintable
CompuMethod DataConstr
0..1
+dataConstr 0..1
+compuMethod
+swCalprmAxis 0..*
SwCalprmAxis
ARElement
SwCalprmAxisTypeProps
Unit
0..1
+unit
SwAxisGrouped SwAxisIndividual
0..*
+swCalprmRef 1 +swVariableRef {ordered}
SwCalprmRefProxy SwVariableRefProxy
Element: ApplicationDataType
category = CURVE
shortName = MyCurve
Element: CompuMethod
Element: SwAddrMethod
Element: SwRecordLayout
swCalprmAxisSet:
SwCalprmAxisSet
swCalprmAxis: SwCalprmAxis
swCalprmAxisTypeProps: Element:
SwAxisIndividual ApplicationPrimitiveDataType
Element: Unit
Class SwCalprmAxisSet
Package M2::MSR::DataDictionary::CalibrationParameter
Note This element specifies the input parameter axes (abscissas) of parameters (and variables, if these are
used adaptively).
Base ARObject
Attribute Type Mul. Kind Note
5
4
Class SwCalprmAxisSet
swCalprmAxis SwCalprmAxis * aggr One axis belonging to this SwCalprmAxisSet
Tags: xml.roleElement=true
xml.roleWrapperElement=false
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
Class SwCalprmAxis
Package M2::MSR::DataDictionary::CalibrationParameter
Note This element specifies an individual input parameter axis (abscissa).
Base ARObject
Attribute Type Mul. Kind Note
category CalprmAxisCategory 0..1 attr This property specifies the category of a particular axis.
Enum
Tags: xml.sequenceOffset=30
baseType SwBaseType 0..1 ref The SwBaseType to be used for the axis. Note that this is
not applicable for ApplicationDataTypes. The value shall
be ignored.
Tags: atp.Status=removed
xml.sequenceOffset=110
displayFormat DisplayFormatString 0..1 attr This property specifies how the axis values shall be
displayed e.g. in documents or in measurement and
calibration tools.
Tags: xml.sequenceOffset=100
swAxisIndex AxisIndexType 0..1 attr This attribute specifies which axis is specified by the
containing SwCalprmAxis.
For example in a curve this is usually "1". In a map this is
"1" or "2".
Tags: xml.sequenceOffset=20
swCalibration SwCalibrationAccess 0..1 attr Describes the applicability of parameters and variables.
Access Enum
Tags: xml.sequenceOffset=90
swCalprmAxis SwCalprmAxisType 1 aggr specific properties depending on the type of the axis.
TypeProps Props
Tags: xml.roleElement=false
xml.roleWrapperElement=false
xml.sequenceOffset=40
xml.typeElement=true
xml.typeWrapperElement=false
Enumeration CalprmAxisCategoryEnum
Package M2::MSR::DataDictionary::CalibrationParameter
Note This enum specifies the possible values of the category property within SwCalprmAxis.
Literal Description
5
4
Enumeration CalprmAxisCategoryEnum
comAxis COM_AXIS is equal to an STD_AXIS, the difference is, that a COM_AXIS is an shared axis, that
means this axis can be used multiple times by different CURVEs, MAPs, CUBOIDs, CUBE_4s, and
CUBE_5s.
Tags: atp.EnumerationValue=0
xml.name=COM_AXIS
fixAXIS FIX_AXIS means that the input axis is not stored. The axis is calculated using parameters and so on
it is also not possible to modify the axis points.
Tags: atp.EnumerationValue=4
xml.name=FIX_AXIS
resAxis RES_AXIS is also an shared axis like COM_AXIS, the difference is that this kind of axis can be used
for rescaling.
Tags: atp.EnumerationValue=6
xml.name=RES_AXIS
stdAxis STD_AXIS means that input and output axis definition are stored within this CURVE, MAP, CUBOID,
CUBE_4, and CUBE_5.
There is no shared or calculated axis.
Tags: atp.EnumerationValue=8
xml.name=STD_AXIS
Class SwAxisIndividual
Package M2::MSR::DataDictionary::Axis
Note This meta-class describes an axis integrated into a parameter (field etc.). The integration makes this
individual to each parameter. The so-called grouped axis represents the counterpart to this. It is
conceived as an independent parameter (see class SwAxisGrouped).
Base ARObject, SwCalprmAxisTypeProps
5
4
Class SwAxisIndividual
Attribute Type Mul. Kind Note
compuMethod CompuMethod 0..1 ref This is the compuMethod which is expected for the axis. It
is used in early stages if the particular input-value is not
yet available.
Tags: xml.sequenceOffset=30
dataConstr DataConstr 0..1 ref Refers to constraints, e.g. for plausibility checks.
Tags: xml.sequenceOffset=80
inputVariable ApplicationPrimitive 0..1 ref This is the datatype of the input value for the axis. This
Type DataType allows to define e.g. a type of curve, where the input
value is finalized at the access point.
swAxisGeneric SwAxisGeneric 0..1 aggr this specifies the properties of a generic axis if applicable.
Tags: xml.sequenceOffset=90
swMaxAxis Integer 1 attr Maximum number of base points contained in the axis of
Points a map or curve.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
xml.sequenceOffset=60
swMinAxis Integer 1 attr Minimum number of base points contained in the axis of a
Points map or curve.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
xml.sequenceOffset=70
swVariable SwVariableRefProxy * aggr Refers to input variables of the axis. It is possible to
Ref (ordered) specify more than one variable. Here the following is
valid:
• The variable with the highest priority shall be
given first. It is used in the generation of the code
and is also displayed first in the application
system.
• All variables referenced shall be of the same
physical nature. This is usually detected in that
the conversion formulae affected refer back to
the same SI-units.
In AUTOSAR this ensured by the constraint, that the
referenced input variables shall use a type compatible to
"inputVariableType".
• This multiple referencing allows a base point
distribution for more than one input variable to be
used. One example of this are the temperature
curves which can depend both on the induction
air temperature and the engine temperature.
These variables can be displayed simultaneously by MCD
systems (adjustment systems), enabling operating points
to be shown in the curves.
Tags: xml.roleElement=false
xml.roleWrapperElement=true
xml.sequenceOffset=20
xml.typeElement=false
xml.typeWrapperElement=false
5
4
Class SwAxisIndividual
unit Unit 0..1 ref This represents the physical unit of the input value of the
axis. It is provided to support the case that the particular
input variable is not yet known.
Tags: xml.sequenceOffset=40
Class SwAxisGeneric
Package M2::MSR::DataDictionary::Axis
Note This meta-class defines a generic axis. In a generic axis the axispoints points are calculated in the ECU.
The ECU is equipped with a fixed calculation algorithm. Parameters for the algorithm can be stored in the
data component of the ECU. Therefore these parameters are specified in the data declaration, not in the
calibration data.
Base ARObject
Attribute Type Mul. Kind Note
swAxisType SwAxisType 1 ref Associated axis calculation strategy.
Tags: xml.sequenceOffset=20
swGenericAxis SwGenericAxisParam * aggr Specific parameter of a generic axis.
Param
Tags: xml.roleElement=true
xml.roleWrapperElement=true
xml.sequenceOffset=40
xml.typeElement=false
xml.typeWrapperElement=false
Class SwAxisType
Package M2::MSR::DataDictionary::Axis
Note This meta-class represents a specific axis calculation strategy. No formal specification is given, due to
the fact that it is possible to use arbitrary algorithms for calculating axis-points.
Instead, the algorithm is described verbally but the parameters are specified formally with respect to their
names and constraints. As a result, SwAxisType mainly reserves appropriate keywords.
Tags: atp.recommendedPackage=SwAxisTypes
Base ARElement, ARObject, CollectableElement, Identifiable, MultilanguageReferrable, Packageable
Element, Referrable
Attribute Type Mul. Kind Note
swGenericAxis DocumentationBlock 0..1 aggr Associated axis description in textual form.
Desc
Tags: xml.sequenceOffset=20
swGenericAxis SwGenericAxisParam * aggr Parameters for this calculation algorithm.
ParamType Type
Tags: xml.roleElement=true
xml.roleWrapperElement=true
xml.sequenceOffset=30
xml.typeElement=false
xml.typeWrapperElement=false
Class SwGenericAxisParam
Package M2::MSR::DataDictionary::Axis
Note This meta-class describes a specific parameter of a generic axis. The name of the parameter is defined
through a reference to a parameter type defined on a corresponding axis type.
The value of the parameter is given here in case that it is not changeable during calibration. Example is
shift / offset in a fixed axis.
Base ARObject
Attribute Type Mul. Kind Note
swGenericAxis SwGenericAxisParam 1 ref Parameter type defined on a corresponding axis type.
ParamType Type References can only be made to axis parameters types
which are defined within the referenced axis type.
Tags: xml.sequenceOffset=20
vf (ordered) Numerical 1..* attr This attribute represents the value of the generic axis
parameter.
Stereotypes: atpVariation
Tags: vh.latestBindingTime=preCompileTime
xml.roleElement=true
xml.roleWrapperElement=false
xml.sequenceOffset=30
xml.typeElement=false
Class SwGenericAxisParamType
Package M2::MSR::DataDictionary::Axis
Note This meta-class describes a generic axis parameter type, namely:
• Plausibility checks can be specified via dataConstr.
• Textual description (desc), as a formal description is not of any use, due to the large variety of
possibilities.
• If this parameter contains structures, these can be simulated through the recursive use of Sw
GenericAxisParamTypes.
Base ARObject, Identifiable, MultilanguageReferrable, Referrable
Attribute Type Mul. Kind Note
dataConstr DataConstr 0..1 ref This refernce denoted data constraints applicable to the
generic axis parameter.
Tags: xml.sequenceOffset=20
Class SwAxisGrouped
Package M2::MSR::DataDictionary::Axis
Note An SwAxisGrouped is an axis which is shared between multiple calibration parameters.
Base ARObject, SwCalprmAxisTypeProps
Attribute Type Mul. Kind Note
sharedAxisType ApplicationPrimitive 0..1 ref This is the datatype of the calibration parameter providing
DataType the shared axis.
5
4
Class SwAxisGrouped
swAxisIndex AxisIndexType 0..1 attr Describes which axis of the referenced calibration
parameter provides the values for the group axis.
The index satisfies the following convention:
• 0 = value axis. in this case, the interpolation
result of the referenced parameter is used as a
base point index.
• The index should only be specified if the
parameter under swCalprm contains more than
one axis. It is standard practice for the axis index
of parameters with more than one axis, to be set
to 1, if data has not been assigned to swAxis
Index.
Tags: xml.sequenceOffset=20
swCalprmRef SwCalprmRefProxy 1 aggr This property specifes the calibration parameter which
serves as the input axis. In AUTOSAR, the type of the
referenced Calibration parameter shall be compatible to
the type specified by sharedAxisType.
Tags: xml.roleElement=false
xml.roleWrapperElement=false
xml.sequenceOffset=30
xml.typeElement=false
xml.typeWrapperElement=false
In most cases the axes of a curve or map are accessible to a calibration software and
it is possible to calibrate axes points and their corresponding values.
There are cases, however, where axes are intentionally declared as fix and where no
intention exists to change the properties of the axis ever18 .
These axes are also known as fix axes. The support for the creation of fix axes in the
meta-model is based upon the usage of SwAxisGeneric as depicted in Figure 5.33.
[TPS_SWCT_01747] Value of category for fix axis d A fix axis shall be modeled as
an SwCalprmAxis with attribute category set to the value FIX_AXIS. c()
[TPS_SWCT_01748] Sub-categories of fix axes d There are different sub-categories
of fix axes:
• Fix axis where the distance between axis points can be computed according to a
standardized algorithm.
In this case, fix axes of arbitrary length can be described by feeding three argu-
ments defined in the context of the axis description into the axis algorithm.
18
Typically, a calibration software does not have the ability to manipulate (or even inspect) the axis’
properties by inspecting the ECU’s memory.
Consequently, the memory footprint of different fix axis of this category is liter-
ally identical, independently of the number of axis points.
The following variations exist:
– Subcategory PAR, i.e. category = FIX_AXIS_PAR: the axis is created
out of a starting value and a shift that creates further axis points as using a
power-of-two algorithm. The details can be found in [24].
– Subcategory PAR_DIST, i.e. category = FIX_AXIS_PAR_DIST: the axis
is created out of a starting value and an offset that adds further axis points
with the distance given by offset. The details can be found in [24].
• Fix axis where the axis points are defined as a list of values directly in the axis
definition. This variety boils down to
– Subcategory PAR_LIST, i.e. category = FIX_AXIS_PAR_LIST: the axis
is created out of a list of numerical values that represent the axis points. The
details can be found in [24].
These values of category shall be used for SwAxisType. c()
As mentioned before, the modeling of a fix axis is based upon the definition of the
SwAxisGeneric. But this statement by itself is not yet sufficient to unambiguously
clarify the details of the modeling.
For this purpose, it is necessary to provide further information about the specifics of the
roles SwAxisGeneric.swAxisType and SwAxisGeneric.swGenericAxisParam.
[TPS_SWCT_01749] Semantics of SwAxisGeneric.swAxisType in the definition
of a fix axis d The role SwAxisGeneric.swAxisType specifies the category of the
fix axis according to [TPS_SWCT_01748]. c()
[TPS_SWCT_01750] Semantics of SwAxisGeneric.swGenericAxisParam in the
definition of a fix axis d The role SwAxisGeneric.swGenericAxisParam provides
the actual numeric values for the definition of the axis.
The semantics of a provided numerical value is clarified by the attribute SwGeneri-
cAxisParamType.category where meta-class SwGenericAxisParamType is ref-
erenced in the role swGenericAxisParamType. c()
category of swAxisType category of SwGenericAxis- Multiplicity of swGenericAxis- Multiplicity of vf
ParamType Param
FIX_AXIS_PAR OFFSET 1 1
SHIFT 1 1
FIX_AXIS_PAR_DIST OFFSET 1 1
DISTANCE 1 1
FIX_AXIS_PAR_LIST LIST 1 1..*
Table 5.59: Modeling of SwAxisGeneric
category = CURVE
swDataDefProps:
SwDataDefProps
swCalprmAxisSet:
SwCalprmAxisSet
swCalprmAxis: SwCalprmAxis
category = FIX_AXIS
swAxisIndex = 1
swCalprmAxisTypeProps:
SwAxisIndividual
swAxisGeneric: SwAxisGeneric
category = CURVE
swDataDefProps: SwDataDefProps
swCalprmAxisSet: SwCalprmAxisSet
swCalprmAxis: SwCalprmAxis
category = FIX_AXIS
swAxisIndex = 1
swCalprmAxisTypeProps:
SwAxisIndividual
swAxisGeneric: SwAxisGeneric
MyFixAxisDataType:
ApplicationPrimitiveDataType
category = CURVE
swDataDefProps: SwDataDefProps
swCalprmAxisSet: SwCalprmAxisSet
swCalprmAxis: SwCalprmAxis
category = FIX_AXIS
swAxisIndex = 1
swCalprmAxisTypeProps:
SwAxisIndividual
swAxisGeneric: SwAxisGeneric
axisPoint2: SwGenericAxisParamType
category = LIST
Please note that the axis points and values of a fix axis are defined in the definition of
the fix axis itself and therefore any initial value assigned to a fix axis would be ignored
anyway.
This might lead to confusion such that the initial value does not make it into the soft-
ware. In order to avoid such confusion AUTOSAR does not support the definition of
an initial value for a fix axis.
This regulation is reflected in the existence of [constr_1545].
When an interpolation routine is called, an input value has to be provided to find the ap-
propriate axis entry in the implementation of a RunnableEntity. However, this input
value cannot be arbitrarily chosen but only be selected from available VariableDat-
aPrototype assigned to it.
In an axis definition attached to an ApplicationPrimitiveDataType, it is possible
to specify the data type of the input values by means of the reference SwAxisIndi-
vidual.inputVariableType.
However, the reference SwAxisIndividual.inputVariableType does not neces-
sarily have to exist.
This leaves the consideration of compatibility between the DataPrototype(s) refer-
enced by means of SwAxisIndividual.swVariableRef and the actual axis speci-
fication to the following attributes:
• SwAxisIndividual.dataConstr
• SwAxisIndividual.compuMethod
• SwAxisIndividual.unit
[TPS_SWCT_01676] Preferred approach to checking the compatibility of input
value and axis d The compatibility in terms of data type between the description of
an SwAxisIndividual and the DataPrototype(s) used as an input variable to the
respective interpolation routine shall preferably be checked alternatively between
• the ApplicationPrimitiveDataType(s) of DataPrototype(s) referenced
by means of SwAxisIndividual.swVariableRef (the provider in terms of
compatibility)
• the ApplicationPrimitiveDataType referenced by means of SwAxisIn-
dividual.inputVariableType (The requester in terms of compatibility).
For compatibility, the compuMethod of SwAxisIndividual.swVariableRef and
the ApplicationPrimitiveDataType referenced by means of SwAxisIndivid-
ual.inputVariableType shall not be considered. c()
Rationale: in many cases the input variable is defined by a float data type to take
benefit from the precision in computations. But the axis data type is an integer data
type to save memory. In this situation, a requirement for compatible compuMethods
would exclude the described scenario.
The implementation of the software-component shall make sure that the float value is
properly converted and rescaled to an integer data type compatible to the axis data
type.
[TPS_SWCT_01677] Fall-back approach to checking the compatibility of input
value and axis d If the reference SwAxisIndividual.inputVariableType does
not exist then the compatibility in terms of data type between the description of an
SwAxisIndividual and the DataPrototype(s) used as an input variable to the re-
spective interpolation routine shall be checked on the basis of the following references:
• SwAxisIndividual.dataConstr
• SwAxisIndividual.unit
respectively
• SwAxisIndividual.dataConstr
• SwAxisIndividual.compuMethod.unit
against their respective counterparts in the ApplicationPrimitiveDataTypes
of the DataPrototype(s) referenced by means of SwAxisIndividual.swVari-
ableRef. c()
[constr_1420] Existence of SwAxisIndividual.inputVariableType d If the ref-
erence SwAxisIndividual.inputVariableType does not exist then either:
• SwAxisIndividual.dataConstr
• SwAxisIndividual.unit
or
• SwAxisIndividual.dataConstr
• SwAxisIndividual.compuMethod.unit
shall exist. c()
The constraint is necessary for the generation of the respective specification of the axis
in A2L.
Every ParameterDataPrototype then allows to specify zero or more input values
(being type compatible to inputVariableType) in its axis description.
This means that at the specification time of an SwcInternalBehavior a list of input
values has to be specified where the implementer of a RunnableEntity can choose
of. The input values are DataPrototype entities either being
AtpPrototype
DataPrototype
+localParameter 0..1
+/swDataDefProps 0..1
«atpVariation» AutosarDataPrototype
SwDataDefProps
+swCalprmAxisSet 0..1
+localVariable 0..1
+swCalprmAxis 0..*
+swCalprmAxisTypeProps 1
SwCalprmAxisTypeProps SwCalprmRefProxy
+swCalprmRef 1
SwAxisIndividual
0..*
+swVariableRef {ordered}
SwVariableRefProxy SwAxisGrouped
Figure 5.40: The nth COM_AXIS in the array of COM_AXISs uses the nth VALUE in the array
of VALUEs as working point.