跳转至

Software Component Template

参考文献

[1] Standardization Template(标准化模板)

AUTOSAR_FO_TPS_StandardizationTemplate

[2] Specification of RTE Software(RTE 软件规范)

AUTOSAR_CP_SWS_RTE

[3] Virtual Functional Bus(虚拟功能总线)

AUTOSAR_CP_EXP_VFB

[4] Methodology for Classic Platform(经典平台方法论)

AUTOSAR_CP_TR_Methodology

[5] Layered Software Architecture(分层软件架构)

AUTOSAR_CP_EXP_LayeredSoftwareArchitecture

[6] Basic Software Module Description Template(基础软件模块描述模板)

AUTOSAR_CP_TPS_BSWModuleDescriptionTemplate

[7] Specification of Timing Extensions for Classic Platform(经典平台时序扩展规范)

AUTOSAR_CP_TPS_TimingExtensions

[8] Requirements on Timing Extensions(时序扩展需求)

AUTOSAR_FO_RS_TimingExtensions

[9] Specification of ECU Resource Template(ECU 资源模板规范)

AUTOSAR_CP_TPS_ECUResourceTemplate

[10] System Template(系统模板)

AUTOSAR_CP_TPS_SystemTemplate

[11] Generic Structure Template(通用结构模板)

AUTOSAR_FO_TPS_GenericStructureTemplate

[12] Supplementary material of general blueprints for AUTOSAR(AUTOSAR 通用蓝图补充材料)

AUTOSAR_CP_TR_GeneralBlueprintsSupplement

[13] Specification of Manifest(清单规范)

AUTOSAR_AP_TPS_ManifestSpecification

[14] Information technology - Universal Coded Character Set (UCS)(信息技术—通用编码字符集(UCS))

https://www.iso.org

[15] ASAM MCD-2 MC (ASAP2 / A2L)(ASAM MCD-2 MC(ASAP2 / A2L))

http://www.asam.net

[16] Specification of I/O Hardware Abstraction(I/O 硬件抽象规范)

AUTOSAR_CP_SWS_IOHardwareAbstraction

[17] ISO 17356-4: Road vehicles - Open interface for embedded automotive applications - Part 4: OSEK/VDX Communication (COM)(道路车辆—嵌入式汽车应用开放接口—第 4 部分:OSEK/VDX 通信(COM))

[18] Specification of Module E2E Transformer(E2E 变换器模块规范)

AUTOSAR_CP_SWS_E2ETransformer

[19] Specification of SW-C End-to-End Communication Protection Library(SW-C 端到端通信保护库规范)

AUTOSAR_CP_SWS_E2ELibrary

[20] Specification of Communication Manager(通信管理器规范)

AUTOSAR_CP_SWS_COMManager

[21] Specification of Basic Software Mode Manager(基础软件模式管理器规范)

AUTOSAR_CP_SWS_BSWModeManager

[22] Specification of Communication(通信规范)

AUTOSAR_CP_SWS_COM

[23] Diagnostic Extract Template(诊断提取模板)

AUTOSAR_CP_TPS_DiagnosticExtractTemplate

[24] Log And Trace Extract Template(日志与跟踪提取模板)

AUTOSAR_FO_TPS_LogAndTraceExtract

[25] Specification of Platform Types for Classic Platform(经典平台平台类型规范)

AUTOSAR_CP_SWS_PlatformTypes

[26] ISO/IEC 9899:1999

https://www.iso.org

[27] AUTOSAR XML Schema Production Rules(AUTOSAR XML 模式生成规则)

AUTOSAR_FO_TPS_XMLSchemaProductionRules

[28] ASAM MCD 2 Harmonized Data Objects Version 1.1(ASAM MCD 2 协调数据对象 1.1 版)

[29] Collection of blueprints for AUTOSAR M1 models(AUTOSAR M1 模型蓝图集)

AUTOSAR_FO_MOD_GeneralBlueprints

[30] ISO 26262:2018 (all parts) - Road vehicles - Functional Safety(道路车辆—功能安全)

https://www.iso.org

[31] ASAM AE Calibration Data Format V2.0.0(ASAM AE 标定数据格式 2.0.0 版)

http://www.asam.net

[32] Specification of Operating System(操作系统规范)

AUTOSAR_CP_SWS_OS

[33] Specification of ECU Configuration Parameters (XML)(ECU 配置参数规范(XML))

AUTOSAR_CP_MOD_ECUConfigurationParameters

[34] Guidelines for the use of the C language in critical systems(关键系统中 C 语言的使用指南,MISRA C 2012)

[35] Glossary(术语表)

AUTOSAR_FO_TR_Glossary

[36] Specification of NVRAM Manager(NVRAM 管理器规范)

AUTOSAR_CP_SWS_NVRAMManager

[37] ASAM AE Functional Specification Exchange Format V1.0.0(ASAM AE 功能规范交换格式 1.0.0 版)

http://www.asam.net

[38] Specification of Watchdog Manager(看门狗管理器规范)

AUTOSAR_CP_SWS_WatchdogManager

[39] Specification of ECU State Manager(ECU 状态管理器规范)

AUTOSAR_CP_SWS_ECUStateManager

[40] Specification of Function Inhibition Manager(功能禁止管理器规范)

AUTOSAR_CP_SWS_FunctionInhibitionManager

[41] Specification of Diagnostic Event Manager(诊断事件管理器规范)

AUTOSAR_CP_SWS_DiagnosticEventManager

[42] Specification of Diagnostic Communication Manager(诊断通信管理器规范)

AUTOSAR_CP_SWS_DiagnosticCommunicationManager

[43] Road vehicles - Diagnostic communication over Internet Protocol (DoIP)(道路车辆—基于互联网协议(DoIP)的诊断通信)

https://www.iso.org

[44] Specification of Diagnostic Log and Trace(诊断日志与跟踪规范)

AUTOSAR_CP_SWS_DiagnosticLogAndTrace

[45] Specification of Synchronized Time-Base Manager(同步时基管理器规范)

AUTOSAR_CP_SWS_SynchronizedTimeBaseManager

[46] Specification of Secure Onboard Communication(车载安全通信规范)

AUTOSAR_CP_SWS_SecureOnboardCommunication

[47] Specification of a Request Manager for SAE J1939(SAE J1939 请求管理器规范)

AUTOSAR_CP_SWS_SAEJ1939RequestManager

[48] Specification of Default Error Tracer(默认错误跟踪器规范)

AUTOSAR_CP_SWS_DefaultErrorTracer

[49] Specification of Vehicle-2-X Facilities(V2X 设施规范)

AUTOSAR_CP_SWS_V2XFacilities

[50] Specification of Vehicle-2-X Management(V2X 管理规范)

AUTOSAR_CP_SWS_V2XManagement

[51] Requirements on Software Component Template(软件组件模板需求)

AUTOSAR_CP_RS_SoftwareComponentTemplate

[52] Specification of SOME/IP Transformer(SOME/IP 变换器规范)

AUTOSAR_CP_SWS_SOMEIPTransformer

[53] Software Process Engineering Meta-Model Specification(软件过程工程元模型规范)

http://www.omg.org/spec/SPEM/2.0/

1. 简介

1.1. 概述

本文档包含 AUTOSAR 软件组件模板(Software Component Template)的规范。实际上,它是通过 AUTOSAR 元模型对软件组件模板形式化定义的补充。换言之,本文档在形式化规范之外,还提供了与软件组件定义相关的 AUTOSAR 元模型部分的入门描述和依据。

在此上下文中,术语软件组件指一个被正式描述的、需要 AUTOSAR RTE [2] 才能执行的软件实体。

请注意,应用软件组件语义背后的一般思想已在《虚拟功能总线》规范 [3] 中描述。不过,后者代表的是概念性工作,它强烈影响但不完全支配软件组件的形式化定义。

另请注意,本文档不提供任何软件组件建模的 “最佳实践” 建议,也不要求或强制某种方法论。不过,方法论方面由《AUTOSAR 方法论》规范 [4] 涵盖。

尽管毫无疑问,使用合适的 AUTOSAR 创作工具来处理 AUTOSAR 软件组件是合理的,但本规范不对工具作任何假设,也不给出建议。

1.2. 范围

如第 1.1 章所述,本文档的范围是 AUTOSAR 软件组件的描述。本工作涵盖以下三个方面:

  • 使用 PortPrototype 和 PortInterface 对 SwComponentType 的一般描述,即本文档将 SwComponentType 定义为一个可以通过提供或需要 PortInterface 的 PortPrototype 来描述的实体。

  • 对 CompositionSwComponentType 的描述,它是由相互连接的软件组件实例构成的子系统,即软件组件可以以分层子系统的形式定义,而子系统又由软件组件组成。此类分层结构的描述属于本文档的范围。

  • 对 AtomicSwComponentType 的描述,它实现为可映射到 AUTOSAR ECU 的一段软件。因此 AtomicSwComponentType 会出现在 ECU 软件架构

(见图 1.1)中。在该图中,绿色(竖条纹)和蓝色(斜条纹)边框标出了由软件组件模板描述的方面。

与 RTE 无关的 AUTOSAR 基础软件方面不在范围内;它们由《基础软件模块描述模板》[6] 涵盖。

此外,本文档不涉及与 AUTOSAR 软件组件执行相关的时序分析方面。该问题在《时序扩展规范》[7] 及相应需求规范 [8] 中说明。

1.3. 元模型的组织

图 1.2 勾勒了元模型的整体结构,该元模型正式定义了描述 AUTOSAR 软件组件所需的词汇。如图所示,其他模板规范(例如 ECU 资源模板 [9] 和系统模板 [10])也使用相同的建模方法,以定义整体一致的 AUTOSAR 软件描述模型。

图中的虚线箭头描述元模型内各包之间按导入关系的依赖。例如,包

SWComponentTemplate 导入包 GenericStructure [11] 和 ECUResourceTemplate [9] 中定义的元类。

请注意,本规范文档将(除一些明确定义的例外)主要讨论在包 SWComponentTemplate 中定义的元模型元素。

为澄清起见,请注意包 GenericStructure 包含一些在 [11] 中描述的基础设施元类和通用模式。由于它们被所有其他模板规范使用,为清晰起见,图中未描绘这些依赖关联。

1.4. 模板的结构

如图 1.3 所示,AUTOSAR 软件组件在三个不同的层级上描述。

1.4.1. VFB 层级的软件组件描述

最高(最抽象)的描述层级是虚拟功能总线 [3]。在本文档中,SwComponentType 用 DataType、PortInterface、PortPrototype 及其之间的连接来描述。在该层级上,表达组件的基本通信属性以及它们彼此之间的通信关系。

在图 1.3 所描绘的图中,这一方面通过对 AtomicSwComponentType 的描述来表达。

1.4.2. RTE 层级的软件组件描述

中间层级允许对给定 AtomicSwComponentType 的行为进行描述。SwcInternalBehavior 按照 AUTOSAR RTE 概念建模,例如 RTEEvent,以及作为执行单元的 RunnableEntity。

例如,对于 VFB 上特定 ClientServerInterface 范围内定义的 ClientServerOperation,行为规定调用该 ClientServerOperation 后激活哪个 RunnableEntity。

如图 1.3 所勾勒,给定 AtomicSwComponentType 可以聚合零个或一个 SwcInternalBehavior。

In response to the existence of the stereotype glyph[lessmuch] atpSplitable glyph[greatermuch] at one aggregation, it is possible to distribute the aggregation over several physical files.

1 为避免杂乱并避免要求关于元模型的额外前置信息,图中未加入 CompositionSwComponentType。

1.4.3. 实现层级的软件组件描述

最低的描述层级规定给定 SwcInternalBehavior 描述的实现(即按 AUTOSAR 元模型的术语:SwcImplementation)。更精确地说,该行为的 RunnableEntity 被映射到代码(源代码或目标代码)。

可以有多个引用特定 SwcInternalBehavior 描述的不同 SwcImplementation,例如用不同的编程语言,或以不同方式优化的代码。

请注意,Implementation 在本文档的先前版本中已有描述。随着 AUTOSAR 标准的演进,Implementation 方面的描述已移至 “CommonStructure”(见图 1.2),因为它也用于创建《基础软件模块描述模板》[6]。

SwcImplementation 仍保留在本文档的范围内,因为它专门涵盖软件组件(而非基础软件模块)的方面。

1.5. 文档约定

技术术语以等宽字体排版,例如 PortPrototype。一般规则是,技术术语的复数形式通过在单数形式后加 “s” 构成,例如 PortPrototype。借此,本文档类似于 AUTOSAR XML 模式中使用的术语。

This document contains constraints in textual form that are distinguished from the rest of the text by a unique numerical constraint ID, a headline, and the actual constraint text starting after the glyph[ceilingleft] character and terminated by the glyph[floorright] character.

这些约束的目的是字面上约束对 AUTOSAR 元模型的解释,从而能够检测元模型实例(即在 M1 层级)中实现的标准化行为的违规。

鼓励 AUTOSAR 工具的制造者将与 M1 建模问题对应的约束数字 ID 作为工具发出的诊断消息的一部分加入。

本文档中引入的类的属性以类表的形式列出。它们具有顶层元素 AUTOSAR 示例所示的形式:

请注意,约束并不要求在 AUTOSAR 工作流的任意给定时间都可执行。在模型开发期间,约束可以被合理地违反,因为不完整的模型显然会显示不一致。

然而,在工作流的特定时点,应执行约束以防止错误配置。

工作流中应执行约束的时点(有时也称为约束的 “绑定时间”)对每个模型类别都不同,例如在经典平台上,为软件组件定义的约束通常在 RTE 生成之前执行,而针对 ECU 提取定义的约束应在为 Com 协议栈创建 ECU 配置时应用。

对于每个文档,都定义了约束可能的绑定时间,并且绑定时间通常在约束自身中提及,以便为 AUTOSAR 创作工具的实现者提供正确的指引。

以 AUTOSAR 作为典型类表的示例。表中前几行的含义如下:

Class:UML 模型中定义的类的名称。

Package:定义该类的 UML 包。列出它只是为了帮助在整体元模型中定位该类。

Note:建模者为该类给出的注释(类注记)。类的构造型和 UML 标签也在此注明。

Base Classes:如适用,直接基类的列表。

表中的表头含义如下:

Attribute:类的一个属性的名称。注意,AUTOSAR 不区分类属性和拥有的关联端。

Type:类的一个属性的类型。

Mul.:属性被指派的多重性,即给定数据类型的多少个实例与该属性关联。

Kind:规定该属性是在类中聚合的(aggr 聚合)、类中的一个 UML 属性(attr 原始属性),还是仅被类引用(ref 引用)。此字段还指示实例引用(iref 实例引用)。

Note:建模者为类属性给出的注释(角色注记)。类的构造型和 UML 标签也在此注明。

请注意,以字母而非数字开头的章节表示文档的附录。附录的目的是支持对文档某些方面的说明,不代表标准的有约束力的约定。

应使用 [TPS_STDT_00053] 中规定的表达义务的助动词形式来指示需求,见《标准化模板》的 “Support for Traceability” 章([1])。

AUTOSAR 文档中需求的表示遵循 [TPS_STDT_00078] 中规定的表,见《标准化模板》的 “Support for Traceability” 章([1])。

1.6. 关于表

本文档中有若干表描述模型元素的适用性或多重性。这些表包含空单元格,空单元格表示 “不适用” 的含义。对应空单元格的模型元素在相应表单元格所描述的上下文中不应存在。

如果表单元格的值要指示所表示模型元素的存在性或多重性无论如何都应被忽略,则该表单元格取内容 “d/c”(“无关紧要”)。这意味着如果相应模型元素存在,它应在模型的下游处理中被忽略。

2. 概念方面

2.1. 简介

为了紧凑地描述相关元模型元素,概念方面的讨论和说明集中在本章。

阅读本章不是理解后续章节的前提。它只是为本文档其他各章所使用的概念方面提供一个集中详述的位置。

软件组件概念的实际阐述从第 3 章开始。

2.2. 测量和标定

2.2.1. 测量和标定的基本方法

在使用 MCD 工具(测量、标定和诊断)执行标定过程时,标定工程师需要深入了解运行时 CPU 内的数据。

这种了解通过访问 ECU 内部变量(也称为测量变量)以及标定参数(有时也称为特征值)提供。更多细节请参见 [TPS_SWCT_01418]。

测量变量和标定参数的描述基本相同。在 AUTOSAR 中,两者最终都以 DataPrototype 的形式出现。

2.2.2. 标定参数概览

标定参数(Calibration Parameter)是刻画控制算法动态特性的参数。从软件实现的角度看,它是 ECU 正常运行期间只有读访问的变量。

标定参数(部分示例勾勒于图 2.1)就其关联类型而言是特化的 DataPrototype 实体,但用法类似。

定义标定参数的方式:

  • 在 SwComponentType 的 SwcInternalBehavior 中针对单个 SwComponentPrototype,通过在角色 perInstanceParameter 中聚合 ParameterDataPrototype(类似于每实例内存所支持的变体)。

  • 在 SwComponentType 的 SwcInternalBehavior 中由同一 SwComponentType 的所有 SwComponentPrototype 共享,通过在角色 sharedParameter 或 constantMemory 中聚合 ParameterDataPrototype。

  • 供多个 SwComponentPrototype 使用(使用带 ParameterInterface 的端口/接口概念)。

请注意:

  • perInstanceParameter 的定义在第 2.2.3.3 章进一步描述。

  • 第 2.2.3.2 章提供关于 sharedParameter 或 constantMemory 定义的更多信息。

  • 关于 ParameterInterface 定义的更多信息,请参见第 2.2.3.1 章。

注意: 各种标定对象的结构在 [12] 中有可视化说明。

2.2.3. 使用标定参数

如上所述,ParameterDataPrototype 既可用在 SwcInternalBehavior 的上下文中,也可用在 PortPrototype 的上下文中。

2.2.3.1. 在组合内共享标定参数

为了让标定参数在其他 SwComponentType 中可见,必须使用一个继承自 SwComponentType 的专用 ParameterSwComponentType(见图 3.4)作为 CompositionSwComponentType 内的 SwComponentPrototype。

需要访问共享标定参数的 SwComponentType 需要由 ParameterInterface 定义类型的 RPortPrototype:

需要访问共享标定参数的 SwComponentType 将拥有一个由 ParameterInterface 定义类型的 RPortPrototype。

在 CompositionSwComponentType 上下文中,这种共享标定访问的定义通过在相关 SwComponentPrototype 之间创建 SwConnector 来完成。

表2.1:ParameterSwComponentType(ParameterSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | 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 | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , SwComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
constant Mapping ConstantSpecification MappingSet * ref Reference to the ConstantSpecificationMapping to be applied for the particular ParameterSwComponentType Stereotypes: atpSplitable Tags: atp.Splitkey=constantMapping
dataType Mapping DataTypeMappingSet * ref Reference to the DataTypeMapping to be applied for the particular ParameterSwComponentType Stereotypes: atpSplitable Tags: atp.Splitkey=dataTypeMapping
instantiation DataDefProps InstantiationDataDef Props * aggr The purpose of this is that within the context of a given 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: atpSplitable; atpVariation Tags: atp.Splitkey=instantiationDataDefProps, instantiationData DefProps.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表2.2:ParameterInterface(ParameterInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A parameter interface declares a number of parameter and characteristic values to be exchanged between parameter components and software components. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , DataInterface , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
parameter ParameterData Prototype * aggr The ParameterDataPrototype of this ParameterInterface.

ParameterInterface 不限于实际可标定的参数:

只要在软件正常运行期间不得对数据进行写访问,即接口上只有常量数据可见,就可以使用它。

ParameterInterface 的兼容性规则在第 6.4 章描述;ParameterDataPrototype 的兼容性规则在第 6.4.4 章描述。

由 ParameterInterface 定义类型的 PortPrototype 的委托:

这意味着 SwComponentPrototype 之间对标定参数的每次访问都是显式可见的。

如果 SwComponentPrototype 映射到两个不同 ECU 之后 SwConnector 跨越 ECU 边界,系统生成过程必须确保 ParameterDataPrototype 的正确分配。标定系统必须能够同步设置受影响 ECU 上的参数。

2.2.3.2. 同一 SwComponentType 的 SwComponentPrototype 之间共享标定参数

要在同一 SwComponentType 的多个 SwComponentPrototype 之间共享标定参数,需将一个 ParameterDataPrototype 以 sharedParameter 角色附加到 SwcInternalBehavior(见 [TPS_SWCT_01418])。

当 SwcInternalBehavior 由 AtomicSwComponentType 聚合时,ParameterDataPrototype 的实际标定参数对所有 SwComponentPrototype 携带相同的值。

角色 constantMemory 中聚合的 ParameterDataPrototype:

与 sharedParameter 角色中的 ParameterDataPrototype 不同,这种内存不由 RTE 实例化。

这种方法避免了 RTE 组件数据结构引起的额外间接访问,从而支持更高效的实现(特别是对于以目标代码交付的软件组件)。

这种内存减少了软件组件实现对生成的 RTE 代码的依赖,这对安全相关功能很有价值。

尽管如此,关于这些特征值的信息必须纳入 A2L 文件的生成。

这种实例间共享代码的典型例子是多缸组发动机中处理两个 lambda 传感器,其中每个 lambda 传感器的(至少)两个 SwComponentPrototype 会使用完全相同的标定参数。

2.2.3.3. 提供实例特定的特征数据

角色 perInstanceParameter 中聚合的 ParameterDataPrototype:

如果 SwcInternalBehavior 附加到 AtomicSwComponentType,则实际标定值对每个 SwComponentPrototype 是特定的。

2.3. 运行时与数据一致性方面

2.3.1. 背景:问题所在

本节提供一些背景信息,并列举关于 RunnableEntity 和 RTE 实现的可能策略,以实现 RunnableEntity 之间的高效通信。

RunnableEntity 之间的通信可以通过 “共享内存” 非常高效地实现。

这在技术上是可行的,因为始终保证 AtomicSwComponentType 内的 RunnableEntity 都聚集在特定的处理单元上(换言之:分布不是选项)。

注意,RunnableEntity 之间通信的目的是建立数据流方案。后者是控制理论应用于汽车嵌入式系统时非常常见的模式。

因此,如果使用 “全局变量” 来建立 RunnableEntity 之间的内部通信,它们就获得所谓状态消息(state-message)的语义。

然而,在 RunnableEntity 之间直接共享内存需要解决一个严肃的问题:保证相互通信的 RunnableEntity 之间的数据一致性。

RunnableEntity 确实会被映射到任务,因此 AtomicSwComponentType 的一个 RunnableEntity 可能被同一 AtomicSwComponentType 的另一个 RunnableEntity 抢占。

1 请注意,“共享内存” 一词可以在不同层面上解释。例如在 C 语言中,可以使用具有外部链接的变量(又称 “全局变量”,尽管该术语未被 C 语言正式定义)来实现可运行体之间的通信。

请注意,实现数据一致性的严格方法不仅适用于对并发访问变量的单次访问。

而且,不允许具有状态消息语义的并发访问变量的值在 RunnableEntity 运行期间被无意地更改。

以下段落描述一些可用于确保所需数据一致性的常见策略。本文档不试图描述这些方法的优缺点。

2.3.1.1. 使用信号量的互斥

多线程操作系统提供互斥量(mutex,互斥信号量),保护从多个任务内访问独占资源。

RTE 可以使用操作系统提供的互斥量,确保共享内存空间的 RunnableEntity 永不并发运行。RTE 会确保运行该 RunnableEntity 的任务在访问 RunnableEntity 之间共享的内存之前已取得适当的互斥量。

2.3.1.2. 中断禁用

另一种替代方法是在 RunnableEntity 运行期间禁用中断,或者至少在从 RunnableEntity 内第一次到最后一次使用并发访问变量的时间段内禁用中断。这种方法可能导致非常不确定的执行时序。

2.3.1.3. 优先级天花板

优先级天花板(priority ceiling)允许对共享资源进行非阻塞保护。只要优先级方案是静态的,AUTOSAR OS 能够将试图访问共享资源的任务的优先级临时提升到所有可能访问该资源的任务中的最高优先级。

这样,在技术上不可能出现临时占有资源的任务被另一个也试图访问该资源的任务抢占的情况。

2.3.1.4. 通过变量副本的隐式通信

另一种替代方法是使用具有状态消息语义的并发访问变量的副本。注意,该方法直接对应于 “隐式” sender-receiver 通信的语义(见 7.5.1.2)。

这特别意味着:为并发使用的变量创建一个副本,RunnableEntity 可以在副本上工作,没有任何数据不一致的危险。

该概念需要附加代码:在访问该变量的 RunnableEntity 执行之前,把并发访问变量的值写入副本;在该 RunnableEntity 终止之后,把副本的值写回并发访问变量。

该概念勾勒于图 2.4。由于手动处理复制例程成本太高且容易出错,把附加代码的生成交给合适的代码生成器是个好主意。

如图 2.4 所勾勒的附加复制例程,已经保护特定 RunnableEntity 免受并发访问变量的意外更改。

不过,可以通过减少每个任务开头和结尾的附加代码来进一步优化该过程(见图 2.5)。

2.3.2. 运行时的数据一致性

此外,复制例程只在适当的地方插入,例如:只有当 RunnableEntity 对并发使用的变量有写访问时,才插入把副本值写回并发访问变量的复制例程。

请注意,复制例程必须临时确保复制过程不被中断,以便能够一致地从并发访问变量复制值或向其复制值。

不过,这些时段与 RunnableEntity 的整体运行时间消耗相比应非常短,因此不会对运行时行为产生显著影响。

可以应用进一步的优化标准,例如:(如图 2.5 所勾勒)对于调度在最高优先级任务中的 RunnableEntity——该任务在所有(经由所含 RunnableEntity)访问某个并发访问变量的任务中优先级最高——完全安全地避免为其创建副本。

为了使应用代码不依赖代码生成,对并发访问变量的访问将由宏保护,这些宏稍后由代码生成器解析。

保护宏的存在直接支持源代码层级的复用。目标代码层级的复用只有在调度场景(就 RunnableEntity 到优先级层级的指派而言)不变时才可能。

只有能够识别相关变量时,该概念才能借助代码生成器正确实现。换言之:AtomicSwComponentType 的描述必须向外界暴露所有并发访问的变量。

2.3.3. 数据一致性的建模方面

“显式通信” 和 “隐式通信” 两个术语的内在含义在第 7.5.1.1 节中解释。

可以说,隐式通信与显式通信的区分在应用领域——即 AUTOSAR 软件组件开发者及其实现的世界——建立了一种使用模式。

不过,这个主题还有另一个侧面,即该模式如何在元模型中实现的问题。关于该模式在基于端口的通信中的应用,细节见第 7.5.1.2 节,更具体地说在第 7.5.1.3 节。

基于所谓 “可运行体间变量(inter-runnable variables)” 的内部通信的考虑在第 7.4.2 节描述。

阅读相应文本章节后会明显发现,该模式的两种应用建模方式不同。基于端口的通信使用 VariableAccess 来形式化访问通信元素的不同角色。

为此使用的一些角色意味着显式通信(例如 dataSendPoint),一些表示隐式通信(例如 dataWriteAccess)。

不过,使用 VariableAccess 的关键在于:通信角色的建模从实际通信元素中抽象出来,并代表一种统一的(即可以直接引用目标,也可以通过所谓 InstanceRef 引用目标)建模方法,该方法适用于所有用例。

诚然,内部通信的处理方式不同。这里(尽管在技术上可行)没有使用这一额外的抽象层,而是靠 RTE 中 “具有隐式行为的可运行体间变量” 与 “具有显式行为的可运行体间变量” 的清晰区分。

不同通信角色(即隐式与显式)的实现通过直接在角色 explicitInterRunnableVariable 和 implicitInterRunnableVariable 中聚合 VariableDataPrototype 来完成。

另一方面,对内部通信的访问从不需要使用 InstanceRef,因此这种抽象可能被视为使 M1 模型杂乱的不必要开销。

2.4. 软件组件模板中的变体处理

软件组件模板在其模型元素的一个子集中支持创建变体(Variant)。支持变体的模型元素完整列表见附录。

软件组件模板内对变体处理的支持:

  • SwComponentPrototype 的存在;

  • SwConnector 的存在;

  • SwComponentDocumentation 的 Chapter 的存在;

  • PortPrototype 的存在。

这种方法支持在特定系统变体中调整软件组件实例的数量和种类以及它们的互连。

2 顺带一提,即使是与通信无关的数据访问,同样的模式也适用,由 ParameterAccess 实现。

软件组件模板范围内模型元素的适用绑定时间:

SwConnector 依 PostBuild 条件而存在:

如果 SwConnector 不存在,RTE API 函数的行为需要考虑这一警告。

这意味着该 PortPrototype 的 RTE 实现类似于未连接 PortPrototype 的行为。

更多细节见 RTE 规范 [2]。

不存在的 SwConnector 的 API 函数仍是软件组件实现的一部分:

因此,PortPrototype 条件性存在的最晚合理绑定时间是 preCompileTime。

行为层级上的变体:

已识别的主要用例有:

  • RunnableEntity 的存在;

  • RTEEvent 的存在;

  • 角色 implicitInterRunnableVariable 和 explicitInterRunnableVariable 中 VariableDataPrototype 的存在;

  • 角色 perInstanceParameter、sharedParameter 和 constantMemory 中 ParameterDataPrototype 的存在。

出于与 PortPrototype 存在性相同的理由,这些种类的可变性的最晚绑定时间是 preCompileTime。

在元模型中,所有可能表现出可变性的位置都用构造型 <atpVariation> 装饰。这一装饰允许定义可能的变体点。

标签值(Tagged Values)用于规定附加信息,例如最晚绑定时间。

元模型中可能表现出可变性的四类位置:

  • 聚合;

  • 关联;

  • 属性值;

  • 提供属性集的类。

glyph[floorright] (RS_SWCT_00220, RS_SWCT_03100)

把构造型 <atpVariation> 附加到某些模型元素的原因及其对其他模型元素的影响,在以下各章的类表中解释。

关于 AUTOSAR 变体处理概念的更多细节见《AUTOSAR 通用结构模板》[11]。

2.5. 组合组件类型的通信规范

由 CompositionSwComponentType 定义的 ComSpec:

2.5.1. 依据

附加到 AtomicSwComponentType 拥有的 PortPrototype 上的 ComSpec(详见第 4.5 节)对 RTE 的生成有直接影响。

另一方面,RTE 生成器不考虑 CompositionSwComponentType 的存在。

尽管如此,在某些情况下,为 CompositionSwComponentType 拥有的 PortPrototype 定义 ComSpec 是有意义的。

也就是说,当 OEM 想把 CompositionSwComponentType 的定义交给供应商以添加更多细节并实现行为时,OEM 可能想指出:从 OEM 的角度看,发送方 initValue 和接收方 initValue 适用于用于为委托 PortPrototype 定义类型的 PortInterface 的元素。

其想法是:供应商接管附加到委托 PortPrototype 上的 initValue,并将它们复制到 CompositionSwComponentType 的 SwComponentPrototype 所拥有的 PortPrototype 上。

根据所有权考虑 RPortComSpec 或 PPortComSpec:

因此,委托 PortPrototype 的 initValue 只应被视为对连接到委托 PortPrototype 的 PortPrototype 进行细化的模板。

不要求委托 PortPrototype 与通过 DelegationSwConnector 连接的 PortPrototype 的 initValue 匹配。

虽然这在许多情况下确实合理,但最终仍由供应商决定 CompositionSwComponentType 内适用的具体 initValue。

另一方面,要求 CompositionSwComponentType 表面定义的 initValue 与其内部定义的 initValue 在任何情况下都保持一致,实际上可能阻止对现有 AtomicSwComponentType 的复用。

请注意,在 CompositionSwComponentType 上下文中定义 ComSpec 的能力意味着:应当能够定义 PortInterface 中使用的 ApplicationDataType 到其相应 ImplementationDataType 的映射。

为此,CompositionSwComponentType 在角色 dataTypeMapping 中拥有一个 DataTypeMappingSet,在角色 constantValueMapping 中拥有一个 ConstantSpecificationMappingSet。

2.6. PRPortPrototype

在某些情况下,SwComponentType 需要读取和写入同一段数据。该用例最突出的例子之一是实际上读取和写入 NvRAM 块的 NvBlockSwComponentType。

应用软件组件

NvBlock 软件组件

如果不能在一种同时支持读和写语义的 PortPrototype 中组合读写语义,就必须实现某些变通方法,它们会带来一定的内存和处理时间开销。

2.6.1. 用例 1

如果不能定义组合的读写语义,则必须如图 2.7 所勾勒,为读写相应数据定义一个 RPortPrototype 和一个 PPortPrototype 的组合。

在技术上,这种读写访问与 NVRAM 块中同一数据项相关。这要求 NvBlockSwComponentType 与 ApplicationSwComponentType 之间的 PortPrototype 连接一致,并且 NvBlockSwComponentType 的相应 RPortPrototype 和 PPortPrototype 与 ramBlock 相关元素的映射一致。

2.6.2. 用例 2

可能出现 SwComponentType 需要消费它自己产生的数据的情况,如图 2.8 所示例。

如果实现这一点的唯一方式是把 PPortPrototype 连接到同一 SwComponentType 的 RPortPrototype,那么 SwComponentType 的创建者无法强制这种连接,因为它是在 CompositionSwComponentType 上下文中以更高的抽象层级创建的。

换言之,无法完整规定这个本应自含的 SwComponentType 的语义。

应用软件组件 A

(读访问)

写访问

这意味着最好情况下只需为该数据分配一个缓冲区。但根据 RunnableEntity 到 OS 任务的映射,RTE 可能需要分配额外的缓冲区才能完整实现隐式通信模式。

作为替代,ApplicationSwComponentType 可以使用可运行体间变量,但遗憾的是这会阻碍 RTE 中的任何优化,并消耗额外的 RAM。与前一种方法相比,至少需要两个缓冲区。

2.6.3. 用例 3

在这种场景中,多个 ApplicationSwComponentType 对同一大数据集进行迭代处理,如图 2.9 所勾勒。

这意味着每个 ApplicationSwComponentType 实现应用于同一数据的复杂数据处理算法众多步骤中的一步。

例如,该场景可能适用于摄像头应用中的视频信号处理。通常,此类应用不会分布到多个 ECU 上。

显然,在这种情况下,需要在 RTE 中分配多个缓冲区,以实现 ApplicationSwComponentType 之间的各个连接。

在大多数情况下,处理必须在特定时点按专门顺序执行。

-

P_MyData

应用软件组件 A

写访问

应用软件组件 B

写访问

应用软件组件 C

写访问

2.6.4. 解决方案

解决上述用例的方法是能够定义一个可以读和写同一段数据的 PortPrototype。这既解决了所述的资源消耗问题,也解决了必须为同一段数据项定义多个 PortPrototype 作为出口的问题。

PRPortPrototype 定义的技术细节在第 3.2.2 章和第 4.2.1 章中说明。

2.7. 可变大小数组数据类型

2.7.1. 概述与用例

AUTOSAR 支持定义实际载荷大小在运行时变化的数组数据类型。就配置而言,可以规定运行时不得超过的数组元素最大数量。

为了正确理解该方法,有必要了解:可变大小数组数据类型的支持分两波引入,各有不同动机。

2.7.1.1. “旧式”动态大小数组

第一波中,可变大小数组数据类型的支持仅限于基本归结为数组的数据类型,其基本类型是长度恰好为一个字节的无符号整数数据类型。

该场景的主要用例源自诊断需求以及对 J1939 通信协议的支持。

在这两种情况下,可变大小数组数据类型的实际长度都可以从上下文确定,即由诊断基础软件模块或由 J1939 TP 的实现确定。

由于缺乏更好的术语,本规范区分 “旧式” 动态大小数组与 “新式” 可变大小数组数据类型。必须清晰地定义能够区分两者的特征。

通过 ApplicationArrayDataType 定义 “旧式” 动态大小数组数据类型:

请注意,[TPS_SWCT_01641] 无法深入该数据类型的具体细节,因为它有意聚焦于 ApplicationDataType。存在一些用例,需要在没有相应 ImplementationDataType 的情况下区分 “旧式” 动态大小数组与 “新式” 可变大小数组数据类型。

一般而言,如果有相应 ImplementationDataType 的定义可用,消歧就变得多面化(但不一定更容易)(见 [TPS_SWCT_01642])。

通过 ImplementationDataType 定义 “旧式” 动态大小数组数据类型:

  • 属性 category 的值设置为 ARRAY;

  • ImplementationDataType 不定义属性 dynamicArraySizeProfile;

  • ImplementationDataType 聚合一个 subElement,其中:

  • 属性 arraySizeSemantics 存在且设置为值 variableSize;

  • 属性 arraySizeHandling 不存在;

  • 适用以下条件之一:

  • subElement.category 设置为 VALUE 或最终归结为 VALUE 的 TYPE_REFERENCE,且属性 subElement.swDataDefProps.baseType.baseTypeDefinition.baseTypeSize 设置为值 8,属性 baseTypeEncoding 设置为 NONE;

  • subElement.category 设置为 TYPE_REFERENCE,且属性 subElement.swDataDefProps.implementationDataType 字面上表示名为 uint8 的平台数据类型;

  • subElement.category 设置为 TYPE_REFERENCE,且属性 subElement.swDataDefProps.implementationDataType.shortName 设置为 uint8,且 subElement.swDataDefProps.baseType.baseTypeDefinition.nativeDeclaration 不存在。

glyph[floorright] (RS_SWCT_03181)

大体而言,“旧式” 动态大小数组的决定性特征是缺少属性 ApplicationArrayDataType.dynamicArraySizeProfile 或 ImplementationDataType.dynamicArraySizeProfile 的定义。

按照 [constr_1387] 的规定,“旧式” 动态大小数组不支持通过数据变换器传输。唯一支持用数据变换器传输的可变大小数组数据类型是 “新式” 可变大小数组。

2.7.1.2. “新式”可变大小数组

与此相反,第二波可变大小数组数据类型的支持由应用软件层自身推动。

这里的情况完全不同,因为实际长度无法由任何上下文软件模块确定。应用本身负责在运行时维护可变大小数组数据类型的正确长度。

因此,运行时实际数组大小的规定需要反映在承载可变大小数组数据类型的数据类型的结构中。

通过 ApplicationArrayDataType 定义 “新式” 可变大小数组数据类型:

  • ApplicationArrayDataType 定义属性 ApplicationArrayDataType.dynamicArraySizeProfile;

  • ApplicationArrayDataType 聚合一个定义属性 ApplicationArrayElement.arraySizeHandling 的 ApplicationArrayElement。

glyph[floorright] (RS_SWCT_03181)

通过 ImplementationDataType 定义 “新式” 可变大小数组数据类型:

  • ImplementationDataType 定义属性 ImplementationDataType.dynamicArraySizeProfile;

  • ImplementationDataType 聚合一个定义属性 ImplementationDataTypeElement.arraySizeHandling 的 ImplementationDataTypeElement。

glyph[floorright] (RS_SWCT_03181)

与上述第一个用例相反,应用驱动的可变大小数组数据类型不能在数组数据类型的基本类型方面受限,即不能把底层数据类型限制为长度恰好一个字节的无符号整数数据类型。

除此之外,还需要支持可变大小数组数据类型的若干可能结构。这一方面描绘于图 2.10。

可变大小数组数据类型定义的剖面(profile)定义:

线性(Linear):可变大小数组数据类型的元素的数据类型本身不由可变大小数组数据类型组成。

该情形对应属性 dynamicArraySizeProfile 的可能值 VSA_LINEAR。

方形(Square):可变大小数组数据类型的元素的数据类型本身由可变大小数组数据类型组成,其中所有 “二阶” 数组的最大元素数量与 “一阶” 数组的最大元素数量相同。

这一情形对应属性 dynamicArraySizeProfile 的可能值 VSA_SQUARE。

矩形(Rectangular):可变大小数组数据类型的元素的数据类型本身由可变大小数组数据类型组成,其中 “二阶” 数组的最大元素数量彼此相同,但该值通常不同于 “一阶” 数组的最大元素数量。

这一情形对应属性 dynamicArraySizeProfile 的可能值 VSA_RECTANGULAR。

3 如果相同,该情形就归结为标记 (b) 的方形场景。

完全灵活(Fully Flexible):可变大小数组数据类型的元素的数据类型本身由可变大小数组数据类型组成,其中 “二阶” 数组的最大元素数量不必彼此相同,且(显然)也不必与 “一阶” 数组的最大元素数量相同。

这一情形对应属性 dynamicArraySizeProfile 的可能值 VSA_FULLY_FLEXIBLE。

glyph[floorright] (RS_SWCT_03181)

所述情形直接对应图 2.10 中不同种类可变大小数组的刻画:

  • 值 VSA_LINEAR 对应标记 (a);

  • 值 VSA_SQUARE 对应标记 (b);

  • 值 VSA_RECTANGULAR 对应标记 (c);

  • 值 VSA_FULLY_FLEXIBLE 对应标记 (d)。

请注意,可变大小数组数据类型中的叶元素不必是原始数据类型。如前所述,可以定义多维度可变大小数组数据类型。

“终端” 元素可以这样识别:它们不再建立进一步的可变大小数组数据类型。

另请注意,可变大小数组数据类型的建模是一个复杂的步骤,由一组规则和约束支配。

本规范的明确意图是尽可能降低规则集的复杂性,同时仍为用户提供强大的建模框架。

这一结论的主要后果是保持建模尽可能直接;换言之:有意去掉某些在建模框架自身内存在可接受变通方法的建模变体。

此类限制的一个具体例子是:对于 ImplementationDataType,可变大小数组数据类型只能在 AutosarDataType 层级定义。

有意不支持在 ImplementationDataTypeElement 层级定义可变大小数组数据类型,因为预期语义可以通过将 ImplementationDataTypeElement.category 赋值为 TYPE_REFERENCE,然后让它引用另一个实现该可变大小数组数据类型的 ImplementationDataType 来实现。

2.7.2. 应用数据类型的建模方面

在 AUTOSAR 分层数据类型概念的上下文中,ApplicationDataType 层级不关心可变大小数组数据类型的结构。

换言之,这种数据类型的实现方面被有意尽可能多地抽象,以支持 ApplicationDataType 定义背后的理念——即在适用程度上独立于实现的概念。

因此,在 ApplicationDataType 层级对可变大小数组数据类型的支持需要添加若干附加属性。细节见第 5.2.4.2 章。

如果可变大小数组数据类型在 ApplicationDataType 层级建模,则还必须提供一个伴随的 ImplementationDataType 以及同时引用 ApplicationDataType 和 ImplementationDataType 的 DataTypeMap。

反之则不适用,即可以只用一个 ImplementationDataType 定义可变大小数组数据类型,见 [TPS_SWCT_01622]。

2.7.3. 实现数据类型的建模方面

另一方面,用于实际承载可变大小数组数据类型的数据类型直接对应 ImplementationDataType 层级。

在这里,可以规定如何使用 ImplementationDataType 来定义可变大小数组数据类型。

AUTOSAR 元模型中 ImplementationDataType 的定义带有一定的通用性,该层级上对可变大小数组数据类型的支持以元模型中专用属性与

一组关于如何支持可变大小数组数据类型不同用例的处方(recipe)的混合形式出现。

这意味着,以创建可变大小数组数据类型为目的的 ImplementationDataType 定义,只有当这些数据类型的结构在不同的 AUTOSAR 软件实现中被复制时才有机会落地。

因此,AUTOSAR 规定了以创建可变大小数组数据类型为目的的 ImplementationDataType 应如何定义的通用方式:ImplementationDataType 应为 category STRUCTURE 并具有以下子元素:

  1. 一个确定实际大小的数值。该元素在本文档中通篇称为大小指示器(Size Indicator)。

  2. 由可变大小数组数据类型的基本类型组成的数组,实现该可变大小数组数据类型的载荷。数组的维度应定义为能够容纳预期的最大元素数量。

可变大小数组数据类型的大小指示器保存数组有效元素的数量。RTE 高效处理该数组需要这一信息。

在发送方一侧,该指示器由软件组件主动更新——只有它知道数组有多少个元素是有效的。

因此,应用必须保持有效元素数量与大小指示器一致。当软件组件把数据交给 RTE 时,RTE 把数据转交给变换器。

变换器可以(取决于变换器)对大小指示器求值,并只处理有效的数组元素。变换器的输出长度可变,且只包含必要的数据。因此,这可以更节省资源。

在接收方一侧,执行顺序中的最后一个变换器恢复数组的数据元素和大小指示器的值。该输出由 RTE 交给软件组件。应用此时知道数组中有效元素的数量。

为实现可变大小数组数据类型而需如何建模 ImplementationDataType 的细节见第 5.2.5 章,若干示例见附录 B.1.3。

2.8. 结构中的可选元素

2.8.1. 背景

AUTOSAR 经典平台支持在 SOME/IP 传输层上使用 TLV 数据编码。TLV 通常用于所传输数据的至少一部分可选存在并填充有意义值的情况。

换言之:数据结构的一个可选部分可以在一次数据传输中存在并携带有意义的值,而在另一次数据传输中完全缺失。

接收软件需要能够识别可选部分是否存在,并相应地读取其值。

如果在该特定通信实例中此类数据结构的可选部分不存在,接收软件也需要能够继续有意义地执行。

因此,必须能够精确识别数据结构中在特定数据传输实例下可能变为可选的部分。

就 AUTOSAR 元模型而言,该识别原则上可以附加在多个抽象层级:

  • AutosarDataType:在这种情况下,仅为通信目的所需的可选性仍会存在于数据类型的所有其他用途中。这看起来不平衡。

诚然,为同一数据类型定义不同的可选性配置可能导致出现一批结构相同、只在可选性上有差异的数据类型。不过,变体点的存在可能有助于缓解这一效应。

  • PortInterface:在这种情况下,可选性定义在实际需要之处。但是,原则上可以为由同一 AutosarDataType 定义类型的 DataPrototype 定义不同的可选性。

这会导致在同一 PortInterface 上下文中定义 C 数据类型的工作量增加。

在 AUTOSAR 经典平台 RTE API 定义的上下文中已识别出附加约束,最终使该选项不可行。

  • ComSpec:在这种情况下(更多信息请参见第 4.5 节),与在 PortInterface 层级定义可选性相比,可选性的定义会更加具体。

4 该缩写代表 tag-length-value(标签-长度-值)。

除此之外,在绝大多数情况下定义可选性的任务是 OEM 完成的,而 ComSpec 层级上的模型定义要求 SwComponentType 已存在,且这一许多情况下属于供应商的领域。

基于这一考虑,AUTOSAR 选择了在 AutosarDataType 层级实现定义可选性的概念。

3. 概述:软件组件、端口与接口

3.1. 简介

一次性详尽介绍软件组件模板的所有方面被认为过于复杂。因此本章概述软件组件、端口与接口的主要概念方面。

该概览随后将在第 4 章中细化为更多细节。

AUTOSAR 概念的目标之一是支持应用软件层级的复用。

换言之:应当能够复用现有工件来创建更多模型元素,而不是被迫从零创建每一个建模细节。

这种方法的一个后果是应用所谓的类型-原型模式 [11]。

类型-原型模式通过使用从原型到类型的引用创建,这些引用用 <isOfType> 装饰。这类引用的存在由 [constr_2633] 规定,见 [11]。

除其他外,该概念允许创建具有任意复杂性的软件组件分层结构。然而,分层结构的创建本身不影响整个系统的运行时行为。

实际行为完全在各个软件组件内部定义。

这一结论基于如下理解:软件组件针对所谓虚拟功能总线(VFB)开发——VFB 是一个抽象通信通道,不直接依赖 ECU 和通信总线。

VFB 不提供任何表达软件组件层次结构的手段。

当然,VFB 的使用对软件组件的设计还有进一步的影响:软件组件不得直接调用操作系统或通信硬件。

因此,软件组件可以在开发过程的相当晚的阶段才部署到实际 ECU 上。

为了使描述更精确,下文尽量使用准确的元模型术语,而不是相当模糊的 “组合” 和 “软件组件” 术语。

3.2. 软件组件

3.2.1. 概述

AUTOSAR 内的应用软件组织为自含的单元,称为 AtomicSwComponentType。此类 AtomicSwComponentType 封装其功能和行为的实现,仅向外界暴露定义良好的连接点,称为 PortPrototype。

按照 [3],AUTOSAR 软件组件的图形外观描绘于图 3.1。

表3.1:SwComponentType(SwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | Base class for AUTOSAR software components. | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | AtomicSwComponentType , CompositionSwComponentType, ParameterSwComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
consistency Needs ConsistencyNeeds * aggr This represents the collection of ConsistencyNeeds owned by the enclosing SwComponentType. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=consistencyNeeds.shortName, consistency Needs.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

3.2.2. PortPrototype

请注意,SwComponentType 的 PortPrototype 应用于附加 SwConnector,以建立 SwComponentPrototype 之间的实际连接(见第 3.3 章)。

SwComponentType 只能通过其 PortPrototype 相互交互:

因此,理论上只要软件组件实现相同的功能并向系统其余部分提供相同的公共通信接口,它们就是可互换的。

PortPrototype 需要附加的模型工件——PortInterface:

表3.2:SwComponentType(SwComponentType)

属性 类型 多重性 种类 备注
port PortPrototype * aggr The PortPrototypes through which this SwComponent Type can communicate. The aggregation of PortPrototype is subject to variability with the purpose to support the conditional existence of PortPrototypes. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=port.shortName, port.variationPoint.short Label vh.latestBindingTime=preCompileTime
portGroup PortGroup * aggr A port group being part of this component. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=portGroup.shortName, portGroup.variation Point.shortLabel vh.latestBindingTime=preCompileTime
swcMapping Constraint SwComponentMapping Constraints * ref Reference to constraints that are valid for this Sw ComponentType.
swComponent Documentation SwComponent Documentation 0..1 aggr This adds a documentation to the SwComponentType. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=swComponentDocumentation, sw ComponentDocumentation.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=-10
unitGroup UnitGroup * ref This allows for the specification of which UnitGroups are relevant in the context of referencing SwComponentType.

即模型工件 PortInterface,用于完整描述 PortPrototype 的细节。

PortInterface 作为建立高度可复用性的另一种手段的概念在第 3.4 章描述。

表3.3:PortPrototype(PortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | Base class for the ports of an AUTOSAR software component. The aggregation of PortPrototypes is subject to variability with the purpose to support the conditional existence of ports. | | 基类 | ARObject , AtpBlueprintable , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Referrable | | 子类 | AbstractProvidedPortPrototype , AbstractRequiredPortPrototype | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
clientServer Annotation ClientServerAnnotation * aggr Annotation of this PortPrototype with respect to client/ server communication.
delegatedPort Annotation DelegatedPort Annotation 0..1 aggr Annotations on this delegated port.
ioHwAbstraction Server Annotation IoHwAbstractionServer Annotation * aggr Annotations on this IO Hardware Abstraction port.
modePort Annotation ModePortAnnotation * aggr Annotations on this mode port.
nvDataPort Annotation NvDataPortAnnotation * aggr Annotations on this non voilatile data port.
parameterPort Annotation ParameterPort Annotation * aggr Annotations on this parameter port.
senderReceiver Annotation SenderReceiver Annotation * aggr Collection of annotations of this ports sender/receiver communication.
triggerPort Annotation TriggerPortAnnotation * aggr Annotations on this trigger port.

PortPrototype 的语义:

  • 需要端口(技术术语:RPortPrototype)需要某些服务或数据。

  • 而提供端口(即 PPortPrototype)提供服务或数据。

  • 提供-需要端口(即 PRPortPrototype)在一个实体中组合了提供和需要服务或数据的能力。

glyph[floorright] (RS_SWCT_03250)

PortPrototype 的语义也描绘于图 3.2。

PRPortPrototype 永不视为未连接:

请注意,[TPS_SWCT_01573] 是 [TPS_SWCT_01112] 所定义语义的直接后果。

连接两个 PortPrototype:

关于 “兼容性” 定义的更多信息见第 6 节。

表3.4:AbstractRequiredPortPrototype(AbstractRequiredPortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | This abstract class provides the ability to become a required PortPrototype. | | 基类 | ARObject , AtpBlueprintable , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Port Prototype , Referrable | | 子类 | PRPortPrototype, RPortPrototype | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
requiredCom Spec RPortComSpec * aggr Required communication attributes, one for each interface element. Stereotypes: atpSplitable Tags: atp.Splitkey=requiredComSpec

表3.5:AbstractProvidedPortPrototype(AbstractProvidedPortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | This abstract class provides the ability to become a provided PortPrototype. | | 基类 | ARObject , AtpBlueprintable , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Port Prototype , Referrable | | 子类 | PPortPrototype, PRPortPrototype | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
Class AbstractProvidedPortPrototype (abstract)
providedCom Spec PPortComSpec * aggr Provided communication attributes per interface element (data element or operation). Stereotypes: atpSplitable Tags: atp.Splitkey=providedComSpec

表3.6:RPortPrototype(RPortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | Component port requiring a certain port interface. | | 基类 | ARObject , AbstractRequiredPortPrototype , AtpBlueprintable , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , PortPrototype , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
mayBe Unconnected Boolean 0..1 attr If set to true, this attribute indicates that the enclosing RPortPrototype may be left unconnected and that this aspect has explicitly been considered in the software-component's design.
required Interface PortInterface 0..1 tref The interface that this port requires. Stereotypes: isOfType

表3.7:PPortPrototype(PPortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | Component port providing a certain port interface. | | 基类 | ARObject , AbstractProvidedPortPrototype , AtpBlueprintable , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , PortPrototype , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
provided Interface PortInterface 0..1 tref The interface that this port provides. Stereotypes: isOfType

表3.8:PRPortPrototype(PRPortPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | This kind of PortPrototype can take the role of both a required and a provided PortPrototype. | | 基类 | ARObject , AbstractProvidedPortPrototype , AbstractRequiredPortPrototype , AtpBlueprintable , Atp Feature , AtpPrototype , Identifiable , MultilanguageReferrable , PortPrototype , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .port |

属性 类型 多重性 种类 备注
provided Required Interface PortInterface 0..1 tref This represents the PortInterface used to type the PRPort Prototype Stereotypes: isOfType

PortGroup:

关于元类 PortGroup 语义的进一步说明见第 4.6 章。

存在 RPortPrototype 有意保持未连接的情况。如果 RTE 生成器以严格模式执行,通常会报告这种场景。

通过设置属性 RPortPrototype.mayBeUnconnected,相应软件组件的设计者可以表达:“开放” 的 RPortPrototype 是最终设计的一部分,即使在严格模式下也不应报告。

该属性可以与 RPortPrototype 及任何种类的 PortInterface 组合使用。

注意,该属性适用于整个 RPortPrototype,而不是适用 PortInterface 的单个元素。

换言之,该属性不影响如下情形:例如多个 sender/receiver RPortPrototype 中只有一个 dataElement 未被考虑,如 [TPS_SWCT_01101] 所描述。

请注意,使用 RPortPrototype.mayBeUnconnected 有潜在危险,因为它移除了一条警告;如果错误地抑制了一条正当警告,这可能有害。

因此建议谨慎处理 RPortPrototype.mayBeUnconnected 的存在。

3.2.3. AtomicSwComponentType

AtomicSwComponentType 的附加价值:

关于 InternalBehavior 语义的更多信息见第 7 章。

在后续流程步骤中添加 SwcInternalBehavior:

表3.9:AtomicSwComponentType(AtomicSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | An atomic software component is atomic in the sense that it cannot be further decomposed and distributed across multiple ECUs. | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , SwComponentType | | 子类 | ApplicationSwComponentType, ComplexDeviceDriverSwComponentType, EcuAbstractionSwComponent Type, NvBlockSwComponentType, SensorActuatorSwComponentType, ServiceProxySwComponent Type, ServiceSwComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
internalBehavior SwcInternalBehavior 0..1 aggr The SwcInternalBehaviors owned by an AtomicSw ComponentType can be located in a different physical file. Therefore the aggregation is <>. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=internalBehavior.shortName, internal Behavior.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
symbolProps SymbolProps 0..1 aggr This represents the SymbolProps for the AtomicSw ComponentType. Stereotypes: atpSplitable Tags: atp.Splitkey=symbolProps.shortName

存在若干特化的 SwComponentType,用于描述 AUTOSAR 分层架构 [5] 不同部分中使用的特定软件组件。更多细节在第 10 章和第 11 章提及。

ApplicationSwComponentType 是 AtomicSwComponentType 的特化,用于表示与硬件无关的应用软件。ParameterSwComponentType 是 SwComponentType 的特化,与 AtomicSwComponentType 不同,它不能聚合 SwcInternalBehavior。

NvBlockSwComponentType 的用途在第 11.4.2 节详细描述。ServiceSwComponentType 在第 11.2 节描述。此外,EcuAbstractionSwComponentType 和 ComplexDeviceDriverSwComponentType 在第 10 节详细讨论。

ServiceProxySwComponentType 的描述见第 11.3 节,而 SensorActuatorSwComponentType 在第 10.4 节描述。

表3.10:ApplicationSwComponentType(ApplicationSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | The ApplicationSwComponentType is used to represent the application software. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

3.2.4. ParameterSwComponentType

ParameterSwComponentType 的限制:

  • 它不应聚合任何 SwcInternalBehavior,且

  • 它聚合的唯一 PortPrototype 应为 ParameterInterface 类型的 PPortPrototype。

该规则应在合同阶段生成执行时施加。

为标定参数定义所用的组合数据类型元素定义角色特定的数据属性:

关于这一方面的更多信息请参见第 7.5.4 节。

3.2.5. 软件组件的符号名称

请注意,AtomicSwComponentType 会体现在其实例所部署到的 RTE 的源代码中。这意味着如果具有相同 shortName 的 AtomicSwComponentType 实例被部署到特定 RTE,可能产生命名冲突。

软件组件的符号名称:

请注意,关于由 AtomicSwComponentType 在角色 symbolProps 中拥有的元类 SymbolProps 的属性 symbol 所提供的符号名称的更多信息见图 3.6。

关于如何使用 SymbolProps 缓解在 AUTOSAR ECU 上集成软件组件时发生的名称冲突的更详细信息,请参见 [4]。

symbolProps 的属性 symbol 的使用:

为 RunnableEntity 生成的前缀符号:

注意: 如果未定义 symbolProps,RTE 生成器的行为完全向后兼容,即现有 RunnableEntity 的实现无需改动即可符合本版 AUTOSAR 标准。

这是缓解 RTE 代码中潜在名称冲突风险的又一项措施。

命名约定可支持 SymbolProps 的有效性:

因此,命名约定的定义可以进一步促进名称冲突的避免。

3.3. 组合

3.3.1. 概述

CompositionSwComponentType:

通过聚合现有软件组件来实现功能。

CompositionSwComponentType 的嵌套定义:

这种递归关系在图 3.7 中正式表达。

必须理解:虽然组合支持(子)系统抽象,但它们纯粹是实现模型可伸缩性的架构元素。它们只是把现有软件组件分组,从而在查看或设计逻辑软件架构时降低复杂性。

因此,CompositionSwComponentType 的定义对软件组件如何与虚拟功能总线(VFB)交互没有影响。CompositionSwComponentType 不会在其聚合的软件组件已提供的功能之外增加任何新功能。

CompositionSwComponentType 没有任何二进制足迹:

3.3.2. SwComponentPrototype

CompositionSwComponentType 聚合 SwComponentPrototype:

请注意,CompositionSwComponentType 也是一个 SwComponentType。

SwComponentPrototype 实现特定角色:

可以创建任意数量的 SwComponentPrototype:

表3.11:CompositionSwComponentType(CompositionSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | A CompositionSwComponentType aggregates SwComponentPrototype s (that in turn are typed by SwComponentTypes ) as well as SwConnector s for primarily connecting SwComponentPrototype s among each others and towards the surface of the CompositionSwComponentType . By this means, a hierarchical structures of software-components can be created. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , SwComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
component SwComponent Prototype * aggr The instantiated components that are part of this composition. The aggregation of SwComponentPrototype is subject to variability with the purpose to support the conditional existence of a SwComponentPrototype . Please be aware: if the conditional existence of SwComponentPrototype s is resolved post-build, the deselected SwComponentPrototype s are still contained in the ECUs build but the instances are inactive in that they are not scheduled by the RTE. The aggregation is marked as atpSplitable in order to allow the addition of service components to the ECU extract during the ECU integration. The use case for having 0 components owned by the CompositionSwComponentType could be to deliver an empty CompositionSwComponentType to e.g. a supplier for filling the internal structure. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=component.shortName, component.variation Point.shortLabel vh.latestBindingTime=postBuild

glyph[triangle]

表3.12:CompositionSwComponentType(CompositionSwComponentType)

属性 类型 多重性 种类 备注
connector SwConnector * aggr SwConnector s have the principal ability to establish a connection among PortPrototype s. They can have many roles in the context of a CompositionSwComponentType . Details are refined by subclasses. The aggregation of SwConnector s is subject to variability with the purpose to support variant data flow. The aggregation is marked as atpSplitable in order to allow the extension of the ECU extract with AssemblySwConnector s between ApplicationSwComponentType s and ServiceSwComponentType s during the ECU integration. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=connector.shortName, connector.variation Point.shortLabel vh.latestBindingTime=postBuild
constantValue Mapping ConstantSpecification MappingSet * ref Reference to the ConstantSpecificationMapping to be applied for initValues of PPortComSpec s and RPortComSpec . Stereotypes: atpSplitable Tags: atp.Splitkey=constantValueMapping
dataType Mapping DataTypeMappingSet * ref Reference to the DataTypeMappingSet to be applied for the used ApplicationDataType s in PortInterface s. Background: when developing subsystems it may happen that ApplicationDataType s are used on the surface of CompositionSwComponentType s. In this case it would be reasonable to be able to also provide the intended mapping to the ImplementationDataType s. However, this mapping shall be informal and not technically binding for the implementors mainly because the RTE generator is not concerned about the CompositionSwComponentType s. Rationale: if the mapping of ApplicationDataType s on the delegated and inner PortPrototype matches then the mapping to ImplementationDataType s is not impacting compatibility. Stereotypes: atpSplitable Tags: atp.Splitkey=dataTypeMapping
instantiation RTEEventProps InstantiationRTEEvent Props * aggr This allows to define instantiation specific properties for RTE Events, in particular for instance specific scheduling. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=instantiationRTEEventProps.shortLabel, instantiationRTEEventProps.variationPoint.shortLabel vh.latestBindingTime=codeGenerationTime

SwComponentPrototype “LeftDoorControl” 扮演为车辆左车门实现 SwComponentType “DoorControl” 的角色,而 SwComponentPrototype “RightDoorControl” 扮演为右车门实现 SwComponentType “DoorControl” 的角色。

委托端口:

作为委托端口的含义:

  • 委托必须遵循基本兼容性的规则;

  • 通过在特定 CompositionSwComponentType 表面创建 PortPrototype,显式决定 CompositionSwComponentType 所含 “内部” 端口的内容是否暴露给外界。

glyph[floorright] (RS_SWCT_03130)

请注意,兼容性规则在第 6 章描述。

表3.13:CompositionSwComponentType(CompositionSwComponentType)

属性 类型 多重性 种类 备注
physical Dimension Mapping PhysicalDimension MappingSet 0..1 ref This reference identifies the PhysicalDimensionMappingSet that is applicable in the context of the enclosing CompositionSwComponentType . The PhysicalDimensionMapping s contained in the PhysicalDimensionMappingSet shall be taken into account for the assessment of the compatibility of PhysicalDimension s in the context of creation of a PortInterfaceMapping in the scope of the CompositionSwComponentType .

表3.14:SwComponentPrototype(SwComponentPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | Role of a software component within a composition. | | 基类 | ARObject , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, CompositionSwComponentType.component |

属性 类型 多重性 种类 备注
type SwComponentType 0..1 tref Type of the instance. Stereotypes: isOfType

另请注意,PortPrototype 委托的语义类似于面向对象编程语言中公有和私有成员等封装机制。

CompositionSwComponentType 概念的一个含义是:整车的应用软件最终由一个 CompositionSwComponentType 表示。这个所谓的顶层组合在 AUTOSAR 系统模板 [10] 的上下文中有特殊角色。

但是请注意,顶层组合可能拥有(未连接的)PortPrototype,以便作为另一个系统的一部分进行复用。

CompositionSwComponentType 的递归定义:

3.3.3. 连接器

SwConnector:

更多信息见图 3.8。

CompositionSwComponentType 包含三种 SwConnector:

  • [TPS_SWCT_01082] AssemblySwConnector:AssemblySwConnector 互连属于 CompositionSwComponentType 的 SwComponentPrototype 的 PortPrototype。glyph[floorright](RS_SWCT_03130)

  • [TPS_SWCT_01083] DelegationSwConnector:DelegationSwConnector 从 “内部” PortPrototype 连接到被委托的 “外部” PortPrototype。glyph[floorright](RS_SWCT_03130)

外部 PortPrototype 被多个 DelegationSwConnector 引用:

  • PassThroughSwConnector,见 [TPS_SWCT_01507]。

两个特定 PortPrototype 之间的 SwConnector:

换言之,不支持创建连接同一对 PortPrototype 的两个不同 SwConnector。

SwConnector between two PRPortPrototype s 的存在性:

  • AssemblySwConnector.requester

  • AssemblySwConnector.provider

  • PassThroughSwConnector.providedOuterPort

  • PassThroughSwConnector.requiredOuterPort

在这种情况下不建立方向。

为澄清起见,[TPS_SWCT_01638] 意味着该 SwConnector 表示两个 PRPortPrototype 之间双向通信的能力。

CompositionSwComponentType 内的 AssemblySwConnector:

CompositionSwComponentType 内的 DelegationSwConnector:

在把 DelegationSwConnector 附加到内部 PRPortPrototype 的上下文中,存在需要考虑的歧义。特别是,从形式上看,使用 PPortInCompositionInstanceRef 或 RPortInCompositionInstanceRef 都可行。

任意使用其中一个元类的做法被认为是令人困惑的。因此定义了 [TPS_SWCT_01515] 以消除这一不必要的自由度。

应使用 PPortInCompositionInstanceRef 将 DelegationSwConnector 附加到内部 PRPortPrototype:

由 DataInterface 定义类型的未连接 RPortPrototype:

表3.15:SwConnector(SwConnector)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | The base class for connectors between ports. Connectors have to be identifiable to allow references from the system constraint template. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 子类 | AssemblySwConnector, DelegationSwConnector, PassThroughSwConnector | | 聚合于 | AtpClassifier .atpFeature, CompositionSwComponentType.connector |

属性 类型 多重性 种类 备注
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.

SwConnector 应用的一个特定用例由图 3.9 和 3.11 示例说明。一个特定的 CompositionSwComponentType 存在两个变体:一个(更复杂的)变体预见 CompositionSwComponentType 内部存在 SwComponentPrototype(由 3.9 描绘),另一个(因为它实现更简单的语义)不需要该 SwComponentPrototype。

表3.16:AssemblySwConnector(AssemblySwConnector)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | AssemblySwConnectors are exclusively used to connect SwComponentPrototypes in the context of a CompositionSwComponentType. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable , SwConnector | | 聚合于 | AtpClassifier .atpFeature, CompositionSwComponentType.connector |

属性 类型 多重性 种类 备注
provider AbstractProvidedPort Prototype 0..1 iref Instance of providing port. InstanceRef implemented by: PPortInComposition InstanceRef
requester AbstractRequiredPort Prototype 0..1 iref Instance of requiring port. InstanceRef implemented by: RPortInComposition InstanceRef

表3.17:DelegationSwConnector(DelegationSwConnector)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | 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). | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable Referrable , SwConnector | | 聚合于 | AtpClassifier .atpFeature, CompositionSwComponentType.connector |

表3.18:DelegationSwConnector(DelegationSwConnector)

属性 类型 多重性 种类 备注
innerPort PortPrototype 0..1 iref The port that belongs to the ComponentPrototype in the composition Tags: xml.typeElement=true InstanceRef implemented by: PortInCompositionType InstanceRef
outerPort PortPrototype 0..1 ref The port that is located on the outside of the Composition Type

DelegationSwConnector . innerPort 的多重性:

DelegationSwConnector . outerPort 的多重性:

如果不能定义 PassThroughSwConnector,第二个变体只能通过在 CompositionSwComponentType 内部定义一个哑(dummy)SwComponentPrototype 来实现。然而,这个哑 SwComponentPrototype 需要定义 RunnableEntity,其唯一目的是把数据从 RPortPrototype 推送到 PPortPrototype(例如用于 sender-receiver 通信)。

这不仅繁琐,显然还需要运行时的额外资源(内存和代码)。此外,附加 RunnableEntity 的存在也不必要地增加了 ECU 内信息流动的传播延迟。

PassThroughSwConnector 的角色:

不允许创建涉及 PassThroughSwConnector 的环路:

该规则应在 CompositionSwComponentType 创建完成时施加。

换言之,按照 [constr_1252],不允许通过 PassThroughSwConnector 和至少一个把 requiredOuterPort 连接到 providedOuterPort 的 AssemblySwConnector 创建 “无限循环”。

表3.19:PassThroughSwConnector(PassThroughSwConnector)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | This kind of SwConnector can be used inside a CompositionSwComponentType to connect two delegation PortPrototypes. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable , SwConnector | | 聚合于 | AtpClassifier .atpFeature, CompositionSwComponentType.connector |

属性 类型 多重性 种类 备注
providedOuter Port AbstractProvidedPort Prototype 0..1 ref This represents the provided outer delegation Port Prototype of the PassThroughSwConnector.
requiredOuter Port AbstractRequiredPort Prototype 0..1 ref This represents the required outer delegation Port Prototype of the PassThroughSwConnector.

PassThroughSwConnector . requiredOuterPort 的多重性:

PassThroughSwConnector . providedOuterPort 的多重性:

PassThroughSwConnector.category 的值:

  • PassThroughSwConnector 被设计为实现 VFB 通信,因此在 RTE 生成中被考虑。在这种情况下,属性 PassThroughSwConnector.category 应该不存在或设置为值 VFB。

  • PassThroughSwConnector 用于支持信号/服务转换的早期设计。在某个时点,早期设计被实际的 ApplicationSwComponentType 取代,后者最终实现在 VFB 上由早期设计勾勒的预期通信路径。

关于通过 PassThroughSwConnector 设计信号/服务转换的更多细节,请参见 TPS 系统模板 [10]。为了指示将 PassThroughSwConnector 用于早期设计目的,属性 PassThroughSwConnector.category 的值应设置为 S2S_DESIGN。

请注意,在 AUTOSAR 自适应平台上,PassThroughSwConnector 也用于信号/服务转换的设计,方式与 TPS 系统模板 [10] 所述方法非常相似。更多细节见 TPS Manifest Specification [13]。

3.3.4. 实例化特定的 RTEEvent

实例化特定的 RTEEvent:

这允许在不同的时序场景中使用同一 ApplicationSwComponentType。即使调度是 SwcInternalBehavior 的事务,实例特定的时序定义也需要在 CompositionSwComponentType 层级规定。

作为 [TPS_SWCT_02507] 的示例,请考虑实现闭环控制算法的软件组件。

该软件组件可能被部署到 “慢速” 和 “快速” 控制场景。由于控制算法的实际时间基准派生自 RTE 中实现的调度,如果时序能够在 “实例” 层级定义,显然有利于整体设计。

InstantiationTimingEventProps 应只引用 TimingEvent:

该规则应在 RTE 生成时施加。

表3.20:InstantiationTimingEventProps(InstantiationTimingEventProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | This meta-class represents the ability to refine a timing event for particular instances of a software component. This approach supports an instance specific timing. | | 基类 | ARObject , InstantiationRTEEventProps | | 聚合于 | CompositionSwComponentType.instantiationRTEEventProps |

属性 类型 多重性 种类 备注
period TimeValue 0..1 attr This attribute represents the value of the refined activation period.

InstantiationRTEEventProps . refinedEvent 的多重性:

请注意,只有当把聚合 CompositionSwComponentType.instantiationRTEEventProps 的定义拆分到多个物理文件的能力被实际利用时,属性 shortLabel 才对模型语义有贡献。

关于跨物理文件拆分模型能力的更多说明见 [11]。

表3.21:InstantiationRTEEventProps(InstantiationRTEEventProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition | | 说明 | This meta-class represents the ability to refine the properties of RTEEvents for particular instances of a software component. | | 基类 | ARObject | | 子类 | InstantiationTimingEventProps | | 聚合于 | CompositionSwComponentType.instantiationRTEEventProps |

属性 类型 多重性 种类 备注
refinedEvent RTEEvent 0..1 iref This instance ref denotes the Timing Event for which the period shall be refined on an instance level. InstanceRef implemented by: InstanceEventIn CompositionInstanceRef
shortLabel Identifier 0..1 attr The main purpose of the shortLabel is to contribute to the splitkey of aggregations that are <>. Stereotypes: atpIdentityContributor

3.4. 端口接口

PortPrototype 在 AUTOSAR 架构中的角色:

1 此时 shortLabel 充当 splitkey 的一部分。

细节——即两个 PortPrototype 之间实际传输何种信息——由 PortInterface 定义。

PortInterface 在 AUTOSAR 架构中的角色:

换言之:PortInterface(见图 3.14)代表 AUTOSAR 概念中的关键点。

请注意,PortInterface 为其包含的信息创建一个名称空间。这使得可以定义特定 PortInterface 的细节而不必担心对其他 PortInterface 的可能副作用。同样,AUTOSAR 概念的这一特性直接支持可复用性。

PortInterface 的不同种类:

  • SenderReceiverInterface

  • NvDataInterface

  • ParameterInterface

  • ModeSwitchInterface

  • ClientServerInterface

  • TriggerInterface

DataInterface 定义为抽象基类:

关于 PortInterface 概念特化的更多细节见第 4.2.3 章和 4.2.2 章。

表3.22:PortInterface(PortInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Abstract base class for an interface that is either provided or required by a port of a software component. | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | ClientServerInterface, DataInterface , ModeSwitchInterface, TriggerInterface | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
isService Boolean 0..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. Stereotypes: atpVariation Tags: vh.latestBindingTime=blueprintDerivationTime
serviceKind ServiceProviderEnum 0..1 attr This attribute provides further details about the nature of the applied service.

PortInterface 充当 PortPrototype 的类型:

表3.23:DataInterface(DataInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | The purpose of this meta-class is to act as an abstract base class for subclasses that share the semantics of being concerned about data (as opposed to e.g. operations). | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 子类 | NvDataInterface, ParameterInterface, SenderReceiverInterface | | 聚合于 | ARPackage.element |

当然,这一方面极大地促进了软件组件之间有效连接的建立。通过使用特定 PortInterface 为特定 PortPrototype 定义类型,后者按定义即有资格彼此连接。

然而,有效连接的创建不必基于使用相同的 PortInterface。也可以使用不同但兼容的

PortInterface。PortInterface 兼容性的细节在第 6 章描述。

PortInterface 的可连接种类:

DataInterface 的子类是该规则的例外,它们可用于相互建立连接。

为澄清起见,由 SenderReceiverInterface 定义类型的 PortPrototype 与由 ClientServerInterface 定义类型的 PortPrototype 之间的连接不应可能。但是,支持由 SenderReceiverInterface 定义类型的 PortPrototype 与由 ParameterInterface 定义类型的 PortPrototype 之间建立连接。

ParameterInterface 的适用性:

请注意,PortInterface 在定义所谓 AUTOSAR 服务的上下文中也扮演重要角色。特别是,PortInterface 可以通过属性 isService 定义它是否预期在 AUTOSAR 服务的上下文中使用,此外还可以(通过属性 serviceKind)定义预期的是何种服务。

在各自 PortInterface 已将属性 isService 设置为 true 的 PortPrototype 之间创建 AssemblySwConnector,会对外围 SwComponentType 的性质提出要求。

例如,在两个都由 ApplicationSwComponentType 定义类型的 SwComponentPrototype 之间建立服务通信没有意义。对于服务通信,参与的 SwComponentPrototype 中至少一个必须由 ServiceSwComponentType 定义类型。

为服务通信创建 AssemblySwConnector:

serviceKind 中包含的信息可以以多种方式使用。其主要意图是区分标准化 AUTOSAR 服务的使用与供应商特定服务的使用。该信息可能对使用该 PortInterface 的软件组件的开发和构建过程产生影响。

此外,还可以使用 serviceKind 中包含的信息来过滤 AUTOSAR 创作工具中 AUTOSAR 模型的呈现,例如独立于相应 PortInterface 的内容显示服务 PortPrototype 的性质。

serviceKind 的值与 PortInterface 实际实现之间的不一致:

serviceKind 未定义时的特定默认值:

CompositionSwComponentType 上下文中使用的 PortInterface 不能引用 AUTOSAR 服务:

表3.24:ServiceProviderEnum(ServiceProviderEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This represents a list of possible service providers | | 聚合于 | PortInterface .serviceKind |

字面值 说明
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.EnumerationLiteralIndex=0
basicSoftwareMode Manager The service relates to the Basic Software Mode Manager (BswM) Tags: atp.EnumerationLiteralIndex=1
comManager The service relates to the COM Manager (ComM). Tags: atp.EnumerationLiteralIndex=2
cryptoKey Management The service relates to the Key Manager (KeyM). Tags: atp.EnumerationLiteralIndex=23
cryptoService Manager The service relates to the Crypto Service Manager (CsM). Tags: atp.EnumerationLiteralIndex=3
defaultErrorTracer The service relates to the Default Error Tracer (DET) Tags: atp.EnumerationLiteralIndex=4
diagnostic Communication Manager The service relates to the Diagnostic Communication Manager (DCM). Tags: atp.EnumerationLiteralIndex=6
diagnosticEvent Manager The service relates to the Diagnostic Event Manager (DEM). Tags: atp.EnumerationLiteralIndex=7
diagnosticLogAnd Trace The service relates to the Diagnostic Log and Trace (DLT). Tags: atp.EnumerationLiteralIndex=8
ecuManager The service relates to the ECU Manager (EcuM). Tags: atp.EnumerationLiteralIndex=9
errorTracer This service relates to the error tracer. Tags: atp.EnumerationLiteralIndex=18
functionInhibition Manager The service relates to the Function Inhibition Manager (FIM). Tags: atp.EnumerationLiteralIndex=10
hardwareTest Manager This service relates to the hardware test manager. Tags: atp.EnumerationLiteralIndex=19
intrusionDetection Security Management The service relates to the intrusion detection security management (IdsM). Tags: atp.EnumerationLiteralIndex=24
j1939Dcm This service relates to the J1939 Dcm. Tags: atp.EnumerationLiteralIndex=22
j1939Request Manager The service relates to the J1939Rm. Tags: atp.EnumerationLiteralIndex=11

表3.25:ServiceProviderEnum(ServiceProviderEnum)

属性 类型 多重性 种类 备注
nonVolatileRam Manager The service relates to the Non-Volatile RAM Manager (NvM). Tags: atp.EnumerationLiteralIndex=12
operatingSystem The service relates to the Operating System (OS). Tags: atp.EnumerationLiteralIndex=13
secureOnBoard Communication The service relates to the SecOc module. Tags: atp.EnumerationLiteralIndex=14
syncBaseTime Manager The service relates to the Sync Time Base Manager (StbM). Tags: atp.EnumerationLiteralIndex=15
v2xFacilities This service relates to the Vehicle to X facilities. Tags: atp.EnumerationLiteralIndex=20
v2xManagement This service relates to the Vehicle to X management. Tags: atp.EnumerationLiteralIndex=21
vendorSpecific This value denotes a vendor-specific service. Tags: atp.EnumerationLiteralIndex=16
watchDogManager The service relates to the Watchdog Manager (WdgM). Tags: atp.EnumerationLiteralIndex=17

关于 PortInterface 与 AUTOSAR 服务关系的更多细节见第 11 章。

4. 详解:软件组件、端口与接口

4.1. 简介

虚拟功能总线(VFB)规范 [3] 解释了软件组件之间通信的主要通信范式:client/server 用于基于操作的通信,sender/receiver 用于基于数据的通信。

两种通信范式的性质截然不同,SenderReceiverInterface 和 ClientServerInterface 及其相关元类的建模也是如此。

PortInterface 描述信息交换的静态结构:

请注意,与通信相关的动态属性在第 4.5 章描述。

4.2. 端口接口细节

4.2.1. 简介

值编码的使用(更多信息请参见第 5.2.6 节)在 PortInterface 的上下文中受限。

isService 属性设置为 false 的 PortInterface 上下文中 SwBaseType 支持的值编码:

  • 2C:二进制补码

  • IEEE754:浮点数

  • ISO-8859-1:单字节编码字符

  • ISO-8859-2:单字节编码字符

  • WINDOWS-1252:单字节编码字符

  • UTF-8:UCS 转换格式 8

  • UTF-16:基于 16 位码元的 Unicode 码点字符编码 [14]

  • UCS-2:通用字符集 2

  • NONE:无符号整数

  • BOOLEAN:这表示一个要解释为布尔值的整数。

该规则应在合同阶段生成执行时施加。

请注意,[constr_10383] 中表述的限制仅适用于非服务通信。服务级通信可以使用更多编码,如 [TPS_SWCT_01845] 所记录。

[TPS_SWCT_01845] 的适用性:

PortInterface 与 category DATA_REFERENCE:

该规则应在 RTE 生成时施加。

注意: [constr_1295] 对应于 [SWS_Rte_07670]。

4.2.2. Sender/Receiver 通信

4.2.2.1. Sender/Receiver 接口

SenderReceiverInterface:

虽然实际通信通过相应的 PortPrototype 进行,但 SenderReceiverInterface 允许正式描述发送和接收何种信息。

表4.1:SenderReceiverInterface(SenderReceiverInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A sender/receiver interface declares a number of data elements to be sent and received. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , DataInterface , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dataElement VariableDataPrototype * aggr The data elements of this SenderReceiverInterface.
invalidation Policy InvalidationPolicy * aggr InvalidationPolicy for a particular dataElement
metaDataItem Set MetaDataItemSet * aggr This aggregation defines fixed sets of meta-data items associated with dataElements of the enclosing Sender ReceiverInterface

SenderReceiverInterface 聚焦于由 VariableDataPrototype 表示的信息项的描述(见第 5.3 节)。

在角色 dataElement 中聚合的 VariableDataPrototype 表示在由 SenderReceiverInterface 定义类型的 PortPrototype 之间传输的一段原子信息。

注意,SenderReceiverInterface 为 VariableDataPrototype 的定义提供一个名称空间。

就 AUTOSAR 元模型而言,这一方面由到 DataPrototype(它又继承自 Identifiable)的继承关系指示。关于名称空间创建的更多信息见 [11]。

swImplPolicy:

1 注意,术语 “原子” 对具体计算平台上的实现没有任何含义。

请注意,swImplPolicy 在第 5.4 节描述。

排队通信不适用于 PRPortPrototype 拥有的 dataElement:

sender-receiver 通信的 last-is-best 语义:

请注意,VariableDataPrototype 的定义可能与读者对信号(signal)的理解非常接近。但是,不同种类的信号在 AUTOSAR 概念中有特定含义,尤其是在 AUTOSAR 系统模板 [10] 的上下文中。

4.2.2.2. Sender/Receiver 通信的通信模式

sender-receiver 通信的通信模式:

sender/receiver 通信的通信场景:

实际上,[constr_1033] 不适用于多个 PRPortPrototype 由 AssemblySwConnector 或 PassThroughSwConnector 链连接的场景。

由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype 之间 AssemblySwConnector 支持的连接:

| | RPortPrototype |

| RPortPrototype | No | | PPortPrototype | Yes | | PRPortPrototype | Yes |

该规则应在 CompositionSwComponentType 创建完成时施加。

由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype 之间 DelegationSwConnector 支持的连接:

| innerPort | outerPort |

| | RPortPrototype | | RPortPrototype | Yes | | PPortPrototype | No | | PRPortPrototype | Yes |

该规则应在 CompositionSwComponentType 创建完成时施加。

4.2.2.3. 失效策略

invalidationPolicy:

关于相关概念 invalidValue 的更多信息在第 5.4.2 章提供。

InvalidationPolicy . dataElement 的存在性:

InvalidationPolicy 建模的结构一致性:

在技术上,即使存在 [constr_10118],仍然可能从不同的 InvalidationPolicy 引用同一 SenderReceiverInterface.dataElement。

因此,适用进一步的约束:对于 SenderReceiverInterface 拥有的每个 dataElement,最多应定义一个 InvalidationPolicy。

SenderReceiverInterface.dataElement 应最多被一个 InvalidationPolicy 引用:

表4.2:InvalidationPolicy(InvalidationPolicy)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | SenderReceiverInterface.invalidationPolicy |

属性 类型 多重性 种类 备注
dataElement VariableDataPrototype 0..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.

表4.3:HandleInvalidEnum(HandleInvalidEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Strategies of handling the reception of invalidValue. | | 聚合于 | InvalidationPolicy.handleInvalid, ISignalPort.handleInvalid |

字面值 说明
dontInvalidate Invalidation is switched off. Tags: atp.EnumerationLiteralIndex=0
external Replacement Replace a received invalidValue. The replacement value is sourced from the aggregation in the role replaceWith. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=2
replace Replace a received invalidValue. The replacement value is specified by the initValue. Tags: atp.EnumerationLiteralIndex=3
4.2.2.4. 应用软件层级的元数据

存在这样的情况:AUTOSAR 基础软件栈不同层级上可用的信息需要作为元数据在应用层提供,以使整个软件正常运作。

一个例子可以是参与使用 J1939 协议通信的软件组件。

在这种情况下,所传输信息的语义与源地址紧密绑定,发送方需要能够单独设置源地址。

对元数据的支持:

SenderReceiverInterface 上下文中元数据的定义:

  • 可用的元数据通过元类 MetaDataItem 在 MetaDataItemSet 处的有序聚合定义,而 MetaDataItemSet 又在角色 SenderReceiverInterface.metaDataItemSet 中聚合。

  • dataElement 与元数据的关联通过引用 MetaDataItemSet.dataElement 规定。换言之,由 MetaDataItemSet 在角色 dataElement 中引用的 dataElement 参与元数据处理。

表4.4:MetaDataItem(MetaDataItem)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class represents a single meta-data item. | | 基类 | ARObject | | 聚合于 | MetaDataItemSet.metaDataItem |

属性 类型 多重性 种类 备注
length PositiveInteger 0..1 attr This attribute determines the length of the MetaDataItem at run-time.
metaDataItem Type TextValueSpecification 0..1 aggr This aggregation contributes the specification of the concrete meta-data item type.

表4.5:MetaDataItemSet(MetaDataItemSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class represents the ability to define a set of meta-data items to be used in SenderReceiver Interfaces. | | 基类 | ARObject | | 聚合于 | SenderReceiverInterface.metaDataItemSet |

属性 类型 多重性 种类 备注
dataElement VariableDataPrototype * ref This reference identifies the dataElement for which the ordered list of meta-data items is defined.
metaDataItem (ordered) MetaDataItem * aggr This aggregation represents the ordered definition of meta-data items.

MetaDataItemSet.metaDataItem 的排序:

该规则应在合同阶段生成执行时施加。

虽然排序就元模型而言是有意义的,但对于创建有序集合而言,仍然可以把具有相同属性 length 值的 MetaDataItem 以任意顺序放入集合。

但是,在已有的集合中,即使对具有相同属性 length 值的元素,排序在语义上也是相关的。

属性 MetaDataItem.metaDataItemType.value 的标准化值:

  • PRIORITY_8

  • SOURCE_ADDRESS_16

  • TARGET_ADDRESS_16

  • ADDRESS_EXTENSION_8

  • SOCKET_CONNECTION_ID_16

  • LIN_NAD_8

  • CAN_ID_32

  • ETHERNET_MAC_32

MetaDataItem . length 的存在性:

MetaDataItem . metaDataItemType 的存在性:

MetaDataItemSet . dataElement 的存在性:

MetaDataItemSet 建模的结构一致性:

在技术上,即使存在 [constr_10120],仍然可能从不同的 MetaDataItemSet 引用同一 SenderReceiverInterface.dataElement。

但是这是不允许的,因为 MetaDataItem 在 MetaDataItemSet 处的聚合被限定为 ordered,因此在实现中把不同 MetaDataItemSet 的内容语义合并为一组元数据项将非常困难。

因此,适用进一步的约束:对于 SenderReceiverInterface 拥有的每个 dataElement,最多应定义一个 MetaDataItemSet。

SenderReceiverInterface.dataElement 应最多被一个 MetaDataItemSet 引用:

4.2.3. Client/Server 通信

client/server 通信的底层语义是:客户端可以发起由支持该操作的服务器执行某个操作。

服务器执行该操作,完成时向客户端提供结果(同步操作调用),或者客户端自行检查操作的完成(异步操作调用)。

客户端不应连接到多个服务器:

4.2.3.1. Client/Server 接口

ClientServerInterface 在某种程度上是 SenderReceiverInterface 的对应物。

ClientServerInterface 不是定义要在软件组件之间传输的信息片段,而是定义 ClientServerOperation 的集合。

表4.6:ClientServerInterface(ClientServerInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A client/server interface declares a number of operations that can be invoked on a server by a client. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
operation ClientServerOperation * aggr ClientServerOperation(s) of this ClientServerInterface. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=operation.shortName, operation.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime
possibleError ApplicationError * aggr Application errors that are defined as part of this interface.

ClientServerInterface:

ClientServerOperation:

  • 传递给操作(即方向为 'in')

  • 传递给操作并从操作返回(即方向为 'inout')

  • 从操作返回(即方向为 'out')

2 但适用不同的连接模式,见 [constr_1037]。

该聚合表示一个变体点。

可选方法实参:

在 AUTOSAR 经典平台上存在 [TPS_SWCT_01844] 中限制的原因是:RTE 没有 API 来处理可选方法实参。

表4.7:ClientServerOperation(ClientServerOperation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | An operation declared within the scope of a client/server interface. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ApplicationInterface.command, AtpClassifier .atpFeature, ClientServerInterface.operation, Diagnostic DataElementInterface.read, DiagnosticDataIdentifierInterface.read, DiagnosticDataIdentifierInterface. write, DiagnosticRoutineInterface.requestResult, DiagnosticRoutineInterface.start, DiagnosticRoutine Interface.stop, PhmRecoveryActionInterface.recovery, ServiceInterface.method |

属性 类型 多重性 种类 备注
argument (ordered) ArgumentDataPrototype * aggr An argument of this ClientServerOperation Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=argument.shortName, argument.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime
diagArgIntegrity Boolean 0..1 attr This attribute shall only be used in the implementation of diagnostic routines to support the case where input and output arguments are allocated in a shared buffer and might unintentionally overwrite input arguments by tentative write operations to output arguments. This situation can happen during sliced execution or while output parameters are arrays (call by reference). The value true means that the ClientServerOperation is aware of the usage of a shared buffer and takes precautions to avoid unintentional overwrite of input arguments. If the attribute does not exist or is set to false the Client ServerOperation does not have to consider the usage of a shared buffer.
possibleError ApplicationError * ref Possible errors that may by raised by the referring operation.

表4.8:ArgumentDataPrototype(ArgumentDataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation. | | 基类 | ARObject , AtpFeature , AtpPrototype , AutosarDataPrototype , DataPrototype , Identifiable , Multilanguage Referrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ClientServerOperation.argument |

属性 类型 多重性 种类 备注
direction ArgumentDirection Enum 0..1 attr This attribute specifies the direction of the argument prototype.

表4.9:ArgumentDataPrototype(ArgumentDataPrototype)

属性 类型 多重性 种类 备注
serverArgument ImplPolicy ServerArgumentImpl PolicyEnum 0..1 attr This defines how the argument type of the servers 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.

ArgumentDataPrototype 的方向:

在许多常见编程语言(如 C)中,操作也是一种数据类型。这使得例如可以把对操作的引用作为实参传递给另一个操作。

这在 AUTOSAR 概念中是不允许的。

本质上,ClientServerOperation 中的所有 ArgumentDataPrototype 都可以(概念上)按值传递(根据 ArgumentDataPrototype 的方向,从客户端到服务器和/或从服务器到客户端)。

ArgumentDataPrototype . direction 属性的存在性:

客户端需要提供 ArgumentDataPrototype:

传递正确的数据类型:

ClientServerOperation 的同步调用:

作为响应的一部分,它为每个方向为 out 或 inout 的 ArgumentDataPrototype 接收一个值(正确 AutosarDataType 类型的)。

每个 ClientServerOperation 为其 ArgumentDataPrototype 提供一个名称空间,因此拥有一个唯一标识符,在相应 ClientServerInterface 内标识该操作。

表4.10:ArgumentDirectionEnum(ArgumentDirectionEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | Use cases: • Arguments in ClientServerOperation can have different directions that need to be formally indicated because they have an impact on how the function signature looks like eventually. • Arguments in BswModuleEntry already determine a function signature, but the direction is used to specify the semantics, especially of pointer arguments. | | 聚合于 | ArgumentDataPrototype.direction, SwServiceArg.direction |

字面值 说明
in The argument value is passed to the callee. Tags: atp.EnumerationLiteralIndex=0
inout The argument value is passed to the callee but also passed back from the callee to the caller. Tags: atp.EnumerationLiteralIndex=1
out The argument value is passed from the callee to the caller. Tags: atp.EnumerationLiteralIndex=2

ClientServerOperation 在 ClientServerInterface 内没有排序(不存在所谓 “第一个” 操作)。

ArgumentDataPrototype 没有默认值:

ClientServerOperation 上下文内 ArgumentDataPrototype 的定义是有序的:

请注意,ArgumentDataPrototype 继承自 AutosarDataPrototype,因此具有对具体 AutosarDataType 的引用。

3 在 ClientServerInterface 定义的不同部分,可能规定 ClientServerOperation 的 “调用顺序”:可能要求客户端按某种逻辑顺序使用 ClientServerOperation。

但是,该排序与 ClientServerOperation 在 ClientServerInterface 定义中的列出顺序无关

4 给 ClientServerOperation 的 ArgumentDataPrototype 同时规定排序和唯一标识符似乎冗余。

例如,在操作 'foo(a, b, c)' 中,我们可以指 “第二个实参” 或 “名为 b 的实参”。在许多常见编程语言(如 C 或 Java)中,客户端在调用服务器时实际只使用排序(客户端以 'foo(1,2,3)' 调用操作,而不是 'foo(a=1,c=3,b=2)')。

此外,实参的名称代表实现调用时作出的任意选择。在 C 中,只有实参的数据类型和排序构成签名,而不包括实参的名称。

RTE 生成器使用被引用的 AutosarDataType,根据属性 ArgumentDataPrototype.serverArgumentImplPolicy 的值确定实参的数据类型。

表4.11:ServerArgumentImplPolicyEnum(ServerArgumentImplPolicyEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This defines how the argument type of the servers RunnableEntity is implemented. | | 聚合于 | ArgumentDataPrototype.serverArgumentImplPolicy |

字面值 说明
useArgumentType The argument type of the RunnableEntity is derived from the AutosarDataType of the Argument Prototype. Tags: atp.EnumerationLiteralIndex=0
useVoid The argument type of the RunnableEntity is void. Tags: atp.EnumerationLiteralIndex=2

serverArgumentImplPolicy 与由原始数据类型定义类型的 ArgumentDataPrototype:

该规则应在合同阶段生成执行时施加。

存在使用完全相同的 RunnableEntity 执行多个 ClientServerOperation 的一个用例。该用例勾勒于图 4.5。

在这种情况下,可能出现 ClientServerOperation 拥有由数组数据类型定义类型的 ArgumentDataPrototype。

还可能出现:由数组数据类型定义类型的各个 ArgumentDataPrototype 引用兼容的元素数据类型,但定义不同数量的元素。

请注意,服务器 RunnableEntity 需要通过客户端传递的附加实参获得当前使用的数组长度或结构大小的信息。这一方面由图 4.5 示例说明。

很自然,在这种情况下会使用可变大小数组数据类型,因为它内置了指示数组中当前存储元素数量的能力,而无需向 RunnableEntity 的签名添加更多实参。

另请注意,ClientServerInterface 不定义任何时序信息(客户端多快期望服务器的响应)。它不定义线程如何工作(例如客户端是否阻塞直到服务器的响应返回)。

它也不显式定义信息如何在客户端和服务器实现与底层 RTE 之间传递(例如:通过 “指针” 或 “按值”)。

由 ClientServerInterface、ModeSwitchInterface 或 TriggerInterface 定义类型的 PortPrototype 之间 AssemblySwConnector 支持的连接:

| | RPortPrototype |

| RPortPrototype | No | | PPortPrototype | Yes | | PRPortPrototype | Yes |

该规则应在 CompositionSwComponentType 创建完成时施加。

由 ClientServerInterface、ModeSwitchInterface 或 TriggerInterface 定义类型的 PortPrototype 之间 DelegationSwConnector 支持的连接:

| innerPort | outerPort |

| | RPortPrototype | | RPortPrototype | Yes | | PPortPrototype | No | | PRPortPrototype | No |

该规则应在 CompositionSwComponentType 创建完成时施加。

请注意,关于属性 ClientServerOperation.diagArgIntegrity 使用的限制在第 13.8.4.5 节描述。

4.2.3.2. Client/Server 通信中的错误处理

本节描述在应用软件组件内部或跨 VFB [3] 通信期间发生的错误的处理。由基础软件模块创建和消费的错误不在本文档范围内,因此不予讨论。

因此,本文档范围内的错误分为两个简单的类别:

  • 基础设施错误,以及

  • 应用错误。

软件组件实现使用 RTE API 方法与其他软件组件通信。在这种通信期间,某些错误可能因基础设施故障而发生,例如总线不工作,或预期的数据值未及时到达。

这些错误列在 RTE 规范 [2] 中,因为它们是 VFB 所提供基础设施的固有特性。因此软件组件通常不会自行引发基础设施错误。

相反,AUTOSAR 基础软件和 RTE 会判定基础设施故障,并把相应的错误码传达给相关软件组件。

AUTOSAR 系统不需要显式描述基础设施错误:

假定这些错误可能在运行时发生,应用开发者应采取措施处理它们。

另一方面,应用错误特定于以 PortInterface 形式描述的功能或信息。无法预先定义此类错误,它们在某个 PortInterface 的设计时定义。

原则上,此类 ApplicationError 可以是所有种类 PortInterface 的一部分。

一个 SwComponentType 范围内的 ApplicationError:

该规则应在合同阶段生成执行时施加。

[constr_1102] 存在的依据:RTE 生成器为错误码创建符号,其中出现 ClientServerInterface 的 shortName 和 ApplicationError 的 shortName。

属性 ApplicationError.errorCode 的存在性和值:

适用以下例外:只有当属性 possibleError 打算表示错误码 E_OK 时,才应允许值 0。

借助 [constr_1108],可以确保返回值只有最低六个位用于指示应用错误。

表4.12:ApplicationError(ApplicationError)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This is a user-defined error that is associated with an element of an AUTOSAR interface. It is specific for the particular functionality or service provided by the AUTOSAR software component. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ClientServerInterface.possibleError |

属性 类型 多重性 种类 备注
errorCode Integer 0..1 attr The RTE generator is forced to assign this value to the corresponding error symbol. Note that for error codes certain ranges are predefined (see RTE specification).

因此,ClientServerOperation 可以与它们可能引发的若干 ApplicationError 关联。这些错误作为 ClientServerInterface 的一部分定义。

对 ApplicationError 的引用:

4.2.4. 外部触发事件通信

外部触发事件通信的语义:

可以发起连接的触发器汇中 RunnableEntity 的执行。通常(但不必然)这些 RunnableEntity 按顺序执行。

TriggerInterface:

表4.13:TriggerInterface(TriggerInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A trigger interface declares a number of triggers that can be sent by an trigger source. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
trigger Trigger * aggr The Trigger of this trigger interface.

表4.14:Trigger(Trigger)

| 包 | M2::AUTOSARTemplates::CommonStructure::TriggerDeclaration | | 说明 | A trigger which is provided (i.e. released) or required (i.e. used to activate something) in the given context. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, BswModuleDescription.releasedTrigger, BswModuleDescription.required Trigger, ServiceInterface.trigger, TriggerInterface.trigger |

属性 类型 多重性 种类 备注
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.

表4.15:MultidimensionalTime(MultidimensionalTime)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::MultidimensionalTime | | 说明 | Specifies a time value based on [15] see [TPS_GST_00354]. | | 基类 | ARObject | | 聚合于 | AgeConstraint.maximum, AgeConstraint.minimum, AnalyzedExecutionTime.bestCaseExecutionTime, AnalyzedExecutionTime.worstCaseExecutionTime, ArbitraryEventTriggering.maximumDistance, ArbitraryEventTriggering.minimumDistance, BurstPatternEventTriggering.minimumInterArrivalTime, Burst PatternEventTriggering.patternJitter, BurstPatternEventTriggering.patternLength, BurstPatternEvent Triggering.patternPeriod, ConcretePatternEventTriggering.offset, ConcretePatternEventTriggering.pattern Jitter, ConcretePatternEventTriggering.patternLength, ConcretePatternEventTriggering.patternPeriod, ConfidenceInterval.lowerBound, ConfidenceInterval.upperBound, ExecutionTimeConstraint.maximum, ExecutionTimeConstraint.minimum, IoHwAbstractionServerAnnotation.age, LatencyTimingConstraint. maximum, LatencyTimingConstraint.minimum, LatencyTimingConstraint.nominal, MeasuredExecution Time.maximumExecutionTime, MeasuredExecutionTime.minimumExecutionTime, MeasuredExecution Time.nominalExecutionTime, OffsetTimingConstraint.maximum, OffsetTimingConstraint.minimum, PeriodicEventTriggering.jitter, PeriodicEventTriggering.minimumInterArrivalTime, PeriodicEvent Triggering.period, ReceiverAnnotation.signalAge, RoughEstimateOfExecutionTime.estimatedExecution Time, SimulatedExecutionTime.maximumExecutionTime, SimulatedExecutionTime.minimumExecution Time, SimulatedExecutionTime.nominalExecutionTime, SporadicEventTriggering.jitter, SporadicEvent Triggering.maximumInterArrivalTime, SporadicEventTriggering.minimumInterArrivalTime, SporadicEvent Triggering.period, SwDataDefProps.swRefreshTiming, SynchronizationTimingConstraint.tolerance, TDLE TZoneClock.accuracyExt, TDLETZoneClock.accuracyInt, TimingClockSyncAccuracy.accuracy, Trigger. triggerPeriod |

属性 类型 多重性 种类 备注
Class MultidimensionalTime
cseCode CseCodeType 0..1 attr Specifies the time base by means of CSE codes.
cseCodeFactor Integer 0..1 attr The scaling factor for the time value based on the specified CSE code.

表4.16:CseCodeType(CseCodeType)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This primitive represents an ASAM CSE (Codes for Scaling Units) based on the definition in the ASAM-MCD-2MC-ASAP2 specification. The particular semantics is specified in [TPS_GST_00354]. Tags: xml.xsd.customType=CSE-CODE-TYPE-STRING xml.xsd.type=unsignedInt |

如图 4.7 所示,TriggerInterface 由 Trigger 组成。

周期性触发的周期:

(在触发器来自基础软件(例如复杂驱动程序)时规定其属性);它不用作 RTE 生成器的输入。

除此之外,TriggerInterface 不定义任何时序信息(例如源多快期望汇的反应)。这是模板中时序信息的属性。

触发器通信不应实现 n:1 模式:

归结为规则:触发器通信不应实现 n:1(n > 1)场景。:

应以单个 Trigger(而不是整个 PortPrototype 之间的连接)为基础观察该条件(类似于 sender/receiver 通信中对单个 dataElement 的观察方式)。

请注意,该约束对由 AssemblySwConnector 和 DelegationSwConnector 创建的连接同样适用。这就是 [constr_1104] 未更具体规定与 RPortPrototype 连接另一端 PortPrototype 性质的原因。

明确地说,触发器通信不支持 n:1(n > 1)场景,因为没有实际的用例。

Trigger 的排队处理:

在这种情况下,Trigger 被加入队列;当当前 Trigger 的处理完成后,最前面的触发器出队并被处理。请注意,队列大小不属于本文档的定义范围。实际队列大小在 RTE 配置过程中定义。

Trigger 是否接受排队处理的规定由属性 Trigger.swImplPolicy 控制。

Trigger.swImplPolicy 的允许值:

请注意,Trigger.swImplPolicy 的值不是该特定 Trigger 队列实现的最终定论。如适用,集成者仍有权推翻应用软件开发者的判定。

关于把由 TriggerInterface 定义类型的不同种类 PortPrototype 相互连接的能力的更多信息,请参见 [constr_1204] 和 [constr_1205]。

4.2.5. 模式的通信

4.2.5.1. 模式切换接口

通过端口进行模式通信有两个不同的用例:

  1. 实际的模式切换可以从模式管理器组件传送给其客户端组件,以强制执行模式切换。

  2. 模式切换的请求可以从任何组件传送给模式管理器。

模式信息的传播:

这一方面描绘于图 4.8。

表4.17:ModeSwitchInterface(ModeSwitchInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A mode switch interface declares a ModeDeclarationGroupPrototype to be sent and received. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
modeGroup ModeDeclarationGroup Prototype 0..1 aggr The ModeDeclarationGroupPrototype of this mode interface.

表4.18:ModeDeclarationGroupPrototype(ModeDeclarationGroupPrototype)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is provided or required in the given context. | | 基类 | ARObject , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, BswModuleDescription.providedModeGroup, BswModuleDescription.required ModeGroup, FirewallStateSwitchInterface.firewallStateMachine, FunctionGroupSet.functionGroup, Mode SwitchInterface.modeGroup, Process.processStateMachine, StateManagementStateNotification.state Machine |

属性 类型 多重性 种类 备注
swCalibration Access SwCalibrationAccess Enum 0..1 attr This allows for specifying whether or not the enclosing ModeDeclarationGroupPrototype can be measured at run-time.
type ModeDeclarationGroup 0..1 tref The "collection of ModeDeclarations" ( = ModeDeclaration Group) supported by a component Stereotypes: isOfType

不同的 ModeDeclarationGroup 应具有不同的 shortName。:

显然,[constr_2049] 的依据是避免生成的 RTE 文件中的冲突。

例如:

定义了两个具有相同 shortName “Foo” 的 ModeDeclarationGroup。

ModeDeclarationGroup “Foo”

包含 ModeDeclaration “X”、“Y”、“Z”

ModeDeclarationGroup “Foo*”

包含 ModeDeclaration “W”、“X”、“Y”、“Z”

在这种情况下,软件组件只允许使用 “Foo” 或 “Foo*” 之一

每个 ModeSwitchInterface 一个 ModeDeclarationGroupPrototype:

诚然,支持 0..* 多重性没有技术障碍,但另一方面,似乎不存在这种场景的任何合理用例。

如果某个 SwComponentType 无论如何必须考虑两个甚至更多 ModeDeclarationGroupPrototype,它们很可能属于不同的 ModeSwitchInterface。

ModeDeclarationGroupPrototype 包含在 ModeSwitchInterface 中,允许显式定义在 SwComponentPrototype 之间通信的 SwConnector,并定义与 ServiceSwComponentType 通信的服务接口。

由于 PortInterface 的兼容性规则(见第 6 章),每个 SwComponentType 都可以依赖所需模式激活的可用性。

请注意,每个 SwComponentType 都可以(通过其 PortPrototype 和 ModeSwitchInterface)定义所需和提供的 ModeDeclarationGroupPrototype 列表。

CompositionSwComponentType 需要并提供其所含 SwComponentPrototype 需要或提供的模式:

这些模式从 SwComponentPrototype 到外围 CompositionSwComponentType 的委托由 DelegationSwConnector 显式描述。

软件组件的形式化描述不对所需和提供的 ModeDeclarationGroupPrototype 的语义作任何假设。

它只是按名称需要和提供 ModeDeclarationGroupPrototype。关于模式声明的更多信息见第 9.1 节。

4.2.5.2. 用于模式通信的数据类型

请求模式变更:

然而,为了与第 4.2.5.1 节开头提到的第一个用例在语义上一致,所传送的模式请求也应映射到相应的 ModeDeclarationGroup。这可以由映射类 ModeRequestTypeMap 定义,如图 4.9 所示。

映射到某个 ModeDeclarationGroup 的 ImplementationDataType 随后可在 PortInterface 中使用,以数值形式表示关联 ModeDeclarationGroup 的一个 ModeDeclaration。

模式到数据类型的无歧义映射:

表4.19:ModeRequestTypeMap(ModeRequestTypeMap)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | Specifies a mapping between a ModeDeclarationGroup and an ImplementationDataType. This ImplementationDataType shall be used to implement the ModeDeclarationGroup. | | 基类 | ARObject | | 聚合于 | DataTypeMappingSet.modeRequestTypeMap |

属性 类型 多重性 种类 备注
implementation DataType AbstractImplementation DataType 0..1 ref This is the corresponding AbstractImplementationData Type. It shall be modeled along the idea of an "unsigned integer-like" data type.
modeGroup ModeDeclarationGroup 0..1 ref This is the corresponding ModeDeclarationGroup.

ModeRequestTypeMap 的限制:

ModeRequestTypeMap 应由一个 DataTypeMappingSet 聚合,该 DataTypeMappingSet 由拥有该 PortPrototype 的 ApplicationSwComponentType 所拥有的 SwcInternalBehavior 引用。

该规则应在合同阶段生成执行时施加。

ModeRequestTypeMap . implementationDataType 属性的存在性:

ModeRequestTypeMap . modeGroup 属性的存在性:

用作 ModeRequestTypeMap.implementationDataType 的 ImplementationDataType:

  • category 为 VALUE,或

  • category 为 TYPE_REFERENCE,它又引用 category 为 VALUE 的 ImplementationDataType。

ImplementationDataType 引用的 baseType 应将属性 BaseTypeDirectDefinition.baseTypeEncoding 的值设置为 NONE。

该规则应在合同阶段生成执行时施加。

ApplicationDataType 定义 ModeDeclarationGroup 中所用值的子集:

系统设计者有责任根据功能需求维护数据类型和 ModeDeclarationGroup。

例如,ModeRequester 可以只请求可用模式的一个子集(通过 SenderReceiverInterface 或 ClientServerInterface)。ModeManager 还可以决定指示故障。

关于把由 ModeSwitchInterface 定义类型的不同种类 PortPrototype 相互连接的能力的更多信息,请参见 [constr_1204] 和 [constr_1205]。

4.2.5.3. 与测量和标定的相关性

请注意,通过在角色 swCalibrationAccess 中聚合 SwCalibrationAccessEnum,ModeDeclarationGroupPrototype 获得变得可测量的能力。这意味着以下约束:

ModeDeclarationGroupPrototype 的 SwCalibrationAccessEnum 允许值:

  • notAccessible,以及

  • readOnly。

该规则应在合同阶段生成执行时施加。

在 FlatInstanceDescriptor 上下文中为 MCD 系统定义字面量:

该用例的存在是把 “AI” 放在 [constr_1015] 中 compuMethod 与 FlatInstanceDescriptor 交点处的原因。

另一种可能的场景是 FlatInstanceDescriptor 不存在,但仍然最好有能力定义用于在 MCD 系统中显示值的特定字面量。

这种情况同样受 AUTOSAR 标准支持,依据是 [constr_1015] 中 compuMethod 与 McDataInstance 交点处出现的 “S”。

4.2.6. 参数通信

当然,作为 ParameterInterface 一部分的 ParameterDataPrototype 的 “通信” 并不建立实际的数据传输。

该术语在概念意义上使用;ParameterInterface 之类事物的存在,其理由仅仅是把标定参数在软件组件表面的暴露统一到与其他数据暴露相同的形式层级,即通过由 PortInterface 定义类型的 PortPrototype。

由 ParameterInterface 定义类型的 PortPrototype:

5 不一定与 ModeDeclarationGroupPrototype 相关,而是与 MCD 系统字面量定义的总体相关。

6 例如因为受影响的数据存在于基础软件中。

4.3. PortInterface 映射与数据缩放

在本规范先前的版本中,对 PortInterface 相互匹配的要求可能导致这样的情况:实际兼容的 PortInterface 仍因形式原因(例如 dataElement 的 shortName 不匹配)被拒绝。

为了也支持 CompositionSwComponentType 的开发者需要连接本应彼此匹配但不满足形式要求的 PortPrototype 的场景,引入了 “端口接口映射” 的概念。

PortInterfaceMapping 的情形:

  1. 应连接两个 PortPrototype,且 PortInterface 元素兼容,只是 shortName 不同。这需要对 PortInterface 元素进行纯逻辑映射。

  2. PortInterface 元素在逻辑上等价,但范围和分辨率不同。这需要对提供的数据和实参进行数据换算或重新缩放,以符合所需数据和实参的范围和分辨率。

  3. PortInterface 元素的 invalidationPolicy 不同。这可能需要在同一 ECU 上为同一 dataElement 并行实现不同的失效处理策略。

  4. 应连接两个 PortPrototype,且 PortInterface 元素应使用 AUTOSAR 数据变换器方法进行转换。

glyph[floorright](RS_SWCT_03210)

关于 AUTOSAR 数据变换器方法的更多信息见第 4.3.3 节。

通常,此类 PortInterface 的映射在项目早期由不同组件供应商与系统设计者一次性商定。

映射作为可复用 ARElement 与 SwConnector 分开描述:

PortInterfaceMapping 覆盖所有其他兼容性规则:

  • [constr_1071] 同样适用于 PortInterfaceMapping 的应用;

  • [constr_1268] 同样适用于 PortInterfaceMapping 的应用;

  • [constr_1269] 同样适用于 PortInterfaceMapping 的应用;

  • [constr_1270] 同样适用于 PortInterfaceMapping 的应用;

  • 被映射 DataPrototype 之间的结构差异可以通过 SubElementMapping 缓解。这包括 “结构” 数据类型映射到 “数组” 数据类型以及相反的情形。[TPS_SWCT_01195] 同样适用。

使用 PortInterfaceMapping 时,软件组件的开发者需要正确理解其在模型语义方面的后果。

请注意,[TPS_SWCT_01543] 不要求工具实现在存在 PortInterfaceMapping 时忽略并放过所有其他兼容性规则的未报告偏差。

如果认为有帮助,工具仍可就第 6 节定义的兼容性规则发出警告,但这不是 AUTOSAR 标准强制要求的。不过,在这种情况下工具不应报告错误。

表4.20:PortInterfaceMappingSet(PortInterfaceMappingSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Specifies a set of (one or more) PortInterfaceMappings. Tags: atp.recommendedPackage=PortInterfaceMappingSets | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
portInterface Mapping PortInterfaceMapping * aggr Specifies one PortInterfaceMapping to support the connection of Ports typed by two different PortInterfaces with PortInterface elements having unequal names and/or unequal semantic (resolution or range). Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=portInterfaceMapping.shortName, port InterfaceMapping.variationPoint.shortLabel vh.latestBindingTime=blueprintDerivationTime

表4.21:PortInterfaceMapping(PortInterfaceMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Specifies one PortInterfaceMapping to support the connection of Ports typed by two different Port Interfaces with PortInterface elements having unequal names and/or unequal semantic (resolution or range). | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , Referrable | | 子类 | ClientServerInterfaceMapping, ModeInterfaceMapping, TriggerInterfaceMapping, VariableAndParameter InterfaceMapping | | 聚合于 | PortInterfaceMappingSet.portInterfaceMapping |

4.3.1. PortInterface 映射

默认情况下,PortInterface 元素的 shortName 用于标识所连接 PortPrototype 的匹配元素对。在 shortName 不匹配的情况下(这可能由于分布式开发、现货开发或软件组件复用),需要显式规定 PortInterface 的哪些元素应相互关联。

该定义由 PortInterfaceMapping 提供。

请注意,PortInterfaceMapping 对专家用户而言是一个非常强大的工具,可以适配应连接的两个 PortPrototype 的 PortInterface 之间的各种差异。

一般而言,可以为 SwConnector 的所有子类定义 PortInterfaceMapping。为使之可能,必须避免谈论 “提供” 端或 “需要” 端,因为这可能引起混淆。

具体而言,在 CompositionSwComponentType 内部,PassThroughSwConnector 可能连接到 PPortPrototype。

然而,从 PassThroughSwConnector 的角度看,该 PPortPrototype 可能表示 CompositionSwComponentType 内部通信关系的 “需要” 端。

为避免进一步混淆,PortInterfaceMapping 规定的规则从 SwConnector 的角度而非 PortPrototype 的角度规定。

对每个 SwConnector,假定一个 “源” 端和一个 “目标” 端,反映该 SwConnector 实现的通信方向。这一理解描绘于图 4.10。

请注意,“sender/receiver 风格通信”(见第 4.2.2 节)在概念上也适用于其他种类的通信:

  • 模式切换通信,见第 4.2.5 节

  • 外部触发通信,见第 4.2.4 节

  • NvData 通信,见第 11.4.2 节

  • 参数 “通信”,见 4.2.6

另请注意,表示 client/server 通信(见第 4.2.3 节)的 SwConnector 的 “源” 端与 “目标” 端的关联沿 “主要” 交互(即 ClientServerOperation 的调用)对齐,见图 4.11。

图 4.10 关于 sender/receiver 风格交互的 SwConnector “源” 端与 “目标” 端的结论总结于 [TPS_SWCT_01873]。

sender/receiver 风格交互的 SwConnector 的 “源” 与 “目标” 的定义:

| Sender/Receiver | Source |

| DelegationSwConnector | Outer required PortPrototype | | DelegationSwConnector | Inner provided PortPrototype | | AssemblySwConnector | Provided PortPrototype | | PassThroughSwConnector | Required PortPrototype |

图 4.11 关于 client/server 风格交互的 SwConnector “源” 端与 “目标” 端的结论总结于 [TPS_SWCT_01874]。

7 模式请求反正由 sender/receiver 通信实现,因此不代表专门的通信模式。

[TPS_SWCT_01874] client/server 风格交互的 SwConnector 的 “源” 与 “目标” 的定义:

| Client/Server | Source |

| DelegationSwConnector | Inner required PortPrototype | | DelegationSwConnector | Outer provided PortPrototype | | AssemblySwConnector | Required PortPrototype | | PassThroughSwConnector | Provided PortPrototype |

PortInterfaceMapping 的应用有一些已记录的限制。但一般而言,PortInterfaceMapping 可能被有害地使用:规定在 ECU 上下文中没有实现机会的映射方法,导致 RTE 中的语义未定义,即 RTE 生成器将无法正确处理这样的模型。

PortInterfaceMapping:

为应用 PortInterfaceMapping,SwConnector 必须引用一个 PortInterfaceMapping。

PortInterfaceMapping 的适用性:

PortInterfaceMapping 的优先级:

如果连接器引用了关联的 PortInterfaceMapping,则该映射就被映射数据元素的数量而言应是严格约束的。

请注意,兼容性规则在第 6 章描述。

PortInterface 的未映射元素:

由复合原始数据类型定义类型的 DataPrototype 的 PortInterfaceMapping:

4.3.1.1. Sender/Receiver 接口、参数接口与非易失数据接口元素的映射

VariableAndParameterInterfaceMapping:

VariableAndParameterInterfaceMapping 关于被引用 DataInterface 的一致性:

请注意,SwConnector 的 “源” 端与 “目标” 端到角色 firstDataPrototype 和 secondDataPrototype 的关系未定义。

不同种类 PortInterface 之间的映射:

可能的映射受 swImplPolicy 限制:

关于 [TPS_SWCT_01104] 的更多解释,请参见 [constr_1071]。

swImplPolicy 的相关性:

这是为满足 [constr_1071] 中定义的兼容性规则所必需的。

属性 isOptional 的相关性:

SenderReceiverInterface 的转换:

  • 被引用 DataPrototype 的 AutosarDataType 兼容;

  • 数据的换算可用;

  • 定义了 DataPrototypeMapping.firstToSecondDataTransformation。

()

AutosarDataType 的兼容性在第 6.2 节描述。数据换算的描述见第 4.3.2 节。

表4.22:VariableAndParameterInterfaceMapping(VariableAndParameterInterfaceMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of VariableDataPrototypes or ParameterDataPrototypes in context of two different SenderReceiverInterfaces, NvDataInterfaces or ParameterInterfaces. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , PortInterfaceMapping Referrable | | 聚合于 | PortInterfaceMappingSet.portInterfaceMapping |

8 这对 ApplicationRecordElement 和 ImplementationDataTypeElement 都有效。

表4.23:VariableAndParameterInterfaceMapping(VariableAndParameterInterfaceMapping)

属性 类型 多重性 种类 备注
dataMapping DataPrototypeMapping * 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 Stereotypes: atpSplitable Tags: atp.Splitkey=dataMapping

表4.24:DataPrototypeMapping(DataPrototypeMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of two particular VariableDataPrototypes, ParameterDataPrototypes or Argument DataPrototypes with non-equal shortNames, non-equal structure (specific condition is described by [constr_1187]), and/or non-equal semantic (resolution or range) in context of two different Sender ReceiverInterface, NvDataInterface or ParameterInterface or Operations. If the semantic is unequal, the 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. | | 基类 | ARObject | | 聚合于 | ClientServerOperationMapping.argumentMapping, VariableAndParameterInterfaceMapping.dataMapping |

属性 类型 多重性 种类 备注
firstData Prototype AutosarDataPrototype 0..1 ref First to be mapped DataPrototype in context of a Sender ReceiverInterface, NvDataInterface, ParameterInterface or Operation.
firstToSecond Data Transformation DataTransformation 0..1 ref This reference defines the need to execute the Data Transformation _ functions of the transformation chain when communicating from the Data PrototypeMapping.firstDataPrototype to the Data PrototypeMapping.secondDataPrototype. This reference also specifies the reverse Data Transformation Inv 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 Prototype AutosarDataPrototype 0..1 ref Second to be mapped DataPrototype in context of a SenderReceiverInterface, NvDataInterface, Parameter Interface or Operation.
secondToFirst Data Transformation DataTransformation 0..1 ref This defines the need to execute the reverse Data Transformation Inv functions of the transformation chain when communicating from the DataPrototypeMapping.secondDataPrototype to the Data PrototypeMapping.firstDataPrototype.
subElement Mapping SubElementMapping * aggr This represents the owned SubelementMapping. Stereotypes: atpSplitable Tags: atp.Splitkey=subElementMapping
textTable Mapping TextTableMapping 0..2 aggr Applied TextTableMapping(s)

DataPrototypeMapping . firstDataPrototype 的存在性:

DataPrototypeMapping . secondDataPrototype 的存在性:

4.3.1.2. Client/Server 接口元素的映射

ClientServerInterfaceMapping:

ClientServerOperationMapping 上下文中被映射 ClientServerOperation 的范围:

由 ClientServerOperationMapping 在角色 secondOperation 中引用的所有 ClientServerOperation 应恰好属于另一个 ClientServerInterface。

该规则应在 RTE 生成时施加。

ClientServerOperationMapping 上下文中被映射 ApplicationError 的范围:

由 ClientServerApplicationErrorMapping 在角色 secondApplicationError 中引用的所有 ApplicationError 应恰好属于另一个 ClientServerInterface。

该规则应在 RTE 生成时施加。

ClientServerInterface 的转换:

AutosarDataType 的兼容性在第 6.2 节描述。数据换算的描述见第 4.3.2 节。

ClientServerOperationMapping 上下文内 ArgumentDataPrototype 的一致性:

  • 一个 ClientServerOperationMapping.firstOperation,以及

  • ClientServerOperationMapping.secondOperation,

角色中的引用

  • ClientServerOperationMapping.argumentMapping.firstDataPrototype 或

  • ClientServerOperationMapping.argumentMapping.secondDataPrototype

应在 RTE 生成时存在,源自所述 ClientServerOperationMapping 拥有的某个 ClientServerOperationMapping.argumentMapping。

ArgumentDataPrototype.direction 应在 ClientServerOperationMapping 中保持:

实参数量应在 ClientServerOperationMapping 中保持:

ArgumentDataPrototype 在 ClientServerOperationMapping 中应只映射一次:

约束的适用性取决于数据变换的存在:

  • 从相应 ClientServerOperationMapping 到角色 firstToSecondDataTransformation 中 DataTransformation 的引用存在;

  • 被引用 DataTransformation 的属性 dataTransformationKind 的值设置为 DataTransformationKindEnum.asymmetricFromByteArray 或 DataTransformationKindEnum.asymmetricToByteArray。

表4.25:ClientServerInterfaceMapping(ClientServerInterfaceMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of ClientServerOperations in context of two different ClientServerInterfaces. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , PortInterfaceMapping , Referrable | | 聚合于 | PortInterfaceMappingSet.portInterfaceMapping |

属性 类型 多重性 种类 备注
errorMapping ClientServerApplication ErrorMapping * aggr Map two different ApplicationErrors defined in the context of two different ClientServerInterfaces.
operation Mapping ClientServerOperation Mapping * aggr Mapping of two ClientServerOperations in two different ClientServerInterfaces Stereotypes: atpSplitable Tags: atp.Splitkey=operationMapping

表4.26:ClientServerOperationMapping(ClientServerOperationMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of two particular ClientServerOperations in context of two different ClientServer Interfaces. | | 基类 | ARObject | | 聚合于 | ClientServerInterfaceMapping.operationMapping |

属性 类型 多重性 种类 备注
argument Mapping DataPrototypeMapping * aggr Defines the mapping of two particular ArgumentData Prototypes with unequal names or unequal semantic (resolution or range) in context of Operations. Stereotypes: atpSplitable Tags: atp.Splitkey=argumentMapping
firstOperation ClientServerOperation 0..1 ref First to-be-mapped ClientServerOperation of a Client ServerInterface.
firstToSecond Data Transformation DataTransformation 0..1 ref This reference indicates that a DataTransformation is intended in the context of the ClientServerOperation Mapping.
second Operation ClientServerOperation 0..1 ref Second to-be-mapped ClientServerOperation of a Client ServerInterface.

表4.27:ClientServerApplicationErrorMapping(ClientServerApplicationErrorMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class represents the ability to map ApplicationErrors onto each other. | | 基类 | ARObject | | 聚合于 | ClientServerInterfaceMapping.errorMapping |

属性 类型 多重性 种类 备注
firstApplication Error ApplicationError 0..1 ref This represents the first ApplicationError in the context of the ClientServerApplicationErrorMapping.
second ApplicationError ApplicationError 0..1 ref This represents the second ApplicationError in the context of the ClientServerApplicationErrorMapping.

reference ClientServerOperationMapping . firstOperation 的存在性:

reference ClientServerOperationMapping . secondOperation 的存在性:

4.3.1.3. 模式接口元素的映射

ModeInterfaceMapping:

ModeInterfaceMapping 的有效性:

ModeDeclarationGroup 的兼容性在第 6.7 章描述。

表4.28:ModeInterfaceMapping(ModeInterfaceMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of ModeDeclarationGroupPrototypes in context of two different ModeInterfaces. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , PortInterfaceMapping , Referrable | | 聚合于 | PortInterfaceMappingSet.portInterfaceMapping |

属性 类型 多重性 种类 备注
modeMapping ModeDeclarationGroup PrototypeMapping 0..1 aggr Mapping of two ModeDeclarationGroupPrototypes in two different ModeInterfaces

表4.29:ModeDeclarationGroupPrototypeMapping(ModeDeclarationGroupPrototypeMapping)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | ModeInterfaceMapping.modeMapping |

属性 类型 多重性 种类 备注
firstModeGroup ModeDeclarationGroup Prototype 0..1 ref ModeDeclarationGroupPrototype to be mapped.
mode Declaration MappingSet ModeDeclaration MappingSet 0..1 ref This represents the available mappings of Mode Declarations in the context ot this ModeDeclarationGroup Prototype.
secondMode Group ModeDeclarationGroup Prototype 0..1 ref ModeDeclarationGroupPrototype to be mapped.

reference ModeDeclarationGroupPrototypeMapping . firstModeGroup 的存在性:

reference ModeDeclarationGroupPrototypeMapping . secondModeGroup 的存在性:

ModeDeclarationGroupPrototypeMapping 的语义:

一个 ModeDeclarationMappingSet 范围内 firstMode 与 secondMode 的一致性:

  • 所有 firstMode 应属于一个且仅一个 ModeDeclarationGroup,且

  • 所有 secondMode 应属于一个且仅一个其他 ModeDeclarationGroup

在 RTE 生成时。

ModeDeclarationMappingSet 关于被引用 firstModeGroup 和 secondModeGroup 的一致性:

  • 拥有角色 firstMode 中引用的 modeDeclaration 的 ModeDeclarationGroup 应是 ModeDeclarationGroupPrototypeMapping.firstModeGroup 的类型,且

  • 拥有角色 secondMode 中引用的 modeDeclaration 的 ModeDeclarationGroup 应是 ModeDeclarationGroupPrototypeMapping.secondModeGroup 的类型。

该规则应在 RTE 生成时施加。

ModeDeclarationMapping 定义 ModeDeclaration 的显式关联:

ModeDeclarationGroupPrototypeMapping.modeDeclarationMappingSet 定义适用的 ModeDeclarationMapping 集合:

连接由 ModeDeclarationGroup 定义类型、其 ModeDeclaration 名称不同和/或 ModeDeclaration 数量不同的 ModeDeclarationGroupPrototype。

表4.30:ModeDeclarationMappingSet(ModeDeclarationMappingSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class implements a container for ModeDeclarationGroupMappings Tags: atp.recommendedPackage=PortInterfaceMappingSets | | 基类 | ARElement , ARObject , AtpClassifier , AtpType , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
mode Declaration Mapping ModeDeclaration Mapping * aggr This represents the collection of ModeDeclaration Mappings owned by the enclosing ModeDeclaration MappingSet.

表4.31:ModeDeclarationMapping(ModeDeclarationMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class implements a concrete mapping of two ModeDeclarations. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ModeDeclarationMappingSet.modeDeclarationMapping |

属性 类型 多重性 种类 备注
firstMode ModeDeclaration * 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 0..1 ref This represents the second ModeDeclaration of the Mode DeclarationMapping.

reference ModeDeclarationMapping . firstMode 的存在性:

reference ModeDeclarationMapping . secondMode 的存在性:

模式用户的一个 ModeDeclaration 恰好映射到模式管理器的一个 ModeDeclaration:

模式用户的一个 ModeDeclaration 映射到模式管理器的多个 ModeDeclaration:

当模式管理器中对应于适用 ModeDeclarationMapping 所引用 ModeDeclaration 的任何模式被进入时,模式用户的 ModeDeclaration 被进入。

当模式管理器中对应于适用 ModeDeclarationMapping 所引用 ModeDeclaration 的任何模式被退出、且新模式未映射到模式用户的相关模式时,对应于模式用户被映射 ModeDeclaration 的模式被退出。

请注意,如果模式用户的一个 ModeDeclaration 通过多个 ModeDeclarationMapping 映射到模式管理器的多个 ModeDeclaration,预期语义规定为:模式管理器的各个模式切换表示模式用户的 “退出” 和 “进入” 事件。换言之,模式用户可以识别各个切换。

如果模式用户的一个 ModeDeclaration(通过利用角色 firstMode 的多重性)在单个 ModeDeclarationMapping 的上下文中映射到模式管理器的多个 ModeDeclaration,语义规定为:模式管理器的各个模式切换对模式用户不可识别。

模式用户的 ModeDeclaration 到模式管理器 ModeDeclaration 的映射:

模式用户的 ModeDeclaration 到模式管理器全部 ModeDeclaration 的映射:

请注意,[constr_1210] 防止存在如下配置:在没有切换进行时模式用户不处于某个已定义的模式。

未映射到模式管理器 ModeDeclaration 的模式用户 ModeDeclaration:

4.3.1.4. 触发器接口元素的映射

TriggerInterfaceMapping:

表4.32:TriggerInterfaceMapping(TriggerInterfaceMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of unequal named Triggers in context of two different TriggerInterfaces. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , PortInterfaceMapping , Referrable | | 聚合于 | PortInterfaceMappingSet.portInterfaceMapping |

属性 类型 多重性 种类 备注
triggerMapping TriggerMapping * aggr Mapping of two Trigger in two different TriggerInterface

表4.33:TriggerMapping(TriggerMapping)

| 包 | M2::AUTOSARTemplates::CommonStructure::TriggerDeclaration | | 说明 | Defines the mapping of two particular unequally named Triggers in the given context. | | 基类 | ARObject | | 聚合于 | TriggerInterfaceMapping.triggerMapping |

属性 类型 多重性 种类 备注
firstTrigger Trigger 0..1 ref A Trigger to be mapped.
secondTrigger Trigger 0..1 ref A Trigger to be mapped.

reference TriggerMapping . firstTrigger 的存在性:

reference TriggerMapping . secondTrigger 的存在性:

4.3.1.5. 组合数据类型元素的映射

PortInterface 元素的映射不限于把整个 DataPrototype 相互映射。

组合数据类型元素的映射:

(把 category 为 STRUCTURE 或 ARRAY 的)相互映射。

这种能力(对其适用 [constr_10087])可以用于例如 “源” 端与 “目标” 端的 dataElement 由不同 ApplicationRecordDataType 定义类型的情况。

在这种情况下,把 ApplicationCompositeDataType 或 category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType 的元素相互映射,允许定义满足兼容性规则的特定元素对。

SubElementMapping 存在的限制:

“源” 端元素到 “目标” 端元素的映射:

关于兼容性规则的细节在第 6.3 章解释。

ApplicationCompositeDataType 或 ImplementationDataType 的未映射元素与属性 swImplPolicy:

“目标” 端未映射的 dataElement 应有 initValue:

该规则应在 RTE 生成时施加。

ApplicationCompositeDataType 与嵌套 ImplementationDataType 的组合:

组合元素到原始 DataPrototype 的映射:

为此,“源” 端 PortPrototype 所含 dataElement/nvData 的多重性应设置为 1,“目标” 端 PortPrototype 所含 dataElement/nvData 的多重性应设置为 0。

一般而言,“源” 端 PortPrototype 所含相应 dataElement/nvData 的多重性在技术上也可以设置为 0,但该情形保留供将来使用。

组合到原始用例只有一个映射:

“源” 端的原始 DataPrototype 不应映射到 SwConnector “目标” 端组合数据类型的元素:

  • SwConnector “源” 端 PortPrototype 所含的 AutosarDataPrototype 由 category 为 VALUE 的 ApplicationPrimitiveDataType、category 为 VALUE 的 ImplementationDataType 或最终解析为 category VALUE 的 category TYPE_REFERENCE 定义类型;

  • DataPrototypeMapping 聚合一个 subElementMapping,引用 “目标” 端 PortPrototype 所含的 ImplementationDataTypeElement 或 ApplicationCompositeElementDataPrototype;

该规则应在 RTE 生成时施加。

ImplementationDataTypeSubElementRef . implementationDataTypeElement as opposed to ImplementationDataTypeSubElementRef . parameterImplementationDataTypeElement 的存在性:

  • ImplementationDataTypeSubElementRef.implementationDataTypeElement,或

  • ImplementationDataTypeSubElementRef.parameterImplementationDataTypeElement

应在 RTE 生成时存在。

换言之,ImplementationDataTypeSubElementRef 应引用 VariableDataPrototype 或 ParameterDataPrototype 内部的嵌套层级。

表4.34:SubElementMapping(SubElementMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class allows for the definition of mappings of elements of a composite data type. | | 基类 | ARObject | | 聚合于 | DataPrototypeMapping.subElementMapping | | 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class provides the ability to reference elements of composite data type. | | 基类 | ARObject | | 子类 | ApplicationCompositeDataTypeSubElementRef, ImplementationDataTypeSubElementRef | | 聚合于 | SubElementMapping.firstElement, SubElementMapping.secondElement |

属性 类型 多重性 种类 备注
firstElement SubElementRef 0..1 aggr This represents the first element referenced in the scope of the mapping. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=firstElement, firstElement.variation Point.shortLabel vh.latestBindingTime=preCompileTime
secondElement SubElementRef 0..1 aggr This represents the second element referenced in the scope of the mapping. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=secondElement, secondElement.variation Point.shortLabel vh.latestBindingTime=preCompileTime
textTable Mapping TextTableMapping 0..2 aggr This allows for the text-table translation of individual elements of a composite data type.
Class SubElementRef (abstract)

表4.35:ImplementationDataTypeSubElementRef(ImplementationDataTypeSubElementRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class represents the specialization of SubElementMapping with respect to Implementation DataTypes. | | 基类 | ARObject , SubElementRef | | 聚合于 | SubElementMapping.firstElement, SubElementMapping.secondElement |

属性 类型 多重性 种类 备注
implementation DataType Element ArVariableIn ImplementationData InstanceRef 0..1 aggr This represents the referenced implementationDataType Element.
parameter Implementation DataType Element ArParameterIn ImplementationData InstanceRef 0..1 aggr This represents the referenced ImplementationDataType Element.

表4.36:ApplicationCompositeDataTypeSubElementRef(ApplicationCompositeDataTypeSubElementRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | This meta-class represents the specialization of SubElementMapping with respect to Application CompositeDataTypes. | | 基类 | ARObject , SubElementRef | | 聚合于 | SubElementMapping.firstElement, SubElementMapping.secondElement |

属性 类型 多重性 种类 备注
application Composite Element ApplicationComposite ElementDataPrototype 0..1 iref This represents the referenced ApplicationComposite DataPrototype. InstanceRef implemented by: ApplicationComposite ElementInPortInterfaceInstanceRef

ApplicationCompositeDataTypeSubElementRef . applicationCompositeElement 的存在性:

ApplicationCompositeElementInPortInterfaceInstanceRef 上下文中 rootDataPrototype 与 base 的一致性:

这意味着:如果 base 是 ParameterInterface,则 rootDataPrototype 应是 ParameterDataPrototype;否则 rootDataPrototype 应是 VariableDataPrototype。

该规则应在 RTE 生成时应用。

ApplicationCompositeElementInPortInterfaceInstanceRef 上下文中数据类型的一致性:

换言之,应当能够通过用于为 rootDataPrototype 定义类型的数据类型定义所建立的类型-原型链到达 contextDataPrototype 和 targetDataPrototype。并且,正如 InstanceRef 的定义所暗示的,contextDataPrototype 应彼此包围并最终包围 targetDataPrototype。

ArVariableInImplementationDataInstanceRef 上下文中数据类型的一致性:

ArParameterInImplementationDataInstanceRef 上下文中数据类型的一致性:

4.3.2. 数据换算

用于数据换算的 CompuMethod 支持的 category:

  • LINEAR,

  • IDENTICAL,

  • SCALE_LINEAR_AND_TEXTTABLE(只要只有一个线性缩放),

  • TEXTTABLE,

  • BITFIELD_TEXTTABLE,以及

  • RAT_FUNC——只要后者的语义归结为倒数线性数据缩放。

数据换算在组合 AutosarDataType 上的应用:

4.3.2.1. 线性数据缩放

线性数据缩放可以在以下前提下定义:

线性数据缩放的定义:

  1. 关于 CompuMethod 的存在,应适用以下情形之一:

  2. (a) 相关的 AutosarDataType 引用 category 为 IDENTICAL、LINEAR 或 RAT_FUNC 的 CompuMethod。

  3. (b) 如果一侧(发送方或接收方)不引用 CompuMethod,则应假定一个 category 为 IDENTICAL 的 “默认” CompuMethod。

  4. CompuMethod 要么引用兼容的 Unit,要么引用又引用兼容 PhysicalDimension 定义的 Unit。

  5. 两个 CompuMethod 都满足以下条件:

其中

  • N2 = N3 = … = Ni = 0

  • D1 = D2 = … = Di = 0

  • N1 = 0

  • D0 = 0

系数 N0 表示偏移量,可取任意值。

倒数线性数据缩放的定义:

  1. 相关的 AutosarDataType 引用 category 为 RAT_FUNC 的 CompuMethod。

  2. CompuMethod 要么引用兼容的 Unit,要么引用又引用兼容 PhysicalDimension 定义的 Unit。

  3. 两个 CompuMethod 都满足以下条件:

其中

  • N1 = N2 = … = Ni = 0

  • D2 = D3 = … = Di = 0

  • N0 = 0

  • D1 = 0

系数 D0 表示(倒数)偏移量,可取任意值。

可以计算线性换算因子:

TextTableMapping 的存在性:

请注意,[TPS_SWCT_01162] 中出现 BITFIELD_TEXTTABLE 背后的用例是:像 Dem 这样的 BSW 模块需要把具有嵌入组合数据类型中的单个位性质的数据放入 NVRAM。

TextTableMapping 定义为基于表的换算。

从 firstValue 到 secondValue 的换算:

从 secondValue 到 firstValue 的换算:

可逆映射:

不可逆映射:

TextTableMapping 的适用性取决于 CompuMethod.category 的值:

  • firstDataPrototype 的 category:TEXTTABLE,secondDataPrototype 的 category:TEXTTABLE

  • firstDataPrototype 的 category:SCALE_LINEAR_AND_TEXTTABLE,secondDataPrototype 的 category:TEXTTABLE

  • firstDataPrototype 的 category:TEXTTABLE,secondDataPrototype 的 category:SCALE_LINEAR_AND_TEXTTABLE

  • firstDataPrototype 的 category:BITFIELD_TEXTTABLE,secondDataPrototype 的 category:TEXTTABLE

  • firstDataPrototype 的 category:TEXTTABLE,secondDataPrototype 的 category:BITFIELD_TEXTTABLE

  • firstDataPrototype 的 category:BITFIELD_TEXTTABLE,secondDataPrototype 的 category:BITFIELD_TEXTTABLE

()

在某种程度上,位域可以视为原始数据类型与结构化数据类型的混合体:

  • 一方面,位域在原始 ImplementationDataType 的上下文中定义;

  • 另一方面,通过 mask 的定义,可以在原始 ImplementationDataType 内定义彼此隔离的部分,这些部分就匹配 mask 的数据的语义而言可能完全相互独立。

换言之,原始 ImplementationDataType 内语义独立且可能隔离的部分的存在,产生了类似如下情形的特征:就好像这些隔离部分的定义是通过在组合 ImplementationDataType 的上下文中定义原始 ImplementationDataTypeElement 而创建的。

因为可以把引用 category 为 BITFIELD_TEXTTABLE 的 CompuMethod 的 DataPrototype 的 “任务宣言” 视为模拟结构化数据类型的语义,所以在这个特定情形下也可以应用一些已适用于结构化数据类型的规则。

这一结论与 [TPS_SWCT_01551] 的存在相结合,为 [TPS_SWCT_01583] 奠定了基础。

TextTableMapping 的完整性不是要求:

就 [TPS_SWCT_01583] 而言,仍然重要的是要注意:在单个 mask 内,发送方侧的所有值都应有到接收方侧的映射。

否则,RTE 生成器将无法创建无歧义地把正确值相互映射的映射代码。

发送方侧给定位掩码值的 TextTableMapping 完整性:

该规则应在 RTE 生成时施加。

bitfieldTextTableMaskFirst 属性的存在性:

该规则应在 RTE 生成时施加。

bitfieldTextTableMaskSecond 属性的存在性:

该规则应在 RTE 生成时施加。

category 值设置为 BITFIELD_TEXTTABLE 的 CompuMethod 的 TextTableMapping 限制:

9 视适用的情形,这意味着 bitfieldTextTableMaskFirst(适用于 [TPS_SWCT_01163] 的情形)或 bitfieldTextTableMaskSecond(适用于 [TPS_SWCT_01164] 的情形)。

该规则应在 RTE 生成时施加。

TextTableMapping 中值与掩码的一致性:

该规则应在 RTE 生成时施加。

例 4.1

[constr_1307] 的示例:对于位掩码 0b00001000,只允许对应值 8 和 0。

表4.37:TextTableMapping(TextTableMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines the mapping of two DataPrototypes typed by AutosarDataTypes that refer to CompuMethods of category TEXTTABLE, SCALE_LINEAR_AND_TEXTTABLE or BITFIELD_TEXTTABLE. | | 基类 | ARObject | | 聚合于 | DataPrototypeMapping.textTableMapping, SenderRecArrayTypeMapping.senderToSignalTextTable Mapping, SenderRecArrayTypeMapping.signalToReceiverTextTableMapping, SenderReceiverToSignal Mapping.senderToSignalTextTableMapping, SenderReceiverToSignalMapping.signalToReceiverTextTable Mapping, SenderRecRecordElementMapping.senderToSignalTextTableMapping, SenderRecRecord ElementMapping.signalToReceiverTextTableMapping, SubElementMapping.textTableMapping |

属性 类型 多重性 种类 备注
bitfieldTextTable MaskFirst PositiveInteger 0..1 attr This attribute can be used to support the mapping of bit field to bit field, boolean values to bit fields, and vice versa. The attribute defines the bit mask for the first element of the TextTableMapping. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
bitfieldTextTable MaskSecond PositiveInteger 0..1 attr This attribute can be used to support the mapping of bit field to bit field, boolean values to bit fields, and vice versa. The attribute defines the bit mask for the second element of the TextTableMapping. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
identical Mapping Boolean 0..1 attr If identicalMapping is set == true the values of the two referenced DataPrototypes do not need any conversion of the values.
mapping Direction MappingDirectionEnum 0..1 attr Specifies the conversion direction for which the TextTable Mapping is applicable.
valuePair TextTableValuePair * aggr Defines a pair of values which are translated into each other.

TextTableMapping . identicalMapping 属性的存在性:

TextTableMapping . mappingDirection 属性的存在性:

表4.38:MappingDirectionEnum(MappingDirectionEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Specifies the conversion direction for which the mapping is applicable. | | 聚合于 | TextTableMapping.mappingDirection |

字面值 说明
bidirectional The TextTableMapping is applicable in both directions. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=2

表4.39:TextTableValuePair(TextTableValuePair)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | Defines a pair of text values which are translated into each other. | | 基类 | ARObject | | 聚合于 | TextTableMapping.valuePair |

属性 类型 多重性 种类 备注
firstValue Numerical 0..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 0..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

TextTableValuePair . firstValue 属性的存在性:

TextTableValuePair . secondValue 属性的存在性:

4.3.3. 与数据变换的相关性

[TPS_SWCT_01158] 中第 4 项的一个(突出的)用例是 NvBlockSwComponentType 与 AUTOSAR Dcm 之间的交互。

具体而言,RTE 将调用数据变换器,把从 Dcm ServiceSwComponentType 拥有的 PortPrototype 可得的诊断数据的 uint8 数组表示,转换为 NvBlockSwComponentType 的 PortPrototype 拥有的 VariableDataPrototype。

为此目的的配置中,适用的 DataPrototypeMapping 在角色 firstToSecondDataTransformation 中引用一个 DataTransformation;对于两个使用非对称数据变换的相连 PortPrototype 的情形,还有 secondToFirstDataTransformation(见图 4.23)。

注意,对于 ApplicationSwComponentType 与 ServiceSwComponentType 之间的这种特定交互,适用 [TPS_SWCT_01579]/[TPS_SWCT_01831],它规定:由 SenderReceiverInterface 定义类型的 PortPrototype 中的 dataElement 的属性 isService 应设置为 false。

DataPrototypeMapping.secondToFirstDataTransformation 的语义:

但是,存在两个相连 PRPortPrototype 之间非对称数据变换的用例,在这种情况下需要分别规定每个方向。

为此,除 firstToSecondDataTransformation 之外还存在引用 secondToFirstDataTransformation。

图 4.24 描述了必须同时规定 firstToSecondDataTransformation 和 secondToFirstDataTransformation 的最突出用例。

由 NvBlockSwComponentType 定义类型的 SwComponentPrototype 暴露一个 PRPortPrototype,它连接到附加在表示 Dcm 服务软件组件的 SwComponentPrototype 上的另一个 PRPortPrototype。

NvBlockSwComponentType 一侧的 PRPortPrototype 由 NvDataInterface 定义类型,后者又聚合单个 nvData。用于定义该 nvData 的数据类型是结构化数据类型。

但是,表示 Dcm 的服务软件组件无法处理结构化数据类型。它只能处理原始类型和原始类型的数组(例如字节)。

因此,(非对称)数据变换器的存在被便利地用于把结构化数据类型的内容序列化为线性数组,反之亦然。

为了显式定义这一预期语义,DataPrototypeMapping 定义两个引用:

  • firstToSecondDataTransformation:引用属性 dataTransformationKind 设置为值 asymmetricToByteArray 的 DataTransformation。该引用表示从 NvBlockSwComponentType 到 Dcm 的方向;

  • secondToFirstDataTransformation:引用属性 dataTransformationKind 设置为值 asymmetricFromByteArray 的 DataTransformation。该引用表示从 Dcm 到 NvBlockSwComponentType 的方向。

这种建模方法在 [constr_1631] 和 [constr_1632] 中形式化。

DataPrototypeMapping.secondToFirstDataTransformation 的适用性:

该规则应在 RTE 生成时施加。

firstToSecondDataTransformation 与 secondToFirstDataTransformation 的限制:

  • firstToSecondDataTransformation 应引用属性 dataTransformationKind 设置为 asymmetricToByteArray 的 DataTransformation,且

  • secondToFirstDataTransformation 应引用属性 dataTransformationKind 设置为 asymmetricFromByteArray 的 DataTransformation。

表4.40:DataTransformation(DataTransformation)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | A DataTransformation represents a transformer chain. It is an ordered list of transformers. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DataTransformationSet.dataTransformation |

属性 类型 多重性 种类 备注
data Transformation Kind DataTransformationKind Enum 0..1 attr This attribute controls the kind of DataTransformation to be applied.
executeDespite Data Unavailability Boolean 0..1 attr Specifies whether the transformer chain is executed even if no input data are available.

表4.41:DataTransformation(DataTransformation)

属性 类型 多重性 种类 备注
transformer Chain (ordered) Transformation Technology * ref This attribute represents the definition of a chain of transformers that are supposed to be executed according to the order of being referenced from DataTransformation.

DataTransformation . executeDespiteDataUnavailability 属性的存在性:

表4.42:DataTransformationKindEnum(DataTransformationKindEnum)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | This enumeration contributes to the definition of the scope of the DataTransformation. | | 聚合于 | DataTransformation.dataTransformationKind |

字面值 说明
asymmetricFrom ByteArray The DataTransformation shall only be applied to the receiving end only, i.e. transform from byte array to data type. Tags: atp.EnumerationLiteralIndex=0
asymmetricToByte Array The DataTransformation shall be applied to the sending end only, i.e. from data type to byte array. Tags: atp.EnumerationLiteralIndex=1
symmetric The DataTransformation shall be applied at both the sending and the receiving end of the communication. Tags: atp.EnumerationLiteralIndex=2

4.4. 端口注解

4.4.1. 简介

PortPrototype 可以拥有端口注解:

它们不直接影响经由该 PortPrototype 的调用签名,但包含对连接两侧组件的应用开发者可能有用的进一步信息。

端口层级注解的汇总见图 4.25。

GeneralAnnotation:

4.4.2. SenderReceiverAnnotation

嵌入式汽车软件用于实现开环和闭环控制算法。因此,软件组件描述必须容纳典型的控制工程描述手段,这些手段对嵌入式软件自身只有间接影响。

这些注解向(功能)开发者直接指示某个软件组件是否适合要设计的控制算法。典型的注解是信号质量,它由若干属性刻画。每个属性本身就是一个注解。

sender/receiver 通信的典型注解:

  • 信号寿命(Signal Age):该属性表达:只有当信号从传感器到消费者的传播能在特定时限内完成时,关联软件组件才能正确工作。当然,这无法在组件或角色层级确定,必须考虑实例视图以及实际的 ECU 和总线调度。

  • 原始(Raw):原始信号通常直接取自 ECU 抽象层的基础软件模块。特别是,没有任何传感器软件组件

过滤过其原始值。使用该注解的 SwComponentType 的 RPortPrototype 中的 dataElement 向控制工程师(他为该组件开发控制算法)表明信号必须被过滤(这种关系适用于 SenderReceiverInterface)。

  • 已过滤(Filtered):该属性表明原始信号已被某些应用软件组件使用某种过滤器处理过。

  • 计算所得(Computed):该属性表明该信号不是直接测量而是(暂时地)从若干其他测量或计算的信号计算而来。在车辆中,可能存在来自其他组件的、质量更好的替代信号,例如原始信号。

  • 最小值(Min):该注解表明信号携带最小值。例如,如果软件组件中计算的参考值低于该值,可能必须采取某些专门动作(例如故障模式)。

  • 最大值(Max):该注解表明信号携带最大值。例如,如果软件组件中计算的参考值高于该值,可能必须采取某些专门动作(例如故障模式)。

在元模型中,这一方面由抽象元类 SenderReceiverAnnotation 实现,它是 SenderAnnotation 和 ReceiverAnnotation 两者的基类。

抽象元类 SenderReceiverAnnotation 与 SenderAnnotation 和 ReceiverAnnotation 的关系描绘于图 4.26。

表4.43:SenderReceiverAnnotation(SenderReceiverAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation of the data elements in a port that realizes a sender/receiver interface. | | 基类 | ARObject , GeneralAnnotation | | 子类 | ReceiverAnnotation, SenderAnnotation | | 聚合于 | PortPrototype .senderReceiverAnnotation | | 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation of a sender port, specifying properties of data elements that don't affect communication or generation of the RTE. | | 基类 | ARObject , GeneralAnnotation , SenderReceiverAnnotation | | 聚合于 | PortPrototype .senderReceiverAnnotation |

属性 类型 多重性 种类 备注
computed Boolean 0..1 attr Flag whether this data element was not measured directly but instead was calculated from possibly several other measured or calculated values.
dataElement VariableDataPrototype 0..1 ref The instance of VariableDataPrototype annotated.
limitKind DataLimitKindEnum 0..1 attr This min or max has not to be mismatched with the min- and max for data-value in a compu-method. For example, this annotation shows when the result of the calculation performed in a RunnableEntity owned by one AtomicSw ComponentType is transmitted to another AtomicSw ComponentType whose RunnableEntity will use this value as a limit, e.g. the max.power which can be used by that software-component, or the current min. slip.
processingKind ProcessingKindEnum 0..1 attr This attribute controls how data is processed according to the possible values of ProcessingKindEnum.
Class SenderAnnotation

表4.44:ReceiverAnnotation(ReceiverAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | 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. | | 基类 | ARObject , GeneralAnnotation , SenderReceiverAnnotation | | 聚合于 | PortPrototype .senderReceiverAnnotation |

属性 类型 多重性 种类 备注
signalAge MultidimensionalTime 0..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.

表4.45:ProcessingKindEnum(ProcessingKindEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Kind of processing which has been applied to a data element. | | 聚合于 | SenderReceiverAnnotation .processingKind |

字面值 说明
filtered Indicates that a raw signal has been manipulated by some application software components by using filters. Tags: atp.EnumerationLiteralIndex=0
none Indicates that none of the other option apply. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=2

表4.46:DataLimitKindEnum(DataLimitKindEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Indicates whether the data element carries a minimum or maximum value, thereby limiting the current range of another value. | | 聚合于 | SenderReceiverAnnotation .limitKind |

字面值 说明
max Limitation to maximum value Tags: atp.EnumerationLiteralIndex=0

表4.47:DataLimitKindEnum(DataLimitKindEnum)

属性 类型 多重性 种类 备注
min Limitation to minimum value Tags: atp.EnumerationLiteralIndex=1
none No limitation applicable Tags: atp.EnumerationLiteralIndex=2

Min 和 Max 注解在一段时间内有效:

该值可能随例如空调系统的状态而变化。因此,这些注解不应与 CompuMethod 的 min 和 max 属性混淆。

sender/receiver 通信的应用层级端口注解必须与 PortPrototype 中的每个 dataElement 关联,例如同一个 PortPrototype 中可能有一个 “原始” dataElement 和一个 “已过滤” dataElement!

VariableDataPrototype 使用相同的应用层级 SenderReceiverAnnotation:

SenderReceiverAnnotation 的分组:

  • 处理类型,在某种程度上指示信号的直接质量;

  • 计算所得,它只是一个标志;或

  • 限值类型,表明组件期望一个实际限值。

对于 RPortPrototype,可以规定由关联 SwConnector 携带的值的信号寿命。这些组中的每一个都可以解释为信号质量的一个属性。

关于元类 SenderReceiverAnnotation 的更多信息请参见图 4.26。

SenderReceiverAnnotation 的上下文:

4.4.3. ClientServerAnnotation

ClientServerAnnotation:

表4.48:ClientServerAnnotation(ClientServerAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a port regarding a certain Operation. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .clientServerAnnotation |

属性 类型 多重性 种类 备注
operation ClientServerOperation 0..1 ref This represents the ClientServerOperation that the Client ServerAnnotation corresponds to.

主要用例是定义与 ClientServerOperation 相关的附加信息。

ClientServerAnnotation 的上下文:

4.4.4. I/O 硬件抽象层的注解

在 ECU 抽象层内定义了 ECU 信号。这些信号表示到达微控制器外设并经由 MCAL 从寄存器取回的电气信号。

对 I/O 硬件抽象层的访问经由服务接口完成,即 I/O 硬件抽象层在 SensorActuatorSwComponentType 的指定服务端口提供 GET 和 SET 操作。

IoHwAbstractionServerAnnotation 的使用:

表4.49:IoHwAbstractionServerAnnotation(IoHwAbstractionServerAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | 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. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .ioHwAbstractionServerAnnotation |

属性 类型 多重性 种类 备注
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 0..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) / (2ˆdatatypelength - 1) Tags: xml.sequenceOffset=30
dataElement VariableDataPrototype 0..1 ref Reference to the corresponding VariableDataPrototype. Tags: xml.sequenceOffset=40
failure Monitoring PortPrototype 0..1 ref This is only applicable in SET operations. If it is enabled, 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
Class IoHwAbstractionServerAnnotation
filtering Debouncing FilterDebouncingEnum 0..1 attr This attribute is used to indicate what kind of filtering/ debouncing has been put to the signal in the IoHw Abstraction 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 0..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

表4.50:FilterDebouncingEnum(FilterDebouncingEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | This enumeration defines possible values for the filter debouncing strategy. | | 聚合于 | IoHwAbstractionServerAnnotation.filteringDebouncing |

字面值 说明
debounceData The signal is a mean value Tags: atp.EnumerationLiteralIndex=0
rawData Means that no modification of the signal has been applied. This is the default value Tags: atp.EnumerationLiteralIndex=1
waitTimeDate The signal is delivered by a GET operation after a certain amount of time Tags: atp.EnumerationLiteralIndex=2

表4.51:PulseTestEnum(PulseTestEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | 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 | | 聚合于 | IoHwAbstractionServerAnnotation.pulseTest |

字面值 说明
disable Disables the pulse test Tags: atp.EnumerationLiteralIndex=0
enable Enables the pulse test Tags: atp.EnumerationLiteralIndex=1

为 ArgumentDataPrototype 指派多个注解:

它们描绘于图 4.28 的 IoHwAbstractionServerAnnotation 元类中。

属性的详细描述见 IoHwAbstraction 层软件规范文档 [16]。

例如,信号寿命在这个特定接口中就寄存器而言有非常专门的含义,而 SenderReceiverAnnotation 中的信号寿命更通用。特别是,它与微控制器外设没有关系。

4.4.5. 参数端口注解

ParameterPortAnnotation:

在 PortPrototype 提供的数据是标定参数。ParameterPortAnnotation 提供对特定 ParameterDataPrototype 的引用。

表4.52:ParameterPortAnnotation(ParameterPortAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a port used for calibration regarding a certain ParameterDataPrototype. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .parameterPortAnnotation |

表4.53:ParameterPortAnnotation(ParameterPortAnnotation)

属性 类型 多重性 种类 备注
parameter ParameterData Prototype 0..1 ref The instance of annotated ParameterDataPrototype.

主要用例是便于访问哪些标定参数影响 PortPrototype 上数据的信息。

ParameterPortAnnotation 的上下文:

4.4.6. 模式端口注解

ModePortAnnotation:

主要用例是允许定义与模式声明组原型相关的附加信息。

表4.54:ModePortAnnotation(ModePortAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a port used for calibration regarding a certain ModeDeclarationGroupPrototype. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .modePortAnnotation |

属性 类型 多重性 种类 备注
modeGroup ModeDeclarationGroup Prototype 0..1 ref The instance of annotated ModeDeclarationGroup Prototype.

ModePortAnnotation 的上下文:

4.4.7. 触发器端口注解

TriggerPortAnnotation:

表4.55:TriggerPortAnnotation(TriggerPortAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a port used for calibration regarding a certain Trigger. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .triggerPortAnnotation |

属性 类型 多重性 种类 备注
trigger Trigger 0..1 ref The instance of annotated trigger.

主要用例是定义与触发器相关的附加信息。

TriggerPortAnnotation 的上下文:

4.4.8. 非易失数据端口注解

NvDataPortAnnotation:

表4.56:NvDataPortAnnotation(NvDataPortAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a port regarding a certain VariableDataPrototype. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .nvDataPortAnnotation |

属性 类型 多重性 种类 备注
variable VariableDataPrototype 0..1 ref The instance of nv data annotated.

主要用例是定义与非易失数据元素相关的附加信息。

NvDataPortAnnotation 的上下文:

4.4.9. 被委托端口的注解

DelegatedPortAnnotation:

如果使用空 CompositionSwComponentType 作为子系统的接口定义,该信息用于预先定义和预先检查 VFB 中产生的通信模式(1:n、n:1、1:1)。

DelegatedPortAnnotation 或者指导系统设计者连接空的 CompositionSwComponentType,或者指导子系统设计者在 CompositionSwComponentType 内部应用通信模式(1:n、n:1、1:1)。

DelegatedPortAnnotation.signalFan 的语义:

  • single:CompositionSwComponentType 内部经由 DelegationSwConnector 和 AssemblySwConnector 的连接定义为:外部 PortPrototype 的 SenderReceiverInterface 中出现的每个 dataElement 或 ClientServerInterface 中的每个操作只参与 1:1 的通信模式。

  • nfold:CompositionSwComponentType 内部经由 DelegationSwConnector 和 AssemblySwConnector 的连接定义为:外部 PortPrototype 的 SenderReceiverInterface 中出现的至少一个 dataElement 或 ClientServerInterface 中的至少一个操作参与 1:n 或 n:1 的通信模式。

glyph[floorright](RS_SWCT_02110)

DelegatedPortAnnotation 的上下文:

表4.57:DelegatedPortAnnotation(DelegatedPortAnnotation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Annotation to a "delegated port" to specify the Signal Fan In or Signal Fan Out inside the CompositionSw ComponentType. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | PortPrototype .delegatedPortAnnotation |

属性 类型 多重性 种类 备注
signalFan SignalFanEnum 0..1 attr Specifies the Signal Fan In or Signal Fan Out inside the Composition Type.

表4.58:SignalFanEnum(SignalFanEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ApplicationAttributes | | 说明 | Signal Fan inside the Composition Component Type. | | 聚合于 | DelegatedPortAnnotation.signalFan |

字面值 说明
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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=1

4.4.10. 通用注解

除正式规定的属性之外,还可以放置文本信息,如抽象 GeneralAnnotation 所提供的(概览见图 4.33)。

表4.59:GeneralAnnotation(GeneralAnnotation)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::GeneralAnnotation | | 说明 | This class represents textual comments (called annotations) which relate to the object in which it is aggregated. These annotations are intended for use during the development process for transferring information from one step of the development process to the next one. The approach is similar to the "yellow pads" ... This abstract class can be specialized in order to add some further formal properties. |

表4.60:GeneralAnnotation(GeneralAnnotation)

| 基类 | ARObject | | 子类 | Annotation, ClientServerAnnotation, DelegatedPortAnnotation, IoHwAbstractionServerAnnotation, Mode PortAnnotation, NvDataPortAnnotation, ParameterPortAnnotation, SenderReceiverAnnotation , Trigger PortAnnotation |

属性 类型 多重性 种类 备注
annotation Origin String 1 attr This attribute identifies the origin of the annotation. It is an arbitrary string since it can be an individual's name as well as the name of a tool or even the name of a process step. Tags: xml.sequenceOffset=30
annotationText DocumentationBlock 1 aggr This is the text of the annotation. Tags: xml.sequenceOffset=40
label MultilanguageLong Name 0..1 aggr This is the headline for the annotation. Tags: xml.sequenceOffset=20

表4.61:MultilanguageLongName(MultilanguageLongName)

| 包 | M2::MSR::Documentation::TextModel::MultilanguageData | | 说明 | This meta-class represents the ability to specify a long name which acts in the role of a headline. It is intended for human readers. Per language it should be around max 80 characters. | | 基类 | ARObject | | 聚合于 | AliasNameAssignment.label, GeneralAnnotation .label, MultilanguageReferrable .longName, Note.label, Prms.label, ValueGroup.label |

属性 类型 多重性 种类 备注
l4 LLongName 1..* aggr This is the long name in one particular language. Tags: xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false

4.5. 通信规范

ComSpec 的总体图景:

然而,这样的 PortInterface 只描述结构,不包括关于通信是否需要可靠进行、或在真实数据尚不可用时是否存在初始值的信息。

这些信息是角色特定的,即应应用在 PortPrototype 层级而非 PortInterface 层级。因此,大多数与通信相关的属性与 SwComponentType 的 PortPrototype 相关。

通信属性组织在所谓的通信规范(按元模型的术语:ComSpec)类中。

注意,通信规范是可选的,即其存在并非在任何情况下都被要求。图 4.34 和 4.35 给出通信规范的概览。派生的元类在以下子章中说明。

如前所述,SwComponentType 层级所需的 ComSpec 元类附加到 PortPrototype 声明上,而后者又是 SwComponentType 定义的一部分。

尽管如此,ComSpec 的使用不限于 AtomicSwComponentType 的 PortPrototype(更多细节请参见第 2.5 节)。

第 7.5.1、7.5.2 节随后解释相对于 RTE、RTE 事件和相应通信属性的 sender-receiver 和 client-server 通信模式。

若干 ComSpec 允许相对于关联 DataPrototype 定义 initValue。关于 initValue 表示的更多细节请参见第 5.7.2 节。

此外,适用 [constr_1043],使得只有特定的 ComSpec 子类才能由由相应种类 PortInterface 定义类型的 PortPrototype 拥有。

一个 PPortPrototype 上下文中 PPortComSpec 数量的限制:

  • dataElement(SenderComSpec 的情况),

  • operation(ServerComSpec 的情况),

  • modeGroup(ModeSwitchSenderComSpec 的情况),

  • variable(NvProvideComSpec 的情况),或

  • parameter(ParameterProvideComSpec 的情况)

在合同阶段生成执行时。

换言之,不允许在一个 PPortPrototype 的上下文中存在两个或更多引用同一 dataElement 或 operation 的 PPortComSpec。

一个 PPortPrototype 上下文中 RPortComSpec 数量的限制:

  • dataElement(ReceiverComSpec 的情况),

  • operation(ClientComSpec 的情况),

  • modeGroup(ModeSwitchReceiverComSpec 的情况),

  • variable(NvRequireComSpec 的情况),或

  • parameter(ParameterRequireComSpec 的情况)

在合同阶段生成执行时。

换言之,不允许在一个 RPortPrototype 的上下文中存在两个或更多引用同一 dataElement 或 operation 的 RPortComSpec。

PRPortPrototype 可以同时拥有 RPortComSpec 和 PPortComSpec:

尽管如此,适用以下限制:

一个 PRPortPrototype 上下文中 RPortComSpec/PPortComSpec 数量的限制:

  • dataElement(ReceiverComSpec/SenderComSpec 的情况),

  • operation(ClientComSpec/ServerComSpec 的情况),

  • modeGroup(ModeSwitchReceiverComSpec/ModeSwitchSenderComSpec 的情况),或

  • variable(NvRequireComSpec/NvProvideComSpec 的情况)

应在合同阶段生成执行时。glyph[floorright]()

换言之,不允许在一个 PRPortPrototype 的上下文中存在两个或更多引用同一 dataElement 或 operation 的 PPortComSpec。

同样,不允许在一个 PRPortPrototype 的上下文中存在两个或更多引用同一 dataElement 或 operation 的 RPortComSpec。

[constr_1290]、[constr_1291] 和 [constr_1292] 存在的依据是:AUTOSAR 通信层需要对通信行为的无歧义规定。

冗余 RPortComSpec/PPortComSpec 的存在很容易相互矛盾,这将阻碍为 AUTOSAR Com 创建有效配置。

如第 2.5 节所解释,存在 CompositionSwComponentType 拥有的 PortPrototype 可以拥有 initValue 的情况。

因此,CompositionSwComponentType 拥有的 PortPrototype 可以拥有 ComSpec。不要求在组合层级定义的 ComSpec 与 CompositionSwComponentType 内部定义的 ComSpec 匹配。

如果要求一致性,该约束可能成为把现有 AtomicSwComponentType 集成到拥有带 ComSpec 的 PortPrototype 的 CompositionSwComponentType 的主要障碍。

表4.62:PPortComSpec(PPortComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | 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. | | 基类 | ARObject | | 子类 | ModeSwitchSenderComSpec, NvProvideComSpec, ParameterProvideComSpec, SenderComSpec , ServerComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

表4.63:RPortComSpec(RPortComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes of a required PortPrototype. This class will contain attributes that are valid for all kinds of require-ports, independent of client-server or sender-receiver communication patterns. | | 基类 | ARObject | | 子类 | ClientComSpec, ModeSwitchReceiverComSpec, NvRequireComSpec, ParameterRequireComSpec, ReceiverComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

[constr_1043] 特定种类 PortInterface、特定种类 PortPrototype 与特定种类 ComSpec 的允许组合

| Type of PortPrototype | Type of ComSpec |

| PPortPrototype | NonqueuedSender- ComSpec | | PPortPrototype | QueuedSenderCom- Spec | | RPortPrototype | Nonqueue- dReceiverComSpec | | RPortPrototype | QueuedReceiver- ComSpec | | PRPortPrototype | NonqueuedSender- ComSpec | | PRPortPrototype | Nonqueue- dReceiverComSpec | | PRPortPrototype | QueuedReceiver- ComSpec | | PRPortPrototype | QueuedSenderCom- Spec | | PPortPrototype | NvProvideComSpec | | RPortPrototype | NvRequireComSpec | | PRPortPrototype | NvProvideComSpec | | PRPortPrototype | NvRequireComSpec | | PPortPrototype | ModeSwitchSender- ComSpec | | RPortPrototype | ModeSwitchRe- ceiverComSpec | | PRPortPrototype | ModeSwitchSender- ComSpec | | PRPortPrototype | ModeSwitchRe- ceiverComSpec | | PPortPrototype | ParameterProvide- ComSpec | | RPortPrototype | ParameterRequire- ComSpec |

4.5.1. Sender-Receiver 通信的通信规范

通信规范以不同方式应用于特定种类的通信。

用于排队和非排队 sender-receiver 通信的 ComSpec:

如果该属性的值设置为 queued,则应定义 QueuedSenderComSpec 和/或 QueuedReceiverComSpec。在所有其他适用情形中,应使用 NonqueuedSenderComSpec 或 NonqueuedReceiverComSpec。

因此,应适用约束 [constr_1129]、[constr_1130]、[constr_1131] 和 [constr_1132]。

在排队通信的情形中,queueLength 属性仍是唯一的信息项;而非排队情形预见了若干用于控制通信行为的属性。

| PPortPrototype | ServerComSpec |

| RPortPrototype | ClientComSpec | | PRPortPrototype | ServerComSpec | | PRPortPrototype | ClientComSpec |

该规则应在合同阶段生成执行时施加。

PortPrototype 类型、ComSpec 类型与 PortInterface 类型之间的关系:

  • 在角色 Role of Type-Ref 中引用一个 PortInterface 类型,且

  • 从 ComSpec 类型引用的 Role of Element 应由外围 PortPrototype 类型在角色 Role of Type-Ref 中引用的完全相同的 PortInterface 类型聚合。

4.5.1.1. 接收方 ComSpec

图 4.37 展示了 RPortPrototype 处相关 sender-receiver 通信的通信属性的元模型。

引用 ReceiverComSpec.dataElement 的限制:

NonqueuedReceiverComSpec 与 enableUpdate:

一般而言,为 RPortPrototype 接收的所有 dataElement 定义 initValue 被认为对软件组件有益。

RTE 的若干功能需要这些 initValue,例如:

  • 为尚未接收的 dataElement 提供默认值(见 [TPS_SWCT_01220]);

  • 在 RPortPrototype 未连接的情况下提供默认值(见 [constr_1100]);

  • 组合数据的部分映射(见 [constr_1280])。

因此,initValue 的可用性增加了软件组件在不同场景中使用的灵活性。

另一方面,也存在 initValue 非强制的用例,即 DataPrototype 有意保持未初始化。这通过应用 sectionInitializationPolicy 设置为 NOINIT 的 SwAddrMethod 来表达,或者在软件组件有意只为分区内通信做准备的场合。

针对这些相互冲突的目标,[TPS_SWCT_01688] 被写成建议而非有约束力的约束。

RPortPrototype 中应存在 initValue:

PRPortPrototype 上下文中 initValue 的重复存在:

initValue 定义在相应 dataElement 尚未收到时应采用的初始值:

NonqueuedReceiverComSpec . initValue 属性的存在性:

表4.64:ReceiverComSpec(ReceiverComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Receiver-specific communication attributes (RPortPrototype typed by SenderReceiverInterface). | | 基类 | ARObject , RPortComSpec | | 子类 | NonqueuedReceiverComSpec, QueuedReceiverComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
Class ReceiverComSpec (abstract)
composite Network Representation CompositeNetwork Representation * aggr This represents a CompositeNetworkRepresentation defined in the context of a ReceiverComSpec. The purpose of this aggregation is to be able to specify the network representation of leaf elements of Application CompositeDataTypes. Stereotypes: atpSplitable Tags: atp.Splitkey=compositeNetworkRepresentation
dataElement AutosarDataPrototype 0..1 ref Data element these attributes belong to.
handleOutOf Range HandleOutOfRange Enum 0..1 attr This attribute controls how values that are out of the specified range are handled according to the values of HandleOutOfRangeEnum.
handleOutOf RangeStatus HandleOutOfRange StatusEnum 0..1 attr Control the way how return values are created in case of an out-of-range situation.
maxDelta CounterInit PositiveInteger 0..1 attr Initial maximum allowed gap between two counter values 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. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach. Stereotypes: atpVariation
maxNoNewOr RepeatedData PositiveInteger 0..1 attr The maximum amount of missing or repeated Data which the receiver does not expect to exceed under normal communication conditions. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach.
network Representation SwDataDefProps 0..1 aggr A networkRepresentation is used to define how the data Element is mapped to a communication bus. Stereotypes: atpSplitable Tags: atp.Splitkey=networkRepresentation
receptionProps ReceptionComSpec Props 0..1 aggr "This aggregation represents the definition transmission props in the context of the enclosing ReceiverComSpec.
replaceWith VariableAccess 0..1 aggr This aggregation is used to identify the AutosarData Prototype to be taken for sourcing an external replacement in the out-of-range and invalidValue handling.
Class ReceiverComSpec (abstract)
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. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach.
transformation ComSpecProps TransformationCom SpecProps * aggr This references the TransformationComSpecProps which define port-specific configuration for data transformation.
usesEndToEnd Protection Boolean 0..1 attr This indicates whether the corresponding dataElement shall be transmitted using end-to-end protection. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

表4.65:HandleOutOfRangeStatusEnum(HandleOutOfRangeStatusEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | This enumeration defines how the RTE handles values that are out of range. | | 聚合于 | ReceiverComSpec .handleOutOfRangeStatus |

字面值 说明
indicate The RTE sets the return status to RTE_E_OUT_OF_RANGE if the received value is out of range and the attribute handleOutOfRange is not set to "none" or "invalid". Tags: atp.EnumerationLiteralIndex=0
silent The RTE sets the return status to RTE_E_OK Tags: atp.EnumerationLiteralIndex=1

表4.66:NonqueuedReceiverComSpec(NonqueuedReceiverComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes specific to non-queued receiving. | | 基类 | ARObject , RPortComSpec , ReceiverComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

表4.67:NonqueuedReceiverComSpec(NonqueuedReceiverComSpec)

属性 类型 多重性 种类 备注
aliveTimeout TimeValue 0..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 0..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 Status Boolean 0..1 attr If this attribute is set to true, then the Rte_IStatus API shall 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 Received Boolean 0..1 attr This attribute specifies whether for the corresponding 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 VariableDataPrototype 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 Variable DataPrototype.
handleTimeout Type HandleTimeoutEnum 0..1 attr This attribute controls the behavior with respect to the 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, then the receiver's value will be used.
timeout Substitution Value ValueSpecification 0..1 aggr This attribute represents the substitution value applicable in the case of a timeout.

表4.68:QueuedReceiverComSpec(QueuedReceiverComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes specific to queued receiving. | | 基类 | ARObject , RPortComSpec , ReceiverComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
queueLength PositiveInteger 0..1 attr Length of queue for received events.

QueuedReceiverComSpec . queueLength 属性的存在性:

表4.69:ReceptionComSpecProps(ReceptionComSpecProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | This meta-class defines a set of reception attributes which the application software is assumed to implement. | | 基类 | ARObject | | 聚合于 | ReceiverComSpec .receptionProps |

属性 类型 多重性 种类 备注
dataUpdate Period TimeValue 0..1 attr This attribute defines the period in which the application shall check for updated data. This attribute is used for the configuration of the E2E protection, but may also indicate a general data reception period.
timeout TimeValue 0..1 attr This attribute defines the time interval after which the application shall assume that the to be received data reception has timed out, i.e. the respective data has not been received for that amount of time.

表4.70:HandleTimeoutEnum(HandleTimeoutEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Strategies of handling a reception timeout violation. | | 聚合于 | NonqueuedReceiverComSpec.handleTimeoutType |

字面值 说明
none If set to none no replacement shall take place. Tags: atp.EnumerationLiteralIndex=0
replace If set to replace, the replacement value shall be the ComInitValue. Tags: atp.EnumerationLiteralIndex=1
replaceByTimeout SubstitutionValue If set to replace, the replacement value shall be the timeout substitution value. Tags: atp.EnumerationLiteralIndex=2

表4.71:TimeValue(TimeValue)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | 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 |

swImplPolicy 与 NonqueuedReceiverComSpec:

swImplPolicy 与 QueuedReceiverComSpec:

ReceiverComSpec . replaceWith 的存在性:

  • 属性 ReceiverComSpec.handleOutOfRange 设置为值 externalReplacement;

  • 属性 SenderReceiverInterface.invalidationPolicy.handleInvalid 设置为值 externalReplacement。

该规则应在合同阶段生成执行时应用。

ReceiverComSpec.replaceWith 兼容性规则的应用:

networkRepresentation 规定特定 dataElement 在通信总线上的表示方式:

也就是说,借助 networkRepresentation 可以规定特定 dataElement 在通信总线上的表示方式。为此,networkRepresentation 实现为 SwDataDefProps 的聚合。

dataElement 的 CompuMethod 与 networkRepresentation 用于换算目的:

这种方法的优势在于:它还可以不加任何修改地与不同 SwComponentType 之间 dataElement 的一般重映射和重缩放结合使用,无论它们位于相同还是不同 ECU 上。

请注意,是否采用 networkRepresentation 进行数据映射的决策是在 AUTOSAR 系统模板 [10] 的上下文中作出的。关于这一方面的更详细信息见相应规范。

networkRepresentation 对 ApplicationCompositeDataType 的适用性:

对于使用 ApplicationCompositeDataType 的情形,应使用附加机制。

特别是,应使用 compositeNetworkRepresentation 来定义 ApplicationCompositeDataType 叶元素的 networkRepresentation。

networkRepresentation vs. compositeNetworkRepresentation 的存在性:

compositeNetworkRepresentation shall be comprehensive 的存在性:

对于每个这样的 compositeNetworkRepresentation,属性 leafElement 和 networkRepresentation 应在合同阶段生成执行时存在。

诚然,[constr_1197] 的定义在某种程度上具有递归性质。其含义是:如果确实打算定义 compositeNetworkRepresentation,则该定义应完全覆盖相应 ApplicationCompositeDataType 的整个叶元素集合。换言之,要么全有要么全无。

ReceiverComSpec . transformationComSpecProps 的语义:

如果定义了 EndToEndTransformationComSpecProps 类型的 TransformationComSpecProps,ReceiverComSpec 中 E2E 相关属性的相关性。:

  • ReceiverComSpec.usesEndToEndProtection

  • ReceiverComSpec.syncCounterInit

  • ReceiverComSpec.maxDeltaCounterInit

  • ReceiverComSpec.maxNoNewOrRepeatedData

如果在同一 ReceiverComSpec 的角色 transformationComSpecProps 中定义了 EndToEndTransformationComSpecProps 类型的 TransformationComSpecProps,则没有意义。

4.5.1.2. 发送方 ComSpec

发送方侧的通信属性勾勒于图 4.38。

swImplPolicy 与 NonqueuedSenderComSpec:

在合同阶段生成执行时不应设置为值 queued。

swImplPolicy 与 QueuedSenderComSpec:

如果定义了 EndToEndTransformationComSpecProps 类型的 TransformationComSpecProps,SenderComSpec 中 E2E 相关属性的含义:

请注意:

  • SenderComSpec.usesEndToEndProtection 对代码生成没有任何影响。

它例如可由验证框架使用,以确保:如果设置为 true,对于连接到拥有该 SenderComSpec 的 PortPrototype 的所有相应 SwConnector,该 dataElement 满足变换器配置。

  • SenderComSpec.usesEndToEndProtection 可以用作应用开发者关于给定 dataElement 应被端到端保护的声明。

然而,让应用开发者显式声明某个 dataElement 不应被端到端保护似乎牵强。这超出了应用开发者的职责。

因此,可以预期 SenderComSpec.usesEndToEndProtection 的两个相关状态:

  • 属性存在且设置为 true(应用开发者确证对该 dataElement 进行端到端保护的必要性);

  • 属性不存在(应用开发者不关心)。

  • 应用开发者可能没有足够的全局视野来设想 dataElement 如何通信(即本地通信还是网络通信)。把 usesEndToEndProtection 设置为 true,然后部署外围软件组件使其仅在相应 PortPrototype 上本地通信,对于当前基于变换器的通信情形似乎也不寻常。

SenderComSpec.dataElement 的限制:

表4.72:SenderComSpec(SenderComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes for a sender port (PPortPrototype typed by SenderReceiverInterface). | | 基类 | ARObject , PPortComSpec | | 子类 | NonqueuedSenderComSpec, QueuedSenderComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
composite Network Representation CompositeNetwork Representation * aggr This represents a CompositeNetworkRepresentation defined in the context of a SenderComSpec. Stereotypes: atpSplitable Tags: atp.Splitkey=compositeNetworkRepresentation
dataElement AutosarDataPrototype 0..1 ref Data element these quality of service attributes apply to.
handleOutOf Range HandleOutOfRange Enum 0..1 attr This attribute controls how out-of-range values shall be dealt with.
network Representation SwDataDefProps 0..1 aggr A networkRepresentation is used to define how the data Element is mapped to a communication bus. Stereotypes: atpSplitable Tags: atp.Splitkey=networkRepresentation
transmission Acknowledge Transmission Acknowledgement Request 0..1 aggr Requested transmission acknowledgement for data element.
transmission Props TransmissionComSpec Props 0..1 aggr This aggregation represents the definition transmission props in the context of the enclosing SenderComSpec.

表4.73:SenderComSpec(SenderComSpec)

属性 类型 多重性 种类 备注
usesEndToEnd Protection Boolean 0..1 attr This indicates whether the corresponding dataElement shall be transmitted using end-to-end protection. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

[TPS_SWCT_01820] 属性 SenderComSpec. 的存在性:

handleOutOfRange:如果属性 SenderComSpec.handleOutOfRange 在 RTE 生成时不存在,则应假定值 none。glyph[floorright]()

表4.74:QueuedSenderComSpec(QueuedSenderComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes specific to distribution of events (PPortPrototype, SenderReceiverInterface and dataElement carries an "event"). | | 基类 | ARObject , PPortComSpec , SenderComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

表4.75:NonqueuedSenderComSpec(NonqueuedSenderComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes for non-queued sender/receiver communication (sender side) | | 基类 | ARObject , PPortComSpec , SenderComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
dataFilter DataFilter 0..1 aggr The applicable filter algorithm for filtering the value of the corresponding dataElement.
initValue ValueSpecification 0..1 aggr Initial value to be sent if sender component is not yet fully initialized, but receiver needs data already.

表4.76:TransmissionComSpecProps(TransmissionComSpecProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | This meta-class defines a set of transmission attributes which the application software is assumed to implement. | | 基类 | ARObject | | 聚合于 | SenderComSpec .transmissionProps |

属性 类型 多重性 种类 备注
dataUpdate Period TimeValue 0..1 attr This attribute defines the period in which the application is assumed to transmit the respective data.

表4.77:TransmissionComSpecProps(TransmissionComSpecProps)

属性 类型 多重性 种类 备注
minimumSend Interval TimeValue 0..1 attr This attribute defines the minimum interval between two consecutive transmissions of the respective data the application is assumed to ensure.
transmission Mode TransmissionMode DefinitionEnum 0..1 attr The attribute defines the mode in which the application is assumed to transmit the respective data.

表4.78:TransmissionAcknowledgementRequest(TransmissionAcknowledgementRequest)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Requests transmission acknowledgement that data has been sent successfully. Success/failure is reported via a SendPoint of a RunnableEntity. | | 基类 | ARObject | | 聚合于 | SenderComSpec .transmissionAcknowledge |

属性 类型 多重性 种类 备注
timeout TimeValue 0..1 attr Number of seconds before an error is reported or in case of allowed redundancy, the value is sent again.

TransmissionAcknowledgementRequest . timeout 属性的存在性:

表4.79:HandleOutOfRangeEnum(HandleOutOfRangeEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | A value of this type is taken for controlling the range checking behavior of the AUTOSAR RTE. | | 聚合于 | ISignalProps.handleOutOfRange, ReceiverComSpec .handleOutOfRange, SenderComSpec .handle OutOfRange |

字面值 说明
default The RTE will use the initValue if the actual value is out of the specified bounds. Tags: atp.EnumerationLiteralIndex=0
external Replacement This indicates that the value replacement is sourced from the attribute replaceWith. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=2
invalid The RTE will use the invalidValue if the value is out of the specified bounds. Tags: atp.EnumerationLiteralIndex=3
none A range check is not required. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=5

表4.80:TransmissionModeDefinitionEnum(TransmissionModeDefinitionEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | This meta-class defines possible settings for the transmission mode. | | 聚合于 | TransmissionComSpecProps.transmissionMode |

字面值 说明
cyclic The data is assumed to be transmitted in a cyclic manner. The cycle is defined by dataUpdatePeriod. Tags: atp.EnumerationLiteralIndex=0
cyclicAndOn Change The data is assumed to be transmitted in a cyclic manner (with cycle time dataUpdatePeriod) and additionally there may be arbitrary transmission if the data value changes (minimumSendInterval to be respected, if defined). Tags: atp.EnumerationLiteralIndex=2
triggered The data is assumed to be transmitted in an arbitrary manner (minimumSendInterval to be respected, if defined). Tags: atp.EnumerationLiteralIndex=1

表4.81:CompositeNetworkRepresentation(CompositeNetworkRepresentation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | This meta-class is used to define the network representation of leaf elements of composite application data types. | | 基类 | ARObject | | 聚合于 | ReceiverComSpec .compositeNetworkRepresentation, SenderComSpec .compositeNetwork Representation |

属性 类型 多重性 种类 备注
leafElement ApplicationComposite ElementDataPrototype 0..1 iref This represents that leaf element of an application composite data type. InstanceRef implemented by: ApplicationComposite ElementInPortInterfaceInstanceRef
network Representation SwDataDefProps 0..1 aggr The SwDataDefProps owned by the CompositeNetwork Representation are used to define the network representation of the leaf element of an Application CompositeDataType. Stereotypes: atpSplitable Tags: atp.Splitkey=networkRepresentation
4.5.1.3. 数据过滤器

图 4.39 展示了与定义数据过滤器相关的通信属性的模型。

DataFilter:

元模型中由枚举类型 DataFilterTypeEnum 正式描述的若干过滤算法取自 ISO 17356-4 规范 [17],RTE 规范 [2] 引用了该规范。

DataFilter 的适用性:

DataFilter 的适用性:

表4.82:DataFilter(DataFilter)

| 包 | M2::AUTOSARTemplates::CommonStructure::Filter | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | ISignalPort.dataFilter, NonqueuedReceiverComSpec.filter, NonqueuedSenderComSpec.dataFilter, SignalBasedEventElementToISignalTriggeringMapping.filter, SignalBasedFieldToISignalTriggering Mapping.filter, SignalServiceTranslationElementProps.filter, TransmissionModeCondition.dataFilter |

属性 类型 多重性 种类 备注
dataFilterType DataFilterTypeEnum 0..1 attr This attribute specifies the type of the filter.
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

DataFilter . dataFilterType 属性的存在性:

表4.83:DataFilterTypeEnum(DataFilterTypeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::Filter | | 说明 | This enum specifies the supported DataFilterTypes. | | 聚合于 | DataFilter.dataFilterType |

表4.84:DataFilterTypeEnum(DataFilterTypeEnum)

属性 类型 多重性 种类 备注
always No filtering is performed so that the message always passes. Tags: atp.EnumerationLiteralIndex=0
maskedNewDiffers MaskedOld Pass messages where the masked value has changed. (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.EnumerationLiteralIndex=1
maskedNewDiffers X Pass messages whose masked value is not equal to a specific value x (new_value&mask) != x new_value: current value of the message Tags: atp.EnumerationLiteralIndex=2
maskedNewEquals X Pass messages whose masked value is equal to a specific value x (new_value&mask) == x new_value: current value of the message Tags: atp.EnumerationLiteralIndex=3
never The filter removes all messages. Tags: atp.EnumerationLiteralIndex=4
newIsOutside Pass a message if its value is outside a predefined boundary. (min > new_value) OR (new_value > max) Tags: atp.EnumerationLiteralIndex=5
newIsWithin Pass a message if its value is within a predefined boundary. min <= new_value <= max Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=7
4.5.1.4. 应用与 NV 块软件组件之间的通信

在许多情况下,NvBlockSwComponentType(见第 11.4.2 节)与 ApplicationSwComponentType 之间的通信基于混合通信方法实现,即 ApplicationSwComponentType 很可能使用由 SenderReceiverInterface 定义类型的 PortPrototype,而 NvBlockSwComponentType 使用由 NvDataInterface 定义类型的 PortPrototype。

ApplicationSwComponentType 与 NvBlockSwComponentType 之间通信的 SenderComSpec 属性允许多重性:

| Sender | ApplicationSwComponentType |

| Receiver | NvBlockSwComponentType | | Queuing Configuration | non-queued | | SenderComSpec . transmissionAcknowledge | d/c | | SenderComSpec . dataElement | 1 | | SenderComSpec . handleOutOfRange | d/c | | SenderComSpec . usesEndToEndProtection | d/c | | SenderComSpec . transmissionProps . dataUpdatePeriod | 0..1 | | SenderComSpec . transmissionProps . minimumSendInterval | 0..1 | | SenderComSpec . transmissionProps . transmissionMode | 0..1 | | SenderComSpec . networkRepresentation | d/c | | SenderComSpec . compositeNetworkRepresentation | d/c | | NonqueuedSenderComSpec . dataFilter | d/c | | NonqueuedSenderComSpec . initValue | 0..1 |

该规则应在 RTE 生成时施加。

在这种情况下,有必要澄清发送方与接收方两侧相应 ComSpec 属性的使用。为此定义了约束 [constr_10071] 和 [constr_10072]。

请注意,[constr_10071] 中提到的缩写 “d/c” 代表 “无关紧要”(don't care)。

NvBlockSwComponentType 与 ApplicationSwComponentType 之间通信的 SenderComSpec 属性允许多重性:

| Sender | NvBlockSwComponentType |

| Receiver | ApplicationSwComponentType | | Queuing Configuration | non-queued | | ReceiverComSpec . replaceWith | 0 | | ReceiverComSpec . dataElement | 1 | | ReceiverComSpec . receptionProps . dataUpdatePeriod | 0 | | ReceiverComSpec . receptionProps . timeout | 0 | | ReceiverComSpec . usesEndToEndProtection | 0 | | ReceiverComSpec . maxDeltaCounterInit | 0 |

10 一般规则是:AUTOSAR 不支持 ApplicationSwComponentType 与 NvBlockSwComponentType 之间的排队通信。不过,[constr_10071] 和 [constr_10072] 为完整起见仍包含一列表示排队通信的情形。因此,该列在相应表中一致地填以 “空” 单元格。

| Sender | NvBlockSwComponentType |

| Receiver | ApplicationSwComponentType | | Queuing Configuration | non-queued | | ReceiverComSpec . handleOutOfRange | 0 | | ReceiverComSpec . handleOutOfRangeStatus | 0 | | ReceiverComSpec . maxNoNewOrRepeatedData | 0 | | ReceiverComSpec . syncCounterInit | 0 | | ReceiverComSpec . transformationComSpecProps | 0 | | ReceiverComSpec . networkRepresentation | 0 | | ReceiverComSpec . compositeNetworkRepresentation | 0 | | QueuedReceiverComSpec . queueLength | | | NonqueuedReceiverComSpec . filter | 0 | | NonqueuedReceiverComSpec . timeoutSubstitutionValue | 0 | | NonqueuedReceiverComSpec . initValue | 0..1 | | NonqueuedReceiverComSpec . aliveTimeout | 0 | | NonqueuedReceiverComSpec . enableUpdate | 0 | | NonqueuedReceiverComSpec . handleDataStatus | 0 | | NonqueuedReceiverComSpec . handleNeverReceived | 0..1 | | NonqueuedReceiverComSpec . handleTimeoutType | 0 |

该规则应在 RTE 生成时施加。

需要指出,[constr_10071] 和 [constr_10072] 的内容只部分符合约束内容的标准。

例如,这些约束包含关于属性可选存在的陈述,甚至声明属性的存在具有 “无关紧要” 的性质。

但另一方面,这些约束也包含对约束而言确实相关的内容,把所有这些规定浓缩进一个表的呈现方式被认为是有价值的。

如果把约束拆分到包装进规范项和约束的不同表中,这种易于获得概览的方面将丢失。

4.5.1.5. 由软件组件实现的通信行为

AUTOSAR 支持在经典 AUTOSAR 基础软件层中处理周期性数据传输和接收超时检查。传输模式和时间值的定义使用 TPS_SystemTemplate [10] 定义。

在 NonqueuedReceiverComSpec 处也可用的唯一值是 aliveTimeout——因为该值同时配置通信栈超时处理

(远程通信的情形)和 RTE 超时处理(本地通信的情形)。

随着变换器技术的引入,周期性数据传输和接收超时检查的方面可能必须由应用代码实现。主要原因是 E2E 变换器需要被周期性调用以保持其状态机最新。

因此,应用代码需要周期性调用传输/接收 API 以满足这些时序要求。但应用需要负责周期性还可能有其他原因,例如在使用 LdCom 模块(它没有任何时序特性)的情况下。

引入元类 TransmissionComSpecProps 和 ReceptionComSpecProps 是为了定义应由应用代码实现的预期通信行为。

由于 TransmissionComSpecProps 和 ReceptionComSpecProps 定义了预期通信行为是什么,这些值也可以被通信(网络)测量工具用来验证应用代码是否正确实现了这些属性。

属性 ReceptionComSpecProps.dataUpdatePeriod 定义接收应用应调用接收 API 以检查新数据的时间周期。

属性 ReceptionComSpecProps.timeout 定义的时间,超过它应用应假定待接收数据的接收已超时。

属性 NonqueuedReceiverComSpec.aliveTimeout 也可能被定义,导致重复的超时检查。

通信栈/RTE 会检查属性 aliveTimeout 的值,应用代码会检查 ReceptionComSpecProps.timeout。虽然执行两次超时检查似乎不明智,但并未被禁止。

属性 TransmissionComSpecProps.dataUpdatePeriod 定义发送应用应调用发送 API 的时间周期。

属性 TransmissionComSpecProps.minimumSendInterval 和 TransmissionComSpecProps.transmissionMode 定义影响由应用代码实现的传输行为的值。

注意,通信栈也可能定义了周期、最小发送时间和传输模式。这种双重实现可能导致不良效果。但 AUTOSAR 并不规定这些机制的使用必须互斥。

4.5.2. Client-Server 通信的通信规范

4.5.2.1. 客户端 ComSpec

与客户端通信相关的通信方面勾勒于图 4.40。

ClientComSpec . operation 的存在性:

表4.85:ClientComSpec(ClientComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Client-specific communication attributes (RPortPrototype typed by ClientServerInterface). | | 基类 | ARObject , RPortComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
endToEndCall Response Timeout TimeValue 0..1 attr This attribute defines the maximum time interval in which the application shall expect the servers's response (time between the sending of the call invocation until the arrival of the server's response).
operation ClientServerOperation 0..1 ref This represents the corresponding ClientServerOperation.
transformation ComSpecProps TransformationCom SpecProps * aggr This references the TransformationComSpecProps which define port-specific configuration for data transformation.

注意: 在 AUTOSAR 自适应平台上,ClientComSpec 也可以用于由经典平台上不可用的 PortInterface 定义类型的 RPortPrototype 的上下文。这就是 [constr_1540] 存在的动机。

ClientComSpec . transformationComSpecProps 的语义:

应用于在 Client/Server 跨 ECU 通信情形下为接收服务器的响应配置数据变换的 PortPrototype 特定属性。

4.5.2.2. 服务器 ComSpec

服务器侧看起来非常相似,但提供一个用于规定队列长度的属性。

ServerComSpec . operation 的存在性:

该规则应在合同阶段生成执行时施加。

注意: 在 AUTOSAR 自适应平台上,ServerComSpec 也可以用于由经典平台上不可用的 PortInterface 定义类型的 RPortPrototype 的上下文。这就是 [constr_1541] 存在的动机。

表4.86:ServerComSpec(ServerComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes for a server port (PPortPrototype and ClientServerInterface). | | 基类 | ARObject , PPortComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
operation ClientServerOperation 0..1 ref Operation these communication attributes apply to.
queueLength PositiveInteger 0..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 ComSpecProps TransformationCom SpecProps * aggr This references the TransformationComSpecProps which define port-specific configuration for data transformation.

ServerComSpec.queueLength 的定义在软件组件层级是可选的。即使指定了值,集成者也可以自行决定在 RTE 配置中覆盖它。

RunnableEntity 实现多于一个 ClientServerOperation 的功能:

为此,每个受影响的 ClientServerOperation 应有一个 OperationInvokedEvent 引用相应 RunnableEntity。

应采用属性 ServerComSpec.queueLength 来确定所得队列长度,适用 [constr_1128]。

关于触发同一 RunnableEntity 的 ClientServerOperation 的要求的更多信息见第 7.2.4.3 节,特别是 [constr_2000]。

与同一 RunnableEntity 关联的 ClientServerOperation 的队列长度:

该规则应在 RTE 生成时施加。

ServerComSpec . transformationComSpecProps 的语义:

细节见第 4.5.6 章。

4.5.3. 模式切换通信的通信规范

4.5.3.1. 模式切换发送 ComSpec

与前一小节类似,图 4.42 展示了与模式切换通信相关的元模型元素。

在发送方侧,可以规定应返回确认,表明模式切换请求的成功处理。

表4.87:ModeSwitchSenderComSpec(ModeSwitchSenderComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes of PPortPrototypes with respect to mode communication | | 基类 | ARObject , PPortComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
enhancedMode Api Boolean 0..1 attr This controls the creation of the enhanced mode API that 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 Prototype 0..1 ref ModeDeclarationGroupPrototype (of the same Port Interface) to which these communication attributes apply.
modeSwitched Ack ModeSwitchedAck Request 0..1 aggr If this aggregation exists an acknowledgement for the successful processing of the mode switch request is required.
queueLength PositiveInteger 0..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.

表4.88:ModeSwitchedAckRequest(ModeSwitchedAckRequest)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Requests acknowledgements that a mode switch has been proceeded successfully | | 基类 | ARObject | | 聚合于 | ModeSwitchSenderComSpec.modeSwitchedAck |

属性 类型 多重性 种类 备注
timeout TimeValue 0..1 attr Number of seconds before an error is reported or in case of allowed redundancy, the value is sent again.

ModeSwitchSenderComSpec . queueLength 属性的存在性:

ModeSwitchSenderComSpec . modeGroup 属性的存在性:

4.5.3.2. 模式切换接收 ComSpec

PRPortPrototype 上下文中 enhancedModeApi 的重复存在:

表4.89:ModeSwitchReceiverComSpec(ModeSwitchReceiverComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes of RPortPrototypes with respect to mode communication | | 基类 | ARObject , RPortComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
enhancedMode Api Boolean 0..1 attr This controls the creation of the enhanced mode API that 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 Prototype 0..1 ref ModeDeclarationGroupPrototype (of the same Port Interface) to which these communication attributes apply.
supports Asynchronous ModeSwitch Boolean 0..1 attr This attribute controls the behavior of the corresponding RPortPrototype with respect to the question whether it 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.

ModeSwitchReceiverComSpec . modeGroup 属性的存在性:

4.5.4. 参数的通信规范

诚然,为 ParameterDataPrototype 定义 ComSpec 初看很奇怪。由 ParameterInterface 定义类型的 PPortPrototype 拥有的 ParameterDataPrototype 实际上不经由任何通信介质传输。因此,在这种情况下对术语 “通信” 应持保留态度。

然而,通常必须能够为 ParameterInterface 中聚合的 ParameterDataPrototype 定义角色特定的初始值。换言之,实际问题非常类似于 sender-receiver 通信情形中初始值的定义。

ComSpec 层级的 initValue 与到相应 PortPrototype 的连接相关:

因此,把已有且众所周知的模式应用于 ParameterInterface 中聚合的 ParameterDataPrototype 的初始值定义是合理的。实际建模勾勒于图 4.44(提供的 ParameterDataPrototype)和图 4.45(所需的 ParameterDataPrototype)。

表4.90:ParameterProvideComSpec(ParameterProvideComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | "Communication" specification that applies to parameters on the provided side of a connection. | | 基类 | ARObject , PPortComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
initValue ValueSpecification 0..1 aggr The initial value applicable for the corresponding ParameterDataPrototype.
parameter ParameterData Prototype 0..1 ref The ParameterDataPrototype to which the Parameter ComSpec applies.

reference ParameterProvideComSpec . parameter 的存在性:

表4.91:ParameterRequireComSpec(ParameterRequireComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | "Communication" specification that applies to parameters on the required side of a connection. | | 基类 | ARObject , RPortComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
initValue ValueSpecification 0..1 aggr The initial value applicable for the corresponding ParameterDataPrototype.
parameter ParameterData Prototype 0..1 ref The ParameterDataPrototype to which the Parameter RequireComSpec applies.

reference ParameterRequireComSpec . parameter 的存在性:

4.5.5. NV 数据的通信规范

4.5.5.1. NV 所需 ComSpec

由 NvDataInterface 定义类型的未连接 AbstractRequiredPortPrototype:

因此,即使相应的 AbstractRequiredPortPrototype 保持未连接,也可以为 nvData 提供合理的值。

ComSpec 上下文中定义的 initValue:

在 VariableDataPrototype 范围内定义的 initValue 反正应被忽略。

由 NvDataInterface 定义类型的 PRPortPrototype 上下文中 initValue 的重复存在:

相反,initValue 应取自 NvProvideComSpec.ramBlockInitValue。

表4.92:NvRequireComSpec(NvRequireComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes of RPortPrototypes with respect to Nv data communication on the required side. | | 基类 | ARObject , RPortComSpec | | 聚合于 | AbstractRequiredPortPrototype .requiredComSpec, PortPrototypeBlueprint.requiredComSpec |

属性 类型 多重性 种类 备注
initValue ValueSpecification 0..1 aggr The initial value owned by the NvComSpec
variable VariableDataPrototype 0..1 ref The VariableDataPrototype the ComSpec applies for.

reference NvRequireComSpec . variable 的存在性:

4.5.5.2. NV 提供 ComSpec

NvProvideComSpec:

这种 ComSpec 的主要目的是为 RAM 块和 ROM 块定义初始值,它们对应于用于为给定 AbstractProvidedPortPrototype 定义类型的 NvDataInterface 上下文中定义的 nvData。

关于 NvProvideComSpec 的更多信息请参见图 4.47。

注意,这些初始值可以作为设计 NvBlockSwComponentType 的输入,特别是 NvBlockSwComponentType 拥有的 NvBlockDescriptor 的 ramBlock 和 romBlock。更多细节在图 11.5 中说明。

另请注意,NvProvideComSpec 中提供的 romBlockInitValue 不一定必须与 NvBlockDescriptor 中 romBlock 内的相应部分相同。

如果 NvBlockSwComponentType 已经存在且一个 ApplicationSwComponentType 连接到它,就可能发生这种情况。最终,NvBlockDescriptor 内的 romBlock 是 RTE 生成的唯一相关信息。

换言之,借助 NvProvideComSpec,ApplicationSwComponentType 的作者可以对相应 NvBlockSwComponentType 的后续设计表达详细要求。

表4.93:NvProvideComSpec(NvProvideComSpec)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | Communication attributes of PPortPrototypes with respect to Nv data communication on the provided side. | | 基类 | ARObject , PPortComSpec | | 聚合于 | AbstractProvidedPortPrototype .providedComSpec, PortPrototypeBlueprint.providedComSpec |

属性 类型 多重性 种类 备注
ramBlockInit Value ValueSpecification 0..1 aggr This represents the initial value of the RAM Block that corresponds to the referenced variable.
romBlockInit Value ValueSpecification 0..1 aggr This represents the initial value of the ROM block that corresponds to the referenced variable.
variable VariableDataPrototype 0..1 ref This represents the variable for which the ComSpec is specified.

reference NvProvideComSpec . variable 的存在性:

4.5.6. 数据变换的配置

AUTOSAR 中数据变换的总体图景在 TPS 系统模板 [10] 中解释。本章聚焦于与软件组件配置相关的数据变换方面。

借助 TransformationComSpecProps,可以为受数据变换支配的跨 ECU 通信的特定变换器定义配置选项。

TransformationComSpecProps 的语义:

  1. 实际通信至少涉及两个 EcuInstance;

  2. 相应的数据变换器(由所用的 TransformationComSpecProps 给出)在数据变换期间使用(见 DataTransformation)。

glyph[floorright](RS_SWCT_03221)

为澄清起见,如果 [TPS_SWCT_01594] 定义的条件不适用,TransformationComSpecProps 中给出的配置将被简单忽略。

PortPrototype 特定的数据变换配置:

请注意,只有一些变换器提供 PortPrototype 特定配置(例如 SOME/IP 变换器没有 TransformationComSpecProps)。

表4.94:TransformationComSpecProps(TransformationComSpecProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | TransformationComSpecProps holds all the attributes for transformers that are port specific. | | 基类 | ARObject , Describable | | 子类 | EndToEndTransformationComSpecProps, UserDefinedTransformationComSpecProps |

表4.95:TransformationComSpecProps(TransformationComSpecProps)

| 聚合于 | ClientComSpec.transformationComSpecProps, ReceiverComSpec .transformationComSpecProps, ServerComSpec.transformationComSpecProps |

可以由特定的 TransformationComSpecProps 确定该配置适用于哪个变换器:

  • EndToEndTransformationComSpecProps 中的配置适用于 E2E 变换器(TransformationTechnology 的 protocol 设置为 EndToEnd);

  • UserDefinedTransformationComSpecProps 中的配置适用于用户自定义变换器。

一个变换器链中使用了多于一个用户自定义变换器:

对特定 DataTransformation 的引用:

  • 角色 firstToSecondDataTransformation(以及潜在的 secondToFirstDataTransformation)中的 DataPrototypeMapping,或

  • 角色 dataTransformation 中的 ISignal,或

  • 角色 comBasedSignalGroupTransformation 中的 ISignalGroup,或

  • 角色 firstToSecondDataTransformation 中的 ClientServerOperationMapping

该规则应在 RTE 生成时施加。

DataPrototypeMapping 与 DataTransformation 之间关系的限制:

换言之:VariableDataPrototype 要么成为基于 DataPrototypeMapping 的数据变换的一部分,要么成为基于 ISignal 的数据变换的一部分。

请注意,在组合软件结构中,VariableDataPrototype 可以在整个 CompositionSwComponentType 内委托,[constr_1401] 仍然适用。

表4.96:TransformationTechnology(TransformationTechnology)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | A TransformationTechnology is a transformer inside a transformer chain. Tags: xml.namePlural=TRANSFORMATION-TECHNOLOGIES | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DataTransformationSet.transformationTechnology |

属性 类型 多重性 种类 备注
bufferProperties BufferProperties 0..1 aggr Aggregation of the mandatory BufferProperties.
Class TransformationTechnology
hasInternal State Boolean 0..1 attr This attribute defines whether the Transformer has an internal state or not.
needsOriginal Data Boolean 0..1 attr Specifies whether this transformer gets access to the SWC's original data.
protocol String 0..1 attr Specifies the protocol that is implemented by this transformer.
transformation Description Transformation Description 0..1 aggr A transformer can be configured with transformer specific parameters which are represented by the Transformer Description. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=transformationDescription, transformation Description.variationPoint.shortLabel vh.latestBindingTime=postBuild
transformer Class TransformerClassEnum 0..1 attr Specifies to which transformer class this transformer belongs.
version String 0..1 attr Version of the implemented protocol.

表4.97:BufferProperties(BufferProperties)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | Configuration of the buffer properties the transformer needs to work. | | 基类 | ARObject | | 聚合于 | TransformationTechnology.bufferProperties |

属性 类型 多重性 种类 备注
headerLength Integer 0..1 attr Defines the length of the header (in bits) this transformer will add in front of the data.
inPlace Boolean 0..1 attr If set, the transformer uses the input buffer as output buffer.

表4.98:TransformationDescription(TransformationDescription)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | The TransformationDescription is the abstract class that can be used by specific transformers to add transformer specific properties. | | 基类 | ARObject , Describable | | 子类 | EndToEndTransformationDescription, SOMEIPTransformationDescription, UserDefinedTransformation Description | | 聚合于 | TransformationTechnology.transformationDescription |

表4.99:TransformerClassEnum(TransformerClassEnum)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | Specifies the transformer class of a transformer. | | 聚合于 | TransformationTechnology.transformerClass |

字面值 说明
custom The transformer is a custom transformer. Tags: atp.EnumerationLiteralIndex=0
safety The transformer is a safety transformer. Tags: atp.EnumerationLiteralIndex=1
security The transformer is a security transformer. Tags: atp.EnumerationLiteralIndex=2
serializer The transformer is a serializing transformer. Tags: atp.EnumerationLiteralIndex=3

表4.100:UserDefinedTransformationComSpecProps(UserDefinedTransformationComSpecProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Communication | | 说明 | The UserDefinedTransformationComSpecProps is used to specify port specific configuration properties for custom transformers. | | 基类 | ARObject , Describable , TransformationComSpecProps | | 聚合于 | ClientComSpec.transformationComSpecProps, ReceiverComSpec .transformationComSpecProps, ServerComSpec.transformationComSpecProps |

基于 UserDefinedTransformationComSpecProps 内的用户定义属性(它们当然不是标准化的),用户自定义变换器的生成器应确定一个 UserDefinedTransformationComSpecProps 属于哪个用户自定义变换器。

自定义变换器的 PortPrototype 特定配置:

请注意,可以通过属性 adminData.sdg 在 UserDefinedTransformationComSpecProps 中添加自定义配置项。

表4.101:EndToEndTransformationComSpecProps(EndToEndTransformationComSpecProps)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | The class EndToEndTransformationIComSpecProps specifies port specific configuration properties for EndToEnd transformer attributes. | | 基类 | ARObject , Describable , TransformationComSpecProps | | 聚合于 | ClientComSpec.transformationComSpecProps, ReceiverComSpec .transformationComSpecProps, ServerComSpec.transformationComSpecProps |

表4.102:EndToEndTransformationComSpecProps(EndToEndTransformationComSpecProps)

属性 类型 多重性 种类 备注
clearFromValid ToInvalid Boolean 0..1 attr Clear monitoring window on transition from state Valid to state Invalid.
disableEndTo EndCheck Boolean 0..1 attr Disables/Enables the E2E check. The E2Eheader is removed from the payload independent from the setting of this attribute.
disableEndTo EndState Machine Boolean 0..1 attr Disables the E2EStateMachine (only E2E check functionality is performed)
e2eProfile Compatibility Props E2EProfileCompatibility Props 0..1 ref Reference to additional settings for the E2E state machine.
maxDelta Counter PositiveInteger 0..1 attr Maximum allowed difference between two counter values of two consecutively received valid messages. For example, if the receiver gets data with counter 1 and Max DeltaCounter is 3, then at the next reception the receiver can accept Counters with values 2, 3 or 4.
maxErrorState Init PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_INIT. The minimum value is 0.
maxErrorState Invalid PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_INVALID. The minimum value is 0.
maxErrorState Valid PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_VALID. The minimum value is 0.
maxNoNewOr RepeatedData PositiveInteger 0..1 attr EndToEndTransformationDescription holds these 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 Invalid 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_INVALID. The minimum value is 1.
minOkState Valid 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_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.
windowSizeInit PositiveInteger 0..1 attr Size of the monitoring window of state Init for the E2E state machine.
windowSize Invalid PositiveInteger 0..1 attr Size of the monitoring window of state Invalid for the E2E state machine.
windowSize Valid PositiveInteger 0..1 attr Size of the monitoring window of state Valid for the E2E state machine.

与端到端保护相关的数据变换器的 PortPrototype 特定配置:

属性 EndToEndTransformationComSpecProps.disableEndToEndStateMachine 的条件相关性:

E2EProfileCompatibilityProps . transitToInvalidExtended is mandatory for each EndToEndTransformationComSpecProps 属性的存在性:

表4.103:E2EProfileCompatibilityProps(E2EProfileCompatibilityProps)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | This meta-class collects settings for configuration of the E2E state machine. Tags: atp.recommendedPackage=E2EProfileCompatibilityPropsCollection | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
transitToInvalid Extended Boolean 0..1 attr E2E State machine behavior concerning transition from NODATA/INIT to INVALID value=0 (false): no direct transition from NODATA to INVALID, no transition from INIT to INVALID due to counter-related faults (Autosar R19-11 or former behavior) value=1 (true): direct transition from NODATA to INVALID covered, transition from INIT to INVALID due to counter-related faults covered (state machine extended)

4.6. 组件类型内的端口组

PortGroup:

这样的端口组定义 PortPrototype 的逻辑分组,用作配置基础软件中模式管理器实现的输入,例如与所分组端口关联的总线信号的通信在某个模式中可能被抑制。

PortGroup 必须在 VFB 层级定义:

相应地,PortGroup 既可以为 CompositionSwComponentType 定义,也可以为 AtomicSwComponentType 定义。

表4.104:PortGroup(PortGroup)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | 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. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwComponentType .portGroup |

属性 类型 多重性 种类 备注
innerGroup PortGroup * iref Links a PortGroup in a composition to another PortGroup, that is defined in a component which is part of this CompositionSwComponentType. InstanceRef implemented by: InnerPortGroupIn CompositionInstanceRef
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: atpSplitable; atpVariation Tags: atp.Splitkey=outerPort.portPrototype, outerPort.variation Point.shortLabel vh.latestBindingTime=preCompileTime

PortPrototype 可以属于多于一个 PortGroup:

借此,PortGroup 可以本地定义,但仍沿组件层级追溯。

PortGroup 可以与某些 ServiceNeeds 关联:

更多细节见第 7.11.2 章。

[constr_1147] 元类 PortGroup 的属性 category 的标准化值

元类 PortGroup 的属性 category 的以下值由 AUTOSAR 标准保留:

  • MODE_MANAGEMENT:这表示 PortGroup 用于模式管理目的的用法

  • PARTIAL_NETWORKING:这表示 PortGroup 用于部分网络目的的用法

该规则应在 CompositionSwComponentType 创建完成时施加。

4.7. 端到端保护

端到端保护方面在 AUTOSAR 元模型中得到了不同程度的支持。

一方面,存在专用元类的定义,例如 EndToEndDescription,其目标是使用所谓 E2E 包装器(由 RTE 之上的软件组件调用 E2E 库的方法)或 AUTOSAR Com 模块 callout 机制(用 Com callout 调用 E2E 库)的实现。

该方法记录在本文档的第 4.7 章。

作为替代方法,可以使用所谓的数据变换器实现端到端保护。

如何配置该方法的详细描述超出本文档的范围。请参见 TPS 系统模板 [10],其中解释了替代方法的细节。

警告: E2E 包装器方法涉及不受 AUTOSAR 标准支配的技术,并且已被更优的 E2E 变换器方法(它由 AUTOSAR 完全标准化,见 [18])取代。因此,新项目(无因沿用部件造成的遗留约束)应使用完全标准化的 E2E 变换器方法。

如 [19] 所描述,存在安全相关软件组件保护彼此之间交换的数据的情况。为此,软件组件模板提供了建模支持。

注意,可以为特定应用选择若干端到端 profile。特定的端到端 profile 由元类 EndToEndDescription 的属性 category 表示。

在语义上,category 值表示适用于相应数据元素通信的特定端到端 profile 的标识。按照 [19],有两个可以使用预定义 profile。

端到端通信保护:

表4.105:EndToEndDescription(EndToEndDescription)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | EndToEndProtection.endToEndProfile |

属性 类型 多重性 种类 备注
category NameToken 0..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

表4.106:EndToEndDescription(EndToEndDescription)

属性 类型 多重性 种类 备注
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
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.
dataIdNibble Offset PositiveInteger 0..1 attr Bit offset of the low nibble of the high byte of Data ID. The applicability of this attribute is controlled by [constr_1261].
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.
maxDelta CounterInit PositiveInteger 0..1 attr Initial maximum allowed gap between two counter values 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 RepeatedData PositiveInteger 0..1 attr The maximum amount of missing or repeated Data which 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

EndToEndDescription . category 属性的存在性:

EndToEndProtection:

  • EndToEndProtectionVariablePrototype:特定 PortPrototype 拥有的特定 dataElement

  • EndToEndProtectionISignalIPdu:ISignalIPdu 上下文中的特定 ISignalGroup。更多细节请参见 [10]

glyph[floorright](RS_SWCT_03240)

端到端保护的两种情形:

适用以下特性:

  • [constr_1000] 端到端保护限于 sender/receiver 通信:在角色中引用的 VariableDataPrototype

  • EndToEndProtectionVariablePrototype.sender

  • EndToEndProtectionVariablePrototype.receiver

应在合同阶段生成执行时在 SenderReceiverInterface 的角色 dataElement 中聚合。

  • dataId 的值由中央机构指派,而不是由软件组件的开发者指派。

  • 关于 dataId 的信息应在发送方和接收方(们)都可用。

  • [TPS_SWCT_01508] 端到端保护的范围:端到端保护既适用于本地(即 ECU 内)通信,也适用于远程(即 ECU 到 ECU)通信。glyph[floorright](RS_SWCT_03240)

EndToEndProtectionSet:

它也有构造型 <atpVariation>,因为这允许以两个变体实现软件组件:一个使用端到端保护,另一个不使用。通信端自身也可能是变体。

EndToEndProtection 在角色 sender 中维护到一个 dataElement 的 InstanceRef,在角色 receiver 中维护到一个或多个 dataElement 的 InstanceRef。借此可以支持 1:n 通信场景。

聚合 EndToEndProtection.endToEndProfile 是可拆分的:

借此,ECU 的集成者可以一般性地规定特定端到端保护的性质,而把实际的值指派(例如 dataId 的指派)留给后续流程步骤。

按照 [19],以下约束适用于 EndToEndProtection 的属性(注意,如 [19] 所描述,还适用附加的 M1 约束):

属性 EndToEndDescription.category 的标准化值:

  • NONE

  • PROFILE_01

  • PROFILE_02

此外,明确允许为 category 使用标准化值以外的值,前提是确保专有值与标准化值的扩展不冲突,例如通过使用公司特定前缀。glyph[floorright](RS_SWCT_03240)

属性 EndToEndDescription.category 的标准化值的语义解释如下:

NONE:该值表示应为给定的 sender/receiver 或给定的 iSignalIPdu 启用 E2E 框架。将生成包装器代码,

但它不应调用 E2E 库保护例程。E2E 包装器作为直通工作。

当给定系统中尚未选择 profile 或 profile 选项、但要求在考虑 E2E 库的情况下系统能够成功构建时,可以使用它。这也适用于从有/无 E2E 保护的系统迁移。

category 设置为 NONE:

  • PROFILE_01:该值表示适用 E2E profile 1 的设置(使用 SAE CRC8、隐式 16 位 dataId 和 4 位存活计数器)。

attributes in PROFILE_01 的存在性:

  • dataLength

  • dataId

在合同阶段生成执行时。

请注意,属性 maxDeltaCounterInit 也是 PROFILE_01 的一部分,但只要 ReceiverComSpec.maxDeltaCounterInit 存在,它不必然必须存在。

属性 RPortPrototype.requiredComSpec.maxDeltaCounterInit 与 EndToEndProtection.endToEndProfile.maxDeltaCounterInit 的使用:

  • 引用 EndToEndProtection.endToEndProtectionVariablePrototype.receiver 的值与引用 RPortPrototype.requiredComSpec.dataElement 的值相同,且

  • 属性 RPortPrototype.requiredComSpec.maxDeltaCounterInit 存在,

则属性 RPortPrototype.requiredComSpec.maxDeltaCounterInit 的值应优先于属性 EndToEndProtection.endToEndProfile.maxDeltaCounterInit 的值。

EndToEndDescription . maxDeltaCounterInit for PROFILE_01 属性的存在性:

  • [TPS_SWCT_01850] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.maxDeltaCounterInit 不存在,

则属性 EndToEndProtection.endToEndProfile.maxDeltaCounterInit 应在合同阶段生成执行时存在。

PROFILE_01 中 dataId 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 dataIdMode 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 crcOffset 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 counterOffset 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 dataLength 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 maxDeltaCounterInit 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 maxNoNewOrRepeatedData 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_01 中 syncCounterInit 的约束:

该规则应在合同阶段生成执行时施加。

属性 RPortPrototype.requiredComSpec.maxNoNewOrRepeatedData 与 EndToEndProtection.endToEndProfile.maxNoNewOrRepeatedData 的使用:

  • 引用 EndToEndProtection.endToEndProtectionVariablePrototype.receiver 的值与引用 RPortPrototype.requiredComSpec.dataElement 的值相同,且

  • 属性 RPortPrototype.requiredComSpec.maxNoNewOrRepeatedData 存在,

则 RPortPrototype.requiredComSpec.maxNoNewOrRepeatedData 的值应优先于 EndToEndProtection.endToEndProfile.maxNoNewOrRepeatedData 的值。

EndToEndDescription . maxNoNewOrRepeatedData for PROFILE_01 属性的存在性:

  • [TPS_SWCT_01851] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.maxNoNewOrRepeatedData 不存在,

则属性 EndToEndProtection.endToEndProfile.maxNoNewOrRepeatedData 应在合同阶段生成执行时存在。

属性 RPortPrototype.requiredComSpec.syncCounterInit 与属性 EndToEndProtection.endToEndProfile.syncCounterInit 的使用:

  • 引用 EndToEndProtection.endToEndProtectionVariablePrototype.receiver 的值与引用 RPortPrototype.requiredComSpec.dataElement 的值相同,且

  • 属性 RPortPrototype.requiredComSpec.syncCounterInit 存在,

则 RPortPrototype.requiredComSpec.syncCounterInit 的值应优先于 EndToEndProtection.endToEndProfile.syncCounterInit 的值。

EndToEndDescription . syncCounterInit for PROFILE_01 属性的存在性:

  • [TPS_SWCT_01852] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.syncCounterInit 不存在,

则属性 EndToEndProtection.endToEndProfile.syncCounterInit 应在合同阶段生成执行时存在。

EndToEndDescription.dataIdNibbleOffset 的适用性:

该规则应在合同阶段生成执行时施加。

EndToEndDescription.dataIdNibbleOffset 的默认值:

PROFILE_02:该值表示适用 E2E profile 2 的设置。

attributes in PROFILE_02 的存在性:

  • dataLength

  • dataId

在合同阶段生成执行时

请注意,属性 maxDeltaCounterInit 也是 PROFILE_01 的一部分,但只要 ReceiverComSpec.maxDeltaCounterInit 存在,它不必然必须存在。

EndToEndDescription . maxDeltaCounterInit for PROFILE_02 属性的存在性:

  • [TPS_SWCT_01850] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.maxDeltaCounterInit 不存在,

则属性 EndToEndProtection.endToEndProfile.maxDeltaCounterInit 应在合同阶段生成执行时存在。

PROFILE_02 中 dataLength 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_02 中 dataId 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_02 中 maxDeltaCounterInit 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_02 中 maxNoNewOrRepeatedData 的约束:

该规则应在合同阶段生成执行时施加。

PROFILE_02 中 syncCounterInit 的约束:

该规则应在合同阶段生成执行时施加。

EndToEndDescription . maxNoNewOrRepeatedData for PROFILE_02 属性的存在性:

  • [TPS_SWCT_01851] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.maxNoNewOrRepeatedData 不存在,

则属性 EndToEndProtection.endToEndProfile.maxNoNewOrRepeatedData 应在合同阶段生成执行时存在。

EndToEndDescription . syncCounterInit for PROFILE_02 属性的存在性:

  • [TPS_SWCT_01852] 中所述关于被引用 VariableDataPrototype 的条件不满足,或

  • 属性 RPortPrototype.requiredComSpec.syncCounterInit 不存在,

则属性 EndToEndProtection.endToEndProfile.syncCounterInit 应在合同阶段生成执行时存在。

表4.107:EndToEndProtectionSet(EndToEndProtectionSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection | | 说明 | This represents a container for collection EndToEndProtectionInformation. Tags: atp.recommendedPackage=EndToEndProtectionSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
endToEnd Protection EndToEndProtection * aggr This is one particular EndToEndProtection. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=endToEndProtection.shortName, endToEnd Protection.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表4.108:EndToEndProtection(EndToEndProtection)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection | | 说明 | This meta-class represents the ability to describe a particular end to end protection. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | EndToEndProtectionSet.endToEndProtection |

属性 类型 多重性 种类 备注
endToEnd Profile EndToEndDescription 0..1 aggr This represents the particular EndToEndDescription. Stereotypes: atpSplitable Tags: atp.Splitkey=endToEndProfile

表4.109:EndToEndProtection(EndToEndProtection)

属性 类型 多重性 种类 备注
endToEnd Protection ISignalIPdu EndToEndProtectionI SignalIPdu * aggr Defines to which ISignalIPdu - ISignalGroup pair this End ToEndProtection shall apply. 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=endToEndProtectionISignalIPdu, endToEnd ProtectionISignalIPdu.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
endToEnd Protection Variable Prototype EndToEndProtection VariablePrototype * aggr Defines to which VariableDataPrototypes in the roles of one sender and one or more receivers this EndTo Endprotection applies. 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. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=endToEndProtectionVariablePrototype.short Label, endToEndProtectionVariablePrototype.variation Point.shortLabel vh.latestBindingTime=preCompileTime

EndToEndProtection . endToEndProfile 属性的存在性:

表4.110:EndToEndProtectionVariablePrototype(EndToEndProtectionVariablePrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::EndToEndProtection | | 说明 | 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. Caveat: The E2E wrapper approach involves technologies that are not subjected to the AUTOSAR standard and is superseded by the superior E2E transformer approach (which is fully standardized by AUTOSAR). Hence, new projects (without legacy constraints due to carry-over parts) shall use the fully standardized E2E transformer approach. | | 基类 | ARObject | | 聚合于 | EndToEndProtection.endToEndProtectionVariablePrototype |

表4.111:EndToEndProtectionVariablePrototype(EndToEndProtectionVariablePrototype)

属性 类型 多重性 种类 备注
receiver VariableDataPrototype * iref This represents the receiver. Note that 1:n communication is supported for this use case. InstanceRef implemented by: VariableDataPrototypeIn SystemInstanceRef
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. InstanceRef implemented by: VariableDataPrototypeIn SystemInstanceRef
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. Stereotypes: atpIdentityContributor

请注意,使用端到端保护时,显式支持一个发送方对应一个或多个接收方。

由 EndToEndProtection 聚合的 EndToEndProtectionVariablePrototype:

4.8. 部分网络(Partial Networking)

对部分网络的支持:

后者按给定功能分组 VFB 上的所有通信。然而,虚拟功能集群的概念性想法并未按其本身在元模型中表示。

相反,PortGroup 被用来把 PortPrototype 的分组规定到虚拟功能集群这一更高的概念层级。

请注意,关于 PortGroup 语义的更多信息见第 4.6 章。

对 M1 上 PortGroup 定义的结构没有限制。一个 PortPrototype 可以成为若干 PortGroup 的成员,从而创建重叠的 PortGroup。

虚拟功能集群的目的:

  1. 把 Sender/Receiver 或 Client/Server 通信的 PortPrototype(与服务无关的)指派到虚拟功能集群。

  2. 就相应功能在给定时间点是否被需要而言控制其行为。这一方面由控制端口(control port)的概念实现。实现虚拟功能集群控制端口的软件组件在概念上成为 VFC 控制器(VFC Controller)。

  3. 允许应用软件获取给定虚拟功能集群的状态。这一方面由状态端口(status port)的概念实现。

将 PortGroup 的通用概念用于部分网络的目的,应通过把 PortGroup 的属性 category 的值设置为 PARTIAL_NETWORKING 来指示,见 [constr_1147]。

4.8.1. VFC 控制端口

控制端口的目的:

由于请求和释放语义通过与 BSW 交互实现,相应的控制端口需要由属性 isService 设置为 true 的 PortInterface 定义类型。

请求和释放部分网络:

  • ComM:使用标准化 ComM_UserRequest.RequestComMode 的 ClientServerInterface [20]

  • BswM:使用标准化 AppModeRequestInterface.requestedMode 的 SenderReceiverInterface [21]

控制端口不应成为 PortGroup 的一部分:

该关系通过特定的 SwcServiceDependency 实现:它拥有到预期控制端口的 RoleBasedPortAssignment,并在角色 representedPortGroup 中引用一个(包含 VFC 的)PortGroup。

更多信息请参见 [TPS_SWCT_01126]。

4.8.2. VFC 状态端口

主动查询部分网络的状态:

这可以通过三种替代(即 “之一”)方式与 BSW 交互来完成:

  • ComM:使用标准化 ComM_UserRequest.GetCurrentComMode 的 ClientServerInterface [20]

  • ComM:使用标准化 ComM_CurrentMode.currentMode 的 ModeSwitchInterface [20]

  • BswM:使用标准化 AppModeInterface.currentMode 的 ModeSwitchInterface [21]

glyph[floorright](RS_SWCT_03241)

如上所述,ComM 的状态可以通过 ClientServerInterface 或 SenderReceiverInterface 获取。两种替代方案中哪一种适用于具体情况由软件组件的作者决定。

当使用可能的 SenderReceiverInterface 之一时,状态端口概念与模式管理的对应延伸到:部分网络的状态作为实际的 ModeDeclaration 返回。

这意味着软件组件模板预见的、对模式变化作出反应的所有机制都已就位,可以在应用软件内使用。

为确保经由属于部分网络的 PortPrototype 的通信有效,软件组件应在通信之前考虑部分网络的状态以确证其活动。

状态端口不应成为 PortGroup 的成员:

这一关系借助一个特定 SwcServiceDependency 实现:它拥有到预期状态端口的 RoleBasedPortAssignment,并在角色 representedPortGroup 中引用一个 PortGroup(它包含 VFC)。glyph[floorright](RS_SWCT_03241、RS_SWCT_03201)

更多信息请参见 [TPS_SWCT_01126]。

11 ClientServerInterface 的使用实际上实现了模式信息的 “拉取” 方法,而 SenderReceiverInterface 的使用(在与 SwcModeSwitchEvent 组合使用时)类似于 “推送” 方法。

4.9. 隐式通信行为的形式化定义

隐式通信行为:

  • 一组 RunnableEntity 执行期间数据稳定。这意味着不同 RunnableEntity 读取的所有数据值具有相同的 “年龄”。因此,值在 RunnableEntity 链的执行期间不变化。

  • 一组 DataPrototype 的连贯数据消费与传播。这意味着一组相互依赖的数据值来自同一次计算迭代。因此,这组值必须一次性传播给需要完整计算结果的 RunnableEntity。属于计算链的 RunnableEntity 仍可能消费部分更新的值。

术语 “稳定性” 相对于 ConsistencyNeeds 的含义:

术语 “连贯性” 相对于 ConsistencyNeeds 的含义:

针对这些目标,元模型提供了表达一组 RunnableEntity 与一组 DataPrototype 之间关联的手段。这些组可以按层次定义。

该信息(就 ConsistencyNeeds 而言)可以主要在 AtomicSwComponentType 的设计期间定义,但同样也可以在 CompositionSwComponentType 的定义期间规定该 ConsistencyNeeds。

例如,通常预期在若干 AtomicSwComponentType 的 RunnableEntity 执行期间数据稳定。

请注意,稳定性与连贯性这两个方面不一定彼此关联。可以要求稳定而不要求连贯,反之亦然。为此需要角色 dpgDoesNotRequireCoherency 和 regDoesNotRequireStability。

不要求稳定性和/或连贯性:

同样,regDoesNotRequireStability 可用于表达:对一组 RunnableEntity 而言不要求关于数据访问的稳定性。

ConsistencyNeeds 的适用性:

应用于不使用隐式通信的 RunnableEntity 的 ConsistencyNeeds:

隐式通信行为的形式化定义预见了模型元素的分组,以指示它们与一致隐式通信的相关性。

RunnableEntityGroup:

DataPrototypeGroup:

给定 DataPrototypeGroup,或者如果该 VariableDataPrototype 所属的 DataPrototypeGroup 最终(可能有多个嵌套层级)被给定 DataPrototypeGroup 引用。

由 CompositionSwComponentType 聚合的 ConsistencyNeeds:

该规则应在 CompositionSwComponentType 创建完成时施加。

为澄清起见,[constr_1231] 包括:拥有该 CompositionSwComponentType 的委托 PortPrototype 所拥有的 VariableDataPrototype、在外围 CompositionSwComponentType 中实例化的 CompositionSwComponentType 的委托 PortPrototype 中的 VariableDataPrototype,或者在外围 CompositionSwComponentType 上下文内实例化的 AtomicSwComponentType 拥有的 PortPrototype 中的 VariableDataPrototype。

由 AtomicSwComponentType 聚合的 ConsistencyNeeds:

严格来说,这些是该特定 AtomicSwComponentType 的 RunnableEntity 和 PortPrototype,或同一 AtomicSwComponentType 拥有的 RunnableEntityGroup 和 DataPrototypeGroup。

请注意,RunnableEntityGroup 和 DataPrototypeGroup 的 category 的预定义值在 [1] 中描述。

表4.112:ConsistencyNeeds(ConsistencyNeeds)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior | | 说明 | This meta-class represents the ability to define requirements on the implicit communication behavior. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ConsistencyNeedsBlueprintSet.consistencyNeeds, SwComponentType .consistencyNeeds |

属性 类型 多重性 种类 备注
dpgDoesNot Require Coherency DataPrototypeGroup * aggr This group of VariableDataPrototypes does not require coherency with respect to the implicit communication behavior. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dpgDoesNotRequireCoherency.shortName, dpgDoesNotRequireCoherency.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class ConsistencyNeeds
dpgRequires Coherency DataPrototypeGroup * aggr This group of VariableDataPrototypes requires 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=dpgRequiresCoherency.shortName, dpg RequiresCoherency.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
regDoesNot RequireStability RunnableEntityGroup * aggr This group of RunnableEntities does not require stability with respect to the implicit communication behavior. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=regDoesNotRequireStability.shortName, reg DoesNotRequireStability.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
regRequires Stability RunnableEntityGroup * aggr This group of RunnableEntities requires stability 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 stable manner. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=regRequiresStability.shortName, reg RequiresStability.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表4.113:RunnableEntityGroup(RunnableEntityGroup)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior | | 说明 | This meta-class represents the ability to define a collection of RunnableEntities. The collection can be nested. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ConsistencyNeeds.regDoesNotRequireStability, ConsistencyNeeds.reg RequiresStability |

属性 类型 多重性 种类 备注
runnableEntity RunnableEntity * iref This represents a collection of RunnableEntitys that belong to the enclosing RunnableEntityGroup. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=runnableEntity.contextSwComponent Prototype, runnableEntity.targetRunnableEntity, runnable Entity.variationPoint.shortLabel vh.latestBindingTime=preCompileTime InstanceRef implemented by: RunnableEntityIn CompositionInstanceRef

表4.114:RunnableEntityGroup(RunnableEntityGroup)

属性 类型 多重性 种类 备注
runnableEntity Group RunnableEntityGroup * iref This represents the ability to define nested groups of RunnableEntitys. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=runnableEntityGroup.contextSwComponent Prototype, runnableEntityGroup.targetRunnableEntity Group, runnableEntityGroup.variationPoint.shortLabel vh.latestBindingTime=preCompileTime InstanceRef implemented by: InnerRunnableEntity GroupInCompositionInstanceRef

表4.115:DataPrototypeGroup(DataPrototypeGroup)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior | | 说明 | 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. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ConsistencyNeeds.dpgDoesNotRequireCoherency, ConsistencyNeeds.dpg RequiresCoherency |

属性 类型 多重性 种类 备注
dataPrototype Group DataPrototypeGroup * iref This represents the ability to define nested groups of VariableDataPrototypes. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataPrototypeGroup.contextSwComponent Prototype, dataPrototypeGroup.targetDataPrototype Group, dataPrototypeGroup.variationPoint.shortLabel vh.latestBindingTime=preCompileTime InstanceRef implemented by: InnerDataPrototype GroupInCompositionInstanceRef
implicitData Access VariableDataPrototype * iref This represents a collection of VariableDataPrototypes that belong to the enclosing DataPrototypeGroup Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=implicitDataAccess.contextSwComponent Prototype, implicitDataAccess.contextPortPrototype, implicitDataAccess.targetVariableDataPrototype, implicit DataAccess.variationPoint.shortLabel vh.latestBindingTime=preCompileTime InstanceRef implemented by: VariableDataPrototypeIn CompositionInstanceRef

4.9.1. 接收方侧的一致性需求

接收 SwComponentType 在角色 dpgRequiresCoherency 中拥有 DataPrototypeGroup:

VariableDataPrototype 的值应具有相同的 “年龄”。

接收 SwComponentType 在角色 regRequiresStability 中拥有 RunnableEntityGroup:

接收 SwComponentType 在角色 regRequiresStability 中拥有 RunnableEntityGroup,且还在角色 dpgRequiresCoherency 中拥有一个或多个 DataPrototypeGroup:

这意味着 VariableDataPrototype 的值应具有相同的 “年龄”,并且在属于给定 RunnableEntityGroup 的所有 RunnableEntity 执行期间保持稳定。

4.9.2. 发送方侧的一致性需求

发送 SwComponentType 在角色 dpgRequiresCoherency 中拥有 DataPrototypeGroup:

连贯性在产生该组 RunnableEntity 的 RunnableEntity 终止(且隐式数据被更新)的时点建立。

如果那些 RunnableEntity 也在读取数据,那些读访问将不会读到连贯的值,而是读到同组 RunnableEntity 写入的中间值。

对于不属于产生该组的 RunnableEntityGroup 的所有其他 RunnableEntity,数据表现得好像正是在这一时点被连贯地更新。

为了避免错误配置,可以显式定义不适用连贯性的 RunnableEntity 组。

发送 SwComponentType 在角色 dpgRequiresCoherency 中拥有 DataPrototypeGroup 且还拥有 RunnableEntityGroup:

来自那些 RunnableEntityGroup 中 RunnableEntity 的读访问将不会读到连贯的值,而是读到同组 RunnableEntity 写入的中间值。

4.9.3. RunnableEntityGroup 内同一数据的发送方与接收方的一致性需求

同一隐式通信 VariableDataPrototype 的发送方和接收方与同一 RunnableEntityGroup 关联:

5. 数据描述

5.1. 简介

在定义数据类型和原型的上下文中,AUTOSAR 概念区分三个不同的抽象层级,如 [TPS_SWCT_01229] 所描绘。

数据类型定义的三个不同抽象层级:

| Application Data Level | |

| Implementation Data Level | | | Supplemental Base Type Level | |

应用数据层级:

该层级允许从应用的角度定义在软件组件之间、或在软件组件与测量和标定工具之间交换数据所需的全部数据属性。可以仅基于该层级规定完整虚拟功能总线的数据通信。

该层级除其他外包括值的数值范围、数据结构以及物理语义。

数据语义(例如物理单位)不在 RTE 的关注点内(就使通信在技术上可行而言)。

然而,它对应用软件以及测量和标定系统中数据的唯一解释很重要。

请注意,ApplicationDataType 按定义与平台无关,因此不会作为数据类型在软件组件的代码实现中可见。

在本规范的先前版本中,该层级与实现层级未清晰分离。由此产生以下缺陷,现已解决:

  • 原始类型(如整数、布尔、实数、不透明)的模型在很高的设计层级就已预见实现方面。

1 有些方面会影响 RTE,例如 dataElement 的缩放。

  • 端口内使用的数据类型模型聚焦于经由 RTE 的通信,不足以建模 AUTOSAR 系统内为 RTE 通信之外的目的(即 NvM 数据访问、标定、测量、诊断、BSW 模块接口)可见的变量和参数的所有类型方面。现在倾向于使用涵盖所有这些方面的统一类型系统。

  • 标定参数未被完全纳入数据类型概念。它们的某些属性(尤其是曲线和映射表的属性)只能在原型层级规定,或在 AUTOSAR 内未完全形式化(如 SwRecordLayout)。

  • 数据类型系统与 ASAM-MCD 等标定标准中的用法(即 category 的用法)不兼容。

  • 不正式更改 VFB 设计中使用的数据类型就无法添加实现特定元素(如基本类型)。缺少一种可在后续项目阶段使用的映射机制(这种机制在 AUTOSAR 其他部分很常见,例如把组件映射到 ECU)。

  • RTE 规范包含许多关于如何在 C 中实现某些数据类型或原型的默认规则和假设。借助对所有相关实现方面的更正式描述,C 接口的生成更好地确定了。但这些方面应与应用层级设计分离。

  • 由于大系统的应用层级可能有很多数据类型,与 RTE 的接口中名称冲突的概率相当高。使用单独的一组类型来实现 RTE 接口解决了这个问题。

应用层级可能对相应实现层级的设计提出强要求:

这是由这些元素的性质决定的——它们构成从物理世界到数值表示(及反之)的桥梁。尽管如此,我们认为这些元素的规定属于应用层级。

一方面,MCD 工具需要该信息,因此它应是相当高层级设计的一部分。另一方面,这种方法将允许使用受限的实现数据类型集合。

关于应用层级与实现层级之间兼容性要求的更多信息见第 6.2.5 节。

实现数据层级:

它的值对应于 CPU 上编程语言处理的实际二进制数。它包含指针和联合等概念,这些概念关系到内存中数据的组织,与应用层级无关。

该层级也定义结构,但可以更细粒度。例如,应用层级可以把要传输到仪表组合的文本定义为原始类型(如果结构对应用无关),而在实现层级它可以建模为字节数组。

实现数据层级的用例:

  • 首先,实现数据层级可用于基础软件内接口和数据(例如调试数据)的描述,关于这些用例的更多细节见 [6]。

  • ImplementationDataType 还应用于描述在纯数值层级上运作的库的接口。

  • 实现数据还用于描述软件组件与基础软件(即 AUTOSAR 服务)之间的接口,因为这些通常只涵盖实现方面。

如果物理和语义抽象无关紧要,可以直接在该层级定义 VFB 系统中的通信。

  • 最后同样重要的是:RTE 生成器的输入由该层级的数据描述定义。这意味着如果 SWC 只在应用层级定义其数据,则在生成 RTE 之前,应在 ECU 提取中创建(或生成)相应的一组实现数据类型。

glyph[floorright](RS_SWCT_03217)

基本类型层级:

这些基本类型仍未完全确定编程语言上的实际实现,但它们对此施加了强限制,例如定义要使用的位和字节的数量,以及原始 “叶” 对象的字节序和编码。

基本类型层不代表 AUTOSAR 中定义数据类型的 “独立” 方式。DataPrototype 可以由 AutosarDataType 定义类型,即 ApplicationDataType 或 AbstractImplementationDataType。没有选项单独使用基本类型层级为 DataPrototype 定义类型。

应用层级定义的数据到实现层级和基本类型层级的映射:

例如,如果一个物理值可以用 16 位无符号整数以足够的精度和范围表示,当它经由 CAN 发送时、当大端 32 位机器上的软件组件看到它时、或当小端 16 位处理器上的软件组件看到它时,它看起来仍可能非常不同。

当不同 ECU 上的组件通信时,可能需要同一应用数据类型的多个数据实现之间的换算。AUTOSAR COM [22] 负责此事。

这意味着配置依赖于组件之间传输数据的定义。

AUTOSAR COM 可能需要在小端与大端表示之间转换 16 位整数;而 16 字节的数组即使字节序变化也无需交换。在 ECU 内通信的情况下,不需要字节序转换,因为软件组件驻留在同一台机器上。

数据类型的总体图景:

ApplicationDataType:在 M2 上定义——提供应用层级数据类型的元模型。它涵盖数据类型的应用相关方面。

ApplicationDataType 最终应映射到 ImplementationDataType。

  • ImplementationDataType:在 M2 上定义——提供实现层级数据类型的元模型。就 C 源代码而言,ImplementationDataType 最终归结为一个 typedef。

  • BaseType:在 M2 上定义——提供 ImplementationDataType 的平台相关部分。对平台的依赖涵盖以下方面:

  • 在 C 语言层级的定义——使用 nativeDeclaration

  • 目标平台上的技术表示(字节序、对齐、编码),这是支持 MCD 系统所需的。

  • 基于 SwBaseType 的该层级建模不限于软件域中数据类型的定义。在 AUTOSAR 中,只要需要对比特和字节的精确了解,就会在若干不同上下文中使用它。

2 更准确地说,数据应转换到所谓的 SystemSignal 以及从其转换回来。

平台数据类型(Platform Data Type):在 M1 上定义——由 AUTOSAR 提供。平台类型应在 AUTOSAR 系统可运行的每个平台上可用。

平台数据类型的名称以及关于模块/组件之间接口的属性在每个平台上都相同。

具体表示随平台而异。

平台数据类型应使用 ImplementationDataType 建模。

注意,在 AUTOSAR R3.x 中,平台类型是手动实现的,甚至无法在 ARXML 模型上表达(见 [SRS_Rte_00150])。在 AUTOSAR R4.1 中,平台数据类型可以在 ARXML 模型中表示。AUTOSAR 的后续发布版可以直接从 ARXML 模型生成平台数据类型。

标准类型(Standard Type):在 M1 上定义——由 AUTOSAR 提供。标准类型通过引用平台类型定义。

SwDataDefProps:

SwDataDefProps 的子集在特定情形下适用,汇总请参见以下表:

  • 数据 category 汇总于 [constr_1006];

  • ApplicationDataType 的属性汇总于 [constr_1007];

  • ImplementationDataType 的属性汇总于 [constr_1009];

  • 由 ApplicationDataType 定义类型的 DataPrototype 的属性汇总于 [constr_1289];

  • 由 ImplementationDataType 定义类型的 DataPrototype 的属性汇总于 [constr_1288];

  • SwDataDefProps 的适用性汇总于 [constr_1015]。

5.2. 数据类型

5.2.1. 概述

如第 5.1 节所解释,可以从应用角度以及实现角度描述软件组件提供的数据。

ApplicationDataType 与 ImplementationDataType:

组合 ApplicationDataType:

组合 ImplementationDataType:

图 5.1 展示了用于定义 AutosarDataType 的基本元类的汇总。

表5.1:AutosarDataType(AutosarDataType)

| 包 | | | 说明 | Abstract base class for user defined AUTOSAR data types for software. | | 基类 | ARElement , ARObject , AtpClassifier , AtpType , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 子类 | AbstractImplementationDataType , ApplicationDataType | | 聚合于 | ARPackage.element |

表5.2:AutosarDataType(AutosarDataType)

属性 类型 多重性 种类 备注
swDataDef Props SwDataDefProps 0..1 aggr The properties of this AutosarDataType. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps

表5.3:ApplicationDataType(ApplicationDataType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | ApplicationDataType defines a data type from the application point of view. Especially it should be used whenever something "physical" is at stake. An ApplicationDataType represents a set of values as seen in the application model, such as measurement units. It does not consider implementation details such as bit-size, endianess, etc. It should be possible to model the application level aspects of a VFB system by using ApplicationData Types only. | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | ApplicationCompositeDataType , ApplicationPrimitiveDataType | | 聚合于 | ARPackage.element |

5.2.2. 数据类型映射

如上所述,应用数据类型的概念与实现数据类型的概念都可以用于在 M1 模型中实例化数据原型。但是,存在一些用例——特别是为了给 ApplicationSwComponentType 生成 RTE 合同——要求对一个给定数据原型考虑两个层级。

DataTypeMap:

表5.4:DataTypeMap(DataTypeMap)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | This class represents the relationship between ApplicationDataType and its implementing Abstract ImplementationDataType. | | 基类 | ARObject | | 聚合于 | DataTypeMappingSet.dataTypeMap |

表5.5:DataTypeMap(DataTypeMap)

属性 类型 多重性 种类 备注
applicationData Type ApplicationDataType 0..1 ref This is the corresponding ApplicationDataType
implementation DataType AbstractImplementation DataType 0..1 ref This is the corresponding AbstractImplementationData Type.

例如,如果 SenderReceiverInterface 中的 dataElement 由 ApplicationDataType 定义类型,则它还应关联到一个 ImplementationDataType 以便能够生成 RTE。

reference DataTypeMap . applicationDataType 的存在性:

reference DataTypeMap . implementationDataType 的存在性:

ModeRequestTypeMap:

这一方面在第 4.2.5 章更详细地解释。

注意,出于流程原因引入了映射类而非直接关联:它允许在单独的 M1 工件中维护应用类型和实现类型,而无需直接链接。

例如,如果软件组件被移到另一个硬件平台,可以在特定组件的范围内更改应用类型与实现类型之间的映射,而不更改整体 VFB 模型。

被映射的 ApplicationDataType 与 ImplementationDataType 应兼容:

当然,如果 ImplementationDataType 是从现有 ApplicationDataType 生成的,预期它们将自动兼容。

请注意,相互映射的 ApplicationDataType 与 ImplementationDataType 之间的兼容性在第 6.2.5 章中澄清。

此外,各种映射聚合在一个容器 DataTypeMappingSet 中,以便在工件中更容易维护。

表5.6:DataTypeMappingSet(DataTypeMappingSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | This class represents a list of mappings between ApplicationDataTypes and ImplementationDataTypes. In addition, it can contain mappings between ImplementationDataTypes and ModeDeclarationGroups. Tags: atp.recommendedPackage=DataTypeMappingSets | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dataTypeMap DataTypeMap * aggr This is one particular association between an Application DataType and its AbstractImplementationDataType.
modeRequest TypeMap ModeRequestTypeMap * aggr This is one particular association between an Mode DeclarationGroup and its AbstractImplementationData Type.

注意,元类 AutosarDataType、ModeDeclarationGroup 和 DataTypeMappingSet 派生自 ARElement。这意味着它们及其派生的元类可以在 M1 层级作为 ARPackage 的一部分声明,从而可以在某些软件组件或基础软件模块描述中使用。

如何为软件系统组织 DataTypeMappingSet(例如是每个 ECU 一个单独的映射集合还是甚至每个软件组件一个)被视为项目特定。但是,RTE 生成器需要一个明确定义的 DataTypeMappingSet 作为与那些可能定义 ApplicationDataType 类型数据的工件相关的输入。

与 DataTypeMappingSet 有关联的元类:

  • InternalBehavior,因为它表示软件组件代码与 RTE 之间的接口,属于特定组件类型的所有数据类型都必须在实现层级唯一提供;

  • ParameterSwComponentType,出于相同原因(该组件类型没有 InternalBehavior);

  • NvBlockDescriptor,因为该元类也导致从数据类型生成代码且不与 InternalBehavior 关联;

  • CompositionSwComponentType,以支持 CompositionSwComponentType 上下文中 ComSpec 的定义。请注意,数据类型映射的这一定义是非正式的(即应视为对尚未被 DelegationSwConnector 或 PassThroughSwConnector 引用的委托 PortPrototype 的提示),不应视为对 CompositionSwComponentType 内部元素的有约束力的合同。

关于这一方面的更多细节请参见图 5.62。

应用类型与实现类型之间的映射不必然形成 1:1 关系:

  • 在系统、ECU、甚至原子软件组件的单个 InternalBehavior 的范围内,多个 ApplicationDataType 可以映射到同一 ImplementationDataType。

当然,这要求不同的 ApplicationDataType 用于不同的 DataPrototype,因而 DataPrototype 由它们定义类型(而不是由 ImplementationDataType 定义类型)。这使得可以在实现层级建立比应用模型层级更简单的类型系统。

  • 同一 ApplicationDataType 可以为不同 ECU 映射到不同 ImplementationDataType。该场景允许根据特定 ECU 的需要选择实现数据类型。

  • 即使在单个 ECU(更准确地说,单个 RTE)的范围内,同一 ApplicationDataType 也可以映射到不同 ImplementationDataType,但只能针对不同的 AtomicSwComponentType(见 [constr_1004])。

这提高了独立开发或在 ECU 之间移植的软件组件的可移植性。

单个 AtomicSwComponentType 范围内 ApplicationDataType 的映射:

映射到同一 ApplicationDataType 的 ImplementationDataType 的兼容性:

该约束在图 5.2 中可视化。

表示可选元素结构的数据类型的映射:

5.2.3. 数据类别

AutosarDataType 派生自 Identifiable,因此拥有 longName、shortName、category 以及若干用于管理和文档目的的其他属性(细节见 [11])。

AutosarDataType 上下文中使用的属性 category:

关于元类 SwDataDefProps 语义的详细解释见第 5.4 章。

这种方法避免了在 M2 层级为 AutosarDataType 否则将需要的非常深且复杂的继承树。

在一定程度上,设置 category 与定义 AutosarDataType.swDataDefProps 的属性之间存在冗余。这种冗余是有意的,它允许工具通过简单规则排除无意义的配置。

在本规范的先前版本中,category 只用于标定参数。由于若干扩展,category 现在适用于 AutosarDataType 的所有用例。

为 AutosarDataType 定义的所有有效 category 的概览见 [constr_1006]。

某些 category 也应用于类型系统的子元素([constr_1006] 中的 “Applicable to ...” 列)。这在以下各节中更详细地解释。

请注意,[constr_1006] 的 “RTE + BSW” 列只适用于与 ImplementationDataType 和/或 McDataInstance 中测量和标定方面相关的 category。

[constr_1006] 依据与数据定义属性相关的特定模型元素的适用数据类别

| Category | Applicable to ... |

| VALUE | ApplicationArrayDataType | | | x | | VAL_BLK | | | DATA_REF- ERENCE | | | FUNCTION_ REFERENCE | | | TYPE_REF- ERENCE | | | STRUCTURE | | | UNION | | | ARRAY | x | | Category | Applicable to ... | | BIT | ApplicationArrayDataType | | | x | | HOST | | | STRING | | | BOOLEAN | | | COM_AXIS | | | RES_AXIS | | | Category | Applicable to ... | | | ApplicationArrayDataType | | MAP | | | CUBOID | | | CUBE_4 | | | Category | Applicable to ... Use Case | | CUBE_5 | ApplicationArrayDataType ApplicationRecordDataType ApplicationPrimitiveDataType ApplicationRecordElement ApplicationArrayElement ApplicationValueSpecification ApplicationRuleBasedValueSpecification ImplementationDataType ImplementationDataTypeElement SwSystemconst McDataInstance Calibration Measurement x x x x x x x |

该规则应在 RTE 生成时施加。

glyph[floorright]()

另请注意,SwServiceArg 的描述见 TPS 基础软件模块描述模板 [6]。

此外,[constr_1006] 中 TYPE_REFERENCE 与 “标定” 的交集为空,因为类型引用本身与测量和标定明确无关:在运行时类型引用已被解析,运行时只有 category 的 “最终” 值(如 VALUE 或 STRUCTURE)相关。

提供从 ParameterDataPrototype 派生 McDataInstance 所需信息的规范方式,是首先让 ParameterDataPrototype 由 ApplicationDataType 定义类型。

不过,一般允许(尽管不推荐)定义由 ImplementationDataType 定义类型的 ParameterDataPrototype,只要在从该 ParameterDataPrototype 创建 McDataInstance 时以某种方式提供了关于该 ParameterDataPrototype 的所述 “相关信息”。

SwSystemconst 上下文中使用的属性 category 的默认值:

5.2.4. 应用数据类型

ApplicationDataType 的子类:

这一方面在图 5.3 中进一步解释。

表5.7:ApplicationPrimitiveDataType(ApplicationPrimitiveDataType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | A primitive data type defines a set of allowed values. Tags: atp.recommendedPackage=ApplicationDataTypes | | 基类 | ARElement , ARObject , ApplicationDataType , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

表5.8:ApplicationCompositeDataType(ApplicationCompositeDataType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | Abstract base class for all application data types composed of other data types. | | 基类 | ARElement , ARObject , ApplicationDataType , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | ApplicationArrayDataType, ApplicationRecordDataType | | 聚合于 | ARPackage.element |

ApplicationDataType 子类的适用 category:

[constr_10433] 依据 category 的 ApplicationDataType 属性的存在性

| Attributes DataType | of |

| | ApplicationRecordDataType | | element | | | isOptional | | | element | | | dynamicArraySizeProfile | | | arraySizeHandling | | | arraySizeSemantics | | | maxNumberOfElements | | | swDataDefProps | x |

该规则应在合同阶段生成执行时施加。

[constr_1007] 和 [constr_10433] 的约束特征是:在表单元格为空的交点处,特定 category 值的属性不应存在。

ApplicationDataType 的 SwDataDefProps 允许属性:

| Attributes of SwDataDefProps | Attribute Existence per ApplicationDataType . category |

| | VALUE | | additionalNativeTypeQualifier | | | annotation | * | | baseType | | | compuMethod | 0..1 | | dataConstr . dataConstrRule . physConstrs | 0..1 | | Attributes of SwDataDefProps | Attribute Existence per ApplicationDataType . category | | | VALUE | | dataConstr . dataConstrRule . in- ternalConstrs | d/c 4 | | displayFormat | 0..1 | | displayPresentation | 0..1 | | implementationDataType | | | invalidValue | 0..1 | | stepSize | 0..1 | | swAddrMethod | 0..1 | | swAlignment | | | swBitRepresentation | | | swCalibrationAccess | 0..1 | | swCalprmAxisSet | | | swComparisonVariable | | | swDataDependency | | | swHostVariable | | | swImplPolicy | 0..1 | | swIntendedResolution | 0..1 | | swInterpolationMethod | 0..1 | | swIsVirtual | | | swPointerTargetProps | | | swRecordLayout | 0..1 | | swRefreshTiming | 0..1 | | swTextProps | | | swValueBlockSize | | | swValueBlockSizeMult unit | 0..1 | | valueAxisDataType | |

该规则应在合同阶段生成执行时施加。

该列表使用了本章后续各节中详细解释的 SwDataDefProps 及其他元模型元素。

4 无关紧要(don't care)。

5 这是 [TPS_SWCT_01179] 所要求的。

5.2.4.1. 应用原始数据类型
5.2.4.1.1. 单值的数据类型

与 AUTOSAR 标准先前版本(R3.x)相反,M2 层级上的原始应用数据类型不再被规定。取而代之,元类 ApplicationPrimitiveDataType 结合所附加的 swDataDefProps 在 M2(元)模型层级上使用,以规定 M1 建模层级的细节。

category 在应用层级刻画数据类型的性质:

例如,AUTOSAR R3.x 的 IntegerType 允许规定约束适用值区间的上下限。该方面仍受本版 AUTOSAR 支持,但元模型不同于先前方法。特别是,规定 ApplicationPrimitiveDataType 实际由 “整数” 表示不再被认为重要。

图 5.4 勾勒了现在如何定义限值。关键特性是 AutosarDataType 处 SwDataDefProps 的聚合。元类 SwDataDefProps 允许创建到 DataConstr 的引用,而后者又聚合一个 DataConstrRule。

后者聚合 PhysConstrs,而该元类最终在角色 lowerLimit 和 upperLimit 中拥有两个 Limit。

另一个例子见图 5.5。该图再次利用 SwDataDefProps,展示了如何附加 CompuMethod 和 Unit 形式的语义。

还可以定义 initValue,RTE 用它来初始化在软件组件内本地定义的 VariableDataPrototype/ParameterDataPrototype 的值。

图 5.6(仅适用于线性和有理 CompuMethod)展示了在完全线性或有理换算的情形下 ApplicationDataType、CompuMethod、ImplementationDataType、BaseType 的数据约束之间的关系。

请注意,CompuMethod 与 invalidValue 的关系在第 5.4.2 节详细讨论。

如果 ApplicationPrimitiveDataType 不定义 dataConstr,则可以从 ApplicationDataType 的物理意义导出隐式约束。

例如,如果数据类型表示温度,则下限不可能超过 0K。

对于其他物理意义,隐式假定的限值可能是从 -INF 到 +INF。

为了避免关于限值取值的歧义,强烈建议为 ApplicationPrimitiveDataType 定义合理的限值。

[constr_2544] 界限需要一致

  • ApplicationDataType 的限值应在 CompuMethod 的定义范围内;

CompuMethod 需要适用于 ApplicationDataType 的限值。原因是 ApplicationDataType 限值的内部表示通过应用 CompuMethod 计算。

  • 如此定义的 ApplicationDataType 内部限值应在被映射 ImplementationDataType 的 internalConstrs 之内或等于之;

  • ImplementationDataType 的限值应在 BaseType 大小定义的限值之内或等于之。

该规则应在合同阶段生成执行时施加。

关于可以为数据类型(以及数据原型)定义的属性的更详细描述,见第 5.4 节。invalidValue 的处理在第 5.4.2 节更详细地解释。

Defining the dimension of an ApplicationPrimitiveDataType of category VAL_BLK:

具有多于一个维度、category 为 VAL_BLK 的 ApplicationPrimitiveDataType 应使用属性 SwDataDefProps.swValueBlockSizeMult 描述。

SwDataDefProps . swValueBlockSize and SwDataDefProps . swValueBlockSizeMult 的存在性:

该规则应在合同阶段生成执行时施加。

5.2.4.1.2. 关于枚举

枚举类型的定义:

取而代之,一个离散整数集合可以用作单个 ApplicationPrimitiveDataType、或 category 为 VALUE 的 ImplementationDataType、或归结为 category 为 VALUE 的 ImplementationDataType 的 TYPE_REFERENCE 的结构描述。

在枚举定义范围内整数到标签的映射被视为经由所附加 CompuMethod 的语义定义的一部分,而非结构描述的一部分。

枚举值的规范:

  • ImplementationDataType:如 [constr_1225] 所述,枚举标签的定义应只使用 TextValueSpecification 完成;

  • ApplicationPrimitiveDataType:使用 ApplicationValueSpecification.swValueCont.swValuesPhys.vt 或 ApplicationRuleBasedValueSpecification.swValueCont.ruleBasedValues.arguments.vt。

glyph[floorright](RS_SWCT_03216)

SwDataDefProps 上下文中的相关元类勾勒于图 5.7。这包括所有可能为 C 代码中 CompuScale 符号的定义作出贡献的元类,见 [TPS_SWCT_01431]。

枚举在 ARXML 中样子的示例包含在附录 B.4.1 中。

5.2.4.1.3. 标定参数的数据类型

标定参数的数据类型也描述为原始类型:

不那么明显的是:category 为 VAL_BLK、COM_AXIS、RES_AXIS、CURVE、MAP、CUBOID、CUBE_4 和 CUBE_5 的 ApplicationDataType 并不描述为组合数据类型(就应用层级而言),尽管它们确实拥有某种内部结构。

与 ApplicationCompositeDataType 相反,它们不由其他 AutosarDataType 类似地组合而成。它们的子结构需要专门描述,以便与现有标定技术兼容。

SwDataDefProps 控制标定参数的结构:

关于 SwDataDefProps 这些部分的细节见第 5.4.4 章和 5.5.6 章。

5.2.4.1.4. 文本字符串的数据类型

文本字符串的定义:

该规则应在合同阶段生成执行时施加。

ApplicationPrimitiveDataType 应解释为特定编码的字符串:

SwTextProps . arraySizeSemantics 属性的存在性:

SwTextProps . swMaxTextSize 属性的存在性:

可变大小的字节数组:

A2L 生成也可能需要 SwRecordLayout:

如 [TPS_SWCT_01128] 所述,对 category 为 STRING 的 ApplicationPrimitiveDataType 而言,SwDataDefProps.swRecordLayout 的定义反正被视为强制。

表5.9:SwTextProps(SwTextProps)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This meta-class expresses particular properties applicable to strings in variables or calibration parameters. | | 基类 | ARObject | | 聚合于 | SwDataDefProps.swTextProps |

属性 类型 多重性 种类 备注
arraySize Semantics ArraySizeSemantics Enum 0..1 attr This attribute controls the semantics of the arraysize for 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

表5.10:SwTextProps(SwTextProps)

属性 类型 多重性 种类 备注
swMaxTextSize Integer 0..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

以下一系列 XML 片段示例说明了用于表示文本字符串的数据类型的定义。首先定义适用的 ApplicationPrimitiveDataType(见图 5.8)。

注意,category 设置为值 STRING。此外,ApplicationPrimitiveDataType.swDataDefProps.swTextProps 指示字符串的宽度,并通过(对 baseType 的引用)定义该字符串数据类型预期使用的编码。

另请注意,ApplicationDataType 直接引用(跨实现层级)到 SwBaseType 的事实,是 “ApplicationDataType 不应关心 AUTOSAR 中最低层级数据类型定义” 规则的一个例外。

如果跨接实现层级被接受为 ApplicationDataType 建模的一般模式,那么在某种程度上绕过实现层级将很容易,这会使 ApplicationDataType 的通用性降低。

category 为 STRING 的 ApplicationPrimitiveDataType 需要 SwRecordLayout:

因此,它需要对 SwRecordLayout 定义的引用,该定义预设了创建匹配 ImplementationDataType 的方法。

使用 SwRecordLayout 定义数据类型的示例见附录 B.1.1。

存在 ApplicationPrimitiveDataType.swDataDefProps.swRecordLayout 时 DataTypeMap 是强制的:

[TPS_SWCT_01570] 存在的一个动机是:AUTOSAR ECU 的集成者可以正当地决定采用不同于基于 SwRecordLayout 生成的那个 ImplementationDataType。

5.2.4.2. 应用组合数据类型

ApplicationArrayDataType 与 ApplicationRecordDataType:

如果应用软件既要访问组合体的单个元素、又要对整个组合体执行操作(例如希望在单个事务中通信完整的记录或数组),就需要这样的组合数据类型。

可以组合使用 ApplicationArrayDataType 和 ApplicationRecordDataType:ApplicationArrayDataType 可以定义为 ApplicationRecordDataType 的 ApplicationRecordElement,同样 ApplicationRecordDataType 也可以用作 ApplicationArrayDataType 的基本类型。也可以创建嵌套的 ApplicationCompositeDataType。

关于元类 ApplicationRecordDataType 的细节描绘于图 5.9。

5.2.4.2.1. ApplicationArrayDataType

可配置的数组大小:

为了在软件组件描述中引用 ApplicationArrayDataType 的元素,元素的索引从 0 到 maxNumberOfElements - 1 的值。

表5.11:ApplicationArrayDataType(ApplicationArrayDataType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | An application data type which is an array, each element is of the same application data type. Tags: atp.recommendedPackage=ApplicationDataTypes | | 基类 | ARElement , ARObject , ApplicationCompositeDataType , ApplicationDataType , AtpBlueprint , Atp Blueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dynamicArray SizeProfile String 0..1 attr Specifies the profile which the array will follow if it is a variable size array.
element ApplicationArray Element 0..1 aggr This association implements the concept of an array 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.

ApplicationArrayDataType . element 属性的存在性:

表5.12:ApplicationArrayElement(ApplicationArrayElement)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | Describes the properties of the elements of an application array data type. | | 基类 | ARObject , ApplicationCompositeElementDataPrototype , AtpFeature , AtpPrototype , DataPrototype , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ApplicationArrayDataType.element, AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
arraySize Handling ArraySizeHandling Enum 0..1 attr The way how the size of the array is handled.
arraySize Semantics ArraySizeSemantics Enum 0..1 attr This attribute controls how the information about the array size shall be interpreted.
indexDataType ApplicationPrimitive DataType 0..1 ref This reference can be taken to assign a CompuMethod of 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 Elements PositiveInteger 0..1 attr The maximum number of elements that the array can contain. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

请注意,关于特定 ApplicationArrayDataType 元素数量的信息不是绝对的,而是允许进一步解释。

特定 ApplicationArrayDataType 的元素数量可能在运行时变化:

准确地说,元素数量可能在 0 与 maxNumberOfElements 所示的值之间变化。

为此提供了附加属性 arraySizeSemantics,可用于澄清 maxNumberOfElements 的含义。

为澄清起见,特定 ApplicationArrayDataType 的实际元素数量确实可能为 0,原因仅仅是相应 DataPrototype 是更高层协议的一部分——在某些情况下,为表达给定语义根本不需要 ApplicationArrayDataType 的 DataPrototype。

请注意,定义 maxNumberOfElements 语义含义的能力不仅限于应用数据类型层级。相同的方法也适用于 ImplementationDataType。

表5.13:ArraySizeSemanticsEnum(ArraySizeSemanticsEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | This type controls how the information about the number of elements in an ApplicationArrayDataType is to be interpreted. | | 聚合于 | ApplicationArrayElement.arraySizeSemantics, DiagnosticDataElement.arraySizeSemantics, ImplementationDataTypeElement.arraySizeSemantics, SwTextProps.arraySizeSemantics |

字面值 说明
fixedSize This means that the ApplicationArrayDataType will always have a fixed number of elements. Tags: atp.EnumerationLiteralIndex=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.EnumerationLiteralIndex=1

ApplicationArrayElement 的 category 与角色 type 中引用的 AutosarDataType 应保持同步:

表5.14:ArraySizeHandlingEnum(ArraySizeHandlingEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | This enumeration defines different ways to handle the sizes of variable size arrays. | | 聚合于 | ApplicationArrayElement.arraySizeHandling, ImplementationDataTypeElement.arraySizeHandling |

字面值 说明
allIndicesDifferent ArraySize All elements of the variable size array may have different sizes. Tags: atp.EnumerationLiteralIndex=0
allIndicesSame ArraySize All elements of the variable size array have the same size. Tags: atp.EnumerationLiteralIndex=1

表5.15:ArraySizeHandlingEnum(ArraySizeHandlingEnum)

属性 类型 多重性 种类 备注
inheritedFromArray ElementTypeSize The size of all dimensions of the variable size array is determined by the size of the contained array element. Tags: atp.EnumerationLiteralIndex=2

5.2.4.2.1.1. 可变大小数组

启用大小指示器:

大小指示器应由软件组件更新:

大小指示器应由软件组件读取:

ApplicationArrayElement.arraySizeHandling 的语义:

这允许在多维的情况下规定嵌套可变大小数组大小之间的连贯关系。

借助合适的 ImplementationDataType,可以使其他软件组件、RTE 和其他 BSW 模块利用大小指示器,只把有效数据元素从发送方传输到接收方。

被映射 ImplementationDataType 的内部结构:

被映射 ImplementationDataType 内部结构的 profile:

被映射 ImplementationDataType 内部结构的自定义 profile:

作为定义自定义 profile 或 category 值的一般规则,自定义值应以公司特定前缀开头,以避免与 AUTOSAR 标准后来的扩展冲突。

dynamicArraySizeProfile 用于规定可变大小数组多个维度的元素数量如何关联。它们一方面可以完全独立(VSA_FULLY_FLEXIBLE),或每个维度具有相同数量的有效元素(VSA_SQUARE)。

属性 ApplicationArrayDataType.dynamicArraySizeProfile 与 ApplicationArrayElement.arraySizeHandling 存在的依据:

然而,两者都需要,因为在必须描述多维可变大小数组时必须使用它们。在这种情况下,可能出现多种无法事先规定的大小组合。

ImplementationDataType 必须遵循取决于所选 profile 的某些规则。细节见第 5.2.5 章。

ApplicationArrayDataType 的 profile VSA_LINEAR:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesSameArraySize;

  • ApplicationArrayElement 应由不是定义了属性 dynamicArraySizeProfile 的 ApplicationArrayDataType 的 ApplicationDataType 定义类型。

[constr_1314] 中要求 ApplicationArrayElement 应由不是定义了属性 dynamicArraySizeProfile 的 ApplicationArrayDataType 的 ApplicationDataType 定义类型的部分,基本上归结为简单的解释:可变大小数组数据类型的 “叶” 数据类型可以是除可变大小数组数据类型之外的任何东西。

ApplicationArrayDataType 的 profile VSA_SQUARE:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 不应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 inheritedFromArrayElementTypeSize;

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

被引用的 ApplicationArrayDataType 应经由嵌套 ApplicationArrayDataType(带 ApplicationArrayElement)的链(考虑 “根” ApplicationArrayDataType 的维度数)引用到不是定义了属性 dynamicArraySizeProfile 的 ApplicationArrayDataType 的 ApplicationDataType。

该链中最后一个 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 设置为值 allIndicesSameArraySize。

其前的所有 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 不应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 inheritedFromArrayElementTypeSize;

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

该规则应在合同阶段生成执行时施加。

[constr_1315]、[constr_1316] 和 [constr_1317] 中要求被引用的 ApplicationArrayDataType 应经由嵌套 ApplicationArrayDataType(带 ApplicationArrayElement)的链(考虑 “根” ApplicationArrayDataType 的维度数)引用到不是定义了属性 dynamicArraySizeProfile 的 ApplicationArrayDataType 的 ApplicationDataType 的部分,基本上归结为简单的解释:可变大小数组数据类型的 “叶” 数据类型可以是除可变大小数组数据类型之外的任何东西。

ApplicationArrayDataType 的 profile VSA_RECTANGULAR:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesSameArraySize;

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

被引用的 ApplicationArrayDataType 应经由嵌套 ApplicationArrayDataType(带 ApplicationArrayElement)的链(考虑 “根” ApplicationArrayDataType 的维度数)引用到不是定义了属性 dynamicArraySizeProfile 的 ApplicationArrayDataType 的 ApplicationDataType。

该链中最后一个 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesSameArraySize;

其前的所有 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesSameArraySize;

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

该规则应在合同阶段生成执行时施加。

ApplicationArrayDataType 的 profile VSA_FULLY_FLEXIBLE:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesDifferentArraySize。

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

被引用的 ApplicationArrayDataType 应经由一条嵌套 ApplicationArrayDataType(带 ApplicationArrayElement)的链(考虑 “根” ApplicationArrayDataType 的维度数量)引用到一个不是 ApplicationArrayDataType 的 ApplicationDataType,在那里存在属性 dynamicArraySizeProfile。

该链中最后一个 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesSameArraySize;

其前的所有 ApplicationArrayDataType 应拥有满足以下所有条件的 ApplicationArrayElement:

  • 属性 ApplicationArrayElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ApplicationArrayElement.maxNumberOfElements;

  • 属性 ApplicationArrayElement.arraySizeHandling 应设置为值 allIndicesDifferentArraySize。

  • ApplicationArrayElement 应由 ApplicationArrayDataType 定义类型。

该规则应在合同阶段生成执行时施加。

示例见附录 B.1.3。

5.2.4.2.1.2. 多维数组

多维数组数据类型的定义:

当 ApplicationArrayDataType 映射到 ImplementationDataType 时,这些多维与 category 为 ARRAY 的 ImplementationDataType 的各个维度有明确定义的对应关系。

ApplicationArrayElement 按 ApplicationArrayElement 到 ApplicationArrayDataType 引用的顺序,映射到按 ImplementationDataType 的第一个 ImplementationDataTypeElement 到叶 ImplementationDataTypeElement 顺序排列的 ImplementationDataTypeElement。

换言之,顶层 ApplicationArrayDataType 的 ApplicationArrayElement 对应 ImplementationDataType 的第一个 ImplementationDataTypeElement。

被引用 ApplicationArrayDataType 的 ApplicationArrayElement 按 ApplicationArrayElement 到 ApplicationArrayDataType 引用的顺序对应子 ImplementationDataTypeElement。

多维数组数据类型定义的示例见附录 B.1.5。

5.2.4.2.1.3. 索引数据类型

数组的使用代表一种把具有相同属性的数据分组的优雅方式。通过遍历数组元素,便于以相同方式处理同一功能。

然而,从功能的角度看,每个数组元素可能具有对应用软件可见的不同含义。为了建立这种可见性,可以

利用一种已有机制:category 为 TEXTTABLE 的 CompuMethod。

ApplicationArrayElement.indexDataType 的使用:

ApplicationArrayElement.indexDataType 需要引用 category 为 TEXTTABLE 的 CompuMethod:

该规则应在合同阶段生成执行时施加。

ApplicationArrayElement.indexDataType 引用的 TEXTTABLE 类 CompuMethod 的大小:

该规则应在合同阶段生成执行时施加。

属性 indexDataType 存在时对 ApplicationArrayElement 的要求:

ApplicationArrayElement.indexDataType 定义的示例见附录 B.1.2。

5.2.4.2.2. ApplicationRecordDataType

ApplicationRecordDataType:

ApplicationRecordDataType 范围内每个 ApplicationRecordElement 的 shortName 应唯一。glyph[floorright](RS_SWCT_03216)

表5.16:ApplicationRecordDataType(ApplicationRecordDataType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::Datatypes | | 说明 | An application data type which can be decomposed into prototypes of other application data types. Tags: atp.recommendedPackage=ApplicationDataTypes | | 基类 | ARElement , ARObject , ApplicationCompositeDataType , ApplicationDataType , AtpBlueprint , Atp Blueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
element (ordered) ApplicationRecord Element * aggr Specifies an element of a record. The aggregation of ApplicationRecordElement is subject to variability with the purpose to support the conditional existence of elements inside a ApplicationrecordData Type. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=element.shortName, element.variation Point.shortLabel vh.latestBindingTime=preCompileTime

ApplicationRecordDataType . element 属性的存在性:

表5.17:ApplicationRecordElement(ApplicationRecordElement)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | Describes the properties of one particular element of an application record data type. | | 基类 | ARObject , ApplicationCompositeElementDataPrototype , AtpFeature , AtpPrototype , DataPrototype , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ApplicationRecordDataType.element, AtpClassifier .atpFeature |

表5.18:ApplicationRecordElement(ApplicationRecordElement)

属性 类型 多重性 种类 备注
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. 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.

应用数据类型层级可选元素的定义:

如果该属性未设置或设置为值 false,则相应 ApplicationRecordElement 应被视为强制(mandatory)。

5.2.5. 实现数据类型

5.2.5.1. 概述

引入 ImplementationDataType 是为了优化实现层级数据类型处理的形式支持:

也就是说,ImplementationDataType 在概念上对应于(C)源代码的层级。例如,ImplementationDataType 对软件组件与 RTE 的合同(该术语的解释见 [2])有直接影响。

SwDataDefProps 所有属性的允许存在性和多重性以及其他属性取决于 ImplementationDataType 的 category。

attributes of SwDataDefProps in the context of ImplementationDataType 的存在性:

  • baseType

  • swPointerTargetProps

  • implementationDataType

在合同阶段生成执行时。

ImplementationDataType 适用的 category 值集合有限:

category 为 VALUE 的 ImplementationDataType 不应引用 category 为 VOID 的 SwBaseType:

[constr_10373] 存在的依据:编程语言 C 不支持 void 类型的变量:

void * MyVoidPtr /* 可行 */ void MyVoidVar; /* 不可行!*/

[constr_10434] 依据 category 的 ImplementationDataType 属性的存在性

| Attributes of ImplementationDataType | Attribute Existence per Category |

| | VALUE | | dynamicArraySizeProfile | | | isStructWithOptionalElement | | | typeEmitter | 0..1 | | symbolProps | 0..1 | | swDataDefProps | 0..1 | | subElement | | | subElement . isOptional | | | subElement . arraySize | | | subElement . arraySizeSemantics | | | subElement . arraySizeHandling | | | subElement . arrayImplPolicy | |

该规则应在合同阶段生成执行时施加。

attributes of ImplementationDataTypeElement depending on the category 的存在性:

| Attributes of ImplementationDataTypeElement | Attribute Existence per Category |

| | VALUE | | swDataDefProps | 0..1 | | subElement | | | subElement . isOptional | | | subElement . arraySize | | | subElement . arraySizeSemantics | | | subElement . arraySizeHandling | | | subElement . arrayImplPolicy | |

该规则应在合同阶段生成执行时施加。

[constr_1009]、[constr_10434] 和 [constr_10435] 的约束特征是:在表单元格为空的交点处,特定 category 值的属性不应存在。

适用于 ImplementationDataType 的 SwDataDefProps:

| Attributes of SwDataDefProps | Root Element |

| | ImplementationDataType | | additionalNativeTypeQualifier | x | | annotation | x | | baseType | x | | compuMethod | x | | dataConstr . dataConstrRule . physConstrs | x | | dataConstr . dataConstrRule . internalConstrs | x | | displayFormat | x | | displayPresentation | x | | implementationDataType | x | | invalidValue | x | | stepSize | x | | swAddrMethod | x | | swAlignment | x | | swBitRepresentation | | | swCalibrationAccess | x | | swCalprmAxisSet | | | swComparisonVariable | | | swDataDependency | | | swHostVariable | | | swImplPolicy | x | | swIntendedResolution | | | swInterpolationMethod | | | swIsVirtual | | | Attributes of SwDataDefProps | Root Element | | | ImplementationDataType | | swPointerTargetProps | x | | swPointerTargetProps . swDataDefProps | x | | swPointerTargetProps . functionPointerSignature | x | | swRecordLayout | | | swRefreshTiming | x | | swTextProps | | | swValueBlockSize | | | swValueBlockSizeMult | | | unit | | | valueAxisDataType | |

该规则应在合同阶段生成执行时施加。

SwDataDefProps.implementationDataType 的允许目标:

该规则应在合同阶段生成执行时应用。

该列表使用了本章后续各节中详细解释的 SwDataDefProps 及其他元模型元素。

关于属性 ImplementationDataType.swDataDefProps.compuMethod 适用 category 的规定见第 5.5.1.3.2 节内的 [constr_1158]。

ImplementationDataType 可以表达应用层级上不可用的概念:

  • ImplementationDataType 支持指针的定义

  • 可以像在 typedef 中那样定义 “别名” 名称

  • 可以定义嵌套的 ImplementationDataType,但与为 ApplicationDataType 实现的概念相反,它们实现子元素的直接聚合,而不是应用类型-原型模式。

glyph[floorright](RS_SWCT_03217)

ImplementationDataType 的一般结构勾勒于图 5.12。如果特定 ImplementationDataType 打算定义组合数据类型,则该 ImplementationDataType 聚合 ImplementationDataTypeElement。

表5.19:AbstractImplementationDataType(AbstractImplementationDataType)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | This meta-class represents an abstract base class for different flavors of ImplementationDataType. | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | ImplementationDataType | | 聚合于 | ARPackage.element |

表5.20:ImplementationDataType(ImplementationDataType)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | Describes a reusable data type on the implementation level. This will typically correspond to a typedef in C-code. Tags: atp.recommendedPackage=ImplementationDataTypes | | 基类 | ARElement , ARObject , AbstractImplementationDataType , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , AutosarDataType , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dynamicArray SizeProfile String 0..1 attr Specifies the profile which the array will follow in case this data type is a variable size array.
isStructWith Optional Element Boolean 0..1 attr This attribute is only valid if the attribute category is set to STRUCTURE. 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.
subElement (ordered) ImplementationData TypeElement * aggr Specifies an element of an array, struct, or union data 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: atpSplitable; atpVariation Tags: atp.Splitkey=subElement.shortName, sub Element.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
symbolProps SymbolProps 0..1 aggr This represents the SymbolProps for the Implementation DataType. Stereotypes: atpSplitable Tags: atp.Splitkey=symbolProps.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.

ImplementationDataType 的嵌套定义:

属性 ImplementationDataType.typeEmitter 的使用适用规则:

  • 属性 typeEmitter 未定义;

  • 属性 typeEmitter 设置为 'RTE';

  • 属性 typeEmitter 设置为某个头文件的名称;

  • 属性 typeEmitter 设置为其他任何东西。

设置 typeEmitter 值的后果在 [2] 中解释。

ImplementationDataType 在 AnyInstanceRef 中的使用在 [11] 中详细描述。

表5.21:AbstractImplementationDataTypeElement(AbstractImplementationDataTypeElement)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | This meta-class represents the ability to act as an abstract base class for specific derived meta-classes that support the modeling of ImplementationDataTypes for a particular language binding. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 子类 | ImplementationDataTypeElement | | 聚合于 | AtpClassifier .atpFeature |

表5.22:ImplementationDataTypeElement(ImplementationDataTypeElement)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | 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. | | 基类 | ARObject , AbstractImplementationDataTypeElement , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ImplementationDataType.subElement, ImplementationDataTypeElement.sub Element |

属性 类型 多重性 种类 备注
arrayImplPolicy ArrayImplPolicyEnum 0..1 attr This attribute controls the implementation of the payload of an array. It shall only be used if the enclosing ImplementationDataType constitutes an array.
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 Handling ArraySizeHandling Enum 0..1 attr The way how the size of the array is handled in case of a variable size array.
arraySize Semantics ArraySizeSemantics Enum 0..1 attr This attribute controls the meaning of the value of the array size.

表5.23:ImplementationDataTypeElement(ImplementationDataTypeElement)

属性 类型 多重性 种类 备注
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.
subElement (ordered) ImplementationData TypeElement * aggr Element of an array, struct, or union in case of a nested 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: atpSplitable; atpVariation Tags: atp.Splitkey=subElement.shortName, sub Element.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
swDataDef Props SwDataDefProps 0..1 aggr The properties of this ImplementationDataTypeElement. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps
5.2.5.2. 使用实现数据类型建模类型引用

TYPE_REFERENCE 的性质:

category 为 TYPE_REFERENCE 的 ImplementationDataType 不定义自己的属性:

category 为 TYPE_REFERENCE 的 ImplementationDataType 覆盖被细化 ImplementationDataType 的属性:

如 [constr_1050] 所解释,ImplementationDataType 的兼容性检查要求先解析可能的类型引用,即应在已解析的 ImplementationDataType 上检查兼容性。

CompuMethod and DataConstr for ImplementationDataType s of category TYPE_REFERENCE 的存在性:

该规则应在合同阶段生成执行时施加。

请注意,由于 [constr_1383] 的存在,组合 ImplementationDataType 的元素可以定义各自的 CompuMethod。但不支持定义一个适用于整个组合 ImplementationDataType 的 CompuMethod。

5.2.5.3. 使用实现数据类型建模结构

结构应至少有一个元素:

5.2.5.3.1. 使用 ImplementationDataType 建模可选元素结构

表示可选元素结构的 ImplementationDataType 的定义不应只依赖可选元素的存在。

此外,外围 ImplementationDataType 的定义应通过专用属性 ImplementationDataType.isStructWithOptionalElement 清晰地表达该意图。

ImplementationDataType . isStructWithOptionalElement 的语义:

同样,该属性代表对有意可选性的正式规定,区别于出于不同动机而满足结构要求的 ImplementationDataType。

实现数据类型层级可选元素结构的定义:

如果该属性未设置或设置为值 false,则相应 ImplementationDataTypeElement 应被视为强制。

ImplementationDataTypeElement . isOptional vs. ImplementationDataType . isStructWithOptionalElement 的存在性:

该规则应在合同阶段生成执行时施加。

为了能够生成访问数据类型可选元素的恰当 RTE API,一般而言必须对 ImplementationDataType 的定义施加结构要求。

特别是,在运行时必须存储关于特定 ImplementationDataTypeElement 可用性的信息——该元素在 category 为 STRUCTURE 的 ImplementationDataType 上下文中属性 isOptional 设置为值 true。

表示可选元素结构的 ImplementationDataType 应包含一个表示可用性位域(availability bitfield)的特殊元素。

该位域实现为 uint8 数组,应为结构化数据类型中包含的每个可选元素保存一位。

特别是,表示可选元素结构的 ImplementationDataType 的适用结构要求在以下规范项中描述。

[TPS_SWCT_01774] 带可选元素的 ImplementationDataType 建模

应采取以下方法来建模表示可选元素结构的 ImplementationDataType:

  • 属性 isStructWithOptionalElement 设置为 true 的 ImplementationDataType 的第一个 ImplementationDataTypeElement 应具有 shortName availabilityBitfield。适用 [constr_1638];

  • 该 ImplementationDataTypeElement 的 category 应为 ARRAY;

  • 该 ImplementationDataTypeElement 应把属性 arraySizeSemantics 设置为值 fixedSize;

  • 该 ImplementationDataTypeElement 应在角色 subElement 中聚合另一个 ImplementationDataTypeElement,对其适用以下要求:

  • 该 ImplementationDataTypeElement 的 category 应为 TYPE_REFERENCE,它最终引用一个以某种方式实现无符号字节数组的 ImplementationDataType,例如取名为 uint8 的平台数据类型作为元素类型;

  • 该 ImplementationDataTypeElement 应把属性 arraySize 的值设置为 max(1, ceil(numberOfOptionalElements / 8))。

glyph[floorright](RS_SWCT_03320)

请注意,[TPS_SWCT_01774] 中提到的 numberOfOptionalElements 计算为属性 isOptional 设置为 true 的所有 subElement 之和。

该和只在属性 isOptional 设置为 true 的 subElement 层级上取,而不在下方结构的任何进一步(逻辑)层级上取。

availabilityBitfield 的范围:

可选元素与 availabilityBitfield 定义的示例见第 B.1.8 节。

表示可选元素结构的 ImplementationDataType 的第一个 ImplementationDataTypeElement:

适用进一步的结构要求。

属性 isOptional 设置为 True 的 ImplementationDataTypeElement:

  • VALUE

  • TYPE_REFERENCE

在合同阶段生成执行时。

相反,嵌套结构应通过建模 category 为 TYPE_REFERENCE 的 ImplementationDataTypeElement 来创建,后者又引用 category 为 STRUCTURE 的 ImplementationDataType。

依据:[constr_1639] 的存在简化了可用性位域的概念。

9 这一关系可以用更形式化的方式表达。但在一个已经复杂的规范项中那会是非常繁冗的形式化方式。假定足以传达一般思想即可。

位域应只包含直接子元素可用性的信息,而不包含子结构元素的信息。

通过使用 category TYPE_REFERENCE,确保为子结构生成单独的 category 为 STRUCTURE 的 ImplementationDataType。

由于 AUTOSAR RTE 提供基于 category 为 STRUCTURE 的 ImplementationDataType 访问可用性信息的 API,因此不可能使用带可选元素的匿名结构。

5.2.5.4. 使用实现数据类型建模联合

联合应至少有一个元素:

联合的用例:

  1. 从联合数据类型派生的 DataPrototype 应经由通信网络传输。为此,必须应用包装联合数据类型形式的特殊建模,如 [TPS_SWCT_01700] 所解释。

  2. 从联合数据类型创建的 DataPrototype 在同一 ECU 内部使用,例如作为 PerInstanceMemory、romBlock 或 ramBlock。在这种情况下,联合数据类型的建模不依赖特定约束。

总之,存在联合可用于 PortInterface 的情况,但这些情况限于满足 [constr_1607] 中解释的某些条件。

PortInterface 中只有包装联合数据类型:

  • 用于包装联合数据类型;

  • 用于为不出现在 DataMapping 拥有的 instanceRef 中作为上下文的 PortPrototype 定义类型的 PortInterface。另见 [constr_1441]。

该规则应在合同阶段生成执行时施加。

5.2.5.5. 使用实现数据类型建模数组
5.2.5.5.1. 概述

带数组语义的 ImplementationDataType:

应使用 ImplementationDataType.subElement.arraySize 定义数组的大小:

数组索引的语义:

  • 它应从值 0 开始;

  • 它应到 arraySize - 1 的值为止。

glyph[floorright](RS_SWCT_03217)

arraySize 的值:

该规则应在合同阶段生成执行时施加。

数组大小定义为 ImplementationDataTypeElement 的属性:

它实际定义为描述数组元素的 ImplementationDataTypeElement 的属性(注意,ApplicationArrayDataType 中使用相同的模式)。

因此,如果一个 “结构” 元素表示数组,则这个特定的结构元素由 category 为 ARRAY 的 ImplementationDataTypeElement 给出,后者又聚合另一个(例如 category 为 VALUE 的)ImplementationDataTypeElement 来表示数组元素并包含大小。

指示数组应具有固定大小还是实际大小可能在运行时变化:

ImplementationDataTypeElement . arrayImplPolicy 属性的存在性:

属性 ImplementationDataTypeElement.arrayImplPolicy 的使用对模型语义没有影响,即它不对数组建模施加进一步的条件。

该属性只以生成的 C 代码的形式影响相应数组在编程语言绑定中的实现。

表5.24:ArrayImplPolicyEnum(ArrayImplPolicyEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ImplementationDataTypes | | 说明 | This meta-class provides values to configure the implementation of the payload part of an array. | | 聚合于 | ImplementationDataTypeElement.arrayImplPolicy |

字面值 说明
payloadAsArray This configuration demands the implementation of the payload as an array. Tags: atp.EnumerationLiteralIndex=0
payloadAsPointerTo Array This configuration demands the implementation of the payload as a pointer to an array. Tags: atp.EnumerationLiteralIndex=1
5.2.5.5.2. 使用实现数据类型建模可变大小数组

与 ApplicationDataType 相同,也可以在 ImplementationDataType 中规定可变大小数组的大小指示器,它保存数组有效元素的数量。

关于该主题的更多信息见第 5.2.4.2.1.1 节。

仅用 ImplementationDataType 建模可变大小数组数据类型:

启用大小指示器建模可变大小数组数据类型:

为了正确定义术语,该 ImplementationDataType 应称为 VSA ImplementationDataType。

VSA ImplementationDataType 的结构:

  • 一个表示大小指示器的 ImplementationDataTypeElement,以及

  • 一个表示可变大小数组数据类型载荷的 ImplementationDataTypeElement。

为了正确定义术语,这些 ImplementationDataTypeElement 应分别称为 VSA 大小指示器 ImplementationDataTypeElement 和 VSA 载荷 ImplementationDataTypeElement。

arraySizeHandling 规定大小如何确定:

[TPS_SWCT_01612] 所作的陈述允许在多维的情况下规定嵌套可变大小数组大小之间的连贯性。

被映射 ImplementationDataType 的内部结构:

被映射 ImplementationDataType 内部结构的 profile:

被映射 ImplementationDataType 内部结构的自定义 profile:

出于可读性和可理解性的原因,以下约束只聚焦于可变大小数组数据类型的载荷。对大小指示器另有单独的约束适用。

ImplementationDataType 的 profile VSA_LINEAR:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为 ARRAY;

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

VSA 载荷 ImplementationDataTypeElement 应立即聚合另一个满足以下所有条件的 ImplementationDataTypeElement:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

该规则应在合同阶段生成执行时施加。

ImplementationDataType 的 profile VSA_SQUARE:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

VSA 载荷 ImplementationDataTypeElement 应立即聚合另一个(表示第一维度的)ImplementationDataTypeElement,它应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 inheritedFromArrayElementTypeSize。

聚合链中不终止该链的所有中间 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 inheritedFromArrayElementTypeSize。

聚合链中的终止 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

该规则应在合同阶段生成执行时施加。

ImplementationDataType 的 profile VSA_RECTANGULAR:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

VSA 载荷 ImplementationDataTypeElement 应立即聚合另一个(表示第一维度的)ImplementationDataTypeElement,它应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

聚合链中不终止该链的所有中间 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

聚合链中的终止 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

该规则应在合同阶段生成执行时施加。

ImplementationDataType 的 profile VSA_FULLY_FLEXIBLE:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

VSA 载荷 ImplementationDataTypeElement 应立即聚合另一个(表示第一维度的)ImplementationDataTypeElement,它应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.category 应设置为 STRUCTURE

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesDifferentArraySize。

该 ImplementationDataTypeElement 应聚合另一个满足以下条件的 ImplementationDataTypeElement:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY。

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

聚合链由一对具有以下特征的 ImplementationDataTypeElement 的(可能为空的)序列继续:

  • 该对中的第一个 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.category 应设置为 STRUCTURE;

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesDifferentArraySize;

  • 该对中的第二个 ImplementationDataTypeElement 应满足以下所有条件:

  • 不应定义属性 ImplementationDataTypeElement.arraySizeSemantics;

  • 属性 ImplementationDataTypeElement.category 应设置为值 ARRAY;

  • 不应定义属性 ImplementationDataTypeElement.arraySize;

  • 不应定义属性 ImplementationDataTypeElement.arraySizeHandling。

聚合链中的终止 ImplementationDataTypeElement 应满足以下所有条件:

  • 属性 ImplementationDataTypeElement.arraySizeSemantics 应设置为值 variableSize;

  • 应定义属性 ImplementationDataTypeElement.arraySize;

  • 属性 ImplementationDataTypeElement.arraySizeHandling 应设置为值 allIndicesSameArraySize。

该规则应在合同阶段生成执行时施加。

用于建模可变大小数组数据类型的非终止 ImplementationDataTypeElement 的 category 值的限制:

未定义 dynamicArraySizeProfile 时的大小指示器:

表示可变大小数组数据类型的 ImplementationDataType 的结构:

subElement 在可变大小数组数据类型定义中的角色由 [TPS_SWCT_01618]、[TPS_SWCT_01619]、[TPS_SWCT_01620] 和 [TPS_SWCT_01621] 定义。

dynamicArraySizeProfile 设置为 VSA_LINEAR、VSA_SQUARE 或 VSA_FULLY_FLEXIBLE 时的大小指示器:

这是保存可变大小数组当前有效元素数量的大小指示器。

只存在 ImplementationDataType 时、dynamicArraySizeProfile 设置为 VSA_LINEAR、VSA_SQUARE 或 VSA_FULLY_FLEXIBLE 的大小指示器:

这是保存可变大小数组数据类型当前有效元素数量的大小指示器。

dynamicArraySizeProfile 设置为 VSA_RECTANGULAR 时的大小指示器:

只存在 ImplementationDataType 时、dynamicArraySizeProfile 设置为 VSA_RECTANGULAR 的大小指示器:

dynamicArraySizeProfile 设置为 VSA_RECTANGULAR 时的大小指示器:

该数组保存所有维度的大小指示器。

dynamicArraySizeProfile 的载荷:

category 应设置为 ARRAY,arraySize 应设置为相应 ApplicationArrayDataType 的 maxNumberOfElements。

只存在 ImplementationDataType 时 dynamicArraySizeProfile 的载荷:

可变大小数组定义的多个示例见附录 B.1.3。

也允许 ImplementationDataType 拥有 SwDataDefProps(该特性继承自 AutosarDataType),即它可以定义各种特定的结构和语义属性。[constr_1015] 展示了这里通常会使用哪些 SwDataDefProps。

ImplementationDataType 或所聚合的 ImplementationDataTypeElement 不构成闭合集合:

  1. 对底层 SwBaseType 的引用对应 category VALUE。

  2. SwPointerTargetProps 中对 BswModuleEntry 的引用对应 category FUNCTION_REFERENCE。

  3. SwPointerTargetProps 中的 SwDataDefProps 对应 category DATA_REFERENCE。

  4. 对另一个 ImplementationDataType 的引用对应 category TYPE_REFERENCE。

最终,由这些引用形成的完整树的全部 “叶” 都应终结于 SwBaseType。

5.2.5.6. 使用实现数据类型建模指针

数据指针的定义:

SwPointerTargetProps 允许的 targetCategory:

  • TYPE_REFERENCE

  • FUNCTION_REFERENCE

  • VALUE(仅当 SwPointerTargetProps.swDataDefProps 引用属性 nativeDeclaration 设置为值 'void' 的 SwBaseType 时适用)

该规则应在合同阶段生成执行时施加。

就 AUTOSAR 元模型而言,指向指针的指针原则上可以以两种方式实现:

  1. 定义 category 为 DATA_REFERENCE 的 ImplementationDataType:它在角色 swDataDefProps 中聚合 SwDataDefProps,后者又在角色 swPointerTargetProps 中聚合属性 targetCategory 设置为 TYPE_REFERENCE 的 SwPointerTargetProps,后者又在角色 swDataDefProps 中聚合引用 category 为 DATA_REFERENCE 的 ImplementationDataType 的 SwDataDefProps。

  2. 定义 category 为 DATA_REFERENCE 的 ImplementationDataType:它在角色 swDataDefProps 中聚合 SwDataDefProps,后者又在角色 swPointerTargetProps 中聚合属性 targetCategory 设置为 DATA_REFERENCE(按 [constr_1177] 这是不允许的)的 SwPointerTargetProps,后者又在角色 swDataDefProps 中聚合 SwDataDefProps,后者又在角色 swPointerTargetProps 中聚合引用 category 例如为 VALUE 的 ImplementationDataType 的 SwPointerTargetProps。

指向指针的指针的定义:

(即)category 为 DATA_REFERENCE、在角色 swDataDefProps 中聚合 SwDataDefProps、后者又在角色 swPointerTargetProps 中聚合属性 targetCategory 设置为 DATA_REFERENCE 的 SwPointerTargetProps、后者又在角色 swDataDefProps 中聚合 SwDataDefProps、后者又在角色 swPointerTargetProps 中聚合引用 category 例如为 VALUE 的 ImplementationDataType 的 SwPointerTargetProps 的(ImplementationDataType)。

该规则应在合同阶段生成执行时施加。

为澄清起见,AUTOSAR RTE 反正不支持以方案 2 的方式定义指向指针的指针。无论如何,[constr_1254] 只是在 AUTOSAR 模型层级上反映这一限制。

方案 1(也在图 B.8 中展示)是 AUTOSAR RTE [2] 明确支持的唯一可行方式。

函数指针的定义:

函数指针由 category FUNCTION_REFERENCE 和引用 BswModuleEntry 的关联 SwPointerTargetProps.functionPointerSignature 定义。后者本质上描述一个函数的签名,如 [6] 所解释。

表5.25:SwPointerTargetProps(SwPointerTargetProps)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This element defines, that the data object (which is specified by the aggregating element) contains a reference to another data object or to a function in the CPU code. This corresponds to a pointer in the C-language. The attributes of this element describe the category and the detailed properties of the target which is either a data description or a function signature. | | 基类 | ARObject | | 聚合于 | SwDataDefProps.swPointerTargetProps |

属性 类型 多重性 种类 备注
functionPointer Signature BswModuleEntry 0..1 ref The referenced BswModuleEntry serves as the signature of a function pointer definition. Primary use case: function pointer passed as argument to other function. Tags: xml.sequenceOffset=40
swDataDef Props SwDataDefProps 0..1 aggr The properties of the target data type. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps xml.sequenceOffset=30

表5.26:SwPointerTargetProps(SwPointerTargetProps)

属性 类型 多重性 种类 备注
targetCategory Identifier 0..1 attr This specifies the category of the target: • In case of a data pointer, it shall specify the category of the referenced data. • In case of a function pointer, it could be used to denote the category of the referenced BswModuleEntry. Tags: xml.sequenceOffset=5

请注意,ImplementationDataType 会体现在由该 ImplementationDataType 定义类型的 DataPrototype 所部署到的 RTE 的源代码中。这意味着如果具有相同 shortName 的 ImplementationDataType 被部署到特定 RTE,可能产生命名冲突。

ImplementationDataType 的符号名称:

符号名称通过 ImplementationDataType 在角色 symbolProps 中拥有的元类 SymbolProps 的属性 symbol 提供。

关于 symbolProps 的更多信息请参见图 5.12。

表5.27:ImplementationProps(ImplementationProps)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | Defines a symbol to be used as (depending on the concrete case) either a complete replacement or a prefix when generating code artifacts. | | 基类 | ARObject , Referrable | | 子类 | BswSchedulerNamePrefix, ExecutableEntityActivationReason, SectionNamePrefix, SymbolProps, SymbolicNameProps |

属性 类型 多重性 种类 备注
symbol CIdentifier 0..1 attr The symbol to be used as (depending on the concrete case) either a complete replacement or a prefix.

ImplementationProps . symbol 属性的存在性:

表5.28:SymbolProps(SymbolProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | 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. | | 基类 | ARObject , ImplementationProps , Referrable | | 聚合于 | Allocator.namespace, ApApplicationErrorDomain.namespace, AtomicSwComponentType .symbolProps, CppImplementationDataType .namespace, ImplementationDataType.symbolProps, PortInterface . namespace, SecurityEventDefinition.eventSymbolName |

“typedef” 定义的示例见附录 B.1.6。

5.2.6. 基本类型

5.2.6.1. 总体图景

从术语的角度看,把基本类型定义为 “类型” 稍有误导性:它确实具有类型性质,但不必然代表一个完整规模的数据类型。

在软件域的上下文中,该基本类型不是数据类型的自含定义层级。相反,基本类型(由元类 SwBaseType 表示)的某些属性为实现数据类型的定义提供 “低层” 方面。

然而,在数据类型定义之外还有 AUTOSAR 元模型的其他角落,那里也需要类似的 “低层” 信息,因此 SwBaseType 也被用于这些方面的建模,例如:

  • 映射表和曲线的轴的定义

10 即:贴近裸机。

  • 记录布局的定义

  • 通信总线上信号属性的定义(见 TPS 系统模板 [10])

  • 诊断报文属性的定义(见 TPS 诊断提取模板 [23])

  • 日志和跟踪消息的定义(见 TPS 日志和跟踪提取 [24])

  • 与测量和标定相关属性的定义(见 TPS 基础软件模块描述模板 [6])

BaseTypeDirectDefinition 属性的使用取决于适用领域:

| Attribute of meta-class Base- TypeDirectDefinition | ImplementationDataType |

| baseTypeEncoding | X | | baseTypeSize | X | | byteOrder | X | | memAlignment | X | | nativeDeclaration | X |

SwBaseType 适用领域的多样性(如上一段列表所暗示)也反映在对于每个不同适用领域相关的属性集合上,如 [TPS_SWCT_01875] 所指示。

请注意,在使用 SwBaseType 定义 ImplementationDataType 的上下文中,属性

  • byteOrder

  • memAlignment

只在 ImplementationDataType 表示平台类型(Platform Type)时使用。

在本文档中,SwBaseType 使用的描述聚焦于本文档范围内的适用领域,即:

  • 数据类型的定义

  • 映射表和曲线的轴基点的定义

  • 特定记录布局组的值的定义

  • ComSpec 范围内网络表示的定义

BaseType . baseTypeDefinition 属性的存在性:

SwBaseType 对数据类型定义的适用性:

表5.29:SwBaseType(SwBaseType)

| 包 | M2::MSR::AsamHdo::BaseTypes | | 说明 | This meta-class represents a base type used within ECU software. Tags: atp.recommendedPackage=BaseTypes | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , BaseType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

表5.30:BaseTypeDefinition(BaseTypeDefinition)

| 包 | M2::MSR::AsamHdo::BaseTypes | | 说明 | This meta-class represents the ability to define a basetype. | | 基类 | ARObject | | 子类 | BaseTypeDirectDefinition | | 聚合于 | BaseType .baseTypeDefinition |

表5.31:BaseTypeDirectDefinition(BaseTypeDirectDefinition)

| 包 | M2::MSR::AsamHdo::BaseTypes | | 说明 | This BaseType is defined directly (as opposite to a derived BaseType) | | 基类 | ARObject , BaseTypeDefinition | | 聚合于 | BaseType .baseTypeDefinition |

属性 类型 多重性 种类 备注
baseType Encoding BaseTypeEncoding String 0..1 attr This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. Tags: xml.sequenceOffset=90
Class BaseTypeDirectDefinition
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".
native Declaration NativeDeclarationString 0..1 attr Tags: xml.sequenceOffset=100 This attribute describes the declaration of such a base 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" native Declaration: "unsigned short" Results in typedef unsigned short MyUnsignedInt; If the attribute is not defined the referring Implementation DataTypes will not be generated as a typedef by RTE. If a nativeDeclaration type is given it shall fulfill the characteristic given by basetypeEncoding and baseType Size. This is required to ensure the consistent handling and interpretation by software components, RTE, COM and MCM systems. Tags: xml.sequenceOffset=120

表5.32:BaseTypeEncodingString(BaseTypeEncodingString)

| 包 | M2::MSR::AsamHdo::BaseTypes | | 说明 | This is the string denotion of a BaseType encoding. It may be refined by specific use-cases. Tags: xml.xsd.customType=BASE-TYPE-ENCODING-STRING xml.xsd.type=string |

表5.33:BaseType(BaseType)

| 说明 | This abstract meta-class represents the ability to specify a platform dependent base type. | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 子类 | SwBaseType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
Package M2::MSR::AsamHdo::BaseTypes

表5.34:BaseType(BaseType)

属性 类型 多重性 种类 备注
baseType Definition BaseTypeDefinition 1 aggr This is the actual definition of the base type. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false

聚合 BaseType.baseTypeDefinition 影响两个抽象元类,因此从不直接使用。但为了不破坏派生元类 SwBaseType 和 BaseTypeDirectDefinition 的语义,仍需要一个约束。

5.2.6.2. 类别

SwBaseType 的 category:

category 值为 VOID:

category 值为 FIXED_LENGTH:

5.2.6.3. 原生声明

nativeDeclaration 不存在时:

该规则应在合同阶段生成执行时施加。

[constr_1010] 的后果是:如果 nativeDeclaration 不存在,RTE 生成器将不考虑该 ImplementationDataType 来生成数据类型定义。

不过,编译器肯定能够解析该数据类型,因为它可以回退到平台和标准数据类型头文件中包含的数据类型定义——按 AUTOSAR 标准的规定该头文件必须被包含。

请注意,nativeDeclaration 应产生有效的 C 数据类型符号;无论通过 typedef 还是通过使用整数数据类型的符号来完成,原则上都一样。

当然,使用整数数据类型的符号作为 nativeDeclaration 的值,会增加外围 SwBaseType 能够独立于 typedef 定义(它在给定上下文中可能可用也可能不可用)而使用的可能性。

nativeDeclaration 的适用值:

关于此的更多信息见 [25]。

5.2.6.4. 基本类型大小

SwBaseType 的大小以位规定:

在属性 category 设置为值 ARRAY 的 ImplementationDataType 定义的上下文中,属性 baseTypeSize 的值建模为 ImplementationDataTypeElement 的一部分。

由于 baseTypeSize 的值在 ImplementationDataTypeElement 引用的 SwDataDefProps 的上下文中定义,应当清楚:该值不应确定整个数组以位计的大小。相反,它明确用于规定数组原始元素以位计的大小。

属性 category 设置为值 ARRAY 的 ImplementationDataType 及相应 SwBaseType 的示例定义见附录 B.1.7。

属性 baseTypeEncoding 规定基本类型的值如何编码。

category 设置为 ARRAY 的 ImplementationDataType 上下文中 baseTypeSize 的规定:

11 注意,符号不必由单个记号组成,即无论如何(例如)unsigned char 也被视为整数 C 数据类型的符号。

  • 如果 ImplementationDataTypeElement 表示原始数据类型(即 category 设置为 VALUE,或设置为最终引用 category 为 VALUE 的 ImplementationDataType 的 TYPE_REFERENCE):在 category 设置为 ARRAY 的 ImplementationDataType 定义的上下文中定义的属性 baseTypeSize 的值,适用于数组数据类型的一个元素的大小。

  • 如果 ImplementationDataTypeElement 表示组合数据对象(即表示数组元素的 ImplementationDataTypeElement 的属性 category 设置为 STRUCTURE 或 ARRAY),则属性 baseTypeSize 只应在层级的更深层使用。

  • 如果 ImplementationDataTypeElement 由组合数据类型定义类型(即表示数组元素的 ImplementationDataTypeElement 的属性 category 设置为 TYPE_REFERENCE,其中最终引用 category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType),则属性 baseTypeSize 的定义委托给被引用 ImplementationDataType 的更深层级。

()

请注意,[TPS_SWCT_01861] 中规定的理解在模型经济性方面也有帮助。如果该值要定义整个数组的大小,通常就必须为此创建许多附加的 SwBaseType。

该值按元素给出的事实意味着可以复用很可能已存在的 SwBaseType(因为访问数组的代码反正很可能也需要处理元素数据类型)。

5.2.6.5. 基本类型编码

属性 baseTypeEncoding 规定基本类型的值如何编码。

SwBaseType 支持的值编码:

  • 1C:反码

  • 2C:二进制补码

  • BCD-P:压缩二进制编码十进制

  • BCD-UP:非压缩二进制编码十进制

  • DSP-FRACTIONAL:数字信号处理器

  • SM:符号幅值

  • IEEE754:浮点数

  • ISO-8859-1:单字节编码字符

  • ISO-8859-2:单字节编码字符

  • WINDOWS-1252:单字节编码字符

  • UTF-8:UCS 转换格式 8

  • UTF-16:基于 16 位码元的 Unicode 码点字符编码 [14]

  • UCS-2:通用字符集 2

  • NONE:无符号整数

  • VOID:对应 C 中的 void。此处不正式规定其编码。

  • BOOLEAN:这表示一个要解释为布尔值的无符号整数。当无符号整数的值为 1 时应解释为 true,为 0 时应解释为 false。

实现布尔概念背后常识的相应 AutosarDataType 应引用一个 CompuMethod,即定义一个带两个 CompuScale 的 TEXTTABLE:例如 true -> 1、false -> 0。

请注意,属性 BaseTypeDirectDefinition.baseTypeEncoding 某些值的使用受限制,如 [constr_10383] 所记录。

至少对于软件上下文中 SwBaseType 的使用而言,baseTypeSize 的定义与 baseTypeEncoding 之间存在明显的关系:对某些 baseTypeEncoding 值,baseTypeSize 的定义需要定义一个最小值,见 [TPS_SWCT_01876]。

请注意,仍然可以使用大于所需的对象来存储只占用数据对象一部分的信息。

例 5.1

可以把 UTF-8 编码的信息放入 64 位宽的数据对象。但在这种情况下,64 位对象中实际可用的只有 8 位。其余都浪费了。

作出这种选择的动机可能是底层硬件更快,或也许只具备按字寻址的能力,因此把 UTF-8 信息只存储在单个 8 位宽数据对象中可能不可行。

换言之,使用 64 位数据对象承载 UTF-8 编码的信息并不意味着该对象被 UTF-8 信息填满、从而形成某种 UTF-8 编码信息的数组。

在 AUTOSAR 中,数组必须定义为数组数据类型,即 ApplicationArrayDataType 或属性 category 设置为值 ARRAY 的 ImplementationDataType。

给定 baseTypeEncoding 的 baseTypeSize 最小值:

| baseTypeEncoding | Minimum value of baseTypeSize |

| 1C | 8 | | 2C | 8 | | BCD-P | 8 | | BCD-UP | 8 | | DSP-FRACTIONAL | 8 | | SM | 8 | | IEEE754 | 32 | | ISO-8859-1 | 8 | | ISO-8859-2 | 8 | | WINDOWS-1252 | 8 | | UTF-8 | 8 | | UTF-16 | 16 | | UCS-2 | 16 | | NONE | 8 | | VOID | | | BOOLEAN | 8 |

5.2.6.6. 字节序和内存对齐

memAlignment 和 byteOrder 是平台特定的:

这些属性应视为可选。

如果 SwBaseType 是平台特定的,则构建于其上的 ImplementationDataType 和软件组件描述也变为平台特定。

不过,存在 SwBaseType 无关紧要的用例:特别是在 ECU 特定范围内生成的标定支持格式(它也包含 SwBaseType,见 [6])完全可以是平台特定的。

对于使用值 UTF-16 设置属性 BaseTypeDirectDefinition.baseTypeEncoding 的情形,适用进一步的规定:

attributes of BaseTypeDirectDefinition 的存在性:

在这种情况下 BaseTypeDirectDefinition.byteOrder 的唯一允许值是 mostSignificantByteFirst 和 mostSignificantByteLast。

该规则应在合同阶段生成执行时施加。

已经存在描述 UTF-16 编码字符串中字节序两种可能情形的预定义术语(见 [14])。与此术语的联系由 [TPS_SWCT_01651] 和 [TPS_SWCT_01652] 定义。

表5.35:ByteOrderEnum(ByteOrderEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | When more than one byte is stored in the memory the order of those bytes may differ depending on the architecture of the processing unit. If the least significant byte is stored at the lowest address, this architecture is called little endian and otherwise it is called big endian. ByteOrder is very important in case of communication between different PUs or ECUs. | | 聚合于 | ApSomeipTransformationProps.byteOrder, BaseTypeDirectDefinition.byteOrder, DiagnosticCommon Props.defaultEndianness, ISignalToIPduMapping.packingByteOrder, MultiplexedIPdu.selectorField ByteOrder, PduToFrameMapping.packingByteOrder, SegmentPosition.segmentByteOrder, SOMEIP TransformationDescription.byteOrder, System.containerIPduHeaderByteOrder |

字面值 说明
mostSignificantByte First Most significant byte shall come at the lowest address (also known as BigEndian or as Motorola-Format) Tags: atp.EnumerationLiteralIndex=0
mostSignificantByte Last Most significant byte shall come highest address (also known as LittleEndian or as Intel-Format) Tags: atp.EnumerationLiteralIndex=1
opaque For opaque data endianness conversion has to be configured to Opaque. See AUTOSAR COM Specification for more details. Tags: atp.EnumerationLiteralIndex=2

UTF-16BE:

UTF-16LE:

需要澄清的另一个问题是所谓字节顺序标记(Byte Order Mark, BOM)的使用,它允许(在运行时)直接从 Unicode 字符串的载荷确定实际字节序。

由于 AUTOSAR 具有正式且全面定义任何可在运行时承载字符串的 DataPrototype 字节序的手段,因此没有必要再支持承担同一目的的另一种工具。

UTF-16 编码的字符串不允许以 BOM 开头:

请注意,[TPS_SWCT_01653] 消除了 UTF-16 编码字符串定义与执行中的一种可能冗余。

该冗余不仅被视为不必要,还被视为潜在危险,因为无法在配置时检查定义是否与执行一致。

从形式的角度看,[TPS_SWCT_01653] 虽然被表述为约束,但并不代表实际的约束。

但是,AUTOSAR 工具将无法在配置时正确检查该条件,因此该规则作为规范项发布。

5.2.7. 数据类型术语

存在这样的数据类型用途:一方面需要一个顺手的术语(因为这种数据类型使用频繁),另一方面又无法用元模型元素(如 ApplicationDataType)的简单术语轻易表达。

因此,每次使用这些种类数据类型时都完整精确地描述其特征不是一个选项。术语的定义应把所述各类数据类型与将其用途加以转述的术语关联起来。

5.2.7.1. 原始类型

在某些情况下,需要把数据类型的适用性限制为原始 C 数据类型。在 AUTOSAR 规范中适用该特定限制的每一处都描述合格 AutosarDataType 的特征是可能的。

然而,这可能导致 AUTOSAR 规范内不同地方出现冗长且潜在不一致的描述。因此本章提供原始数据类型的规范定义,可供其他地方引用。

原始数据类型的非递归定义:

  • 它是 category 为 VALUE 或 BOOLEAN 的 ApplicationPrimitiveDataType;

  • 它是 category 为 VALUE 的 ImplementationDataType。

原始数据类型的递归定义:

  • 它是按 [TPS_SWCT_01564] 的 AutosarDataType;

  • 它是 category 为 TYPE_REFERENCE 的 AutosarDataType,在所有类型引用解析后归结为按 [TPS_SWCT_01564] 的 AutosarDataType。

5.2.7.2. 复合原始数据类型

复合原始数据类型:

这意味着 ApplicationPrimitiveDataType 的 swDataDefProps 拥有一个 swRecordLayout,它定义到相应 ImplementationDataType 的映射。

“复合原始数据类型” 的主要特征是:就应用数据类型层而言其数据类型被视为原始数据类型,但就实现数据类型层而言该类型按适用的 SwRecordLayout 实现为组合数据类型。

请注意,在术语复合原始数据类型中强调 “原始” 的主要原因是:复合原始数据类型的用户只能经由返回原始数据类型数据对象的插值方法访问由复合原始数据类型定义类型的对象。

复合原始数据类型关于 invalidValue 定义的属性在第 5.4.2 节描述。

请注意,复合原始数据类型通常以聚焦两个方面的 “测量和标定思维” 创建:

  • 数据语义;

  • 内存布局。

这是 SwRecordLayout 被 ApplicationDataType 引用(从而成为其定义的组成部分)的原因之一。

5.2.7.3. 整数原始类型

SenderReceiverToSignalMapping(见 [10])允许把一段数据整体映射到单个 SystemSignal。AUTOSAR COM 规范 [22] 对适用于整体映射的数据特征施加某些要求。

整数原始类型:

ImplementationDataType 的 category 归结为 VALUE:

  • 其 category 为 VALUE,或为最终归结为 VALUE 的 TYPE_REFERENCE;或

  • 其 category 为 ARRAY 且只有一个 subElement,并适用以下条件之一:

  • subElement.category 设置为 VALUE 或最终归结为 VALUE 的 TYPE_REFERENCE,且 subElement 引用 baseTypeSize 设置为值 8、baseTypeEncoding 设置为 NONE 的 SwBaseType;

  • subElement.category 设置为 TYPE_REFERENCE,且 swDataDefProps.implementationDataType 字面上表示名为 “uint8” 的平台数据类型;

  • subElement.category 设置为 TYPE_REFERENCE,且属性 swDataDefProps.implementationDataType.shortName 设置为 “uint8”,且 swDataDefProps.baseType.baseTypeDefinition.nativeDeclaration 不存在。

该规则应在合同阶段生成执行时施加。

符合整数原始类型的 ApplicationDataType:

  • ApplicationDataType.category 设置为 BOOLEAN、VALUE、STRING 或 ARRAY;

  • 在适用范围内存在引用给定 ApplicationDataType 的 DataTypeMap;

  • 找到的 DataTypeMap 引用满足 [constr_1229] 要求的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

5.2.7.4. 可变大小数组数据类型

术语可变大小数组数据类型的定义及进一步解释见第 2.7 章。

5.2.7.5. 包装联合数据类型

存在经由通信网络发送实际由联合数据类型定义类型的 DataPrototype 的用例。但在这种情况下,不仅需要发送 DataPrototype 本身,还要把关于适用联合成员的信息作为一种 “元数据” 添加到传输中。

借此,发送方可以标识适用的联合成员,接收方可以相应地访问正确的联合元素。

联合数据类型的性质是可执行代码应对称地访问联合,即写入的成员需要被读取;把联合用作 “类型转换器” 的做法极不受欢迎(因为从 ISO-C:99 [26] 的观点看它导致未规定的行为),AUTOSAR 应阻止这种做法。

因此,AUTOSAR 需要考虑这一条件,并为联合数据类型的处理定义特定的建模。

可经由通信网络传输的联合的定义:

  • 联合数据类型绝不应按其本身使用,它应始终被包围在 category 为 STRUCTURE、恰好聚合两个 ImplementationDataTypeElement 的 ImplementationDataType 中:

  • 第一个 ImplementationDataTypeElement 用于标识实际联合数据类型的适用元素;

该元素的 shortName 应设置为 “memberSelector”;它的 category 应为 VALUE,或为最终归结为 category VALUE 的 TYPE_REFERENCE。

此外,它应引用属性 baseTypeEncoding 设置为 NONE、属性 baseTypeSize 设置为值 8、16 或 32 的 SwBaseType。

该 ImplementationDataTypeElement 应称为成员选择器(Member Selector)。

  • 第二个 ImplementationDataTypeElement 的 category 应为 UNION,它表示实际的联合 “载荷”。

  • 成员选择器的目的是标识适用于对联合的给定访问的联合数据类型元素。

如果成员选择器的值设置为 1,则 category 为 UNION 的 ImplementationDataType 的第一个 subElement 适用。

如果成员选择器的值设置为 2,则第二个 subElement 适用,依此类推。

  • 成员选择器的值应在值 1 与 category 为 UNION 的 ImplementationDataTypeElement 的 subElement 数量之间取值。再次强调,索引计数是 1 基的!

  • 显然,用于承载成员选择器的实际数据类型应能够存储对应于 category 为 UNION 的 ImplementationDataTypeElement 的 subElement 数量的值。

  • 适用约束 [constr_1441]。

glyph[floorright](RS_SWCT_03217)

包装联合数据类型:

category TYPE_REFERENCE 不应用于建模包装联合数据类型的 “载荷”:

包装联合数据类型的定义代表了在 AUTOSAR 中应用和通信层级上应如何使用联合数据类型的规范方式。相应地,category 值 UNION 的使用实际上仅限于 ImplementationDataTypeElement。

包装联合数据类型的有限适用性:

目前,AUTOSAR 把联合数据类型的初始化限制为联合数据类型的第一个成员,见 [constr_1445]。

包装联合数据类型定义的简化示例见附录 B.1.4。

该限制的一个明显后果是:对于为初始化包装联合数据类型而取的任何给定 ValueSpecification,成员选择器的值被严格锁定为 1。

包装联合数据类型成员选择器的初始化:

该规则应在合同阶段生成执行时施加。

包装联合数据类型初始化的另一个方面是:除非 “载荷” 部分的第一个元素由组合数据类型定义类型,否则 “载荷” 部分不能作为组合数据类型处理。

换言之,不可能初始化 category 为 UNION 的 ImplementationDataTypeElement 的第一个 subElement。只能为 “载荷” 部分本身指派初始值。

包装联合数据类型 “载荷” 的初始化:

换言之,如果 category 为 UNION 的 ImplementationDataTypeElement 的第一个 subElement 是原始类型,则应使用 NumericalValueSpecification 来初始化该 category 为 UNION 的 ImplementationDataTypeElement。

如果 subElement 由组合数据类型定义类型,则应使用 CompositeValueSpecification 来初始化该 category 为 UNION 的 ImplementationDataTypeElement。

总结初始化问题:包装联合数据类型建模为两个元素的结构,需要一个 RecordValueSpecification,后者聚合两个 ValueSpecification——一个用于成员选择器(它的值只能为 1),一个用于 “载荷”。

第二个 ValueSpecification 的结构取决于用于 “载荷” 第一个元素的数据类型。

5.2.7.6. 可选元素结构

如第 2.8 节已提及,存在包含在给定时间可能存在也可能不存在的可选元素的结构化数据类型的用例。

这些数据类型在 ApplicationDataType 层级和 ImplementationDataType 层级都需要特定的建模。

带可选元素的结构化数据类型:

在 ApplicationDataType 层级,可选元素的存在通过把属性 ApplicationRecordElement.isOptional 设置为 true 来表示。更多细节请参见第 5.2.4.2.2 节。

如何使用 ImplementationDataType 建模可选元素结构的描述见第 5.2.5.3.1 节。

5.2.7.7. Compu Scale 字面量

应用于 ApplicationDataType 的 CompuMethod 可以包括离散点范围(discrete point ranges)。

这意味着(实现侧的)数值与物理侧的文本值相关联。物理侧的值可以有不同的含义,取决于使用的上下文。

已识别的上下文有:

  • 用作所谓 CompuScale 代码符号名称(按 [TPS_SWCT_01569] 定义),或

  • 用作所谓 CompuScale 值符号名称(按 [TPS_SWCT_01696] 定义),或

  • 用作 CompuScale.a2lDisplayText(按第 5.5.1.4 节定义)。

因为有时难以在描述中概括所有适用的上下文,所以认为定义一个充当不同上下文中所有含义之 “基类” 的技术术语是有用的。

该技术术语定义为 Compu Scale 字面量(Compu Scale Literal)。这意味着凡使用术语 Compu Scale Literal 之处,上述任何上下文都可能适用。

5.3. 数据原型

5.3.1. 概述

数据原型实现数据类型的角色:

这正式意味着它与一个数据类型有 is-of-type 关系,通常由另一个元素(例如内部行为或端口接口)聚合。

在元模型中,各种数据原型派生自抽象的 DataPrototype,如图 5.15 所示。

引入这一层次结构的原因是区分 AutosarDataPrototype(它也可用于应用类型和实现类型)与 ApplicationCompositeElementDataPrototype(它限于在应用类型内使用)。

因为这些 DataPrototype 建模为独立的元类,所以可以为它们定义自己的属性(在 M2 上),这些属性(在 M1 模型中)可以扩展或约束已通过相应数据类型设置的属性值。

DataPrototype 聚合自己的一组 SwDataDefProps:

这一机制如果谨慎应用,可以实现数据类型更好的重用,因为它们可以保持不带随上下文而变化或在后续项目阶段才定义的属性。glyph[floorright]()

表5.36:DataPrototype(DataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | Base class for prototypical roles of any data type. | | 基类 | ARObject , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Referrable | | 子类 | ApplicationCompositeElementDataPrototype , AutosarDataPrototype | | 聚合于 | AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
Class DataPrototype (abstract)
swDataDef Props SwDataDefProps 0..1 aggr This property allows to specify data definition properties which apply on data prototype level. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps

表5.37:AutosarDataPrototype(AutosarDataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | Base class for prototypical roles of an AutosarDataType. | | 基类 | ARObject , AtpFeature , AtpPrototype , DataPrototype , Identifiable , MultilanguageReferrable , Referrable | | 子类 | ArgumentDataPrototype, ParameterDataPrototype, VariableDataPrototype | | 聚合于 | AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
type AutosarDataType 0..1 tref This represents the corresponding data type. Stereotypes: isOfType

表5.38:ApplicationCompositeElementDataPrototype(ApplicationCompositeElementDataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | This class represents a data prototype which is aggregated within a composite application data type (record or array). It is introduced to provide a better distinction between target and context in instance Refs. | | 基类 | ARObject , AtpFeature , AtpPrototype , DataPrototype , Identifiable , MultilanguageReferrable , Referrable | | 子类 | ApplicationArrayElement, ApplicationRecordElement | | 聚合于 | AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
type ApplicationDataType 0..1 tref This represents the corresponding data type. Stereotypes: isOfType

第 5.4 章描述元模型这一方面的更多细节。

SwDataDefProps 对 DataPrototype 的适用性:

SwDataDefProps 对 DataPrototype 的适用性记录在 [constr_1007] 中。

更多信息见 [constr_1289] 和 [constr_1288]。

请注意,[constr_1289] 不包括 ApplicationRecordElement 和 ApplicationArrayElement,因为 ApplicationCompositeElementDataPrototype 的这些特化已是 [constr_1007] 的一部分。同样适用于不包括 ImplementationDataTypeElement 的 [constr_1288]。

[constr_1289] 由 ApplicationDataType 定义类型的 DataPrototype 的允许属性与 category 对照

| Attributes of SwDataDefProps | |

| | DataPrototype | | additionalNativeTypeQualifier | | | annotation | x | | baseType | | | compuMethod | | | dataConstr . dataConstrRule . physCon- strs | x | | dataConstr . dataConstrRule . internal- Constrs | x | | displayFormat | x | | displayPresentation | x | | implementationDataType | | | invalidValue | | | stepSize | x | | swAddrMethod | x | | swAlignment | x | | swBitRepresentation | | | swCalibrationAccess | x | | swCalprmAxisSet | | | swCalprmAxisSet . swCalprmAxis / SwAxis- Grouped . swCalprmRef | | | swCalprmAxisSet . swCalprmAxis / SwAx- isIndividual . swVariableRef | | | swCalprmAxisSet . swCalprmAxis / SwAxis- Grouped . sharedAxisType | | | swCalprmAxisSet . swCalprmAxis / SwAx- isIndividual . inputVariableType | | | swCalprmAxisSet . swCalprmAxis / SwAx- | | | swComparisonVariable | | | swDataDependency | x | | swHostVariable | | | swImplPolicy | x | | swIntendedResolution | | | swInterpolationMethod | x | | swIsVirtual | x | | Attributes of SwDataDefProps | Root El. | | | DataPrototype | | swRecordLayout | | | swRefreshTiming | x | | swTextProps | | | swValueBlockSize | | | swValueBlockSizeMult | | | unit | | | valueAxisDataType | |

该规则应在合同阶段生成执行时施加。

()

由 ImplementationDataType 定义类型的 DataPrototype 的允许属性与 category 对照:

| Attributes of SwDataDefProps | Root Element |

| | DataPrototype | | additionalNativeTypeQualifier | | | annotation | x | | baseType | | | compuMethod | | | dataConstr . dataConstrRule . physConstrs | x | | dataConstr . dataConstrRule . internalConstrs | x | | displayFormat | x | | displayPresentation | x | | implementationDataType | | | invalidValue | | | Attributes of SwDataDefProps | Root | | Attributes of SwDataDefProps | x | | swAddrMethod | x | | swAlignment | x | | swBitRepresentation | | | swCalibrationAccess | x | | swCalprmAxisSet | | | swComparisonVariable | | | swDataDependency | | | swHostVariable | | | swImplPolicy | x | | swIntendedResolution | | | swInterpolationMethod | | | swIsVirtual | | | swPointerTargetProps | | | swPointerTargetProps . swDataDefProps | | | swPointerTargetProps . functionPointerSignature | | | swRecordLayout | | | swRefreshTiming | x | | swTextProps | | | swValueBlockSize | | | swValueBlockSizeMult | | | unit | | | valueAxisDataType | |

该规则应在合同阶段生成执行时施加。

派生自 AutosarDataPrototype 的三个非抽象类:

  • client-server 接口中的操作实参(ArgumentDataPrototype);

  • 在运行时由应用软件更改变的量(VariableDataPrototype);

  • 从应用角度看(除标定访问外)恒定的参数(ParameterDataPrototype)。

表5.39:VariableDataPrototype(VariableDataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics. | | 基类 | ARObject , AtpFeature , AtpPrototype , AutosarDataPrototype , DataPrototype , Identifiable , Multilanguage Referrable , Referrable | | 聚合于 | ApplicationInterface.indication, AtpClassifier .atpFeature, BswInternalBehavior.arTypedPerInstance Memory, BswModuleDescription.providedData, BswModuleDescription.requiredData, BulkNvData Descriptor.bulkNvBlock, InternalBehavior .staticMemory, NvBlockDescriptor.ramBlock, NvDataInterface. nvData, SenderReceiverInterface.dataElement, ServiceInterface.event, SwcInternalBehavior.arTypedPer InstanceMemory, SwcInternalBehavior.explicitInterRunnableVariable, SwcInternalBehavior.implicitInter RunnableVariable |

属性 类型 多重性 种类 备注
initValue ValueSpecification 0..1 aggr Specifies initial value(s) of the VariableDataPrototype

表5.40:ParameterDataPrototype(ParameterDataPrototype)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Datatype::DataPrototypes | | 说明 | A ParameterDataPrototype represents a formalized generic piece of information that is typically immutable by the application software layer, but mutable by measurement and calibration tools. ParameterDataPrototype is used in various contexts and the specific context gives the otherwise generic ParameterDataPrototype a dedicated semantics. | | 基类 | ARObject , AtpFeature , AtpPrototype , AutosarDataPrototype , DataPrototype , Identifiable , Multilanguage Referrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, BswInternalBehavior.perInstanceParameter, InternalBehavior .constant Memory, NvBlockDescriptor.romBlock, ParameterInterface.parameter, SwcInternalBehavior.perInstance Parameter, SwcInternalBehavior.sharedParameter |

属性 类型 多重性 种类 备注
initValue ValueSpecification 0..1 aggr Specifies initial value(s) of the ParameterDataPrototype

DataPrototype 可以在不同角色中聚合:

一个例子是 SwcInternalBehavior 在角色 implicitInterRunnableVariable 或 explicitInterRunnableVariable 中对 VariableDataPrototype 的聚合。关于这些用例的更多信息见第 7 章。

VariableDataPrototype 或 ParameterDataPrototype 的 initValue 定义:

这一方面勾勒于图 5.16。

PortInterface 中为 DataPrototype 定义的初始值被忽略:

(初始值被忽略)发生在 PortInterface 内,因为在这种情况下需要经由所谓 ComSpec 的更具体的初始值定义。

更多信息请参见第 4.5 章。

关于 initValue 解释的更多信息见第 5.7 节。

ApplicationArrayElement . maxNumberOfElements 的存在性:

这意味着对于固定大小数组数据类型,应为固定大小数组数据的每个维度定义属性 ApplicationArrayElement.maxNumberOfElements。

5.3.2. 由数组数据类型定义类型的 DataPrototype 的数据约束

存在应当能够从由 ApplicationArrayDataType 或 category 为 ARRAY 的 ImplementationDataType 定义类型的、category 为 ARRAY 的 DataPrototype 引用不同 DataConstr 的情况。

例如,考虑一个 category 为 ARRAY、元素为 uint8 的预定义 AutosarDataType,但没有 DataConstr 的定义。

该 AutosarDataType 通过 category 为 ARRAY 的 DataPrototype 的存在被多次实例化。

派生的每个 category 为 ARRAY 的 DataPrototype 可以有适用于所有元素的各自上下限,例如一个 DataPrototype 的范围是 0..3,另一个对所有元素的范围是 0..7。

例如,当经由网络通信具有不同范围的数组数据时,会出现该用例。

在 category 为 ARRAY 的 DataPrototype 处规定 DataConstr 的动机是:

  • 明确所有派生的 DataPrototype 基于同一 AutosarDataType;

  • 减少模型和代码中 AutosarDataType 的数量;

  • 只在需要处规定一次 DataConstr;

  • 明确所有数组元素具有相同的 DataConstr。

同样的动机也适用于 category 为 ARRAY 的 DataPrototype 的属性 SwDataDefProps.displayFormat 和 SwDataDefProps.stepSize。

AUTOSAR 在以下条件下支持该用例:

SwDataDefProps.dataConstr 的定义取决于数据类型的能力:

该规则应在合同阶段生成执行时施加。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.dataConstr 的优先级遵循 [constr_1015] 中给出的 DataPrototype 从 AutosarDataType 继承的精神。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.dataConstr 优先级:

SwDataDefProps.displayFormat 的定义取决于数据类型的能力:

该规则应在合同阶段生成执行时施加。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.displayFormat 的优先级遵循 [constr_1015] 中给出的 DataPrototype 从 AutosarDataType 继承的精神。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.displayFormat 优先级:

SwDataDefProps.stepSize 的定义取决于数据类型的能力:

(SwDataDefProps.stepSize 适用)于 category 为 ARRAY 的 DataPrototype,如果相应 ApplicationArrayDataType 或 category 为 ARRAY 的 ImplementationDataType 也支持 SwDataDefProps.stepSize 的规定。

该规则应在合同阶段生成执行时施加。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.stepSize 的优先级遵循 [constr_1015] 中给出的 DataPrototype 从 AutosarDataType 继承的精神。

category 为 ARRAY 的 DataPrototype 的 SwDataDefProps.stepSize 优先级:

SwDataDefProps.dataConstr 的定义取决于元素数据类型的能力:

该规则应在合同阶段生成执行时施加。

SwDataDefProps.dataConstr 从数组数据类型到数组元素的继承:

在这种情况下,ApplicationArrayDataType.element 或 ImplementationDataType.subElement 不应拥有自己的 SwDataDefProps.dataConstr。这也适用于多维数组数据类型。

该规则应在合同阶段生成执行时施加。

SwDataDefProps.displayFormat 的定义取决于元素数据类型的能力:

该规则应在合同阶段生成执行时施加。

SwDataDefProps.displayFormat 从数组数据类型到数组元素的继承:

在这种情况下,ApplicationArrayDataType.element 或 ImplementationDataType.subElement 不应拥有自己的 SwDataDefProps.displayFormat。这也适用于多维数组数据类型。

该规则应在合同阶段生成执行时施加。

SwDataDefProps.stepSize 的定义取决于元素数据类型的能力:

该规则应在合同阶段生成执行时施加。

SwDataDefProps.stepSize 从数组数据类型到数组元素的继承:

在这种情况下,ApplicationArrayDataType.element 或 ImplementationDataType.subElement 不应拥有自己的 SwDataDefProps.stepSize。这也适用于多维数组数据类型。

该规则应在合同阶段生成执行时施加。

5.3.3. 对数据原型的引用

本章解释引用 DataPrototype 的各种模式。

对 DataPrototype 的引用可能暗示也可能不暗示使用 instanceRef 的必要性:

(使用 instanceRef 的)用例。为避免这一点,AUTOSAR 为 VariableDataPrototype 和 ParameterDataPrototype 定义了统一的引用实现。

5.3.3.1. AUTOSAR 变量引用

AutosarVariableRef:

  • 对 localVariable 的引用,不需要 AtpInstanceRef;

  • 对 autosarVariable 的引用(涉及 AtpInstanceRef);

  • 对使用组合 ImplementationDataType 实现的 VariableDataPrototype 内部结构的引用。

表5.41:AutosarVariableRef(AutosarVariableRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | This class represents a reference to a variable within AUTOSAR which can be one of the following use cases: localVariable: • localVariable which is used as whole (e.g. InterRunnableVariable, inputValue for curve) autosarVariable: • a variable provided via Port which is used as whole (e.g. dataAccesspoints) • an element inside of a composite local variable typed by ApplicationDatatype (e.g. inputValue for a curve) • an element inside of a composite variable provided via Port and typed by ApplicationDatatype (e.g. inputValue for a curve) autosarVariableInImplDatatype: • an element inside of a composite local variable typed by ImplementationDatatype (e.g. nvramData mapping) • an element inside of a composite variable provided via Port and typed by ImplementationDatatype (e.g. inputValue for a curve) | | 基类 | ARObject | | 聚合于 | InstantiationDataDefProps.variableInstance, NvBlockDataMapping.nvRamBlockElement, NvBlockData Mapping.readNvData, NvBlockDataMapping.writtenNvData, NvBlockDataMapping.writtenReadNvData, RoleBasedDataAssignment.usedDataElement, SwVariableRefProxy.autosarVariable, VariableAccess. accessedVariable |

属性 类型 多重性 种类 备注
autosarVariable DataPrototype 0..1 iref This references a variable which is provided by a port and/or which is part of a CompositeDataType. InstanceRef implemented by: VariableInAtomicSWC TypeInstanceRef
autosarVariable InImplDatatype ArVariableIn ImplementationData InstanceRef 0..1 aggr This is used if the target variable is inside of variableData Prototype typed by an ImplementationDataType.

请注意,只有非常有限的用例允许 AutosarParameterRef(在 AUTOSAR 标准的主动同意下)引用 VariableDataPrototype。

AutosarParameterRef 引用 VariableDataPrototype 的适用性:

表5.42:AutosarVariableRef(AutosarVariableRef)

属性 类型 多重性 种类 备注
localVariable VariableDataPrototype 0..1 ref This reference is used if the variable is local to the current component. It would also be possible to use the instance refence here. Such an instance ref would not have a contextElement, since the current instance is the context. But the local instance is a special case which may provide further optimization. Therefore an explicit reference is provided for this case.

AtpInstanceRef 的建模和语义规则在 [11] 中定义。

AutosarVariableRef 中 autosarVariable 的目标应引用一个变量:

该规则应在合同阶段生成执行时施加。

5.3.3.2. AUTOSAR 参数引用

AutosarParameterRef:

  • 对 localParameter 的引用,不需要 AtpInstanceRef;

  • 对 autosarParameter 的引用(涉及 AtpInstanceRef)。

(SwVariableRefProxy.autosarVariable 应引用)合同阶段生成执行时 SwAxisGrouped 上下文中的(变量)。

例如,如果需要把分组轴存储在变量中以便由专门算法在 ECU 运行时适配该轴,则适用 [constr_1173] 中引用的用例。注意,在 [constr_1173] 不适用的所有情形中,应满足 [constr_2535]。

表5.43:AutosarParameterRef(AutosarParameterRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | 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 | | 基类 | ARObject |

属性 类型 多重性 种类 备注
Aggregated by Attribute InstantiationDataDefProps.parameterInstance, Assignment.usedParameterElement, Type Mult. SwCalprmRefProxy.arParameter Kind ParameterAccess.accessedParameter, RoleBasedData Note
autosar Parameter DataPrototype 0..1 iref This instance reference is used if the calibration parameter is either imported via a port or is part of a composite data structure. InstanceRef implemented by: ParameterInAtomicSWC TypeInstanceRef
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.

AutosarParameterRef 中 autosarParameter 的目标应引用一个参数:

这意味着目标应是 ParameterDataPrototype,或反过来由 ParameterDataPrototype 拥有的 ApplicationCompositeElementDataPrototype。

该规则应在合同阶段生成执行时施加。

5.3.3.3. 建模方法

只要在标量上下文中引用表示数组的模型元素——即当引用要标识特定数组元素时——就应使用属性 Ref.index。

表5.44:Ref(Ref)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This primitive denotes a name based reference. For detailed syntax see the xsd.pattern. • first slash (relative or absolute reference) [optional] • Identifier [required] • a sequence of slashes and Identifiers [optional] This primitive is used by the meta-model tools to create the references. Tags: xml.xsd.customType=REF xml.xsd.pattern=/?[a-zA-Z][a-zA-Z0-9_]{0,127}(/[a-zA-Z][a-zA-Z0-9_]{0,127})* xml.xsd.type=string |

属性 类型 多重性 种类 备注
base Identifier 0..1 attr This attribute reflects the base to be used for this reference. Tags: xml.attribute=true
blueprintValue String 0..1 attr This represents a description that documents how the value shall be defined when deriving objects from the blueprint. Tags: atp.Status=draft xml.attribute=true
index PositiveInteger 0..1 attr This attribute supports the use case to point on specific elements in an array. This is in particular required if arrays are used to implement particular data objects. The counting of array indices starts with the value 0, i.e. the index of the first array element is 0. Tags: xml.attribute=true

这种情形的一个非常典型的例子是:通过使用 index 属性的、对 ApplicationArrayElement 的引用来访问 ApplicationArrayDataType 的元素。

如果访问的上下文已经是标量(例如在 ApplicationRecordDataType 的上下文中访问 ApplicationRecordElement),则 index 属性的使用没有意义;在本性已是标量的上下文中使用属性 index 同样会产生误导,因此被禁止。

属性 Ref.index 的适用性:

  • ApplicationArrayElement

  • AbstractImplementationDataTypeElement 的子类。

该规则应在合同阶段生成执行时施加。

表5.45:ParameterInAtomicSWCTypeInstanceRef(ParameterInAtomicSWCTypeInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements::InstanceRefs Usage | | 说明 | This class implements an instance reference which can be applied for variables as well as for parameters. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | AutosarParameterRef.autosarParameter |

属性 类型 多重性 种类 备注
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextData Prototype (ordered) ApplicationComposite ElementDataPrototype * ref This ist the context in a compositeDataType. Tags: xml.sequenceOffset=40
portPrototype PortPrototype 0..1 ref This is the port providing the variable or the entry point to the variable structure. Tags: xml.sequenceOffset=20
rootParameter DataPrototype DataPrototype 0..1 ref This represents the entry point for references into a CompositeDataType. Tags: xml.sequenceOffset=30
targetData Prototype DataPrototype 0..1 ref This is the target parameter element. Note that this must be nested in ParameterDataPrototype. The target must be one of ParameterDataPrototype, Application CompositeElementDataPrototype. Tags: xml.sequenceOffset=50

注意: 如果 AtpInstanceRef 的目标是 AutosarDataPrototype,则 rootVariableDataPrototype 不应存在。

AutosarVariableRef 和 AutosarParameterRef 的 AtpInstanceRef 的实现,就其对 DataPrototype 的引用而言可能需要一些澄清。

AutosarParameterRef 的实现:

如前所述,特定情形中 AutosarParameterRef 的实现受 [constr_1173] 支配。

rootParameterDataPrototype 的存在性:

  • autosarParameter 的 AutosarDataType 是组合数据类型,且

  • targetDataPrototype 引用 rootParameterDataPrototype 内部的 DataPrototype。

注意: 如果 AtpInstanceRef 的目标是 AutosarDataPrototype,则 rootParameterDataPrototype 不应存在。

AutosarVariableRef 的实现:

rootVariableDataPrototype 的存在性:

  • autosarVariable 的 AutosarDataType 是组合数据类型,且

  • targetDataPrototype 引用 rootVariableDataPrototype 内部的 DataPrototype。

5.3.3.4. 访问由 ImplementationDataType 定义类型的 VariableDataPrototype

元类 ArVariableInImplementationDataInstanceRef 尽管有这个名字,形式上与 AtpInstanceRef 没有关系。因此适用以下定义:

ArVariableInImplementationDataInstanceRef 中的上下文路径:

  • portPrototype;

  • rootVariableDataPrototype;

  • contextDataPrototype 的有序集合;

  • targetDataPrototype

构成从根到由 ImplementationDataType 定义类型的 VariableDataPrototype 内部所指定 dataElement 内层实例的路径。

这一关系也描绘于图 5.20。

引用 ArVariableInImplementationDataInstanceRef.contextDataPrototype 的完整性:

  • 引用 ImplementationDataType 链中每个 category 为 TYPE_REFERENCE 的叶(即聚合元素链的末端)ImplementationDataTypeElement(它不是 targetDataPrototype);

  • 以及引用 ImplementationDataType 链中由 category 为 ARRAY 的 ImplementationDataType 或 ImplementationDataTypeElement 拥有的每个 ImplementationDataTypeElement

从 rootVariableDataPrototype 的 ImplementationDataType 开始,向下到由 targetDataPrototype 的 ImplementationDataType 定义类型(直接或经由 category 为 TYPE_REFERENCE 的 ImplementationDataType 间接)的叶 ImplementationDataTypeElement。

该规则应在合同阶段生成执行时施加。

ArVariableInImplementationDataInstanceRef . contextDataPrototype 的存在性:

在技术上,可以为层级中的一维数组避免上下文。但仍要求上下文,因为这样上下文存在性的规则会简单得多。

证明 ArVariableInImplementationDataInstanceRef 存在必要性的示例见附录 B.1.9。

表5.46:ArVariableInImplementationDataInstanceRef(ArVariableInImplementationDataInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | This class represents the ability to navigate into a data element inside of an VariableDataPrototype which is typed by an ImplementationDatatype. Note that it shall not be used if the target is the VariableDataPrototype itself (e.g. if its a primitive). Note that this class follows the pattern of an InstanceRef but is not implemented based on the abstract classes because the ImplementationDataType isn't either, especially because ImplementationDataType Element isn't derived from AtpPrototype. | | 基类 | ARObject | | 聚合于 | AutosarVariableRef.autosarVariableInImplDatatype, ImplementationDataTypeSubElementRef. implementationDataTypeElement |

属性 类型 多重性 种类 备注
contextData Prototype (ordered) AbstractImplementation DataTypeElement * ref This is a context in case there are subelements with explicit types. The reference has to be ordered to properly reflect the nested structure. Tags: xml.sequenceOffset=30
portPrototype PortPrototype 0..1 ref This is the port providing/receiving the root of the variable Tags: xml.sequenceOffset=10
rootVariable DataPrototype VariableDataPrototype 0..1 ref This refers to the VariableDataPrototype typed by the ImplementationDatatype in which the target can be found. Tags: xml.sequenceOffset=20
targetData Prototype AbstractImplementation DataTypeElement 0..1 ref This reference points to the target ImplementationData TypeElement. Tags: xml.sequenceOffset=40

ArVariableInImplementationDataInstanceRef . targetDataPrototype 的存在性:

5.3.3.5. 访问由 ImplementationDataType 定义类型的 ParameterDataPrototype

请注意,访问由 ImplementationDataType 定义类型的嵌套 ParameterDataPrototype 的内部,几乎与访问由 ImplementationDataType 定义类型的 VariableDataPrototype 的内部方式相同。

ArParameterInImplementationDataInstanceRef 中的上下文路径:

  • portPrototype;

  • rootParameterDataPrototype;

  • contextDataPrototype 的有序集合;

  • targetDataPrototype

构成从根到由 ImplementationDataType 定义类型的 ParameterDataPrototype 内部所指定参数内层实例的路径。

这一关系也描绘于图 5.21。

引用 ArParameterInImplementationDataInstanceRef.contextDataPrototype 的完整性:

  • 引用 ImplementationDataType 链中每个 category 为 TYPE_REFERENCE 的叶(即聚合元素链的末端)ImplementationDataTypeElement(它不是 targetDataPrototype);

  • 以及引用 ImplementationDataType 链中由 category 为 ARRAY 的 ImplementationDataType 或 ImplementationDataTypeElement 拥有的每个 ImplementationDataTypeElement

从 rootParameterDataPrototype 的 ImplementationDataType 开始,向下到由 targetDataPrototype 的 ImplementationDataType 定义类型(直接或经由 category 为 TYPE_REFERENCE 的 ImplementationDataType 间接)的叶 ImplementationDataTypeElement。

该规则应在合同阶段生成执行时施加。

ArParameterInImplementationDataInstanceRef . contextDataPrototype 的存在性:

在技术上,可以为层级中的一维数组避免上下文。但仍要求上下文,因为这样上下文存在性的规则会简单得多。

表5.47:ArParameterInImplementationDataInstanceRef(ArParameterInImplementationDataInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | This class represents the ability to navigate into an element inside of an ParameterDataPrototype typed by an ImplementationDatatype. Note that it shall not be used if the target is the ParameterDataPrototype itself (e.g. if the target is a primitive data type). Note that this class follows the pattern of an InstanceRef but is not implemented based on the abstract classes because the ImplementationDataType isn't either, especially because ImplementationDataType Element (intentionally) isn't derived from AtpPrototype. | | 基类 | ARObject | | 聚合于 | ImplementationDataTypeSubElementRef.parameterImplementationDataTypeElement |

属性 类型 多重性 种类 备注
contextData Prototype (ordered) AbstractImplementation DataTypeElement * ref This is a context in case there are subelements with explicit types. The reference has to be ordered to properly reflect the nested structure.
portPrototype PortPrototype 0..1 ref This reference points to the PortPrototype providing/ receiving the root of the parameter.
rootParameter DataPrototype ParameterData Prototype 0..1 ref This refers to the ParameterDataPrototype typed by the implementationDataType in which the target can be found.
targetData Prototype AbstractImplementation DataTypeElement 0..1 ref This reference points to the target ImplementationData TypeElement.

reference ArParameterInImplementationDataInstanceRef . targetDataPrototype 的存在性:

5.4. 数据定义的属性

5.4.1. 概述

如前几章所示,各种属性和关联可以附加到数据类型以及原型的定义上。它们由元类 SwDataDefProps 描述,它从各个方面涵盖特定数据对象的全部属性。

一般而言,SwDataDefProps 内规定的属性可以应用于软件组件模板以及基础软件模块描述模板内声明的所有种类的数据,例如组件本地数据、用于通信的数据、用于测量以及标定的数据。

但是,属性依据数据的角色存在约束:

在 ComSpec networkRepresentation(它可在若干角色和不同上下文中配置)上下文中使用 SwDataDefProps,实现了编入 [constr_1015] 的依赖图中的一处 “分叉”,该 “分叉” 不应影响 ComSpec networkRepresentation 列左侧的元素。

[constr_1015] SwDataDefProps 的优先级排序

| Attributes of SwDataDefProps | Usage For |

| additionalNativeTypeQualifier | RTE | | | x | | annotation | | | baseType | x | | compuMethod | x | | dataConstr | x | | displayFormat | | | displayPresentation | x | | implementationDataType | x | | invalidValue | x | | stepSize | | | swAddrMethod | x | | swAlignment | x | | swBitRepresentation | | | Attributes of SwDataDefProps | Usage For | | | RTE x | | swCalibrationAccess | | | swCalprmAxisSet | x | | swCalprmAxisSet . swCalprmAxis / SwAxisGrouped . swCalprmRef | | | swCalprmAxisSet . swCalprmAxis / SwAxisIndividual . swVariableRef | | | swCalprmAxisSet . swCalprmAxis / SwAxisGrouped . sharedAxisType | | | swCalprmAxisSet . swCalprmAxis / SwAxisIndividual . inputVariableType | | | swCalprmAxisSet / SwAxisIndividual . unit | | | swComparisonVariable | | | swDataDependency | | | swHostVariable | | | swImplPolicy | x | | swIntendedResolution | | | swInterpolationMethod | | | swIsVirtual | | | swPointerTargetProps | | | swRecordLayout | x | | swRefreshTiming | | | swTextProps | | | swValueBlockSize | | | swValueBlockSizeMult | | | unit | | | valueAxisDataType | |

该规则应在合同阶段生成执行时施加。

请注意,[constr_1015] 中的空表单元格表示不适用的设置。以下图例适用于非空表单元格:

14 swIntendedResolution 只在数据类型定义的早期阶段使用,即在所谓蓝图(blueprint)定义的上下文中。就此而言,swIntendedResolution 表示一个非约束性需求,后续在定义合适 CompuMethod 时应予以考虑。

  • D:独立于左侧设置定义该属性。

  • A(添加):只适用于属性上多重性大于 1 的情形:如果属性已在左侧定义,则对该属性的任何附加定义都会加入已有的集合。如果属性未在左侧定义,则可以定义该属性。

  • I(继承):为本元素范围内的使用从左侧继承定义。

  • M(无意义):属性在本元素范围内无意义。工具应不加警告地忽略这样的属性。

  • C(约束):这意味着左侧元素约束右侧元素。

  • AI:如果属性已在左侧定义,则不重定义该属性,而是添加与实现相关的信息。

例 5.2

category 为 BOOLEAN 的 ApplicationDataType 支持定义自己的 CompuMethod 来规定例如 (ON, OFF)、(HIGH, LOW) 或 (PASSED, FAILED) 的语义,只要值的数量匹配且应用层级与实现层级上存在匹配的值对。相比之下,相应的 ImplementationDataType 在上述任何情形中都使用 (true, false) 作为适用的字面量。

  • S(自含):基于左侧创建 “自含” 的工件。

例 5.3

在 category 为 ECU_EXTRACT 的 System 上下文中定义的 CompuMethod 会被复制到 McSupportData 的单独工件中,引用需要更新到该副本。

用例:为 McDataGenerator 提供单个自含文件以完成其工作。

某些属性名称包含术语 “variable” 或 “calprm”,这源于历史原因,可视为该属性最可能适用于何处的某种提示。

在提到 swCalprmAxisSet.swCalprmAxis 内容的表行中使用 “/”——特别是 SwAxisGrouped.swCalprmRef 和 SwAxisGrouped.sharedAxisType,或 SwAxisIndividual.swVariableRef、SwAxisIndividual.unit 和 SwAxisIndividual.inputVariableType——表示一种 “捷径”,它掩盖了 SwCalprmAxis 建模的一个特定方面,该方面在

15 在 ASAM 和 MSR 之初,测量和标定参数(特征量)是分离的,属性随时间推移被合并。

模型中可见但不出现在 AUTOSAR XML 模式中,见图 5.22(它包含表条目中提到的所有元类和角色)。

特别是,该 “捷径” 影响元类 SwCalprmAxisTypeProps 的存在及其在角色 SwCalprmAxis.swCalprmAxisTypeProps 中的聚合。如图 5.22 所描绘,SwCalprmAxisTypeProps 充当 SwAxisGrouped 和 SwAxisIndividual 两者的抽象基类。

然而,在符合 AUTOSAR XML 模式的 ARXML 文件中,SwAxisGrouped 和 SwAxisIndividual 都作为 SwCalprmAxis 的直接子元素出现。

元模型与 AUTOSAR XML 模式之间的这一差异由聚合 SwCalprmAxis.swCalprmAxisTypeProps 处一组标签的存在解释。这些标签如何影响模式生成的细节在 TPS XML Schema Production Rules [27] 中解释。

总之,表行中的 “捷径” 只是近似 ARXML 中的情形,而不反映 AUTOSAR 元模型中的实际建模。

应用软件中使用的 DataPrototype 不应由 C 枚举定义类型:

swComparisonVariable 的语义:

通过显示输入值和比较值,标定工程师可以看到当前工作点是在曲线规定阈值之上还是之下。例如,在规定依温度而变的换挡阈值-发动机转速的曲线中,发动机转速可以显示为 “comparisonVariable”。

这些变量可用于在 MCD 系统当前显示的标定参数(特征量)的值轴上显示一个变量的值。

目的是把相关标定参数的适当结果与计算得到或取自传感器的值(比较变量)进行比较。

因此,这个比较变量的唯一目的是服务于标定过程。

表5.48:SwDataDefProps(SwDataDefProps)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This class is a collection of properties relevant for data objects under various aspects. One could consider this class as a "pattern of inheritance by aggregation". The properties can be applied to all objects of all classes in which SwDataDefProps is aggregated. Note that not all of the attributes or associated elements are useful all of the time. Hence, the process definition (e.g. expressed with an OCL or a Document Control Instance MSR-DCI) has the task of implementing limitations. SwDataDefProps covers various aspects: • Structure of the data element for calibration use cases: is it a single value, a curve, or a map, but also the recordLayouts which specify how such elements are mapped/converted to the DataTypes in the programming language (or in AUTOSAR). This is mainly expressed by properties like swRecordLayout and swCalprmAxisSet • Implementation aspects, mainly expressed by swImplPolicy, swVariableAccessImplPolicy, swAddr Method, swPointerTagetProps, baseType, implementationDataType and additionalNativeTypeQualifier • Access policy for the MCD system, mainly expressed by swCalibrationAccess • Semantics of the data element, mainly expressed by compuMethod and/or unit, dataConstr, invalid Value • Code generation policy provided by swRecordLayout Tags: vh.latestBindingTime=codeGenerationTime | | 基类 | ARObject | | 聚合于 | AutosarDataType .swDataDefProps, CompositeNetworkRepresentation.networkRepresentation, Data Prototype .swDataDefProps, DataPrototypeTransformationProps.networkRepresentationProps, DiagnosticDataElement.swDataDefProps, DiagnosticEnvDataElementCondition.swDataDefProps, Dlt Argument.networkRepresentation, FlatInstanceDescriptor.swDataDefProps, ImplementationDataType Element.swDataDefProps, InstantiationDataDefProps.swDataDefProps, ISignal.networkRepresentation Props, McDataInstance.resultingProperties, ParameterAccess.swDataDefProps, PerInstanceMemory.sw DataDefProps, ReceiverComSpec .networkRepresentation, SenderComSpec .networkRepresentation, SomeipDataPrototypeTransformationProps.networkRepresentation, SwPointerTargetProps.swDataDef |

属性 类型 多重性 种类 备注
additionalNative TypeQualifier NativeDeclarationString 0..1 attr This attribute is used to declare native qualifiers of the 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
Class <> SwDataDefProps
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.
display Presentation DisplayPresentation Enum 0..1 attr This attribute controls the presentation of the related data for measurement and calibration tools.
implementation DataType AbstractImplementation DataType 0..1 ref This association denotes the ImplementationDataType of 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
Class <> SwDataDefProps
swAlignment AlignmentType 0..1 attr The attribute describes the intended typical alignment of the DataPrototype. If the attribute is not defined the alignment is determined by the swBaseType size and the memoryAllocationKeywordPolicy of the referenced Sw AddrMethod. Tags: xml.sequenceOffset=33
swBit Representation SwBitRepresentation 0..1 aggr Description of the binary representation in case of a bit variable. Tags: xml.sequenceOffset=60
swCalibration Access SwCalibrationAccess Enum 0..1 attr Specifies the read or write access by MCD tools for this data object. Tags: xml.sequenceOffset=70
swCalprmAxis Set SwCalprmAxisSet 0..1 aggr This specifies the properties of the axes in case of a curve or map etc. This is mainly applicable to calibration parameters. Tags: xml.sequenceOffset=90
swComparison Variable SwVariableRefProxy * aggr Variables used for comparison in an MCD process. Tags: xml.sequenceOffset=170 xml.typeElement=false
swData Dependency SwDataDependency 0..1 aggr Describes how the value of the data object has to be 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 Resolution Numerical 0..1 attr The purpose of this element is to describe the requested 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 Method Identifier 0..1 attr This is a keyword identifying the mathematical method to be applied for interpolation. The keyword needs to be related to the interpolation routine which needs to be invoked.

表5.49:SwDataDefProps(SwDataDefProps)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This string contains a native data declaration of a data type in a programming language. It is basically a string, but white-space shall be preserved. Tags: xml.xsd.customType=NATIVE-DECLARATION-STRING xml.xsd.type=string xml.xsd.whiteSpace=preserve |

属性 类型 多重性 种类 备注
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:
swPointerTarget Props SwPointerTargetProps 0..1 aggr Specifies that the containing data object is a pointer to another data object. Note: This atpSplitable property has no atp.Splitkey due to atpVariation (PropertySetPattern). Stereotypes: atpSplitable Tags: xml.sequenceOffset=280
swRecord Layout SwRecordLayout 0..1 ref Record layout for this data object. Tags: xml.sequenceOffset=290
swRefresh Timing MultidimensionalTime 0..1 aggr This element specifies the frequency in which the object 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 Size Numerical 0..1 attr This represents the size of a Value Block Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=80
swValueBlock SizeMult (ordered) Numerical * attr This attribute is used to specify the dimensions of a value block (VAL_BLK) for the case that that value block has 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 Type ApplicationPrimitive DataType 0..1 ref The referenced ApplicationPrimitiveDataType represents 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

表5.50:SwBitRepresentation(SwBitRepresentation)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | SwDataDefProps.swBitRepresentation |

属性 类型 多重性 种类 备注
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

表5.51:DisplayFormatString(DisplayFormatString)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | 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: %[flags] [width] [.prec] type character Due to the numerical nature of value settings, only the following type characters are allowed: • d: Signed decimal integer • i: Signed decimal integer • o: Unsigned octal integer • u: Unsigned decimal integer • x: Unsigned hexadecimal integer, using "abcdef" • X: Unsigned hexadecimal integer, using "ABCDEF" • e: Signed value having the form [-]d.dddd e [sign]ddd where d is a single decimal digit, dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or - • E: Identical to the e format except that E rather than e introduces the exponent • 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 glyph[triangleinv] |

属性 类型 多重性 种类 备注
Primitive DisplayFormatString
glyph[triangle] • 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) • b: binary number without prefix or suffix, e.g. 110 • B: binary number with suffix capital B, e.g. 110B Tags: xml.xsd.customType=DISPLAY-FORMAT-STRING xml.xsd.pattern=%[ -+#]?[0-9]*(.[0-9]+)?[bBdiouxXfeEgGcs] xml.xsd.type=string

表5.52:Annotation(Annotation)

| 包 | M2::MSR::Documentation::Annotation | | 说明 | This is a plain annotation which does not have further formal data. | | 基类 | ARObject , GeneralAnnotation | | 聚合于 | EcucAbstractReferenceValue .annotation, EcucParameterValue .annotation, HwAttributeValue.annotation, Identifiable .annotation, PostBuildVariantCriterionValue.annotation, SwDataDefProps.annotation, Sw SystemconstValue.annotation |

swComparisonVariable 背后的含义描绘于图 5.23。图例:tx 表示当前温度,tmot 表示电机温度。

V 表示 MCD 系统中为比较而显示的当前车速:这就是 swComparisonVariable。

同样,Vs 表示随温度变化的车速特征曲线。

表5.53:SwCalibrationAccessEnum(SwCalibrationAccessEnum)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | Determines the access rights to a data object w.r.t. measurement and calibration. | | 聚合于 | ModeDeclarationGroupPrototype.swCalibrationAccess, SwCalprmAxis.swCalibrationAccess, SwData DefProps.swCalibrationAccess |

字面值 说明
notAccessible The element will not be accessible via MCD tools, i.e. will not appear in the ASAP file. Tags: atp.EnumerationLiteralIndex=0
readOnly The element will only appear as read-only in an ASAP file. Tags: atp.EnumerationLiteralIndex=1
readWrite The element will appear in the ASAP file with both read and write access. Tags: atp.EnumerationLiteralIndex=2

SwDataDefProps 应用的优先级规则:

更正式地,这类属性的优先级是:

  1. 定义在 ApplicationDataType 上的 SwDataDefProps 属性,它可能被以下覆盖:

  2. 定义在 ImplementationDataType 上的 SwDataDefProps 属性,它可能被以下覆盖:

  3. 定义在 DataPrototype 上的 SwDataDefProps 属性,它可能被以下覆盖:

  4. 定义在 InstantiationDataDefProps 上的 SwDataDefProps 属性,它可能被以下覆盖:

  5. 定义在 ParameterAccess 或 Argument 上的 SwDataDefProps 属性,它可能被以下覆盖:

  6. 定义在 FlatInstanceDescriptor 上的 SwDataDefProps 属性,它可能被以下覆盖:

  7. 定义在 McDataInstance 上的 SwDataDefProps 属性。

glyph[floorright]()

注意,关于 SwDataDefProps 适用属性的细节见 [constr_1015]。

用于支持标定和测量的 SwDataDefProps:

该用例在 [6] 中进一步解释。由于这些数据由 RTE 生成,它们将按上面给出的优先级使用属性的一个副本。

不过,即使在这个位于 RTE 生成之后的用例中,也可能添加至今未定义的、与 MCD 系统相关的属性。

例如,这适用于属性 swRefreshTiming,它表示与测量系统相关的时序信息;该信息可能在流程链中相当晚才设置。

显然,这样的覆盖并非在所有情形下都适用。特别是,涵盖结构的属性不应在 DataPrototype 上重定义。实现策略、语义和代码生成策略可以在考虑兼容性规则的前提下更改。

MCD 系统的访问策略是最可能在 DataPrototype 上、甚至在实例化层级上重定义的对象。

第 5.4.3 节描述 SwDataDefProps 如何用于测量目的,而第 5.4.4 节描述基于 SwDataDefProps 与 DataPrototype 组合的特征曲线的构造。

第 2.2.2 节描述可以在哪些上下文中定义标定参数。最后,第 2.2.3、7.5.4、5.5.5 节展示标定参数如何在 RunnableEntity 中使用,并展示与实际 ECU 实现的联系。

表5.54:SwImplPolicyEnum(SwImplPolicyEnum)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | Specifies the implementation strategy with respect to consistency mechanisms of variables. | | 聚合于 | BswInternalTriggeringPoint.swImplPolicy, InternalTriggeringPoint.swImplPolicy, SwDataDefProps.sw ImplPolicy, Trigger.swImplPolicy |

字面值 说明
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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=4

[constr_10099] 属性 SwDataDefProps.swImplPolicy 的允许值与 DataPrototype 及其角色的对照

| Attribute of SwImplPolicyEnum | VariableDataPrototype |

| | VariableDataPrototype in SenderReceiverInterface | | const | NA | | fixed | NA | | measurementPoint | x | | queued | x | | standard | x |

该规则应在合同阶段生成执行时施加。

[constr_10099] 中实现的限制反映了这样一个事实:并非所有可能的实现策略对所有种类的 DataPrototype 都有用或受支持。

请注意,如 [constr_1017] 所述,swImplPolicy 的使用在与属性值 swCalibrationAccess 的组合中受到进一步约束。

以下设置适用于 [constr_10099] 所包含的表:

x:属性适用于在本元素范围内的使用。

NA:属性不适用于在本元素范围内的使用。

SenderReceiverInterface 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

NvDataInterface 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 ramBlock 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 implicitInterRunnableVariable 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 explicitInterRunnableVariable 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 arTypedPerInstanceMemory 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 staticMemory 中 VariableDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

ParameterInterface 中 ParameterDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 romBlock 中 ParameterDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 sharedParameter 中 ParameterDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 perInstanceParameter 中 ParameterDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

角色 constantMemory 中 ParameterDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

ArgumentDataPrototype 的 swImplPolicy:

该规则应在合同阶段生成执行时施加。

属性 swImplPolicy 的默认值:

请注意,SwDataDefProps 的 “设置位置” 中列出的位置在 [constr_1015] 中描述。

5.4.2. 无效值

图 5.5 表明,除经由 compuMethod 定义的语义(在第 5.5.1 章下文解释)之外,还可以规定 invalidValue。这是 VFB [3] 的要求,允许表达用哪个特定值来指示失效。

invalidValue 的定义与 CompuMethod(见第 5.5.1 节)的关系见图 5.25、5.26 和 5.27。

图 5.25 描绘了 invalidValue 可以在相应 CompuMethod 边界之内或之外定义(有不同后果,见 [TPS_SWCT_01834] 和 [TPS_SWCT_01835])的可能性。

图 5.26 和图 5.27 描绘了混合 CompuMethod 情形下的类似情况,其中 invalidValue 定义在 CompuMethod 的离散部分。

图 5.26 勾勒了 CompuMethod 具有线性和离散部分、且 invalidValue 经由 CompuMethod 离散部分中定义的一个值来规定的情形。

如 [TPS_SWCT_01834] 所述,在这种情况下 invalidValue 应在物理域中定义。换言之,invalidValue 应按 [TPS_SWCT_01432] 由一个符号定义。

由于 invalidValue 定义在混合 CompuMethod 的范围之内,invalidValue 对软件组件可见。

另一方面,图 5.27 勾勒了 CompuMethod 具有线性和离散部分、且 invalidValue 既不在定义的线性区间之内、也不经由 CompuMethod 离散部分的一个值来规定的情形。

如 [TPS_SWCT_01835] 所述,在这种情况下 invalidValue 应在内部域中定义。换言之,invalidValue 应由 NumericalValueSpecification 定义。

由于 invalidValue 定义在混合 CompuMethod 的范围之外,invalidValue 对软件组件不可见(因此不可访问)。

图 5.25、5.26 和 5.27 中图示的结论总结于以下列表:

  • [TPS_SWCT_01432] compuMethod 界限之外的 invalidValue 需要由 RTE 处理:如果属性 invalidValue 的值在 compuMethod 定义的界限范围之外,则它对通信的软件组件不可见(未知、透明)。在这种情况下,invalidValue 的处理由 RTE 完成。

发送方必须使用 RTE 的失效 API。接收软件组件可以使用数据接收状态,或分别使用 DataReceiveErrorEvent / DataReceivedEvent 来判定所收数据的有效性。

或者,可以把接收软件组件设计为:在数据失效时依赖 initValue 的接收作为默认值。

invalidValue 在 compuMethod 的范围之外:

由于 [TPS_SWCT_01834] 和 [TPS_SWCT_01835] 的存在,invalidValue 的定义是完整规定的,因此 [constr_1221] 不适用于这种情况。

  • [TPS_SWCT_01434] compuMethod 界限之内的 invalidValue 由软件组件处理:如果 invalidValue 在 compuMethod 定义的界限范围之内,则它对通信的软件组件可见(已知)。在这种情况下,软件组件可以直接读写该值。

如果发送方和接收方在一个较大的数据结构上计算校验和以实现端到端通信保护,情况尤其如此。

为确保校验和的完整性,要求由发送组件直接设置无效值,并且不变地接收无效值。

invalidValue 在 compuMethod 的范围之内:

意味着 ApplicationValueSpecification 的值应处于 swDataDefProps.compuMethod.compuPhysToInternal.compuContent.compuScale.lowerLimit 或 upperLimit 定义的边界之内,或处于基于 swDataDefProps.compuMethod.compuInternalToPhys.compuContent.compuScale.lowerLimit 或 upperLimit 定义的边界的相反情形。:

不同的接收方要求对数据失效的不同处理:

category 为 STRING 的 ApplicationPrimitiveDataType 的 invalidValue 处理由 [constr_1242] 定义。

把 invalidValue 放在适用 CompuMethod 边界之内的一个典型用例是包含所有各个轮速值的组合数据类型。如果一个传感器失效并开始发送 invalidValue,把整个组合数据元素视为无效可能没有意义。

很可能仍然可以理解其余完好的轮速值,并继续接收软件组件对该数据的业务。

从这个角度看,发送软件组件显式发送 invalidValue 显然是可以的——它随后作为 “常规” 值被处理,而 RTE/Com 不施加附加语义。

发送 invalidValue 而不由 RTE/Com 施加失效处理:

SenderReceiverInterface.invalidationPolicy.handleInvalid 值的限制:

请注意,category 为 VALUE 的 ApplicationPrimitiveDataType 原则上可以拥有由 NumericalValueSpecification 提供的 invalidValue,因为属性 invalidValue 的值可以在适用 CompuMethod 的范围之外(见 [TPS_SWCT_01432])。

也可以在不设置 compuMethod 的情况下规定 invalidValue:

图 5.25 展示了 ApplicationDataType、CompuMethod、ImplementationDataType、invalidValue、BaseType 之间的关系。

invalidValue 应符合规定的范围:

请注意,invalidValue 是一个 ValueSpecification。当然,在这个位置技术上可以使用 ValueSpecification 的任何子类。

ImplementationDataType 和 ImplementationDataTypeElement 的 invalidValue 限制:

该规则应在合同阶段生成执行时施加。

category 为 CURVE、MAP、CUBOID、CUBE_4、CUBE_5、COM_AXIS、RES_AXIS 和 VAL_BLK 的 ApplicationPrimitiveDataType 定义类型的 DataPrototype 的 invalidValue 定义:

[constr_1384] 的依据:不存在经由通信总线发送 category 为 CURVE、MAP、CUBOID、CUBE_4、CUBE_5、COM_AXIS、RES_AXIS 和 VAL_BLK 的 ApplicationPrimitiveDataType 定义类型的 DataPrototype 的用例。

category 为 STRING 的 ApplicationPrimitiveDataType 可以有 invalidValue:

复合原始数据类型与 invalidValue:

category 为 STRING 的 ApplicationPrimitiveDataType 的 invalidValue 限制:

ApplicationPrimitiveDataType 与 ImplementationDataType 的 invalidValue 对应关系:

  • category VALUE 或 BOOLEAN:应用 CompuMethod;

  • category STRING:字符串数据类型常量值的定义在 “字符串值的规范” 一节解释。没有定义形式化支持来检查 invalidValue 的值是否真正相互对应。

由引用 category 为 TEXTTABLE 或 BITFIELD_TEXTTABLE 的 CompuMethod 的 ImplementationDataType 定义类型的 DataPrototype 的 invalidValue 定义:

在这种情况下,所提供的值应与适用 CompuScale 定义的适用文本值(vt、shortLabel、symbol)之一匹配。

该规则应在合同阶段生成执行时施加。

请注意,元类 CompuScale 的若干属性可用于描述实际值。因此有必要澄清:如果一个 CompuScale 的上下文内存在这些属性中的多个会发生什么。该澄清见 [TPS_SWCT_01696]。

[constr_10196] 存在的后果是:如果 invalidValue 不打算由 CompuMethod 表示,则 NumericalValueSpecification 可用于为由引用 category 为 TEXTTABLE 或 BITFIELD_TEXTTABLE 的 CompuMethod 的 ImplementationDataType 定义类型的 DataPrototype 定义 invalidValue。

数据失效的限制:

  1. 由 ApplicationPrimitiveDataType 或 category 为 VALUE、或归结为 category VALUE 的 TYPE_REFERENCE 的 ImplementationDataType 定义类型、且已定义 invalidValue 的 VariableDataPrototype。

  2. 由 ApplicationCompositeDataType、或 category 为 STRUCTURE 或 ARRAY、或归结为 category STRUCTURE 或 ARRAY 的 TYPE_REFERENCE 的 ImplementationDataType 定义类型、且拥有至少一个带 invalidValue 的原始元素的 VariableDataPrototype。

该规则应在合同阶段生成执行时施加。

请注意,[constr_1302] 一般而言为包装联合数据类型定义类型的 DataPrototype 的 invalid value 定义留有余地,因为它要求存在拥有 invalidValue 的原始元素。在包装联合数据类型的情况下,原始元素可以是成员选择器,因此 [constr_1302] 在技术上会得到满足。

一方面,仅从语义角度看,只为成员选择器定义 invalid value 没有意义。另一方面,实际载荷按 [constr_1009] 或 [constr_1288] 甚至可能没有 invalid value。

为了简化情形并作出清晰陈述,定义了 [constr_1446]。

包装联合数据类型不定义 invalidValue:

(具有 invalidValue 的)联合数据类型在合同阶段生成执行时不受支持。

invalidValue 与属性 handleInvalid 的组合:

术语 “相应的”(如 [constr_1140] 所用)指的是:关于满足 [constr_1140] 的信息实际上分布在元模型的不同区域。为澄清起见,应考虑以下关系:

SenderReceiverInterface 通过属性 handleInvalid 在单个 dataElement 的基础上定义如何处理无效值。SenderReceiverInterface 被取来为 RPortPrototype 定义类型,而后者拥有 ReceiverComSpec。如果特定 ReceiverComSpec 实际上是引用同一 dataElement 的 NonqueuedReceiverComSpec,则适用 [constr_1140]。

在这种情况下,由相应 dataElement 反过来拥有的 SwDataDefProps 所拥有的 invalidValue,与满足 [constr_1140] 相关。这一关系的 “总体图景” 勾勒于图 5.28。

失效处理取决于 swImplPolicy 的值:

  • 它引用该 dataElement,且

  • 其中 InvalidationPolicy.handleInvalid 的值设置为 HandleInvalidEnum.dontInvalidate 以外的任何值

在合同阶段生成执行时。

关于使用 RuleBasedValueSpecification 或 ReferenceValueSpecification 来规定 invalidValue 的限制:

5.4.3. 用于测量的属性

在嵌入式汽车软件设计中,测量意味着访问 ECU 中的内存位置并把其内容传输给测量和标定系统。

在经典软件设计中,变量抽象代码中的内存位置;而 AUTOSAR 为此目的提供了 DataPrototype 及其各种特化:

  • 用于 PortPrototype(属于 SwComponentPrototype)的 SenderReceiverInterface 或 NvDataInterface 的 VariableDataPrototype,以捕捉 SwComponentPrototype 之间的 sender-receiver 和非易失数据通信

  • ClientServerInterface 中 ClientServerOperation 的 ArgumentDataPrototype,以捕捉 SwComponentPrototype 之间的 client-server 通信。

  • SwcInternalBehavior 上下文中的 VariableDataPrototype,用于:

  • 捕捉 SwComponentPrototype 内 RunnableEntity 之间的通信;

  • 处理非易失性内存块中的数据;

  • 提供必须可供 MCD 系统访问的纯软件组件内部内存。

测量不限于原始对象:

SwDataDefProps 的以下语义和结构特征(除其他目的外)与测量系统相关:

  • swCalibrationAccess

  • swImplPolicy

  • compuMethod

  • unit(如果 compuMethod 未规定)

  • baseType

模型元素的测量和标定访问由 swCalibrationAccess 定义:

swCalibrationAccess 的有效设置由 [constr_1017] 规定。

[constr_1017] swImplPolicy 与 swCalibrationAccess 支持的组合

| swImplPolicy | swCalibrationAccess |

| | notAccessible | | fixed | yes | | const | yes | | standard | yes | | queued | yes | | measurementPoint | not supported |

该规则应在合同阶段生成执行时施加。

属性 SwDataDefProps.swCalibrationAccess 的默认值:

swImplPolicy 设置为 measurementPoint 的 dataElement 不应被 RunnableEntity 在角色 dataReadAccess 中聚合的 VariableAccess 引用:

5.4.4. 曲线与映射表的属性

特征表通过把相应 AutosarDataType 或 DataPrototype 的 category 分别设置为 CURVE、MAP、CUBOID、CUBE_4 和 CUBE_5 来定义。

其 SwDataDefProps 确定轴描述。功能值的类型由所附加的 SwBaseType 和 CompuMethod 给出。

轴描述本身由元模型元素 SwCalprmAxisSet 定义,它聚合适当数量的 SwCalprmAxisTypeProps。

这是所谓 “独立轴”(由元类 SwAxisIndividual 形式化)或 “分组轴”(由元类 SwAxisGrouped 形式化)的基类。

后者用于在若干特征表之间共享轴点。图 5.29 展示了相关元模型元素的概览。

功能值的类型由所附加的 SwBaseType 和 CompuMethod 给出,或由被引用的 ApplicationDataType 给出。

如果引用了一个 ApplicationDataType(经由 valueAxisDataType),则在 CompuMethod、Unit 和 BaseType 并行定义的情况下,它取代它们。

图 5.31 展示了独立轴如何由元模型表示。相应的 M1 模型见图 5.32。

SwAxisIndividual 引用值模型,以说明轴值的最小和最大数量以及轴点的数量。

因此,承载功能值的结构的大小由所有轴的轴值数量确定。轴值的类型在

被引用输入值(swVariableRef)的类型设定时确定。更多细节见第 5.4.5 节。

swMinAxisPoints 和 swMaxAxisPoints 表示变体点:

表5.55:SwCalprmAxisSet(SwCalprmAxisSet)

| 包 | M2::MSR::DataDictionary::CalibrationParameter | | 说明 | This element specifies the input parameter axes (abscissas) of parameters (and variables, if these used adaptively). | | 基类 | ARObject | | 聚合于 | SwDataDefProps.swCalprmAxisSet |

属性 类型 多重性 种类 备注
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

表5.56:SwCalprmAxis(SwCalprmAxis)

| 包 | M2::MSR::DataDictionary::CalibrationParameter | | 说明 | This element specifies an individual input parameter axis (abscissa). | | 基类 | ARObject | | 聚合于 | SwCalprmAxisSet.swCalprmAxis |

属性 类型 多重性 种类 备注
category CalprmAxisCategory Enum 0..1 attr This property specifies the category of a particular axis. Tags: xml.sequenceOffset=30
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 Access SwCalibrationAccess Enum 0..1 attr Describes the applicability of parameters and variables. Tags: xml.sequenceOffset=90
swCalprmAxis TypeProps SwCalprmAxisType Props 0..1 aggr specific properties depending on the type of the axis. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=40 xml.typeElement=true xml.typeWrapperElement=false

表5.57:CalprmAxisCategoryEnum(CalprmAxisCategoryEnum)

| 包 | M2::MSR::DataDictionary::CalibrationParameter | | 说明 | This enum specifies the possible values of the category property within SwCalprmAxis. | | 聚合于 | RuleBasedAxisCont.category, SwAxisCont.category, SwCalprmAxis.category |

表5.58:CalprmAxisCategoryEnum(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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=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.EnumerationLiteralIndex=8 xml.name=STD_AXIS

表5.59:SwCalprmAxisTypeProps(SwCalprmAxisTypeProps)

| 包 | M2::MSR::DataDictionary::CalibrationParameter | | 说明 | Base class for the type of the calibration axis. This provides the particular model of the specialization. If the specialization would be the directly from SwCalPrmAxis, the sequence of common properties and the specializes ones would be different. | | 基类 | ARObject | | 子类 | SwAxisGrouped, SwAxisIndividual | | 聚合于 | SwCalprmAxis.swCalprmAxisTypeProps | | 包 | M2::MSR::DataDictionary::Axis | | 说明 | 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). | | 基类 | ARObject , SwCalprmAxisTypeProps | | 聚合于 | SwCalprmAxis.swCalprmAxisTypeProps |

属性 类型 多重性 种类 备注
maxGradient Float 0..1 attr This attribute defines the maximum permissible gradient for an adjustable object (curve, map or cuboid) with respect to a specific axis. MaxGrad = maximum( absolute((Value i,k - Value i-1,k)/(Axis Point i - Axis Point i-1)) )
monotony MonotonyEnum 0..1 attr This attribute specifies the monotony constraint for an adjustable object (curve, map or cuboid) with respect to a specific axis. This information can be used by MCD system to verify whether the monotony constraint is fulfilled and to prevent from changes violating the constraint.
Class SwAxisIndividual
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 Type ApplicationPrimitive DataType 0..1 ref This is the datatype of the input value for the axis. This 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 Points Integer 0..1 attr Maximum number of base points contained in the axis of a map or curve. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
swMinAxis Points Integer 0..1 attr Minimum number of base points contained in the axis of a map or curve. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=70
swVariableRef (ordered) SwVariableRefProxy * aggr Refers to input variables of the axis. It is possible to 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:
Class SwAxisIndividual
glyph[triangle] xml.roleWrapperElement=true xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false
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

表5.60:SwAxisGeneric(SwAxisGeneric)

| 包 | M2::MSR::DataDictionary::Axis | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | SwAxisIndividual.swAxisGeneric |

属性 类型 多重性 种类 备注
swAxisType SwAxisType 0..1 ref Associated axis calculation strategy. Tags: xml.sequenceOffset=20
swGenericAxis Param SwGenericAxisParam * aggr Specific parameter of a generic axis. Tags: xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=40 xml.typeElement=false xml.typeWrapperElement=false

表5.61:SwAxisType(SwAxisType)

| 包 | M2::MSR::DataDictionary::Axis | | 说明 | 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 | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
swGenericAxis Desc DocumentationBlock 0..1 aggr Associated axis description in textual form. Tags: xml.sequenceOffset=20
Class SwAxisType
swGenericAxis ParamType SwGenericAxisParam Type * aggr Parameters for this calculation algorithm. Tags: xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=30 xml.typeElement=false xml.typeWrapperElement=false

表5.62:SwGenericAxisParam(SwGenericAxisParam)

| 包 | M2::MSR::DataDictionary::Axis | | 说明 | 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. | | 基类 | ARObject | | 聚合于 | SwAxisGeneric.swGenericAxisParam |

属性 类型 多重性 种类 备注
swGenericAxis ParamType SwGenericAxisParam Type 0..1 ref Parameter type defined on a corresponding axis 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 * 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

表5.63:SwGenericAxisParamType(SwGenericAxisParamType)

| 包 | M2::MSR::DataDictionary::Axis | | 说明 | 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 SwGeneric AxisParamTypes. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | SwAxisType.swGenericAxisParamType |

属性 类型 多重性 种类 备注
dataConstr DataConstr 0..1 ref This reference denoted data constraints applicable to the generic axis parameter. Tags: xml.sequenceOffset=20

表5.64:SwAxisGrouped(SwAxisGrouped)

| 包 | M2::MSR::DataDictionary::Axis | | 说明 | An SwAxisGrouped is an axis which is shared between multiple calibration parameters. | | 基类 | ARObject , SwCalprmAxisTypeProps | | 聚合于 | SwCalprmAxis.swCalprmAxisTypeProps |

属性 类型 多重性 种类 备注
sharedAxisType ApplicationPrimitive DataType 0..1 ref This is the datatype of the calibration parameter providing the shared axis.
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 swAxisIndex. Tags: xml.sequenceOffset=20
swCalprmRef SwCalprmRefProxy 1 aggr This property specifies 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. Please note that the multiplicity of this aggregation cannot be set to 0..1 based on the non-mainstream schema generation instructions defined at the aggregation. However, the multiplicity has to be factually considered 0..1 (i.e. a SwAxisGrouped that does not aggregate the role swCalprmRef is still valid according to the XML schema, depending on the use case documented in [constr_1015]). Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=30 xml.typeElement=false xml.typeWrapperElement=false
5.4.4.1. 分组轴的规范

请注意,SwAxisGrouped 具有双重性质,它被用于:

  • 定义共享轴的数据类型(见图 5.33);

  • 在对外围曲线的特定访问的上下文中标识实现共享轴的特定 DataPrototype(见图 5.34)。

图 5.33 描绘了 SwAxisGrouped 用于定义实现曲线的 ApplicationPrimitiveDataType 的用法。

值得注意,ApplicationPrimitiveDataType 在图中出现在两个不同的角色中:

  • 曲线本身的 ApplicationPrimitiveDataType 的定义描绘于图的上部;

  • 表示分组轴的 ApplicationPrimitiveDataType 的选择描绘于图的下部。

图 5.33 所描绘的建模可以通过一个精简到最小内容以示例该用例的示例模型进一步澄清。这里,使用 SwAxisGrouped 的角色是定义曲线本身和共享轴的数据类型:

</APPLICATION-PRIMITIVE-DATA-TYPE>

图 5.34 描绘了 SwAxisGrouped 在 ParameterAccess 上下文中的用法(在曲线的情形下,这通常导致调用相应曲线以及预期在插值中使用的特定轴的插值方法)。

同样在这种情况下,图中描绘了两个不同(但相关)的方面:

  • 在图的上部,对外围 SwComponentPrototype 内表示特定曲线的 DataPrototype 的访问的定义通过 ParameterAccess.accessedParameter 建模;

  • 在图的下部,对外围 SwComponentPrototype 内表示分组轴的 DataPrototype 的标识通过 SwAxisGrouped.swCalprmRef.arParameter 建模。

请注意,聚合 SwAxisGrouped.swCalprmRef 的多重性不能基于在该聚合处定义的非主流模式生成指令设置为 0..1。

然而,该多重性实际上必须视为 0..1(即不聚合角色 swCalprmRef 的 SwAxisGrouped 按 XML 模式仍然有效,取决于 [constr_1015] 中记录的用例)。

16 细节在文档 TPS XML Schema Production Rules [27] 中对模式生成控制标签 xml.roleElement 和 xml.roleWrapperElement,以及 xml.typeElement 和 xml.typeWrapperElement 的描述中解释。

以下最简模型清单示例说明了 SwAxisGrouped 在 ParameterAccess 上下文中的用法,其中标识了一个特定本地参数在对曲线的特定访问中承担共享轴的角色。

<APPLICATION-SW-COMPONENT-TYPE> <SHORT-NAME> A </SHORT-NAME> <INTERNAL-BEHAVIORS> <SWC-INTERNAL-BEHAVIOR> <SHORT-NAME> B </SHORT-NAME> <PER-INSTANCE-PARAMETERS> <PARAMETER-DATA-PROTOTYPE> <SHORT-NAME> Axis </SHORT-NAME> </PARAMETER-DATA-PROTOTYPE> <PARAMETER-DATA-PROTOTYPE> <SHORT-NAME> Curve </SHORT-NAME> </PARAMETER-DATA-PROTOTYPE> </PER-INSTANCE-PARAMETERS> <RUNNABLES> <RUNNABLE-ENTITY> <SHORT-NAME> MyRunnable </SHORT-NAME> <PARAMETER-ACCESSS> <PARAMETER-ACCESS> <SHORT-NAME> MyParamAccess </SHORT-NAME> <ACCESSED-PARAMETER> <LOCAL-PARAMETER-REF DEST= "AUTOSAR-DATA-PROTOTYPE" > /P/A/B/ Curve </LOCAL-PARAMETER-REF> </ACCESSED-PARAMETER> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <SW-CALPRM-AXIS-SET> <SW-CALPRM-AXIS> <SW-AXIS-GROUPED> <AR-PARAMETER> <LOCAL-PARAMETER-REF DEST= "AUTOSAR-DATAPROTOTYPE" > /P/A/B/Axis </LOCAL-PARAMETER-REF> </AR-PARAMETER> </SW-AXIS-GROUPED> </SW-CALPRM-AXIS> </SW-CALPRM-AXIS-SET> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </PARAMETER-ACCESS> </PARAMETER-ACCESSS> </RUNNABLE-ENTITY> </RUNNABLES> </SWC-INTERNAL-BEHAVIOR> </INTERNAL-BEHAVIORS> </APPLICATION-SW-COMPONENT-TYPE>

共享轴不应是固定轴:

该规则应在合同阶段生成执行时施加。

[constr_10096] 存在的依据:A2L 标准 [15] 不支持由固定轴实现的分组轴的定义。

5.4.4.2. 固定轴的规范

在大多数情况下,曲线或映射表的轴可以被标定软件访问,可以标定轴点及其相应的值。

然而,也存在有意把轴声明为固定、且从无更改轴属性的意图的情况。

这些轴也称为固定轴(fix axes)。元模型中对创建固定轴的支持基于 SwAxisGeneric 的使用,如图 5.30 所描绘。

固定轴的 category 值:

固定轴的子类别:

  • 轴点间距可以按标准化算法计算的固定轴。

在这种情况下,通过把轴描述上下文中定义的三个实参输入轴算法,可以描述任意长度的固定轴。

因此,该类别不同固定轴的内存占用完全相同,与轴点数量无关。

存在以下变体:

  • 子类别 PAR,即 category = FIX_AXIS_PAR:轴由一个起始值和一个以 2 的幂算法创建更多轴点的移位生成。细节见 [15]。

  • 子类别 PAR_DIST,即 category = FIX_AXIS_PAR_DIST:轴由一个起始值和一个以 offset 给定的距离添加更多轴点的偏移生成。细节见 [15]。

  • 轴点直接在轴定义中作为值列表定义的固定轴。这种变体归结为:

  • 子类别 PAR_LIST,即 category = FIX_AXIS_PAR_LIST:轴由表示轴点的数值列表生成。细节见 [15]。

17 通常,标定软件不具备通过检查 ECU 内存来操纵(甚至检查)轴属性的能力。

这些 category 值应用于 SwAxisType。

如前所述,固定轴的建模基于 SwAxisGeneric 的定义。但这个陈述本身尚不足以无歧义地澄清建模的细节。

为此,需要提供关于角色 SwAxisGeneric.swAxisType 和 SwAxisGeneric.swGenericAxisParam 具体情况的进一步信息。

SwAxisGeneric.swAxisType 在固定轴定义中的语义:

SwAxisGeneric.swGenericAxisParam 在固定轴定义中的语义:

所提供数值的语义由属性 SwGenericAxisParamType.category 澄清,其中元类 SwGenericAxisParamType 在角色 swGenericAxisParamType 中被引用。

请注意,SwAxisGeneric 模型内的标准化值和多重性按照 [TPS_SWCT_01479] 和 [TPS_SWCT_01480] 定义。

用于固定轴定义的 SwAxisGeneric 建模的标准化值和多重性:

| category of swAxisType | category of SwGenericAxis- ParamType |

| FIX_AXIS_PAR | OFFSET | | | SHIFT | | FIX_AXIS_PAR_DIST | OFFSET | | | DISTANCE | | FIX_AXIS_PAR_LIST | LIST |

该规则应在合同阶段生成执行时施加。

请注意,固定轴的轴点和值定义在固定轴本身的定义中,因此指派给固定轴的任何初始值反正会被忽略。

这可能引起困惑:初始值没有进入软件。为了避免这种困惑,AUTOSAR 不支持为固定轴定义初始值。

该规定反映在 [constr_1545] 的存在中。

固定轴不初始化:

请注意,如果这些属性在 A2L 文件中规定,标定软件仍可能可以访问固定轴的轴点和值。

为此需要正确建立 McDataInstance。细节在 [6] 中解释。

固定轴定义的示例见附录 B.2.5。

5.4.5. 设置轴输入值

调用插值例程时,必须提供一个输入值以在 RunnableEntity 的实现中找到相应的轴条目。然而,这个输入值不能任意选择,只能从指派给它的可用 VariableDataPrototype 中选择。

共享轴的属性(例如 displayFormat、swCalibrationAccess)可以在为共享轴定义 category 为 COM_AXIS 的 ApplicationPrimitiveDataType 的上下文中定义。

定义 “嵌入式” stdAxis 也需要相同的定义属性的能力。

有若干可能的方式定义所需属性,例如当 SwCalprmAxis.swCalprmAxisTypeProps 产生 SwAxisIndividual 时,通过角色 inputVariableType 中引用的存在,见 [TPS_SWCT_01865]。

请注意,[TPS_SWCT_01865] 和 [TPS_SWCT_01866] 中提到的 SwCalprmAxis 和 SwAxisIndividual 的建模描绘于图 5.22。

引用 inputVariableType 存在时 “嵌入式” 轴的属性定义:

18 某些属性(如 “嵌入式” 轴的 CompuMethod 或 DataConstr)可以直接基于 SwAxisIndividual 定义,但这些只是各自的捷径。

引用 inputVariableType 不存在时 “嵌入式” 轴的属性定义:

在这种情况下,相应属性必须在角色 SwAxisIndividual.swVariableRef 内引用的、用于为 DataPrototype 定义类型的所有 AutosarDataType 中兼容。

这将通过 SwAxisIndividual.swVariableRef 引用的 DataPrototype 与实际轴规定之间的兼容性考虑留给以下属性:

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.compuMethod

  • SwAxisIndividual.unit

检查输入值与轴兼容性的首选方法:

  • 通过 SwAxisIndividual.swVariableRef 引用的 DataPrototype 的 ApplicationPrimitiveDataType(就兼容性而言的提供方);

  • 通过 SwAxisIndividual.inputVariableType 引用的 ApplicationPrimitiveDataType(就兼容性而言的请求方)。

为保证兼容性,SwAxisIndividual.swVariableRef 的 compuMethod 与借助 SwAxisIndividual.inputVariableType 引用的 ApplicationPrimitiveDataType 不应被考虑。glyph[floorright]()

依据:许多情况下输入变量由 float 数据类型定义,以在计算中获得精度好处。但轴数据类型是为省内存的整数数据类型。在这种情况下,要求兼容的 compuMethod 会排除所描述的场景。

软件组件的实现应确保 float 值被正确转换并重新缩放为与轴数据类型兼容的整数数据类型。

检查输入值与轴兼容性的回退方法:

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.unit

或分别

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.compuMethod.unit

与通过 SwAxisIndividual.swVariableRef 引用的 DataPrototype 的 ApplicationPrimitiveDataType 中的相应对应物比较。

SwAxisIndividual . inputVariableType 的存在性:

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.unit

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.compuMethod.unit

应在合同阶段生成执行时存在。

该约束对于在 A2L 中生成轴的相应规范是必需的。

或

于是每个 ParameterDataPrototype 都允许在其轴描述中规定零个或多个输入值(与 inputVariableType 类型兼容)。

这意味着在 SwcInternalBehavior 的规定时点,必须规定一个输入值列表供 RunnableEntity 的实现者选择。输入值是 DataPrototype 实体,或者是:

  • SwcInternalBehavior 所关联的 AtomicSwComponentType 的 PortPrototype 的 SenderReceiverInterface 或 NvDataInterface 中的 VariableDataPrototype;或该 AtomicSwComponentType 的 PortPrototype 中 ClientServerInterface 的 ClientServerOperation 中的 ArgumentDataPrototype(InternalBehavior 关联到该组件时);或

  • SwcInternalBehavior 内的 VariableDataPrototype。

为实现这一点,SwAxisIndividual 聚合一个 SwVariableRefProxy。

最初,MSRSW 使用 AutosarVariableRef 来恰当地设置轴的输入值。在 AUTOSAR 中,通过首先引入 SwVariableRefProxy 对此进行了扩展。

注意,这是角色 SwVariableRefProxy.autosarVariable 的一个特定用例。

另请注意,属性 SwVariableRefProxy.autosarVariable 与 SwVariableRefProxy.mcDataInstanceVar 存在的用例完全不相交,因此这两个属性同时存在根本没有任何意义。

因此,引入了 [constr_1382] 来澄清这一方面。

属性 SwVariableRefProxy.autosarVariable 与 SwVariableRefProxy.mcDataInstanceVar 的互斥存在:

如图 5.35 所示,这种方法也用于在所有角色中表示 AutosarVariableRef,例如应用于轴的插值例程的结果、输入值的确定、依赖参数的列表,以及 swDataDependency。

借助 ApplicationArrayDataType,可以定义承载 category 为 CURVE、MAP、CUBOID、CUBE_4、CUBE_5、COM_AXIS 或 RES_AXIS 的复合原始数据类型的 n 维数组的 DataPrototype。

对于那些 DataPrototype,应描述轴的输入值,以支持在 MCD 系统中显示工作点。

InstantiationDataDefProps swDataDefProps。

parameterInstance swCalprmAxisSet.swCalprmAxis。

COM_AXIS

COM_AXIS

COM_AXIS

COM_AXIS

COM_AXIS

swCalprmAxisTypeProps

VALUE

由此,通常所含轴的整个数组要么与一个变量数组关联,要么与单个值关联。在数组的情况下,通常第 n 个轴与第 n 个输入值组合。

swCalprmAxisSet.swCalprmAxis / SwAxisIndividual.swVariableRef 的定义取决于数据类型的能力:

由此,可以嵌套多个 ApplicationArrayDataType 以表达多个数组维度。该规则应在合同阶段生成执行时施加。

为轴数组规定输入变量数组:

这表达了如下语义:轴数组中第 n 个元素为特定 SwAxisGrouped.swAxisIndex 使用输入变量数组中的第 n 个值。

请注意,在这种情况下,两个关联的数组需要具有相同的维度数量和维度大小。

轴与输入变量数组的数组大小一致性:

该规则应在合同阶段生成执行时施加。

为轴数组规定单个输入变量:

这表达了如下语义:轴数组中每个元素为特定 SwAxisGrouped.swAxisIndex 使用相同的输入变量。

5.4.6. 设置组轴

分组的曲线共享相同的轴定义。在 MSRSW 中,这通过从 SwAxisGrouped 引用表示单条曲线的 SwCalprm 来体现。

注意,这并未描述应从充当共享轴的引用 swCalprmRef 取哪个轴。这将在 SwAxisGrouped.swAxisIndex 中完成。

AUTOSAR 对参数应用与变量类似的代理方法。因此,在 MSRSW 中引入了 SwCalprmRefProxy,并由 SwAxisGrouped 元素聚合。

SwCalprmRefProxy 聚合一个 AutosarParameterRef,提供到 ParameterDataPrototype 的关联,表示带一条轴的曲线。在定义参数的数据类型时,共享轴的类型在 sharedAxisType 中定义。

ParameterDataPrototype 需要是 sharedAxisType 中所引用类型的兼容数据类型:

AUTOSAR 风格展示于图 5.35 的左上部,而上部中间展示的是 MSRSW 风格,引用 SwCalprm。

表5.65:SwCalprmRefProxy(SwCalprmRefProxy)

| 包 | M2::MSR::DataDictionary::DatadictionaryProxies | | 说明 | Wrapper class for different kinds of references to a calibration parameter. | | 基类 | ARObject | | 聚合于 | SwAxisGrouped.swCalprmRef, SwDataDependencyArgs.swCalprmRef |

属性 类型 多重性 种类 备注
arParameter AutosarParameterRef 0..1 aggr This represents a Parameter within AUTOSAR. Note that the Datatype of the referenced ParameterDataPrototype shall be an ApplicationDataType of category VALUE.
mcDataInstance McDataInstance 0..1 ref This reference is used in the McSupport file to express the final instance of group axis etc. It is not allowed to use this outside of an McDataInstance. The referenced mcDataInstance shall be originated from a ParameterDataPrototype.

表5.66:SwVariableRefProxy(SwVariableRefProxy)

| 包 | M2::MSR::DataDictionary::DatadictionaryProxies | | 说明 | Proxy class for several kinds of references to a variable. | | 基类 | ARObject | | 聚合于 | SwAxisIndividual.swVariableRef, SwDataDefProps.swComparisonVariable, SwDataDefProps.swHost Variable, SwDataDependencyArgs.swVariable |

属性 类型 多重性 种类 备注
autosarVariable AutosarVariableRef 0..1 aggr This represents the reference to a Variable in an Autosar system. Note that the target of the reference within AutosarVariableRef shall be typed by a primitive data type
mcDataInstance Var McDataInstance 0..1 ref This reference is used in the McSupport file to express the final instance of input values etc. It is not allowed to use this outside of an McDataInstance. The referenced mcDataInstance shall be originated from a VariableDataPrototype.

引用 DataPrototype 的基本模式在第 5.3.3 节解释。在本章的上下文中值得指出:对标定参数的访问的定义在 RunnableEntity 的上下文中实现(见图 7.3)。

使用 InstantiationDataDefProps 便利标定参数访问的定义:

InstantiationDataDefProps swDataDefProps。

parameterInstance swCalprmAxisSet.swCalprmAxis。

CURVE

CURVE

CURVE

CURVE

CURVE

swCalprmAxisTypeProps

COM_AXIS

(如果在该层级定义访问)就得针对每个 RunnableEntity 重复或多或少复杂的一组信息。换言之:在这种情况下,必须为每个 RunnableEntity 重复该组信息。

为了避免对标定参数访问定义的这一不必要复杂性层级,可以在 InstantiationDataDefProps 层级定义对标定参数的访问——定义 InstantiationDataDefProps 就是为了便利这种复用。

更多信息请参见第 7.5.4 节。该能力也记录在 [constr_1015] 中。

借助 ApplicationArrayDataType,可以定义承载 category 为 CURVE、MAP、CUBOID、CUBE_4 和 CUBE_5 的复合原始数据类型的 n 维数组的 DataPrototype。

对于那些 DataPrototype,如果并非所有 SwCalprmAxis 定义都使用 SwAxisIndividual,则需要定义组轴。

由此,通常 category 为 CURVE、MAP、CUBOID、CUBE_4 和 CUBE_5 的元素的整个数组要么与组轴数组关联,要么替代地与单个组轴关联。

在数组的情况下,通常第 n 个 CURVE、MAP、CUBOID、CUBE_4 和 CUBE_5 与第 n 个 COM_AXIS 或 RES_AXIS 组合。

swCalprmAxisSet.swCalprmAxis / SwAxisGrouped.swCalprmRef 的定义取决于数据类型的能力:

InstantiationDataDefProps swDataDefProps。

swCalprmAxisSet.swCalprmAxis。

(作为 SwAxisIndividual).swVariableRef

parameterInstance

CURVE

CURVE

CURVE

CURVE

CURVE

(swCalprmAxisSet.swCalprmAxis / SwAxisGrouped.swCalprmRef 适用)于 category 为 ARRAY 的 DataPrototype,如果 ApplicationArrayElement 的数据类型按 [constr_1289] 也支持 swCalprmAxisSet.swCalprmAxis / SwAxisGrouped.swCalprmRef 的规定。

由此,可以嵌套多个 ApplicationArrayDataType 以表达多个数组维度。该规则应在合同阶段生成执行时施加。

为 category 为 CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 的数组规定组轴数组:

这表达了如下语义:CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 数组中第 n 个元素为特定 SwAxisGrouped.swAxisIndex 使用 COM_AXIS 或 RES_AXIS 数组中的第 n 个组轴。

请注意,在这种情况下,两个关联的数组需要具有相同的维度数量和维度大小。

category 为 CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 的元素数组与所用组轴数组的数组大小一致性:

为 category 为 CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 的元素数组规定单个组轴:

这表达了如下语义:CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 数组中每个元素为特定 SwAxisGrouped.swAxisIndex 使用相同的 COM_AXIS 或 RES_AXIS。

5.4.7. 规定数据依赖

SwDataDependency 允许规定依赖的数据元素。例如,可以把其他 ParameterDataPrototype 组合进一个 ParameterDataPrototype,其一致的值由测量和标定系统自动派生。在调整其中一个参数时,依赖参数随后也按所选公式自动调整。

例如考虑斜边长度为 1 的直角三角形,其他两边的长度是参数 A 和 B。调整参数 A 时,参数 B 必须相应调整为 B = √(1 − A∗A)。还有其他参数可能依赖 B,例如 B_AREA = B∗B 或 TRIANGULAR_AREA = (A∗B)/2。该示例展示于清单 B.12。

依赖参数本身不应可调整。影响其值的唯一方式是调整它所依赖的参数。

数据依赖的示例定义见第 B.2.1 节。

表5.67:SwDataDependency(SwDataDependency)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This element describes the interdependencies of data objects, e.g. variables and parameters. Use cases: • Calculate the value of a calibration parameter (by the MCD system) from the value(s) of other calibration parameters. • Virtual data - that means the data object is not directly in the ecu and this property describes how the "virtual variable" can be computed from the real ones (by the MCD system). | | 基类 | ARObject | | 聚合于 | SwDataDefProps.swDataDependency |

属性 类型 多重性 种类 备注
swData Dependency Args SwDataDependency Args 0..1 aggr Specifies the arguments used in the data dependency. Note that this is 0..1 since the aggregated class is a container (atpMixed). Tags: xml.sequenceOffset=40
Class SwDataDependency
swData Dependency Formula CompuGenericMath 0..1 aggr This element describes the formula with which the dependencies between the participating objects are defined. Tags: xml.sequenceOffset=30

表5.68:SwDataDependencyArgs(SwDataDependencyArgs)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This element specifies the elements used in a SwDataDependency. | | 基类 | ARObject | | 聚合于 | SwDataDependency.swDataDependencyArgs |

属性 类型 多重性 种类 备注
swCalprmRef SwCalprmRefProxy 0..1 aggr Specifies a calibration parameter as an input argument to the dependency. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=60 xml.typeElement=false xml.typeWrapperElement=false
swVariable SwVariableRefProxy 0..1 aggr Specifies a variable as an input argument to the dependency. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=70 xml.typeElement=false xml.typeWrapperElement=false

表5.69:CompuGenericMath(CompuGenericMath)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to specify a generic formula expression. | | 基类 | ARObject , FormulaExpression | | 聚合于 | SwDataDependency.swDataDependencyFormula |

属性 类型 多重性 种类 备注
level PrimitiveIdentifier 0..1 attr Placeholder to describe an indicator of a language level for the mathematics e.g. INFORMAL, ASAMHDO. May be refined by particular use-cases. Tags: xml.attribute=true

5.4.8. 数据属性相对于数据元素、轴元素、计算方法、单位的优先级

在 SwDataDefProps、SwCalprmAxis 以及 CompuMethod 中定义了类似的属性。因此,我们需要定义在从 SWC 描述到 MC 支持数据再到 ASAM-A2L 的整体过程中哪个属性值获胜。

[TPS_SWCT_01496] SwDataDefProps 属性的一般优先级规则:一般优先级规则是

  • SwDataDefProps 胜过 valueAxisDataType(例外:compuMethod 和 unit);

  • SwDataDefProps 胜过 compuMethod;

  • SwDataDefProps 胜过 swCalprmAxisSet;

  • SwDataDefProps.swCalprmAxisSet 胜过 swCalprmAxisSet.swCalprmAxis.swCalprmAxisTypeProps.compuMethod 或 SwAxisIndividual.inputVariableType;

  • SwAxisIndividual.inputVariableType 胜过 SwAxisIndividual.compuMethod 和 SwAxisIndividual.unit,但不胜过 SwAxisIndividual.dataConstr。

图 5.43 展示了 SwDataDefProps 中的某些属性也可以在子元素或被引用元素中表达的事实。

以下示例说明特定情形(最高优先级排在最前):

  • [TPS_SWCT_01497] 值轴单位的优先级:对值轴单位的使用,定义了以下优先级规则:

  • SwDataDefProps.valueAxisDataType.swDataDefProps.unit → SwDataDefProps.valueAxisDataType.swDataDefProps.compuMethod.unit → SwDataDefProps.unit → SwDataDefProps.compuMethod.unit

值轴的单位应一致:

该规则应在合同阶段生成执行时施加。

特别是,[constr_2550] 反映了如下事实:Unit 可以在开发过程的不同阶段规定,但最终需要一致。

  • [TPS_SWCT_01498] 值轴 DataConstr 的优先级:对值轴 DataConstr 的使用,定义了以下优先级规则:

  • SwDataDefProps.dataConstr

  • SwDataDefProps.valueAxisDataType.swDataDefProps.dataConstr

值轴的数据约束应匹配:

换言之,SwDataDefProps.dataConstr 胜过 SwDataDefProps.valueAxisDataType.swDataDefProps.dataConstr,但不允许放宽它。

该规则应在合同阶段生成执行时施加。

  • [TPS_SWCT_01499] 值轴 CompuMethod 的优先级:对值轴 CompuMethod 的使用,定义了以下优先级规则:

  • SwDataDefProps.valueAxisDataType.swDataDefProps.compuMethod

  • SwDataDefProps.compuMethod

  • [TPS_SWCT_01500] 值轴显示格式的优先级:对值轴显示格式的使用,定义了以下优先级规则:

  • SwDataDefProps.displayFormat

  • SwDataDefProps.valueAxisDataType.swDataDefProps.displayFormat

  • SwDataDefProps.valueAxisDataType.swDataDefProps.compuMethod.displayFormat

  • SwDataDefProps.compuMethod.displayFormat

注意,这偏离了一般规则,因为 displayFormat 不是本质属性。上表的最后一项是如下事实的后果:如果存在 valueAxisDataType,它取代 compuMethod。

  • [TPS_SWCT_01501] 值轴标定访问的优先级:对值轴标定访问的使用,定义了以下优先级规则:

  • SwDataDefProps.swCalibrationAccess

  • SwDataDefProps.valueAxisDataType.swDataDefProps.swCalibrationAccess

注意,这偏离了一般规则,因为 swCalibrationAccess 不是这样本质的属性。

  • [TPS_SWCT_01502] 输入轴 Unit 的优先级:对输入轴 Unit 的使用,定义了以下优先级规则:

  • SwAxisIndividual.unit

  • SwAxisIndividual.compuMethod.unit

  • SwAxisIndividual.inputVariableType.swDataDefProps.unit

  • SwAxisIndividual.swVariableRef.autosarVariable.autosarVariable.type.swDataDefProps.compuMethod.unit

  • SwAxisIndividual.swVariableRef.autosarVariable.autosarVariable.type.swDataDefProps.unit

输入轴的单位应一致:

该规则应在合同阶段生成执行时施加。

([constr_2550])反映了如下事实:unit 可以在开发过程的不同阶段规定,但最终需要一致。:

  • [TPS_SWCT_01503] 输入轴 DataConstr 的优先级:对输入轴 DataConstr 的使用,定义了以下优先级规则:

  • SwAxisIndividual.dataConstr

  • SwAxisIndividual.inputVariableType.swDataDefProps.dataConstr

  • SwAxisIndividual.swVariableRef.type.swDataDefProps.dataConstr

请注意,属性 SwAxisIndividual.inputVariableType.swDataDefProps.dataConstr 表示输入值,而不是轴本身。因此,没有定义 dataConstr 需要满足的特定约束。

  • [TPS_SWCT_01504] 输入轴显示格式的优先级:对输入轴显示格式的使用,定义了以下优先级规则:

  • SwCalprmAxis.displayFormat

  • SwCalprmAxis.swCalprmAxisTypeProps.compuMethod.displayFormat

  • SwCalprmAxis.swCalprmAxisTypeProps.inputVariableType.swDataDefProps.displayFormat

  • SwCalprmAxis.swCalprmAxisTypeProps.inputVariableType.swDataDefProps.compuMethod.displayFormat

  • SwCalprmAxis.swCalprmAxisTypeProps.swVariableRef.type.swDataDefProps.displayFormat

  • SwCalprmAxis.swCalprmAxisTypeProps.swVariableRef.type.swDataDefProps.compuMethod.displayFormat

请注意,SwAxisIndividual.inputVariableType.swDataDefProps.dataConstr 表示输入值而不是轴本身。因此没有 displayFormat 需要匹配的特定约束。

  • [TPS_SWCT_01505] 列出复杂数据类型外部与内部元素的 SwCalibrationAccessEnum 值的可能组合,“result” 列指示适用于该特定组合的 SwCalibrationAccessEnum 值。

  • [TPS_SWCT_01506] 输入轴标定访问的优先级:对输入轴标定访问的使用,定义了以下优先级规则:

  • SwDataDefProps.swCalibrationAccess

  • SwCalprmAxis.swCalibrationAccess

注意,定义在复合原始数据类型上的 swCalibrationAccess(见 [TPS_SWCT_01179])反映整条曲线或映射表。

因此,如果整条曲线或映射表不能被测量标定诊断系统(MCD 系统)访问,轴也无法访问。另一方面,也可能只对值轴授予访问而不对轴点授予访问。

[TPS_SWCT_01505] 复杂类型中沿结构层级的标定访问优先级

| outer | inner |

| notAccessible | * | | readOnly | | | readOnly | readWrite | | readOnly | notAccessible | | readWrite | notAccessible | | readWrite | readOnly | | readWrite | |

5.5. 数据定义属性中使用的元素

本节描述经由关联附加到 SwDataDefProps 的其他元素。

19 出于技术原因,[TPS_SWCT_01505] 无法直接放入条目列表中。

5.5.1. 计算方法

计算方法(Computation methods):

ApplicationCompositeDataType 不能作为整体被赋予特定语义含义,但显然可以规定其所含全部或部分元素(即 ApplicationPrimitiveDataType)的语义。

表5.70:CompuMethod(CompuMethod)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to express the relationship between a physical value and the mathematical representation. Note that this is still independent of the technical implementation in data types. It only specifies the formula how the internal value corresponds to its physical pendant. Tags: atp.recommendedPackage=CompuMethods | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
compuInternal ToPhys Compu 0..1 aggr This specifies the computation from internal values to physical values. Stereotypes: atpSplitable Tags: atp.Splitkey=compuInternalToPhys xml.sequenceOffset=80
compuPhysTo Internal Compu 0..1 aggr This represents the computation from physical values to the internal values. Stereotypes: atpSplitable Tags: atp.Splitkey=compuPhysToInternal xml.sequenceOffset=90
displayFormat DisplayFormatString 0..1 attr This property specifies, how the physical value shall be displayed e.g. in documents or measurement and calibration tools. Tags: xml.sequenceOffset=20
unit Unit 0..1 ref This is the physical unit of the Physical values for which the CompuMethod applies. Tags: xml.sequenceOffset=30

元类 CompuMethod 实际上取自 ASAM 标准的统一数据对象(harmonized data objects)。图中元类的绿色也表明了这一点。

CompuMethod 的某些 category 无法成功转换为 A2L [15],因为 A2L 没有提供接近相应 AUTOSAR 语义的等价语义。

这种情况的一个突出例子是 category 为 BITFIELD_TEXTTABLE 的 CompuMethod。

CompuMethod 的 category 不应扩展:

计算方法用于把内部值转换为物理表示,反之亦然:

  • 如果值由 ECU 提供,则换算方向是从内部到物理;

  • 如果物理值由测试仪提供,则在发送到 ECU 之前把它转换为内部值。

CompuMethod 的限值:

换言之,限值应用于换算的源端,而不是应用于在换算另一端得出的结果。

这显然比相反的方法安全得多——在相反的方法中,给定的物理/内部值会先被转换为它的内部/物理等价物,然后在换算完成后(作为第二步)才有义务检查换算结果按适用限值是否真正有效。

如 [TPS_SWCT_01548] 所暗示,有效区间的定义是通过规定有效区间(而非规定无效区间)完成的。这一观察对本文档范围之外 CompuMethod 的使用同样有效。

CompuMethod 也可以用于为内部值指派符号名称:

这也被视为内部数值与语义表示之间的一种换算。

实际上,首选的换算方向取决于用例。

下文以内部到物理的换算方向作为默认。通常只为一个换算方向定义 CompuMethod,即使它在两个方向上使用。

对于同一(1:1 换算)或线性函数这类简单函数,这已足够,因为反函数可以相当容易地从已定义的函数导出。在这种情况下,反方向的限值也可以通过把正向函数应用于正向限值来获得。

对于更复杂的函数(例如有理函数),通常无法自动计算反函数。更严重的是,如果函数非单调,求逆会产生歧义结果。为了直接处理这种可能的歧义,可以为函数或其各部分分别显式提供一个逆值。

应为 CompuMethod 的每个方向定义限值:

CompuMethod 应用于其限值之外的值:

依其 category,CompuMethod 应引用一个单位:

该规则应在合同阶段生成执行时施加。

([constr_1176])并不意味着 category 为 TEXTTABLE、BITFIELD_TEXTTABLE 或 IDENTICAL 的 CompuMethod 不允许引用单位。它们仍可以引用 unit,但按 [constr_1175] 该关系不是强制的。:

进一步的含义是:单位本身可以没有量纲,即 SI 单位的所有指数为 0。

图 5.44 勾勒了 CompuMethod 的概念概览。它由以下属性组成:

  • [TPS_SWCT_01281] 与 PhysicalDimension 关联的 Unit:一个单位(在下一节描述)可以与 PhysicalDimension 关联。glyph[floorright]()

注意,像 “%” 这样的量不是从 SI 单位派生的。但它们在物理世界中有意义,需要以数据类型的形式表示。因此,CompuMethod 也适用于这些情况。

  • [TPS_SWCT_01430] 从内部值到物理值的转换规定以及反向转换:从内部值到物理值的转换规定,以及反向转换。两者又都由一个抽象 CompuContent 组成。派生类允许以两种不同方式规定转换公式。glyph[floorright]()

CompuMethod 的分步定义:

对于 category 为 BITFIELD_TEXTTABLE 的 CompuMethod,由属性 CompuScale.upperLimit、CompuScale.lowerLimit 和 CompuScale.mask 创建的区间的组合,在外围 CompuMethod 的上下文中应唯一。

该规则应在合同阶段生成执行时施加。

属性 CompuMethod.category 的可能值以及相应语义的描述列于 [TPS_SWCT_01877]。

避免 CompuMethod 内直接相邻区间的重叠:

这意味着一个 CompuScale 的 upperLimit 与 CompuMethod 上下文中定义的另一个 CompuScale 的 lowerLimit 具有相同的数值。

在这种情况下,必须正确设置属性 CompuScale.lowerLimit.intervalType 或 CompuScale.upperLimit.intervalType 以避免重叠。

具体而言,应把区间边界之一设置为 intervalType.open 以避免重叠。

  • [TPS_SWCT_01282] 给定转换适用的区间数量:CompuScales 是若干区间(称为 CompuScale),某一转换在其中适用。相应区间以上下限的形式给出。

在每个 CompuScale 内,我们有抽象的 CompuScaleContents。为了直接处理可能的歧义,可以为该特定 scale 显式提供逆值(compuInverseValue)。

请注意,限值在第 5.2.4.1 章更详细地解释。

  • 如图所示,CompuScaleContents 是一个抽象元类。若干派生元类允许以多种方式规定换算公式,包括:

  • 把整个区间映射到一个常量(CompuConst);

  • 提供换算公式的有理系数(CompuRationalCoeffs)。

  • [TPS_SWCT_01283] 有理函数:有理函数以分子(compuNumerator)与分母(compuDenominator)的有理系数规定。CompuNominatorDenominator 可以拥有有理函数所需的任意多个 V 元素。

值 V 的序列承载指数信息,即第一个 V 是 x0 的系数,第二个 V 是 x1 的系数,依此类推。借助这个序列,指数的值可以被完整表示。

避免有理公式中的除零:

CompuScale 可能需要在生成的 RTE C 代码中表示:

符号本身可以按标准化的优先级方案从不同来源创建。

CompuScale 代码符号名称的定义:

CompuScale 代码符号名称可以取自 CompuScale.symbol、CompuConstTextContent.vt 或 CompuScale.shortLabel。细节在 [TPS_SWCT_01431] 中解释。

在 C 代码中为带点区间的 CompuScale 的表示寻找符号:

以下规则适用于(值越小优先级越高)所有带点区间的 CompuScale:

  1. 如果 symbol 属性存在,取其值;

  2. 如果 vt 构成有效的 C 标识符,取其值;

  3. 如果 shortLabel 存在,取其值。

如果所有可能的选项都不适用,则失败。

()

ValueSpecification 与 CompuScale 定义之间的关系:

如果找不到匹配的 CompuScale 值符号名称,则该 ValueSpecification 在受 [constr_1146] 支配的 CompuMethod 的上下文中应被视为不可用。

CompuScale 值符号名称:

  1. 如果 symbol 属性存在,取其值;

  2. 如果 vt 属性存在,取其值。

  3. 如果 shortLabel 存在,取其值。

确言之,CompuScale 值符号名称与 CompuScale 代码符号名称之间(明显的)区别在于:前者不要求能作为有效 C 标识符通过。

CompuScale 不应拥有相同的 CompuScale 值符号名称:

CompuScale 符号在 C 代码中的适用性:

  • TEXTTABLE

  • SCALE_LINEAR_AND_TEXTTABLE

  • SCALE_RATIONAL_AND_TEXTTABLE

  • BITFIELD_TEXTTABLE

该规则应在合同阶段生成执行时施加。

表5.71:Compu(Compu)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to express one particular computation. | | 基类 | ARObject | | 聚合于 | CompuMethod.compuInternalToPhys, CompuMethod.compuPhysToInternal |

属性 类型 多重性 种类 备注
compuContent CompuContent 0..1 aggr This specifies the details of the computation. Stereotypes: atpSplitable Tags: atp.Splitkey=compuContent xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false
compuDefault Value CompuConst 0..1 aggr This property can be used to specify an output value for a conversion formula, if the value to be converted lies outside the plausibility limit. Although this is possible for all conversion formulae, it is especially valid for variables with tabular conversion formulae. Tags: xml.sequenceOffset=70

表5.72:CompuContent(CompuContent)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This abstract meta-class represents the various definition means of a computation method. | | 基类 | ARObject | | 子类 | CompuScales | | 聚合于 | Compu.compuContent |

属性 类型 多重性 种类 备注
Class CompuContent (abstract)

表5.73:CompuScale(CompuScale)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to specify one segment of a segmented computation method. | | 基类 | ARObject | | 聚合于 | CompuScales.compuScale |

属性 类型 多重性 种类 备注
a2lDisplayText String 0..1 attr The value of this attribute shall be taken for generating one display text (specifically the OutVal) within the equivalent of the enclosing CompuMethod in A2L.
compuInverse Value CompuConst 0..1 aggr This is the inverse value of the constraint. This supports the case that the scale is not reversible per se. Tags: xml.sequenceOffset=60
compuScale Contents CompuScaleContents 0..1 aggr This represents the computation details of the scale. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=70 xml.typeElement=false xml.typeWrapperElement=false
desc MultiLanguageOverview Paragraph 0..1 aggr represents a general but brief description of the object in question. Tags: xml.sequenceOffset=30
lowerLimit Limit 0..1 attr This specifies the lower limit of the scale. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=40
mask PositiveUnlimitedInteger 0..1 attr In difference to all the other computational methods every COMPU-SCALE will be applied including the bit MASK. Therefore it is allowed for this type of COMPU-METHOD, that COMPU-SCALES overlap. To calculate the string reverse to a value, the string has to be split and the according value for each substring has to be summed up. The sum is finally transmitted. The processing has to be done in order of the COMPU-SCALE elements. Tags: xml.sequenceOffset=35
shortLabel Identifier 0..1 attr This element specifies a short name for the particular scale. The name can for example be used to derive a programming language identifier. Tags: xml.sequenceOffset=20
symbol CIdentifier 0..1 attr The symbol, if provided, is used by code generators to get a C identifier for the CompuScale. The name will be used as is for the code generation, therefore it needs to be unique within the generation context. Tags: xml.sequenceOffset=25
Class CompuScale
upperLimit Limit 0..1 attr This specifies the upper limit of a of the scale. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=50

表5.74:CompuScales(CompuScales)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to stepwise express a computation method. | | 基类 | ARObject , CompuContent | | 聚合于 | Compu.compuContent |

属性 类型 多重性 种类 备注
compuScale (ordered) CompuScale * aggr This represents one scale within the compu method. Note that it contains a Variationpoint in order to support blueprints of enumerations. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=compuScale, compuScale.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=40 xml.typeElement=false xml.typeWrapperElement=false

表5.75:CompuScaleContents(CompuScaleContents)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This abstract meta-class represents the content of one particular scale. | | 基类 | ARObject | | 子类 | CompuScaleConstantContents, CompuScaleRationalFormula | | 聚合于 | CompuScale.compuScaleContents |

表5.76:CompuConstTextContent(CompuConstTextContent)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the textual content of a scale. | | 基类 | ARObject , CompuConstContent | | 聚合于 | CompuConst.compuConstContentType | | 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that the constant value of the computation method is a numerical value. It is separated from CompuConstFormulaContent to support compatibility with ASAM HDO. | | 基类 | ARObject , CompuConstContent | | 聚合于 | CompuConst.compuConstContentType |

属性 类型 多重性 种类 备注
vt VerbatimString 0..1 attr This represents a textual constant in the computation method.
Class CompuConstNumericContent
v Numerical 0..1 attr This represents the numerical value. Tags: xml.sequenceOffset=50

表5.77:CompuRationalCoeffs(CompuRationalCoeffs)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the ability to express a rational function by specifying the coefficients of nominator and denominator. | | 基类 | ARObject | | 聚合于 | CompuScaleRationalFormula.compuRationalCoeffs |

属性 类型 多重性 种类 备注
compu Denominator CompuNominator Denominator 0..1 aggr This is the denominator of the expression. Tags: xml.sequenceOffset=30
compu Numerator CompuNominator Denominator 0..1 aggr This is the numerator of the rational expression. Tags: xml.sequenceOffset=20

表5.78:MultiLanguageOverviewParagraph(MultiLanguageOverviewParagraph)

| 包 | M2::MSR::Documentation::TextModel::MultilanguageData | | 说明 | This is the content of a multilingual paragraph in an overview item. | | 基类 | ARObject | | 聚合于 | Caption.desc, CompuScale.desc, Describable .desc, Identifiable .desc, LabeledItem.itemLabel, Modification.change, Modification.reason, ScaleConstr.desc, SdgCaption.desc, SwRecordLayoutGroup. desc, SwRecordLayoutV.desc, VariationPoint.desc |

属性 类型 多重性 种类 备注
l2 LOverviewParagraph 1..* aggr This represents the text in one particular language. Tags: xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false

CompuRationalCoeffs . compuDenominator 属性的存在性:

CompuRationalCoeffs . compuNumerator 属性的存在性:

表5.79:CompuConst(CompuConst)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that the value of a computation method scale is constant. | | 基类 | ARObject | | 聚合于 | Compu.compuDefaultValue, CompuScale.compuInverseValue, CompuScaleConstantContents.compu Const |

属性 类型 多重性 种类 备注
compuConst ContentType CompuConstContent 0..1 aggr This is the actual content of the constant compu method scale. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=10 xml.typeElement=false xml.typeWrapperElement=false

表5.80:CompuConstContent(CompuConstContent)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that the constant value of the computation method can be numerical or textual. | | 基类 | ARObject | | 子类 | CompuConstFormulaContent, CompuConstNumericContent, CompuConstTextContent | | 聚合于 | CompuConst.compuConstContentType |

表5.81:CompuScaleRationalFormula(CompuScaleRationalFormula)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that the computation in this scale is represented as rational term. | | 基类 | ARObject , CompuScaleContents | | 聚合于 | CompuScale.compuScaleContents |

属性 类型 多重性 种类 备注
compuRational Coeffs CompuRationalCoeffs 0..1 aggr This specifies the coefficients of the rational formula. Tags: xml.sequenceOffset=110

表5.82:CompuScaleConstantContents(CompuScaleConstantContents)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that a particular scale of the computation method is constant. | | 基类 | ARObject , CompuScaleContents | | 聚合于 | CompuScale.compuScaleContents |

表5.83:CompuScaleConstantContents(CompuScaleConstantContents)

属性 类型 多重性 种类 备注
compuConst CompuConst 0..1 aggr This represents the fact that the scale is a constant. The use case is mainly a non interpolated scale. It is a simplification of the fact that a constant scale can also be expressed as rational function of order 0. Tags: xml.sequenceOffset=90

表5.84:CompuNominatorDenominator(CompuNominatorDenominator)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This class represents the ability to express a polynomial either as Nominator or as Denominator. | | 基类 | ARObject | | 聚合于 | CompuRationalCoeffs.compuDenominator, CompuRationalCoeffs.compuNumerator |

属性 类型 多重性 种类 备注
v (ordered) Numerical * attr this is the list of polynomial factors. Note that the first vf represents the power=0. The polynomial is v[0] * xˆ0 + v[1] * xˆ1 ... Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false

请注意,有理公式中系数的值不限于整数值。也可以使用浮点值。

指数的值不能任意设置,而是由 CompuNominatorDenominator.v 中系数的出现隐式定义,即 CompuNominatorDenominator.v 有序列表中的第一个值表示指数 0,第二个表示指数 1,依此类推。

5.5.1.1. CompuMethod 上下文中的类别值

关于 CompuMethod 的详细描述,请参见 ASAM MCD 2 Harmonized Data Objects [28]。

([TPS_SWCT_01877])包含属性 category 可能值的定义。:

TEXTTABLE 允许的结构:

[TPS_SWCT_01877] CompuMethod 支持的 category 的描述

| ASAM Category | Meaning |

| IDENTICAL | This CompuMethod just hands over the internal value with an optional unit. | | LINEAR | A linear conversion can be per- formed in two steps: The inter- nal value is multiplied with a fac- tor; after that, an offset is added to the result of the multiplication. | | SCALE_LINEAR | Used for a piecewise linear con- version. | | SCALE_LINEAR_AND_ TEXTTABLE | Used for piecewise definition of one or more linear and several texttable scales. | | RAT_FUNC | The rational function type is sim- ilar to the linear type without the restrictions for the com- puNumerator s and compuDe- nominator s. | | SCALE_RAT_FUNC | Used for piecewise defined ra- tional conversion. | | SCALE_RATIONAL_AND_ TEXTTABLE | Used for piecewise definition of one rational and several text- table scales. | | TEXTTABLE | The type TEXTTABLE is used for transformations of the inter- nal value into textual elements. | | TAB_NOINTP | Similar to TEXTTABLE , but for numerical values. | | BITFIELD_TEXTTABLE | Similar to TEXTTABLE but for bit fields. |

BITFIELD_TEXTTABLE 中 vt 的限值:

5.5.1.2. CompuMethod 上下文中属性的适用性

本节总结 CompuMethod 的适用性,即依据以属性 category 的值表达的 CompuMethod 性质,应使用 CompuMethod 及相关元类(例如 CompuScale、CompuConst)的哪些属性。

attributes of CompuMethod and related meta-classes depending on the value of the category 的存在性:

| | Attribute Existence per Category |

| Attributes of CompuMethod | IDENTICAL | | compuInternalToPhys | | | compuPhysToInternal | | | Attributes of meta-classes related to CompuMethod | | | compuDefaultValue | | | CompuScale | | | CompuScale . compuInverseValue | | | CompuScale . lowerLimit | | | CompuScale . mask | | | CompuScale . shortLabel | | | CompuScale . a2lDisplayText | | | CompuScale . symbol | | | CompuScale . upperLimit | | | CompuConst | | | CompuRationalCoeffs | | | CompuRationalCoeffs . compuDenominator | | | CompuRationalCoeffs . compuNumerator | |

该规则应在合同阶段生成执行时施加。

为澄清起见,[constr_1375] 所含表的前两行定义元类 CompuMethod 直接属性的适用性,表的其余部分进一步细化相关元类(例如 CompuScale、CompuConst)属性的使用。

请注意,注解适用于单个单元格值。这些注解借助括号中的数值表述,例如 (1)。

以下图例适用于 [constr_1375] 所含表中的单元格:

空单元格:属性不适用于在本元素范围内的使用。

O 可选地定义该属性。

除基本单元格图例之外,以下注解适用于 [constr_1375] 所含表中的单元格:

  • (1) 在这种情况下,应定义 compuPhysToInternal 或 compuInternalToPhys 之一;

  • (2) 在这种情况下,除非 compuInverseValue 存在(见 [TPS_SWCT_01282]),否则应同时定义 compuPhysToInternal 和 compuInternalToPhys。换言之,如果存在 compuInverseValue 的显式定义,则无需定义内部到物理及反向的换算;

  • (3) 不适用于属性 compuScaleContents.compuConst 存在的 CompuScale;

  • (4) 限值应按 [constr_1022] 定义;

  • (5) 适用按 [constr_1134] 对 CompuMethod 结构的限制;

  • (6) 如果待转换的值超出合理性限值,则为换算公式规定一个输出值(更多信息请参见 Compu 的类表);

  • (7) 属性 CompuScale.symbol 的受限适用性,见 [constr_1146];

  • (8) 对 CompuConst 强制;对 CompuRationalCoeffs 强制执行。

5.5.1.3. CompuMethod 与 AutosarDataType

本章澄清 CompuMethod 对 AutosarDataType 相关具体子类的适用性。

5.5.1.3.1. CompuMethod 与 ApplicationDataType

对 ApplicationDataType 而言,(见 [constr_1007])有若干 category 值允许定义 ApplicationDataType.swDataDefProps.compuMethod。

([constr_1634])可视化 ApplicationDataType.category 与 CompuMethod.category 的允许组合。:

[constr_1634] 所含表的行表示按 [constr_1007] 获准为定义 CompuMethod 的 ApplicationDataType 的 category 值。

[constr_1634] 所含表的列表示 CompuMethod 的 category 值。

ApplicationDataType.category 与 CompuMethod.category 的允许组合:

| | IDENTICAL |

| VALUE | x | | VAL_BLK | x | | BOOLEAN | | | CURVE | x | | MAP | x | | CUBOID | x | | CUBE_4 | x | | CUBE_5 | x |

该规则应在合同阶段生成执行时施加。

5.5.1.3.2. CompuMethod 与 ImplementationDataType

对 ImplementationDataType 而言,(见 [constr_1009])只有两个 category 值允许定义 ImplementationDataType.swDataDefProps.compuMethod:TEXTTABLE 和 BITFIELD_TEXTTABLE。

[constr_1158] 所含表的行表示按 [constr_1009] 获准为定义 CompuMethod 的 ImplementationDataType 的 category 值。

[constr_1158] 所含表的列表示 CompuMethod 的 category 值。

属性 ImplementationDataType.swDataDefProps.compuMethod 的适用 category:

| | IDENTICAL |

| VALUE | | | TYPE_REFERENCE | |

该规则应在合同阶段生成执行时施加。

5.5.1.4. CompuMethod 与 A2L

属性 CompuScale.a2lDisplayText 不为 AUTOSAR 模型的语义作贡献,它只是支持把 AUTOSAR CompuMethod 转换为 A2L COMPU_VTAB 的便利捷径。

为了后续必须使用由 AUTOSAR 模型创建的 A2L 内容的标定和测量工程师的利益,强烈建议所有合格的 CompuMethod 都应定义相应的 CompuScale.a2lDisplayText 值。

然而,对于合格的 CompuMethod 不含 CompuScale.a2lDisplayText 的情形,本规范几乎无法提供任何有约束力的规则。

如果 AUTOSAR 内有强烈控制生成的 A2L 文件中显示文本应是什么样子的意图,那么 [TPS_SWCT_01878] 将被表述为

20 具有 “点区间” 且可转换为 A2L 中 COMPU_VTAB 的 CompuMethod,即 category 为 TEXTTABLE 和 BITFIELD_TEXTTABLE 的 CompuMethod。

一个(有别于规范项的)约束,要求在适用处存在 CompuScale.a2lDisplayText。

属性 CompuScale.a2lDisplayText 的适用性:

  • TEXTTABLE

  • BITFIELD_TEXTTABLE

并且仅当以下值

  • CompuScale.lowerLimit

  • CompuScale.upperLimit

相同时。(否则)应忽略 CompuScale.a2lDisplayText 的值。

5.5.2. 物理维度

物理量纲(Physical dimension):

把值换算到其他单位(如 km/h 到 miles/h)也是可能的。因此,单位包含关于其物理量纲的信息。

物理量纲(Physical dimension):

七个基本量纲各自的指数:

物理指数的默认值:

负指数:

21 关于 SI 单位的定义,见 http://physics.nist.gov/cuu/Units/。

表5.85:PhysicalDimension(PhysicalDimension)

| 包 | M2::MSR::AsamHdo::Units | | 说明 | This class represents a physical dimension. If the physical dimension of two units is identical, then a conversion between them is possible. The conversion between units is related to the definition of the physical dimension. Note that the equivalence of the exponents does not per se define the convertibility. For example Energy and Torque share the same exponents (Nm). Please note further the value of an exponent does not necessarily have to be an integer number. It is also possible that the value yields a rational number, e.g. to compute the square root of a given physical quantity. In this case the exponent value would be a rational number where the numerator value is 1 and the denominator value is 2. Tags: atp.recommendedPackage=PhysicalDimensions | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
currentExp Numerical 0..1 attr This attribute represents the exponent of the physical dimension "electric current". Tags: xml.sequenceOffset=50
lengthExp Numerical 0..1 attr The exponent of the physical dimension "length". Tags: xml.sequenceOffset=20
luminous IntensityExp Numerical 0..1 attr The exponent of the physical dimension "luminous intensity". Tags: xml.sequenceOffset=80
massExp Numerical 0..1 attr The exponent of the physical dimension "mass". Tags: xml.sequenceOffset=30
molarAmount Exp Numerical 0..1 attr The exponent of the physical dimension "quantity of substance". Tags: xml.sequenceOffset=70
temperatureExp Numerical 0..1 attr The exponent of the physical dimension "temperature". Tags: xml.sequenceOffset=60
timeExp Numerical 0..1 attr The exponent of the physical dimension "time". Tags: xml.sequenceOffset=40

AUTOSAR 提供把两个 PhysicalDimension 相互映射的能力,含义是两个被映射的 PhysicalDimension 应被视为兼容。

如 [constr_1053] 所解释,关于 PhysicalDimension 兼容性的唯一自由度是 shortName 的值。

换言之,借助 PhysicalDimensionMapping 的定义,可以声明:两个指数属性值完全相同、只是 shortName 不同的 PhysicalDimension 仍被视为匹配。

这一支持兼容性评估的声明不是在全局范围进行,而是在 CompositionSwComponentType 的上下文中通过角色 CompositionSwComponentType.physicalDimensionMapping 中的引用完成。

定义指数属性值完全相同但 shortName 不同的 PhysicalDimension 的主要用例,是增加集成来自不同贡献者(各自定义自己的 PhysicalDimension 集合)的模型内容的机会。

PhysicalDimensionMapping 以 PhysicalDimensionMappingSet 的形式聚合。这允许把语义相关的 PhysicalDimensionMapping 收集到同一 PhysicalDimensionMappingSet 中。

表5.86:PhysicalDimensionMapping(PhysicalDimensionMapping)

| 包 | M2::MSR::AsamHdo::Units | | 说明 | This class represents a specific mapping between two PhysicalDimensions. | | 基类 | ARObject | | 聚合于 | PhysicalDimensionMappingSet.physicalDimensionMapping |

属性 类型 多重性 种类 备注
firstPhysical Dimension PhysicalDimension 0..1 ref This represents the first PhysicalDimension of the enclosing PhysicalDimensionMapping.
secondPhysical Dimension PhysicalDimension 0..1 ref This represents the first PhysicalDimension of the enclosing PhysicalDimensionMapping.

表5.87:PhysicalDimensionMappingSet(PhysicalDimensionMappingSet)

| 包 | M2::MSR::AsamHdo::Units | | 说明 | This class represents a container for a list of mappings between PhysicalDimensions. Tags: atp.recommendedPackage=PhysicalDimensionMappingSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
physical Dimension Mapping PhysicalDimension Mapping * aggr This aggregation represents a concrete collections of PhysicalDimensionMappings in the context of one PhysicalDimensionMappingSet.

PhysicalDimensionMapping . firstPhysicalDimension 属性的存在性:

PhysicalDimensionMapping . secondPhysicalDimension 属性的存在性:

5.5.3. 单位与单位组

单位引用一个物理量纲:

表5.88:Unit(Unit)

| 包 | M2::MSR::AsamHdo::Units | | 说明 | This is a physical measurement unit. All units that might be defined should stem from SI units. In order to convert one unit into another factor and offset are defined. For the calculation from SI-unit to the defined unit the factor (factorSiToUnit ) and the offset (offsetSiTo Unit ) are applied as follows: x [{unit}] := y * [{siUnit}] * factorSiToUnit [[unit]/{siUnit}] + offsetSiToUnit [{unit}] For the calculation from a unit to SI-unit the reciprocal of the factor (factorSiToUnit ) and the negation of the offset (offsetSiToUnit ) are applied. y {siUnit} := (x*{unit} - offsetSiToUnit [{unit}]) / (factorSiToUnit [[unit]/{siUnit}] Tags: atp.recommendedPackage=Units | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
displayName SingleLanguageUnit Names 0..1 aggr This specifies how the unit shall be displayed in documents or in user interfaces of tools.The displayName corresponds to the Unit.Display in an ASAM MCD-2MC file. Tags: xml.sequenceOffset=20
factorSiToUnit Float 0..1 attr This is the factor for the conversion from SI Units to units. The inverse is used for conversion from units to SI Units. Tags: xml.sequenceOffset=30
offsetSiToUnit Float 0..1 attr This is the offset for the conversion from and to siUnits. Tags: xml.sequenceOffset=40
physical Dimension PhysicalDimension 0..1 ref This association represents the physical dimension to which the unit belongs to. Note that only values with units of the same physical dimensions might be converted. Tags: xml.sequenceOffset=50

表5.89:SingleLanguageUnitNames(SingleLanguageUnitNames)

| 包 | M2::MSR::Documentation::TextModel::SingleLanguageData | | 说明 | This represents the ability to express a display name. | | 基类 | ARObject , MixedContentForUnitNames |

表5.90:SingleLanguageUnitNames(SingleLanguageUnitNames)

| 聚合于 | PrmCharNumericalContents.prmUnit, SwAxisCont.unitDisplayName, SwValueCont.unitDisplayName, Unit.displayName |

UnitGroup:

图 5.47 描绘了如何定义单位的概念。

关于这些元素的详细描述请参见 [28]。标准单位已以描述文件的形式为 AUTOSAR 预定义。

Unit.physicalDimension 的默认值:

注意,像 “%” 这样的量不是从 SI 单位派生的,因此与物理量纲没有关联。

单位的示例定义见第 B.2.2 节。

单位的兼容性:

  • 一个又引用 Unit 的 CompuMethod;

  • 一个又引用 Unit 的 DataConstr

则从以下处引用的 Unit

  • SwDataDefProps;

  • SwDataDefProps.compuMethod;

  • SwDataDefProps.dataConstr

应在合同阶段生成执行时兼容。

请注意,为了模型一致性,也可以为概念上并不真正附带 Unit 的所有数据(例如 category 为 BOOLEAN 的 ApplicationPrimitiveDataType)定义一个无意义的 Unit。

从模型可以看出,是否指派 Unit 这一问题已被认真考虑,缺少 Unit 并非疏忽的结果。例如,AUTOSAR General Blueprints [29] 正是为此目的定义了 Unit NoUnit。

category 为 BOOLEAN 和 STRING 的 ApplicationPrimitiveDataType:

可以借助 UnitGroup 对单位分组:

表5.91:UnitGroup(UnitGroup)

| 包 | M2::MSR::AsamHdo::Units | | 说明 | This meta-class represents the ability to specify a logical grouping of units.The category denotes the unit system that the referenced units are associated to. In this way, e.g. country-specific unit systems (CATEGORY="COUNTRY") can be defined as well as specific unit systems for certain application domains. In the same way a group of equivalent units, can be defined which are used in different countries, by setting CATEGORY="EQUIV_UNITS". KmPerHour and MilesPerHour could such be combined to one group named "vehicle_speed". The unit MeterPerSec would not belong to this group because it is normally not used for vehicle speed. But all of the mentioned units could be combined to one group named "speed". Note that the UnitGroup does not ensure the physical compliance of the units. This is maintained by the physical dimension. Tags: atp.recommendedPackage=UnitGroups | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
unit Unit * ref This represents one particular unit in the UnitGroup. Tags: xml.sequenceOffset=20

从 SwComponentType 到 UnitGroup 的关联(除允许规定尤其与外围 SwComponentType 相关的 unitGroup 这一明显用例之外)应支持标识与外围 System 相关的 UnitGroup。这一方面便于为具体 ECU 创建 ASAM MCD2 文件。

按照 [28],在 UnitGroup 的上下文中推荐以下三个 category 值:

  • COUNTRY 收集在特定国家常用的单位,由 UnitGroup 的 shortName/longName 表示;

  • CALCULATION 指为创建数据类型而设的特定单位。在这一 UnitGroup 类别中,若干 Unit 可以引用同一 PhysicalDimension,也可以引用不同的 PhysicalDimension;

  • EQUIV_UNITS 定义一组等价单位,例如在不同国家使用的单位。

category 的附加值可以由利益相关方相互商定。

在图 5.49 所示的示例中,单位按国家和用途分类。

假定 “MilesPerHour” 应转换为欧洲单位:基于 physicalDimension,可以转换为 “MeterPerSec” 以及 “KmPerHour”。在这种情况下首选 “KmPerHour”,因为 “MilesPerHour” 和 “KmPerHour” 都是名为 “VehicleSpeed” 的 UnitGroup 的成员。

与此相反,在这个特定示例中,“MeterPerSec” 不被视为适合 “VehicleSpeed”。

单位的换算:

5.5.4. 数据约束

第 5.2.4.1 节已经展示了如何为数据类型的物理范围定义约束的示例,见图 5.4。

DataConstr:

图 5.50 及随后的类表展示了定义约束所涉及的元类。

这些元类的更详细文档见 [28]。作为这些定义的细化,以下值适用于 constrLevel:

DataConstrRule.constrLevel 的应用:

  • 0:这表示所谓 “硬限值”。应始终规定它们;

  • 1:这表示所谓 “软限值”。软限值可以在 MCD 系统用户确认后被违反。

该规则在合同阶段生成执行时适用。可以存在其他值,但其语义超出 AUTOSAR 范围。

()

ASAM-MCD2 (ASAP2) 规范中的标准限值与扩展限值:

  • 如果只规定了一个 constrLevel 设置为 0 的 DataConstrRule,它表示 A2L 中的标准限值。不生成扩展限值;

  • 如果存在两个 DataConstrRule,则:

  • constrLevel 设置为 0 的那个对应扩展限值;

  • constrLevel 设置为 1 的那个对应标准限值。

注意,即使这在某种程度上反直觉(因为 constrLevel 设置为 0 的那个改变了其角色),它与 ASAM-MCD2 中的定义匹配得最好。

表5.92:DataConstr(DataConstr)

| 包 | M2::MSR::AsamHdo::Constraints::GlobalConstraints | | 说明 | This meta-class represents the ability to specify constraints on data. Tags: atp.recommendedPackage=DataConstrs | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dataConstrRule DataConstrRule * aggr This is one particular rule within the data constraints. Tags: xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=30 xml.typeElement=false xml.typeWrapperElement=false

表5.93:DataConstrRule(DataConstrRule)

| 包 | M2::MSR::AsamHdo::Constraints::GlobalConstraints | | 说明 | This meta-class represents the ability to express one specific data constraint rule. | | 基类 | ARObject | | 聚合于 | DataConstr.dataConstrRule |

属性 类型 多重性 种类 备注
constrLevel Integer 0..1 attr This attribute describes the category of a constraint. One of its functions is in the area of constraint violation, where it can be used from a certain level, to produce error messages. The lower the level, the more stringent the check. Used to distinguish hard or soft limits. Tags: xml.sequenceOffset=20

表5.94:DataConstrRule(DataConstrRule)

属性 类型 多重性 种类 备注
internalConstrs InternalConstrs 0..1 aggr Describes the limitations applicable on the internal domain (as opposed to the physical domain). Tags: xml.sequenceOffset=40
physConstrs PhysConstrs 0..1 aggr Describes the limitations applicable on the physical domain (as opposed to the internal domain). Tags: xml.sequenceOffset=30

表5.95:PhysConstrs(PhysConstrs)

| 包 | M2::MSR::AsamHdo::Constraints::GlobalConstraints | | 说明 | This meta-class represents the ability to express physical constraints. Therefore it has (in opposite to InternalConstrs) a reference to a Unit. | | 基类 | ARObject | | 聚合于 | DataConstrRule.physConstrs | | 包 | M2::MSR::AsamHdo::Constraints::GlobalConstraints | | 说明 | This meta-class represents the ability to express internal constraints. | | 基类 | ARObject | | 聚合于 | DataConstrRule.internalConstrs |

属性 类型 多重性 种类 备注
lowerLimit Limit 0..1 attr This specifies the lower limit of the constraint. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=20
maxDiff Numerical 0..1 attr Maximum difference that is permitted between two consecutive values if the constraint is applied to an axis. Tags: xml.sequenceOffset=60
maxGradient Numerical 0..1 attr This element specifies the maximum slope that may be used in curves and maps. Tags: xml.sequenceOffset=50
monotony MonotonyEnum 0..1 attr This specifies the monotony constraints on the data object. Note that this applies only to curves and maps. Tags: xml.sequenceOffset=70
scaleConstr (ordered) ScaleConstr * aggr This is one particular scale which contributes to the data constraints. Tags: atp.Status=obsolete xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=40 xml.typeElement=false xml.typeWrapperElement=false
unit Unit 0..1 ref This is the unit to which the physical constraints relate to. In particular, it is the physical unit of the specified limits. Tags: xml.sequenceOffset=80
upperLimit Limit 0..1 attr This specifies the upper limit of the constraint. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=30
Class InternalConstrs
lowerLimit Limit 0..1 attr This specifies the lower limit of the constraint. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=20
maxDiff Numerical 0..1 attr Maximum difference that is permitted between two consecutive values if the constraint is applied to an axis. Tags: xml.sequenceOffset=60
maxGradient Numerical 0..1 attr This element specifies the maximum slope that may be used in maps and curves. Tags: xml.sequenceOffset=50
monotony MonotonyEnum 0..1 attr This element specifies the monotony characteristics of the current internal or physical limits. The following table shows the monotony characteristics which are to be filled through the corresponding values. If the element has no contents or if it is omitted, "no Monotony" is the default content. Tags: xml.sequenceOffset=70
scaleConstr (ordered) ScaleConstr * aggr This is one particular scale which contributes to the data constraints. Tags: atp.Status=obsolete xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=40 xml.typeElement=false
upperLimit Limit 0..1 attr This specifies the upper limit defined by the constraint. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=30

表5.96:Limit(Limit)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This class represents the ability to express a numerical limit. Note that this is in fact a NumericalVariation Point but has the additional attribute intervalType. Tags: xml.xsd.customType=LIMIT-VALUE xml.xsd.pattern=(0[xX][0-9a-fA-F]+)|(0[0-7]+)|(0[bB][0-1]+)|(([+-]?[1-9] [0-9]+(.[0-9]+)?|[+-]?0-9?)(eE[0-9]+)?)|.0|INF|-INF|NaN xml.xsd.type=string |

表5.97:Limit(Limit)

属性 类型 多重性 种类 备注
intervalType IntervalTypeEnum 0..1 attr This specifies the type of the interval. If the attribute is missing the interval shall be considered as "CLOSED". Tags: xml.attribute=true

表5.98:MonotonyEnum(MonotonyEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This enumerator denotes the values for specification of monotony for e.g. curves. | | 聚合于 | InternalConstrs.monotony, PhysConstrs.monotony, SwCalprmAxisTypeProps .monotony |

字面值 说明
decreasing This indicates that the related curve needs to be monotony decreasing. Tags: atp.EnumerationLiteralIndex=0
increasing This indicates that the related curve needs to be monotony increasing. Tags: atp.EnumerationLiteralIndex=1
monotonous This indicates that the values shall be monotonously decreasing or increasing, depending on the trend set by the first values of the series. Tags: atp.EnumerationLiteralIndex=2
noMonotony This indicates that the related curve needs not to be monotony. Tags: atp.EnumerationLiteralIndex=3
strictlyDecreasing This indicates that the related curve needs to be strictly monotony decreasing. Tags: atp.EnumerationLiteralIndex=4
strictlyIncreasing This indicates that the related curve needs to be strictly monotony increasing. Tags: atp.EnumerationLiteralIndex=5
strictMonotonous This indicates that the values shall be strict monotonously decreasing or increasing, depending on the trend set by the first values of the series. Tags: atp.EnumerationLiteralIndex=6

工具对 PhysConstrs 和 InternalConstrs 的解释:

为避免冲突,在两种情况下,PhysConstrs 都应由工具仅就应用数据类型解释,而 InternalConstrs 应仅就实现数据类型解释。

如果只为 ApplicationDataType 提供 PhysConstrs,则 CompuMethod 可用于计算 InternalConstrs。

Limit 的语义:

range = { x ∈ ℝ ‖ lowerLimit.value < x < upperLimit.value } ∪ { lowerLimit.value ‖ lowerLimit.intervalType == 'CLOSED' } ∪ { upperLimit.value ‖ upperLimit.intervalType == 'CLOSED' }

请注意,Limit 继承自 AbstractNumericalVariationPoint。这意味着它是一个可能受可变性支配的数。因此,不可能已在 XML 模式中约束其内容。

Limit 的值应产生一个数值:

尽管如此,在这个层级无法区分 float 值和整数值。因此,[constr_1191] 不会免除 AUTOSAR 工具判断作为限值提供的值在任何给定上下文中是否真正合理的负担。

表5.99:IntervalTypeEnum(IntervalTypeEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This enumerator specifies the type of an interval. | | 聚合于 | Limit.intervalType, LimitValueVariationPoint.intervalType |

字面值 说明
closed The area is limited by the value given. The value itself is included. Tags: atp.EnumerationLiteralIndex=0
open The area is limited by the value given. The value itself is not included. Tags: atp.EnumerationLiteralIndex=2
5.5.4.1. 物理限值

物理限值可以在 AUTOSAR 元模型的多个位置给出,例如在 ApplicationDataType、DataPrototype 的上下文中,但也在不使用类型-原型模式的复合原始数据类型中(例如 SwAxisIndividual.dataConstr)。

尽管如此,PhysConstrs 的使用需要 CompuMethod 来计算数值限值,而它不能应用于文本换算。因此适用以下定义:

纯文本换算的物理限值:

(不应使用 PhysConstrs)为只能取一组文本标签的元素作为值的对象定义限值。

请注意,作为 [TPS_SWCT_01761] 的后果,对于由 category 为 TEXTTABLE 或 BITFIELD_TEXTTABLE 的 CompuMethod 定义、且另外带有带 dataConstrRule.physConstrs 的 DataConstr 的数据,给定的 physConstrs 没有意义。

混合文本换算的物理限值:

此外,已定义的文本标签可用于换算。

为澄清起见,[TPS_SWCT_01761] 和 [TPS_SWCT_01762] 不限制 DataConstr.dataConstrRule.internalConstrs 的使用——它可以在实现层级定义进一步甚至更紧的约束。

这些 internalConstrs 甚至可以在复合原始数据类型的上下文中给出(例如在 SwAxisIndividual.inputVariableType 的上下文中(见 [TPS_SWCT_01865])或 SwAxisIndividual.dataConstr 中)。

5.5.5. 寻址方法

在 ECU 中,可能存在多种按给定地址访问特定对象(例如测量或标定参数)的方法。这种多样性可能来自不同种类的内存(near、far 等),但也来自编译器引入的间接访问。

SwAddrMethod:

SwAddrMethod 将用于对数据分组,例如涵盖这样一种情况:有时要求把一个 SwComponentPrototype(即 AUTOSAR 软件组件)全部标定参数集合中的一个或多个标定参数放到与该 SwComponentPrototype(即 AUTOSAR 软件组件)其他参数不同的内存位置。

MemorySection 与 SwAddrMethod 的关联:

从 MemorySection 到 ExecutableEntity 的引用:

表5.100:MemorySection(MemorySection)

| 包 | M2::AUTOSARTemplates::CommonStructure::ResourceConsumption::MemorySectionUsage | | 说明 | Provides a description of an abstract memory section used in the Implementation for code or data. It shall be declared by the Implementation Description of the module or component, which actually allocates the memory in its code. This means in case of data prototypes which are allocated by the RTE, that the generated Implementation Description of the RTE shall contain the corresponding MemorySections. The attribute "symbol" (if symbol is missing: "shortName") defines the module or component specific section name used in the code. For details see the document "Specification of Memory Mapping". Typically the section name is build according the pattern: [][] where • [] is the shortName of the referenced SwAddrMethod • [] is an optional infix to indicate the specialization in the case that several MemorySections for different purpose of the same Implementation Description referring to the same or equally named SwAddrMethods. • [] is the alignment attributes value and is only applicable in the case that the memory AllocationKeywordPolicy value of the referenced SwAddrMethod is set to addrMethodShortNameAnd Alignment MemorySection used to Implement the code of RunnableEntitys and BswSchedulableEntitys shall have a symbol (if missing: shortName) identical to the referred SwAddrMethod to conform to the generated RTE header files. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ResourceConsumption.memorySection |

属性 类型 多重性 种类 备注
alignment AlignmentType 0..1 attr The attribute describes the typical alignment of objects within this memory section.
executableEntity ExecutableEntity * ref Reference to the ExecutableEntitites located in this section. This allows to locate different Executable Entitities in different sections even if the associated Sw Addrmethod is the same. This is applicable to code sections only.
option Identifier * attr The service (in AUTOSAR: BswModuleEntry) is implemented in a way that it either resolves to aninline function or to a standard function depending on conditions set at a later point in time. The following two values are standardized (to be used for code sections only and exclusively to each other): • INLINE - The code section is declared with the keyword "inline". • LOCAL_INLINE - The code section is declared with the keyword "static inline". In both cases (INLINE and LOCAL_INLINE) the inline expansion depends on the compiler. Depending on this, the code section either corresponds to an actual section in memory or is put into the section of the caller.
Class MemorySection
prefix SectionNamePrefix 0..1 ref The prefix used to set the memory section's namespace in the code. The existence of a prefix element supersedes rules for a default prefix (such as the Bsw ModuleDescription's shortName). This allows the user to define several name spaces for memory sections within the scope of one module, cluster or SWC.
size PositiveInteger 0..1 attr The size in bytes of the section.
swAddrmethod SwAddrMethod 0..1 ref This association indicates that this module specific (abstract) memory section is part of an overall SwAddr Method, referred by the upstream declarations (e.g. calibration parameters, data element prototypes, code entities) which share a common addressing strategy. This can be evaluated for the ECU configuration of the build support. This association shall always be declared by the Implementation description of the module or component, which allocates the memory in its code. This means in case of data prototypes which are allocated by the RTE, that the software components only declare the grouping of its data prototypes to SwAddrMethods, and the generated Implementation Description of the RTE actually sets up this association.
symbol Identifier 0..1 attr Defines the section name as explained in the main description. By using this attribute for code generation (instead of the shortName) it is possible to define several different MemorySections having the same name - e.g. symbol = CODE - but using different sectionName Prefixes.

表5.101:SectionNamePrefix(SectionNamePrefix)

| 包 | M2::AUTOSARTemplates::CommonStructure::ResourceConsumption::MemorySectionUsage | | 说明 | A prefix to be used for generated code artifacts defining a memory section name in the source code of the using module or SWC. | | 基类 | ARObject , ImplementationProps , Referrable | | 聚合于 | ResourceConsumption.sectionNamePrefix |

属性 类型 多重性 种类 备注
implementedIn DependencyOnArtifact 0..1 ref Optional reference that allows to Indicate the code artifact (header file) containing the preprocessor implementation of memory sections with this prefix. The usage of this link supersedes the usage of a memory mapping header with the default name (derived from the BswModuleDescription's shortName).

表5.102:DependencyOnArtifact(DependencyOnArtifact)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | Dependency on the existence of another artifact, e.g. a library. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | Implementation .generatedArtifact, Implementation .requiredArtifact, Implementation .requiredGenerator Tool |

表5.103:DependencyOnArtifact(DependencyOnArtifact)

属性 类型 多重性 种类 备注
artifact Descriptor AutosarEngineering Object 0..1 aggr The specified artifact needs to exist.
usage DependencyUsage Enum * attr Specification for which process step(s) this dependency is required.

MemorySection . swAddrmethod 的存在性:

MemorySection . alignment 的存在性:

[constr_10033] 存在的依据:如果 MemorySection 配置为 MemorySection.swAddrmethod.memoryAllocationKeywordPolicy 设置为 MemoryAllocationKeywordPolicyType.addrMethodShortNameAndAlignment,则 alignment 属性是强制的,因为内存映射的实现应能正式地在选择内存段时考虑对齐。

表5.104:SwAddrMethod(SwAddrMethod)

| 包 | M2::MSR::DataDictionary::AuxillaryObjects | | 说明 | Used to assign a common addressing method, e.g. common memory section, to data or code objects. These objects could actually live in different modules or components. Tags: atp.recommendedPackage=SwAddrMethods | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
memory Allocation KeywordPolicy MemoryAllocation KeywordPolicyType 0..1 attr Enumeration to specify the name pattern of the Memory Allocation Keyword.
option Identifier * attr This attribute introduces the ability to specify further intended properties of the MemorySection in with the related objects shall be placed. These properties are handled as to be selected. The intended options are mentioned in the list. In the Memory Mapping configuration, this option list is used to determine an appropriate MemMapAddressing ModeSet.

表5.105:SwAddrMethod(SwAddrMethod)

属性 类型 多重性 种类 备注
section Initialization Policy SectionInitialization PolicyType 0..1 attr Specifies the expected initialization of the variables (inclusive those which are implementing VariableData Prototypes). Therefore this is an implementation constraint for initialization code of BSW modules (especially RTE) as well as the start-up code which initializes the memory segment to which the AutosarData Prototypes referring to the SwAddrMethod's are later on mapped. If the attribute is not defined it has the identical semantic as the attribute value "INIT"
sectionType MemorySectionType 0..1 attr Defines the type of memory sections which can be associated with this addressing method.

MemorySection.option 与 SwAddrMethod.option 的预定义值:

  • resetSafe:这对应于其值应经受住 ECU 复位的 ECU 功能变量;

  • protected:这对应于在没有安全机制的情况下不得从外部访问和修改的变量、常量和代码;

  • offline:这对应于在 ECU 运行期间不得修改的标定参数;

  • coreGlobal:这对应于在多核 ECU 情况下必须可由任意核访问的变量、常量和代码;

  • coreLocal:这对应于在多核 ECU 情况下必须可由一个核访问的变量、常量和代码;

  • nvData:这对应于应存储在非易失数据中的 ECU 功能变量。该选项适用于用作由 NvM 管理的 RAM 块的内存;

  • safetyQM:这对应于没有任何安全完整性等级、因而具有 QM 等级的变量、常量和代码;

  • safetyAsilA:这对应于具有安全完整性等级 A 的变量、常量和代码;

  • safetyAsilB:这对应于具有安全完整性等级 B 的变量、常量和代码;

  • safetyAsilC:这对应于具有安全完整性等级 C 的变量、常量和代码;

  • safetyAsilD:这对应于具有安全完整性等级 D 的变量、常量和代码。

configClassPreBuild:这对应于在预编译或链接时指派的配置数据。

configClassPostBuild:这对应于在后构建时指派的配置数据。

glyph[floorright]()

显然,属性 MemorySection.option 和 SwAddrMethod.option 的多重性允许出现多于一个值。例如,值 resetSafe、protected 和 safetyAsilC 的组合在特定列表上完全合理,可用于表达把各值的语义相互结合的含义。

然而,这种值的组合不是任意可能的。因此有必要表述一个约束,来规范 [TPS_SWCT_01456] 中提到的安全相关值的出现。

换言之,把出现在同一列表上的两个不同 ASIL [30] 值归于一个给定的内存对象没有任何意义。

如果这些值在特定列表上被组合,预期语义将是含糊的、无法清晰确定。因此适用 [constr_1311]。

MemorySection.option 或 SwAddrMethod.option 安全相关可能值的出现:

  • safetyQM;

  • safetyAsilA;

  • safetyAsilB;

  • safetyAsilC;

  • safetyAsilD。

()

MemorySection.option 或 SwAddrMethod.option 核相关可能值的出现:

  • coreGlobal;

  • coreLocal。

缺失 SwDataDefProps.swAddrMethod:

图 5.52 展示了 SwAddrMethod 在 DataPrototype 上下文中的用法。

SwAddrMethod 在 DataPrototype 上下文中的使用:

原因是:RTE 分配的数据资源将在 RTE 的实现描述中描述。经由 SwAddrMethod 的间接方式使之成为可能。

RTE 生成器必须导出内存分配关键字:

由 RunnableEntity、BswCalledEntity 或 BswSchedulableEntity 引用的 SwAddrMethod:

MemorySection.option 或 SwAddrMethod.option 核相关可能值相对于 SwAddrMethod.sectionInitializationPolicy 的适用性:

[constr_1402] 的目的是降低内存布局的复杂性并减少因分配限制造成的内存空隙数量。

表5.106:SectionInitializationPolicyType(SectionInitializationPolicyType)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | SectionInitializationPolicyType describes the intended initialization of MemorySections. The following values are standardized in AUTOSAR Methodology: • INIT : To be used for (explicitly or not explicitly) initialized variables. • CLEARED : To be used for not explicitly initialized variables. • POWER-ON-CLEARED : To be used for variables that are not explicitly initialized (cleared) during normal start-up. Instead these are cleared only after power on reset. Please note that the values are defined similar to the representation of enumeration types in the XML schema to ensure backward compatibility. Tags: xml.xsd.customType=SECTION-INITIALIZATION-POLICY-TYPE xml.xsd.type=NMTOKEN |

SectionInitializationPolicyType 的标准化值:

INIT:用于(显式或非显式)初始化的变量。

CLEARED:用于非显式初始化的变量。

POWER-ON-CLEARED:用于在正常启动期间不显式初始化(清零)的变量。这些变量只在掉电复位后清零。

该规则应在 RTE 生成时施加。

请注意,目前不支持 SectionInitializationPolicyType 的自定义值。

表5.107:MemorySectionType(MemorySectionType)

| 包 | M2::MSR::DataDictionary::AuxillaryObjects | | 说明 | Enumeration to specify the essential nature of the data which can be allocated in a common memory class by the means of the AUTOSAR Memory Mapping. | | 聚合于 | SwAddrMethod.sectionType |

表5.108:MemorySectionType(MemorySectionType)

属性 类型 多重性 种类 备注
calibrationVariables This memory section is reserved for "virtual variables" that are computed by an MCD system during a measurement session but do not exist in the ECU memory. Tags: atp.EnumerationLiteralIndex=2
calprm To be used for calibratable constants of ECU-functions. Tags: atp.EnumerationLiteralIndex=3
code To be used for mapping code to application block, boot block, external flash etc. Tags: atp.EnumerationLiteralIndex=4
configData Constants with attributes that show that they reside in one segment for module configuration. Tags: atp.EnumerationLiteralIndex=5
const To be used for global or static constants. Tags: atp.EnumerationLiteralIndex=6
excludeFromFlash This memory section is reserved for "virtual parameters" that are taken for computing the values of so-called dependent parameter of an MCD system. Dependent Parameters that are not at the same time "virtual parameters" are allocated in the ECU memory. Virtual parameters, on the other hand, are not allocated in the ECU memory. Virtual parameters exist in the ECU Hex file for the purpose of being considered (for computing the values of dependent parameters) during an offline-calibration session. Tags: atp.EnumerationLiteralIndex=7
var To be used for global or static variables. The expected initialization is specified with the attribute sectionInitializationPolicy. Tags: atp.EnumerationLiteralIndex=9

表5.109:MemoryAllocationKeywordPolicyType(MemoryAllocationKeywordPolicyType)

| 包 | M2::MSR::DataDictionary::AuxillaryObjects | | 说明 | Enumeration to specify the name pattern of the Memory Allocation Keyword. | | 聚合于 | SwAddrMethod.memoryAllocationKeywordPolicy |

字面值 说明
addrMethodShort Name The MemorySection shortNames of referring MemorySections and therefore the belonging Memory Allocation Keywords in the code are build with the shortName of the SwAddrMethod. This is the default value if the attribute does not exist. Tags: atp.EnumerationLiteralIndex=0
addrMethodShort NameAndAlignment The MemorySection shortNames of referring MemorySections and therefore the belonging Memory Allocation Keywords in the code are build with the shortName of the SwAddrMethod and a variable alignment postfix. Thereby the alignment postfix needs to be consistent with the alignment attribute of the related MemorySection. Tags: atp.EnumerationLiteralIndex=1

表5.110:AlignmentType(AlignmentType)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This primitive represents the alignment of objects within a memory section. The value is in number of bits or UNKNOWN (deprecated), 8 , 16, 32, 64 UNSPECIFIED, BOOLEAN, or PTR. Typical values for numbers are 8, 16, 32, 64. Tags: xml.xsd.customType=ALIGNMENT-TYPE xml.xsd.pattern=[1-9][0-9]|0[xX][0-9a-fA-F]|0[bB] [0-1]+|0[0-7]*|UNSPECIFIED|UNKNOWN|BOOLEAN|PTR xml.xsd.type=string |

关于 MemorySection 规定的更多信息见 [6]。

5.5.6. 记录布局

SwRecordLayout:

  • 告知测量和标定系统数据如何在 ECU 的内存中序列化;

  • 确保软件开发产生预期的数据结构;

  • 识别正确的插值例程。

经由 SwDataDefProps,记录布局可以与数据实体关联。如果对多个 ApplicationDataType 使用完全相同的序列化方法,所有

这些数据类型都可以引用同一 SwRecordLayout,即使数据的大小不同。

5.5.6.1. 规定记录布局

如上所述,记录布局的目的是规定一个对象(例如标定参数)如何在 ECU 的内存中序列化。规范的做法是定义嵌套的组(SwRecordLayoutGroup)。

这些组指示相应 ImplementationDataType 的结构。然后,通过遍历曲线、映射表的轴或沿字符串遍历来执行序列化。

这样的记录布局组的内容(SwRecordLayoutGroupContent)是(因而嵌套的)组与值(SwRecordLayoutV)的混合。

这些值引用对象的特定属性(例如 value、count 等)。通过应用这一模式,可以规定任何复杂对象的序列化。

表5.111:SwRecordLayout(SwRecordLayout)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | Defines how the data objects (variables, calibration parameters etc.) are to be stored in the ECU memory. As an example, this definition specifies the sequence of axis points in the ECU memory. Iterations through axis values are stored within the sub-elements swRecordLayoutGroup. Tags: atp.recommendedPackage=SwRecordLayouts | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
swRecord LayoutGroup SwRecordLayoutGroup 0..1 aggr This is the top level record layout group. Tags: xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=20 xml.typeElement=false xml.typeWrapperElement=false

表5.112:SwRecordLayoutV(SwRecordLayoutV)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | This element specifies which values are stored for the current SwRecordLayoutGroup. If no baseType is present, the SwBaseType referenced initially in the parent SwRecordLayoutGroup is valid. The specification of swRecordLayoutVAxis gives the axis of the values which shall be stored in accordance with the current record layout SwRecordLayoutGroup. In swRecordLayoutVProp one can specify the information which shall be stored. | | 基类 | ARObject | | 聚合于 | SwRecordLayoutGroupContent.swRecordLayoutV |

属性 类型 多重性 种类 备注
baseType SwBaseType 0..1 ref This association allows to refer to a base type in case a specific encoding is intended. If no base type is referred, the base type referenced initially in the corresponding DataPrototype is to be used. Tags: xml.sequenceOffset=30
desc MultiLanguageOverview Paragraph 0..1 aggr This aggregation allows for a brief description about the particular record layout value which can help to identify the entry. In-depth documentation should be added to the introduction of the surrounding record layout. Tags: xml.sequenceOffset=20
shortLabel Identifier 0..1 attr This attribute specifies a name which can be used e.g. when ECU code is generated from the record layout value. Tags: xml.sequenceOffset=3
swGenericAxis ParamType SwGenericAxisParam Type 0..1 ref This association supports the case that a value from a generic axis definition shall be stored. This value is denoted by a particular generic axis parameter type. Tags: xml.sequenceOffset=70
Class SwRecordLayoutV
swRecord LayoutVAxis AxisIndexType 0..1 attr This attribute gives the index of the axis of which values that are stored in the record. swRecordVIndex refers to the symbolic names of the iterators for which the axis value shall be stored in the record. In case of nested iterators (mainly for multidimensional objects) the iterator names are specified as whitespace-separated names. These symbolic names relate to swRecordLayoutGroup Index. The iterators are processed from left to right in such a manner that they symbolize the loop index from the outside to the inside. It is considered an error if more components are specified than axes exist in the related ApplicationDataType. Tags: xml.sequenceOffset=40
swRecord LayoutVFix Value Integer 0..1 attr This attribute specifies the filler character for the current record layout, in the form of hex digits. It is also used to specify the fix value for e.g. FIXRIGHTDIFF. Tags: xml.sequenceOffset=80
swRecord LayoutVIndex NameTokens 0..1 attr The symbolic value for iteration, or the symbolic values separated by whitespaces, refer to the symbolic values given in swRecordLayoutGroupIndex . The iterators are processed from left to right, in such a manner that they symbolize the loop index from the outside to the inside. It is considered an error if the record layout is referenced by an entity which has less number of axes than index names referenced here. Tags: xml.sequenceOffset=60
swRecord LayoutVProp NameToken 0..1 attr This attribute describes the kind of values to be stored. More details see below. The standardized values foreseen for this attribute are defined in [TPS_SWCT_01489]. Tags: xml.sequenceOffset=50

表5.113:SwRecordLayoutGroup(SwRecordLayoutGroup)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | Specifies how a record layout is set up. Using SwRecordLayoutGroup it recursively models iterations through axis values. The subelement swRecordLayoutGroupContentType may reference other Sw RecordLayouts, SwRecordLayoutVs and SwRecordLayoutGroups for the modeled record layout. | | 基类 | ARObject | | 聚合于 | SwRecordLayout.swRecordLayoutGroup, SwRecordLayoutGroupContent.swRecordLayoutGroup |

glyph[triangle]

表5.114:SwRecordLayoutGroup(SwRecordLayoutGroup)

属性 类型 多重性 种类 备注
category AsamRecordLayout Semantics 0..1 attr This attribute denotes the semantics in particular in terms of the corresponding A2L-Keyword. This is to support the mapping of the more general record layouts in AUTOSAR/ MSR to the specific A2l keywords. It is possible to express the specific semantics of A2l recordlayout keywords in swRecordlayoutGroup but not always vice versa. Therefore the mapping is provided in this optional attribute. Tags: xml.sequenceOffset=5
desc MultiLanguageOverview Paragraph 0..1 aggr This aggregation allows a brief description about the particular record layout group which can help to identify the entry. In-depth documentation should be added to the introduction of the surrounding record layout. Tags: xml.sequenceOffset=20
shortLabel Identifier 0..1 attr This attribute specifies a name which can be used e.g. when ECU code is generated from the record layout group. Tags: xml.sequenceOffset=3
swGenericAxis ParamType SwGenericAxisParam Type 0..1 ref This association allows to specify record layout groups to iterate over generic axis parameters. For example, if the generic axis parameter is an array, the record layout group will iterate over this array. Obviously, the axis referred to by swRecordLayoutGroup Axis shall be a generic axis in which the referenced Sw GenericAxisType is aggregated. Tags: xml.sequenceOffset=50
swRecord Layout Component Identifier 0..1 attr This attribute is used to denote the component to which the group in question applies. Thus, the record layout supports structured objects. This secures independence from the sequence of components, because they can be referred to via name. Tags: xml.sequenceOffset=90
swRecord LayoutGroup Axis AxisIndexType 0..1 attr This attribute specifies the iteration axis number for a Sw RecordLayoutGroup. The current record layout group then refers exactly to the axis with this number. This means that the values are taken by iterating along the thus referenced axis. Tags: xml.sequenceOffset=30
swRecord LayoutGroup ContentType SwRecordLayoutGroup Content 0..1 aggr This is the contents of the recordLayout which is produced for every step of iteration. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=100 xml.typeElement=false xml.typeWrapperElement=false
swRecord LayoutGroup From RecordLayoutIterator Point 0..1 attr This attribute specifies the iterator index for the point in the axis from which a record layout group is commenced. Negative values are also possible, i.e. the value -4 counts from the fourth value from the end. If this property is missing, the iteration starts with '1'. Tags: xml.sequenceOffset=60

表5.115:SwRecordLayoutGroup(SwRecordLayoutGroup)

属性 类型 多重性 种类 备注
swRecord LayoutGroup Index NameToken 0..1 attr This attribute attributes a symbolic name to the iterator of the superimposed record layout group. This can be referenced as a loop index in contained SwRecordLayout V elements. Tags: xml.sequenceOffset=40
swRecord LayoutGroup Step Integer 0..1 attr This attribute specifies the step width for the iterator index that is used for the current record layout group. Note that negative values are also possible, in case of the starting point is higher than the endpoint. If the property is missing, the step width is "1". Tags: xml.sequenceOffset=80
swRecord LayoutGroupTo RecordLayoutIterator Point 0..1 attr This attribute specifies the end point for the iteration. Negative values are also possible, i.e. the value -4 counts up to the fourth value from the end. If this property is not there, the iteration ends at "-1" which is the last element. Note that depending on the arraySizeSemantics of Sw TextProps the iteration ends at the value specified in sw MaxTextSize. Tags: xml.sequenceOffset=70

表5.116:SwRecordLayoutGroupContent(SwRecordLayoutGroupContent)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | This is the contents of a RecordLayout which is inserted for every iteration. Note that since this is atp Mixed, multiple properties can be inserted for each iteration. | | 基类 | ARObject | | 聚合于 | SwRecordLayoutGroup.swRecordLayoutGroupContentType |

属性 类型 多重性 种类 备注
swRecord Layout SwRecordLayout 0..1 ref This association allows to support reusable "sub"-record layouts. In particular, the contents of the referenced record layout shall be used as if the record layout group in the referenced record layout was aggregated in the current record layout group. So, semantically it would be equivalent to replace the particular association with an aggregation of the sw RecordLayoutGroup of the referenced SwRecordLayout. Tags: xml.sequenceOffset=110
swRecord LayoutGroup SwRecordLayoutGroup 0..1 aggr This aggregation provides support for nested iterations. For example, if a map is to be handled, then we might have two nested SwRecordLayoutGroups, one for the x-axis and one for the y-axis. The inner iteration runs faster. Tags: xml.sequenceOffset=130
swRecord LayoutV SwRecordLayoutV 0..1 aggr Particular Value specification for this record layout group. Tags: xml.sequenceOffset=120

对 CURVE、MAP 等,遍历应沿输入轴执行。

表5.117:AxisIndexType(AxisIndexType)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | This meta-class specifies an axis in a curve/map data object. The index satisfies the following convention: • 0 output "axis" • 1 input axis 1 (X input axis e.g. of a CURVE) • 2 input axis 2 (Y input axis e.g. of a MAP) • 3 input axis 3 (Z input axis e.g. of a CUBOID) • 4 input axis 3 (Z4 input axis e.g. of a CUBE_4) • 5 input axis 3 (Z5 input axis e.g. of a CUBE_5) • 6..9 etc. The output "axis" provides access to the output value of the parameter. Note that this access is usually performed via an index according to the input axis. In addition to this, the Values STRING and ARRAY support specific iterations. Tags: xml.xsd.customType=AXIS-INDEX-TYPE xml.xsd.pattern=[0-9]+|STRING|ARRAY xml.xsd.type=string |

表5.118:RecordLayoutIteratorPoint(RecordLayoutIteratorPoint)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | This meta-class denotes a start / endpoint for the iteration of a SwRecordLayoutGroup. It can be an integer or one of the keywords MAX-TEXT-SIZE|ARRAY-SIZE. Note that negative numbers are counted backwards. Therefore e.g. -1 refers to the last value. Tags: xml.xsd.customType=RECORD-LAYOUT-ITERATOR-POINT xml.xsd.pattern=-?([0-9]+|MAX-TEXT-SIZE|ARRAY-SIZE) xml.xsd.type=string |

[TPS_SWCT_01489] SwRecordLayoutV 标准化值的描述。:

swRecordLayoutVProp(构造型开始)

| Property | Description |

| VALUE | The value of the axis for the current iterator point. This is e.g. the particular point on an input-axis, but also the particular character in a string. | | COUNT | The amount of values of the axis. | | LEFTDIFF | The difference to the previous axis point. | | RIGHTDIFF | The difference to the next axis point. | | DIST | The distance value of this axis in case of a fixed axis with distance specification. | | SHIFT | The shift value of this axis in case of a fixed axis with shift/offset. | | OFFSET | The offset value of this axis in case of a fixed axis with shift/offset. | | FILL | Fill with the hex value specified as contents of swRecordLayoutVFixValue . | | RESERVED | Position shall be ignored by MCD tools. | | IDENTIFIER | An 'identifier' is deposited at the position. | | FIXLEFTDIFF | Difference between this and a fixed left-hand value specified in swRecordLayoutVFixValue . | | FIXRIGHTDIFF | Difference between this and a fixed right-hand value specified in swRecordLayoutVFixValue . |

图 5.54 和图 5.55 展示了这些属性中的大多数。

ASAM MCD-2MC 与 AUTOSAR 在 SwRecordLayout 方面的不同方法:

可能出现这种通用方法并不总能安全地映射到 A2L 关键字的情况。因此,SwRecordLayoutGroup.category 可以辅助向当前 A2L 格式的转换。

表5.119:AsamRecordLayoutSemantics(AsamRecordLayoutSemantics)

| 包 | M2::MSR::DataDictionary::RecordLayout | | 说明 | This meta-class is used to denote the semantics in particular in terms of the corresponding A2L-Keyword. This is to support the mapping of the more general record layouts in AUTOSAR/MSR to the specific A2L keywords. It is possible to express the specific semantics of A2l RecordLayout keywords in SwRecordlayoutGroup but not always vice versa. Therefore the mapping is provided in this optional attribute. It is specified as NMTOKEN to reduce the direct dependency of ASAM an AUTOSAR standards. Tags: xml.xsd.customType=ASAM-RECORD-LAYOUT-SEMANTICS xml.xsd.type=NMTOKEN |

SwRecordLayoutGroup.category 的值例如可以取自 [15] 提供的 ASAM MCD 2D 规范。示例有:

  • INDEX_INCR

  • INDEX_DECR

  • COLUMN_DIR

  • ROW_DIR

  • ALTERNATE_WITH_X

  • ALTERNATE_WITH_Y

  • ALTERNATE_CURVES

注意,A2L 中存在绑定到标定参数的关键字,它们在 MSR/AUTOSAR 中由 SwRecordLayout 表示(DEPOSIT 等)。

第 B.2.4 节给出曲线记录布局的示例定义。

5.5.6.2. 记录布局与数据类型

记录布局的类型:

这在图 5.56 中示例说明。

ApplicationDataType 或 ImplementationDataType 对 swDataDefProps 的符合性:

  • 从相应的 ApplicationDataType 和被引用的 SwRecordLayout 手动创建 ImplementationDataType;

  • 按现有 SwRecordLayout 的定义自动创建 ImplementationDataType。这可以按下方所示算法通过模型变换执行。

从 ImplementationDataType 计算 SwRecordLayout 是不可能的:

生成所需数据类型的算法在下面两幅图中展示。

我们为每个 ApplicationDataType 创建一个 ImplementationDataType。图 5.57 展示了如何映射细节。

请注意,子元素的细化按图 5.58 勾勒的方法进行。

swRecordLayoutGroup 与 subElement 的关系:

该算法应递归应用于新创建的 ImplementationDataTypeElement。由于记录布局组是嵌套的,这一递归产生 ImplementationDataType 中的完整结构。

记录布局的示例定义见附录 B.2.3。

5.5.6.3. 记录布局与插值例程

记录布局与插值例程之间的关系:

插值例程表示为 BswModuleEntry,并实现一个特定的插值方法,该方法在 InterpolationRoutine.shortLabel 的值中标明。

预期的插值方法在属性 SwDataDefProps.swInterpolationMethod 的值中标明。

表5.120:InterpolationRoutineMappingSet(InterpolationRoutineMappingSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::MeasurementAndCalibration::InterpolationRoutine MappingSet | | 说明 | This meta-class specifies a set of interpolation routine mappings. Tags: atp.recommendedPackage=InterpolationRoutineMappingSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
Class InterpolationRoutineMappingSet
interpolation Routine Mapping InterpolationRoutine Mapping * aggr This specifies one particular mapping of recordlayout and its matching interpolationRoutines.

表5.121:InterpolationRoutineMapping(InterpolationRoutineMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::MeasurementAndCalibration::InterpolationRoutine MappingSet | | 说明 | This meta-class provides a mapping between one record layout and its matching interpolation routines. This allows to formally specify the semantics of the interpolation routines. The use case is such that the curves/Maps define an interpolation method. This mapping table specifies which interpolation routine implements methods for a particular record layout. Using this information, the implementer of a software-component can select the appropriate interpolation routine. | | 基类 | ARObject | | 聚合于 | InterpolationRoutineMappingSet.interpolationRoutineMapping |

属性 类型 多重性 种类 备注
interpolation Routine InterpolationRoutine * aggr This is one particular interpolation routine which is mapped to the record layout.
swRecord Layout SwRecordLayout 0..1 ref This refers to the record layout which is mapped to interpolation routines.

表5.122:InterpolationRoutine(InterpolationRoutine)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::MeasurementAndCalibration::InterpolationRoutine MappingSet | | 说明 | This represents an interpolation routine taken to evaluate the contents of a curve or map against a specific input value. | | 基类 | ARObject | | 聚合于 | InterpolationRoutineMapping.interpolationRoutine |

属性 类型 多重性 种类 备注
interpolation Routine BswModuleEntry 0..1 ref This specifies a BswModuleEntry which implements the current interpolation method for the given record layout. Tags: xml.sequenceOffset=30
isDefault Boolean 0..1 attr This attribute specifies whether the enclosing InterpolationRoutine is considered the default in the context (defined by the System Template) of a given collection InterpolationRoutineMapping that owns the enclosing InterpolationRoutine. Tags: xml.sequenceOffset=20

表5.123:InterpolationRoutine(InterpolationRoutine)

属性 类型 多重性 种类 备注
shortLabel Identifier 0..1 attr This is the name of the interpolation method which is implemented by the referenced bswModuleEntry. It corresponds to swInterpolationMethod in SwDataDef Props. Tags: xml.sequenceOffset=10

5.5.7. 显示呈现

SwDataDefProps.displayPresentation 的语义:

当这样的工具显示一系列测量值时,向显示工具指示这一系列测量值可以视为连续曲线还是一组离散值(即阶梯式)是有用的。

例如,对于值在一个测量周期内不任意跳变的情况(例如温度变量),连续曲线是合适的。

另一方面,如果被测变量的每个值都有明确含义、因而可能在一个测量周期内任意变化(例如状态变量),则离散处理是正确的。

另一个用例是指示 ECU 如何利用 category 为 CURVE、MAP 或 CUBOID 的 DataPrototype,从轴上的一个或几个工作点确定单个值。

这既可以通过在各轴的采样点之间插值完成,也可以不插值、取最近的采样点完成。

第一种选项要求显示工具对确定的值采用连续表示,而第二种选项预期对确定的值采用离散处理。

SwDataDefProps.displayPresentation 的定义取决于数据类型的能力:

该规则应在合同阶段生成执行时施加。

SwDataDefProps.displayPresentation 的定义取决于元素的能力:

按 [constr_1007] 和 [constr_1009],displayPresentation 仅在聚合的 ApplicationArrayDataType.element 或 ImplementationDataType.subElement 也支持 SwDataDefProps.displayPresentation 的规定时,才支持用于 ApplicationArrayDataType 或 category 为 ARRAY 的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

presentationContinuous 的不适用场景:

SwDataDefProps.displayPresentation 的适用值范围:

如果 DataPrototype 的语义通过 category 为 SCALE_LINEAR_AND_TEXTTABLE 或 SCALE_RATIONAL_AND_TEXTTABLE 的 CompuMethod 描述,则属性 SwDataDefProps.displayPresentation 只描述 TEXTTABLE 值之外值范围的数据呈现。

表5.124:DisplayPresentationEnum(DisplayPresentationEnum)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This meta-class represents the ability to provide values for controlling the presentation of data within measurement and calibration tools. | | 聚合于 | SwDataDefProps.displayPresentation |

字面值 说明
presentation Continuous The presentation of data shall form a continuous graph between data points. Tags: atp.EnumerationLiteralIndex=0
presentation Discrete The presentation of data shall be step-shaped between data points. Tags: atp.EnumerationLiteralIndex=1

5.6. 常量值的规范

5.6.1. 概述

常量值的指派:

  1. 通过引用一个可复用的 ConstantSpecification(它包含另一个 ValueSpecification);

  2. 或通过各类值规范的内联聚合。

表5.125:ConstantSpecification(ConstantSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Specification of a constant that can be part of a package, i.e. it can be defined stand-alone. Tags: atp.recommendedPackage=ConstantSpecifications | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
valueSpec ValueSpecification 0..1 aggr Specification of an expression leading to a value for this constant. Stereotypes: atpSplitable Tags: atp.Splitkey=valueSpec

ConstantSpecification . valueSpec 的存在性:

表5.126:ValueSpecification(ValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Base class for expressions leading to a value which can be used to initialize a data object. | | 基类 | ARObject | | 子类 | AbstractRuleBasedValueSpecification , ApplicationValueSpecification, CompositeValueSpecification , ConstantReference, NotAvailableValueSpecification, NumericalValueSpecification, ReferenceValue Specification, TextValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
shortLabel Identifier 0..1 attr This can be used to identify particular value specifications for human readers, for example elements of a record type.

表5.127:CompositeValueSpecification(CompositeValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This abstract meta-class acts a base class for ValueSpecifications that have a composite form. | | 基类 | ARObject , ValueSpecification | | 子类 | ArrayValueSpecification, RecordValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, CompositeRuleBasedValueSpecification.argument, ConstantSpecification.value Spec, CryptoServiceKey.developmentValue, DiagnosticEnvDataCondition.compareValue, DiagnosticEnv DataElementCondition.compareValue, FieldSenderComSpec.initValue, ISignal.initValue, ISignal.timeout SubstitutionValue, NonqueuedReceiverComSpec.initValue, NonqueuedReceiverComSpec.timeout SubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, Nv ProvideComSpec.romBlockInitValue, NvRequireComSpec.initValue, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequired ComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgumentValue.value, PortPrototype BlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReception DefaultValue, StateManagementCompareCondition .compareValue, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

表5.128:ArrayValueSpecification(ArrayValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Specifies the values for an array. | | 基类 | ARObject , CompositeValueSpecification , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, CompositeRuleBasedValueSpecification.argument, ConstantSpecification.value Spec, CryptoServiceKey.developmentValue, DiagnosticEnvDataCondition.compareValue, DiagnosticEnv DataElementCondition.compareValue, FieldSenderComSpec.initValue, ISignal.initValue, ISignal.timeout SubstitutionValue, NonqueuedReceiverComSpec.initValue, NonqueuedReceiverComSpec.timeout SubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, Nv ProvideComSpec.romBlockInitValue, NvRequireComSpec.initValue, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequired ComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgumentValue.value, PortPrototype BlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReception DefaultValue, StateManagementCompareCondition .compareValue, SwDataDefProps.invalidValue, |

属性 类型 多重性 种类 备注
element (ordered) ValueSpecification * aggr The value for a single array element. All Value Specifications aggregated by ArrayValueSpecification shall have the same structure. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=element, element.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
intendedPartial Initialization Count PositiveInteger 0..1 attr This attribute shall only have a meaning for dynamic arrays and shall be taken as a sanity check: the number filled in the attribute shall be identical to the number of ArrayValueSpecification.element. If the attribute does not exist it means that no partial initialization is intended.

表5.129:RecordValueSpecification(RecordValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Specifies the values for a record. | | 基类 | ARObject , CompositeValueSpecification , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, CompositeRuleBasedValueSpecification.argument, ConstantSpecification.value Spec, CryptoServiceKey.developmentValue, DiagnosticEnvDataCondition.compareValue, DiagnosticEnv DataElementCondition.compareValue, FieldSenderComSpec.initValue, ISignal.initValue, ISignal.timeout SubstitutionValue, NonqueuedReceiverComSpec.initValue, NonqueuedReceiverComSpec.timeout SubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, Nv ProvideComSpec.romBlockInitValue, NvRequireComSpec.initValue, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequired ComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgumentValue.value, PortPrototype BlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReception DefaultValue, StateManagementCompareCondition .compareValue, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
field (ordered) ValueSpecification * aggr The value for a single record field. This could also be mapped explicitly to a record element of the data type using the shortName of the ValueSpecification. But this would introduce a relationship to the data type that is too strong. As of now, it is only important that the structure of the data type matches the structure of the Value Specification independently of the shortNames. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=field, field.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

RecordValueSpecification . field 的存在性:

表5.130:TextValueSpecification(TextValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | The purpose of TextValueSpecification is to define the labels that correspond to enumeration values. | | 基类 | ARObject , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, MetaDataItem.metaDataItemType, NonqueuedReceiverComSpec.initValue, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.rom BlockInitValue, NvRequireComSpec.initValue, ParameterDataPrototype.initValue, ParameterProvideCom Spec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgumentValue.value, PortPrototypeBlueprintInitValue. value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, State ManagementCompareCondition .compareValue, SwDataDefProps.invalidValue, VariableDataPrototype. initValue |

表5.131:TextValueSpecification(TextValueSpecification)

属性 类型 多重性 种类 备注
value VerbatimString 0..1 attr This is the value itself. Note that vt uses the | operator to separate the values for the different bitfield masks in case that the semantics of the related DataPrototype is described by means of a BITFIELD_TEXTTABLE in the associated CompuMethod.

TextValueSpecification . value 的存在性:

表5.132:NumericalValueSpecification(NumericalValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | 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. | | 基类 | ARObject , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
value Numerical 0..1 attr This is the value itself. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

NumericalValueSpecification . value 的存在性:

表5.133:ReferenceValueSpecification(ReferenceValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Specifies a reference to a data prototype to be used as an initial value for a pointer in the software. | | 基类 | ARObject , ValueSpecification |

表5.134:ReferenceValueSpecification(ReferenceValueSpecification)

| 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
referenceValue DataPrototype 0..1 ref The referenced data prototype.

ReferenceValueSpecification . referenceValue 的存在性:

图 5.60 展示了 ValueSpecification 的特化子类,它们允许为不同用例定义值。

ValueSpecification 的特化子类:

  • 通过 ConstantReference 引用一个常量(它实际上是一个可复用的值规范);

  • TextValueSpecification

  • NumericalValueSpecification

  • ArrayValueSpecification

  • RecordValueSpecification

  • ApplicationValueSpecification:这应(见 [constr_10439])用于规定复合原始数据类型(见 [TPS_SWCT_01179])(如曲线和映射表)的值。一般而言也可以(例如对原始标定值)用它规定由 ApplicationDataType 定义类型的 DataPrototype 的值。

注意,ApplicationValueSpecification 按 ASAM CDF 的范例建模(更多信息请参见 [31])。

  • 对 DataPrototype 的引用:这可用于描述基础软件中指针变量的初始值。一个用例是交换用于软件仿真方法访问标定数据的数据描述(细节见 [6])。

  • ApplicationRuleBasedValueSpecification,位于 ArrayValueSpecification 内,见 [constr_1779];

  • NumericalRuleBasedValueSpecification,位于 ArrayValueSpecification 内,见 [constr_1779];

  • CompositeRuleBasedValueSpecification,位于 ArrayValueSpecification 内,见 [constr_1779]。

glyph[floorright](RS_SWCT_03175)

必须理解:尽管元类 TextValueSpecification 的名称暗示它是为由 category 为 STRING 的 ApplicationPrimitiveDataType 定义类型的 VariableDataPrototype/ParameterDataPrototype 定义 invalidValue 或 initValue 的首选方式,但 TextValueSpecification 实际上有不同的目的(按 [constr_1284] 定义)。

TextValueSpecification 使用的限制:

该规则应在合同阶段生成执行时施加。

换言之,TextValueSpecification 的目的是定义对应枚举值的标签。

约束 [constr_1225] 与 [constr_1284] 相互对应:[constr_1225] 要求在定义

枚举值标签时使用 TextValueSpecification,而 [constr_1284] 规定枚举值标签的定义是 TextValueSpecification 的唯一用例。

注意,ValueSpecification 不从任何数据类型继承。这会在元模型中造成冗余,因为给定 ValueSpecification 的预期数据类型已由它聚合所在的上下文确定。

尽管如此,预期数据类型对 ValueSpecification 的内容施加某种约束:

ValueSpecification 应符合数据类型:

例如,不允许把数值 “1.5” 作为初始值指派给由具有整数基本类型的 ImplementationDataType 定义类型的数据原型。

RecordValueSpecification.field 的数量应与 ApplicationRecordDataType.element 的数量相同:

就此而言,要求 RecordValueSpecification.field 的数量与 ApplicationRecordDataType.element 的数量相同。

该规则应在合同阶段生成执行时施加。

RecordValueSpecification.field 的数量应与 category 为 STRUCTURE 的 ImplementationDataType 的 subElement 数量相同:

就此而言,要求 RecordValueSpecification.field 的数量与 ImplementationDataType.subElement 的数量相同。

该规则应在合同阶段生成执行时施加。

22 例如,“1” 可以作为许多数据类型的常量值。如果 ValueSpecification 改为引用特定的 AutosarDataType,就必须为打算与之组合使用该值的每一个 AutosarDataType 定义一个 “1”。

如果相应的 ApplicationRecordElement 由 ApplicationRecordDataType 定义类型,则 ApplicationRecordDataType 与 ValueSpecification 之间结构符合性的比较应越过所遇到的 NotAvailableValueSpecification 继续。

表5.135:NotAvailableValueSpecification(NotAvailableValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class provides the ability to specify a ValueSpecification to state that the respective element is not available. This ability is needed to support the existence of ApplicationRecordElements where attribute isOptional ist set to the value true. | | 基类 | ARObject , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
defaultPattern PositiveInteger 0..1 attr The content of this attribute shall be used to initialize gaps in the memory occupied by a structured data type in the case that an NotAvailableValueSpecification is used. Note that this pattern is only applied during initialization!

对于深层嵌套的组合数据类型(包括因复合原始数据类型的存在而创建的 ImplementationDataType),[constr_1271]、[constr_1272] 和 [constr_1273] 应按给定嵌套层级的性质递归应用。对 “叶” 元素适用 [TPS_SWCT_01838]。

关于基于规则的 ValueSpecification 创建的更多信息见第 5.6.9 节。

5.6.2. 对常量的引用

注意 ConstantReference 的特定含义:它把值的定义传递给一个定义为 AUTOSAR ARPackage 一部分的 ConstantSpecification。

表5.136:ConstantReference(ConstantReference)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | Instead of defining this value inline, a constant is referenced. | | 基类 | ARObject , ValueSpecification |

()

只在特定情形下才要求存在 ConstantSpecificationMapping。应用 ConstantSpecificationMapping 的一种可能情形是在 SwRecordLayout 定义的上下文中:其中 “物理” ConstantSpecification 的结构可能与被映射的 “内部” ConstantSpecification 的结构截然不同。

换言之,ConstantSpecificationMapping 的存在通常更多关乎数据结构而非数据值。

请注意,“应用域中定义的 ConstantSpecification” 究竟是什么样子的形式化定义并不十分直接。明显的候选是 ApplicationValueSpecification 或 ApplicationRuleBasedValueSpecification,但不止于此。

表5.137:ConstantReference(ConstantReference)

| 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
constant ConstantSpecification 0..1 ref The referenced constant.

ConstantReference . constant 的存在性:

5.6.3. 常量规范映射

ConstantSpecificationMapping:

  • 角色 implConstant 中引用的 ConstantSpecification(定义在实现域中)拥有的一个 ValueSpecification,与

  • 角色 applConstant 中引用的 ConstantSpecification(定义在应用域中)拥有的一个相应 ValueSpecification。

还有必要把该定义扩展到组合 ValueSpecification,例如所有 “叶” 子元素都是 ApplicationValueSpecification 或 ApplicationRuleBasedValueSpecification 的 RecordValueSpecification。

再次强调,这只是定义合格 ConstantSpecification(即所聚合 ValueSpecification)的一种可能方式。

事实上,定义 “应用域中定义的 ConstantSpecification” 有很多方式。标准汇总于 [TPS_SWCT_01871]。

应用域中 ConstantSpecification 的定义:

  • ValueSpecification 是 ApplicationValueSpecification;

  • ValueSpecification 是 ApplicationRuleBasedValueSpecification;

  • ValueSpecification 是 RecordValueSpecification,其中 field 递归地(即经由更深层 CompositeValueSpecification 或 CompositeRuleBasedValueSpecification 的任意聚合层级)归结为 ApplicationValueSpecification 或 ApplicationRuleBasedValueSpecification;

  • ValueSpecification 是 ArrayValueSpecification,其中 element 递归地归结为 ApplicationValueSpecification 或 ApplicationRuleBasedValueSpecification;

  • ValueSpecification 是 CompositeRuleBasedValueSpecification,其中 argument 满足上述标准之一;

  • ValueSpecification 是 ConstantReference,其中被引用的常量满足上述标准之一。

()

请注意,“实现域中定义的 ConstantSpecification” 究竟是什么样子的形式化定义并不十分直接。明显的候选是 NumericalValueSpecification 或 TextValueSpecification,但不止于此。还有必要把该定义扩展到组合 ValueSpecification,例如所有 “叶” 子

元素都是 NumericalValueSpecification 或 TextValueSpecification 的 RecordValueSpecification。

再次强调,这只是定义合格 ConstantSpecification(即所聚合 ValueSpecification)的一种可能方式。

事实上,定义 “实现域中定义的 ConstantSpecification” 有很多方式。标准汇总于 [TPS_SWCT_01872]。

实现域中 ValueSpecification 的定义:

  • ValueSpecification 是 NumericalValueSpecification;

  • ValueSpecification 是 TextValueSpecification;

  • ValueSpecification 是 RecordValueSpecification,其中 field 递归地归结为 NumericalValueSpecification 或 TextValueSpecification;

  • ValueSpecification 是 ArrayValueSpecification,其中 element 递归地归结为 NumericalValueSpecification 或 TextValueSpecification。

  • ValueSpecification 是 CompositeRuleBasedValueSpecification,其中 argument 满足上述标准之一;

  • ValueSpecification 是 ConstantReference,其中被引用的常量满足上述标准之一。

表5.138:ConstantSpecificationMapping(ConstantSpecificationMapping)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class is used to create an association of two ConstantSpecifications. One Constant Specification is supposed to be defined in the application domain while the other should be defined in the implementation domain. Hence the ConstantSpecificationMapping needs to be used where a ConstantSpecification defined in one domain needs to be associated to a ConstantSpecification in the other domain. This information is crucial for the RTE generator. | | 基类 | ARObject | | 聚合于 | ConstantSpecificationMappingSet.mapping |

属性 类型 多重性 种类 备注
applConstant ConstantSpecification 0..1 ref A ConstantSpecification defined in the application domain.
implConstant ConstantSpecification 0..1 ref A ConstantSpecification defined in the implementation domain.

ConstantSpecificationMapping 与 ConstantSpecification:

该规则应在合同阶段生成执行时施加。

由 InternalBehavior 引用的 ConstantSpecificationMappingSet:

然而,在某些特化中软件组件将没有 InternalBehavior:

  • [TPS_SWCT_01840] ParameterSwComponentType 引用 ConstantSpecificationMappingSet:这里,ConstantSpecificationMappingSet 由 ParameterSwComponentType 直接关联。glyph[floorright]()

  • [TPS_SWCT_01841] NvBlockSwComponentType 引用 ConstantSpecificationMappingSet:在这种情况下,ConstantSpecificationMappingSet 与聚合的 NvBlockDescriptor 关联。glyph[floorright]()

ConstantSpecificationMapping . applConstant 的存在性:

ConstantSpecificationMapping . implConstant 的存在性:

表5.139:ConstantSpecificationMappingSet(ConstantSpecificationMappingSet)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class represents the ability to map two ConstantSpecifications to each others. One Constant Specification is supposed to be described in the application domain and the other should be described in the implementation domain. Tags: atp.recommendedPackage=ConstantSpecificationMappingSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
mapping ConstantSpecification Mapping * aggr ConstantSpecificationMappings owned by the Constant SpecificationMappingSet.

5.6.4. 可变大小数组的值

可变大小数据类型具有在运行时改变有效元素数量的能力。然而,在许多情况下需要为这样的数据类型定义 ArrayValueSpecification。

可用于可变大小数组数据类型的 ArrayValueSpecification 需要能够处理以下情形:

  • 整个数组数据类型的完整初始化。该情形与为固定大小数组数据类型创建 ArrayValueSpecification 相同;

  • 为可变大小数组的前 n 个元素提供值。该情形也称为部分初始化(partial initialization);

  • 创建空的 ArrayValueSpecification,即 ArrayValueSpecification 承载有意初始化可变大小数组 0 个元素的语义。注意 “完全不初始化” 与 “有意初始化可变大小数组 0 个元素” 之间的语义差异。

所述所有情形都应受 AUTOSAR 支持。如前所述,存在完整数量元素的 ArrayValueSpecification 与固定大小情形相同。“空” 情形可视为部分初始化的子集。

可变大小数组的部分初始化有两个侧面:

由 ImplementationDataType 定义类型的可变大小数组的初始化:

因此,部分初始化应通过把大小指示器显式初始化为 0 与适用 ImplementationDataTypeElement.arraySize 之间的值、并为载荷提供相应数量的 ValueSpecification 来实现。

由 ApplicationArrayDataType 定义类型的可变大小数组的初始化:

为此,应使用 ArrayValueSpecification.intendedPartialInitializationCount 来规定应初始化的元素数量。

属性 ArrayValueSpecification.intendedPartialInitializationCount 的适用性限于初始化由 ApplicationArrayDataType 定义类型的可变大小数组的用例。AUTOSAR 未预见该属性的任何其他用例。

ArrayValueSpecification . intendedPartialInitializationCount 属性的存在性:

该规则应在合同阶段生成执行时施加。

借助 ArrayValueSpecification 初始化 ApplicationArrayDataType 的规则:

  • 如果属性 ApplicationArrayDataType.element.arraySizeSemantics 设置为 fixedSize,则 ArrayValueSpecification 应精确匹配 ApplicationArrayDataType 的结构;

这意味着 ArrayValueSpecification.element 的数量应与 ApplicationArrayDataType.element.maxNumberOfElements 的值相同;

  • 如果属性 ApplicationArrayDataType.element.arraySizeSemantics 设置为 variableSize 且 ArrayValueSpecification 不定义属性 intendedPartialInitializationCount,则 ArrayValueSpecification 应精确匹配 ApplicationArrayDataType 的结构;

这意味着 ArrayValueSpecification.element 的数量应与 ApplicationArrayDataType.element.maxNumberOfElements 的值相同;

  • 如果属性 ApplicationArrayDataType.element.arraySizeSemantics 设置为 variableSize 且 ArrayValueSpecification 为属性 intendedPartialInitializationCount 规定了值,则 ArrayValueSpecification 应恰好包含 intendedPartialInitializationCount 个元素。

这包括 intendedPartialInitializationCount 的值设置为 0 的情形(即 “空” 初始化)以及 intendedPartialInitializationCount 设置为相应 ApplicationArrayElement.maxNumberOfElements 的值的情形(即 “完整” 初始化)。

该规则应在合同阶段生成执行时施加。

借助 ArrayValueSpecification 初始化固定大小数组形状 ImplementationDataType 的规则:

这意味着 ArrayValueSpecification.element 的数量应与 ImplementationDataType.subElement.arraySize 的值相同。

该规则应在合同阶段生成执行时施加。

请注意,表示可变大小数组的 ImplementationDataType 的初始化在 [TPS_SWCT_01793] 中澄清。

更多细节见第 5.6.9 节。

5.6.5. 复合原始数据类型的值

复合原始数据类型的最大可能大小:

在这种情况下,模型作者有责任确保规定的 init 值的大小与所涉系统常数的范围匹配。

复合原始数据类型的大小是变体:

表5.140:SwSystemconst(SwSystemconst)

| 包 | M2::MSR::DataDictionary::SystemConstant | | 说明 | This element defines a system constant which serves an input to select a particular variation point. In particular a system constant serves as an operand of the binding function (swSyscond) in a Variation point. Note that the binding process can only happen if a value was assigned to to the referenced system constants. Tags: atp.recommendedPackage=SwSystemconsts | | 基类 | ARElement , ARObject , AtpDefinition , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
swDataDef Props SwDataDefProps 0..1 aggr This denotes the data definition properties of the system constant. This supports to express the limits and optionally a conversion within the internal to physical values by a compu method. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps xml.sequenceOffset=40

绑定模型规定的原始类型小于所涉 SwSystemconst 范围定义的最大值:

[TPS_SWCT_01181] 的后果由图 5.63 示例说明。

SwAxisCont 的强制信息:

该规则应在合同阶段生成执行时施加。

SwValueCont 的强制信息:

该规则应在合同阶段生成执行时施加。

在一个 ApplicationValueSpecification 的上下文中,属性 swValueCont.swArraysize 的元素数量取决于 ApplicationValueSpecification.category 的值。

遗憾的是,由于以下原因之一,无法绑定 swValueCont.swArraysize 的元素数量:

  • ApplicationValueSpecification 的定义中可能不涉及所有轴。如果一个或多个适用的轴是组轴,则它们在 ApplicationValueSpecification 的定义中被省略;

  • 由于 COM_AXIS 的性质,它经由专用的 ApplicationValueSpecification 单独初始化;

  • ApplicationValueSpecification 可以把属性 category 设置为值 COM_AXIS 或 RES_AXIS,因而预期应用于共享轴本身的初始化;

  • 对属性 category 设置为 VAL_BLK 的 ApplicationValueSpecification,完全不定义轴。

因此,ApplicationValueSpecification.swValueCont.swArraysize 的元素数量取决于属性 ApplicationValueSpecification.category 的值,见 [constr_10502]。

表5.141:SwValueCont(SwValueCont)

| 包 | M2::MSR::CalibrationData::CalibrationValue | | 说明 | This metaclass represents the content of one particular SwInstance. | | 基类 | ARObject |

表5.142:SwValueCont(SwValueCont)

| 聚合于 | ApplicationValueSpecification.swValueCont |

属性 类型 多重性 种类 备注
swArraysize ValueList 0..1 aggr This attribute defines the size of each dimension for compound primitives CURVE, MAP, CUBOID, CUBE_4, CUBE_5, COM_AXIS, RES_AXIS, VAL_BLK. For each dimension one value has to be defined, e.g. one in case of COM_AXIS and two or more in case of MAP. Tags: xml.sequenceOffset=40
swValuesPhys SwValues 0..1 aggr swValuesPhys represents the values in the physical domain. Tags: xml.sequenceOffset=50
unit Unit 0..1 ref This represents the physical unit of the provided values. Tags: xml.sequenceOffset=20
unitDisplay Name SingleLanguageUnit Names 0..1 aggr This specifies how the physical units of the current value set shall be displayed in documents or in user interfaces of tools. Tags: xml.sequenceOffset=30

ApplicationValueSpecification.swValueCont.swArraysize 的元素数量与 ApplicationValueSpecification.category 对照:

| Value of category | Number of values in swValueCont . swArraysize |

| CURVE | 1 | | MAP | 2 | | CUBOID | 3 | | CUBE_4 | 4 | | CUBE_5 | 5 | | COM_AXIS | 1 | | RES_AXIS | 1 | | VAL_BLK | 1..* |

该规则应在 ValueSpecification 应用时施加。

ApplicationValueSpecification.swValueCont.swValuesPhys 内元素的排序:

但应当仅通过查看 ApplicationValueSpecification 就能理解该 ApplicationValueSpecification 是为 ROW_DIR 情形还是为 COLUMN_DIR 情形创建的:

ROW_DIR:swValueCont.swArraysize 中值的顺序与由相应 swAxisIndex 定义的 swAxisCont.swArraysize 的值相同。

这意味着,例如如果 x 轴的数组大小为 4 而 y 轴的数组大小为 3,则 swValueCont.swArraysize 内的值将是 4 和 3(按此顺序)。

COLUMN_DIR:swValueCont.swArraysize 中值的顺序与由相应 swAxisIndex 定义的 swAxisCont.swArraysize 的值相反。

这意味着,例如如果 x 轴的数组大小为 4 而 y 轴的数组大小为 3,则 swValueCont.swArraysize 内的值将是 3 和 4(按此顺序)。

两种情形下 ApplicationValueSpecification.swAxisCont 的建模 100% 相同。唯一差异出现在 ApplicationValueSpecification.swValueCont 的建模中。

如果属性 category 设置为 MAP、CUBOID、CUBE_4 或 CUBE_5 的 ApplicationValueSpecification 所属的复合原始数据类型已知,则可以为 ApplicationValueSpecification.swValueCont.swArraysize 的值与 ApplicationPrimitiveDataType.swDataDefProps.swCalprmAxisSet 的定义之间的关系定义规则。

属性 category 设置为 MAP、CUBOID、CUBE_4 或 CUBE_5 且 ROW_DIR SwRecordLayout 的 ApplicationValueSpecification:

  • 如果相应 SwCalprmAxis 是 SwAxisGrouped,则轴点数量应从 ImplementationDataType 的属性 subElement.arraySize 获取——该 ImplementationDataType 由一个同时引用角色 SwAxisGrouped.sharedAxisType 中所引用 ApplicationDataType 的 DataTypeMap 引用;

  • 如果相应 SwCalprmAxis 是 SwAxisIndividual,则轴点数量与属性 SwAxisIndividual.swMaxAxisPoints 的值相同。

该规则应在 ValueSpecification 应用时施加。

[constr_10503] 存在的依据:ApplicationValueSpecification.swValueCont.swValuesPhys 中提供的值的顺序应遵循内存布局。

如果这一点得到确认,则相应 SwRecordLayout 的配置是相关的,元素放入 SwValueCont.swValuesPhys 的顺序确实完全由角色 ApplicationValueSpecification.swValueCont.swArraysize 中收集元素的顺序定义。

[constr_10503] 所作观察的示例见第 B.3.6.1 节。

属性 category 设置为 VAL_BLK 且存在 ROW_DIR SwRecordLayout 的 ApplicationPrimitiveDataType.swDataDefProps.swValueBlockSizeMult 的 ApplicationValueSpecification:

属性 category 设置为 MAP、CUBOID、CUBE_4 或 CUBE_5 且 COLUMN_DIR SwRecordLayout 的 ApplicationValueSpecification:

  • 如果相应 SwCalprmAxis 是 SwAxisGrouped,则轴点数量应从 ImplementationDataType 的属性 subElement.arraySize 获取——该 ImplementationDataType 由一个同时引用角色 SwAxisGrouped.sharedAxisType 中所引用 ApplicationDataType 的 DataTypeMap 引用;

  • 如果相应 SwCalprmAxis 是 SwAxisIndividual,则轴点数量与属性 SwAxisIndividual.swMaxAxisPoints 的值相同。

该规则应在 ValueSpecification 应用时施加。

[constr_10505] 存在的依据:ApplicationValueSpecification.swValueCont.swValuesPhys 中提供的值的顺序应遵循内存布局。

如果这一点得到确认,则相应 SwRecordLayout 的配置是相关的,元素放入 swValuesPhys 的顺序确实完全由角色 ApplicationValueSpecification.swValueCont.swArraysize 中收集元素的顺序定义。

[constr_10505] 所作观察的示例见第 B.3.6.2 节。

属性 category 设置为 VAL_BLK 且存在 COLUMN_DIR SwRecordLayout 的 ApplicationPrimitiveDataType.swDataDefProps.swValueBlockSizeMult 的 ApplicationValueSpecification:

如果属性 category 设置为 VAL_BLK 的 ApplicationValueSpecification 所属的复合原始数据类型已知,则可以为 swValueCont.swArraysize 的值与 ApplicationPrimitiveDataType.swDataDefProps.swValueBlockSize 或 swDataDefProps.swValueBlockSizeMult 之间的关系定义规则。

属性 category 设置为 VAL_BLK 且存在 ApplicationPrimitiveDataType.swDataDefProps.swValueBlockSize 的 ApplicationValueSpecification:

请注意,对于多维复合原始数据类型(例如 MAP),必须知道维度才能处理 SwValues。[constr_2050] 和 [constr_2051] 应支持对单个和多维复合原始数据类型的一致处理。

swArraysize 的值与 swValuesPhys 提供的值的数量应一致。:

换言之,在绑定模型中,后代(v、vf、vt 或 vtf)的数量应与由 ApplicationPrimitiveDataType 定义类型的相关 DataPrototype 的元素数量相同。

如果提供了多个 swArraysize 值,必须把这些值相乘以得到 swValuesPhys 值的总数。

该规则应在合同阶段生成执行时施加。

请注意,对于复合原始数据类型,通常属性 swValuesPhys 定义多于一个值。[constr_2051] 和 [constr_2052] 应支持对 swValuesPhys 值的一致处理,无论相关复合原始数据类型定义了多少个维度。

如果 ApplicationValueSpecification 为具有多于一个输入轴的复合原始数据类型定义值,则属性 swArraysize 的存在成为强制,以确保独立于 SwValues.vg 的存在正确处理 swValuesPhys 值。

category 为 COM_AXIS、RES_AXIS 的 SwAxisCont 值仅用于显示:

如果这些情况下轴的 SwAxisCont 值存在,它们仅用于显示,因为 MAP、CUBOID、CUBE_4、CUBE_5 或 CURVE 的相关 DataPrototype 不保存此类轴的值。这些是 COM_AXIS 或 RES_AXIS 的 DataPrototype 的属性。

因此,COM_AXIS 本身的值由 SwValueCont 描述。

NumericalOrText 应定义 vf 或 vt 之一:

该规则应在合同阶段生成执行时施加。

表5.143:ApplicationValueSpecification(ApplicationValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class represents values for DataPrototypes typed by ApplicationDataTypes (this includes in particular compound primitives). For further details refer to ASAM CDF 2.0. This meta-class corresponds to some extent with SW-INSTANCE in ASAM CDF 2.0. | | 基类 | ARObject , CompositeRuleBasedValueArgument , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, CompositeRuleBasedValueSpecification.compoundPrimitiveArgument, Constant Specification.valueSpec, CryptoServiceKey.developmentValue, DiagnosticEnvDataCondition.compare Value, DiagnosticEnvDataElementCondition.compareValue, FieldSenderComSpec.initValue, ISignal.init Value, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.initValue, NonqueuedReceiver ComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ram BlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.initValue, ParameterData Prototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgument Value.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEvent Deployment.eventReceptionDefaultValue, StateManagementCompareCondition .compareValue, SwData DefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
category Identifier 0..1 attr Specifies to which category of ApplicationDataType this ApplicationValueSpecification can be applied (e.g. as an initial value), thus imposing constraints on the structure and semantics of the contained values, see [constr_1006] and [constr_2051].
swAxisCont (ordered) SwAxisCont * aggr This represents the axis values of a Compound Primitive Data Type (curve or map). The first swAxisCont describes the x-axis, the second sw AxisCont describes the y-axis, the third swAxisCont describes the z-axis. In addition to this, the axis can be denoted in swAxisIndex.
swValueCont SwValueCont 0..1 aggr This represents the values of a Compound Primitive Data Type.

表5.144:NumericalOrText(NumericalOrText)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class represents the ability to yield either a numerical or a string. A typical use case is that two or more instances of this meta-class are aggregated with a VariationPoint where some instances yield strings while other instances yield numerical depending on the resolution of the binding expression. | | 基类 | ARObject | | 聚合于 | RuleArguments.vtf, SwValues.vtf |

属性 类型 多重性 种类 备注
vf Numerical 0..1 attr This attribute represents the ability to provide a numerical value. The latest binding time of the VariationPoint shall be preCompileTime. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=10

表5.145:NumericalOrText(NumericalOrText)

属性 类型 多重性 种类 备注
vt String 0..1 attr This attribute represents the ability to provide a textual value. Tags: xml.sequenceOffset=20

attributes vs. category of ApplicationValueSpecification 的存在性:

| | Attribute Existence per Category |

| Attribute of ApplicationValueSpecification | VALUE | | swValueCont | D | | swValueCont . unit | O | | swValueCont . swValuesPhys | D | | swValueCont . swArraysize | | | swAxisCont | | | swAxisCont . unit | | | swAxisCont . category | | | swAxisCont . swAxisIndex | | | swAxisCont . swArraysize | | | swAxisCont . swValuesPhys | |

该规则应在合同阶段生成执行时施加。

以下图例适用于 [constr_1519] 所含表中的单元格:

空单元格:属性不适用于在本元素范围内的使用。

  • O:可选地定义该属性;

除基本单元格图例之外,以下注解适用于 [constr_1375] 所含表中的单元格:

  • (1) 使用 COM_AXIS 或 RES_AXIS 时可选,否则该属性应存在。

SwAxisCont . category 属性的存在性:

ApplicationValueSpecification.swAxisCont.category 的值:

表5.146:SwAxisCont(SwAxisCont)

| 包 | M2::MSR::CalibrationData::CalibrationValue | | 说明 | This represents the values for the axis of a compound primitive (curve, map). For standard and fix axes, SwAxisCont contains the values of the axis directly. The axis values of SwAxisCont with the category COM_AXIS, RES_AXIS are for display only. For editing and processing, only the values in the related GroupAxis are binding. | | 基类 | ARObject | | 聚合于 | ApplicationValueSpecification.swAxisCont |

属性 类型 多重性 种类 备注
category CalprmAxisCategory Enum 0..1 attr This category specifies the particular axis types: • STD_AXIS • COM_AXIS • RES_AXIS (swArraysize necessary) Tags: xml.sequenceOffset=20
swArraysize ValueList 0..1 aggr For multidimensional compound primitivies (curve, map ...) it is necessary to know the dimensions.They are specified using swArraySize. • RES_AXIS Tags: xml.sequenceOffset=70
swAxisIndex AxisIndexType 0..1 attr This property allows to explicitly assign the axis contents to a particular axis. It is specified by numbers where 1 corresponds to the x-axis. It is also possible to derive the axis association from the sequence of the parent. Tags: xml.sequenceOffset=50
swValuesPhys SwValues 0..1 aggr swValuesPhys represents the values in the physical domain. Tags: xml.sequenceOffset=80
unit Unit 0..1 ref This represents the physical unit of the provided values. Tags: xml.sequenceOffset=30
unitDisplay Name SingleLanguageUnit Names 0..1 aggr This represents the display name which is used for the physical unit of the axis. Tags: xml.sequenceOffset=40

[constr_10040] 存在的依据:category 的值 fixAXIS 表示相应轴是从标定参数的值计算出来的。显然,初始化这种轴没有意义,因此把它排除在 ApplicationValueSpecification 内的使用之外。

SwAxisCont . swAxisIndex 属性的存在性:

SwAxisCont . swValuesPhys 属性的存在性:

表5.147:SwValues(SwValues)

| 包 | M2::MSR::CalibrationData::CalibrationValue | | 说明 | This meta-class represents a list of values. These values can either be the input values of a curve (abscissa values) or the associated values (ordinate values). For multidimensional structures, the values are ordered such that they follow the memory layout, see [TPS_SWCT_01882] In particular for maps and cuboids etc. the resulting long value list can be subsectioned using Value Group. But the processing needs to be done as if vg is not there. Note that numerical values and textual values should not be mixed. | | 基类 | ARObject | | 聚合于 | SwAxisCont.swValuesPhys, SwValueCont.swValuesPhys, ValueGroup.vgContents |

属性 类型 多重性 种类 备注
v Numerical 0..1 attr This is a non variant Value. It is provided for sake of Compatibility to ASAM CDF. Tags: xml.sequenceOffset=40
vf Numerical 0..1 attr This allows to specify the value as VariationPoint. It is distinguished to non variant for sake of compatibility to ASAM CDF 2.0. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.sequenceOffset=20
vg ValueGroup 0..1 aggr This allows to have intersections in the values in order to support specific rendering (eg. using stylesheets). For tools it is important that the v values are always processed in the same (flattened) order and the tool is able to interpret it without respecting vg. Tags: xml.sequenceOffset=50
vt VerbatimString 0..1 attr This represents the values of textual data elements (Strings). Note that vt uses the | to separate the values for the different bitfield masks in case that the semantics of the related DataPrototype is described by means of a BITFIELD_TEXTTABLE in the associated CompuMethod. Tags: xml.sequenceOffset=30
vtf NumericalOrText 0..1 aggr This aggregation represents the ability to provide a value that is either numerical or text which existence is subject to variability. From the formal point of view, the aggregation needs to have the multiplicity 1 because SwValues is modelled with stereotype <>. Nevertheless, the existence of vtf is optional and subject to constraints. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=vtf, vtf.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表5.148:ValueGroup(ValueGroup)

| 包 | M2::MSR::CalibrationData::CalibrationValue | | 说明 | This element enables values to be grouped. It can be used to perform row and column-orientated groupings, so that these can be rendered properly e.g. as a table. | | 基类 | ARObject | | 聚合于 | SwValues.vg |

5.6.6. TEXTTABLE 的值

为应用于由引用 category 为 TEXTTABLE 或 BITFIELD_TEXTTABLE 的 CompuMethod 的 ImplementationDataType 定义类型的 DataPrototype 的 ValueSpecification 的创建,需要确保数值在 CompuMethod 中有表示。

这意味着在这个特定情况下,由 ImplementationDataType 定义类型的 DataPrototype 的初始化——与应用于 ImplementationDataType 上下文中 ValueSpecification 的典型方法相反——实际上在物理域中完成,从而可以确保 ValueSpecification 中提供的值在 CompuMethod 中有表示。

表5.149:ValueGroup(ValueGroup)

属性 类型 多重性 种类 备注
label MultilanguageLong Name 0..1 aggr This label allows to give the valueGroup a particular name. It can be used if the Values are rendered as a table. Tags: xml.sequenceOffset=20
vgContents SwValues 0..1 aggr This represents the contents of the value group. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=30 xml.typeElement=false xml.typeWrapperElement=false

表5.150:ValueList(ValueList)

| 包 | M2::MSR::DataDictionary::DataDefProperties | | 说明 | This is a generic list of numerical values. | | 基类 | ARObject | | 聚合于 | RuleBasedAxisCont.swArraysize, RuleBasedValueCont.swArraysize, SwAxisCont.swArraysize, Sw ServiceArg.swArraysize, SwValueCont.swArraysize |

属性 类型 多重性 种类 备注
v Numerical 0..1 attr This is a particular numerical value without variation. Tags: xml.sequenceOffset=30
vf (ordered) Numerical * attr This is one entry in the list of numerical values Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime xml.roleElement=true xml.roleWrapperElement=false xml.typeElement=false xml.typeWrapperElement=false

例如,在特定情况下值 0..10 由适用 CompuMethod 的相应字面量覆盖,如果把 DataPrototype 的值设置为数值 20 会有什么后果?应避免这种场景,除非 ValueSpecification 表示 invalidValue(见第 5.4.2 节,特别是 [constr_10196])。

DataPrototype 由引用 category 为 TEXTTABLE 或 BITFIELD_TEXTTABLE 的 CompuMethod 的 ImplementationDataType 定义类型:

在这种情况下,所提供的值应匹配适用 CompuScales 定义的适用文本值(vt、shortLabel、symbol)之一。

该规则应在合同阶段生成执行时施加。

请注意,元类 CompuScale 的若干属性可用于描述实际值。因此有必要澄清:如果一个 CompuScale 的上下文内存在这些属性中的多个会发生什么。该澄清见 [TPS_SWCT_01696]。

5.6.7. BITFIELD_TEXTTABLE 的值

category 为 BITFIELD_TEXTTABLE 的 CompuMethod 实际定义了一种单个位或一组位具有各自含义的数据类型。

换言之,按 category 为 BITFIELD_TEXTTABLE 的 CompuMethod 定义 ValueSpecification 转化为如下陈述:“外围 CompuMethod 上下文中属性 CompuScale.mask 的每个唯一值(因为单比特或比特组就是这样标识的)为 ValueSpecification 的定义提供一个贡献”。

与 category 为 BITFIELD_TEXTTABLE 的 CompuMethod 关联的 DataPrototype 的初始化:

可以借助位运算访问元素,因此初始化的定义方式应使位运算可用于应用所提供的值。

换言之,总值应由各个子集的按位或贡献(用 “|” 符号的使用表示)构成。

可以取来(例如)用于初始化由 ApplicationDataType 定义类型的 DataPrototype 的 ValueSpecification 的示例——该 ApplicationDataType 引用

到 category 为 BITFIELD_TEXTTABLE 的 CompuMethod——在第 B.3.5 节讨论。

请注意,已初始化 DataPrototype 中未被位掩码覆盖的区域可以包含任意值。如果需要避免这一点,必须向 DataPrototype 值的语义不相关部分添加 “哑” 位掩码。

5.6.8. 字符串的值

5.6.8.1. 字符串由 ApplicationDataType 建模

为由 ApplicationDataType 建模的字符串规定常量值:

如何为由 ApplicationDataType 建模的字符串取常量值的示例包含在清单 B.1 中。

5.6.8.2. 字符串由 ImplementationDataType 建模

为由 ImplementationDataType 建模的字符串规定常量值:

如何为由 ImplementationDataType 建模的字符串取常量值的示例包含在清单 B.4 中。

5.6.9. 基于规则的值规范

5.6.9.1. 对原始数据类型的支持

ApplicationRuleBasedValueSpecification 的含义:

ApplicationRuleBasedValueSpecification 可用于 ApplicationArrayDataType,也可(如适用)用于所谓复合原始数据类型。

例如,拥有 100 个元素的 ApplicationArrayDataType 需要初始化,使得为每个元素提供一个专用的初始值。

在最突出的情形中,这些元素的大多数以相同的值(例如 0)初始化,只有前几个元素在初始化值上不同。

请注意,ApplicationRuleBasedValueSpecification 适用于由原始数据类型定义类型的数组。组合数据类型数组的基于规则的值规范借助 CompositeRuleBasedValueSpecification 完成。

表5.151:AbstractRuleBasedValueSpecification(AbstractRuleBasedValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This represents an abstract base class for all rule-based value specifications. | | 基类 | ARObject , ValueSpecification | | 子类 | ApplicationRuleBasedValueSpecification, CompositeRuleBasedValueSpecification, NumericalRuleBased ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

AbstractRuleBasedValueSpecification 定义的适用范围:

该规则应在合同阶段生成执行时施加。

表5.152:ApplicationRuleBasedValueSpecification(ApplicationRuleBasedValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class represents rule based values for DataPrototypes typed by ApplicationDataTypes (ApplicationArrayDataType or a compound ApplicationPrimitiveDataType which also boils down to an array-nature). | | 基类 | ARObject , AbstractRuleBasedValueSpecification , CompositeRuleBasedValueArgument , Value Specification |

表5.153:ApplicationRuleBasedValueSpecification(ApplicationRuleBasedValueSpecification)

| 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, CompositeRuleBasedValueSpecification.compoundPrimitiveArgument, Constant Specification.valueSpec, CryptoServiceKey.developmentValue, DiagnosticEnvDataCondition.compare Value, DiagnosticEnvDataElementCondition.compareValue, FieldSenderComSpec.initValue, ISignal.init Value, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.initValue, NonqueuedReceiver ComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ram BlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.initValue, ParameterData Prototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireComSpec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, PortDefinedArgument Value.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEvent Deployment.eventReceptionDefaultValue, StateManagementCompareCondition .compareValue, SwData DefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
category Identifier 0..1 attr This represents the category of the RuleBasedValue Specification Tags: xml.sequenceOffset=-20
swAxisCont (ordered) RuleBasedAxisCont * aggr This represents the axis values of a Compound Primitive Data Type (curve or map). The first swAxisCont describes the x-axis, the second sw AxisCont describes the y-axis, the third swAxisCont describes the z-axis. In addition to this, the axis can be denoted in swAxisIndex.
swValueCont RuleBasedValueCont 0..1 aggr This represents the values of an array or Compound Primitive Data Type. Stereotypes: atpSplitable Tags: atp.Splitkey=swValueCont

ApplicationRuleBasedValueSpecification . category 的存在性:

请注意,属性 ApplicationRuleBasedValueSpecification.category 在 [constr_2058] 中被提及,如果该属性不存在则会失败。

ApplicationRuleBasedValueSpecification.swAxisCont.category 的值:

[constr_10041] 存在的依据:属性 category 的值 fixAXIS 表示相应轴是从标定参数的值计算出来的。显然,初始化这种轴没有意义,因此把它排除在 ApplicationRuleBasedValueSpecification 内的使用之外。

表5.154:RuleBasedAxisCont(RuleBasedAxisCont)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This represents the values for the axis of a compound primitive (curve, map). For standard and fix axes, SwAxisCont contains the values of the axis directly. The axis values of SwAxisCont with the category COM_AXIS, RES_AXIS are for display only. For editing and processing, only the values in the related GroupAxis are binding. | | 基类 | ARObject | | 聚合于 | ApplicationRuleBasedValueSpecification.swAxisCont |

属性 类型 多重性 种类 备注
category CalprmAxisCategory Enum 0..1 attr This category specifies the particular axis types: • STD_AXIS • COM_AXIS • RES_AXIS (swArraysize necessary) Tags: xml.sequenceOffset=20
ruleBased Values RuleBasedValue Specification 0..1 aggr This represents the rule based value specification for the axis of a compound primitive (curve, map). Tags: xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=80 xml.typeWrapperElement=false
swArraysize ValueList 0..1 aggr For multidimensional compound primitives (curve, map ...) it is necessary to know the dimensions.They are specified using swArraySize. Tags: xml.sequenceOffset=40
swAxisIndex AxisIndexType 0..1 attr This property allows to explicitly assign the axis contents to a particular axis. It is specified by numbers where 1 corresponds to the x-axis. It is also possible to derive the axis association from the sequence of the parent. Tags: xml.sequenceOffset=50
unit Unit 0..1 ref This represents the physical unit of the provided values. Tags: xml.sequenceOffset=30

RuleBasedAxisCont . ruleBasedValues 的存在性:

表5.155:RuleBasedValueCont(RuleBasedValueCont)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This represents the values of a compound primitive (CURVE, MAP, CUBOID, CUBE_4, CUBE_5, BLK) or an array. | | 基类 | ARObject | | 聚合于 | ApplicationRuleBasedValueSpecification.swValueCont |

表5.156:RuleBasedValueCont(RuleBasedValueCont)

属性 类型 多重性 种类 备注
ruleBased Values RuleBasedValue Specification 0..1 aggr This represents the rule based value specification for the array or compound primitive (CURVE, MAP, CUBOID, CUBE_4, CUBE_5, VAL_BLK). Stereotypes: atpSplitable Tags: atp.Splitkey=ruleBasedValues xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=80 xml.typeWrapperElement=false
swArraysize ValueList 0..1 aggr This attribute defines the size of each dimension for compound primitives CURVE, MAP, CUBOID, CUBE_4, CUBE_5, COM_AXIS, RES_AXIS, VAL_BLK. For each dimension one value has to be defined, e.g. one in case of COM_AXIS and two or more in case of MAP. Tags: xml.sequenceOffset=40
unit Unit 0..1 ref This represents the physical unit of the provided values. Tags: xml.sequenceOffset=30

RuleBasedValueCont . ruleBasedValues 的存在性:

如果 ApplicationRuleBasedValueSpecification 应用于复合原始数据类型,则适用于 ApplicationRuleBasedValueSpecification 的规则基本上与为 ApplicationValueSpecification 定义的相同。

RuleBasedAxisCont 的强制信息:

该规则应在合同阶段生成执行时施加。

RuleBasedValueCont 的强制信息:

该规则应在合同阶段生成执行时施加。

请注意,对 category 为 ARRAY 的 ApplicationRuleBasedValueSpecification 而言,不要求定义属性 swArraysize,因为适用大小通常可以从上下文导出。

另请注意,对于多维复合原始数据类型(例如 MAP),必须知道维度才能处理 SwValues。[constr_2057] 和 [constr_2058] 应支持对单个和多维复合原始数据类型的一致处理。

如果 ApplicationRuleBasedValueSpecification 为具有多于一个输入轴的复合原始数据类型定义值,则 swArraysize 成为强制,以确保正确处理按规则计算的值。

category 为 COM_AXIS、RES_AXIS 的 RuleBasedAxisCont 值仅用于显示:

如果这些情况下轴的 RuleBasedAxisCont 值存在,它们仅用于显示,因为 MAP 或 CURVE 的相关 DataPrototype 不保存此类轴的值。这些是 COM_AXIS 或 RES_AXIS 的 DataPrototype 的属性。

因此,COM_AXIS 本身的值由 RuleBasedValueCont 描述。

NumericalRuleBasedValueSpecification 的含义:

(它是)紧凑地提供 DataPrototype 值的手段——否则将需要大容量(就序列化 ARXML 而言)的例如初始化数据。NumericalRuleBasedValueSpecification 可用于由 category 为 ARRAY 的 ImplementationDataType 定义类型、或映射到 category 为 ARRAY 的 ImplementationDataType 的复合原始数据类型定义类型的 DataPrototype。

关于复合原始数据类型的 initValue,另请参见 [TPS_SWCT_01185]。

表5.157:NumericalRuleBasedValueSpecification(NumericalRuleBasedValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class is used to support a rule-based initialization approach for data types with an array-nature (ImplementationDataType of category ARRAY). | | 基类 | ARObject , AbstractRuleBasedValueSpecification , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
ruleBased Values RuleBasedValue Specification 0..1 aggr This represents the rule based value specification for the array. Tags: xml.roleElement=true xml.roleWrapperElement=false xml.typeWrapperElement=false

NumericalRuleBasedValueSpecification . ruleBasedValues 的存在性:

RuleBasedValueSpecification.rule 的标准化值:

  • FILL_UNTIL_END

  • FILL_UNTIL_MAX_SIZE

rule 的这个值的含义在 [TPS_SWCT_01494] 和 [TPS_SWCT_01609] 中解释。

RuleArguments 实参的顺序应受到尊重:

请注意,单个实参可以由属性定义:

  • RuleArguments.v

  • RuleArguments.vf

  • RuleArguments.vt

  • RuleArguments.vtf.vf

  • RuleArguments.vtf.vt

RuleBasedValueSpecification.arguments 的数量不应超过数组大小:

rule 为 FILL_UNTIL_END 的 RuleBasedValueSpecification 应把最后一个 RuleBasedValueSpecification.arguments 的值填充到数组最后一个元素:

如果 RuleBasedValueSpecification.arguments 的数量小于它所应用数组的元素数量,则最后一个 RuleBasedValueSpecification.arguments 的值应应用到数组的任何后续元素,直到数组的最后一个元素。

rule 为 FILL_UNTIL_MAX_SIZE 的 RuleBasedValueSpecification 应把最后一个 RuleBasedValueSpecification.arguments 的值填充到 maxSizeToFill 规定的元素数量:

如果 RuleBasedValueSpecification.arguments 的数量小于它所应用数组的元素数量且小于 maxSizeToFill,则最后一个 RuleBasedValueSpecification.arguments 的值应应用到足够多的后续元素,使数组的前 maxSizeToFill 个元素被填充。

表5.158:RuleBasedValueSpecification(RuleBasedValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class is used to support a rule-based initialization approach for data types with an array-nature (ApplicationArrayDataType and ImplementationDataType of category ARRAY) or a compound Application PrimitiveDataType (which also boils down to an array-nature). | | 基类 | ARObject | | 聚合于 | NumericalRuleBasedValueSpecification.ruleBasedValues, RuleBasedAxisCont.ruleBasedValues, Rule BasedValueCont.ruleBasedValues |

属性 类型 多重性 种类 备注
arguments RuleArguments 0..1 aggr This represents the arguments for the RuleBasedValue Specification. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=arguments, arguments.variationPoint.short Label vh.latestBindingTime=preCompileTime xml.sequenceOffset=30
maxSizeToFill Integer 0..1 attr If a rule is chosen which does not fill until the end, this determines until which size the rule shall fill the values. Tags: xml.sequenceOffset=40
rule Identifier 0..1 attr This denotes the name of the rule of the RuleBasedValue Specification. The rule determines the calculation specification according which the arguments are used to calculated the values. Tags: xml.sequenceOffset=20

RuleBasedValueSpecification . rule 的存在性:

RuleBasedValueSpecification . arguments 的存在性:

表5.159:RuleArguments(RuleArguments)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This represents the arguments for a rule-based value specification. | | 基类 | ARObject | | 聚合于 | RuleBasedValueSpecification.arguments |

表5.160:RuleArguments(RuleArguments)

属性 类型 多重性 种类 备注
v Numerical 0..1 attr This represents a numerical value for the RuleBased ValueSpecification.
vf Numerical 0..1 attr This represents a numerical value for the RuleBased ValueSpecification which may subject to variability. The latest binding time of the VariationPoint shall be pre CompileTime. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
vt VerbatimString 0..1 attr This represents a textual value for the RuleBasedValue Specification.
vtf NumericalOrText 0..1 aggr This aggregation represents the ability to provide a value that is either numerical or text which existence is subject to variability. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=vtf, vtf.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

原始数组元素的 RuleBasedValueSpecification 定义示例见附录 B.3.8。

请注意,不预期 ArrayValueSpecification 由 ApplicationRuleBasedValueSpecification 的集合、甚至 ApplicationRuleBasedValueSpecification 与另一种 ValueSpecification 的混合构成。

ApplicationRuleBasedValueSpecification 的聚合:

如果聚合了一个 ApplicationRuleBasedValueSpecification,则它应是唯一被聚合的元素,即在聚合 ApplicationRuleBasedValueSpecification 的同一聚合中不得存在其他 ValueSpecification。

该规则应在合同阶段生成执行时施加。

请注意,不预期 ArrayValueSpecification 由 NumericalRuleBasedValueSpecification 的集合、甚至 NumericalRuleBasedValueSpecification 与另一种 ValueSpecification 的混合构成。

NumericalRuleBasedValueSpecification 的聚合:

如果聚合了一个 NumericalRuleBasedValueSpecification,则它应是唯一被聚合的元素,即在

聚合 NumericalRuleBasedValueSpecification 的同一聚合中不得存在其他 ValueSpecification。

该规则应在合同阶段生成执行时施加。

5.6.9.2. 对组合数据类型的支持

CompositeRuleBasedValueSpecification 的含义:

表5.161:CompositeRuleBasedValueSpecification(CompositeRuleBasedValueSpecification)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class represents rule-based values for DataPrototypes typed by composite AutosarDataTypes. | | 基类 | ARObject , AbstractRuleBasedValueSpecification , ValueSpecification | | 聚合于 | ApplicationAssocMapElementValueSpecification.key, ApplicationAssocMapElementValueSpecification. value, ArrayValueSpecification.element, CalibrationParameterValue.applInitValue, CalibrationParameter Value.implInitValue, ConstantSpecification.valueSpec, CryptoServiceKey.developmentValue, Diagnostic EnvDataCondition.compareValue, DiagnosticEnvDataElementCondition.compareValue, FieldSenderCom Spec.initValue, ISignal.initValue, ISignal.timeoutSubstitutionValue, NonqueuedReceiverComSpec.init Value, NonqueuedReceiverComSpec.timeoutSubstitutionValue, NonqueuedSenderComSpec.initValue, NvProvideComSpec.ramBlockInitValue, NvProvideComSpec.romBlockInitValue, NvRequireComSpec.init Value, ParameterDataPrototype.initValue, ParameterProvideComSpec.initValue, ParameterRequireCom Spec.initValue, PersistencyDataRequiredComSpec.initValue, PersistencyKeyValuePair.initValue, Port DefinedArgumentValue.value, PortPrototypeBlueprintInitValue.value, RecordValueSpecification.field, SomeipEventDeployment.eventReceptionDefaultValue, StateManagementCompareCondition .compare Value, SwDataDefProps.invalidValue, VariableDataPrototype.initValue |

属性 类型 多重性 种类 备注
argument (ordered) CompositeValue Specification * aggr This represents the collection of aggregated Value Specifications. The last ValueSpecification in the collection shall be taken to execute the filling rule. Tags: xml.sequenceOffset=30
compound Primitive Argument (ordered) CompositeRuleBased ValueArgument * aggr This represents the collection of aggregated Value Specifications for compound primitive data type. The last ValueSpecification in the collection shall be taken to execute the filling rule. Tags: xml.sequenceOffset=35
maxSizeToFill PositiveInteger 0..1 attr If a rule is chosen which does not fill until the end, this determines until which size the rule shall fill the values. Tags: xml.sequenceOffset=40
rule Identifier 0..1 attr This denotes the name of the rule of the RuleBasedValue Specification. The rule determines the calculation specification according which the arguments are used to calculated the values. Tags: xml.sequenceOffset=20

CompositeRuleBasedValueSpecification . rule 的存在性:

CompositeRuleBasedValueSpecification . argument 的存在性:

原始数组元素的 RuleBasedValueSpecification 定义示例见附录 B.3.9。

请注意,不预期 ArrayValueSpecification 由 CompositeRuleBasedValueSpecification 的集合、甚至 CompositeRuleBasedValueSpecification 与另一种 ValueSpecification 的混合构成。

CompositeRuleBasedValueSpecification 的聚合:

如果聚合了一个 CompositeRuleBasedValueSpecification,则它应是唯一被聚合的元素,即在聚合 CompositeRuleBasedValueSpecification 的同一聚合中不得存在其他 ValueSpecification。

该规则应在合同阶段生成执行时施加。

CompositeRuleBasedValueSpecification 定义的示例见第 B.3.10 节。

5.6.9.3. 对复合原始数据类型的支持

请注意,CompositeRuleBasedValueSpecification 还支持由复合原始数据类型(例如 category 为 CURVE)定义类型的数组的基于规则的初始化。

23 当然,该能力限于 ApplicationArrayDataType。在 ImplementationDataType 层级,使用反映相应 ImplementationDataType 结构的 ValueSpecification。

CompositeRuleBasedValueSpecification 的属性:

  • 基于角色 argument 中 CompositeValueSpecification 的聚合,为组合数据类型数组定义基于规则的值规范;

  • 基于角色 compoundPrimitiveArgument 中 CompositeRuleBasedValueArgument 的聚合,为复合原始数据类型数组定义基于规则的值规范。

()

CompositeRuleBasedValueSpecification . argument vs. compoundPrimitiveArgument 的存在性:

  • argument;

  • compoundPrimitiveArgument。

应在合同阶段生成执行时存在。

表5.162:CompositeRuleBasedValueArgument(CompositeRuleBasedValueArgument)

| 包 | M2::AUTOSARTemplates::CommonStructure::Constants | | 说明 | This meta-class has the ability to serve as the abstract base class for ValueSpecifications that can be used for compound primitive data types. | | 基类 | ARObject | | 子类 | ApplicationRuleBasedValueSpecification, ApplicationValueSpecification | | 聚合于 | CompositeRuleBasedValueSpecification.compoundPrimitiveArgument |

带集成轴的、category 为 CURVE 的 ApplicationPrimitiveDataType 数组基于规则初始化的简化示例见附录 B.3.10。

5.7. 初始值

5.7.1. 概述

初始值的重要性:

出于多种原因,因此建议能够在未以受控方式指派值的情况下为 VariableDataPrototype/ParameterDataPrototype 规定初始值。然而,初始值的定义在许多情况下取决于访问该值的上下文。

因此,AUTOSAR 标准预见了在不同概念层级为 VariableDataPrototype/ParameterDataPrototype 定义初始值的手段。

也就是说,虽然针对同一 VariableDataPrototype/ParameterDataPrototype 定义,但在一个概念层级上定义的初始值可以 “取代” 在另一概念层级上定义的另一个初始值,前提是前者的优先级高于后者。

“取代” 在此上下文中的含义是:在特定概念层级上定义的初始值是该层级上唯一相关的初始值定义。

初始值定义相对于概念层级的优先级:

数据传输初始值的定义:

初始值定义的概念层级:

  1. 可以在任何 VariableDataPrototype/ParameterDataPrototype 的定义处直接聚合 initValue。适用一个限制,请查阅 [TPS_SWCT_01855];

  2. 可以在 ComSpec 层级聚合 initValue,即:

  3. NonqueuedSenderComSpec;

  4. NonqueuedReceiverComSpec;

  5. ParameterProvideComSpec;

  6. ParameterRequireComSpec;

  7. NvRequireComSpec;

  8. NvProvideComSpec。

  9. 可以在 CalibrationParameterValue 的定义处聚合 implInitValue 和 applInitValue。

一个初始值定义相对另一个的优先级由上述枚举的数字顺序反映,例如层级 3 上的定义取代层级 2 上的定义。

5.7.2. 初始值的表示

initValue 的实际值应按 AutosarDataType 解释:

即:如果 DataPrototype 由 ApplicationDataType 定义类型,则值应解释为物理值;而如果 DataPrototype 由 ImplementationDataType 定义类型,则值应解释为直接的数值表示。

category 为 VALUE 的 ApplicationPrimitiveDataType:

请注意,引用 category 为 SCALE_LINEAR_AND_TEXTTABLE(或类似)的 CompuMethod 的 DataPrototype 应借助若干 ApplicationValueSpecification.swValueCont.swValuesPhys.vtf 的定义来初始化。

依据绑定表达式的求值,取数值或字符串来初始化 DataPrototype。

复合原始数据类型的 initValue:

请注意,复合原始数据类型的定义见第 5.6 节。

DataPrototype 由 ApplicationPrimitiveDataType 定义类型:

如果底层 ApplicationPrimitiveDataType 表示枚举,则提供的值应与适用 CompuScale 定义的适用文本值(vt、shortLabel、symbol)之一匹配。

该规则应在合同阶段生成执行时施加。

请注意,元类 CompuScale 的若干属性可用于描述实际值。因此有必要澄清:如果一个 CompuScale 的上下文内存在这些属性中的多个会发生什么。该澄清见 [TPS_SWCT_01696]。

DataPrototype 由 ImplementationDataType 定义类型:

该规则应在合同阶段生成执行时施加。

用于为 DataPrototype 定义类型的 AutosarDataType 的 category 设置为 STRING:

该规则应在合同阶段生成执行时施加。

DataPrototype 由 ApplicationRecordDataType 定义类型:

该规则应在合同阶段生成执行时施加。

DataPrototype 由 ApplicationArrayDataType 定义类型:

该规则应在合同阶段生成执行时施加。

由复合原始数据类型定义类型的 DataPrototype 的初始化:

该规则应在合同阶段生成执行时施加。

5.7.3. CalibrationParameters 的初始值

通过 RTE 生成器和编译器定义标定数据集合:

这允许通过 RTE 生成器和编译器创建标定数据集合。这些初始值在 CalibrationParameterValueSet 和 CalibrationParameterValue 中规定。后者在两个不同角色中聚合 ValueSpecification:

  • applInitValue 用于按 ApplicationDataType 结构化的数据。在这种情况下,值定义在物理域中;

  • implInitValue 用于按 ImplementationDataType 结构化的数据。在这种情况下,值定义在数值域中。

glyph[floorright](RS_SWCT_03175)

无论如何,这些初始值可以从例如 ASAM CDF 文件导入。

表5.163:CalibrationParameterValueSet(CalibrationParameterValueSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::MeasurementAndCalibration::CalibrationParameter Values | | 说明 | Specification of a constant that can be part of a package, i.e. it can be defined stand-alone. Tags: atp.recommendedPackage=CalibrationParameterValueSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
calibration ParameterValue CalibrationParameter Value * aggr This represents single CalibrationParameterValues in the CalibrationParameterValueSet. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=calibrationParameterValue, calibration ParameterValue.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表5.164:CalibrationParameterValue(CalibrationParameterValue)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::MeasurementAndCalibration::CalibrationParameter Values | | 说明 | Specifies instance specific calibration parameter values used to initialize the memory objects implementing calibration parameters in the generated RTE code. RTE generator will use the implInitValue to override the initial values specified for the DataPrototypes of a component type. The applInitValue is used to exchange init values with the component vendor not publishing the transformation algorithm between ApplicationDataTypes and ImplementationDataTypes or defining an instance specific initialization of components which are only defined with ApplicationDataTypes. Note: If both representations of init values are available these need to represent the same content. Note further that in this case an explicit mapping of ValueSpecification is not implemented because calibration parameters are delivered back after the calibration phase. | | 基类 | ARObject | | 聚合于 | CalibrationParameterValueSet.calibrationParameterValue |

属性 类型 多重性 种类 备注
applInitValue ValueSpecification 0..1 aggr This is the initial value specification structured according to the ApplicationDataType
implInitValue ValueSpecification 0..1 aggr This is the initial value specification structured according to the ImplementationDataType
initialized Parameter FlatInstanceDescriptor 0..1 ref This represents the parameter that is initialized by the CalibrationParameterValue.

CalibrationParameterValue . initializedParameter 的存在性:

5.7.4. 可选元素的初始值

给定 AutosarDataType 中可选元素的存在需要在初始值定义中妥善考虑。

5.7.4.1. 可选 ApplicationRecordElement 的初始值

由 ApplicationRecordDataType 定义类型的给定 DataPrototype 的初始值借助 RecordValueSpecification 定义。

带不可用可选元素的 ApplicationRecordDataType 的 ValueSpecification 定义:

满足 [constr_1271] 的规范做法是:用一种特殊的 ValueSpecification(NotAvailableValueSpecification)填充结构中表示该结构不可用可选元素的位置,以无歧义地传达如下信息:就初始值而言,该元素对特定 DataPrototype 不可用。

[TPS_SWCT_01823] 所作的陈述应解释为:NotAvailableValueSpecification 应表示外围 ApplicationRecordDataType 中不可用 ApplicationRecordElement 的位置,即使该不可用 ApplicationRecordElement 的数据类型是组合数据类型(例如 ApplicationRecordDataType)。

这一理解以最简模型示例勾勒:

Example 5.4

<CONSTANT-SPECIFICATION>

<SHORT-NAME> DoThis </SHORT-NAME>

<VALUE-SPEC>

<RECORD-VALUE-SPECIFICATION>

<FIELDS>

<APPLICATION-VALUE-SPECIFICATION></APPLICATION-VALUE-SPECIFICATION> <NOT-AVAILABLE-VALUE-SPECIFICATION></NOT-AVAILABLE-VALUESPECIFICATION>

<APPLICATION-VALUE-SPECIFICATION></APPLICATION-VALUE-SPECIFICATION> </FIELDS>

</RECORD-VALUE-SPECIFICATION>

</VALUE-SPEC>

</CONSTANT-SPECIFICATION>

换言之,NotAvailableValueSpecification 不限于原始 “叶” 元素。NotAvailableValueSpecification 可以应用于组合 ValueSpecification 的任何层级。

不需要把 ValueSpecification 的实际性质向下委托到叶元素,如下面的模型摘录所示:

Example 5.5

<CONSTANT-SPECIFICATION> <SHORT-NAME> DontDoThis </SHORT-NAME> <VALUE-SPEC> <RECORD-VALUE-SPECIFICATION> <FIELDS> <APPLICATION-VALUE-SPECIFICATION></APPLICATION-VALUE-SPECIFICATION> <RECORD-VALUE-SPECIFICATION> <FIELDS> <NOT-AVAILABLE-VALUE-SPECIFICATION></NOT-AVAILABLE-VALUESPECIFICATION> <NOT-AVAILABLE-VALUE-SPECIFICATION></NOT-AVAILABLE-VALUESPECIFICATION> </FIELDS> </RECORD-VALUE-SPECIFICATION> <APPLICATION-VALUE-SPECIFICATION></APPLICATION-VALUE-SPECIFICATION> </FIELDS> </RECORD-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

NotAvailableValueSpecification . defaultPattern 的语义:

不过,NotAvailableValueSpecification 占用的内存区域应在初始化期间以确定性模式填充。

defaultPattern 的内容应用于填充由带 NotAvailableValueSpecification 初始化的可选元素占用的内存空隙。

属性 NotAvailableValueSpecification.defaultPattern 的应用只发生在初始化期间:

因此,如果在特定接收中未收到可选元素,则内存区域保持原样。检查该可选元素是否实际收到是应用的职责。

NotAvailableValueSpecification . defaultPattern 属性的存在性:

属性 NotAvailableValueSpecification.defaultPattern 的有效区间:

5.7.4.2. 可选 ImplementationDataTypeElement 的初始值

属性 isStructWithOptionalElement 设置为值 true 的 category 为 STRUCTURE 的 ImplementationDataType 的初始值:

shortName 设置为值 availabilityBitfield 的 ImplementationDataTypeElement 的初始值:

如果相应元素初始不应可用,则相应位应设置为 false。

不可用 ImplementationDataTypeElement 的初始化:

所提供的 ValueSpecification 应视为 “无关紧要”。

从性能的角度看,建议对按 [TPS_SWCT_01787] 的不可用 ImplementationDataTypeElement 初始化使用值 0(在叶元素层级)。

NotAvailableValueSpecification 的使用限于 ApplicationDataType 的上下文。因此,[TPS_SWCT_01787] 中提到的 “哑” 初始值不应实现为 NotAvailableValueSpecification,见 [constr_10415]。

属性 isOptional 设置为值 True 的 ImplementationDataTypeElement 层级上的初始值:

该规则应在合同阶段生成执行时施加。

6. 兼容性

6.1. 简介

为了连接 SwComponentType 的 PortPrototype,需要验证 PortPrototype 的兼容性。本节定义 PortPrototype 形式兼容性的基本规则。

兼容性将自底向上定义,即先建立兼容 AutosarDataType 的规则,再导出不同种类 PortInterface 的规则。

兼容性的另一个方面是两个模型元素(例如 ApplicationDataType 与 ImplementationDataType)能否相互映射。

对 PortInterface 的兼容性,基本上适用两个选项:

  1. 寻找 PortInterface 元素的匹配对基于 shortName 匹配加上对其属性兼容性规则的应用;

  2. 可以取 PortInterfaceMapping 来声明 PortPrototype 的两个元素兼容,而不应用进一步的形式检查。

6.2. 数据类型的兼容性

AUTOSAR 元模型定义了若干元类(例如 ApplicationPrimitiveDataType),它们最终引用与兼容性检查相关的一组属性(例如其值的下边界)。

实例化数据类型相关的元类在 M1 层级定义一个数据类型(例如 temperatureType)。换言之:ApplicationPrimitiveDataType 是 M2 工件;它被取作创建相应 M1 工件 temperatureType 的模板。

在此上下文中,兼容性问题指向 M1 对象,即需要考虑 AutosarDataType 子类的实例。为此,需要就兼容性完整考察 AUTOSAR 元模型的相关部分。

6.2.1. ApplicationDataType

6.2.1.1. ApplicationPrimitiveDataType

ApplicationPrimitiveDataType 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们具有相同的 category;

  3. (b) 附加到 M1 数据类型的 swDataDefProps(在考虑 [constr_1015] 之后)兼容。

  4. 在使用 ApplicationPrimitiveDataType 的上下文中,存在一个 DataPrototypeMapping,它在角色 firstDataPrototype 中引用由其中一个 ApplicationPrimitiveDataType 定义类型的 DataPrototype,在角色 secondDataPrototype 中引用由另一个 ApplicationPrimitiveDataType 定义类型的另一个 DataPrototype。

  5. 在使用 ApplicationPrimitiveDataType 的上下文中,存在一个 DataPrototypeMapping,它在角色 secondDataPrototype 中引用由该 ApplicationPrimitiveDataType 定义类型的 DataPrototype,在角色 firstDataPrototype 中引用由 ApplicationCompositeDataType 定义类型的另一个 DataPrototype,此外对 ApplicationCompositeDataType 一侧在角色 firstElement 中存在相应的 ApplicationCompositeDataTypeSubElementRef,它又引用一个 ApplicationCompositeElementDataPrototype。

()

请注意,“附加到 M1 数据类型的 swDataDefProps 兼容” 的含义在第 6.2.4 节解释。

另请注意,把两个数据类型视为兼容并不要求两个数据类型的 shortName 相同。

6.2.1.2. ApplicationCompositeDataType

ApplicationRecordDataType 的实例与 ApplicationArrayDataType 的实例永远不兼容,除非存在细化兼容条款的 PortInterfaceMapping(见 [TPS_SWCT_01543])。

ApplicationRecordDataType 的兼容性:

  1. 相同记录位置的所有 element 都属于兼容的 AutosarDataType(ApplicationCompositeDataType 或 ApplicationPrimitiveDataType);

  2. 对每个 ApplicationRecordDataType.element,属性 isOptional 应:

  3. 两侧都不存在;或

  4. 若只存在于一侧则设置为值 false;或

  5. 两侧取相同值。

  6. 在 DataPrototypeMapping 的上下文中,对所需 ApplicationRecordDataType 的每个 ApplicationRecordElement 存在一个 SubElementMapping,使得角色 firstElement 或 secondElement 中存在引用所需 ApplicationRecordElement 的 ApplicationCompositeDataTypeSubElementRef,且在另一角色(即 secondElement 或 firstElement)中存在相应的 ApplicationCompositeDataTypeSubElementRef,它又引用所提供 ApplicationRecordDataType 的一个 ApplicationRecordElement。

ApplicationArrayDataType 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们的 element 属于兼容的 AutosarDataType(ApplicationCompositeDataType 或 ApplicationPrimitiveDataType);

  3. (b) 属性 maxNumberOfElements 和 arraySizeSemantics(如存在)具有相同的值。

  4. 在 DataPrototypeMapping 的上下文中,对所需 ApplicationArrayDataType 的 ApplicationArrayElement 存在一个 SubElementMapping,使得角色 firstElement 或 secondElement 中存在引用所需 ApplicationArrayElement 的 ApplicationCompositeDataTypeSubElementRef,且在另一角色(即 secondElement 或 firstElement)中存在相应的 ApplicationCompositeDataTypeSubElementRef,它又引用所提供 ApplicationArrayDataType 的一个 ApplicationArrayElement。()

6.2.2. ImplementationDataType

ImplementationDataType 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们具有相同的 category;

  3. (b) 它们具有相同的结构(指 ImplementationDataTypeElement 及其 subElement);

  4. (c) 属性 arraySize 和 arraySizeSemantics(如存在)具有相同的值;

  5. (d) 对每个 ImplementationDataType.subElement,属性 isOptional 应(同上规则之一);

  6. 两侧都不存在;或

  7. 若只存在于一侧则设置为值 false;或

  8. 两侧取相同值。

  9. (e) 附加到 M1 数据类型的 swDataDefProps(在考虑 [constr_1015] 之后)兼容。

  10. 在使用 ImplementationDataType 的上下文中,存在一个 DataPrototypeMapping,它在角色 firstDataPrototype 中引用由其中一个 ImplementationDataType 定义类型的 DataPrototype,在角色 secondDataPrototype 中引用由另一个 ImplementationDataType 定义类型的另一个 DataPrototype。

  11. 在使用 ImplementationDataType 的上下文中,存在一个 DataPrototypeMapping,它在角色 secondDataPrototype 中引用由该 ImplementationDataType 定义类型的 DataPrototype,在角色 firstDataPrototype 中引用由带 subElement 的 ImplementationDataType 定义类型的另一个 DataPrototype,此外对带 subElement 的 ImplementationDataType 一侧在角色 firstElement 中存在相应的 ImplementationDataTypeSubElementRef,它又引用一个 ImplementationDataTypeElement。

请注意,“附加到 M1 数据类型的 swDataDefProps 兼容” 的含义在第 6.2.4 节解释。

请注意,要把两个数据类型视为兼容,并不要求两个数据类型的 shortName 相同。

以下约束适用于模式管理器与模式用户使用不同 ImplementationDataType 的情况。从 RTE 的角度看,只需要模式管理器用于表示 ModeDeclaration 的所有可能数值都能放进模式用户所用数据类型的取值范围。

ModeRequestTypeMap 中使用的 ImplementationDataType 的兼容性:

除此之外,模式管理器一侧用于表示 ModeDeclaration 的可能数值应与模式用户一侧用于表示 ModeDeclaration 的 ImplementationDataType 的支持范围匹配(见 [constr_1075])。

该规则应在 RTE 生成时施加。

6.2.3. SwBaseType 的兼容性

SwBaseType 的兼容性:

  • baseTypeSize(或分别)

  • byteOrder,

  • memAlignment,

  • baseTypeEncoding,以及

  • nativeDeclaration

在 RTE 生成时具有相同的值。

6.2.4. SwDataDefProps 的兼容性

SwDataDefProps 的兼容性:

  1. 它们引用兼容的 Unit 定义,或两者都没有关联的 Unit;

  2. 它们引用兼容的换算方法,或两者都不关联这样的方法;

  3. 它们都在角色 invalidValue 中聚合 ValueSpecification,或两者都不在角色 invalidValue 中聚合 ValueSpecification;

  4. 如存在(见前一条件),为被视为兼容(在跟随并解析由 ConstantReference 造成的间接之后),聚合在角色 invalidValue 中的 ValueSpecification 适用以下条件之一:

  5. (a) 两者都是 ApplicationValueSpecification,且值按 [TPS_GST_02501] 兼容;

  6. (b) 两者都是 NumericalValueSpecification,且值按 [TPS_GST_02501] 兼容;

  7. (c) 两者都是 TextValueSpecification,且值相同;

  8. (d) 两者都是 ArrayValueSpecification,且值实际相同,例如如果一个 ArrayValueSpecification 显式规定所有值而另一个基于规则规定值,则两个 ArrayValueSpecification 的产出(逐元素)应相同;

  9. (e) 两者都是 RecordValueSpecification,且值相同;

  10. (f) 如果一个是 NumericalValueSpecification 而另一个是 ApplicationValueSpecification,则兼容性检查应对物理值应用 CompuMethod,使实现层级上的比较成为可能。适用 [TPS_GST_02501]。

  11. 它们引用兼容的数据约束 dataConstr;

  12. 它们引用兼容的 swRecordLayout。

所有其他属性(例如 swCalibrationAccess)不影响兼容性。

请注意,兼容的换算方法在第 6.2.4.5 章描述。

6.2.4.1. 单位的兼容性

单位的兼容性:

  1. 它们的属性 factorSiToUnit 和 offsetSiToUnit 具有兼容(见 [TPS_GST_02501])的值;

  2. 满足以下条件之一:

  3. 它们引用兼容的 PhysicalDimension 定义;

  4. 两者都不关联 PhysicalDimension;

  5. 一个 Unit 引用 shortName 为 NoDimension(所有指数设置为 0)的 PhysicalDimension,而另一个 Unit 不引用 PhysicalDimension。

()

请注意,两个被引用的 shortName 为 NoDimension 的 PhysicalDimension 的情形由 [constr_1053] 处理。

另请注意,把两个单位视为兼容并不要求两个 Unit 的 shortName 相同。

factorSiToUnit 与 offsetSiToUnit 的默认值:

属性 Unit.offsetSiToUnit 的默认值为 0。

在把 ValueSpecification 指派给给定 AutosarDataPrototype 的上下文中,专门适用于 Unit 处理的进一步约束有:

使用 ApplicationValueSpecification 指派上下文中单位的兼容性:

1 如果一个是 NumericalValueSpecification 而另一个是 ApplicationValueSpecification,且在 ApplicationValueSpecification 一侧应用 CompuMethod 不能产生有效数值,则无法比较。

用于指派 AutosarDataPrototype 的上下文时,ApplicationValueSpecification.swValueCont.unit 应与给定 AutosarDataPrototype 定义中使用的 Unit(即 AutosarDataType.swDataDefProps.unit)兼容。

该规则应在合同阶段生成执行时施加。

使用 ApplicationRuleBasedValueSpecification 指派上下文中单位的兼容性:

该规则应在合同阶段生成执行时施加。

RuleBasedValueCont . unit 的存在性:

SwValueCont . unit 的存在性:

6.2.4.2. 物理维度的兼容性

PhysicalDimension 的兼容性:

  • lengthExp;

  • massExp;

  • timeExp;

  • currentExp;

  • temperatureExp;

  • molarAmountExp;

  • luminousIntensityExp

应相同,且(满足以下之一)

  • shortName 相同;或

  • 存在一个 PhysicalDimensionMapping,把一个 PhysicalDimension 映射到角色 firstPhysicalDimension、另一个映射到角色 secondPhysicalDimension。

该约束的施加时间取决于上下文:

  • 如果 PhysicalDimension 的兼容性在创建 SwConnector 的上下文中求值,则该规则应在 RTE 生成时施加;

  • 如果上下文是创建 ApplicationValueSpecification,则该规则应在合同阶段生成执行时施加。

-

为澄清起见,存在一些物理量纲共享相同的指数值但含义完全不同、因此不应视为兼容。正是因为这个原因,[constr_1053] 要求两个 PhysicalDimension 的 shortName 相同作为兼容的前提。

例如,至少有两个物理量纲共享以下值:

  • lengthExp;

  • massExp;

  • timeExp;

  • currentExp;

  • temperatureExp;

  • molarAmountExp = 0;

  • luminousIntensityExp

= 2 = 1 = -2 = 0 = 0 = 0

这组指数描述的单位通常称为 “Nm”(牛顿米),既可以用于扭矩也可以用于能量。显然,如果一个 Unit 引用扭矩而另一个引用能量,两个 Unit 绝不应视为兼容。

6.2.4.3. 数据约束的兼容性

两个 DataConstr 的兼容性取决于拥有数据元素连接所在的上下文:

DataConstr 的兼容性:

对 client-server 通信,适用以下规则:

  • 对属性 direction 设置为值 in 的 argument,客户端应承担提供方角色,服务器应承担需要方角色;

  • 对属性 direction 设置为值 inout 的 argument,两侧的 DataConstr 应相等;

  • 对属性 direction 设置为值 out 的 argument,服务器应承担提供方角色,客户端应承担需要方角色。

该规则应在 RTE 生成时应用。

此外,始终允许需要方元素不定义约束。

PhysConstrs 引用一个 Unit:

提供方没有可用的 DataConstr:

换言之,这不是针对类型的兼容性规则,而是针对数据原型的。

6.2.4.4. ImplementationDataType 情形下的兼容性

如果 SwDataDefProps 由 ImplementationDataType 拥有,则应满足进一步条件以确保兼容性。

注意,依 ImplementationDataType 的 category,这四个约束中实际相关的最多只有一个:

  1. category VALUE:

ImplementationDataType 的 category 为 VALUE:

  1. category TYPE_REFERENCE:

ImplementationDataType 的 category 为 TYPE_REFERENCE:

  1. category DATA_REFERENCE:

ImplementationDataType 的 category 为 DATA_REFERENCE:

  1. category FUNCTION_REFERENCE:

ImplementationDataType 的 category 为 FUNCTION_REFERENCE:

请注意,术语 “相同签名” 指以下谓词:

  • 实参数量相同;

  • 返回值和实参应具有相同——不仅是兼容——的数据类型。

如果底层编程语言中两个类型之间存在简单的换算规则,则两个 SwBaseType 兼容(就允许经由 RTE 连接端口而言)。

诚然,这是一个相当弱的条件。但由于 SwBaseType 的定义可以包含 nativeDeclaration,无法更具体地表述该规则。

不过,基本类型之间的换算被认为是比 “所连接类型只包含两个相同 SwBaseType” 这一简单情形(当然已包含在该规则中)更少见的用例。

另请注意,此外,ApplicationDataType 的存在还经由 ApplicationDataType 与 ImplementationDataType 之间映射的兼容性规则约束可能的 SwBaseType,这将在第 6.2.5 章更详细地解释。

6.2.4.5. CompuMethod 的兼容性

CompuMethod 的兼容性:

  • shortName;

  • desc;

  • introduction;

  • longName;

  • adminData;

  • annotation;

  • displayFormat

应相同,且 compuScale 和 unit 兼容。

CompuScale 兼容性要求的适用性:

  • TEXTTABLE

  • SCALE_LINEAR_AND_TEXTTABLE

  • SCALE_RATIONAL_AND_TEXTTABLE

  • TAB_NOINTP;

  • BITFIELD_TEXTTABLE

  • LINEAR;

  • RAT_FUNC;

  • IDENTICAL。

该规则应在 RTE 生成时施加。

sender-receiver 通信及类似用例的 CompuScale 兼容性:

client-server 通信的 CompuScale 兼容性:

对方向为 IN 的 argument,客户端(即 RPortPrototype 一侧)CompuMethod 中定义的 CompuScale 应是服务器(即 PPortPrototype 一侧)支持的 CompuMethod 中定义的 CompuScale 集合的子集。

对方向为 OUT 的 argument,服务器(即 PPortPrototype 一侧)CompuMethod 中定义的 CompuScale 集合应是客户端(即 RPortPrototype 一侧)支持的 CompuMethod 中定义的 CompuScale 集合的子集。

对方向为 INOUT 的 argument,服务器与客户端 CompuMethod 中定义的 CompuScale 集合应相同。

CompuScale “名称” 的相关性:

如果该 scale 没有 compuConst,则 CompuScale 的 “名称” 与兼容性无关。

该规则应在 RTE 生成时施加。

CompuScale 约束的适用性:

category 为 LINEAR 和 RAT_FUNC 的 CompuScale 兼容性:

例如,(n0 + n1∗phys)/(d0 + d1∗phys) 与 (N0 + N1∗phys)/D0 兼容,如果 n0 ∼ N0 && n1 ∼ N1 && d0 ∼ D0 && d1 ∼ 0。

注意,∼ 表示按 [TPS_GST_02501] 的数值兼容性。

“IDENTICAL” 与 “RAT_FUNC” 或 “LINEAR” 的兼容性:

例如,这适用于以下情况:

请注意,兼容性不依赖于 category 为 LINEAR 的 CompuMethod 的方向(compuInternalToPhys 还是 compuPhysToInternal)。

6.2.5. ApplicationDataType 与 ImplementationDataType 的兼容性

ApplicationDataType 的使用意味着在某个时点也存在相应的 ImplementationDataType。ImplementationDataType 是配置和生成 RTE 和/或合同阶段头文件所需的基础。

ImplementationDataType 的存在性:

因此,必须定义兼容性规则,无歧义地澄清 ApplicationDataType 与 ImplementationDataType 的符合性,反之亦然。

请注意,这种兼容性也支持如下情形:例如 PPortPrototype 中由没有相应 ImplementationDataType 的 ApplicationDataType 定义类型的 dataElement 应连接到 RPortPrototype 中由 ImplementationDataType 定义类型的 dataElement。

一般而言,允许数据类型映射的兼容性规则与连接的规则相同。例外在下面的规则中明确陈述。

若干规则取决于数据类型的 category。

6.2.5.1. 通用规则

作为一般规则,如果 category 为 TYPE_REFERENCE 的 ImplementationDataType 被类型映射或端口连接作为目标,下面给出的所有规则都适用于解析所有此类引用后最终有效的 ImplementationDataType。

这一点不在所有规则中重复。例如,如果我们说某物可以映射/连接到 category 为 VALUE 的 ImplementationDataType,则这应包括映射/连接到引用另一个 category 为 VALUE 的 ImplementationDataType 的 category 为 TYPE_REFERENCE 的 ImplementationDataType 的可能性。

6.2.5.2. category 为 VALUE 的数据类型

category 为 VALUE 的数据类型的兼容性:

该规则应在合同阶段生成执行时施加。

在这种情况下,ImplementationDataType.baseType 应能表达 ApplicationDataType 要求的所有数值,见图 5.25。

如果 SwBaseType 能表达的数值范围至少覆盖 ApplicationDataType.swDataDefProps.dataConstr 的限值定义的范围(它们要么是内部限值,要么是需经由 CompuMethod 转换的物理限值——该 CompuMethod 也必须由 ApplicationDataType 提供),则满足该条件。

注意,对于数据元素经由网络的 sender-receiver 通信,存在相对相应数据类型所定义范围缩减数值范围的可能。不过,这不是经由在数据元素本身上映射到另一个 ImplementationDataType 达到的,而是经由 ComSpec 的 networkRepresentation 达到的(关于这一方面的进一步解释见第 4.5.1 节)。

6.2.5.3. category 为 ARRAY、VAL_BLK 的数据类型

category 为 ARRAY、VAL_BLK 的数据类型的兼容性:

| ApplicationDataType | ImplementationDataType : Array of uint8 |

| ApplicationArrayDataType of category ARRAY , VAL_BLK , arraySizeSemantics = fixedSize | ImplementationDataType of category ARRAY , with ImplementationDataTypeElement with arraySizeSemantics = fixedSize | | ApplicationArrayDataType of category ARRAY , VAL_BLK , arraySizeSemantics = variableSize | ImplementationDataType of category ARRAY , with ImplementationDataTypeElement with arraySizeSemantics = variableSize or Variable-Size Array Data Type |

该规则应在合同阶段生成执行时施加。

在这种情况下,ImplementationDataType 的数组大小、arraySizeSemantics(如存在)和数组元素的类型应能按序 1:1 映射/传输到相应的应用数据,反之亦然。

注意,在数组之间映射的情况下,不要求数组元素的数据类型之间存在 DataTypeMap,也不要求相应 shortName 相同。

6.2.5.4. category 为 STRUCTURE 的数据类型

category 为 STRUCTURE 的数据类型的兼容性:

(在由 category 为 TYPE_REFERENCE 的 ImplementationDataType 造成的所有间接解析之后)只能映射/连接到 category 为 STRUCTURE 的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

这意味着相应元素对也应具有兼容的类型。注意,不要求单个元素的数据类型具有相同的 shortName,也不要求每对单个元素都存在 DataTypeMap。

都表示可选元素结构的 ApplicationRecordDataType 与 ImplementationDataType 的兼容性:

该规则应在合同阶段生成执行时施加。

6.2.5.5. category 为 BOOLEAN 的数据类型

category 为 BOOLEAN 的数据类型的兼容性:

该规则应在合同阶段生成执行时施加。

6.2.5.6. category 为 COM_AXIS、RES_AXIS、CURVE、MAP、CUBOID、CUBE_4、CUBE_5 的数据类型

category 为 COM_AXIS、RES_AXIS、CURVE、MAP、CUBOID、CUBE_4 或 CUBE_5 的数据类型的兼容性:

  • COM_AXIS,

  • RES_AXIS,

  • CURVE,

  • MAP,

  • CUBOID,

  • CUBE_4,或

  • CUBE_5

应(在由 category 为 TYPE_REFERENCE 的 ImplementationDataType 造成的所有间接解析之后)只映射/连接到 category 为

  • STRUCTURE 或

  • ARRAY 的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

在实现层级上有若干可能的方式经由简单或嵌套数组和/或结构表达这些类型。

一些示例见第 5.4.4 节。无论如何,实现类型的原始元素应(按其在内存中的顺序)符合相应的 SwRecordLayout。

不要求为两种表示的子元素定义 DataTypeMap。

6.2.5.7. 禁止的映射

到 ImplementationDataType 的禁止映射:

  • category 为以下的 ImplementationDataType:

  • UNION;

  • DATA_REFERENCE;或

  • FUNCTION_REFERENCE;

  • 或包含 category 为以下的 subElement 的 ImplementationDataType:

  • UNION;

  • DATA_REFERENCE;或

  • FUNCTION_REFERENCE。

该规则应在合同阶段生成执行时施加。

关于应在 M1 上映射/连接的 ApplicationDataType 实例或 ImplementationDataType 实例的 SwDataDefProps,见 [constr_1015]。适用以下规则:

  1. ImplementationDataType 不允许设置属性而只能从 ApplicationDataType “继承” 属性的情形与兼容性无关。这些属性在 ImplementationDataType 中干脆不允许存在。

  2. 在只有 ImplementationDataType 可以 “定义” 属性的情形中,该定义应符合 ApplicationDataType 给出的语义要求,以使两个类型兼容。

这对属性 baseType 尤其重要,已在上面 category 为 VALUE 的类型的规则中解释。

  1. 在 ImplementationDataType 可以 “添加” 属性的情形中,为兼容起见,它只能添加而不能更改 ApplicationDataType 定义的属性(即 note、displayFormat 和 swImplPolicy)。

这意味着为兼容起见,相应的计算方法只能在其中一个类型中定义。在所有其他情形中,只有 ApplicationDataType 可以定义计算方法。

  1. 就连接器的兼容性而言,属性 swImplPolicy 的值有一些附加规则,它们被视为 DataPrototype 和 PortInterface 层级上的一般规则。

因此,这些附加规则在第 6.3 章和第 6.4.4 章解释。

  1. ImplementationDataType 可以 “重定义” ApplicationDataType 已设置的属性的情形,一般不被视为与类型映射的兼容性相关,但当然可能存在关于允许哪些重定义的项目特定规则(例如 swAddrMethod 或 dataConstr)。数据约束另见 5.5.4。

  2. 就连接器的兼容性而言,属性 dataConstr 的处理方式应与一般数据类型兼容性相同,更多细节请参见 6.2.4。

6.3. 变量数据原型与参数数据原型的兼容性

由原始数据类型定义类型的 VariableDataPrototype 或 ParameterDataPrototype 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们由(读作 “引用”)兼容的 AutosarDataType 定义类型;

  3. (b) 两个 VariableDataPrototype 或 ParameterDataPrototype 具有相同的 shortName。这是映射无序 SenderReceiverInterface、NvDataInterface 和 ParameterInterface 中的 VariableDataPrototype 所要求的;

  4. (c) 属性 swImplPolicy 要么对两个 VariableDataPrototype 都设置为 queued,要么都不设置。

  5. 在 DataPrototypeMapping 的上下文中,适用的 VariableDataPrototype 或 ParameterDataPrototype 之一由 DataPrototypeMapping 在角色 firstDataPrototype 中引用,另一个由同一 DataPrototypeMapping 在角色 secondDataPrototype 中引用。

-

由组合数据类型定义类型的 VariableDataPrototype 或 ParameterDataPrototype 的兼容性:

如果以下条件之一求值为 true,则由 ApplicationCompositeDataType 或 category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType 定义类型的 DataPrototype 在 RTE 生成时兼容:

  1. 底层的 ApplicationCompositeDataType 或 category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType 相同

  2. 底层的 ApplicationCompositeDataType 或 category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType 满足以下条件:

  3. 它们由相同数量的元素组成,且

  4. 它们按相同顺序由兼容的 AutosarDataType(ApplicationCompositeDataType、category 为 STRUCTURE 或 ARRAY 的 ImplementationDataType,或 ApplicationPrimitiveDataType、category 为 VALUE、BOOLEAN 或 STRING 的 ImplementationDataType)组成,且

  5. 除 M1 AutosarDataType 的 shortName 外,所有属性精确匹配。

  6. 在 DataPrototypeMapping 的上下文中,对所需 DataPrototype 的每个 ApplicationCompositeElementDataPrototype 存在一个 SubElementMapping,使得角色 firstElement 或 secondElement 中存在引用所需 ApplicationCompositeElementDataPrototype 的 ApplicationCompositeDataTypeSubElementRef,且在另一角色(即 secondElement 或 firstElement)中存在相应的 ApplicationCompositeDataTypeSubElementRef,它又引用所提供 ApplicationCompositeDataType 的一个 ApplicationCompositeElementDataPrototype。

  7. 当且仅当 DataPrototype 不由 ApplicationDataType 而由 ImplementationDataType 定义类型时:在 DataPrototypeMapping 的上下文中,对所需 DataPrototype 的每个 ImplementationDataTypeElement 存在一个 SubElementMapping,使得角色 firstElement 或 secondElement 中存在引用所需 ImplementationDataTypeElement 的 ImplementationDataTypeSubElementRef,且在另一角色(即 secondElement 或 firstElement)中存在相应的 ImplementationDataTypeSubElementRef,它又引用所提供 ImplementationDataType 的一个 ImplementationDataTypeElement。

6.4. Sender/Receiver 接口、参数接口与非易失数据接口的兼容性

请注意,该兼容性要求只满足静态正确性,这意味着不保证逻辑一致性(例如接收方应处理某个数据值以正确解释后续值)。

6.4.1. 通过 AssemblySwConnector 连接所需端口与提供端口

SenderReceiverInterface、NvDataInterface 和 ParameterInterface 的兼容性在用 AssemblySwConnector 连接 PortPrototype 时考虑。

AssemblySwConnector 上下文中不同 DataInterface 的 PortPrototype 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需 PortPrototype 的 DataInterface 上下文中定义的每个 VariableDataPrototype 或 ParameterDataPrototype,在所提供 PortPrototype 的 DataInterface 中存在兼容(见 [constr_1068])的 VariableDataPrototype 或 ParameterDataPrototype。

VariableDataPrototype 和 ParameterDataPrototype 的 shortName 用于标识该对。

  • (b) 存在一个 VariableAndParameterInterfaceMapping.dataMapping,对其适用以下条件:

  • i. 它被相应的 SwConnector 引用;

  • ii. 它在角色 firstDataPrototype 中引用两个 VariableDataPrototype 或 ParameterDataPrototype 之一,在角色 secondDataPrototype 中引用另一个。

  • 对每个这样的对,其 isService 属性的值相同。

约束 [constr_1071] 依据 PortInterface 类型及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。

6.4.2. 通过 DelegationSwConnector 连接内部与外部端口

SenderReceiverInterface、NvDataInterface 和 ParameterInterface 的兼容性在用 DelegationSwConnector 连接 PortPrototype 时考虑。

DelegationSwConnector 上下文中不同 DataInterface 的 PortPrototype 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需内部 PortPrototype 的 DataInterface 上下文中定义的每个 VariableDataPrototype 或 ParameterDataPrototype,在所需外部 PortPrototype 的 DataInterface 中存在兼容的 VariableDataPrototype 或 ParameterDataPrototype。

VariableDataPrototype 和 ParameterDataPrototype 的 shortName 用于标识该对。

([constr_1071])依据 PortInterface 类型及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。:

  • (b) 存在一个 VariableAndParameterInterfaceMapping.dataMapping,对其适用以下条件:

  • i. 它被相应的 SwConnector 引用;

  • ii. 它在角色 firstDataPrototype 中引用两个 VariableDataPrototype 或 ParameterDataPrototype 之一,在角色 secondDataPrototype 中引用另一个。

  • 适用以下条件之一:

  • (a) 对所提供内部 PortPrototype 的 SenderReceiverInterface、NvDataInterface 或 ParameterInterface 上下文中定义的至少一个 VariableDataPrototype 或 ParameterDataPrototype,在所提供外部 PortPrototype 的 SenderReceiverInterface、NvDataInterface 或 ParameterInterface 中存在兼容的 VariableDataPrototype 或 ParameterDataPrototype;

VariableDataPrototype 和 ParameterDataPrototype 的 shortName 用于标识该对。

([constr_1071])依据 PortInterface 类型及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。:

  • (b) 存在一个 VariableAndParameterInterfaceMapping.dataMapping,对其适用以下条件:

  • i. 它(如果相应 SwConnector 已存在)被相应的 SwConnector 引用;

  • ii. 它在角色 firstDataPrototype 中引用两个 VariableDataPrototype 或 ParameterDataPrototype 之一,在角色 secondDataPrototype 中引用另一个。

  • 对每个这样的对,其 isService 属性的值相同。

6.4.3. 通过 PassThroughSwConnector 连接所需端口与提供端口

PassThroughSwConnector 上下文中不同 DataInterface 的 PortPrototype 的兼容性:

  1. 对所需外部 PortPrototype 的 DataInterface 上下文中定义的至少一个 VariableDataPrototype 或 ParameterDataPrototype,在所提供外部 PortPrototype 的 DataInterface 中存在兼容的 VariableDataPrototype 或 ParameterDataPrototype。

要么使用 VariableDataPrototype 和 ParameterDataPrototype 的 shortName 标识该对,要么存在一个 PortInterfaceMapping,规定 PortInterface 的哪些不同名元素相互关联。

  1. 对每个这样的对,PortInterface.isService 属性的值相同。

约束 [constr_1071] 依据 PortInterface 的类型以及 PortInterface 元素的属性 swImplPolicy 定义哪些 PortInterface 元素被视为兼容。

6.4.4. ParameterDataPrototype 与 VariableDataPrototype 依 PortInterface 类型的兼容性

表 [constr_1071] 全面描述了在由各种 PortInterface 定义类型的 PortPrototype 中使用的 ParameterDataPrototype 与 VariableDataPrototype 的哪些组合被视为兼容。

ParameterDataPrototype 与 VariableDataPrototype 的兼容性:

| Provided Port Required Outer Port Provided Inner Port Required Outer Port | Required Port / Required Inner Port / Provided Outer Port / Provided Outer Port |

| PortInterface | Prm | | Interface Element | PDP | | SwImplPolicyEnum | fixed | | Prm | PDP | | Prm | PDP | | Prm | PDP | | S/R | VDP | | S/R | VDP | | NvD | VDP |

该规则应在 RTE 生成时施加。

以下图例适用于 [constr_1071] 所含表中使用的缩写:

接口元素,即 PortInterface 的元素

PDP:ParameterDataPrototype

VDP:VariableDataPrototype

端口接口,即 PortInterface 的种类

Prm:ParameterInterface

S/R:SenderReceiverInterface

NvD

NvDataInterface

([constr_1071])依据 PortInterface 的种类及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。:

SenderReceiverInterface 关于 invalidationPolicy 的兼容性:

该规则应在 RTE 生成时施加。

invalidationPolicy 的默认行为:

6.5. 模式切换接口的兼容性

请注意,该兼容性要求只满足静态正确性,这意味着不保证逻辑一致性(例如接收方应处理某个数据值以正确解释后续值)。

注意,关于 ModeSwitchInterface 的兼容性,有必要区分 AssemblySwConnector 的上下文、DelegationSwConnector 的上下文与 PassThroughSwConnector 的上下文。

6.5.1. 通过 AssemblySwConnector 连接所需端口与提供端口

这里针对 AssemblySwConnector 的上下文考虑 ModeSwitchInterface 的兼容性。

AssemblySwConnector 上下文中 ModeSwitchInterface 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需 PortPrototype 的 ModeSwitchInterface 上下文中定义的 ModeDeclarationGroupPrototype,在所提供 PortPrototype 的 ModeSwitchInterface 中存在兼容的 ModeDeclarationGroupPrototype。

  3. (b) 存在一个 ModeInterfaceMapping.modeMapping,对其适用以下条件:

  4. i. 它被相应的 SwConnector 引用;

  5. ii. 它在角色 firstModeGroup 中引用两个 ModeDeclarationGroupPrototype 之一,在角色 secondModeGroup 中引用另一个。

  6. 对每个这样的对,其 isService 属性的值相同。

6.5.2. 通过 DelegationSwConnector 连接内部与外部端口

这里针对 DelegationSwConnector 的上下文考虑 ModeSwitchInterface 的兼容性。

DelegationSwConnector 上下文中 ModeSwitchInterface 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对内部 PortPrototype 的 ModeSwitchInterface 上下文中定义的 ModeDeclarationGroupPrototype,在外部 PortPrototype 的 ModeSwitchInterface 中存在兼容的 ModeDeclarationGroupPrototype。

  3. (b) 存在一个 ModeInterfaceMapping.modeMapping,对其适用以下条件:

  4. i. 它被相应的 SwConnector 引用;

  5. ii. 它在角色 firstModeGroup 中引用两个 ModeDeclarationGroupPrototype 之一,在角色 secondModeGroup 中引用另一个。

  6. 对每个这样的对,其 isService 属性的值相同。

6.5.3. 通过 PassThroughSwConnector 连接外部与外部端口

PassThroughSwConnector 上下文中 ModeSwitchInterface 的兼容性:

  1. 对所需外部 PortPrototype 的 ModeSwitchInterface 上下文中定义的 ModeDeclarationGroupPrototype,在所提供外部 PortPrototype 的 ModeSwitchInterface 中存在兼容的 ModeDeclarationGroupPrototype。

要么使用 ModeDeclarationGroupPrototype 的 shortName 标识该对,要么存在一个映射相应 ModeDeclarationGroupPrototype 的 ModeInterfaceMapping。

  1. 对每个这样的对,PortInterface.isService 属性的值相同。

6.6. 模式声明组原型的兼容性

ModeDeclarationGroupPrototype 的兼容性:

当且仅当适用以下条件之一时,ModeDeclarationGroupPrototype 在 RTE 生成时兼容:

  1. 它们由(读作 “引用”)兼容的 ModeDeclarationGroup 定义类型;

  2. 存在一个标识相互关联的不同名 ModeDeclarationGroupPrototype 的 ModeDeclarationGroupPrototypeMapping。适用 [constr_1210]。

6.7. 模式声明组的兼容性

ModeDeclarationGroup 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们定义相同数量的 ModeDeclaration;

  3. (b) 需要侧的每个 ModeDeclaration 对应提供侧一个具有相同 shortName 的 ModeDeclaration;

  4. (c) 两侧的 initialMode 引用具有相同 shortName 的 ModeDeclaration;

  5. (d) 属性 ModeDeclarationGroup.modeUserErrorBehavior.errorReactionPolicy 两侧取相同值;

  6. (e) 属性 ModeDeclarationGroup.modeManagerErrorBehavior.errorReactionPolicy 两侧取相同值;

  7. (f) 属性 ModeDeclarationGroup.modeUserErrorBehavior.defaultMode 要么两侧都不存在,要么两侧都引用具有相同 shortName 的 ModeDeclaration;

  8. (g) 属性 ModeDeclarationGroup.modeManagerErrorBehavior.defaultMode 要么两侧都不存在,要么两侧都引用具有相同 shortName 的 ModeDeclaration;

  9. (h) 适用以下子条件之一:

  10. 属性 category 两侧取值 ALPHABETIC_ORDER;

  11. 属性 category 两侧取值 EXPLICIT_ORDER,且按 1(b) 匹配的 ModeDeclaration 具有相同的 ModeDeclaration.value 属性值,且 ModeDeclarationGroup.onTransitionValue 的值两侧匹配。

  12. 应用了标识相应 ModeDeclaration 的 ModeDeclarationMapping。

此外,应检查相应 ModeTransition 的兼容性,即适用 [constr_1194] 和 [constr_1245]。

ModeDeclarationGroup 兼容性对 ModeTransition 的考虑:

  • 要么模式提供方定义 ModeTransition,要么模式用户定义 ModeTransition;

  • 模式提供方上下文中定义的 ModeTransition 与模式用户上下文中定义的 ModeTransition 相同,或应用了 ModeDeclarationMapping 映射。

相同的 ModeTransition:

  1. 对模式提供方上下文中定义的每个 ModeTransition,模式用户上下文中定义了一个具有相同 shortName 的 ModeTransition;

  2. 两个 ModeDeclarationGroup 中由各自 shortName 标识的每对 ModeTransition,其引用 enteredMode 和 exitedMode 的目标(就被引用 ModeDeclaration 的 shortName 而言)相同。

6.8. 实参原型的兼容性

ArgumentDataPrototype 的兼容性:

  1. 它们由兼容的 AutosarDataType 定义类型,或存在一个 ClientServerOperationMapping.argumentMapping,在角色 firstDataPrototype 中引用一个 ArgumentDataPrototype、在角色 secondDataPrototype 中引用另一个;

  2. 它们的实参方向(in、out 或 inout)取相同值,即适用 [constr_1268]。

6.9. 应用错误的兼容性

ApplicationError 的兼容性:

  1. 以下所有子条件适用:

  2. (a) 它们具有相同的 shortName;

  3. (b) 它们具有相同的属性。特别是两个 ApplicationError 的 errorCode 应相同。

  4. 存在一个 ClientServerInterfaceMapping.errorMapping,在角色 firstApplicationError 中引用其中一个 ApplicationError、在角色 secondApplicationError 中引用另一个。

6.10. Client/Server 操作的兼容性

ClientServerOperation 的兼容性:

  1. 它们拥有相同数量的 ArgumentDataPrototype;

  2. 两个 ClientServerOperation 的第 n 个实参兼容。这蕴含 ArgumentDataPrototype 的有序性;

  3. 它们的属性 diagArgIntegrity 取相同值,或该属性两侧都不存在;

  4. 它们具有相同的 shortName(同样允许在 PortInterface 中映射);

  5. 所需 ClientServerOperation 为所提供 ClientServerOperation 可能引发的每个 ApplicationError 规定了一个兼容的 ApplicationError(也许更多)。因此,引用表示值 E_OK 的 possibleError 的 ClientServerOperation 与引用的 possibleError 中无一表示值 E_OK 的 ClientServerOperation 兼容。

6.11. Client/Server 接口的兼容性

请注意,该兼容性要求只满足静态正确性,这意味着不保证逻辑一致性(例如客户端应调用某个操作以使服务器正确工作)。

6.11.1. 通过 AssemblySwConnector 连接所需端口与提供端口

AssemblySwConnector 上下文中 ClientServerInterface 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需 PortPrototype 的 ClientServerInterface 上下文中定义的每个 ClientServerOperation,在所提供 PortPrototype 的 ClientServerInterface 中存在兼容的 ClientServerOperation。ClientServerOperation 的 shortName 用于标识该对。

  3. (b) 存在一个 ClientServerInterfaceMapping.operationMapping,对其适用以下条件:

  4. i. 它被相应的 SwConnector 引用;

  5. ii. 它在角色 firstOperation 中引用两个 ClientServerOperation 之一,在角色 secondOperation 中引用另一个。

  6. 对每个这样的对,其 isService 属性的值相同。

6.11.2. 通过 DelegationSwConnector 连接内部与外部端口

DelegationSwConnector 上下文中 ClientServerInterface 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需内部 PortPrototype 的 ClientServerInterface 上下文中定义的每个 ClientServerOperation,在所需外部 PortPrototype 的 ClientServerInterface 中存在兼容的 ClientServerOperation。ClientServerOperation 的 shortName 用于标识该对。

  3. (b) 存在一个 ClientServerInterfaceMapping.operationMapping,对其适用以下条件:

  4. i. 它被相应的 SwConnector 引用;

  5. ii. 它在角色 firstOperation 中引用两个 ClientServerOperation 之一,在角色 secondOperation 中引用另一个。

  6. 适用以下条件之一:

  7. (a) 对所提供内部 PortPrototype 的 ClientServerInterface 上下文中定义的至少一个 ClientServerOperation,在所提供外部 PortPrototype 的 ClientServerInterface 中存在兼容的 ClientServerOperation。ClientServerOperation 的 shortName 用于标识该对。

  8. (b) 存在一个 ClientServerInterfaceMapping.operationMapping,对其适用以下条件:

  9. i. 它被相应的 SwConnector 引用;

  10. ii. 它在角色 firstOperation 中引用两个 ClientServerOperation 之一,在角色 secondOperation 中引用另一个。

  11. 对每个这样的对,其 isService 属性的值相同。

6.11.3. 通过 PassThroughSwConnector 连接外部与外部端口

PassThroughSwConnector 上下文中 ClientServerInterface 的兼容性:

  1. 对所提供外部 PortPrototype 的 ClientServerInterface 上下文中定义的至少一个 ClientServerOperation,在所需外部 PortPrototype 的 ClientServerInterface 中存在兼容的 ClientServerOperation。

要么使用 ClientServerOperation 的 shortName 标识该对,要么存在一个映射相应 ClientServerOperation 的 ClientServerInterfaceMapping。

  1. 对每个这样的对,PortInterface.isService 属性的值相同。

6.12. 触发器接口的兼容性

请注意,该兼容性要求只满足静态正确性,这意味着不保证逻辑一致性(例如客户端应调用某个操作以使服务器正确工作)。

6.12.1. 通过 AssemblySwConnector 连接所需端口与提供端口

AssemblySwConnector 上下文中 TriggerInterface 的兼容性:

  1. 适用以下条件之一:

  2. (a) 对所需 PortPrototype 的 TriggerInterface 上下文中定义的每个 Trigger,在所提供 PortPrototype 的 TriggerInterface 中存在兼容的 Trigger。Trigger 的 shortName 用于标识该对。

  3. (b) 存在一个 TriggerInterfaceMapping.triggerMapping,对其适用以下条件:

  4. i. 它被相应的 SwConnector 引用;

  5. ii. 它在角色 firstTrigger 中引用两个 Trigger 之一,在角色 secondTrigger 中引用另一个。

  6. 对每个这样的对,其 isService 属性的值相同。

6.12.2. 通过 DelegationSwConnector 连接内部与外部端口

DelegationSwConnector 上下文中 TriggerInterface 的兼容性:

  1. 适用以下子条件之一:

  2. (a) 对所需内部 PortPrototype 的 TriggerInterface 上下文中定义的每个 Trigger,在所需外部 PortPrototype 的 TriggerInterface 中存在兼容的 Trigger。Trigger 的 shortName 用于标识该对;

  3. (b) 对所提供外部 PortPrototype 的 TriggerInterface 上下文中定义的至少一个 Trigger,在所提供内部 PortPrototype 的 TriggerInterface 中存在兼容的 Trigger。Trigger 的 shortName 用于标识该对;

  4. (c) 存在一个 TriggerInterfaceMapping.triggerMapping,对其适用以下所有条件:

  5. i. 它被相应的 SwConnector 引用;

  6. ii. 它在角色 firstTrigger 中引用两个 Trigger 之一,在角色 secondTrigger 中引用另一个。

  7. 对每个这样的对,其 isService 属性的值相同。

6.12.3. 通过 PassThroughSwConnector 连接外部与外部端口

PassThroughSwConnector 上下文中 TriggerInterface 的 PortPrototype 的兼容性:

  1. 对所需外部 PortPrototype 的 TriggerInterface 上下文中定义的至少一个 Trigger,在所提供外部 PortPrototype 的 TriggerInterface 中存在兼容的 Trigger。

要么使用 Trigger 的 shortName 标识该对,要么存在一个在角色 firstTrigger 中引用其中一个 Trigger、在角色 secondTrigger 中引用另一个的 TriggerInterfaceMapping。

  1. 对每个这样的对,PortInterface.isService 属性的值相同。

6.13. 触发器的兼容性

Trigger 的兼容性:

  • 它们具有相同的 shortName;

  • 存在一个 TriggerMapping,在角色 firstTrigger 中引用其中一个 Trigger、在角色 secondTrigger 中引用另一个。

6.14. 提供端口原型的完全委托

所提供外部 PortPrototype 的委托:

  1. 对所提供外部 PortPrototype 的 SenderReceiverInterface、NvDataInterface 或 ParameterInterface 中出现的每个 VariableDataPrototype 或 ParameterDataPrototype,存在至少一个经由 DelegationSwConnector 到所提供内部 PortPrototype 的连接、或经由 PassThroughSwConnector 到所需外部 PortPrototype 的连接,且在所提供内部 PortPrototype 或所需外部 PortPrototype 的 SenderReceiverInterface、NvDataInterface 或 ParameterInterface 中具有兼容的 VariableDataPrototype 或 ParameterDataPrototype。

要么使用 VariableDataPrototype 或 ParameterDataPrototype 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

  1. 对由 SenderReceiverInterface 或 NvDataInterface 定义类型、且被 DelegationSwConnector 在角色 outerPort 中引用的 PRPortPrototype 提供的每个 VariableDataPrototype,应由 PPortPrototype 或 PRPortPrototype 拥有的 innerPort 提供相应的 VariableDataPrototype。

要么使用 VariableDataPrototype 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

  1. 对所提供外部 PortPrototype 的 ModeSwitchInterface 中出现的 ModeDeclarationGroupPrototype,恰好存在一个经由 DelegationSwConnector 到所提供内部 PortPrototype 或经由 PassThroughSwConnector 到所需外部 PortPrototype 的连接,且在

所提供内部 PortPrototype 或所需外部 PortPrototype 的 ModeSwitchInterface 中具有兼容的 ModeDeclarationGroupPrototype。

要么使用 ModeDeclarationGroupPrototype 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

  1. 对所提供外部 PortPrototype 的 ClientServerInterface 中出现的每个 ClientServerOperation,恰好存在一个经由 DelegationSwConnector 到所提供内部 PortPrototype 或经由 PassThroughSwConnector 到所需外部 PortPrototype 的连接,且在所提供内部 PortPrototype 或所需外部 PortPrototype 的 ClientServerInterface 中具有兼容的 ClientServerOperation。

要么使用 ClientServerOperation 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

  1. 对所提供外部 PortPrototype 的 TriggerInterface 中出现的每个 Trigger,恰好存在一个经由 DelegationSwConnector 到所提供内部 PortPrototype 或经由 PassThroughSwConnector 到所需外部 PortPrototype 的连接,且在所提供内部 PortPrototype 或所需外部 PortPrototype 的 TriggerInterface 中具有兼容的 Trigger。

要么使用 Trigger 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

该约束关联两个可能的施加时间:

· 在 RTE 生成时 · 在 CompositionSwComponentType 创建完成时

约束 [constr_1071] 依据 PortInterface 的种类及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。

6.14.1. PortInterface 元素的拆分与合并

借助第 6.4、6.11、6.12 章中兼容性规则的定义,可以把由包含 PortInterface 元素超集的 PortInterface 定义类型的 PortPrototype 的元素,拆分并分配到由包含 PortInterface 元素子集的 PortInterface 类型定义类型的 PortPrototype。

解释拆分与合并用法的示例见第 B.5.2 节。

6.15. 扁平 ECU 提取情形下的兼容性

请注意,在软件组件的扁平 ECU 提取的情形下适用特定的兼容性规则。在某种程度上,这些规则与纯 VFB 方法(见第 6 章)的既有规则相矛盾。也就是说,如果在创建 DelegationSwConnector 时应用了拆分-合并模式,可能会违反第 6 章定义的兼容性规则。

不过,只要扁平 ECU 提取是从有效的 CompositionSwComponentType 创建的,扁平 ECU 提取在这种情况下并不会变为无效。换言之,该变换不会从有效模型制造无效模型。

然而,为支持这一陈述,必须定义恰当地覆盖这种情况、并允许对扁平 ECU 提取成功验证的附加兼容性规则。

对扁平 ECU 提取,在用 DelegationSwConnector 连接 PortPrototype 时考虑 SenderReceiverInterface、NvDataInterface 和 ParameterInterface 的兼容性。

扁平 ECU 提取情形下的兼容性:

PortInterface 元素的兼容性取决于 PortInterface 的种类及 PortInterface 元素的 swImplPolicy 属性。

要么使用 VariableDataPrototype 和 ParameterDataPrototype 的 shortName 标识该对,要么由 PortInterfaceMapping 规定 PortInterface 的哪些不同名元素相互关联。

为澄清起见,[constr_1071] 依据 PortInterface 的种类及 PortInterface 元素的 swImplPolicy 属性定义哪些 PortInterface 元素兼容。

请注意,在扁平 ECU 提取的情况下,可能出现连接到特定 RPortPrototype 的 AssemblySwConnector 也连接到不满足 6.4.1 中规定兼容性规则的 PPortPrototype 的情况。

特别是,dataElement 可能对应于不同 PPortPrototype 范围内定义的 dataElement。换言之,在扁平 ECU 提取中可以把来自不同提供方的 dataElement 合并。

7. 内部行为

7.1. 简介

SwcInternalBehavior:

本章聚焦于 SwcInternalBehavior 元类及其聚合的各种元类的描述。该元类的概览勾勒于图 7.2。注意,SwcInternalBehavior 继承自 InternalBehavior。

SwcInternalBehavior 在 AUTOSAR 软件组件上下文中的角色描绘于图 7.1。如第 3.2 节所述,把 SwcInternalBehavior 到 AtomicSwComponentType 的聚合设为 <atpSplitable> 的原因,是允许在后续流程步骤中(例如在 VFB 视图完成之后)开发 SwcInternalBehavior。

表7.1:InternalBehavior(InternalBehavior)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | Common base class (abstract) for the internal behavior of both software components and basic software modules/clusters. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable Referrable | | 子类 | BswInternalBehavior, SwcInternalBehavior | | 聚合于 | AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
Class InternalBehavior (abstract)
constant Memory ParameterData Prototype * aggr Describes a read only memory object containing characteristic value(s) implemented by this Internal Behavior. The shortName of ParameterDataPrototype has to be equal to the 'C' identifier of the described constant. The characteristic value(s) might be shared between Sw ComponentPrototypes of the same SwComponentType. The aggregation of constantMemory is subject to variability with the purpose to support variability in the software component or module implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=constantMemory.shortName, constant Memory.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
constantValue Mapping ConstantSpecification MappingSet * ref Reference to the ConstantSpecificationMapping to be applied for the particular InternalBehavior Stereotypes: atpSplitable Tags: atp.Splitkey=constantValueMapping
dataType Mapping DataTypeMappingSet * ref Reference to the DataTypeMapping to be applied for the particular InternalBehavior Stereotypes: atpSplitable Tags: atp.Splitkey=dataTypeMapping
exclusiveArea ExclusiveArea * aggr This specifies an ExclusiveArea for this InternalBehavior. The exclusiveArea is local to the component resp. module. The aggregation of ExclusiveAreas is subject to variability. Note: the number of ExclusiveAreas might vary due to the conditional existence of RunnableEntities or BswModuleEntities. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=exclusiveArea.shortName, exclusive Area.variationPoint.shortLabel
exclusiveArea NestingOrder ExclusiveAreaNesting Order * aggr This represents the set of ExclusiveAreaNestingOrder owned by the InternalBehavior. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=exclusiveAreaNestingOrder.shortName, exclusiveAreaNestingOrder.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class InternalBehavior (abstract)
staticMemory VariableDataPrototype * aggr Describes a read and writeable static memory object representing measurerment variables implemented by this software component. The term "static" is used in the meaning of "non-temporary" and does not necessarily specify a linker encapsulation. This kind of memory is only supported if supportsMultipleInstantiation is FALSE. The shortName of the VariableDataPrototype has to be equal with the 'C' identifier of the described variable. The aggregation of staticMemory is subject to variability with the purpose to support variability in the software component's implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=staticMemory.shortName, static Memory.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表7.2:SwcInternalBehavior(SwcInternalBehavior)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior | | 说明 | The SwcInternalBehavior of an AtomicSwComponentType describes the relevant aspects of the software-component with respect to the RTE, i.e. the RunnableEntities and the RTEEvents they respond to. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , InternalBehavior , Multilanguage Referrable , Referrable | | 聚合于 | AtomicSwComponentType .internalBehavior, AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
arTypedPer Instance Memory VariableDataPrototype * aggr Defines an AUTOSAR typed memory-block that needs to be available for each instance of the SW-component. This is typically only useful if supportsMultipleInstantiation is set to "true" or if the component defines NVRAM access via permanent blocks. The aggregation of arTypedPerInstanceMemory is subject to variability with the purpose to support variability in the software component's implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=arTypedPerInstanceMemory.shortName, ar TypedPerInstanceMemory.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class SwcInternalBehavior
event RTEEvent * aggr This is a RTEEvent specified for the particular Swc InternalBehavior. The aggregation of RTEEvent is subject to variability with the purpose to support the conditional existence of RTE events. Note: the number of RTE events might vary due to the conditional existence of PortPrototypes using Data ReceivedEvents or due to different scheduling needs of algorithms. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=event.shortName, event.variationPoint.short Label vh.latestBindingTime=preCompileTime
exclusiveArea Policy SwcExclusiveArea Policy * aggr Options how to generate the ExclusiveArea related APIs. When no SwcExclusiveAreaPolicy is specified for an ExclusiveArea the default values apply. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=exclusiveAreaPolicy, exclusiveArea Policy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
explicitInter Runnable Variable VariableDataPrototype * aggr Implement state message semantics for establishing communication among runnables of the same component. The aggregation of explicitInterRunnable Variable is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=explicitInterRunnableVariable.shortName, explicitInterRunnableVariable.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
implicitInter Runnable Variable VariableDataPrototype * aggr Implement state message semantics for establishing communication among runnables of the same component. The aggregation of implicitInterRunnable Variable is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=implicitInterRunnableVariable.shortName, implicitInterRunnableVariable.variationPoint.shortLabel
includedData TypeSet IncludedDataTypeSet * aggr The includedDataTypeSet is used by a software component for its implementation. Stereotypes: atpSplitable Tags: atp.Splitkey=includedDataTypeSet
includedMode Declaration GroupSet IncludedMode DeclarationGroupSet * aggr This aggregation represents the included Mode DeclarationGroups Stereotypes: atpSplitable Tags: atp.Splitkey=includedModeDeclarationGroupSet
Class SwcInternalBehavior
instantiation DataDefProps InstantiationDataDef Props * aggr The purpose of this is that within the context of a given 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 Port Prototypes and component local memories like "per InstanceParameter" or "arTypedPerInstanceMemory". Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=instantiationDataDefProps, instantiationData DefProps.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
perInstance Memory PerInstanceMemory * aggr Defines a per-instance memory object needed by this software component. The aggregation of PerInstance Memory is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=perInstanceMemory.shortName, perInstance Memory.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
perInstance Parameter ParameterData Prototype * aggr Defines parameter(s) or characteristic value(s) that needs to be available for each instance of the software-component. This is typically only useful if supportsMultipleInstantiation is set to "true". The aggregation of perInstanceParameter is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=perInstanceParameter.shortName, per InstanceParameter.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
portAPIOption PortAPIOption * aggr Options for generating the signature of port-related calls from a runnable to the RTE and vice versa. The aggregation of PortPrototypes is subject to variability with the purpose to support the conditional existence of ports. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=portAPIOption, portAPIOption.variation Point.shortLabel vh.latestBindingTime=preCompileTime

表7.3:SwcInternalBehavior(SwcInternalBehavior)

属性 类型 多重性 种类 备注
runnable RunnableEntity * aggr This is a RunnableEntity specified for the particular Swc InternalBehavior. The aggregation of RunnableEntity is subject to variability with the purpose to support the conditional existence of RunnableEntities. Note: the number of RunnableEntities might vary due to the conditional existence of Port Prototypes using DataReceivedEvents or due to different scheduling needs of algorithms. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=runnable.shortName, runnable.variation Point.shortLabel vh.latestBindingTime=preCompileTime
service Dependency SwcService Dependency * aggr Defines the requirements on AUTOSAR Services for a particular item. The aggregation of SwcServiceDependency is subject to variability with the purpose to support the conditional existence of ports as well as the conditional existence of ServiceNeeds. The SwcServiceDependency owned by an SwcInternal Behavior can be located in a different physical file in order to support that SwcServiceDependency might be provided in later development steps or even by different expert domain (e.g OBD expert for Obd related Service Needs) tools. Therefore the aggregation is <>. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=serviceDependency.shortName, service Dependency.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
shared Parameter ParameterData Prototype * aggr Defines parameter(s) or characteristic value(s) shared between SwComponentPrototypes of the same Sw ComponentType The aggregation of sharedParameter is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=sharedParameter.shortName, shared Parameter.variationPoint.shortLabel
supports Multiple Instantiation Boolean 0..1 attr Indicate whether the corresponding software-component can be multiply instantiated on one ECU. In this case the attribute will result in an appropriate component API on programming language level (with or without instance handle).
variationPoint Proxy VariationPointProxy * aggr Proxy of a variation points in the C/C++ implementation. Stereotypes: atpSplitable Tags: atp.Splitkey=variationPointProxy.shortName

SwcInternalBehavior . supportsMultipleInstantiation 属性的存在性:

7.2. 可运行实体

RunnableEntity 的概念(更多细节见图 7.3)在《虚拟功能总线》规范 [3] 中定义。

RunnableEntity:

CompositionSwComponentType 不能拥有 RunnableEntity:

只有 AtomicSwComponentType 能拥有 RunnableEntity:

这一关联描绘于图 7.4。

请注意,RunnableEntity 存在于若干具有不同属性的类别中。关于 RunnableEntity 类别的更多解释见第 7.2.4.4 节。

minimumStartInterval 的语义:

RunnableEntity . symbol 属性的存在性:

symbol 属性描述 RunnableEntity 的入口点:

RunnableEntity.symbol 对一个 EcuInstance 范围内符号唯一性的含义在 [constr_2025] [10] 中描述。

RunnableEntity 从其基类 ExecutableEntity 继承若干属性,因为这些属性也用于《基础软件模块描述模板》[6]。这里适用以下约束:

不应设置 RunnableEntity.reentrancyLevel。:

该规则应在合同阶段生成执行时施加。

表7.4:RunnableEntity(RunnableEntity)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior | | 说明 | A RunnableEntity represents the smallest code-fragment that is provided by an AtomicSwComponent Type and are executed under control of the RTE. RunnableEntities are for instance set up to respond to data reception or operation invocation on a server. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , ExecutableEntity , Identifiable , Multilanguage Referrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.runnable |

属性 类型 多重性 种类 备注
Class RunnableEntity
argument (ordered) RunnableEntity Argument * aggr This represents the formal definition of a an argument to a RunnableEntity.
asynchronous ServerCall ResultPoint AsynchronousServer CallResultPoint * aggr The server call result point admits a runnable to fetch the result of an asynchronous server call. The aggregation of AsynchronousServerCallResultPoint is subject to variability with the purpose to support the conditional existence of client server PortPrototypes and the variant existence of server call result points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=asynchronousServerCallResultPoint.short Name, asynchronousServerCallResultPoint.variation Point.shortLabel vh.latestBindingTime=preCompileTime
canBeInvoked Concurrently Boolean 0..1 attr If the value of this attribute is set to "true" the enclosing RunnableEntity can be invoked concurrently (even for one instance of the corresponding AtomicSwComponent Type). This implies that it is the responsibility of the implementation of the RunnableEntity to take care of this form of concurrency.
dataRead Access VariableAccess * aggr RunnableEntity has implicit read access to dataElement of a sender-receiver PortPrototype or nv data of a nv data PortPrototype. The aggregation of dataReadAccess is subject to variability with the purpose to support the conditional existence of sender receiver ports or the variant existence of dataReadAccess in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataReadAccess.shortName, dataRead Access.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
dataReceive PointBy Argument VariableAccess * aggr RunnableEntity has explicit read access to dataElement of a sender-receiver PortPrototype or nv data of a nv data PortPrototype. The result is passed back to the application by means of an argument in the function signature. The aggregation of dataReceivePointByArgument is subject to variability with the purpose to support the conditional existence of sender receiver PortPrototype or the variant existence of data receive points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataReceivePointByArgument.shortName, dataReceivePointByArgument.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class RunnableEntity
dataReceive PointByValue VariableAccess * aggr RunnableEntity has explicit read access to dataElement of a sender-receiver PortPrototype or nv data of a nv data PortPrototype. The result is passed back to the application by means of the return value. The aggregation of dataReceivePointBy Value is subject to variability with the purpose to support the conditional existence of sender receiver ports or the variant existence of data receive points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataReceivePointByValue.shortName, data ReceivePointByValue.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
dataSendPoint VariableAccess * aggr RunnableEntity has explicit write access to dataElement of a sender-receiver PortPrototype or nv data of a nv data PortPrototype. The aggregation of dataSendPoint is subject to variability with the purpose to support the conditional existence of sender receiver PortPrototype or the variant existence of data send points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataSendPoint.shortName, dataSend Point.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
dataWrite Access VariableAccess * aggr RunnableEntity has implicit write access to dataElement of a sender-receiver PortPrototype or nv data of a nv data PortPrototype. The aggregation of dataWriteAccess is subject to variability with the purpose to support the conditional existence of sender receiver ports or the variant existence of dataWriteAccess in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataWriteAccess.shortName, dataWrite Access.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
external TriggeringPoint ExternalTriggeringPoint * aggr The aggregation of ExternalTriggeringPoint is subject to variability with the purpose to support the conditional existence of trigger ports or the variant existence of external triggering points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=externalTriggeringPoint.ident.shortName, externalTriggeringPoint.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
internal TriggeringPoint InternalTriggeringPoint * aggr The aggregation of InternalTriggeringPoint is subject to variability with the purpose to support the variant existence of internal triggering points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=internalTriggeringPoint.shortName, internal TriggeringPoint.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class RunnableEntity
modeAccess Point ModeAccessPoint * aggr The runnable has a mode access point. The aggregation of ModeAccessPoint is subject to variability with the purpose to support the conditional existence of mode ports or the variant existence of mode access points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeAccessPoint.ident.shortName, mode AccessPoint.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
modeSwitch Point ModeSwitchPoint * aggr The runnable has a mode switch point. The aggregation of ModeSwitchPoint is subject to variability with the purpose to support the conditional existence of mode ports or the variant existence of mode switch points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeSwitchPoint.shortName, modeSwitch Point.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
parameter Access ParameterAccess * aggr The presence of a ParameterAccess implies that a RunnableEntity needs read only access to a Parameter DataPrototype which may either be local or within a Port Prototype. The aggregation of ParameterAccess is subject to variability with the purpose to support the conditional existence of parameter ports and component local parameters as well as the variant existence of Parameter Access (points) in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=parameterAccess.shortName, parameter Access.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
readLocal Variable VariableAccess * aggr The presence of a readLocalVariable implies that a RunnableEntity needs read access to a VariableData Prototype in the role of implicitInterRunnableVariable or explicitInterRunnableVariable. The aggregation of readLocalVariable is subject to variability with the purpose to support the conditional existence of implicitInterRunnableVariable and explicit InterRunnableVariable or the variant existence of read LocalVariable (points) in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=readLocalVariable.shortName, readLocal Variable.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
serverCallPoint ServerCallPoint * aggr The RunnableEntity has a ServerCallPoint. The aggregation of ServerCallPoint is subject to variability with the purpose to support the conditional existence of client server PortPrototypes or the variant existence of server call points in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=serverCallPoint.shortName, serverCall Point.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表7.5:RunnableEntity(RunnableEntity)

属性 类型 多重性 种类 备注
symbol CIdentifier 0..1 attr The symbol describing this RunnableEntity's entry point. This is considered the API of the RunnableEntity and is required during the RTE contract phase.
waitPoint WaitPoint * aggr The WaitPoint associated with the RunnableEntity.
writtenLocal Variable VariableAccess * aggr The presence of a writtenLocalVariable implies that a RunnableEntity needs write access to a VariableData Prototype in the role of implicitInterRunnableVariable or explicitInterRunnableVariable. The aggregation of writtenLocalVariable is subject to variability with the purpose to support the conditional existence of implicitInterRunnableVariable and explicit InterRunnableVariable or the variant existence of written LocalVariable (points) in the implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=writtenLocalVariable.shortName, written LocalVariable.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

请注意,RunnableEntity 语义的形式化定义与 AUTOSAR RTE 规范 [2] 有紧密关系。不过,RTE 语义的定义不在本文档的范围内。

不过,该形式化定义需要一些无法完全从本文档中省略的背景讨论。否则,特定模型元素的含义无法被正确理解。

另请注意,存在没有任何 RunnableEntity 的软件组件的正当用例,例如在以下情况中:

  • 如果不需要代理任何由 NvMService 或 NvMAdmin 这两个 ClientServerInterface 之一定义类型的 PortPrototype,NvBlockSwComponentType 不需要任何 RunnableEntity;

  • ServiceSwComponentType 以精简配置运行,不必向任何使用服务的应用软件组件提供任何 PortPrototype;

  • 软件组件以未选择任何功能的精简配置配置。在这种情况下,保留空软件组件比在许多其他元素(例如 SwComponentPrototype)上添加更多 VariationPoint 更简单。

除此之外,基于变体的方法将要求尚不受支持的其他 ARElement 的条件性存在,例如引用该 AtomicSwComponentType 的 SwcImplementation。

7.2.1. 不可并发调用的 RunnableEntity 的并发性与重入性

本节适用于属性 canBeInvokedConcurrently 取值 false 的情况。在运行期间,AtomicSwComponentType 每个实例的每个 RunnableEntity 处于特定的运行时状态。

运行时状态的定义与语义的细节见 [2]。不过,本章包含基本概念的简要描述,以便能够恰当地讨论 RunnableEntity 的形式化建模。

从挂起(suspended)到待启动(to be started)的迁移条件:

当 RunnableEntity 处于待启动状态时,RTE 可以决定开始运行该 RunnableEntity。进入待启动状态(例如收到一条消息、RunnableEntity 应为此运行)与转入运行中状态(RunnableEntity 的第一条指令已执行)之间的延迟取决于 RTE 的调度策略,即 RunnableEntity 到 AUTOSAR OS 任务的映射。

从运行中状态到挂起状态的迁移由 RunnableEntity 掌控:该迁移在 RunnableEntity 返回时发生(从而把控制权交给 AUTOSAR OS [32])。某些 RunnableEntity(例如 cat. 2 的)一旦进入运行中状态可能永不返回挂起状态。

它们在被抢占时可能进入被抢占状态。当 RunnableEntity 需要等待某个 WaitPoint 解除阻塞时同样如此。

Cat. 1A 和 1B 的 RunnableEntity 最终会终止:

作为不可并发调用的 RunnableEntity:

例如:AtomicSwComponentType MyComponentType 的内部行为描述了 RunnableEntity R1,当该 AtomicSwComponentType 的 client-server PPortPrototype 上的某个操作被调用时应启用它。该 AtomicSwComponentType 规定 RunnableEntity R1 不可并发调用。

AtomicSwComponentType MyComponentType 实例化于一个 ECU。当收到该操作的调用时,RunnableEntity R1 的相应实例被启用,RTE 将在一个最终由 AUTOSAR OS 管理的任务中开始执行该 RunnableEntity(该 RunnableEntity 处于运行中状态)。

如果在该 RunnableEntity 处于运行中状态时收到该操作的另一次调用,则不允许 RTE 在第二个任务中再次运行该 RunnableEntity。相反,RTE 必须等待(也许把第二个进入的请求排队),直到该 RunnableEntity 已返回并转入挂起状态。

7.2.2. 可并发调用的 RunnableEntity 的并发性与重入性

本节适用于属性 canBeInvokedConcurrently 设置为 true 的情况。

在这种情况下,允许同一 RunnableEntity 在不同 AUTOSAR OS 任务中并发运行多次。这意味着 [2] 中定义的状态机不再是该 RunnableEntity 的状态,而是可以被克隆任意多次。

软件组件描述本身不对 RunnableEntity 的并发调用次数施加任何界限:

软件组件描述只规定该 RunnableEntity 能否并发调用。

允许 RunnableEntity 并发调用意味着 AtomicSwComponentType 的实现需要处理这种附加形式的并发。

例 7.1

组件类型 MyComponentType 的 SwcInternalBehavior 描述了 RunnableEntity R1,当该 AtomicSwComponentType 的由 ClientServerInterface 定义类型的 PPortPrototype 上的某个 ClientServerOperation 被调用时应启用它。

该 AtomicSwComponentType 规定 RunnableEntity R1 可以并发调用。AtomicSwComponentType MyComponentType 实例化于一个 ECU。

当收到该 ClientServerOperation 的调用时,RunnableEntity R1 的相应实例被启用,RTE 将在一个最终由 AUTOSAR OS 管理的任务中开始执行该 RunnableEntity(该 RunnableEntity 处于运行中状态)。

如果收到该 ClientServerOperation 的另一次调用,则允许在同一 RunnableEntity 于另一个任务中再次启动。

并发 RunnableEntity 的一个典型用例是 AUTOSAR 服务的实现。AUTOSAR 服务通常会在内部处理并发:多个软件组件可以直接并行使用这些服务。

ECU 集成者随后可以决定:实现该 AUTOSAR 服务的 RunnableEntity 直接在调用该服务的 AtomicSwComponentType 的上下文(任务)中运行。

这是客户端与服务器之间非常高效且直接的耦合:客户端与服务器之间的连接器简化为本地函数调用。

7.2.3. 可运行实体的定时激活

在许多情况下,RunnableEntity 需要响应时序事件而激活,而不是与通信相关(例如收到异步操作调用的响应)。许多 RunnableEntity 需要以固定速率周期性地运行。

软件组件描述采取的方法是把所谓 TimingEvent(更多细节见图 7.5)定义为 RTEEvent 的特殊种类。到目前为止,只定义了一种与时序相关的 RTEEvent:简单周期性的

TimingEvent

RTE 周期性地执行某些 RunnableEntity:

该 TimingEvent 然后包含对需要以此周期执行的 RunnableEntity 的引用。

TimingEvent.period 的值应大于 0:

注意,可以在实例化层级覆盖属性 period。更多细节见 [TPS_SWCT_02507]。

表7.6:TimingEvent(TimingEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is used to start RunnableEntities that shall be executed periodically. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
offset TimeValue 0..1 attr The value makes an assumption about the time offset of the first activation of the RunnableEntity triggered by the mapped TimingEvent relative to the periodic activation of the time base of this TimingEvent. Unit: second.
period TimeValue 0..1 attr Period of timing event in seconds. The value of this attribute shall be greater than zero.

TimingEvent.offset 与 TimingEvent.period 的值对照:

[constr_1622] 存在的动机是:如果激活偏移大于 TimingEvent 的周期,被映射的 TimingEvent 就无法以给定的周期实现。

7.2.4. 补充说明与澄清

7.2.4.1. 重入性与多次实例化

本章强调属性 SwcInternalBehavior.supportsMultipleInstantiation 与 RunnableEntity.canBeInvokedConcurrently 组合的特定含义。

组合 supportsMultipleInstantiation 与 canBeInvokedConcurrently 的语义:

| supportsMultipleIn- stantiation | canBeInvokedCon- currently |

| false | This implies that the implementation of the RunnableEntity will never be invoked concurrently from several tasks. The implementation does not need to care about reentrancy issues and can typically use static variables to store state. | | true | false | | true | In this case the RunnableEntity can be invoked concurrently from several tasks, even with the same instance handle. |

如果 AtomicSwComponentType 的实现决定把若干 RunnableEntity 映射到同一符号,则需要解决重入问题。不过,RTE [2] 反正不支持这种场景,因此应避免。

7.2.4.2. 重入性与“库函数”

注意,被不同 RunnableEntity 调用的所有代码(例如库例程等)显然应是可重入的。例如,用 C 实现的滤波算法不允许用静态变量或具有外部绑定的变量保存前次运行的值。

7.2.4.3. 触发同一 RunnableEntity 的 ClientServerOperation 的兼容性

RunnableEntity 的签名取决于所连接的 RTEEvent:

触发同一 RunnableEntity 的多个 OperationInvokedEvent 只有在所有被引用的 ClientServerOperation 都会为该服务器 RunnableEntity 产生相同签名时才受支持。

触发同一 RunnableEntity 的 ClientServerOperation 的兼容性:

  • 实参的数量(可以是 ArgumentDataPrototype 或相关 PortDefinedArgumentValue)相等,且

  • 相应的实参(即两侧的第一个实参、两侧的第二个实参等)兼容,或两者都由 “新式” 可变大小数组数据类型定义类型,且数组元素的数据类型兼容(但数组大小可以不同)。

  • 且 PortAPIOption.errorHandling 的相应值相同。

特别是,这意味着:

  • 对 serverArgumentImplPolicy 设置为 useArgumentType 的 ArgumentDataPrototype 与 ArgumentDataPrototype 的组合,被引用的 ImplementationDataType 应兼容。

对 category 为 STRUCTURE 的数据类型,所有按序匹配的 ImplementationDataTypeElement 应同名。

  • 对 serverArgumentImplPolicy 设置为 useArgumentType 的 PortDefinedArgumentValue 与 ArgumentDataPrototype 的组合,被引用的 ImplementationDataType 应兼容。

对 category 为 STRUCTURE 的 ImplementationDataTypeElement,结构中所有按序匹配的 ImplementationDataTypeElement 应同名。

  • 对 serverArgumentImplPolicy 设置为 useVoid 的 ArgumentDataPrototype,引用任意 ImplementationDataType。

此外,要求两侧定义的返回值应匹配(就 Std_ReturnType 与 void 而言),且 possibleError 也兼容。

possibleError 的存在对 ClientServerOperation 兼容性的影响:

7.2.4.4. 可运行实体的类别

RunnableEntity 的类别:

  • 类别 1:类别 1 的 RunnableEntity 没有 WaitPoint,且要求在有限时间内终止。类别 1 分为两个子类:类别 1A 和类别 1B。

类别 1A 的 RunnableEntity 只允许使用隐式 API。

  • 类别 1B 的 RunnableEntity 还允许调用服务器、使用显式 API、发出触发、切换模式和使用 ExclusiveArea。

  • 类别 2:与类别 1 的 RunnableEntity 相反,类别 2 的 RunnableEntity 总是聚合至少一个 WaitPoint。通常这样的 RunnableEntity 实现一个内部循环,每当某个 WaitPoint 解除时就触发循环的一次迭代。

关于元类 RunnableEntity 建模细节的更多信息,请参见图 7.3。

1 类别 2 的 RunnableEntity 通常必须映射到扩展任务(Extended Tasks),因为只有扩展任务提供任务状态 WAITING。

RunnableEntity 在后续集成中的资源需求通常取决于运行时环境所使用的特性。

在 AUTOSAR 方法论中,要求 ECU 集成者按特定顺序把各种 RunnableEntity 映射到数量有限的 OS 任务。

RunnableEntity 的类别有助于基于 RunnableEntity 的设计指示后续的集成工作量和资源需求。

其中类别 1A 的 RunnableEntity 不使用阻塞或延迟 RunnableEntity 执行的 RTE 特性。只要 RunnableEntity 的实现保证稳定的执行时间,把它们集成到计算链中就相当简单可靠。

与类别 1A 相反,类别 2 的 RunnableEntity 在运行时的调度行为取决于与外围软件组件接口的交互。

例如,RunnableEntity 所映射到的 OS 任务的挂起时间可能取决于实际的数据接收和/或超时的发生。

此外,当 RunnableEntity 实现无限内部循环(每当某个 WaitPoint 解除就触发)时,通常不可能把多于一个 RunnableEntity 映射到一个 OS 任务。

对类别 1B 而言,附加的附带条件影响调度行为和所需的 OS 特性。例如,服务器调用在分区内通信的情况下可以简单地实现为直接函数调用,而在跨 ECU 通信的情况下可能需要更复杂的实现。

7.2.4.5. 可运行实体的实参

在许多情况下,RTE 生成器不仅能够推断出 RunnableEntity 实参的数量和数据类型,还能推断出实参的名称。但在某些情况下,需要上游模板的形式化支持来便利这一任务。

操作实参的名称:

由于 RunnableEntity 可能需要定义许多实参,RunnableEntity 在角色 argument 中对 RunnableEntityArgument 的聚合具有多重性 0..*;且由于这些实参的顺序很重要,元模型把该聚合定义为有序的。

2 由于实参是有序的,它们不需要是 Referrable 即可标识单个实参。

RunnableEntity 拥有的实参数量:

RunnableEntityArgument 的适用性:

该规则应在合同阶段生成执行时施加。

RunnableEntity 有到 BswModuleEntry 的映射:

在这种情况下,RunnableEntity 实参的名称应从被映射 BswModuleEntry 拥有的适用 SwServiceArg 派生。

表7.7:RunnableEntityArgument(RunnableEntityArgument)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RunnableEntity | | 说明 | This meta-class represents the ability to provide specific information regarding the arguments to a RunnableEntity. | | 基类 | ARObject | | 聚合于 | RunnableEntity.argument |

属性 类型 多重性 种类 备注
symbol CIdentifier 0..1 attr This represents the symbol to be generated into the actual signature on the level of the C programming language.

RunnableEntityArgument . symbol 属性的存在性:

7.2.5. 可运行实体的激活原因

用若干 RTEEvent 激活给定的 RunnableEntity 是可行的。因此在许多情况下,需要从 RunnableEntity 的实现内部获取关于激活它的 RTEEvent 的信息。

作为一个典型用例,考虑一个被周期性激活(借助 TimingEvent)、此外还应偶尔执行的 RunnableEntity,例如响应某个 dataElement 的接收(DataReceivedEvent)。

获取当前激活原因的 RTE API:

关于该特性实现的细节,请参见 RTE 规范 [2]。

ExecutableEntityActivationReason.bitPosition 的适用范围:

属性 ExecutableEntityActivationReason.bitPosition 的值应唯一:

被 WaitPoint 在角色 trigger 中引用的 RTEEvent 不应引用 ExecutableEntityActivationReason:

[constr_1228] 存在的依据显然是:在所述情形中 RunnableEntity 已被激活,因此提到的 RTEEvent 不提供与所述 RunnableEntity 激活原因相关的任何信息。

表7.8:ExecutableEntity(ExecutableEntity)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | Abstraction of executable code. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 子类 | BswModuleEntity , RunnableEntity |

属性 类型 多重性 种类 备注
activation Reason ExecutableEntity ActivationReason * aggr If the ExecutableEntity provides at least one activation Reason element the RTE resp. BSW Scheduler shall provide means to read the activation vector of this executable entity execution. If no activationReason element is provided the feature of being able to determine the activating RTEEvent is disabled for this ExecutableEntity.
canEnter ExclusiveArea * ref This means that the executable entity can enter/leave the referenced exclusive area through explicit API calls. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=canEnter.exclusiveArea, canEnter.variation Point.shortLabel vh.latestBindingTime=preCompileTime
exclusiveArea NestingOrder ExclusiveAreaNesting Order * ref This represents the set of ExclusiveAreaNestingOrders recognized by this ExecutableEntity.
minimumStart Interval TimeValue 0..1 attr Specifies the time in seconds by which two consecutive starts of an ExecutableEntity are guaranteed to be separated.
reentrancyLevel ReentrancyLevelEnum 0..1 attr The reentrancy level of this ExecutableEntity. See the documentation of the enumeration type ReentrancyLevel Enum for details. Please note that nonReentrant interfaces can have also reentrant or multicoreReentrant implementations, and reentrant interfaces can also have multicoreReentrant implementations.
runsInside ExclusiveArea * ref The executable entity runs completely inside the referenced exclusive area. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=runsInside.exclusiveArea, runs Inside.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
swAddrMethod SwAddrMethod 0..1 ref Addressing method related to this code entity. Via an association to the same SwAddrMethod, it can be specified that several code entities (even of different modules or components) shall be located in the same memory without already specifying the memory section itself.

表7.9:ExecutableEntityActivationReason(ExecutableEntityActivationReason)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | This meta-class represents the ability to define the reason for the activation of the enclosing Executable Entity. | | 基类 | ARObject , ImplementationProps , Referrable | | 聚合于 | ExecutableEntity .activationReason |

表7.10:ExecutableEntityActivationReason(ExecutableEntityActivationReason)

属性 类型 多重性 种类 备注
bitPosition PositiveInteger 0..1 attr This attribute allows for defining the position of the enclosing ExecutableEntityActivationReason in the activation vector.

ExecutableEntityActivationReason . bitPosition 属性的存在性:

请注意,属性 ExecutableEntityActivationReason.symbol 是生成在 RTE 代码中表示特定激活原因的唯一标识符所必需的。

7.2.6. 用于初始化目的的可运行实体

确保某些初始化在软件组件进入正常运作状态之前得到应用的一种方式,是使用 AUTOSAR 模式管理,特别是定义一个 ModeDeclarationGroup,它包含一个特定的 ModeDeclaration,其语义表示专门用于建立和初始化软件组件的模式。

不过,这种方法带有一定的资源占用,在某些情况下可以接受,但也可能存在更简单方法更适用的情况。简单的初始化方法由一个由特殊 RTEEvent(即所谓 InitEvent)触发的 RunnableEntity 组成。

InitEvent 在角色 startOnEvent 中引用一个 RunnableEntity:

这种软件组件初始化方法与基于模式的方法正交。特别是,由 InitEvent 触发的 RunnableEntity 预期在 RTE 完全初始化之后执行。这意味着 ECU 初始化期间关于 RTE API 可用性的限制与由 InitEvent 触发的 RunnableEntity 无关。

不允许 WaitPoint:

依据:WaitPoint 可能无限期推迟由 InitEvent 触发的 RunnableEntity 的完成,因此与该 RunnableEntity 的语义矛盾。

由 InitEvent 触发的 RunnableEntity 的 minimumStartInterval 值:

依据:谈论由 InitEvent 触发的 RunnableEntity 的激活区间没有意义,因为它们不应被重复执行。

AsynchronousServerCallPoint 与 AsynchronousServerCallResultPoint 的聚合:

依据:如前所述,由 InitEvent 在角色 startOnEvent 中触发的 RunnableEntity 不应聚合 WaitPoint。允许(虽然被认为不太可能发生)拥有 AsynchronousServerCallPoint,但不允许在同一 RunnableEntity 内取回调用的结果。

由 InitEvent 在角色 startOnEvent 中触发的 RunnableEntity 可以聚合 SynchronousServerCallPoint,但不鼓励使用这种配置。

InitEvent 不做模式禁用:

依据:由 InitEvent 触发的 RunnableEntity 的概念(如前所述)与模式概念正交,因此应独立于模式实现。

7.3. RTEEvent

在执行期间会发生若干 RTEEvent,例如 PPortPrototype 上 ClientServerOperation 远程调用的接收,或未收到预期 VariableDataPrototype 的 RPortPrototype 上的超时。

RTEEvent:

  • 该 RTEEvent 发生的触发是什么;

  • 特定的 ModeDeclaration 是否禁用该 RTEEvent 的处理;

  • 该 RTEEvent 发生时应启动哪个 RunnableEntity。

表7.11:AbstractEvent(AbstractEvent)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | This meta-class represents the abstract ability to model an event that can be taken to implement application software or basic software in AUTOSAR. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 子类 | BswEvent , RTEEvent |

属性 类型 多重性 种类 备注
activation Reason Representation ExecutableEntity ActivationReason 0..1 ref If the activationReasonRepresentation is referenced from the enclosing AbstractEvent this shall be taken as an indication that the latter contributes to the activating vector of this ExecutableEntity that owns the referenced ExecutableEntityActivationReason.

表7.12:RTEEvent(RTEEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | Abstract base class for all RTE-related events | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , Referrable | | 子类 | AsynchronousServerCallReturnsEvent, BackgroundEvent, DataReceiveErrorEvent, DataReceivedEvent, DataSendCompletedEvent, DataWriteCompletedEvent, ExternalTriggerOccurredEvent, InitEvent, InternalTriggerOccurredEvent, ModeSwitchedAckEvent, OperationInvokedEvent, OsTaskExecutionEvent, SwcModeManagerErrorEvent, SwcModeSwitchEvent, TimingEvent, TransformerHardErrorEvent | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
disabledMode ModeDeclaration * iref Reference to the Modes that disable the Event. Stereotypes: atpSplitable Tags: atp.Splitkey=disabledMode.contextPort, disabled Mode.contextModeDeclarationGroupPrototype, disabled Mode.targetModeDeclaration InstanceRef implemented by: RModeInAtomicSwc InstanceRef
startOnEvent RunnableEntity 0..1 ref The referenced RunnableEntity starts when the corresponding RTEEvent is raised.

表7.13:AsynchronousServerCallReturnsEvent(AsynchronousServerCallReturnsEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when an asynchronous server call is finished. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
eventSource AsynchronousServer CallResultPoint 0..1 ref The referenced AsynchronousServerCallResultPoint raises this AsynchronousServerCallReturnsEvent when the asynchronous server call returns.

AsynchronousServerCallReturnsEvent . eventSource 属性的存在性:

eventSource 应在合同阶段生成执行时存在。

表7.14:DataSendCompletedEvent(DataSendCompletedEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the referenced explicit data element has been sent or an error occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
eventSource VariableAccess 0..1 ref The referenced VariableAccess raises this DataSend CompletedEvent when the explicit write access was successful or an error occurred.

DataSendCompletedEvent . eventSource 属性的存在性:

表7.15:DataWriteCompletedEvent(DataWriteCompletedEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when an implicit write access was successful or an error occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
eventSource VariableAccess 0..1 ref The referenced VariableAccess raises this DataWrite CompletedEvent when the implicit write access was successful or an error occurred.

DataWriteCompletedEvent . eventSource 属性的存在性:

表7.16:DataReceivedEvent(DataReceivedEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the referenced data element is received. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
data VariableDataPrototype 0..1 iref The referenced VariableDataPrototype raises this Data ReceivedEvent when the data has been received. InstanceRef implemented by: RVariableInAtomicSwc InstanceRef

DataReceivedEvent . data 属性的存在性:

表7.17:DataReceiveErrorEvent(DataReceiveErrorEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the Com layer detects and notifies an error concerning the reception of the referenced VariableDataPrototype. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
data VariableDataPrototype 0..1 iref The referenced VariableDataPrototype raises this Data ReceiveErrorEvent when there was an error during the reception. InstanceRef implemented by: RVariableInAtomicSwc InstanceRef

DataReceiveErrorEvent . data 属性的存在性:

表7.18:OperationInvokedEvent(OperationInvokedEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the ClientServerOperation referenced in OperationInvokedEvent.operation shall be invoked. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
operation ClientServerOperation 0..1 iref This represents the ClientServerOperation which shall be invoked. InstanceRef implemented by: POperationInAtomicSwc InstanceRef

OperationInvokedEvent . operation 属性的存在性:

OperationInvokedEvent 不做模式禁用:

[constr_1523] 存在的依据:

RTE 不支持用模式禁用服务器 RunnableEntity。相反,如果在特定附带条件下服务器操作无法执行,服务器应以显式错误码响应。

关于元类 TimingEvent 语义的更多解释,请参见第 7.2.3 节。

表7.19:BackgroundEvent(BackgroundEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is used to start RunnableEntities that are supposed to be executed in the background. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

表7.20:SwcModeSwitchEvent(SwcModeSwitchEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the specified mode change occurs. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
activation ModeActivationKind 0..1 attr Specifies if the event is raised on entering or exiting a specific mode or is raised on the transition between two modes.
mode (ordered) ModeDeclaration 0..2 iref The referenced mode or the transition between two modes raises this SwcModeSwitchEvent. InstanceRef implemented by: RModeInAtomicSwc InstanceRef

SwcModeSwitchEvent . activation 属性的存在性:

reference SwcModeSwitchEvent . mode 的存在性:

表7.21:ModeActivationKind(ModeActivationKind)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | Kind of mode switch condition used for activation of an event, as further described for each enumeration field. | | 聚合于 | BswModeSwitchEvent.activation, SwcModeSwitchEvent.activation |

字面值 说明
onEntry On entering the referred mode. Tags: atp.EnumerationLiteralIndex=0
onExit On exiting the referred mode. Tags: atp.EnumerationLiteralIndex=1
onTransition On transition of the 1st referred mode to the 2nd referred mode. Tags: atp.EnumerationLiteralIndex=2

表7.22:ModeSwitchedAckEvent(ModeSwitchedAckEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the referenced ModeSwitchPoint has been processed or an error occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
eventSource ModeSwitchPoint 0..1 ref The referenced ModeSwitchPoint raises this Mode SwitchedAckEvent when the ModeSwitchPoint has been processed.

ModeSwitchedAckEvent . eventSource 属性的存在性:

表7.23:ExternalTriggerOccurredEvent(ExternalTriggerOccurredEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the referenced Trigger has occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
trigger Trigger 0..1 iref The referenced Trigger raises this ExternalTrigger OccurredEvent. InstanceRef implemented by: RTriggerInAtomicSwc InstanceRef

ExternalTriggerOccurredEvent . trigger 属性的存在性:

表7.24:InternalTriggerOccurredEvent(InternalTriggerOccurredEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when the referenced InternalTriggeringPoint has occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
eventSource InternalTriggeringPoint 0..1 ref The referenced InternalTriggeringPoint raises this Internal TriggerOccurredEvent.

InternalTriggerOccurredEvent . eventSource 属性的存在性:

表7.25:InitEvent(InitEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This RTEEvent is supposed to be used for initialization purposes, i.e. for starting and restarting a partition. It is not guaranteed that all RunnableEntities referenced by this InitEvent are executed before the 'regular' RunnableEntities are executed for the first time. The execution order depends on the task mapping. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

表7.26:TransformerHardErrorEvent(TransformerHardErrorEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when data are received which should trigger a Client/Server operation or an external Trigger but during transformation of the data a hard transformer error occurred. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
operation ClientServerOperation 0..1 iref This represents the ClientServerOperation for which the transformer can raise this TransformerHardErrorEvent. InstanceRef implemented by: POperationInAtomicSwc InstanceRef
requiredTrigger Trigger 0..1 iref This represents the Trigger for which the transformer can raise this TransformerHardErrorEvent. InstanceRef implemented by: RTriggerInAtomicSwc InstanceRef

attributes of TransformerHardErrorEvent 的存在性:

应在合同阶段生成执行时存在。

换言之,元类 TransformerHardErrorEvent 的属性 operation 和 requiredTrigger 应互斥使用。

RunnableEntity 与 RTEEvent 的交互:

  • 可以指示 RTE 在该 RTEEvent 发生时启用特定 RunnableEntity;

  • RTE 可以提供 WaitPoint,允许 RunnableEntity 阻塞直到一组 RTEEvent 中的某个 RTEEvent 发生。

glyph[floorright](RS_SWCT_03040)

表7.27:OsTaskExecutionEvent(OsTaskExecutionEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This RTEEvent is supposed to execute RunnableEntities which have to react on the execution of specific OsTasks. Therefore, this event is unconditionally raised whenever the OsTask on which it is mapped is executed. The main use case for this event is scheduling of Runnables of Complex Drivers which have to react on task executions. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

OsTaskExecutionEvent 的适用性:

7.3.1. 定义事件

SwcInternalBehavior 的描述包括 AtomicSwComponentType 的 SwcInternalBehavior 所依赖的所有 RTEEvent 的描述。

抽象基类 RTEEvent:

请注意,关于元类 SwcModeManagerErrorEvent 和 ModeErrorBehavior 语义的更多解释见第 9.4 节。

各种具体 RTEEvent(如 TimingEvent、DataSendCompletedEvent 等)的细节在第 7.5.1、7.5.2、7.2.3 章描述。

7.3.2. 定义如何响应事件

RTE 响应发生的 RTEEvent 触发 RunnableEntity:

图 7.13 给出 WaitPoint 建模的概览。

RunnableEntity 与 WaitPoint:

这样的 WaitPoint 包含对可以解除该特定 WaitPoint 阻塞的 RTEEvent 的引用。换言之:该 WaitPoint 将阻塞,直到被引用的

RTEEvent 发生,或属性 timeout 规定的周期期满。

可以引用 WaitPoint 的 RTEEvent:

  • DataReceivedEvent;

  • DataSendCompletedEvent;

  • ModeSwitchedAckEvent;

  • AsynchronousServerCallReturnsEvent。

该规则应在合同阶段执行时施加。

RTEEvent 可用于触发不同 RunnableEntity 中的 WaitPoint:

关于 DataReceivedEvent,另请参见 [constr_2021]。

表7.28:WaitPoint(WaitPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This defines a wait-point for which the RunnableEntity can wait. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | RunnableEntity.waitPoint |

属性 类型 多重性 种类 备注
timeout TimeValue 0..1 attr Time in seconds before the WaitPoint times out and the blocking wait call returns with an error indicating the timeout.
trigger RTEEvent 0..1 ref This is the RTEEvent this WaitPoint is waiting for.

WaitPoint . timeout 属性的存在性:

reference WaitPoint . trigger 的存在性:

SwcModeSwitchEvent 与 WaitPoint:

类别 2 的 RunnableEntity:

拥有 WaitPoint 的 RunnableEntity:

模式切换需要在有限时间内完成:

除此之外,受模式禁用影响的、带 WaitPoint 的 RunnableEntity 通常在模式禁用生效时已经在运行。它无法在这一时点被终止。

7.4. 可运行实体之间的通信

理所当然,特定 AtomicSwComponentType 内的某些 RunnableEntity 需要相互通信。

RunnableEntity 之间的通信:

在这种情况下,(虽然在技术上可行)为此目的不需要使用 PortPrototype。

同一 AtomicSwComponentType 不同实例的 RunnableEntity 之间的通信:

可以识别若干实现 RunnableEntity 之间通信的概念。

作为引言,第 2.3.1 节描述 RTE 可能用于在一个 AtomicSwComponentType 内提供 RunnableEntity 间高效交互的各种技术。

描述了这种通信形式化规定的两种可能方法:

  • 规定若干 RunnableEntity 属于特定的 ExclusiveArea;

  • 规定 RunnableEntity 之间交换的数据。

7.4.1. 描述方式 1:排他区

本节描述 ExclusiveArea 的概念如何用于 AtomicSwComponentType 的 SwcInternalBehavior 的描述。

请注意,ExclusiveArea 实际上由 SwcInternalBehavior 的基类(即 InternalBehavior)拥有。这些 ExclusiveArea 不意味着特定实现(例如用互斥信号量)。

表7.29:ExclusiveArea(ExclusiveArea)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | Prevents an executable entity running in the area from being preempted. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | InternalBehavior .exclusiveArea |

ExclusiveArea:

如果两个或更多 RunnableEntity 引用同一 ExclusiveArea,则只允许其中一个 RunnableEntity 在位于该 ExclusiveArea 内时被执行。

换言之:这些 RunnableEntity 在 ExclusiveArea 内执行时不应并发运行(相互抢占)。

关于元类 ExclusiveArea 形式化定义的更多细节见图 7.14。

使用 ExclusiveArea 的两种方式:

作为替代,可以规定给定 RunnableEntity 的整个执行由一个 ExclusiveArea 保护(这要求 ExecutableEntity.runsInside 的存在)。

请注意,进入 ExclusiveArea 的选项在第 7.4.1.1 节和第 7.4.1.2 节记录。

ExclusiveAreaNestingOrder:

指示锁定行为对 RunnableEntity 已完整描述:

未描述该 RunnableEntity 的锁定行为:

ExclusiveAreaNestingOrder 由 InternalBehavior 聚合,而后者也拥有 RunnableEntity。

表7.30:ExclusiveAreaNestingOrder(ExclusiveAreaNestingOrder)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | This meta-class represents the ability to define a nesting order of ExclusiveAreas. A nesting order (that may occur in the executable code) is formally defined to be able to analyze the resource locking behavior. | | 基类 | ARObject , Referrable | | 聚合于 | InternalBehavior .exclusiveAreaNestingOrder |

属性 类型 多重性 种类 备注
exclusiveArea (ordered) ExclusiveArea * ref This represents a specific scenario of how Exclusive Areas can be used in terms of the nesting order.

SynchronousServerCallPoint 与 ExclusiveAreaNestingOrder 的关系:

这种配置的目的是分析完整调用树的资源锁定行为。

7.4.1.1. 整个可运行体在排他区内运行

RunnableEntity 总是在 ExclusiveArea 内运行:

如果形式化描述规定 RunnableEntity “r1” 和 RunnableEntity “r2” 都在 ExclusiveArea “s1” 内运行,则 RTE 应确保 RunnableEntity “r1” 和 “r2” 永不并发运行;调度器绝不应抢占 “r1” 来运行 “r2”。

注意,这一模式并不强制 RTE 通过在 RunnableEntity 启动前取得、在返回时释放的信号量或互斥量来实现这一点。它只责成 RTE 确保两个 RunnableEntity 永不并发运行。

这一需求可以由上面描述的若干实现策略实现。此类实现策略的示例列举如下。

例 7.3

调度策略:例如,如果 RunnableEntity “r1” 和 “r2”(例 7.2 中提到的)被映射到同一任务,则该标准自动满足。为此必须确保 OS 只能执行放入这些 RunnableEntity 的任务的单一实例。

例 7.4

互斥信号量:如果 “r1” 和 “r2” 被映射到不同任务(分别为 “T1” 和 “T2”),OS 应确保当 “T1” 执行 “r1” 时,运行 “r2” 的 “T2” 永不能抢占它,反之亦然。这可以通过在 “t1”(或 “t2”)的上下文中执行 “r1”(或 “r2”)之前取得互斥信号量、并在退出 RunnableEntity 时归还信号量来实现。

7.4.1.2. 可运行体动态进入和离开排他区

RunnableEntity 显式进入和离开特定的 ExclusiveArea:

例如,这可以借助第 2.3.1.3 章描述的优先级天花板概念实现。

此外,可以规定 RunnableEntity 在该 ExclusiveArea 片段中将花费的执行时间。注意,尽管这一方面在 [6] 中描述,该概念也可应用于软件组件。

7.4.1.3. API 生成的配置

对 ExclusiveArea 的某些使用场景,如果每个 RunnableEntity 使用一组独特的进入和退出 API,被认为是有利的。

这组独特的 API 支持这样一种 ExclusiveArea 实现:对最高优先级的 RunnableEntity,省略锁。

当最高优先级的 RunnableEntity 不会被以较低优先级调度的 RunnableEntity 打断时,这是可能的。

为支持这种实现,软件组件描述必须陈述(借助属性 SwcInternalBehavior.exclusiveAreaPolicy.apiPrinciple):它为在角色 canEnter 中引用 ExclusiveArea 的每个 RunnableEntity 单独请求 API。

表7.31:SwcExclusiveAreaPolicy(SwcExclusiveAreaPolicy)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior | | 说明 | Options how to generate the ExclusiveArea related APIs. If no SwcExclusiveAreaPolicy is specified for an ExclusiveArea the default values apply. | | 基类 | ARObject | | 聚合于 | SwcInternalBehavior.exclusiveAreaPolicy |

属性 类型 多重性 种类 备注
apiPrinciple ApiPrincipleEnum 0..1 attr Specifies for this ExclusiveArea if either one common set of Enter and Exit APIs for the whole software component is requested from the Rte or if the set of Enter and Exit APIs is expected per RunnableEntity. The default value is "common".
exclusiveArea ExclusiveArea 0..1 ref This reference represents the ExclusiveArea for which the policy applies.

SwcExclusiveAreaPolicy . apiPrinciple 属性的存在性:

表7.32:ApiPrincipleEnum(ApiPrincipleEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::InternalBehavior | | 说明 | This enumeration represents the ability to control the granularity of API generation. | | 聚合于 | BswExclusiveAreaPolicy.apiPrinciple, SwcExclusiveAreaPolicy.apiPrinciple |

表7.33:ApiPrincipleEnum(ApiPrincipleEnum)

属性 类型 多重性 种类 备注
common The Rte or SchM API is provided for the whole software component / BSW Module Tags: atp.EnumerationLiteralIndex=0
perExecutable The Rte or SchM API is provided for a specific ExecutableEntity of a software component / BSW Module Tags: atp.EnumerationLiteralIndex=1

ExclusiveArea 由一组公共 API 进入和退出:

在这种情况下,所有受影响的 RunnableEntity 执行相同的进入和退出代码,无法对在最高优先级上下文中执行的 RunnableEntity 进行特殊处理。

ExclusiveArea 由一组单独的 API 进入和退出:

在这种情况下,在最高优先级执行上下文中执行的 RunnableEntity 的进入和退出代码的实现可以留空。

为避免同一 ExclusiveArea 出现相互矛盾的 SwcExclusiveAreaPolicy 设置,适用 [constr_1468]。

SwcExclusiveAreaPolicy 数量的限制:

7.4.2. 描述方式 2:可运行体间变量

对某些情况,ExclusiveArea 概念不能提供足够的信息来正确配置 RTE。在这些情况下,可以建议选择另一种方法,即基于对由 RTE 保护的变量的受保护访问。

为了标识将从不同 RunnableEntity 并发访问的数据片段,需要形式化支持。在 AUTOSAR 中,这一方面归纳在术语 “可运行体间变量” 下。

可运行体间变量:

(SwcInternalBehavior 聚合 VariableDataPrototype 于)角色 explicitInterRunnableVariable 或 implicitInterRunnableVariable。

交换数据与 RunnableEntity 的关系:

为此目的,RunnableEntity 在角色 readLocalVariable 和 writtenLocalVariable 中聚合 VariableAccess。

同样,SwcInternalBehavior 在角色 explicitInterRunnableVariable 和 implicitInterRunnableVariable 中聚合 VariableDataPrototype。

如果到相应 VariableDataPrototype 的引用 AutosarVariableRef.localVariable 存在,则建立 RunnableEntity 与 explicitInterRunnableVariable 和 implicitInterRunnableVariable 之间的连接。

使用 AutosarVariableRef.localVariable 引用可运行体间变量:

由角色 writtenLocalVariable 与 readLocalVariable 中 VariableAccess 的 AutosarVariableRef 引用的 VariableDataPrototype:

该规则应在合同阶段生成执行时施加。

显然,implicitInterRunnableVariable 或 explicitInterRunnableVariable 的数据类型由 VariableDataPrototype(它派生自 DataPrototype)的数据类型描述。

特定 implicitInterRunnableVariable 或 explicitInterRunnableVariable 的初始值:

为此,角色 explicitInterRunnableVariable 或 implicitInterRunnableVariable 中的 VariableDataPrototype 能够在角色 initValue 中聚合一个 ValueSpecification。

[TPS_SWCT_01637] 所作的陈述反映于图 7.17。

未为 implicitInterRunnableVariable 或 explicitInterRunnableVariable 规定初始值:

如前所述,“可运行体间变量” 的概念可以以两种不同方式使用。这由聚合充当 “可运行体间变量” 的 VariableDataPrototype 的两个不同角色 explicitInterRunnableVariable 或 implicitInterRunnableVariable 指示。

它们类似于应用于 SwComponentType 层级通信的通信原则。

请注意,两种不同种类的可运行体间变量经由不同的 RTE [2] API 调用访问。

explicitInterRunnableVariable 的语义:

借此,每次执行相应的 API 调用时,都可以为特定 VariableDataPrototype 获得不同的值。

implicitInterRunnableVariable 的语义:

这种方法在第 2.3.1.4 章详细描述。

用作 explicitInterRunnableVariable 或 implicitInterRunnableVariable 的 DataPrototype 与 category DATA_REFERENCE:

  • explicitInterRunnableVariable,或

  • implicitInterRunnableVariable

如果该 VariableDataPrototype(在经由 TYPE_REFERENCE 的潜在间接解析之后)要么由以下定义类型,要么映射到:

  • category 为 DATA_REFERENCE 的 ImplementationDataType;或

  • 包含(在经由 TYPE_REFERENCE 的潜在间接解析之后)category 为 DATA_REFERENCE 的 subElement 的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

7.4.3. 可运行体间触发

可运行体间触发的概念允许一个 RunnableEntity 触发 AtomicSwComponentType 内的另一个 RunnableEntity。这种方法在概念上支持软件组件内部计算与处理序列的解耦。

通过把 InternalTriggerOccurredEvent 映射到以不同优先级运行的 OS 任务,被触发的 RunnableEntity 随后以不同于触发它的 RunnableEntity 的优先级执行。

例如,一个不应超过某个最坏情况执行时间(WCET)的周期性触发 RunnableEntity,在发生错误时激活第二个 RunnableEntity,以便能够在较低的优先级层级执行(潜在)耗时的异常处理。

如图 7.18 所示,触发它的 RunnableEntity 需要一个 InternalTriggeringPoint。

同一软件组件实例中 RunnableEntity 的激活经由通用的事件处理机制实现。

内部触发事件:

内部触发的排队处理:

InternalTriggeringPoint.swImplPolicy 的允许值:

该规则应在 RTE 生成时施加。

表7.34:InternalTriggeringPoint(InternalTriggeringPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::Trigger | | 说明 | If a RunnableEntity owns an InternalTriggeringPoint it is entitled to trigger the execution of Runnable Entities of the corresponding software-component. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.internalTriggeringPoint |

属性 类型 多重性 种类 备注
swImplPolicy SwImplPolicyEnum 0..1 attr This attribute, when set to value queued, allows for a queued processing of Triggers.

相应外部触发通信的描述包含在第 7.5.3 章。

7.5. RunnableEntity 的数据访问

本节描述 AtomicSwComponentType 的通信属性。这主要从 RunnableEntity 的视角完成(RunnableEntity 的概念在第 7.2 章引入)。

不过,PortPrototype 在 AtomicSwComponentType 内特定角色中的使用也影响通信行为。

RunnableEntity 对 PortInterface 或 InternalBehavior 中不同元素的访问,由一组特定于通信模式和访问种类的元类建模。

尽管如此,所有这些元类都继承自 AbstractAccessPoint,以便支持以协调的方式被附加描述引用的能力。

表7.35:AbstractAccessPoint(AbstractAccessPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::AccessCount | | 说明 | Abstract class indicating an access point from an ExecutableEntity. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 子类 | AsynchronousServerCallResultPoint, ExternalTriggeringPointIdent, InternalTriggeringPoint, ModeAccess PointIdent, ModeSwitchPoint, ParameterAccess, ServerCallPoint , VariableAccess | | 聚合于 | AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
returnValue Provision RteApiReturnValue ProvisionEnum 0..1 attr This attribute controls the provision of return values for RTE APIs that correspond to the enclosing access point.

表7.36:RteApiReturnValueProvisionEnum(RteApiReturnValueProvisionEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::AccessCount | | 说明 | This meta-class provides values to control how return values from RTE APIs are provided. | | 聚合于 | AbstractAccessPoint .returnValueProvision |

字面值 说明
noReturnValue Provided The RTE API shall not provide a return value. Tags: atp.EnumerationLiteralIndex=1
returnValue Provided The RTE API shall provide a return value. Tags: atp.EnumerationLiteralIndex=0

在 PortPrototype 上下文中访问 DataPrototype 的 RunnableEntity 不允许把数据访问扩展到相应 DataPrototype 的子元素。

例如,假定一个 DataPrototype 实际实现了由元素 A 和 B 组成的结构。不支持只发送或只接收该结构的元素 A 或 B。

这一断言导致 [constr_1429] 的存在,进而导致 [constr_1430]。

从 RunnableEntity 内访问 PortPrototype 内的数据:

  • RunnableEntity.dataWriteAccess;

  • RunnableEntity.dataReadAccess;

  • RunnableEntity.dataSendPoint;

  • RunnableEntity.dataReceivePointByArgument;

  • RunnableEntity.dataReceivePointByValue;

(在这些角色中)不允许以下属性的存在:

  • VariableAccess.accessedVariable.autosarVariable.contextDataPrototype;

  • VariableAccess.accessedVariable.autosarVariable.rootVariableDataPrototype;

  • VariableAccess.accessedVariable.autosarVariableInImplDatatype;

  • VariableAccess.accessedVariable.localVariable。

换言之:在这种情况下,只允许引用

  • VariableAccess.accessedVariable.autosarVariable.portPrototype 与

  • VariableAccess.accessedVariable.autosarVariable.targetDataPrototype

应存在,且后者应专门引用聚合为

  • SenderReceiverInterface.dataElement;或

  • NvDataInterface.nvData 的 VariableDataPrototype。

该规则应在合同阶段生成执行时施加。

从 RunnableEntity 内访问本地数据:

  • RunnableEntity.writtenLocalVariable;

  • RunnableEntity.readLocalVariable;

(在这些角色中)不允许以下属性的存在:

  • VariableAccess.accessedVariable.autosarVariableInImplDatatype;

  • VariableAccess.accessedVariable.autosarVariable(不允许)

换言之,在这种情况下只应使用引用 VariableAccess.accessedVariable.localVariable。

该规则应在合同阶段生成执行时施加。

从 RunnableEntity 内访问参数:

  • ParameterAccess.accessedParameter.autosarParameter.contextDataPrototype;

  • ParameterAccess.accessedParameter.autosarParameter.rootParameterDataPrototype(不允许)

换言之:在这种情况下,允许存在以下替代方案之一:

  • 以下组合:

  • ParameterAccess.accessedParameter.autosarParameter.portPrototype 与

  • ParameterAccess.accessedParameter.autosarParameter.targetDataPrototype——它专门引用在角色 parameter 中由 ParameterInterface 聚合的 ParameterDataPrototype;

  • ParameterAccess.accessedParameter.localParameter——它引用聚合为

  • InternalBehavior.constantMemory;或

  • SwcInternalBehavior.perInstanceParameter;或

  • SwcInternalBehavior.sharedParameter 的 ParameterDataPrototype。

该规则应在合同阶段生成执行时施加。

7.5.1. RunnableEntity 与 Sender/Receiver 通信

本节描述与软件组件 sender-receiver 通信相关的方面。它们主要影响 AUTOSAR RTE 的行为和 API。

sender-receiver 范式应用的交互模式:

  1. cat. 1 RunnableEntity 中的数据访问;

  2. 显式发送;

  3. DataSendCompletedEvent:处理显式发送的成功/失败;以及

  4. DataReceivedEvent:响应数据的接收。

  5. DataReceiveErrorEvent:通知与数据接收相关的错误。

7.5.1.1. 术语

AUTOSAR 元模型为 sender-receiver 通信预见了两种不同的方法。它们在第 7.5.1.2、7.5.1.3 章详细描述。不过,事实证明直接基于元类及其属性来讨论通信方法问题相当繁琐。

因此,为此引入一套专用术语似乎是恰当的。最终选择的方法最初由 RTE 规范的贡献者引入。

该术语提议把基于数据访问的通信称为 “隐式”(关于该方法的更多细节请参阅第 7.5.1.2 章),把基于所谓数据点(data-point)的通信称为 “显式”(请参阅第 7.5.1.3 章)。

区分 “隐式” 与 “显式” 的动机最初源于 RTE 规范的特性:规范为处理 dataSendPoint 或 dataReceivePointByValue 预见了 API,而数据访问则应是特定 RunnableEntity 函数签名的一部分(因此不需要 API)。

尽管 RTE 规范在此期间发生了变化(最初的动机已不再适用),但基于 “隐式” 与 “显式” 通信的术语已在 AUTOSAR 内广泛使用。

由于未能就替代提案达成共识,本文档也沿用了这一术语方法。

7.5.1.2. 数据访问

对 dataElement 的读写访问:

读写访问只适用于类别 1 的 RunnableEntity:

为便于解释,假定一个 cat. 2 的 RunnableEntity 拥有 dataReadAccess 和 dataWriteAccess。所收到的 dataElement 会在 RunnableEntity 实际开始执行之前更新,而即使该 RunnableEntity 运行很长时间,dataElement 的值也保持不变、永不改变。

另一方面,该 RunnableEntity 可能用其 dataWriteAccess 对 dataElement 执行写访问,但实际值可能永远无法越出该 RunnableEntity,因为

  1. 后者从不需要终止;且

  2. 实际写访问在 RunnableEntity 终止之后才执行。

表7.37:VariableAccess(VariableAccess)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | The presence of a VariableAccess implies that a RunnableEntity needs access to a VariableData Prototype. The kind of access is specified by the role in which the class is used. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ReceiverComSpec .replaceWith, RunnableEntity.dataReadAccess, Runnable Entity.dataReceivePointByArgument, RunnableEntity.dataReceivePointByValue, RunnableEntity.data SendPoint, RunnableEntity.dataWriteAccess, RunnableEntity.readLocalVariable, RunnableEntity.written LocalVariable |

属性 类型 多重性 种类 备注
accessed Variable AutosarVariableRef 0..1 aggr This denotes the accessed variable.
scope VariableAccessScope Enum 0..1 attr This attribute allows for constraining the scope of the corresponding communication. For example, it possible to express whether the communication is intended to cross the boundary of an ECU or whether it is intended not to cross the boundary of a single partition.

VariableAccess . accessedVariable 属性的存在性:

表7.38:VariableAccessScopeEnum(VariableAccessScopeEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | This enumeration defines scopes for communication. | | 聚合于 | VariableAccess.scope |

字面值 说明
communicationInter Ecu This case is foreseen to express that the corresponding communication shall be considered inter-ECU, i.e. it will cross the ECU boundary. This is considered the default case. Tags: atp.EnumerationLiteralIndex=0
communicationIntra Partition This case is foreseen to express that the corresponding communication shall not cross the boundary of a partition. Tags: atp.EnumerationLiteralIndex=1
interPartitionIntra Ecu In this case the communication shall cross the boundaries of partitions within one ECU but it shall not cross the boundaries of the ECU itself. Tags: atp.EnumerationLiteralIndex=2

约束特定通信的范围:

这一能力的主要用例是软件开发:来自或去往软件组件的某些通信端点已知满足某个约束,例如在同一分区内执行。glyph[floorright](RS_SWCT_00200)

属性 scope 的默认值:

scope 属性的适用性:

元类 VariableAccess 的属性 scope 只应就以下角色中 VariableAccess 的聚合而应用:

  • dataReadAccess;

  • dataWriteAccess;

  • dataSendPoint;

  • dataReceivePointByValue;

  • dataReceivePointByArgument。

该规则应在合同阶段生成执行时施加。

这一方面描绘于图 7.20。

7.5.1.3. 显式发送与接收

RunnableEntity 也可以拥有 dataSendPoint:

借助 instanceRef 关联,这些最终引用 AbstractProvidedPortPrototype 上下文中的一个 VariableDataPrototype;该 AbstractProvidedPortPrototype 由与拥有 dataSendPoint 的 RunnableEntity 关联的 AtomicSwComponentType 拥有。glyph[floorright](RS_SWCT_00200)

由角色 dataSendPoint 中 VariableAccess 的 AutosarVariableRef 引用的 VariableDataPrototype:

dataWriteAccess 与 dataSendPoint 的对照:

  • 使用 dataSendPoint 时,RunnableEntity 需要通过 API 显式 “发送”;使用 dataWriteAccess 时,RunnableEntity 只需修改某些变量的值。

  • 使用 dataSendPoint 时,可运行体可以决定 “发送” 任意多次;使用 dataWriteAccess 时,VariableDataPrototype 的新值只在 RunnableEntity 终止之后才可用。

  • dataSendPoint 的存在按定义使相应 RunnableEntity 达到 cat. 1B。

glyph[floorright](RS_SWCT_00200)

属性 dataSendPoint.returnValueProvision 的值:

[constr_1773] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置在角色 dataSendPoint 中聚合 VariableAccess。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有在角色 dataSendPoint 中聚合的受影响 VariableAccess 必须就属性 returnValueProvision 的配置达成一致。

这一关系勾勒于图 7.21。

dataReadAccess 与 dataReceivePointByValue 或 dataReceivePointByArgument 的对照:

  • 使用 dataReceivePointByValue 或 dataReceivePointByArgument 时,RunnableEntity 在其执行期间每次调用相应 API 都 “接收” 该 dataElement 的最新值。

  • 使用 dataReadAccess 时,相应 dataElement 的值在 RunnableEntity 启动之前接收,且在 RunnableEntity 执行期间不变,与隐式接收的 API 调用次数无关。

  • dataReceivePointByValue 或 dataReceivePointByArgument 的存在按定义使相应 RunnableEntity 达到 cat. 1B。

更多细节请参阅第 4.9 节。

dataReceivePointByValue 与 dataReceivePointByArgument 的对照:

这一方面可视化于图 7.23。

角色 dataReceivePointByValue 中聚合的 VariableAccess 所引用 VariableDataPrototype 的 SwDataDefProps.swImplPolicy:

«atpVariation,atpSplitable»

[constr_1277] 的依据:当使用相应 RTE API 函数的返回值返回 VariableDataPrototype 的值时,没有办法表明队列为空。因此,唯一安全的方法是完全不允许这种情况,故有该约束。

3 也就是说,除了用函数实参返回队列状态之外别无他法,但这显然违背了该 API 函数的目的。

0..*

dataReceivePointByValue / dataReceivePointByArgument 与 dataReadAccess 的对照:

类别 1 的 RunnableEntity 可以拥有 dataReceivePointByValue / dataReceivePointByArgument:

请注意,RunnableEntity 的类别在第 7.2.4.4 节解释。

与 dataReadAccess 类似,约束适用于角色 dataReceivePointByValue 或 dataReceivePointByArgument 中 VariableAccess 的 AutosarVariableRef 的引用目标。

属性 dataReceivePointByArgument.returnValueProvision 的值:

[constr_1774] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置在角色 dataReceivePointByArgument 中聚合 VariableAccess。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有在角色 dataReceivePointByArgument 中聚合的受影响 VariableAccess 必须就属性 returnValueProvision 的配置达成一致。

这一关系以示例方式(就 dataSendPoint.returnValueProvision 的情形)勾勒于图 7.21。

由角色 dataReceivePointByValue 或 dataReceivePointByArgument 中 VariableAccess 的 AutosarVariableRef 引用的 VariableDataPrototype:

把 dataReceivePointByValue 或 dataReceivePointByArgument 与 WaitPoint 结合:

这允许调用由 RTE 实现的阻塞式接收例程。元类 WaitPoint 的 timeout 属性可用于规定阻塞调用期满的时间。

但在非排队通信的情况下,不支持把 DataReceivedEvent 与 WaitPoint 结合使用(见 [constr_2021])。这与 “最后者最优” 语义的方法相矛盾。glyph[floorright](RS_SWCT_00200)

引用 DataReceivedEvent 的 WaitPoint 不能用于非排队通信:

该规则应在合同阶段生成执行时施加。

不过请注意,在这种情况下(响应 WaitPoint 的存在),该 RunnableEntity 变为类别 2。

7.5.1.4. 隐式发送与接收

隐式发送与接收旨在优化 sender-receiver 通信的计算开销。

隐式通信不为每次发送 API 或接收 API 的调用执行全部功能,而是最迟在 RunnableEntity 开始执行之前接收隐式接收的值,并且最早在 RunnableEntity 终止之后发送隐式发送的值。

对特定数据的访问通过在特定角色中聚合元类 VariableAccess 来实现:

这意味着读访问用 dataReadAccess,而写访问通过在角色 dataWriteAccess 中聚合 VariableAccess 来定义。glyph[floorright](RS_SWCT_00200)

这一方面描绘于图 7.19。

以下约束适用于角色 dataReadAccess 或 dataWriteAccess 中 VariableAccess 的 AutosarVariableRef 的引用目标。

由角色 dataReadAccess 中 VariableAccess 的 AutosarVariableRef 引用的 VariableDataPrototype:

该规则应在合同阶段生成执行时施加。

由角色 dataWriteAccess 中 VariableAccess 的 AutosarVariableRef 引用的 VariableDataPrototype:

该规则应在合同阶段生成执行时施加。

通过 dataReadAccess 角色中 VariableAccess 的访问,在 RunnableEntity 执行期间读取的总是 RunnableEntity 启动之前缓冲的 VariableDataPrototype 的最后值。

因此,为在角色 dataReadAccess 中访问 dataElement 而提供值队列没有任何意义。

dataReadAccess 不能用于排队通信:

n:1 写者情形下的确认反馈:

该规则应在合同阶段生成执行时施加。

[constr_1256] 的背景是:如果存在两个或更多可以写同一 dataElement 的 RunnableEntity,可能出现不止一个

RunnableEntity 在收到 “第一个” 确认之前实际写入相应 dataElement。在这种情况下,将永远无法准确判定哪一次传输被确认。

隐式与显式 sender/receiver 通信的区别在 [TPS_SWCT_01331] 和 [TPS_SWCT_01663] 中解释。

7.5.1.5. DataSendCompletedEvent

dataSendPoint 还允许定义 DataSendCompletedEvent:

DataSendCompletedEvent 的超时:

7.5.1.6. DataWriteCompletedEvent

dataWriteAccess 还允许定义 DataWriteCompletedEvent:

DataWriteCompletedEvent 不能与 WaitPoint 结合:

7.5.1.7. DataReceivedEvent

DataReceivedEvent:

7.5.1.8. DataReceiveErrorEvent

DataReceiveErrorEvent:

DataReceiveErrorEvent 包含对 VariableDataPrototype 的引用,当 COM 层检测到与所引用数据接收相关的错误时,由 RTE 引发。

以下情形展示了一些会导致 RTE 引发 DataReceiveErrorEvent 的情况:

  • 当受监控的周期信号未及时收到时,RTE 从 COM 层收到信号过期通知。COM 层基于引用与该信号关联的 VariableDataPrototype 的 ReceiverComSpec 的 aliveTimeout 属性值监控信号值的有效性。如果自信号值上次更新以来经过的时间超过其 aliveTimeout,则 COM 层向 RTE 通知信号过期错误。

  • 当 COM 层检测到进入的信号具有预定义的 “无效” 值时,RTE 从 COM 层收到信号无效通知。

4 在内部通信的情况下,不强制 RTE 使用 COM 层。也可以直接在 RTE 中实现所需的行为。

DataReceiveErrorEvent 的存在性:

  • 该 VariableDataPrototype 由 NonqueuedReceiverComSpec 在角色 dataElement 中引用,且 NonqueuedReceiverComSpec 的属性 aliveTimeout 存在并设置为大于 0 的值;或

  • 该 VariableDataPrototype 由 SenderReceiverInterface 聚合,其中属性 invalidationPolicy.handleInvalid 存在并设置为值 keep。

RTE 响应 DataReceiveErrorEvent 激活 RunnableEntity:

错误码将通过相应的 RTE API 函数提供给被激活的 RunnableEntity。glyph[floorright](RS_SWCT_00200)

DataReceiveErrorEvent 不能与 WaitPoint 结合:

它只能用于 sender-receiver 通信中的接收方软件组件,且其数据引用限于 swImplPolicy 属性未设置为 queued 的 VariableDataPrototype。glyph[floorright](RS_SWCT_00200)

DataReceiveErrorEvent 直接与相应 VariableDataPrototype 关联:

这一方面描绘于图 7.26。

7.5.2. RunnableEntity 与 Client/Server 通信

7.5.2.1. 调用操作

服务器操作的调用:

同步与异步调用:

在大多数情况下,ClientServerOperation 会在不同的 SwComponentPrototype 上调用,但一般而言也可以在同一个 SwComponentPrototype 上调用 ClientServerOperation。

特定 ClientServerOperation 是同步调用还是异步调用的决定,需要在相应 AtomicSwComponentType 的形式化描述中规定,即在 SwcInternalBehavior 的上下文中(更多细节见图 7.27)。

但不支持对同一 ClientServerOperation 实例同时进行同步与异步调用。

SynchronousServerCallPoint 与 AsynchronousServerCallPoint 的互斥使用:

属性 serverCallPoint.returnValueProvision 的值:

[constr_1775] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置聚合 ServerCallPoint。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有受影响的 ServerCallPoint 必须就属性 returnValueProvision 的配置达成一致。

这一关系以示例方式(就 dataSendPoint.returnValueProvision 的情形)勾勒于图 7.21。

timeout 值的一致性:

在 RTE 生成时应相同。glyph[floorright]()

同步操作调用:

更多信息见图 7.27。

异步操作调用:

这借助通用 RTEEvent 机制完成:异步执行的操作已完成的通知实现为 AsynchronousServerCallReturnsEvent。

因此,如果引发 AsynchronousServerCallReturnsEvent,RTE 可以触发特定 RunnableEntity 的执行,或者 AtomicSwComponentType 可以实现一个 WaitPoint,阻塞调用方 RunnableEntity 的执行,直到识别到该 AsynchronousServerCallReturnsEvent。glyph[floorright](RS_SWCT_00200)

例如,考虑对远程操作的异步调用,其中 RTE 应在该操作完成时触发特定 RunnableEntity。相应 AtomicSwComponentType 的描述通常包含以下元素:

  1. AtomicSwComponentType 包含一个 RPortPrototype “myPort”,由一个 PortInterface 定义类型,该 PortInterface 又包含 ClientServerOperation “remoteOperation” 的定义。

  2. AtomicSwComponentType 的 SwcInternalBehavior 包含至少两个 RunnableEntity:RunnableEntity “main” 应调用该操作;RunnableEntity “callback” 应在该操作完成时被调用。

  3. RunnableEntity “main” 的描述包含一个 AsynchronousServerCallPoint “invokeMyOperation”,它引用用于定义 PortPrototype “myPort” 类型的 PortInterface 中的相应 ClientServerOperation。这意味着该 RunnableEntity 允许异步调用此操作。

  4. RunnableEntity “callback” 的描述包含一个 AsynchronousServerCallResultPoint “fetchMyOperationResults”,它引用相应的 AsynchronousServerCallPoint “invokeMyOperation”。这意味着该 RunnableEntity 允许取回异步调用操作的结果。

  5. SwcInternalBehavior 的描述包含一个 AsynchronousServerCallReturnsEvent “myOperationReturns”,它引用先前定义的 AsynchronousServerCallResultPoint “fetchMyOperationResults”。

  6. AsynchronousServerCallReturnsEvent “myOperationReturns” 的描述引用 RunnableEntity “callback”,指示当 “myOperationReturns” 引发时 RTE 应触发此可运行体的执行。

属性 asynchronousServerCallResultPoint.returnValueProvision 的值:

[constr_1776] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置聚合 AsynchronousServerCallResultPoint。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有受影响的 AsynchronousServerCallResultPoint 必须就属性 returnValueProvision 的配置达成一致。

这一关系以示例方式(就 dataSendPoint.returnValueProvision 的情形)勾勒于图 7.21。

表7.39:ServerCallPoint(ServerCallPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServerCall | | 说明 | If a RunnableEntity owns a ServerCallPoint it is entitled to invoke a particular ClientServerOperation of a specific RPortPrototype of the corresponding AtomicSwComponentType | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 子类 | AsynchronousServerCallPoint, SynchronousServerCallPoint | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.serverCallPoint |

属性 类型 多重性 种类 备注
operation ClientServerOperation 0..1 iref The operation that is called by this runnable. InstanceRef implemented by: ROperationInAtomicSwc InstanceRef
timeout TimeValue 0..1 attr Time in seconds before the server call times out and returns with an error message. It depends on the call type (synchronous or asynchronous) how this is reported.

ServerCallPoint . operation 属性的存在性:

ServerCallPoint . timeout 属性的存在性:

表7.40:SynchronousServerCallPoint(SynchronousServerCallPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServerCall | | 说明 | This means that the RunnableEntity is supposed to perform a blocking wait for a response from the server. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable , ServerCallPoint | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.serverCallPoint |

属性 类型 多重性 种类 备注
calledFrom WithinExclusive Area ExclusiveAreaNesting Order 0..1 ref This indicates that the call point is located at the deepest level inside one or more ExclusiveAreas that are nested in the given order.

AsynchronousServerCallResultPoint . asynchronousServerCallPoint 属性的存在性:

表7.41:AsynchronousServerCallPoint(AsynchronousServerCallPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServerCall | | 说明 | An AsynchronousServerCallPoint is used for asynchronous invocation of a ClientServerOperation. IMPORTANT: a ServerCallPoint cannot be used concurrently. Once the client RunnableEntity has made the invocation, the ServerCallPoint cannot be used until the call returns (or an error occurs!) at which point the ServerCallPoint becomes available again. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable , ServerCallPoint | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.serverCallPoint |

表7.42:AsynchronousServerCallResultPoint(AsynchronousServerCallResultPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServerCall | | 说明 | If a RunnableEntity owns a AsynchronousServerCallResultPoint it is entitled to get the result of the referenced AsynchronousServerCallPoint. If it is associated with AsynchronousServerCallReturnsEvent, this RTEEvent notifies the completion of the required ClientServerOperation or a timeout. The occurrence of this event can either unblock a WaitPoint or can lead to the invocation of a RunnableEntity. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.asynchronousServerCallResultPoint |

属性 类型 多重性 种类 备注
asynchronous ServerCallPoint AsynchronousServer CallPoint 0..1 ref The referenced Asynchronous Server Call Point defines the asynchronous server call from which the results are returned.

引用同一 AsynchronousServerCallPoint 的 AsynchronousServerCallResultPoint 的数量:

如果该引用存在,这意味着只有拥有此 AsynchronousServerCallResultPoint 的 RunnableEntity 能够取回此特定 AsynchronousServerCallPoint 异步服务器调用的结果。glyph[floorright]()

请注意,如果 AsynchronousServerCallPoint 未被 AsynchronousServerCallResultPoint 引用,这意味着没有要取回的操作结果,或调用方对结果不感兴趣。

这一信息可能被 RTE 生成器用于优化数据一致性机制。

异步操作调用中对操作结果的阻塞访问:

与表示操作结果访问的 AsynchronousServerCallResultPoint 关联的 AsynchronousServerCallReturnsEvent。

在这种情况下,AsynchronousServerCallReturnsEvent 不应定义对 RunnableEntity 的 startOnEvent 引用。glyph[floorright](RS_SWCT_00200)

与 WaitPoint 结合的 AsynchronousServerCallResultPoint 应属于同一 RunnableEntity:

从 AsynchronousServerCallReturnsEvent 到 AsynchronousServerCallResultPoint 的引用:

7.5.2.2. 提供操作的实现

软件组件可以为服务器 AbstractProvidedPortPrototype 之一的内部每个操作定义一个 OperationInvokedEvent。这样,RunnableEntity 可以通过上文描述的通用事件处理机制响应这样的调用(形式化表达见图 7.28)。

7.5.2.3. 对数据变换错误作出反应

变换器链执行期间发生硬错误:

  • 在 client/server 通信的服务器侧,且重新变换触发服务器 RunnableEntity 的数据;或

  • 在跨 ECU 外部触发通信的触发汇侧,

该服务器 RunnableEntity 或触发汇 RunnableEntity 无法启动,因为重新变换后的数据不可用。glyph[floorright](RS_SWCT_03222)

如果软件组件想对变换器错误作出反应,这对该软件组件可能是问题。

TransformerHardErrorEvent 的语义:

  • 对服务器 PPortPrototype(即由 ClientServerInterface 定义类型)之一的内部每个 ClientServerOperation;或

  • 对触发汇 RPortPrototype(即由 TriggerInterface 定义类型)中的每个 Trigger。

这样,给定的 RunnableEntity 可以定义其对变换器错误的响应。glyph[floorright](RS_SWCT_03222)

7.5.3. RunnableEntity 与外部触发事件通信

7.5.3.1. 触发器源

触发源:

为此,该特定 RunnableEntity 需要一个 ExternalTriggeringPoint,引用 PPortPrototype 中该触发的特定实例。glyph[floorright](RS_SWCT_00200)

属性 externalTriggeringPoint.returnValueProvision 的值:

[constr_1777] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置聚合 ExternalTriggeringPoint。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有受影响的 ExternalTriggeringPoint 必须就属性 returnValueProvision 的配置达成一致。

这一关系以示例方式(就 dataSendPoint.returnValueProvision 的情形)勾勒于图 7.21。

表7.43:ExternalTriggeringPoint(ExternalTriggeringPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::Trigger | | 说明 | If a RunnableEntity owns an ExternalTriggeringPoint it is entitled to raise an ExternalTriggerOccurred Event. | | 基类 | ARObject | | 聚合于 | RunnableEntity.externalTriggeringPoint |

属性 类型 多重性 种类 备注
ident ExternalTriggeringPoint Ident 0..1 aggr The aggregation in the role ident provides the ability to make the ExternalTriggeringPoint identifiable. From the semantical point of view, the ExternalTriggering Point is considered a first-class Identifiable and therefore the aggregation in the role ident shall always exist (until it may be possible to let ModeAccessPoint directly inherit from Identifiable). Stereotypes: atpIdentityContributor Tags: xml.sequenceOffset=-100
trigger Trigger 0..1 iref The trigger taken for the ExternalTriggeringPoint. Tags: xml.namePlural=TRIGGER-IREF xml.roleElement=false xml.roleWrapperElement=true xml.typeElement=true xml.typeWrapperElement=false InstanceRef implemented by: PTriggerInAtomicSwc TypeInstanceRef
7.5.3.2. 触发器汇

触发汇中 RunnableEntity 的激活经由通用事件处理机制实现。

触发汇:

7.5.4. RunnableEntity 与参数访问

在软件组件内提供标定参数有若干方式。

若干 SwComponentType 间共享的标定参数:

软件组件的设计者在设计一个以 DataPrototype 作为输入值的 RunnableEntity 时可以使用这种访问机制:

  • 来自与 ClientServerInterface、SenderReceiverInterface 或 NvDataInterface 关联的任意 RPortPrototype;

  • SwcInternalBehavior 上下文中的 VariableDataPrototype。

该输入值将被送入一个插值例程,其结果可在内部使用,或经由专用 PortPrototype 转移到相邻的 SwComponentPrototype。

通常会有一个专用 RunnableEntity,它在收到输入值时执行,并自身以适当的输入值和适当的 ParameterDataPrototype 调用插值例程。

注意,ParameterAccess 还允许通过访问点特定的 SwDataDefProps 设置输入值或共享坐标轴。

该插值例程调用的结果以 ArgumentDataPrototype 的形式提供,其方向在 ClientServerInterface 中设置为 out 或 inout。

表7.44:ParameterAccess(ParameterAccess)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements | | 说明 | The presence of a ParameterAccess implies that a RunnableEntity needs access to a ParameterData Prototype. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.parameterAccess |

属性 类型 多重性 种类 备注
accessed Parameter AutosarParameterRef 0..1 aggr Reference to the accessed calibration parameter.
swDataDef Props SwDataDefProps 0..1 aggr This allows denote instance and access specific properties, mainly input values and common axis. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps

ParameterAccess . accessedParameter 属性的存在性:

对 ParameterDataPrototype 的访问:

  • 当 RunnableEntity 想从 RPortPrototype 访问它时,通过 ParameterAccess 实体;

  • 通过定义从 RunnableEntity 到 ParameterDataPrototype 的 ParameterAccess 关联,角色为 sharedParameter 或 perInstanceParameter。

glyph[floorright](RS_SWCT_00200)

关于 [TPS_SWCT_01351] 主题的更多信息见图 7.31 以及图 2.3 中从 RunnableEntity 到 ParameterDataPrototype 的下方关联。

注意:角色 constantMemory 中的 ParameterDataPrototype 不由 RTE 提供,因此 ParameterAccess 关联不用于控制 RTE API 生成。

7.5.4.1. InstantiationDataDefProps

通常,特定数据片段的可访问性以及别名等进一步信息在 DataPrototype 层级(尤其是 VariableDataPrototype、ParameterDataPrototype)建模。

但由于元模型关于数据类型的递归结构(ApplicationCompositeDataType 由 DataPrototype 组成),部分相关的 MCD 信息直接在数据类型中描述(在 ApplicationCompositeDataType 的情况下)。

这对数据类型的重用是很大的限制,因为 ApplicationCompositeDataType 应被不同的 VariableDataPrototype 和 ParameterDataPrototype 重用,以保证 C 实现层级上的类型兼容性

(例如 PortPrototype 的数据存储在 PIM 中,或用作 ROM 块的 ParameterDataPrototype 应由与 NVRAM 块相同的数据类型定义类型)。

这一限制由 InstantiationDataDefProps 克服,如图 7.32 所示。

表7.45:InstantiationDataDefProps(InstantiationDataDefProps)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::InstantiationDataDefProps | | 说明 | This is a general class allowing to apply additional SwDataDefProps to particular instantiations of a Data Prototype. Typically the accessibility and further information like alias names for a particular data is modeled on the level of DataPrototypes (especially VariableDataPrototypes, ParameterDataPrototypes). But due to the recursive structure of the meta-model concerning data types (a composite (data) type consists out of data prototypes) a part of the MCD information is described in the data type (in case of Application CompositeDataType). This is a strong restriction in the reuse of data typed because the data type should be re-used for different VariableDataPrototypes and ParameterDataPrototypes to guarantee type compatibility on C-implementation level (e.g. data of a Port is stored in PIM or a ParameterDataPrototype used as ROM Block and shall be typed by the same data type as NVRAM Block). This class overcomes such a restriction if applied properly. | | 基类 | ARObject | | 聚合于 | NvBlockDescriptor.instantiationDataDefProps, ParameterSwComponentType.instantiationDataDefProps, SwcInternalBehavior.instantiationDataDefProps |

属性 类型 多重性 种类 备注
parameter Instance AutosarParameterRef 0..1 aggr This reference identifies the particular DataPrototype (defined in the context of a composite ParameterData Prototype) on which the swDataDefProps shall be applied.
swDataDef Props SwDataDefProps 0..1 aggr These are the particular data definition properties which shall be applied Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps
variableInstance AutosarVariableRef 0..1 aggr This reference identifies the particular DataPrototype (defined in the context of a composite VariableData Prototype) on which the swDataDefProps shall be applied.

InstantiationDataDefProps . swDataDefProps 属性的存在性:

InstantiationDataDefProps 应用的已记录用例见 [TPS_SWCT_01846]、[TPS_SWCT_01847] 和 [TPS_SWCT_01848]。

7.5.5. RunnableEntity 与模式通信

对于 RunnableEntity 之间的模式通信,我们必须区分两种用例。

请求的模式只作为普通数据值发送和接收:

如果接收 RunnableEntity 不直接实现模式切换、而是对模式请求做进一步处理,则使用这一机制。这在跨 ECU 传输模式请求时尤其需要。

在这种情况下,模式经由 sender-receiver 通信传输,因此涉及的 RunnableEntity 只需要与 sender-receiver 通信相同的面向 RTE 的 API 类型。

这是可能的,因为 ModeDeclarationGroupPrototype 可以映射到 ImplementationDataType。glyph[floorright](RS_SWCT_00200)

这一概念以及映射所需的元类在第 4.2.5 章进一步解释。

RunnableEntity 借助相应 RTEEvent 响应模式请求:

在这种情况下,需要面向 RTE 的特殊 API,且 RTE 必须实现实际的模式切换。这种通信只可能在同一 ECU 上的软件组件之间进行。glyph[floorright](RS_SWCT_00200、RS_SWCT_03202)

关于一般概念的进一步解释见第 4.2.5 章,模式切换元模型的细节见第 9 章。

7.6. 端口 API 选项

PortAPIOption:

请注意,元类 PortAPIOption 描绘于图 7.33。

表7.46:PortAPIOption(PortAPIOption)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | Options how to generate the signatures of calls for an AtomicSwComponentType in order to communicate over a PortPrototype (for calls into a RunnableEntity as well as for calls from a Runnable Entity to the PortPrototype). | | 基类 | ARObject | | 聚合于 | SwcInternalBehavior.portAPIOption |

表7.47:PortAPIOption(PortAPIOption)

属性 类型 多重性 种类 备注
enableTake Address Boolean 0..1 attr If set to true, the software-component is able to use the API reference for deriving a pointer to an object.
errorHandling DataTransformation ErrorHandlingEnum 0..1 attr This specifies whether a RunnableEntity accessing a Port Prototype that is referenced by this PortAPIOption shall specifically handle transformer errors or not.
indirectAPI Boolean 0..1 attr If set to true this attribute specifies an "indirect API" to be generated for the associated port which means that the software-component is able to access the actions on a port via a pointer to an object representing a port. This allows e.g. iterating over ports in a loop. This option has no effect for PPortPrototypes of client/server interfaces.
port PortPrototype 0..1 ref The option is valid for generated functions related to communication over this port
portArgValue (ordered) PortDefinedArgument Value * aggr An argument value defined by this port.
supported Feature SwcSupportedFeature * aggr This collection specifies which features are supported by the RunnableEntitys which access a PortPrototype that it referenced by this PortAPIOption.
transformer Status Forwarding DataTransformation StatusForwardingEnum 0..1 attr This attribute specifies whether a RunnableEntity accessing a PortPrototype that is referenced by this Port APIOption shall be able to forward a status code to the transformer chain.

表7.48:DataTransformationErrorHandlingEnum(DataTransformationErrorHandlingEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | This enumeration defines different ways how a RunnableEntity shall handle transformer errors. | | 聚合于 | PortAPIOption.errorHandling |

字面值 说明
noTransformerError Handling A runnable does not handle transformer errors. Tags: atp.EnumerationLiteralIndex=0
transformerError Handling The runnable implements the handling of transformer errors. Tags: atp.EnumerationLiteralIndex=1

PortAPIOption . port 属性的存在性:

数据变换器错误的错误通知:

向数据变换器转发状态:

角色 PortAPIOption.port 应向变换器链提供名为 forwardedCode 的实参。glyph[floorright](RS_SWCT_03040、RS_SWCT_03221)

向数据变换器转发状态的适用性:

表7.49:DataTransformationStatusForwardingEnum(DataTransformationStatusForwardingEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | This enumeration defines different ways how a RunnableEntity shall be able to forward status code into the transformer chain. | | 聚合于 | PortAPIOption.transformerStatusForwarding |

字面值 说明
noTransformer StatusForwarding The RunnableEntity is not able to forward a transformer status code. Tags: atp.EnumerationLiteralIndex=0
transformerStatus Forwarding The RunnableEntity is able to forward a transformer status code. Tags: atp.EnumerationLiteralIndex=1

[TPS_SWCT_03501] 的限制在 E2E 保护数据路由的情况下尤其必要,此时数据源以变换器错误接收、使用 PortAPIOption.errorHandling = transformerErrorHandling。

7.6.1. 允许取地址

enableTakeAddress = true:

通过真正的/原生 C 函数实现(相对于类函数的预处理器宏),从而可以通过其地址(借助函数指针)访问 API 函数。glyph[floorright](RS_SWCT_03040)

该特性的主要焦点是支持限单实例的 AUTOSAR 服务的配置。

enableTakeAddress 限于单实例化:

7.6.2. 间接 API 生成

indirectAPI 选项切换 RTE 间接 API 功能的生成:

7.6.3. 端口定义实参值

RTE 传递给服务器入口点的隐式值的定义:

该特性的最初需求出现在基础软件服务的上下文中——尽管并不限于这些。

对于 NVRAM 管理器这类服务,每个访问端口除其逻辑身份(作为 shortName 序列)之外,还通过 NVRAM 特定的内存块 id 唯一标识。该块 id 应在 ECU 集成的上下文中定义,而不是由客户端组件定义。

可以在逻辑 ClientServerInterface 层级不以形式实参的形式暴露这一机制,而是规定一个或多个 PortDefinedArgumentValue。

值对客户端组件隐藏:

在 NVRAM 管理器的示例中,这允许在 ECU 集成的上下文中定义块 id,而不是由客户端组件定义。

图 7.33 显示 Port API Options 与 portArgValue 的元模型。

PortDefinedArgumentValue 的 valueType 用法:

该规则应在 RTE 生成时施加。

在 NVRAM 示例的 PPortPrototype 情况下,该列表只有一个 int8 或 int16 类型的值,保存内存块 id。

PortDefinedArgumentValue 只应为 AbstractProvidedPortPrototype 定义:

明确地说,这意味着 PortDefinedArgumentValue 不得与 RPortPrototype 一起使用。

表7.50:PortDefinedArgumentValue(PortDefinedArgumentValue)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | A PortDefinedArgumentValue is passed to a RunnableEntity dealing with the ClientServerOperations provided by a given PortPrototype. Note that this is restricted to PPortPrototypes of a ClientServer Interface. | | 基类 | ARObject | | 聚合于 | PortAPIOption.portArgValue |

属性 类型 多重性 种类 备注
value ValueSpecification 0..1 aggr Specifies the actual value.
valueType ImplementationData Type 0..1 tref The implementation type of this argument value. It should not be composite type or a pointer. Stereotypes: isOfType

PortDefinedArgumentValue . value 属性的存在性:

PortDefinedArgumentValue . valueType 属性的存在性:

7.6.4. 支持的特性

历史上,PortAPIOption 经历了若干扩展,这些扩展通常最终成为附加的原始或组合属性。

随着进一步的扩展请求不断到来,重点放在限制 PortAPIOption 整体建模的复杂性上。作为回应,定义了一种新的扩展方法,以保持 PortAPIOption 的周边可控。

特别是,PortAPIOption 在角色 supportedFeature 中聚合抽象元类 SwcSupportedFeature(见图 7.33)。

supportedFeature 的实际聚合将由 SwcSupportedFeature 的具体子类组成。

可以添加 SwcSupportedFeature 的更多子类来添加更多功能,而不增加 PortAPIOption 的建模复杂性,代价是必须拟定附加约束。

表7.51:SwcSupportedFeature(SwcSupportedFeature)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | This meta-class represents a abstract base class for features that can be supported by a RunnableEntity. | | 基类 | ARObject | | 子类 | CommunicationBufferLocking | | 聚合于 | PortAPIOption.supportedFeature |

7.6.4.1. 缓冲区锁定

对锁定通信缓冲区的支持:

CommunicationBufferLocking 的多重性:

只有 returnValueProvision 设置为 returnValueProvided 时才支持缓冲区锁定:

该规则应在合同阶段生成执行时施加。

表7.52:CommunicationBufferLocking(CommunicationBufferLocking)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | The aggregation of this meta-class specifies that a RunnableEntity supports locked communication buffers supplied by the RTE. It is able to cope with the error RTE_E_COM_BUSY. | | 基类 | ARObject , SwcSupportedFeature | | 聚合于 | PortAPIOption.supportedFeature |

属性 类型 多重性 种类 备注
supportBuffer Locking SupportBufferLocking Enum 0..1 attr This attribute is used to indicate the intended buffer locking behavior.

CommunicationBufferLocking . supportBufferLocking 属性的存在性:

表7.53:SupportBufferLockingEnum(SupportBufferLockingEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PortAPIOptions | | 说明 | This enumeration represents the ability to define the buffer locking behavior. | | 聚合于 | CommunicationBufferLocking.supportBufferLocking |

字面值 说明
doesNotSupport BufferLocking Buffer locking is not supported. Tags: atp.EnumerationLiteralIndex=0
supportsBuffer Locking Buffer locking is supported. Tags: atp.EnumerationLiteralIndex=1

7.7. PerInstanceMemory

每实例私有内存:

任意数量的每实例内存块:

属性 supportsMultipleInstantiation == false:

PerInstanceMemory:因为 ECU 上将只有 AtomicSwComponentType 的单一实例,AtomicSwComponentType 可以使用静态变量保存其内部状态。

不过,在这种情况下也允许使用 PerInstanceMemory。glyph[floorright](RS_SWCT_03040)

PerInstanceMemory 的初始化:

7.7.1. 由 'C' 数据类型定义类型的 PerInstanceMemory

由 “C” 数据类型定义类型的 PerInstanceMemory:

该属性允许 RTE 生成一个 API 函数,提供对该数据项方便且类型安全的访问。

此外,软件组件描述应在属性 typeDefinition 中定义该数据类型。该属性应包含有效 C 语法的该数据类型的 C typedef。glyph[floorright](RS_SWCT_03040)

换言之,该 typeDefinition 应拟定得可以原样包含在 C 头文件中。

typeDefinition 属性的一致性:

该规则应在合同阶段生成执行时施加。

由 “C” 数据类型定义类型的 PerInstanceMemory 的初始值:

PerInstanceMemory.typeDefinition 不应包含函数指针:

请注意,尽管 [TPS_SWCT_01574] 拟定得像一条约束、且其陈述确实具有约束性质,但几乎无法实际强制执行该规定,因为 PerInstanceMemory.typeDefinition 的内容是非形式化的(由非特定的即 String 建模)。

因此,相应语义的描述使用了规定条目(specification item)而非约束。

关于这些属性在软件组件头文件生成中使用的更多细节,见 RTE 规范 [2]。

表7.54:PerInstanceMemory(PerInstanceMemory)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::PerInstanceMemory | | 说明 | Defines a 'C' typed memory-block that needs to be available for each instance of the SW-component. This is typically only useful if supportsMultipleInstantiation is set to "true" or if the software-component defines NVRAM access via permanent blocks. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.perInstanceMemory |

属性 类型 多重性 种类 备注
initValue String 0..1 attr Specifies initial value(s) of the PerInstanceMemory
swDataDef Props SwDataDefProps 0..1 aggr This represents the ability to to allocate RAM at specific memory sections, for example, to support the RAM Block recovery strategy by mapping to uninitialized RAM. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps
type CIdentifier 0..1 attr The name of the "C"-type
typeDefinition String 0..1 attr A definition of the type with the syntax of a 'C' typedef.

PerInstanceMemory . type 属性的存在性:

PerInstanceMemory . typeDefinition 属性的存在性:

7.7.2. 由 AUTOSAR 数据类型定义类型的 PerInstanceMemory

由 AUTOSAR 数据类型定义类型的 PerInstanceMemory:

VariableDataPrototype 派生自 DataPrototype,后者具有到 AutosarDataType 的关联。glyph[floorright]()

这定义了 AUTOSAR 类型 PerInstanceMemory 的数据类型。

由 AUTOSAR 数据类型定义类型的 PerInstanceMemory 的初始值:

由 AUTOSAR 数据类型定义类型与由 C 数据类型定义类型的对照:

关于测量相关性的更多信息请参阅第 5.4.3 章。坐标轴输入值定义的方面在第 5.4.5 章解释。

注意:由于使用了 AutosarDataType,AUTOSAR 类型的 PerInstanceMemory 无法直接支持 C++ 特有类型或指针类型。

7.8. 静态内存与常量内存

描述静态与常量内存:

这包括测量与标定的特殊情况,也包括调试。

使用静态与常量内存支持测量与标定:

专有生成器应出于生成 A2L 的目的处理这些数据。glyph[floorright](RS_SWCT_03040)

请注意,“测量与标定” 主题在第 2.2 章讨论。

静态与常量内存不由 RTE 实例化:

这通过避免 RTE 组件数据结构引起的附加间接层,实现更高效的实现(尤其对以目标代码提供的软件组件)。

此外,这种内存减少了软件组件实现对生成 RTE 代码的依赖,这对安全相关功能是有利的。

由于内存由软件组件的实现实例化,constantMemory 的行为类似 sharedParameter(见第 2.2.3.2 章)。

staticMemory 限于单实例化:

该约束防止同一 SwComponentType 的 SwComponentPrototype 之间的隐藏通信。

constantMemory 与 staticMemory 的 shortName:

7.9. 包含的 AUTOSAR 数据类型

IncludedDataTypeSet:

(这些 AutosarDataType 成为……)软件组件的契约的一部分。glyph[floorright](RS_SWCT_03040)

如果 AutosarDataType 未用于任何 DataPrototype 则必选:

这支持 AUTOSAR 数据类型系统对 RTE 提供的内存对象和软件组件实现声明的内存对象的通用用法。

此外,这使得能够在已知 ECU 专用端口的数据类型用法之前,为 AUTOSAR 服务生成包含 C-API 所需数据类型的 RTE 应用类型头文件。

表7.55:IncludedDataTypeSet(IncludedDataTypeSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::IncludedDataTypes | | 说明 | An includedDataTypeSet declares that a set of AutosarDataType is used by a basic software module or a software component for its implementation and the AutosarDataType becomes part of the contract. This information is required if the AutosarDataType is not used for any DataPrototype owned by this software component or if the enumeration literals, lowerLimit and upperLimit constants shall be generated with a literalPrefix. The optional literalPrefix is used to add a common prefix on enumeration literals, lowerLimit and upper Limit constants created by the RTE. | | 基类 | ARObject | | 聚合于 | BswInternalBehavior.includedDataTypeSet, SwcInternalBehavior.includedDataTypeSet |

属性 类型 多重性 种类 备注
dataType AutosarDataType * ref AutosarDataType belonging to the includedDataTypeSet
literalPrefix Identifier 0..1 attr LiteralPrefix defines a common prefix for all AutosarData Types of the includedDataTypeSet to be added on enumeration literals, lowerLimit and upperLimit constants created by the RTE.

IncludedDataTypeSet 的属性 literalPrefix:

7.10. 包含的模式声明组

IncludedModeDeclarationGroupSet:

表7.56:IncludedModeDeclarationGroupSet(IncludedModeDeclarationGroupSet)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ModeDeclarationGroup | | 说明 | An IncludedModeDeclarationGroupSet declares that a set of ModeDeclarationGroups used by the software component for its implementation and consequently these ModeDeclarationGroups become part of the contract. | | 基类 | ARObject | | 聚合于 | BswInternalBehavior.includedModeDeclarationGroupSet, SwcInternalBehavior.includedModeDeclaration GroupSet |

属性 类型 多重性 种类 备注
mode Declaration Group ModeDeclarationGroup * ref This represents the referenced ModeDeclarationGroup.
prefix Identifier 0..1 attr The prefix shall be used by the RTE generator as a prefix for the creation of symbols related to the referenced ModeDeclarationGroups, e.g RTE_TRANSITION_.

IncludedModeDeclarationGroupSet 的属性 prefix:

依据:如果属性 prefix 是必需的,则可能需要更改软件组件源代码。

7.11. 服务需求

7.11.1. 概述

ApplicationSwComponentType 独立于实际 ECU 硬件:

不过,每个软件组件可能需要由 ECU 基础软件通过 AUTOSAR 服务提供的服务。

ServiceNeeds:

注意,只有 AtomicSwComponentType 和 NvBlockSwComponentType 能连接到 AUTOSAR 服务。glyph[floorright](RS_SWCT_02060)

请注意,一些 ServiceNeeds 展示于图 7.38、13.16、13.13 和 13.18。

ECU 配置参数的实际值满足 ServiceNeeds 给出的要求:

注意,配置参数的实际值还将取决于该特定 ECU 的基础软件和硬件的属性,另见第 11 章。

关于 ServiceNeeds 与 ECU 配置参数关系的更多信息见 [33]。

元类 ServiceNeeds 及若干服务的子类位于元模型的 CommonStructure 包中,因为它们也用于《基础软件模块描述模板》[6]。

ServiceNeeds 子类的语义在第 13 章的相应小节解释。

表7.57:ServiceNeeds(ServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This expresses the abstract needs that a Software Component or Basic Software Module has on the configuration of an AUTOSAR Service to which it will be connected. "Abstract needs" means that the model abstracts from the Configuration Parameters of the underlying Basic Software. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 子类 | BswMgrNeeds, ComMgrUserNeeds, CryptoKeyManagementNeeds, CryptoServiceJobNeeds, Crypto ServiceNeeds, DiagnosticCapabilityElement , DltUserNeeds, DoIpServiceNeeds , EcuStateMgrUser Needs, ErrorTracerNeeds, FunctionInhibitionAvailabilityNeeds, FunctionInhibitionNeeds, Global SupervisionNeeds, HardwareTestNeeds, IdsMgrCustomTimestampNeeds, IdsMgrNeeds, IndicatorStatus Needs, J1939DcmDm19Support, J1939RmIncomingRequestServiceNeeds, J1939RmOutgoingRequest ServiceNeeds, NvBlockNeeds, SecureOnBoardCommunicationNeeds, SupervisedEntityCheckpoint Needs, SupervisedEntityNeeds, SyncTimeBaseMgrUserNeeds, V2xDataManagerNeeds, V2xFacUser Needs, V2xMUserNeeds, VendorSpecificServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

请注意,元类 ServiceNeeds 的绝大多数子类与 AUTOSAR 服务的标准化行为相关联。不过,也存在需要用户特定行为的情况,为此提供了特定形式的 ServiceNeeds。

VendorSpecificServiceNeeds 的用法:

表7.58:VendorSpecificServiceNeeds(VendorSpecificServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This represents the ability to define vendor-specific service needs. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表7.59:VendorSpecificServiceNeeds(VendorSpecificServiceNeeds)

7.11.2. 服务需求到端口和数据的指派

ServiceNeeds 在 SwcInternalBehavior 的范围内定义:

在大多数情况下,它们与属于 AtomicSwComponentType 的某些 PortPrototype 相关,因为 AtomicSwComponentType 借助这些 PortPrototype 与 AUTOSAR 服务通信。glyph[floorright](RS_SWCT_02060)

此外,ServiceNeeds 元素还可以与同一 SwcInternalBehavior 内声明的一些数据有关系,即 NVRAM 服务的某些用例需要单一软件组件上下文中声明的永久 RAM 块和/或 ROM 块。

另一个用例要求 ServiceNeeds 元素链接到 PortGroup。特别是,ServiceNeeds 可以表示一组 PortPrototype,作为配置通信管理器的输入,以处理这些 PortPrototype 的通信状态。

这些与 PortPrototype、数据和 PortGroup 的关系是工具的必要输入,用于生成实现该服务的基础软件的 XML 描述与配置——多个 AtomicSwComponentType 的需求集成在一个 ECU 上,见第 11 章。

与 PortPrototype 的关系经由元类 RoleBasedPortAssignment 定义,与数据的关系经由元类 RoleBasedDataAssignment 定义。

表7.60:RoleBasedPortAssignment(RoleBasedPortAssignment)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServiceMapping | | 说明 | This class specifies an assignment of a role to a particular service port (RPortPrototype or PPort Prototype) of an AtomicSwComponentType. With this assignment, the role of the service port can mapped to a specific ServiceNeeds element, so that a tool is able to create the correct connector. | | 基类 | ARObject | | 聚合于 | NvBlockDescriptor.clientServerPort, SwcServiceDependency.assignedPort |

表7.61:RoleBasedPortAssignment(RoleBasedPortAssignment)

属性 类型 多重性 种类 备注
portPrototype PortPrototype 0..1 ref Service PortPrototype used in the assigned role. This PortPrototype shall either belong to the same AtomicSw ComponentType as the SwcInternalBehavior which owns the ServiceDependency or to the same NvBlockSw ComponentType as the NvBlockDescriptor.
role Identifier 0..1 attr This is the role of the assigned Port in the given context. The value shall be a shortName of the Blueprint of a Port Interface as standardized in the Software Specification of the related AUTOSAR Service.

两者都聚合一个属性 role,允许定义 PortPrototype 或数据在特定上下文中的角色。

SwcServiceDependency 只应为服务端口定义:

该规则不适用于被 RoleBasedPortAssignment 引用的 PortPrototype,其中属性 role 设置为以下任一值:

  • NvMService;

  • NvMNotifyJobFinished;

  • NvMNotifyInitBlock;

  • NvMAdmin;

  • NvMMirror;

  • NvDataPort。

此外,该规则不适用于 [TPS_SWCT_01579]、[TPS_SWCT_01831]、[TPS_SWCT_01580] 和 [TPS_SWCT_01572] 中描述的情况。glyph[floorright]()

ServiceNeeds 元素与其各种关系之间的实际映射由元类 SwcServiceDependency 提供,如图 7.40 所示。

注意与 PortPrototype 和与 PortGroup 关联的区别:RoleBasedPortAssignment 是 SwcInternalBehavior 的一部分,而 PortGroup 为 SwComponentType 定义(因此属于 VFB 层级),并与其他 SwComponentType 的 PortGroup 链接。

这意味着 PortGroup 表示系统特性,而 RoleBasedPortAssignment 是用于与 AUTOSAR 服务通信的本地特性。

表7.62:RoleBasedDataAssignment(RoleBasedDataAssignment)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This class specifies an assignment of a role to a particular data object in either • the SwcInternalBehavior of a software component (or in the BswInternalBehavior of a BSW module or BSW cluster) in the context of an AUTOSAR Service or • an NvBlockDescriptor to sort out the assignment of event-based writing strategies to data elements in a PortPrototype. With this assignment, the role of the data can be mapped to a DataPrototype that is used in the context of the definition of a specific ServiceNeeds or NvBlockDescriptor, so that a tool is able to create the correct access or writing strategy. | | 基类 | ARObject | | 聚合于 | BswServiceDependency.assignedData, NvBlockDescriptor.writingStrategy, SwcServiceDependency. assignedData |

属性 类型 多重性 种类 备注
role Identifier 0..1 attr This is the role of the assigned data in the given context. Possible values need to be specified on M1 level. Additionally the TPS Software Component Template provides a list of applicable roles for various service dependencies and service use cases in chapter 13 "Service Dependencies and Service Use Cases" (e.g., ramBlock in case of the needs for a permanent RAM block).
usedData Element AutosarVariableRef 0..1 aggr The VariableDataPrototype used in this role, e.g. • Permanent RAM Block of an NVRAM Block which shall belong to the same SwcInternalBehavior or Bsw InternalBehavior. • In the role signalBasedDiagnostics it has to refer to a VariableDataPrototype in a SenderReceiverInterface or a NvDataInterface.
usedParameter Element AutosarParameterRef 0..1 aggr The ParameterDataPrototype used in this role, e.g. • ROM Block of an NVRAM Block. It shall belong to the same SwcInternalBehavior or BswInternalbehavior. • In the role signalBasedDiagnostics it has to refer to a ParameterDataPrototype in a ParameterInterface.
usedPim PerInstanceMemory 0..1 ref The (untyped) PerInstanceMemory used in this role (e.g. as a Permanent RAM Block for an NVRAM Block).

设置 RoleBasedPortAssignment.role 的规则:

(拥有该 PortInterface 的)ARPackage 设置为 BLUEPRINT,且最高层 ARPackage.shortName 设置为 AUTOSAR,另见 [29]。glyph[floorright](RS_SWCT_02060)

标准保留的 SwcServiceDependency.category 值:

SERVICE:适用于 SwcServiceDependency 打算用于 ServiceSwComponentType 设计的所有情况。

NV_BLOCK_COMPONENT:适用于 SwcServiceDependency 打算用于 NvBlockSwComponentType 设计的情况。

glyph[floorright](RS_SWCT_02060)

表7.63:SwcServiceDependency(SwcServiceDependency)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServiceMapping | | 说明 | Specialization of ServiceDependency in the context of an SwcInternalBehavior. It allows to associate ports, port groups and (in special cases) data defined for an atomic software component to a given ServiceNeeds element. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable , ServiceDependency | | 聚合于 | AdaptiveSwcInternalBehavior.serviceDependency, AtpClassifier .atpFeature, SwcInternalBehavior. serviceDependency |

属性 类型 多重性 种类 备注
assignedData RoleBasedData Assignment * aggr Defines the role of an associated data object of the same component. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=assignedData, assignedData.variation Point.shortLabel vh.latestBindingTime=preCompileTime
assignedPort RoleBasedPort Assignment * aggr Defines the role of an associated port of the same component. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=assignedPort, assignedPort.variation Point.shortLabel vh.latestBindingTime=preCompileTime
Class SwcServiceDependency
representedPort Group PortGroup 0..1 ref This reference specifies an association between the ServiceNeeeds and a PortGroup, for example to request a communication mode which applies for communication via these ports. The referred PortGroup shall be local to this atomic SWC, but via the links between the Port Groups, a tool can evaluate this information such that all the ports linked via this port group on the same ECU can be found.
serviceNeeds ServiceNeeds 0..1 aggr The associated ServiceNeeds.

表7.64:ServiceDependency(ServiceDependency)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Collects all dependencies of a software module or component on an AUTOSAR Service related to a specific item (e.g. an NVRAM Block, a diagnostic event etc.). It defines the quality of service (Service Needs) of this item as well as (optionally) references to additional elements. This information is required for tools in order to generate the related basic software configuration and ServiceSwComponentTypes. | | 基类 | ARObject | | 子类 | BswServiceDependency, SwcServiceDependency |

属性 类型 多重性 种类 备注
assignedData Type RoleBasedDataType Assignment 0..1 aggr This is the role of the assignment data type in the given context. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=assignedDataType, assignedData Type.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
diagnostic Relevance ServiceDiagnostic RelevanceEnum 0..1 attr If this attribute indicates a relevance for diagnostics then the integrator has a much easier time identifying the candidates for the configuration of the diagnostic stack. Example: identification of mode conditions (e.g. communication between application and BswM) relevant for the Dcm.
symbolicName Props SymbolicNameProps 0..1 aggr This attribute can be taken to contribute to the creation of symbolic name values.

表7.65:ServiceDiagnosticRelevanceEnum(ServiceDiagnosticRelevanceEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration provides values to describe the diagnostic relevance of a SwcServiceDependency (specifically if the aggregated ServiceNeeds itself does not indicate a relevance for diagnostics). | | 聚合于 | ServiceDependency .diagnosticRelevance |

字面值 说明
isNotRelevant This value indicates that a relevance for diagnostics does not exist. Tags: atp.EnumerationLiteralIndex=0
isRelevant This value indicates a relevance for diagnostics. Tags: atp.EnumerationLiteralIndex=1

表7.66:SymbolicNameProps(SymbolicNameProps)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class can be taken to contribute to the creation of symbolic name values. | | 基类 | ARObject , ImplementationProps , Referrable | | 聚合于 | ServiceDependency .symbolicNameProps |

SwcServiceDependency.category 的默认值:

表7.67:RoleBasedDataTypeAssignment(RoleBasedDataTypeAssignment)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ServiceMapping | | 说明 | This class specifies an assignment of a role to a particular data type of a software component (or in the BswModuleBehavior of a module or cluster) in the context of an AUTOSAR Service. With this assignment, the role of the data type can be mapped to a specific ServiceNeeds element, so that a tool is able to create the correct access. | | 基类 | ARObject | | 聚合于 | ServiceDependency .assignedDataType |

属性 类型 多重性 种类 备注
role Identifier 0..1 attr This is the role of the associated data type in the given context.
used Implementation DataType ImplementationData Type 0..1 ref This represents the associated ImplementationDataType.

RoleBasedDataTypeAssignment . usedImplementationDataType 属性的存在性:

请注意,存在现有 ServiceInterface 的粒度与现有 SwcServiceDependency.serviceNeeds 粒度不匹配的情况。

换言之,存在覆盖不同种类 ServiceNeeds 语义的服务接口。一个例子是 ClientServerInterface DataServices_{Data},它基本支持对诊断值的访问以及同一值的 I/O 控制。

图 7.44 提供了这种情况建模设想的图形勾勒。

SwcServiceDependency 与 PortPrototype 的关系:

如图 7.44 所示,存在两个潜在竞争的 SwcServiceDependency,都可以贡献其 shortName 来填充 DataServices_{Data} 的后缀。

在这种情况下,实际上需要通过 AUTOSAR 标准的规定来解决 “shortName 供给过剩” 的问题。[TPS_SWCT_01691] 就是为这一目的而设立的。

[TPS_SWCT_01689] 适用的另一个现实例子是:AtomicSwComponentType 暴露一个由 SenderReceiverInterface 定义类型的 PPortPrototype,且该 PPortPrototype 内的 dataElement 既作为诊断值访问(见第 13.8.4.3 章),又用于向 BswM 发送模式请求(见第 13.6.4 章)。

注意,在这种情况下不需要关于受影响 SwcServiceDependency 的 shortName 的规定,因为适用的 SenderReceiverInterface 未标准化,不需要从现有模型分配名称后缀。

为供应商特定服务使用 SwcServiceDependency:

ServiceDependency.diagnosticRelevance 的语义:

ServiceDependency.diagnosticRelevance 用法的一个例子是应用软件与 BswM 之间的通信,即在聚合 BswMgrNeeds 的 SwcServiceDependency 的上下文中。这种通信可能与 Dcm 中所谓 “模式条件” 的配置相关。

请注意,该属性的建模非常通用,可以应用于每一种可预见的服务配置。不过,唯一实际相关的已知用例是前述应用软件与 BswM 之间的通信。

为了不给未知领域的无节制使用打开大门(尽管这些领域以后可能逐个用例地探索),ServiceDependency.diagnosticRelevance 的使用适用一些限制,如 [constr_10032] 所记录。

ServiceDependency.diagnosticRelevance 使用的限制:

7.12. 变体点代理

VariationPointProxy:

  • 结构变体点影响结构化模型元素的存在与否。结构变体点借助元类 VariationPoint 建模。

  • 功能变体点只影响软件组件实现(读作:源代码)中的功能。功能变体点借助元类 VariationPointProxy 建模。

换言之,这使软件组件的开发者能够实现限于软件组件功能的变体。这种变体的解析方式为:

  • 由代码生成器(bindingTime = codeGenerationTime);

  • 由预处理器(bindingTime = preCompileTime);

  • 作为标定后值求值(在这种情况下 postBuildValueAccess 和 postBuildVariantCondition 应存在)。

glyph[floorright](RS_SWCT_03100)

表7.68:VariationPointProxy(VariationPointProxy)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::VariantHandling | | 说明 | The VariationPointProxy represents variation points of the C/C++ implementation. In case of bindingTime = compileTime the RTE provides defines which can be used for Pre Processor directives to implement compileTime variability. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | BswInternalBehavior.variationPointProxy, SwcInternalBehavior.variationPointProxy |

属性 类型 多重性 种类 备注
conditionAccess ConditionByFormula 0..1 aggr This condition acts as Binding Function for the Variation Point.
implementation DataType AbstractImplementation DataType 0..1 ref This association to ImplementationDataType shall be taken as an implementation hint by the RTE generator.
postBuildValue Access PostBuildVariant Criterion 0..1 ref This represents the applicable PostBuildVariantCriterion in the context of a VariationPointProxy. Note that the technical details how to access the particular postBuildValueAccess are still considered internal to the RTE and are consequently not standardized.
postBuildVariant Condition PostBuildVariant Condition * aggr This represents that applicable PostBuoldVariant Condition in the context of aVariationPointProxy.
valueAccess AttributeValueVariation Point 0..1 aggr This value acts as Binding Function for the VariationPoint.

表7.69:ConditionByFormula(ConditionByFormula)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This class represents a condition which is computed based on system constants according to the specified expression. The expected result is considered as boolean value. The result of the expression is interpreted as a condition. • "0" represents "false"; • a value other than zero is considered "true" | | 基类 | ARObject , FormulaExpression , SwSystemconstDependentFormula | | 聚合于 | VariationPoint.swSyscond, VariationPointProxy.conditionAccess |

属性 类型 多重性 种类 备注
bindingTime BindingTimeEnum 1 attr This attribute specifies the point in time when condition may be evaluated at earliest. At this point in time all referenced system constants shall have a value. Tags: xml.attribute=true

表7.70:PostBuildVariantCriterion(PostBuildVariantCriterion)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This class specifies one particular PostBuildVariantSelector. Tags: atp.recommendedPackage=PostBuildVariantCriterions | | 基类 | ARElement , ARObject , AtpDefinition , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
compuMethod CompuMethod 1 ref The compuMethod specifies the possible values for the variant criterion serving as an enumerator.

表7.71:PostBuildVariantCondition(PostBuildVariantCondition)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This class specifies the value which shall be assigned to a particular variant criterion in order to bind the variation point. If multiple criterion/value pairs are specified, they shall all match to bind the variation point. In other words binding can be represented by (criterion1 == value1) && (condition2 == value2) ... | | 基类 | ARObject | | 聚合于 | VariationPoint.postBuildVariantCondition, VariationPointProxy.postBuildVariantCondition |

属性 类型 多重性 种类 备注
matching Criterion PostBuildVariant Criterion 1 ref This is the criterion which needs to match the value in order to make the PostbuildVariantCondition to be true.
value Integer 1 attr This is the particular value of the post-build variant criterion. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

请注意,在 [TPS_SWCT_01370] 第二个列表的前两种情况下,conditionAccess 的求值应以结果替换该公式。

VariationPointProxy 这一名称的由来是:它表示的模型元素与结构无直接关系、而与代码相关,从这个角度看它充当代码中现存功能变体的代理。

这两个抽象层级的结果是:(从模型处理的角度看)可能把所有结构变体点完全绑定,同时让部分或全部功能变体点保持未绑定。这就是 [TPS_SWCT_01371] 存在的原因。

VariationPointProxy 与 VariationPoint 的对照:

尽管如此,变体的绑定借助 SwSystemconstantValueSet 和 PostBuildVariantCriterionValueSet 描述。

VariationPointProxy 的 category 预定义值:

  • VALUE:在 “标定前” 情况下,这意味着 valueAccess 应产生整数字面量。而在 “标定后” 情况下,这意味着 postBuildValueAccess 应产生符合 implementationDataType 的整数值。

在此上下文中,适用 [constr_1388]。

  • CONDITION:在这种情况下,(虽非强制)可以定义一个实际在 “标定前” 与 “标定后” 场景组合中工作的 VariationPointProxy。

换言之,在 “标定前” 情况下 conditionAccess 应产生布尔值,在 “标定后” 情况下 postBuildVariantCondition 也应产生布尔值。

应对 conditionAccess 返回的所有布尔值以及 postBuildVariantCondition 的集合应用 and 运算符,以产生该条件的实际结果。适用 [TPS_GST_00259] 和 [SWS_Rte_08069]。

对 postBuildVariantCondition,应假定到平台数据类型 boolean 的隐式引用。

与值 VALUE 相反,可以定义同时使用 conditionAccess 和 postBuildVariantCondition 的 VariationPointProxy。

category 为 VALUE 的 VariationPointProxy 不应混合 “标定前” 与 “标定后” 用例:

该规则应在合同阶段生成执行时施加。

VariationPointProxy.implementationDataType 的 category 值的限制:

VariationPointProxy.implementationDataType 应为 category VALUE,或为 TYPE_REFERENCE——在所有引用解析之后产生 category 为 VALUE 的 ImplementationDataType。

该规则应在合同阶段生成执行时施加。

bindingTime = preCompileTime:

宏定义的生成蕴含创建指示宏上下文中定义的常量值类型的后缀(例如 “u” 表示 “unsigned”)。在需要遵守 MISRA [34] 规则的地方尤其重要。

根据 AUTOSAR 公式语言的定义(见《通用结构模板》[11]),公式表达式产生的数值不会带有澄清与常量值关联的数据类型的后缀。

因此,一般需要在公式表达式产生的值与 ImplementationDataType 之间提供形式化关联,后者能提供关于在特定情况下应适用后缀的信息。

bindingTime 设置为 preCompileTime 时引用 VariationPointProxy.implementationDataType 的可选存在:

为更澄清起见,关于后缀的实际信息应从 ImplementationDataType.swDataDefProps.baseType.baseTypeDefinition.baseTypeEncoding 与 baseTypeSize 的值派生。

表7.72:AttributeValueVariationPoint(AttributeValueVariationPoint)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling::AttributeValueVariationPoints | | 说明 | This class represents the ability to derive the value of the Attribute from a system constant (by Sw SystemconstDependentFormula). It also provides a bindingTime. | | 基类 | ARObject , FormulaExpression , SwSystemconstDependentFormula | | 子类 | AbstractEnumerationValueVariationPoint , AbstractNumericalVariationPoint , BooleanValueVariationPoint, FloatValueVariationPoint, IntegerValueVariationPoint, PositiveIntegerValueVariationPoint, TimeValue ValueVariationPoint, UnlimitedIntegerValueVariationPoint | | 聚合于 | VariationPointProxy.valueAccess |

属性 类型 多重性 种类 备注
bindingTime BindingTimeEnum 0..1 attr This is the binding time in which the attribute value needs to be bound. If this attribute is missing, the attribute is not a variation point. In particular this means that It needs to be a single value according to the type specified in the pure model. It is an error if it is still a formula. Tags: xml.attribute=true
blueprintValue String 0..1 attr This represents a description that documents how the value shall be defined when deriving objects from the blueprint. Tags: xml.attribute=true
sd String 0..1 attr This special data is provided to allow synchronization of Attribute value variation points with variant management systems. The usage is subject of agreement between the involved parties. Tags: xml.attribute=true
shortLabel PrimitiveIdentifier 0..1 attr This allows to identify the variation point. It is also intended to allow RTE support for CompileTime Variation points. Tags: xml.attribute=true

RTE 生成器应求值 SwSystemconstDependentFormula:

关于 VariationPointProxy 的存在对 RTE 影响的进一步细节(超出 [TPS_SWCT_01372] 和 [TPS_SWCT_01373] 的陈述),请参阅 [2]。

请注意,元类 VariationPointProxy 属性的使用并非任意可行,而是受条件约束。特别是,某些用例规定了 VariationPointProxy 的属性应以何种方式、何种多重性使用。

特别是,适用的用例由绑定时间(即 PreBuild——所有标定前绑定时间归纳为 PreBuild——与 PostBuild)的组合以及 VariationPointProxy.category 的值定义(细节分别在 [constr_1253] 中解释)。

依据适用绑定时间与 VariationPointProxy.category 值的 VariationPointProxy 属性的允许多重性:

| BindingTime | category |

| PreBuild | VALUE | | PreBuild | CONDITION | | PostBuild | VALUE | | PostBuild | CONDITION |

该规则应在合同阶段生成执行时施加。

为澄清起见,[constr_1253] 所含表的给定行中未明确提及的元类 VariationPointProxy 属性的多重性应解释为 [0]。

8. 实现

本文档的先前版本包含元类 Implementation 的全面描述。该元类仍然存在,但其内容的大部分描述已移至另一文档,特别是《基础软件模块描述模板》规范 [6]。

请注意,《软件组件模板》与《基础软件模块描述模板》共享 Implementation 的内容。不过,Implementation 的语义更接近《基础软件模块描述模板》。

尽管如此,仍有内容与《软件组件模板》严格相关。Implementation 的这一部分(由 SwcImplementation 组成,见图 8.1)保留在本文档中。

表8.1:Implementation(Implementation)

| 包 | | | 说明 | Description of an implementation a single software component or module. | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 子类 | BswImplementation, SwcImplementation | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
Class Implementation (abstract)
buildAction Manifest BuildActionManifest 0..1 ref A manifest specifying the intended build actions for the software delivered with this implementation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=buildActionManifest.buildActionManifest, buildActionManifest.variationPoint.shortLabel vh.latestBindingTime=codeGenerationTime
codeDescriptor Code * aggr Specifies the provided implementation code.
compiler Compiler * aggr Specifies the compiler for which this implementation has been released
generated Artifact DependencyOnArtifact * aggr Relates to an artifact that will be generated during the integration of this Implementation by an associated generator tool. Note that this is an optional information since it might not always be in the scope of a single module or component to provide this information. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=generatedArtifact.shortName, generated Artifact.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
hwElement HwElement * ref The hardware elements (e.g. the processor) required for this implementation.
linker Linker * aggr Specifies the linker for which this implementation has been released.
mcSupport McSupportData 0..1 aggr The measurement & calibration support data belonging to this implementation. The aggregtion is <> because in case of an already exisiting BSW Implementation model, this description will be added later in the process, namely at code generation time. Stereotypes: atpSplitable Tags: atp.Splitkey=mcSupport
programming Language Programminglanguage Enum 0..1 attr Programming language the implementation was created in.
requiredArtifact DependencyOnArtifact * aggr Specifies that this Implementation depends on the existance of another artifact (e.g. a library). This aggregation of DependencyOnArtifact is subject to variability with the purpose to support variability in the implementations. Different algorithms in the implementation might cause different dependencies, e.g. the number of used libraries. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredArtifact.shortName, required Artifact.variationPoint.shortLabel
required GeneratorTool DependencyOnArtifact * aggr Relates this Implementation to a generator tool in order to generate additional artifacts during integration. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredGeneratorTool.shortName, required GeneratorTool.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
resource Consumption ResourceConsumption 0..1 aggr All static and dynamic resources for each implementation are described within the ResourceConsumption class. Stereotypes: atpSplitable Tags: atp.Splitkey=resourceConsumption.shortName
Class Implementation (abstract)
swcBsw Mapping SwcBswMapping 0..1 ref This allows a mapping between an SWC and a BSW behavior to be attached to an implementation description (for AUTOSAR Service, ECU Abstraction and Complex Driver Components). It is up to the methodology to define whether this reference has to be set for the Swc- or Bsw Implementtion or for both.
swVersion RevisionLabelString 0..1 attr Software version of this implementation. The numbering contains three levels (like major, minor, patch), its values are vendor specific.
usedCode Generator String 0..1 attr Optional: code generator used.
vendorId PositiveInteger 0..1 attr Vendor ID of this Implementation according to the AUTOSAR vendor list

表8.2:ProgramminglanguageEnum(ProgramminglanguageEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | Programming language the implementation was created in. | | 聚合于 | Implementation .programmingLanguage |

字面值 说明
c C language Tags: atp.EnumerationLiteralIndex=0
cpp C++ language Tags: atp.EnumerationLiteralIndex=1
java Java language Tags: atp.EnumerationLiteralIndex=2

表8.3:Compiler(Compiler)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | Specifies the compiler attributes. In case of source code this specifies requirements how the compiler shall be invoked. In case of object code this documents the used compiler settings. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | Implementation .compiler |

属性 类型 多重性 种类 备注
name String 0..1 attr Compiler name (like gcc).
options String 0..1 attr Specifies the compiler options.
vendor String 0..1 attr Vendor of compiler.
version String 0..1 attr Exact version of compiler executable.

表8.4:Linker(Linker)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | Specifies the linker attributes used to describe how the linker shall be invoked. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | Implementation .linker |

属性 类型 多重性 种类 备注
name String 0..1 attr Linker name.
options String 0..1 attr Specifies the linker options.
vendor String 0..1 attr Vendor of linker.
version String 0..1 attr Exact version of linker executable.

Implementation . swVersion 属性的存在性:

Implementation . vendorId 属性的存在性:

Implementation . codeDescriptor 属性的存在性:

表8.5:Code(Code)

| 包 | M2::AUTOSARTemplates::CommonStructure::Implementation | | 说明 | A generic code descriptor. The type of the code (source or object) is defined via the category attribute of the associated engineering object. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | Implementation .codeDescriptor |

属性 类型 多重性 种类 备注
artifact Descriptor AutosarEngineering Object * aggr Refers to the artifact belonging to this code descriptor.
callbackHeader ServiceNeeds * ref The association callbackHeader describes in which header files the function declarations of callback functions are provided to a service module. With this information the service module can include the appropriate header files in its configuration files.

表8.6:AutosarEngineeringObject(AutosarEngineeringObject)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::EngineeringObject | | 说明 | This denotes an engineering object being part of the process. It is a specialization of the abstract class EngineeringObject for usage within AUTOSAR. | | 基类 | ARObject , EngineeringObject | | 聚合于 | AclObjectSet.engineeringObject, BuildActionEntity .deliveryArtifact, Code.artifactDescriptor, Dependency OnArtifact.artifactDescriptor |

表8.7:AutosarEngineeringObject(AutosarEngineeringObject)

表8.8:SwcImplementation(SwcImplementation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcImplementation | | 说明 | This meta-class represents a specialization of the general Implementation meta-class with respect to the usage in application software. Tags: atp.recommendedPackage=SwcImplementations | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , Implementation , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
behavior SwcInternalBehavior 0..1 ref The internal behavior implemented by this Implementation.
perInstance MemorySize PerInstanceMemory Size * aggr Allows a definition of the size of the per-instance memory for this implementation. The aggregation of PerInstance MemorySize is subject to variability with the purpose to support variability in the software components implementations. Typically different algorithms in the implementation are requiring different number of memory objects, in this case PerInstanceMemory. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=perInstanceMemorySize, perInstance MemorySize.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
required RTEVendor String 0..1 attr Identify a specific RTE vendor. This information is potentially important at the time of integrating (in particular: linking) the application code with the RTE. The semantics is that (if the association exists) the corresponding code has been created to fit to the vendor-mode RTE provided by this specific vendor. Attempting to integrate the code with another RTE generated in vendor mode is in general not possible.

SwcImplementation . behavior 属性的存在性:

表8.9:PerInstanceMemorySize(PerInstanceMemorySize)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcImplementation | | 说明 | Resources needed by the allocation of PerInstanceMemory for each SWC instance. Note that these resources are not covered by an ObjectFileSection, because they are supposed to be allocated by the RTE. | | 基类 | ARObject | | 聚合于 | SwcImplementation.perInstanceMemorySize |

表8.10:PerInstanceMemorySize(PerInstanceMemorySize)

属性 类型 多重性 种类 备注
alignment PositiveInteger 0..1 attr Required alignment (1,2,4,...) of the referenced Per InstanceMemory. Unit: byte.
perInstance Memory PerInstanceMemory 0..1 ref This represents the referenced PerInstanceMemory.
size PositiveInteger 0..1 attr Size (in bytes) of the reference perInstanceMemory. The aggregation of PerInstanceMemorySize is subject to variability with the purpose to support variability in the software components implementations. Different algorithms in the implementation might require a different PerInstanceMemorySize. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

PerInstanceMemorySize . alignment 属性的存在性:

PerInstanceMemorySize . perInstanceMemory 属性的存在性:

PerInstanceMemorySize . size 属性的存在性:

9. 模式管理

一般而言,《软件组件模板》不显式定义状态管理器或软件组件应支持的模式种类。不过,《软件组件模板》提供了描述模式的通用机制。

本节讨论模式、接口与软件组件之间的一般关系。

从软件组件的角度看,假定状态管理器使用标准化的 AUTOSAR PortInterface 来影响 SwComponentType,并且还提供一个 PortInterface 以获取来自 SwComponentType 的请求与确认。

它们将实现为 AUTOSAR 服务,并成为每个 ECU 上基础软件的一部分。状态管理器提供的实际模式也必须标准化,以允许软件组件之间的兼容性。

也可以在应用软件中定义模式管理器,且支持与在基础软件中实现的模式管理器相同的功能。

模式相关通信的通信模式:

作为 [TPS_SWCT_01581] 的结果,拟定了 [constr_1101]。

模式相关通信:

9.1. 模式的声明

《SW-组件模板》提供了一些定义模式集合的简单手段。

ModeDeclaration:

初始模式:

这显示于图 9.1。

1 另见《AUTOSAR 术语表》中的 “标准化 AUTOSAR 接口”。

引入 ModeDeclarationGroup 类是为了支持模式的分组,并在 M1 层级提供可以标准化与重用的预定义模式集合。模式集合最终定义一个扁平的(即无分层状态)状态机,其中在给定时刻只能有一个模式处于活动状态。

再次请注意,模式的实际定义及其关系不在本文档的职责范围内。换言之:模式的定义代表 M1 工件,而本文档限于描述 M2 模型元素。

ModeDeclaration 与 ModeDeclarationGroup 都拥有便于从形式化定义生成 C 源代码的属性。

由 RTE 生成器直接接手用于创建 ModeDeclaration 编程表示的正整数值的定义:

ModeDeclarationGroup.category 的标准化值:

  • EXPLICIT_ORDER;

  • ALPHABETIC_ORDER。

(表 N.N)定义这些值的含义。:

不允许定义属性 ModeDeclarationGroup.category 的任何自定义或项目特定值。

该规则应在合同阶段生成执行时施加。

由于属性 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 是可选的,适用以下规则:

attributes if category of a ModeDeclarationGroup is set to EXPLICIT_ORDER 的存在性:

该规则应在合同阶段生成执行时施加。

attributes if category of a ModeDeclarationGroup is set to other than EXPLICIT_ORDER 的存在性:

ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 中使用的数值:

换言之,不允许同一 ModeDeclarationGroup 内两个 value 属性的值具有相同数值。也不允许 ModeDeclarationGroup.onTransitionValue 属性的数值与相应 value 属性之一的数值相同。

用于定义 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 值的数值可以任意定义:

例 9.1

以下数值集合满足对 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 定义的全部要求:{1, 2, 5, 100}。

请注意,定义 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 的能力为 ModeDeclaration 的 “排序” 引入了第二种启发式方法。如果 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 未定义,则由 RTE 生成器自行给出适用的数值来为各个 ModeDeclaration 的表示分配数值。

用于定义 ModeDeclarationGroup 的 category:

(为创建)ModeDeclaration 编程表示的定义,(需要)为 ModeDeclarationGroup 的定义定义两个 category。

  • 如果打算借助属性 ModeDeclaration.value 与 ModeDeclarationGroup.onTransitionValue 的值控制源代码生成,则 ModeDeclarationGroup 的 category 值应设置为 EXPLICIT_ORDER。

  • 如果打算让 RTE 生成器按字母排序控制源代码生成,则 ModeDeclarationGroup 的 category 值应设置为 ALPHABETIC_ORDER。

关于这一方面的更多信息见 [SWS_Rte_02568]。

ModeDeclarationGroup 的默认 category:

表9.1:ModeDeclaration(ModeDeclaration)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ModeDeclarationGroup.modeDeclaration |

属性 类型 多重性 种类 备注
value PositiveInteger 0..1 attr The RTE shall take the value of this attribute for generating the source code representation of this Mode Declaration.

表9.2:ModeDeclarationGroup(ModeDeclarationGroup)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | A collection of Mode Declarations. Also, the initial mode is explicitly identified. Tags: atp.recommendedPackage=ModeDeclarationGroups | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
initialMode ModeDeclaration 0..1 ref The initial mode of the ModeDeclarationGroup. This mode is active before any mode switches occurred.

表9.3:ModeDeclarationGroup(ModeDeclarationGroup)

属性 类型 多重性 种类 备注
mode Declaration ModeDeclaration * aggr The ModeDeclarations collected in this ModeDeclaration Group. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeDeclaration.shortName, mode Declaration.variationPoint.shortLabel vh.latestBindingTime=blueprintDerivationTime
modeManager ErrorBehavior ModeErrorBehavior 0..1 aggr This represents the ability to define the error behavior expected by the mode manager in case of errors on the mode user side (e.g. terminated mode user).
modeTransition ModeTransition * aggr This represents the avaliable ModeTransitions of the ModeDeclarationGroup
modeUserError Behavior ModeErrorBehavior 0..1 aggr This represents the definition of the error behavior expected by the mode user in case of errors on the mode manager side (e.g. terminated mode manager).
onTransition Value PositiveInteger 0..1 attr The value of this attribute shall be taken into account by the RTE generator for programmatically representing a value used for the transition between two statuses.

ModeDeclarationGroup . initialMode 属性的存在性:

ModeDeclarationGroup . modeDeclaration 属性的存在性:

ModeTransition 的语义:

更多细节在图 9.2 中解释。

ModeTransition 与 ModeDeclaration 的关系:

  • 引用 enteredMode 表示可以作为外层 ModeTransition 的一部分进入的 ModeDeclaration。

  • 引用 exitedMode 表示可以作为外层 ModeTransition 的一部分退出的 ModeDeclaration。

ModeDeclaration 应被角色 enteredMode 中的至少一个 ModeTransition 引用:

该约束应在 RTE 生成时适用,仅当外层 ModeDeclarationGroup 的上下文中至少定义了一个 ModeTransition,且它不适用于 initialMode。glyph[floorright]()

为澄清起见,ModeDeclarationGroup.initialMode 不需要被 enteredMode 引用,因为通过在角色 initialMode 中标识该 ModeDeclaration,可以明确该 ModeDeclaration 至少会被进入一次。

表9.4:ModeTransition(ModeTransition)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | This meta-class represents the ability to describe possible ModeTransitions in the context of a Mode DeclarationGroup. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ModeDeclarationGroup.modeTransition |

属性 类型 多重性 种类 备注
enteredMode ModeDeclaration 0..1 ref This represents the entered model of the ModeTransition.
exitedMode ModeDeclaration 0..1 ref This represents the exited mode of the ModeTransition

ModeTransition . enteredMode 属性的存在性:

ModeTransition . exitedMode 属性的存在性:

9.2. 模式与事件

软件组件需要能够响应状态变化:

这种模式依赖的软件组件显示于图 9.3。

配置对模式变化的响应:

图 9.4 显示元模型的一个摘录,说明当前模式与 AtomicSwComponentType 的 SwcInternalBehavior 之间的关系如何描述。

定义 SwcInternalBehavior 应如何与模式管理交互的两种机制:

两种机制都可见于图 9.4。

AtomicSwComponentType 可以定义 SwcModeSwitchEvent 以执行 RunnableEntity:

SwcModeSwitchEvent 的语义:

(当引用两个 ModeDeclaration 时,)它们的顺序定义从一个模式到另一个模式的迁移方向。在所有其他情况下,SwcModeSwitchEvent 应恰好引用一个 ModeDeclaration。

该规则应在 RTE 生成时施加。

SwcModeSwitchEvent 与 ModeTransition 的定义:

AtomicSwComponentType 可以指示启动关联 RunnableEntity 的 RTEEvent 在特定模式下是否被禁用:

也就是说,角色 disabledMode 中没有关联的 RTEEvent 按其定义正常处理。

具有可选关联 disabledMode 的 RTEEvent 有附加限制:当被引用为 disabledMode 的 ModeDeclaration 处于活动状态时,关联的 RunnableEntity 不启动。glyph[floorright](RS_SWCT_03110)

迄今为止讨论的机制必须应用于模式切换接收侧的 SwcInternalBehavior。由于模式切换经由 PortPrototype 接收,适用以下约束:

发送侧的模式管理行为:

更多信息请参阅图 9.5。

属性 modeSwitchPoint.returnValueProvision 的值:

[constr_1778] 存在的依据:不同的 RunnableEntity 可能以属性 returnValueProvision 的不同配置聚合 ModeSwitchPoint。

然而在这种情况下,将无法生成相应的 RTE API,因为该 API 每个软件组件只存在一次,因此所有受影响的 ModeSwitchPoint 必须就属性 returnValueProvision 的配置达成一致。

这一关系以示例方式(就 dataSendPoint.returnValueProvision 的情形)勾勒于图 7.21。

表9.5:ModeSwitchPoint(ModeSwitchPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ModeDeclarationGroup | | 说明 | A ModeSwitchPoint is required by a RunnableEntity owned a Mode Manager. Its semantics implies the ability to initiate a mode switch. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, RunnableEntity.modeSwitchPoint |

属性 类型 多重性 种类 备注
modeGroup ModeDeclarationGroup Prototype 0..1 iref The mode declaration group that is switched by this runnable. InstanceRef implemented by: PModeGroupInAtomic SwcInstanceRef

ModeSwitchPoint:

ModeSwitchedAckEvent 无条件地由 RTE 触发:

ModeSwitchedAckEvent 的超时:

读取当前活动模式:

表9.6:ModeAccessPoint(ModeAccessPoint)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::ModeDeclarationGroup | | 说明 | A ModeAccessPoint is required by a RunnableEntity owned by a Mode Manager or Mode User. Its semantics implies the ability to access the current mode (provided by the RTE) of a ModeDeclaration GroupPrototype's ModeDeclarationGroup. | | 基类 | ARObject | | 聚合于 | RunnableEntity.modeAccessPoint |

属性 类型 多重性 种类 备注
ident ModeAccessPointIdent 0..1 aggr The aggregation in the role ident provides the ability to make the ModeAccessPoint identifiable. From the semantical point of view, the ModeAccessPoint is considered a first-class Identifiable and therefore the aggregation in the role ident shall always exist (until it may be possible to let ModeAccessPoint directly inherit from Identifiable). Stereotypes: atpIdentityContributor Tags: xml.sequenceOffset=-100
modeGroup ModeDeclarationGroup Prototype 0..1 iref The mode declaration group that is accessed by this runnable. Tags: xml.typeElement=true InstanceRef implemented by: ModeGroupInAtomicSwc InstanceRef

模式切换请求由 RTE 异步处理:

模式切换与模式禁用:

如果 [constr_1098] 不适用,可能出现 RunnableEntity 由 SwcModeSwitchEvent 触发、同时又受模式禁用抑制的情况。

9.3. 初始化/终结

AUTOSAR 标准应支持每个 AtomicSwComponentType 初始化代码的执行。

软件组件初始化代码的执行:

软件组件终结代码的执行:

AtomicSwComponentType 的初始模式由 initialMode 定义:

更多细节请参阅《SWS RTE》规范 [2]。

9.4. 模式错误行为

随着分区进入 AUTOSAR 标准,重要的是针对以下场景考虑模式管理的行为:

  • 模式管理器的分区被终止。

  • 模式用户的分区被终止。

每当这两种场景之一成为现实时,重要的是实现模式管理器与模式用户对该事件的稳定反应。此外,模式管理器与模式用户应能够就适用哪种模式尽可能快速无缝地同步。

为此,定义了附加的建模支持,使适用的 ModeDeclarationGroup(它是模式管理器与模式用户之间契约的一部分)成为定义对例如分区重启的反应策略的地方。

模式管理器与模式用户的错误行为:

ModeErrorReactionPolicyEnum 的语义:

lastMode:应假定事件之前适用的最后模式。

defaultMode:这表示规定一个应使之适用的专用模式的能力。所标识的 ModeDeclaration 可以与 ModeDeclarationGroup.initialMode 相同,但同样可以是外层 ModeDeclarationGroup 上下文中定义的任何其他 ModeDeclaration。

ModeErrorBehavior.defaultMode 的角色:

ModeErrorBehavior . defaultMode 的存在性:

该规则应在 RTE 生成时施加。

请注意,ModeErrorBehavior 的建模描绘于图 7.10。

在没有 ModeDeclarationGroup.modeManagerErrorBehavior 的情况下应假定 ModeDeclarationGroup.initialMode:

在没有 ModeDeclarationGroup.modeUserErrorBehavior 的情况下应假定 ModeDeclarationGroup.initialMode:

(适用)于模式用户与模式管理器失去同步的情况(因为模式管理器的分区已被终止)。glyph[floorright](RS_SWCT_03110)

表9.7:ModeErrorBehavior(ModeErrorBehavior)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | This represents the ability to define the error behavior in the context of mode handling. | | 基类 | ARObject | | 聚合于 | ModeDeclarationGroup.modeManagerErrorBehavior, ModeDeclarationGroup.modeUserErrorBehavior |

属性 类型 多重性 种类 备注
defaultMode ModeDeclaration 0..1 ref This represents the ModeDeclaration that is considered the error mode in the context of the enclosing Mode DeclarationGroup.
errorReaction Policy ModeErrorReaction PolicyEnum 0..1 attr This represents the ability to define the policy in terms of which default model shall apply in case an error occurs.

ModeErrorBehavior . errorReactionPolicy 属性的存在性:

表9.8:ModeErrorReactionPolicyEnum(ModeErrorReactionPolicyEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ModeDeclaration | | 说明 | This represents the ability to specify the reaction on a mode error. | | 聚合于 | ModeErrorBehavior.errorReactionPolicy |

字面值 说明
defaultMode This represents the ability to switch to the defaultMode in case of a mode error. Tags: atp.EnumerationLiteralIndex=0
lastMode This represents the ability to keep the last mode in case of a mode error. Tags: atp.EnumerationLiteralIndex=1

模式管理器对模式错误作出反应:

为此定义了形式化的 SwcModeManagerErrorEvent,可用于例如响应模式切换通信方面的错误而触发 RunnableEntity 的执行。glyph[floorright](RS_SWCT_03110)

表9.9:SwcModeManagerErrorEvent(SwcModeManagerErrorEvent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::RTEEvents | | 说明 | This event is raised when an error occurred during the handling of the referenced ModeDeclarationGroup Prototype. | | 基类 | ARObject , AbstractEvent , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , Multilanguage Referrable , RTEEvent , Referrable |

表9.10:SwcModeManagerErrorEvent(SwcModeManagerErrorEvent)

| 聚合于 | AtpClassifier .atpFeature, SwcInternalBehavior.event |

属性 类型 多重性 种类 备注
modeGroup ModeDeclarationGroup Prototype 0..1 iref This represents the ModeDeclarationGroupPrototype for which this SwcModeManagerErrorEvent is raised in case of an error. InstanceRef implemented by: PModeGroupInAtomic SwcInstanceRef

SwcModeManagerErrorEvent . modeGroup 属性的存在性:

如 [constr_1075] 所述,可以通过定义 PortInterfaceMapping 来推翻默认兼容性规则。

在这种情况下,要求 ModeDeclarationGroup.modeUserErrorBehavior 与 ModeDeclarationGroup.modeManagerErrorBehavior 具有相同定义的规定不再有效。

不过,在这种情况下还有一个需要注意的附加事项。它影响多个模式用户连接到一个模式管理器时的错误行为实现。

模式切换通信出错时所有模式用户的一致行为:

modeUserErrorBehavior 的优先选择:

这意味着用于定义 AbstractProvidedPortPrototype 类型的 ModeSwitchInterface.modeGroup.type.modeUserErrorBehavior 应被视为优于在 AbstractRequiredPortPrototype 上下文中定义的相应 modeUserErrorBehavior。glyph[floorright](RS_SWCT_03110)

modeManagerErrorBehavior 的优先选择:

这意味着用于定义 AbstractProvidedPortPrototype 类型的 ModeSwitchInterface.modeGroup.type.modeManagerErrorBehavior 应被视为

优于在 AbstractRequiredPortPrototype 上下文中定义的相应 modeManagerErrorBehavior。glyph[floorright](RS_SWCT_03110)

[TPS_SWCT_01541] 与 [TPS_SWCT_01542] 的结果是:模式管理器应被视为模式错误行为定义的主导方。

在模式管理器与模式用户失去同步(因为模式用户的分区被终止)或相反(因为模式管理器的分区被终止)的情况下,模式管理器与模式用户的运行时行为应如何、以及适用的 RTE API,其细节在 [2] 中解释。

9.5. 与模式相关的元模型摘要节选

图 9.7 提供了与模式切换建模所涉元类有直接关系的所有元模型元素的概览。

为获得完整图景,应注意 PortGroup 的概念(见 4.6)与 ServiceProxySwComponentType(见 11.3)也与模式管理有语义关系,尽管这并未通过元模型中的关系表达。

10. ECU 抽象与复杂驱动程序

10.1. 简介

在嵌入式系统设计过程中,有一个硬件与软件必须关联起来的关键点。在 AUTOSAR 中,《ECU 资源模板》描述所提供的硬件资源。

另一方面,《软件组件模板》一般在不针对特定硬件的情况下描述软件。但存在一些两者必须会合并契合的地方。

硬件与软件之间的一个接口在 [6] 的内存与执行时间一节讨论。本章描述传感器/执行器与软件之间接口的整体系统视图,并推导其对《软件组件模板》的影响。

10.2. 高层硬件与软件架构

AUTOSAR 概念定义了一个软件架构(见图 10.1),并在这一分层架构中显式建模了硬件与软件之间的接口。

信号从硬件到软件(及反向)的流转将在以下各节描述。

传感器把图 10.2 中的物理值 (1)(例如温度、力、光强)转换为电信号 (2),它可以是电流或电压。

在 ECU 内部通常会有一些电子电路来增强传感器提供的电信号。在 AUTOSAR 中这称为 ECU 电子装置(ECU Electronics)。该电子装置还负责把电信号转换为微控制器兼容的形式 (3),通常是电压。

电信号经过增强与转换后将被微控制器捕获。这可以通过简单的数字输入、模数转换器或脉宽解调模块完成。现在电信号以软件数据值 (4) 的形式可用。

这一信号流勾勒于图 10.2 的上部。

图 10.2 所示的交互展示了一个示例场景。ClientServerInterface 的使用只是交互模式的一个例子。

这一信号链在 AUTOSAR 软件架构中一一对应地表示,并描绘于图 10.2 的下部。

在 AUTOSAR 的实现中,只有微控制器抽象(MCAL)可以直接访问外设硬件。该层将被标准化,所有硬件访问都应经由这一层。AUTOSAR 信号流的理念是把硬件映射到相应的软件模块。

1 “信号” 一词在此不单独使用;对信号流不同阶段的信号的不同抽象将使用更具体的术语。

2 为简单起见,这一讨论限于传感器方面。不过,同样的内容也适用于执行器。

因此,如果电流是微控制器外设的输入,MCAL 将交付一个表示该电流的数据值。由于 ECU 电子装置在微控制器之前增强并转换了电信号,相应的软件实体要反转这一转换。这在 ECU 抽象层完成。

因此,如果 ECU 的输入是电流、且 ECU 电子装置已把该电流转换为电压(从 2 到 3),则 ECU 抽象将把数据值电压转换为表示电流的 AUTOSAR 信号(从 4 到 5)。该 AUTOSAR 信号表示传感器提供的实际电流 (2)。

现在转换的第一步必须反转:传感器把物理值转换成了电信号。因此传感器软件组件必须再次反转它。传感器软件组件将读取表示电值的 AUTOSAR 信号,并把它转换为物理值的 AUTOSAR 信号表示(从 5 到 6)。

现在该物理值在 RTE 上可用,可被其他 SW 组件消费或读取。尽管 ECU 抽象与传感器软件组件之间的接口也是 AUTOSAR 接口、可以通过某种通信总线路由,但由于可能的高通信开销,分离 ECU 抽象与相应的 SensorActuatorSwComponentType 并不实际。

图 10.3 显示了从传感器输入到执行器输出的完整信号流。

图 10.3 所示的交互展示了一个示例场景。ClientServerInterface 的使用只是交互模式的一个例子。

下一节讨论所涉软件模块之间的接口。

10.3. 接口与 API

从传感器/执行器转换到软件组件时涉及两个本质上不同的接口,见图 10.2 中的标记 “4” 与 “5”。

微控制器抽象与 ECU 抽象之间的接口是标准化接口(见《AUTOSAR 术语表》[35])。该接口在虚拟功能总线上不可见,因此 MCAL 与 ECU 抽象必须存在于同一 ECU 上。

关于该接口的进一步描述请参阅《ECU 资源模板》文档。

到 SensorActuatorSwComponentType 的接口在虚拟功能总线上可见。一般而言,SensorActuatorSwComponentType 应与 ECU 硬件抽象在同一 ECU 上。

同样,SensorActuatorSwComponentType 与表示应用的实际 AtomicSwComponentType 之间的接口在 VFB 上可见。为描述将经由该接口交换的数据,使用标准的 AUTOSAR 接口描述机制(见第 3.4 章)。

10.3.1. ECU 抽象及其 AUTOSAR 接口

由于 AUTOSAR 标准的设计焦点是来自不同承包商的软件组件的集成,不同软件组件之间的接口显然必须兼容。

对传感器与执行器而言,接口汇集在 ECU 抽象中。每个传感器与执行器有一个 AUTOSAR PortPrototype,表示传感器交付的 AUTOSAR 信号或执行器消费的 AUTOSAR 信号。这一关系描绘于图 10.4。

图 10.4 所示的交互展示了一个示例场景。ClientServerInterface 的使用只是交互模式的一个例子。

每个传感器与执行器在 ECU 抽象处有一个 AUTOSAR PortPrototype。连接到该端口的是 SensorActuatorSwComponentType。

SensorActuatorSwComponentType 有一个到 ECU 抽象的 PortPrototype(即 IF_2,后者经由 IF_1 提供值),在此它从硬件获取 AUTOSAR 信号;还有一个到 AtomicSwComponentType 的 PortPrototype(即 IF_3),在此它向 RTE 上 AUTOSAR 的其余部分提供实际物理值。

此外,ECU 抽象与 SensorActuatorSwComponentType 之间的接口必须像第 6 章定义的那样兼容。

10.4. 传感器/执行器

在 [5] 描述的分层软件架构中,每个硬件传感器/执行器耦合到一个 SensorActuatorSwComponentType(见图 10.5)。

从传感器/执行器的软件表示到实际硬件元素的引用:

因此,每当选择一个传感器/执行器连接到 ECU 时,相应的 SensorActuatorSwComponentType 也应可用。

SensorActuatorSwComponentType、EcuAbstractionSwComponentType 与 ComplexDeviceDriverSwComponentType 只可引用 HwType:

图 10.6 描绘了 SensorActuatorSwComponentType 的引用,它设计为 AtomicSwComponentType 的特化,并带有对 HwType 的附加引用。

由 SensorActuatorSwComponentType 定义类型的 SwComponentPrototype 的映射:

该规则应在 RTE 生成时施加。

SensorActuatorSwComponentType 可以直接使用 I/O 硬件抽象:

如果传感器/执行器硬件经由总线通信访问(例如位于 LIN 从机上),则不适用这样的映射约束(注意这不是经由 I/O 硬件抽象层处理的)。

表10.1:SensorActuatorSwComponentType(SensorActuatorSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | The SensorActuatorSwComponentType introduces the possibility to link from the software representation of a sensor/actuator to its hardware description provided by the ECU Resource Template. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
sensorActuator HwDescriptionEntity 0..1 ref Reference from the Sensor Actuator Software Component Type to the description of the actual hardware.

10.5. I/O 硬件抽象

I/O 硬件抽象接口 MCAL 驱动:

I/O 硬件抽象可以有子结构:

表10.2:EcuAbstractionSwComponentType(EcuAbstractionSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | The ECUAbstraction is a special AtomicSwComponentType that resides between a software-component that wants to access ECU periphery and the Microcontroller Abstraction. The EcuAbstractionSw ComponentType introduces the possibility to link from the software representation to its hardware description provided by the ECU Resource Template. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
hardware Element HwDescriptionEntity * ref Reference from the EcuAbstractionComponentType to the description of the used HwElements.

I/O 硬件抽象对外设 I/O 设备的位置进行抽象:

EcuAbstractionSwComponentType 与相应 BswModuleDescription 之间的映射:

(该 BSW 部分借助)《基础软件模块模板》的手段(描述)。EcuAbstractionSwComponentType 与相应 BswModuleDescription 之间的映射由 SwcBswMapping 类提供,后者还映射两个相应的 InternalBehavior。这一机制在 [6] 中进一步解释。glyph[floorright]()

10.6. 复杂驱动程序

复杂驱动:

此外,它可用于实现增强的服务/协议,或封装非 AUTOSAR 系统的既有功能。glyph[floorright]()

另见文档 [3]。

复杂驱动由 ComplexDeviceDriverSwComponentType 表示:

表10.3:ComplexDeviceDriverSwComponentType(ComplexDeviceDriverSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | The ComplexDeviceDriverSwComponentType is a special AtomicSwComponentType that has direct access to hardware on an ECU and which is therefore linked to a specific ECU or specific hardware. The ComplexDeviceDriverSwComponentType introduces the possibility to link from the software representation to its hardware description provided by the ECU Resource Template. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
hardware Element HwDescriptionEntity * ref Reference from the ComplexDeviceDriverSwComponent Type to the description of the used HwElements.

ComplexDeviceDriverSwComponentType 对 ECU 硬件有依赖:

ComplexDeviceDriverSwComponentType 与相应 BswModuleDescription 之间的映射:

ComplexDeviceDriverSwComponentType 与相应 BswModuleDescription 之间的映射由 SwcBswMapping 类提供,后者还映射两个相应的 InternalBehavior。

这一机制在 [6] 中进一步解释。glyph[floorright]()

the reference SwcBswMapping . bswBehavior 的存在性:

the reference SwcBswMapping . swcBehavior 的存在性:

表10.4:BswInternalBehavior(BswInternalBehavior)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswBehavior | | 说明 | Specifies the behavior of a BSW module or a BSW cluster w.r.t. the code entities visible by the BSW Scheduler. It is possible to have several different BswInternalBehaviors referring to the same BswModule Description. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , InternalBehavior , Multilanguage Referrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, BswModuleDescription.internalBehavior |

属性 类型 多重性 种类 备注
arTypedPer Instance Memory VariableDataPrototype * aggr Defines an AUTOSAR typed memory-block that needs to be available for each instance of the Basic Software Module. The aggregation of arTypedPerInstanceMemory is subject to variability with the purpose to support variability in the Basic Software Module's implementations. Typically different algorithms in the implementation are requiring different number of memory objects. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=arTypedPerInstanceMemory.shortName, ar TypedPerInstanceMemory.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class BswInternalBehavior
bswPerInstance MemoryPolicy BswPerInstance MemoryPolicy * aggr Policy for a arTypedPerInstanceMemory The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=bswPerInstanceMemoryPolicy, bswPer InstanceMemoryPolicy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
clientPolicy BswClientPolicy * aggr Policy for a requiredClientServerEntry. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=clientPolicy, clientPolicy.variationPoint.short Label vh.latestBindingTime=preCompileTime
distinguished Partition BswDistinguished Partition * aggr Indicates an abstract partition context in which the enclosing BswModuleEntity can be executed. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=distinguishedPartition.shortName, distinguishedPartition.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=60
entity BswModuleEntity * aggr A code entity for which the behavior is described Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=entity.shortName, entity.variationPoint.short Label vh.latestBindingTime=preCompileTime xml.sequenceOffset=5
event BswEvent * aggr An event required by this module behavior. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=event.shortName, event.variationPoint.short Label vh.latestBindingTime=preCompileTime xml.sequenceOffset=10
exclusiveArea Policy BswExclusiveArea Policy * aggr Policy for an ExclusiveArea in this BswInternalBehavior. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=exclusiveAreaPolicy, exclusiveArea Policy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
includedData TypeSet IncludedDataTypeSet * aggr The includedDataTypeSet is used by a basic software module for its implementation. Stereotypes: atpSplitable Tags: atp.Splitkey=includedDataTypeSet
includedMode Declaration GroupSet IncludedMode DeclarationGroupSet * aggr This aggregation represents the included Mode DeclarationGroups Stereotypes: atpSplitable Tags: atp.Splitkey=includedModeDeclarationGroupSet
Class BswInternalBehavior
internal TriggeringPoint BswInternalTriggering Point * aggr An internal triggering point. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=internalTriggeringPoint.shortName, internal TriggeringPoint.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=2
internal TriggeringPoint Policy BswInternalTriggering PointPolicy * aggr Policy for an internalTriggeringPoint in this BswInternal Behavior.. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=internalTriggeringPointPolicy, internal TriggeringPointPolicy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
modeReceiver Policy BswModeReceiver Policy * aggr Implementation policy for the reception of mode switches. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeReceiverPolicy, modeReceiver Policy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=25
modeSender Policy BswModeSenderPolicy * aggr Implementation policy for providing a mode group. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeSenderPolicy, modeSender Policy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=20
parameterPolicy BswParameterPolicy * aggr Policy for a perInstanceParameter in this BswInternal Behavior. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=parameterPolicy, parameterPolicy.variation Point.shortLabel vh.latestBindingTime=preCompileTime
perInstance Parameter ParameterData Prototype * aggr Describes a read only memory object containing characteristic value(s) needed by this BswInternal Behavior. The role name perInstanceParameter is chosen in analogy to the similar role in the context of SwcInternal Behavior. In contrast to constantMemory, this object is not allocated locally by the module's code, but by the BSW Scheduler and it is accessed from the BSW module via the BSW Scheduler API. The main use case is the support of software emulation of calibration data. The aggregation is subject to variability with the purpose to support implementation variants. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=perInstanceParameter.shortName, per InstanceParameter.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=45

表10.5:BswInternalBehavior(BswInternalBehavior)

属性 类型 多重性 种类 备注
receptionPolicy BswDataReception Policy * aggr Data reception policy for inter-partition and/or inter-core communication. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=receptionPolicy, receptionPolicy.variation Point.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=55
releasedTrigger Policy BswReleasedTrigger Policy * aggr Policy for a releasedTrigger. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=releasedTriggerPolicy, releasedTrigger Policy.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
schedulerName Prefix BswSchedulerName Prefix * aggr Optional definition of one or more prefixes to be used for the BswScheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=schedulerNamePrefix.shortName, scheduler NamePrefix.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=50
sendPolicy BswDataSendPolicy * aggr Policy for a providedData. The policy selects the options of the Schedule Manager API generation. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=sendPolicy, sendPolicy.variationPoint.short Label vh.latestBindingTime=preCompileTime
service Dependency BswService Dependency * aggr Defines the requirements on AUTOSAR Services for a particular item. The aggregation is subject to variability with the purpose to support the conditional existence of ServiceNeeds. The aggregation is splitable in order to support that ServiceNeeds might be provided in later development steps. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=serviceDependency.ident.shortName, serviceDependency.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=40
triggerDirect Implementation BswTriggerDirect Implementation * aggr Specifies a trigger to be directly implemented via OS calls. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=triggerDirectImplementation, triggerDirect Implementation.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=15
variationPoint Proxy VariationPointProxy * aggr Proxy of a variation points in the C/C++ implementation. Stereotypes: atpSplitable Tags: atp.Splitkey=variationPointProxy.shortName

11. 服务

11.1. 概述:服务相关模型元素的生成

本章涵盖 AUTOSAR 服务配置的描述与处理。

基础软件模块与 SwComponentType 之间的混合概念:

需要 AUTOSAR 服务的 AtomicSwComponentType 使用标准化 AUTOSAR 接口与这些服务通信。ServiceSwComponentType 的 PortPrototype 与 AtomicSwComponentType 的 PortPrototype 的连接实现若干通信模式。glyph[floorright]()

AUTOSAR 服务的通信模式:

| I | II |

| A | 1..n | | A* | 1..n | | A** | 1..n | | B | 1..1 | | B | 1..1 | | C* | n..1 | | C | n..1 | | D | 1..1 |

[TPS_SWCT_01398] 内表的图例:

I:模式名称

II:通信模式(client/server、sender/receiver)

III:服务侧 :软件组件侧的 PortPrototype 种类

IV:描述、用例

AUTOSAR 服务对方法论的影响:

以下段落清单简要概述配置 AUTOSAR 服务所需的步骤。

注意,这些步骤大多由工具执行,且这些步骤中创建的模型元素相当特定于服务配置,不应在 AUTOSAR 编写工具中手动建模。

特别是,适用以下要求:

  • [TPS_SWCT_01399] 依赖通过聚合所需与所提供的 PortPrototype 建模:AtomicSwComponentType(或更准确地说,其非抽象派生元类之一)对 AUTOSAR 服务的依赖通过聚合所需与所提供的 PortPrototype 建模。glyph[floorright]()

从标准化服务接口集合中选择的 PortInterface:

此外,软件组件与基础软件模块应规定 ServiceNeeds,包含后续服务配置步骤的进一步输入信息。

  • [TPS_SWCT_01401] 形成顶层 RootSwCompositionPrototype:在定义软件系统时,AtomicSwComponentType 以 SwComponentPrototype 的形式用于 CompositionSwComponentType 内。在这一步,所有所需接口的非服务端口用 AssemblySwConnector 与 DelegationSwConnector 连接,以最终形成可在 AUTOSAR System 中引用的顶层 RootSwCompositionPrototype。glyph[floorright]()

  • [TPS_SWCT_01402] 所有 AtomicSwComponentType 实例到 EcuInstance 的映射:在系统配置阶段,完成所有 AtomicSwComponentType 实例到 EcuInstance 的映射(EcuInstance 的规范见 [10])。工具可以用 ServiceNeeds 检查目标 ECU 上的可用资源。glyph[floorright]()

  • [TPS_SWCT_01404] 创建 ECU 提取:ECU 提取从系统配置中为每个 ECU 提取。如《AUTOSAR 系统模板》[10] 所解释,它包含对系统描述的以 ECU 为中心的视图。

这包括系统 RootSwCompositionPrototype 的精简版本,其中未映射到该 ECU 的 SwComponentPrototype 被剔除、所有组合被剥离,使得 ECU 提取中只剩一个 CompositionSwComponentType 实例,它以扁平方式聚合该 ECU 上的所有 SwComponentPrototype。glyph[floorright]()

  • [TPS_SWCT_01405] 创建 ServiceSwComponentType:在 ECU 配置中,基于来自 AtomicSwComponentType 的需求,为 ECU 上所需的每个服务恰好创建一个 ServiceSwComponentType:在该 ServiceSwComponentType 上为 AtomicSwComponentType 处的每个所需端口创建数量适当的 PortPrototype。

其中必须考虑为特定种类 ServicePort 规定的通信模式 A、B、C 或 D。glyph[floorright]()

另见第 11.2 章与 [TPS_SWCT_01398]。

  • [TPS_SWCT_01406] 创建由 ServiceSwComponentType 定义类型的 SwComponentPrototype:基于 ServiceSwComponentType,为每个服务恰好创建一个由 ServiceSwComponentType 定义类型的 SwComponentPrototype。此外,构建连接器,连接需要服务的 SwComponentPrototype 所拥有的 PortPrototype 对与实际服务所拥有的 PortPrototype 对。glyph[floorright]()

  • [TPS_SWCT_01407] 创建由 ServiceSwComponentType 定义类型的 InternalBehavior:为每个 ServiceSwComponentType 创建或扩展一个 SwcInternalBehavior,提供 RTE 生成所需的关于 PortDefinedArgumentValue、RunnableEntity 与 RTEEvent 的信息。glyph[floorright]()

此外,通过填充这些 PortDefinedArgumentValue 对服务端口进行细化,也在 ECU 配置阶段完成。另见第 7.6.3 章。

  • [TPS_SWCT_01408] 创建 SwcBswMapping:为进行 RTE 模块配置,需要选择由基础软件模块描述所描述的 AUTOSAR 服务的一个实现。需要相应地创建到相应 SwComponentPrototype 的 SwcBswMapping。

为每个 SwcInternalBehavior 创建一个 SwcImplementation。SwcImplementation 的信息应基于 BswImplementation 的可用信息生成。glyph[floorright]()

  • [TPS_SWCT_01409] 更新 PortDefinedArgumentValue:根据服务 BSW 的配置,可能需要更新前一步生成的 PortDefinedArgumentValue 所属的 ValueSpecification。glyph[floorright]()

1 这一步一般不要求把 BswImplementation 中聚合的任何属性或元素复制到生成的 SwcImplementation 实例中,因为 RTE 配置的唯一强制信息是从 SwcImplementation 到所选 SwcInternalBehavior 的引用。

表11.1:SwcBswMapping(SwcBswMapping)

| 包 | M2::AUTOSARTemplates::CommonStructure::SwcBswMapping | | 说明 | Maps an SwcInternalBehavior to an BswInternalBehavior. This is required to coordinate the API generation and the scheduling for AUTOSAR Service Components, ECU Abstraction Components and Complex Driver Components by the RTE and the BSW scheduling mechanisms. Tags: atp.recommendedPackage=SwcBswMappings | | 基类 | ARElement , ARObject , AtpClassifier , AtpFeature , AtpStructureElement , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element, AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
bswBehavior BswInternalBehavior 0..1 ref The mapped BswInternalBehavior
runnable Mapping SwcBswRunnable Mapping * aggr A mapping between a pair of SWC and BSW runnables. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=runnableMapping, runnable Mapping.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
swcBehavior SwcInternalBehavior 0..1 ref The mapped SwcInternalBehavior.
synchronized ModeGroup SwcBswSynchronized ModeGroupPrototype * aggr A pair of SWC and BSW mode group prototypes to be synchronized by the scheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=synchronizedModeGroup, synchronized ModeGroup.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
synchronized Trigger SwcBswSynchronized Trigger * aggr A pair of SWC and BSW Triggers to be synchronized by the scheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=synchronizedTrigger, synchronized Trigger.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

11.2. 服务软件组件类型

如 [TPS_SWCT_01405] 所述,AUTOSAR 服务由它们自己的元模型类 ServiceSwComponentType 表示。如图 11.1 所见,ServiceSwComponentType 是 AtomicSwComponentType 的特化。

与其他任何 SwComponentType 一样,它们可以聚合 PortPrototype。

ServiceSwComponentType 只应拥有服务端口:

所述的例外见于

  • [TPS_SWCT_01572];

  • [TPS_SWCT_01579];

  • [TPS_SWCT_01831];与

  • [TPS_SWCT_01580]

适用。glyph[floorright]()

Dcm 可以直接访问 AbstractProvidedPortPrototype 中的 SenderReceiverInterface.dataElement、NvDataInterface.nvData 或 ParameterInterface.parameter:

为此,表示 Dcm 功能的 ServiceSwComponentType 可以拥有由兼容 SenderReceiverInterface 定义类型的 AbstractRequiredPortPrototype,后者可以把属性 isService 设置为 false。glyph[floorright]()

请注意,[TPS_SWCT_01579] 中包含 ParameterInterface.parameter 是基于这样的假定:表示 Dcm 的 ServiceSwComponentType 将连接到由 ParameterSwComponentType 拥有的 PPortPrototype。

Dcm 可以直接访问 AbstractRequiredPortPrototype 中的 SenderReceiverInterface.dataElement 或 NvDataInterface.nvData:

为此,表示 Dcm 功能的 ServiceSwComponentType 可以拥有由兼容 SenderReceiverInterface 定义类型的 AbstractProvidedPortPrototype,后者可以把属性 isService 设置为 false。glyph[floorright]()

请注意,[TPS_SWCT_01831] 排除 ParameterInterface.parameter 是 [constr_1137] 的直接结果,即表示 Dcm 的 ServiceSwComponentType 不允许暴露由 ParameterInterface 定义类型的 PPortPrototype。

Dem 可以直接访问 PPortPrototype 中的 SenderReceiverInterface.dataElement、NvDataInterface.nvData 或 ParameterInterface.parameter:

为此,表示 Dem 功能的 ServiceSwComponentType 可以拥有由兼容 SenderReceiverInterface 定义类型的 RPortPrototype,后者可以把属性 isService 设置为 false。glyph[floorright]()

请注意,[TPS_SWCT_01580] 中包含 ParameterInterface.parameter 是基于这样的假定:表示 Dem 的 ServiceSwComponentType 将连接到由 ParameterSwComponentType 拥有的 PPortPrototype。

ServiceSwComponentType 表达 ServiceNeeds 的用例:

与 EcuAbstractionSwComponentType 和 ComplexDeviceDriverSwComponentType 类似,ServiceSwComponentType 表示软件组件与基础软件模块之间的混合概念。BSW 部分借助《BSW 模块描述模板》[6] 描述。

ServiceSwComponentType 与相应 BswModuleDescription 之间的映射由 SwcBswMapping 类提供,后者还映射两个相应的 InternalBehavior(见 [TPS_SWCT_01408])。这一机制在 [6] 中进一步解释。

ServiceSwComponentType 应在 ECU 配置阶段添加:

Base ECU Config Generator 工具需要确保:为映射到 ECU 的 SwComponentPrototype 的所有服务端口,在相应的 ServiceSwComponentType 处创建服务端口。

对模式 A,为每种不同类型的服务端口在 ServiceSwComponentType 上创建一个端口。

对模式 B 与 C,为 SwComponentPrototype 的每个服务端口在 ServiceSwComponentType 上创建一个端口。

更明确地说,需要检查所有 AtomicSwComponentType 实例中由 isService 属性设置为 true 的 PortInterface 定义类型、且被 ServiceNeeds 引用的 PortPrototype;并且对属于待配置 AUTOSAR 服务的这些 PortInterface 实例中的每一个,需要在 ServiceSwComponentType 上创建一个实现相同或兼容 PortInterface 的 PortPrototype。glyph[floorright]()

2 由此,先前存在的约束 1127 失效。

表11.2:ServiceSwComponentType(ServiceSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | ServiceSwComponentType is used for configuring services for a given ECU. Instances of this class are only to be created in ECU Configuration phase for the specific purpose of the service configuration. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

在创建 PortPrototype 的过程中,必须考虑为特定种类服务端口规定的通信模式 A、B 或 C,见 [TPS_SWCT_01398]。

应用/服务组件上的角色需要匹配:

11.3. 服务代理组件类型

与服务的本地通信:

模式管理器需要与位于其他 ECU 上的应用软件组件通信:

为使这种通信成为可能,使用 ServiceProxySwComponentType。

对应用软件与 RTE 而言,它表现得像一个 “普通” AtomicSwComponentType,但实际上是 AUTOSAR 服务的代理。glyph[floorright]()

跨 ECU 边界的模式请求概念在图 11.2 中例示。

ServiceProxySwComponentType 的接口:

在元模型中,ServiceProxySwComponentType 除其类之外与 ApplicationSwComponentType 无差别。满足作为代理的语义所施加的限制,是实现者的责任。

ServiceProxySwComponentType 与 ApplicationSwComponentType 的区别:

ServiceProxySwComponentType 的原型可以映射到若干 ECU,即使它在 VFB 系统中只出现一次,因为这样的原型在每个 ECU 上都是必需的,在那里它必须寻址本地 ServiceSwComponentType。

由此,ServiceProxySwComponentType 只能通过网络接收而不能发送信号。更多细节在下方的类表中解释。glyph[floorright]()

类型为 ServiceProxySwComponentType 的 SwComponentPrototype 之间的连接:

表11.3:ServiceProxySwComponentType(ServiceProxySwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | This class provides the ability to express a software-component which provides access to an internal service for remote ECUs. It acts as a proxy for the service providing access to the service. An important use case is the request of vehicle mode switches: Such requests can be communicated via sender-receiver interfaces across ECU boundaries, but the mode manager being responsible to perform the mode switches is an AUTOSAR Service which is located in the Basic Software and is not visible in the VFB view. To handle this situation, a ServiceProxySwComponentType will act as proxy for the mode manager. It will have R-Ports to be connected with the mode requestors on VFB level and Service-Ports to be connected with the local mode manager at ECU integration time. Apart from the semantics, a ServiceProxySwComponentType has these specific properties: • A prototype of it can be mapped to more than one ECUs in the system description. • Exactly one additional instance of it will be created in the ECU-Extract per ECU to which the prototype has been mapped. • For remote communication, it can have only R-Ports with sender-receiver interfaces and 1:n semantics. • There shall be no connectors between two prototypes of any ServiceProxySwComponentType. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , Sw ComponentType | | 聚合于 | ARPackage.element |

ServiceProxySwComponentType 的端口:

  • 由 SenderReceiverInterface 定义类型的 RPortPrototype;或

  • 由 isService 属性设置为 true 的 PortInterface 定义类型的 PortPrototype。

该规则应在 RTE 生成时施加。

ServiceProxySwComponentType 支持的远程通信:

该规则应在 RTE 生成时施加。

11.4. 非易失性存储器

11.4.1. 简介

AUTOSAR 架构定义了软件组件访问非易失性内存的两种替代方式。

  • 第一种方式:软件组件在其 InternalBehavior 中定义一个 PerInstanceMemory 和一个经由 RoleBasedDataAssignment 引用该 PerInstanceMemory 的 NvBlockNeeds。

在这种情况下,NVRAM 块被该软件组件与 NvM [36] 独占访问。因此,nv 数据被封装在软件组件内部,不能被其他软件组件直接访问。

PerInstanceMemory 在 arTypedPerInstanceMemory 的情况下可以用 AutosarDataType 定义类型,在 perInstanceMemory 的情况下可以用 C 数据类型定义类型。更多信息见第 7.7、13 节。

  • 第二种方式:软件组件使用基于 PortPrototype 的通信来访问由 NvBlockSwComponentType 提供的 nv 数据。

在这种情况下,可以把不同 AtomicSwComponentType 使用的 nv 数据打包到一个较大的 NVRAM 块中以减少 NVRAM 块管理开销,或让多个软件组件使用相同 nv 数据以减少 RAM 开销。NvBlockSwComponentType 的 nv 数据用 AutosarDataType 定义类型。

关于与 NvM [36] 交互的特定场景的更多细节见第 13.2 节。

11.4.2. NvBlockComponent

非易失性数据由特化的 AtomicSwComponentType 提供:

NvBlockSwComponentType 可以表示由 NVRAM 管理器管理的一个或多个 NVRAM 块。NvBlockSwComponentType 的 nv 数据 PortPrototype 专门由 NvDataInterface 定义类型。glyph[floorright](RS_SWCT_03225)

由 NvBlockSwComponentType 表示的非易失性数据可以读写:

此外,NvBlockSwComponentType 可以拥有 client-server PortPrototype,以提供块相关服务、管理服务或通知。

NvBlockSwComponentType 支持的 PortPrototype 种类:

  • 由 NvDataInterface 或 ClientServerInterface 定义类型的 PortPrototype;

  • 由 ModeSwitchInterface 定义类型的 RPortPrototype。

该规则应在 RTE 生成时施加。

类型为 NvBlockSwComponentType 的 SwComponentPrototype 之间的连接:

表11.4:NvBlockSwComponentType(NvBlockSwComponentType)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components | | 说明 | The NvBlockSwComponentType defines non volatile data which data can be shared between Sw ComponentPrototypes. The non volatile data of the NvBlockSwComponentType are accessible via provided and required ports. Tags: atp.recommendedPackage=SwComponentTypes | | 基类 | ARElement , ARObject , AtomicSwComponentType , AtpBlueprint , AtpBlueprintable , AtpClassifier , Atp Type , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , ComponentType | | 聚合于 | ARPackage.element |

表11.5:NvBlockSwComponentType(NvBlockSwComponentType)

属性 类型 多重性 种类 备注
bulkNvData Descriptor BulkNvDataDescriptor * aggr This aggregation formally defines the bulk Nv Blocks that are provided to the application software by the enclosing NvBlockSwComponentType. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=bulkNvDataDescriptor.shortName, bulkNv DataDescriptor.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
nvBlock Descriptor NvBlockDescriptor * aggr Specification of the properties of exactly one NVRAM Block. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=nvBlockDescriptor.shortName, nvBlock Descriptor.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表11.6:NvDataInterface(NvDataInterface)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface | | 说明 | A non volatile data interface declares a number of VariableDataPrototypes to be exchanged between non volatile block components and atomic software components. Tags: atp.recommendedPackage=PortInterfaces | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpType , CollectableElement , DataInterface , Identifiable , MultilanguageReferrable , PackageableElement , PortInterface , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
nvData VariableDataPrototype * aggr The VariableDataPrototype of this nv data interface.

11.4.3. 使用 NvBlockComponent 的 NVRAM 数据的软件组件

AtomicSwComponentType 可以拥有由 NvDataInterface 定义类型的 AbstractRequiredPortPrototype:

如果这样的 AbstractRequiredPortPrototype 保持未连接,nvData 仍需要有合理的值。glyph[floorright](RS_SWCT_03225)

由 NvBlockSwComponentType 定义类型的 SwComponentPrototype 与由其他 AtomicSwComponentType 定义类型的 SwComponentPrototype 之间的连接:

3 注意,假定只有继承自 AtomicSwComponentType 的元类的一个子集才实际适用于 nvData 初始值的定义。最可能的候选是使用该特性的 ApplicationSwComponentType 与 SensorActuatorSwComponentType,但对例如 NvBlockSwComponentType 而言显然不合理。

(引用到一个)由 AtomicSwComponentType 的其他子类定义类型的 SwComponentPrototype 所拥有的 SenderReceiverInterface。

该规则应在 RTE 生成时施加。

没有把由 ParameterInterface 定义类型的 PortPrototype 连接到由 NvDataInterface 定义类型的 PortPrototype 的有效用例。

用于连接到 NvBlockSwComponentType 的 PortPrototype 的 PortInterface:

用于 NV 数据管理的 PortPrototype:

该规则应在 RTE 生成时施加。

细节见第 6.4.4 章。

注意:对在若干 SwComponentPrototype 之间读写并共享的 nv 数据,NvBlockSwComponentType 建立了一种并非直接显见的通信。

尽管如此,这是有意支持的;VFB 设计者有责任确保只在软件组件功能不受损害的情况下共享 nv 数据。

为帮助 VFB 设计者判定哪些 nv 数据可能被映射到同一 NVRAM 块,软件组件可以通过定义带 NvBlockNeeds 的 SwcServiceDependency 为其 nv 数据 PortPrototype 规定进一步属性。

在这种情况下,assignedPort 的 role 属性必须设置为值 NvDataPort。这一方面也在第 13.2.4 节解释。

与描述整个 NVRAM 块预期配置的 NvBlockNeeds 相反,nv 数据 PortPrototype 的 NvBlockNeeds 只定义从软件组件角度确保其功能所需的属性。

这意味着空属性具有 “无所谓” 的语义。

此外,VFB 设计者可以自由规定所创建的 NvBlockDescriptor 如何满足所请求的 NVRAM 块属性。

例如,具有不同 writingFrequency 的 nv 数据可能被映射到一个 NVRAM 块。在这种情况下,NvBlockDescriptor 的 NvBlockNeeds 必须指示最坏情况,即更高的频率。

[TPS_SWCT_01675] 关于 NvBlockNeeds 或 NvBlockDescriptor 属性的建议

| Attribute of NvBlockNeeds | NvBlockNeeds of different nv data Port- Prototype s of software-components |

| readonly | Recommended to match for all connected nv data PortPrototype s if specified. | | reliability | Can be different. | | resistantToChangedSw | Recommended to match for all connected nv data PortPrototype s if specified. | | restoreAtStart | Recommended to match for all connected nv data PortPrototype s if specified. | | storeAtShutdown | Recommended to match for all connected nv data PortPrototype s if specified. | | writeOnlyOnce | Recommended to match for all connected nv data PortPrototype s if specified. | | writingFrequency | Can be different. | | writingPriority | Can be different. | | writeVerification | Can be different. | | calcRamBlockCrc | Can be different. | | checkStaticBlockId | Can be different. | | ramBlockStatusControl | Can be different. | | Attribute of NvBlockNeeds | NvBlockNeeds of different nv data Port- Prototype s of software-components | | storeCyclic | Can be different. | | storeEmergency | Can be different. | | storeImmediate | Can be different. | | storeOnChange | Can be different. | | selectBlockForFirs- tInitAll | Recommended to match for all connected nv data PortPrototype s if specified. |

glyph[floorright](RS_SWCT_03225)

但请注意,[TPS_SWCT_01675] 不代表有约束力的约束。

关于 [TPS_SWCT_01675] 的完整性(它有意未包含关于 cyclicWritingPeriod 值的说明),应注意(根据 [TPS_SWCT_01585])NvBlockDescriptor.nvBlockNeeds.cyclicWritingPeriod 的值应被忽略,以 NvBlockDescriptor.timingEvent.period 为准。

因此,符合 [TPS_SWCT_01675] 精神的、关于 cyclicWritingPeriod 的缺失陈述是:SwcServiceDependency.serviceNeeds.cyclicWritingPeriod 的值可以不同于 NvBlockDescriptor.timingEvent.period 的值。

建议把 NvBlockDescriptor.timingEvent.period 的值设置为被映射 nv 数据 PortPrototype 所请求的最低时间值(由 SwcServiceDependency.serviceNeeds.cyclicWritingPeriod 实现)。

11.4.4. 连接到 NvBlockComponent 的软件组件

请注意,NvBlockSwComponentType 与其他 AtomicSwComponentType 之间 AssemblySwConnector 的创建适用一些限制。

特别是,相互通信的 ApplicationSwComponentType 使用由 RTE 生成与控制的缓冲区来交换数据。而 NvBlockSwComponentType 以 ramBlock 的形式维护自己的缓冲区。

因此,读取一个可能由另一个 ApplicationSwComponentType 或 NvBlockSwComponentType 提供的 dataElement 的 ApplicationSwComponentType,实际上无法访问该 dataElement,因为它无法决定是需要访问 RTE 提供的缓冲区还是 ramBlock。

因此,这样的场景按 AUTOSAR 标准的规定被视为无效。

NvBlockSwComponentType 与其他 AtomicSwComponentType 之间的无效连接(I):

[constr_1417] 涵盖的场景描绘于图 B.45 与图 B.46。

NvBlockSwComponentType 与其他 AtomicSwComponentType 之间的无效连接(II):

[constr_1418] 涵盖的场景描绘于图 B.47。

请注意,约束 [constr_1417] 与 [constr_1418] 是对 [constr_1202] 所描述的各类 PortPrototype 之间 SwConnector 创建的一般规定的延续。也就是说,[constr_1202] 对拥有相应 PortPrototype 的特定 SwComponentType 不作区分。

相反,[constr_1417] 与 [constr_1418] 向整体图景中添加了关于拥有相应 PortPrototype 的 SwComponentType 性质的一些信息,因此是对 [constr_1202] 施加规定的细化(而非矛盾)。

11.4.5. NvBlockDescriptor

NvBlockDescriptor 规定恰好一个 NVRAM 块的属性:

它包含关于 NVRAM 管理器所请求 NVRAM 块配置、ramBlock 与 romBlock、NvBlockSwComponentType 的 PortPrototype 与 ramBlock 内数据之间的映射、以及以 RoleBasedPortAssignment 表达的 clientServerPort 的角色的信息。glyph[floorright]()

表11.7:NvBlockDescriptor(NvBlockDescriptor)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::NvBlockComponent | | 说明 | Specifies the properties of exactly on NVRAM Block. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, NvBlockSwComponentType.nvBlockDescriptor |

属性 类型 多重性 种类 备注
clientServerPort RoleBasedPort Assignment * aggr The RoleBasedPortAssignement defines which client server port of the NvBlockSwComponentType serves for which kind of service or notification. In case of notifications one common callback function is provided by the RTE for each individual kind of notification defined by the "role". The aggregation of RoleBasedPortAssignment is subject to variability with the purpose to support the conditional existence of ports. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=clientServerPort, clientServerPort.variation Point.shortLabel vh.latestBindingTime=preCompileTime
constantValue Mapping ConstantSpecification MappingSet * ref Reference to the ConstantSpecificationMapping to be applied for the particular NVRAM Block Stereotypes: atpSplitable Tags: atp.Splitkey=constantValueMapping
dataType Mapping DataTypeMappingSet * ref Reference to the DataTypeMapping to be applied for the particular NVRAM Block. Stereotypes: atpSplitable Tags: atp.Splitkey=dataTypeMapping
instantiation DataDefProps InstantiationDataDef Props * aggr The purpose of InstantiationDataDefProps are the refinement of some data def properties of individual instantiations within the context of a NvBlockSw ComponentType. The aggregation of InstantiationDataDefProps is subject to variability with the purpose to support the conditional existence of ports, component internal memory objects and those attributes. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=instantiationDataDefProps, instantiationData DefProps.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
modeSwitch EventTriggered Activity ModeSwitchEvent TriggeredActivity * aggr This represents the collection of ModeSwitchEvent TriggeredActivities related to the enclosing NvBlock Descriptor. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=modeSwitchEventTriggeredActivity, mode SwitchEventTriggeredActivity.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表11.8:NvBlockDescriptor(NvBlockDescriptor)

属性 类型 多重性 种类 备注
nvBlockData Mapping NvBlockDataMapping * aggr Defines the mapping between the VariableData Prototypes in the NvBlockComponents ports and the VariableDataPrototypes of the RAM Block. The aggregation of NvBlockDataMapping is subject to variability with the purpose to support the conditional existence of nv data ports. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=nvBlockDataMapping, nvBlockData Mapping.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
nvBlockNeeds NvBlockNeeds 0..1 aggr Specifies the abstract needs on the configuration of the NVRAM Manager for the single NVRAM Block described by this NvBlockDescriptor. In addition, it may define requirements for writing strategies in an implementation of an NvBlockSw ComponentType by the RTE. Please note that the attributes nDataSets and nRom Blocks are not relevant for this aggregation because the RTE will allocate just one block anyway. In a different context, however, they do make sense.
ramBlock VariableDataPrototype 0..1 aggr Defines the RAM Block of the NVRAM Block provided by NvBlockSwComponentType.
romBlock ParameterData Prototype 0..1 aggr Defines the ROM Block of the NVRAM Block provided by NvBlockSwComponentType.
supportDirty Flag Boolean 0..1 attr Specifies whether calling of NvM functions for writing and/ or status control of potentially modified RAM Blocks to NV memory shall be controlled by the RTE.
timingEvent TimingEvent 0..1 ref this reference can be taken to identify the TimingEvent to be used by the RTE for implementing a cyclic writing strategy for this block
writingStrategy RoleBasedData Assignment * aggr This attribute allows for assigning a specific writing strategy for an incoming AutosarDataPrototype.

NvBlockDescriptor . nvBlockNeeds 属性的存在性:

关于属性 NvBlockDescriptor.supportDirtyFlag 语义的更多解释请参阅《SWS RTE》[2]。

nDataSets 与 reliability 的值对照:

[constr_1095] 存在的原因是 AUTOSAR NvM [36] 不支持 NV 数据集的错误纠正。

如果 nDataSets 的值等于 0,则 reliability 的值可以取 NvBlockNeedsReliabilityEnum 中的任何值。

11.4.5.1. 写入策略

nv 数据的写入策略:

支持以下用例:

  • 周期性写入数据。该用例要求属性 NvBlockDescriptor.nvBlockNeeds.storeCyclic 存在且值为 true,并且属性 NvBlockDescriptor.nvBlockNeeds.cyclicWritingPeriod 也需要存在且有合理的值。

在使用属性 NvBlockDescriptor.nvBlockNeeds.cyclicWritingPeriod 的上下文中,适用约束 [constr_1308] 与 [constr_1309]。

  • 立即写入数据。这意味着发送到 NvBlockSwComponentType 的数据将立即写入 NVRAM 存储。

该用例对应于把属性 NvBlockDescriptor.nvBlockNeeds.storeImmediate 的值设置为 true。

  • 紧急写入。使用这一设置时,如果 ECU 以某种方式失效,数据应写入 NVRAM 存储。

该用例对应于把属性 NvBlockDescriptor.nvBlockNeeds.storeEmergency 设置为 true。

如 [TPS_SWCT_01589] 所解释,仅设置该属性的值不足以实现预期的语义。

  • 关机时写入。这里,数据在 ECU 关机时写入 NVRAM 存储。

该用例对应于把属性 NvBlockDescriptor.nvBlockNeeds.storeAtShutdown 设置为 true。

  • 模式切换时写入。这里,数据响应配置为触发写入的模式切换而写入 NVRAM。

该用例对应于属性 NvBlockDescriptor.modeSwitchEventTriggeredActivity 的存在。

  • 变化时写入。这里,如果值不同于 ramMirror 中的相应值,数据写入 NVRAM。

该用例对应于把属性 NvBlockDescriptor.nvBlockNeeds.storeOnChange 设置为 true。

glyph[floorright](RS_SWCT_03225)

关于周期性写入数据用例如何配置的更多信息,请参阅 [TPS_SWCT_01587] 与图 11.6。

关于立即写入数据用例如何配置的更多信息,请参阅 [TPS_SWCT_01588] 与图 11.7。

当然,不同写入策略的实际实现超出了设置属性值的范围,它要求外层 NvBlockSwComponentType 的 SwcInternalBehavior 中存在专用 RunnableEntity,由适用于特定用例的 RTEEvent 触发。

nv 数据的周期性写入要求 TimingEvent 的存在:

这一方面描绘于图 11.6。

用于立即存储 nv 数据的 DataReceivedEvent:

这一方法描绘于图 11.7。

nv 数据紧急存储的实现:

特别是,复杂驱动负责检测 ECU 失效。如果发生相关错误,复杂驱动应直接为紧急块调用 NvM 写块操作。glyph[floorright](RS_SWCT_03225)

这进而意味着 NvM 应以最高优先级响应来自复杂驱动的写操作(NvM 写块请求的重新排队)。

请注意,[TPS_SWCT_01587] 描述的行为一般受 AUTOSAR 支持,要求 NVRAM 块必须配置 “立即优先级”。技术含义在相应的 SWS [36] 中解释,例如 [SWS_NvM_00182] 与 [SWS_NvM_00300]。

nv 数据写入策略的组合是可能的:

换言之,作为 [TPS_SWCT_01590] 的结果,例如 NvBlockDescriptor.nvBlockNeeds.storeImmediate 与 NvBlockDescriptor.nvBlockNeeds.storeCyclic 都可能存在并在同一 NvBlockNeeds 的上下文中设置为 true。

用 SwcModeSwitchEvent 触发 nv 数据写入过程:

ModeSwitchEventTriggeredActivity.role 的语义:

ModeSwitchEventTriggeredActivity.role 支持的值:

表11.9:ModeSwitchEventTriggeredActivity(ModeSwitchEventTriggeredActivity)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::NvBlockComponent | | 说明 | This meta-class defines an activity of the NvBlockSwComponentType for a specific NvBlock which is triggered by a ModeSwitchEvent. | | 基类 | ARObject | | 聚合于 | NvBlockDescriptor.modeSwitchEventTriggeredActivity |

属性 类型 多重性 种类 备注
role Identifier 0..1 attr This attribute indicates which service of the NvM for the NvBlock shall be requested.
swcModeSwitch Event SwcModeSwitchEvent 0..1 ref This reference identifies the SwcModeSwitchEvent that triggers the activity.

ModeSwitchEventTriggeredActivity . role 属性的存在性:

ModeSwitchEventTriggeredActivity . swcModeSwitchEvent 属性的存在性:

11.4.5.1.1. 多个事件驱动写入策略的存在

可能存在这样一个用例:(可能在周期性写入策略之外)同时对 NvRam 存在多个基于事件的写入策略。

写入策略通常借助不同的 RunnableEntity 实现,它们需要由到达 NvBlockSwComponentType 的数据触发。不过在这种情况下,需要能够指定进入数据与应用合适写入策略的 RunnableEntity 之间的关系。

例 11.1

在图 11.9 描绘的示例场景中,NvBlockSwComponentType 接收两个 dataElement。一个 dataElement 应与关机存储的写入策略关联,另一个 dataElement 应与立即存储关联。

存在两个可用于触发 RunnableEntity 的 DataReceivedEvent。但若没有进一步的形式化规定,哪个 DataReceivedEvent 与哪个 RunnableEntity 关联就只能猜测了。

为消除例 11.1 中勾勒的不确定性,可以对属性 RoleBasedDataAssignment.role 使用标准化值,并让 RoleBasedDataAssignment 自身引用相应的 dataElement。

该方法勾勒于图 11.10,其对该场景的应用勾勒于图 11.11。

便于把写入策略关联到相应 RunnableEntity 的进一步规定:

NvBlockDescriptor.writingStrategy.usedDataElement 应引用 AutosarDataPrototype:

依据:实现相应写入策略的 RunnableEntity 的激活由整个 AutosarDataPrototype 的接收触发。引用 AutosarDataPrototype 内部 DataPrototype 的能力可能造成错误的印象。

AutosarDataPrototype 只应被单个 NvBlockDescriptor.writingStrategy 引用:

该规则应在 RTE 生成时施加。

属性 NvBlockDescriptor.writingStrategy.role 的可能值:

  • storeAtShutdown;

  • storeImmediate;

  • storeOnChange。

属性 NvBlockDescriptor.writingStrategy.role 设置为 storeAtShutdown 的一致性:

属性 NvBlockDescriptor.writingStrategy.role 设置为 storeImmediate 的一致性:

属性 NvBlockDescriptor.writingStrategy.role 设置为 storeOnChange 的一致性:

11.4.5.2. NvBlockNeeds

NVRAM 管理器所请求的 NVRAM 块配置由 NvBlockDescriptor 的 NvBlockNeeds 描述。

该信息可以在 ECU 配置期间求值,类似于原子软件组件或 BSW 模块的 NvBlockNeeds。更多细节见第 13 节。

attributes of meta-class NvBlockNeeds 的存在性:

  • NvBlockNeeds.storeCyclic;

  • NvBlockNeeds.cyclicWritingPeriod;

  • NvBlockNeeds.storeEmergency;

  • NvBlockNeeds.storeImmediate;

  • NvBlockNeeds.storeOnChange。

(上述属性)只有在同一 SwcServiceDependency 的上下文中存在一个 SwcServiceDependency.assignedPort、其属性 role 设置为值 NvDataPort 时才应存在。

该规则应在 RTE 生成时施加。

NvBlockNeeds . cyclicWritingPeriod 的存在性:

该规则应在 RTE 生成时施加。glyph[floorright]()

表11.10:NvBlockNeeds(NvBlockNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of a single NVRAM Block. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, NvBlockDescriptor.nvBlockNeeds, SwcServiceDependency. serviceNeeds |

属性 类型 多重性 种类 备注
calcRamBlock Crc Boolean 0..1 attr Defines if CRC (re)calculation for the permanent RAM Block is required.
checkStatic BlockId Boolean 0..1 attr Defines if the Static Block Id check shall be enabled.
cyclicWriting Period TimeValue 0..1 attr This represents the period for cyclic writing of NvData to store the associated RAM Block.
nDataSets PositiveInteger 0..1 attr Number of data sets to be provided by the NVRAM manager for this block. This is the total number of ROM Blocks and RAM Blocks.
nRomBlocks PositiveInteger 0..1 attr Number of ROM Blocks to be provided by the NVRAM manager for this block. Please note that these multiple ROM Blocks are given in a contiguous area.
ramBlockStatus Control RamBlockStatusControl Enum 0..1 attr This attribute defines how the management of the RAM Block status is controlled.
readonly Boolean 0..1 attr true: data of this NVRAM Block are write protected for normal operation (but protection can be disabled) false: no restriction
reliability NvBlockNeeds ReliabilityEnum 0..1 attr Reliability against data loss on the non-volatile medium.
resistantTo ChangedSw Boolean 0..1 attr Defines whether an NVRAM Block shall be treated resistant to configuration changes (true) or not (false). For details how to handle initialization in the latter case, please refer to the NVRAM specification.
restoreAtStart Boolean 0..1 attr Defines whether the associated RAM Block shall be implicitly restored during startup by the basic software.
selectBlockFor FirstInitAll Boolean 0..1 attr If this attribute is set to true the NvM shall process this block in the NvM_FirstInitAll() function.
storeAt Shutdown Boolean 0..1 attr Defines whether or not the associated RAM Block shall be implicitly stored during shutdown by the basic software.
storeCyclic Boolean 0..1 attr Defines whether or not the associated RAM Block shall be implicitly stored periodically by the basic software.
store Emergency Boolean 0..1 attr Defines whether or not the associated RAM Block shall be implicitly stored in case of ECU failure (e.g. loss of power) by the basic software. If the attribute store Emergency is set to true the associated RAM Block shall be configured to have immediate priority.
Class NvBlockNeeds
storeImmediate Boolean 0..1 attr Defines whether or not the associated RAM Block shall be implicitly stored immediately during or after execution of the according SW-C RunnableEntity by the basic software.
storeOnChange Boolean 0..1 attr This attribute defines whether the associated RAM Block shall be stored immediately if the written value is different to the value stored in the associated RAM Block(s) during or after execution of the according SW-C RunnableEntity.
useAuto ValidationAt ShutDown Boolean 0..1 attr If set to true the RAM Block shall be auto validated during shutdown phase.
useCRCComp Mechanism Boolean 0..1 attr If set to true the CRC of the RAM Block shall be compared during a write job with the CRC which was calculated during the last successful read or write job in order to skip unnecessary NVRAM writings.
writeOnlyOnce Boolean 0..1 attr Defines write protection after first write: true: This block is prevented from being changed/erased or being replaced with the default ROM data after first initialization by the software-component. false: No such restriction.
writeVerification Boolean 0..1 attr Defines if Write Verification shall be enabled for this NVRAM Block.
writing Frequency PositiveInteger 0..1 attr Provides the amount of updates to this block from the application point of view. It has to be provided in "number of write access per year".
writingPriority NvBlockNeedsWriting PriorityEnum 0..1 attr Requires the priority of writing this block in case of concurrent requests to write other blocks.

表11.11:NvBlockNeedsWritingPriorityEnum(NvBlockNeedsWritingPriorityEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the priority of writing this block in case of concurrent requests to write other blocks. | | 聚合于 | NvBlockNeeds.writingPriority |

字面值 说明
high Writing priority is high. Tags: atp.EnumerationLiteralIndex=0
low Writing priority is low. Tags: atp.EnumerationLiteralIndex=1
medium Writing priority is medium. Tags: atp.EnumerationLiteralIndex=2

表11.12:NvBlockNeedsReliabilityEnum(NvBlockNeedsReliabilityEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Reliability against data loss on the non-volatile medium. These requirements give only a relative indication, for example on the required degree of redundancy for storage. They do, however, not specify by which means (e.g. software or hardware) the reliability is actually achieved. |

表11.13:NvBlockNeedsReliabilityEnum(NvBlockNeedsReliabilityEnum)

| 聚合于 | NvBlockNeeds.reliability |

字面值 说明
errorCorrection Errors shall be corrected Tags: atp.EnumerationLiteralIndex=0
errorDetection Errors shall be detected Tags: atp.EnumerationLiteralIndex=1
noProtection Data need not to be handled with protection Tags: atp.EnumerationLiteralIndex=2
11.4.5.3. RAM 块与 ROM 块

ramBlock 与 romBlock 由 VariableDataPrototype 与 ParameterDataPrototype 描述:

romBlock 是可选的:

未配置 romBlock:

作为对 NV 内存读取操作失败的缓解,建议始终定义一个带合适初始值的 romBlock,以确保相应 ramBlock 的正确初始化。

特别是,对于未定义由标准化 shortName 为 NotifyInitBlock [36] 的 ClientServerInterface 定义类型的 PortPrototype 的软件组件,可能出现 ramBlock 在失效情况下未被正确初始化的情况。

用于 ramBlock 与 romBlock 的 ImplementationDataType 的兼容性:

NvBlockDescriptor.instantiationDataDefProps 的语义:

这代表了在 NvBlockDescriptor.instantiationDataDefProps 的上下文中覆盖既有 SwDataDefProps(在数据类型层级定义)以微调相应 MCD 信息的另一个用例。glyph[floorright]()

11.4.5.4. NvBlockDataMapping

NvBlockDataMapping:

这确保了由 ramBlock 与 romBlock 的 ImplementationDataType 及其与 NvBlockSwComponentType 的 PortPrototype 的关联所给出的灵活但确定性的 NVRAM 块内存结构。

NvBlockDataMapping 的 ImplementationDataType 的兼容性:

该规则应在 RTE 生成时施加。

角色与 PortPrototype 的适用性对照:

  • 角色 writtenNvData 只应在相应 PortPrototype 是 RPortPrototype 时使用;

  • 角色 writtenReadNvData 只应在相应 PortPrototype 是 PRPortPrototype 时使用;

  • 角色 readNvData 只应在相应 PortPrototype 是 PPortPrototype 时使用。

尽管如此,NvBlockDescriptor 在角色 ramBlock 中聚合的 VariableDataPrototype 内并非所有 ImplementationDataTypeElement 都映射到位于某个 PortPrototype 中的 VariableDataPrototype,这是有效的。

这使得 NVRAM 块中可以存在软件组件不访问的填充元素或后勤数据。图 11.13 中的元素 x 即为例证。

请注意,位于 PortPrototype 中的 VariableDataPrototype 在绝大多数情况下将由 ApplicationDataType 定义类型,而后者(至少在实际代码生成开始之前)最终应映射到 ImplementationDataType。这一方面在第 5.2.2 章解释。

VariableDataPrototype 到 NvBlockDescriptor 的映射:

  • NvDataInterface.nvData 直接且完整地映射,即 AutosarVariableRef.autosarVariable 应存在,且 autosarVariable.targetDataPrototype 应引用该 NvDataInterface.nvData。

  • NvDataInterface.nvData 的每个叶子元素单独映射。这意味着要么

  • AutosarVariableRef.autosarVariableInImplDatatype 应存在,且 autosarVariableInImplDatatype.targetDataPrototype 应引用 NvDataInterface.nvData 的相应叶子元素;

  • AutosarVariableRef.autosarVariable 应存在,且 autosarVariable.targetDataPrototype 应引用 NvDataInterface.nvData 的相应叶子元素。

换言之:映射应要么经由所使用的 ImplementationDataType 定义,要么经由所使用的 ApplicationDataType 定义。

  • NvDataInterface.nvData 的一个子元素——它不是叶子元素——可以直接映射,因而 NvDataInterface.nvData 相应子元素的所有叶子元素也间接映射。这意味着

  • AutosarVariableRef.autosarVariableInImplDatatype 应存在,且 autosarVariableInImplDatatype.targetDataPrototype 应引用 NvDataInterface.nvData 的该子元素;

  • AutosarVariableRef.autosarVariable 应存在,且 autosarVariable.targetDataPrototype 应引用 NvDataInterface.nvData 的该子元素。

换言之:映射应要么经由所使用的 ImplementationDataType 定义,要么经由所使用的 ApplicationDataType 定义。

请注意,[TPS_SWCT_01659] 所描述的、对整个子元素或叶子元素使用互斥映射的混合是明确支持的(见图 11.13)。

NvBlockDataMapping 应完整:

到给定 nvData 的 NvBlockDataMapping 应无歧义:

与 AUTOSAR 服务的交互集中在 SwcServiceDependency 的上下文中定义。后者借助实现紧密相关服务功能的 RoleBasedPortAssignment 汇集一组 PortPrototype。

| nvData | ramBlock |

| a | nvData root | | b | nvData root | | h | leaf element | | j | leaf element | | s | sub-element |

在 AtomicSwComponentType 与 NvBlockSwComponentType 交互的特定情况下(如 [TPS_SWCT_02503] 所描述),存在由 RoleBasedPortAssignment 引用、属性 RoleBasedPortAssignment.role 设置为 NvDataPort 的 PortPrototype。这些 PortPrototype 包含该服务用例汇集的 NV 数据。

此外,还存在当被映射 NV 块到 NvRam 的写入完成时接收通知的可能性。

VariableInAtomicSWCTypeInstanceRef . rootVariableDataPrototype in the context of NvBlockDataMapping . nvRamBlockElement 的存在性:

因此,VariableInAtomicSWCTypeInstanceRef.rootVariableDataPrototype 在 NvBlockDataMapping.nvRamBlockElement 的上下文中应被忽略。glyph[floorright]()

为了能够把这样的通知恰当分配给同一 SwcServiceDependency 范围内相关 Nv 数据 PortPrototype 的内容,必须把所有这些 PortPrototype 的 Nv 数据映射到同一个 Nv 块(因为通知是按块创建的)。

这一方面代表了 [constr_1404] 存在的一个动机:

特定 SwcServiceDependency 上下文中 PortPrototype 的所有 NvDataInterface.nvData 应映射到同一 NvBlockDescriptor:

该规则应在 RTE 生成时施加。

[constr_1404] 所作的陈述可视化于图 11.14。界定上下文的模型元素,即 AtomicSwComponentType 拥有的 SwcServiceDependency 与 NvBlockSwComponentType 拥有的 NvBlockDescriptor,以浅橙色着色。

该图聚焦于 NvBlockDescriptor.ramBlock。如 [constr_1404] 所强调,由特定 SwcServiceDependency 引用的 PortPrototype 提供的所有 Nv 数据最终都进入所描绘的那一个 ramBlock(以蓝色着色)。

请注意,图 11.14 中 NvBlockDataMapping 的图形表示为清晰起见已简化。

总而言之,实际上有整列表的动机导致 [constr_1404] 的创立:

  • RTE 内脏标记(dirty-flag)的处理在 PortPrototype 的上下文中完成。

  • 当前实现的方法让人容易理解应用中数据与 NV-RAM 中数据的关系。

  • 同一 SwcServiceDependency 上下文中的所有数据具有相同的存储生命周期。

  • 经由 NvMService(见 [SWS_NvM_00734])接口中的操作在 NvM 中触发的作业恰好属于一个 NvBlockDescriptor。

  • 如前所述,NvM 向软件组件的通知(例如 [SWS_NvM_00735] 描述的 NvMNotifyJobFinished 或 NvMNotifyInitBlock,见 [SWS_NvM_00736])恰好属于一个 NvBlockDescriptor。

instance reference NvBlockDataMapping . nvRamBlockElement 的存在性:

请注意,非易失性 RAM 中存在大量细粒度(例如单个位)数据的用例。为此,把至少 8 位长的整个 DataPrototype 的值复制到非易失性 RAM 将非常低效。

更好的方法是允许把 PortPrototype 中 DataPrototype 内的单个位或位域直接映射到 NvBlockDescriptor 的 ramBlock。

为此,NvBlockDataMapping 提供属性 bitfieldTextTableMaskNvBlockDescriptor 与 bitfieldTextTableMaskPortPrototype。

NvBlockDescriptor 与 PortPrototype 之间的位域映射:

在这种情况下,[constr_2013] 不适用。glyph[floorright]()

在 NvBlockSwComponentType 的上下文中把位域相互映射的一般方法勾勒于图 11.17。

表11.14:NvBlockDataMapping(NvBlockDataMapping)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::NvBlockComponent | | 说明 | Defines the mapping between the VariableDataPrototypes in the NvBlockComponents ports and the VariableDataPrototypes of the RAM Block. The data types of the referenced VariableDataPrototypes in the ports and the referenced sub-element (inside a CompositeDataType) of the VariableDataPrototype representing the RAM Block shall be compatible. | | 基类 | ARObject | | 聚合于 | BulkNvDataDescriptor.nvBlockDataMapping, NvBlockDescriptor.nvBlockDataMapping |

4 这种方法的替代方案本应是把这一 “蒸馏过程” 转移到例如 ApplicationSwComponentType 与 NvBlockSwComponentType 之间的连接中。

这样的方法带有明显更重的副作用与复杂性(用于 DelegationSwConnector 或作为网络连接的一部分),因此不受支持。

表11.15:NvBlockDataMapping(NvBlockDataMapping)

属性 类型 多重性 种类 备注
bitfieldTextTable MaskNvBlock Descriptor PositiveInteger 0..1 attr This attribute identifies the applicable bit mask on the side of the Nv Block.
bitfieldTextTable MaskPort Prototype PositiveInteger 0..1 attr This attribute identifies the applicable bit mask on the side of the PortPrototype.
nvRamBlock Element AutosarVariableRef 0..1 aggr Reference to a VariableDataPrototype of a RAM Block.
readNvData AutosarVariableRef 0..1 aggr Reference to a VariableDataPrototype of a pPort of the NvBlockComponent providing read access to the RAM Block.If there is no PortPrototype providing read access (write-only) the reference can be omitted.
writtenNvData AutosarVariableRef 0..1 aggr Reference to a VariableDataPrototype of a rPort of the Nv BlockComponent providing write access to the RAM Block. If there is no port providing write access (read-only) the reference can be omitted.
writtenReadNv Data AutosarVariableRef 0..1 aggr Reference to a VariableDataPrototype of a PRPort Prototype of the NvBlockSwComponentType providing write and read access to the RAM Block.
11.4.5.5. Client/Server 端口

NvBlockDescriptor 的 RoleBasedPortAssignment:

NvBlockDescriptor.clientServerPort.role 的限制:

[constr_2014] 存在的依据:NvBlockDescriptor.clientServerPort 的职责是限定 NvBlockSwComponentType 上与 [TPS_SWCT_02501]、[TPS_SWCT_02502]、[TPS_SWCT_02503] 和 [TPS_SWCT_02504] 所记录服务用例描述的 PortPrototype 交互的 PortPrototype。

对通知而言,RTE 为属性 role 定义的每种单独通知提供一个公共回调函数。

与给定 NvBlockDescriptor 相关的 PPortPrototype 需要为 PortDefinedArgumentValue 提供相同的值,以使软件正确工作。PortDefinedArgumentValue 的提供是启发式的,但通过进一步的 “技巧” 可以大幅提高这一操作的可靠性。

对给定 NvBlockDescriptor 的所有属性 role 设置为值 NvMService 或 NvMAdmin 的 NvBlockDescriptor.clientServerPort,如果相应 PortPrototype 是 PPortPrototype,则收集它。所得的 PortPrototype 集合需要提供相同的值(PortDefinedArgumentValue)。

在这种情况下,不再需要为这些 PortPrototype 显式建模 PortDefinedArgumentValue 的存在,因为 NvM 的适用 id 值可以由 RTE 配置派生。

为使这一方法有效,role 值需要标准化,见 [constr_2014]。

11.4.6. BulkNvDataDescriptor

有一个很强的用例:应用软件获得对位于非易失性内存中的大尺寸数据的只读访问。实际数据的创建或更新例如在生产线的末端,或可能在车间的维护期间。

如果要使用 NvBlockDescriptor 实现这样的场景,则在非易失性内存中创建数据的 RAM 镜像将是强制性的。但如前所述,在该用例中 RAM 镜像的存在完全没有必要,只会浪费大量宝贵资源。

因此,有必要在元模型中把使用 NvBlockDescriptor 的用例与对非易失性内存的直接只读访问清楚地分开。

为此,元类 BulkNvDataDescriptor 的存在提供了模型支持,它在角色 bulkNvDataDescriptor 中聚合于 NvBlockSwComponentType。这一建模描绘于图 11.19。

atpContextElement}

聚合 NvBlockSwComponentType.bulkNvDataDescriptor 的语义:

对这一数据块的访问直接从非易失性内存提供,而不是经由 RAM 镜像。glyph[floorright](RS_SWCT_03225)

NvBlockSwComponentType.bulkNvDataDescriptor 与 NvBlockSwComponentType.nvBlockDescriptor 的同时聚合:

NvBlockDataMapping 在 BulkNvDataDescriptor 上的应用:

也支持只把 BulkNvDataDescriptor 内容的一个子集提供给 PPortPrototype。glyph[floorright](RS_SWCT_03225)

BulkNvDataDescriptor 拥有的 NvBlockDataMapping 上下文中 AutosarVariableRef 聚合的限制:

(其)转而引用 BulkNvDataDescriptor.bulkNvBlock(……)在 RTE 生成时。glyph[floorright]()

当然,[constr_1285] 也适用于 BulkNvDataDescriptor 的使用。

表11.16:BulkNvDataDescriptor(BulkNvDataDescriptor)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::NvBlockComponent | | 说明 | This meta-class represents one bulk NV Data Block that is read-only for the application software. The purpose of a bulk NV Data Block is to provide access to information uploaded to the vehicle at e.g. the end of the production line. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, NvBlockSwComponentType.bulkNvDataDescriptor |

属性 类型 多重性 种类 备注
bulkNvBlock VariableDataPrototype 0..1 aggr This aggregation represents the actual bulk NVBlock.
nvBlockData Mapping NvBlockDataMapping * aggr Defines the mapping between the VariableData Prototypes in the NvBlockComponents ports and the VariableDataPrototypes of the non-volatile memory. The aggregation of NvBlockDataMapping is subject to variability with the purpose to support the conditional existence of nv data ports. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=nvBlockDataMapping, nvBlockData Mapping.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

11.4.7. NvBlockSwComponentType 的 SwcInternalBehavior

用于启用对 NVRAM 块管理 API 访问的 NvBlockSwComponentType 的 InternalBehavior:

主要用例是 NvBlockSwComponentType 定义由 ClientServerInterface 定义类型的 PPortPrototype,以启用对 NVRAM 块管理 API 的访问。

为支持在 RTE 的 ECU 配置中配置服务器调用,NvBlockSwComponentType 需要提供以下模型元素:

  • OperationInvokedEvent;

  • 服务器 RunnableEntity;

  • 用于定义必须传给 NvM 的 NVRAM 块 ID 的 PortDefinedArgumentValue。

除上述清单外,其他模型元素也可能符合条件;细节在 [TPS_SWCT_01584] 中解释。glyph[floorright]()

InternalBehavior 没有更多属性:

用于实现写入策略的 NvBlockSwComponentType 的 InternalBehavior:

特别是,除 [TPS_SWCT_01150] 所列模型元素外,以下模型元素清单可用于 NvBlockSwComponentType 的 InternalBehavior 中实现写入策略:

  • TimingEvent(可以包括角色 disabledMode 中对 ModeDeclaration 的引用);

  • DataReceivedEvent(可以包括角色 disabledMode 中对 ModeDeclaration 的引用);

  • SwcModeSwitchEvent;

  • RunnableEntity。

glyph[floorright](RS_SWCT_03225)

RunnableEntity 没有更多属性:

RunnableEntity.symbol 的值:

该规则应在 RTE 生成时施加。

例如,NvBlockSwComponentType 拥有的 RunnableEntity.symbol 可以合理地设置为 NvM_ReadBlock [36],但像 ReadThisBlock 这样的任意值是不允许的。

[constr_1234] 的依据是:由 OperationInvokedEvent 触发的 RunnableEntity 并不作为这样的实体存在,而是映射到 NvM 的相应函数调用。关于如何实现这一映射的更多细节请参阅 [6]。

请注意,对由 OperationInvokedEvent 之外的 RTEEvent 触发的、NvBlockSwComponentType 拥有的任何 RunnableEntity,属性 RunnableEntity.symbol 的值不适用限制。

NvBlockSwComponentType 的 SwcInternalBehavior 的限制:

  • OperationInvokedEvent;

  • 由 OperationInvokedEvent 触发的 RunnableEntity(服务器 RunnableEntity);

  • 只定义强制属性 symbol 与 canBeInvokedConcurrently 的 RunnableEntity;

  • 定义 PortDefinedArgumentValue 的 PortAPIOption;

  • TimingEvent(可以包括角色 disabledMode 中对 ModeDeclaration 的引用);

  • DataReceivedEvent(可以包括角色 disabledMode 中对 ModeDeclaration 的引用);

  • SwcModeSwitchEvent;

  • 由 TimingEvent 触发的 RunnableEntity;

  • 由 DataReceivedEvent 触发的 RunnableEntity;

  • 由 SwcModeSwitchEvent 触发的 RunnableEntity;

  • DataTypeMappingSet。

该规则应在 RTE 生成时施加。

NvBlockDescriptor . timingEvent 的存在性:

注意,两个属性 NvBlockDescriptor.timingEvent.period 与 SwcServiceDependency.serviceNeeds.cyclicWritingPeriod 的值之间存在概念上的联系。

具体地说,SwcServiceDependency.serviceNeeds.cyclicWritingPeriod 表示一个需求,而 NvBlockDescriptor.timingEvent.period 应满足该需求。

NvBlockDescriptor.timingEvent.period 的相关性:

NvBlockSwComponentType 内 DataTypeMappingSet 的适用性:

12. 软件组件文档

AUTOSAR 通过把 ASAM-FSX [37] 标准的原则移植到 AUTOSAR 来支持软件组件类型的文档化。

从 AUTOSAR 4.0 版起,AUTOSAR XML schema 提供对集成且结构良好文档化的支持。

关于 AUTOSAR 文档支持概念的更多细节见《AUTOSAR 通用结构模板》[11]。

软件组件的文档化:

一些章节是预定义的,从对组件执行的不同活动的视角描述组件,例如:

  • 测试它(swTestDesc);

  • 维护它(swMaintenanceNotes);

  • 标定它(swCalibrationNotes);

  • 执行诊断(swDiagnosticsNotes)。

SwComponentType 的文档化显示于图 12.1。

另外两个预定义章节描述组件(swFeatureDesc)并定义其物理功能(swFeatureDef)。

为描述软件组件的其他方面,可以定义任意数量的自由章节。

预定义章节通常提供非正式的指南(例如建议)或文档。

形式化信息可以用特殊数据组 [11] 捕获,或用语义信息注解文档构造。这可以用于扩展预定义章节或用于单独的自由章节。

注意,软件组件的文档可以存储在与组件本身不同的文件中(即,它相对组件是 <atpSplitable> 的)。

每个预定义与自由章节都遵循 <atpVariation> 构造型,以支持章节层级文档上的变体处理(见 [11])。

这些 VariationPoint 把最晚绑定时间设置为值 AdditionalBindingTimeEnum.postBuild,因为包含或排除一个章节、以及应包含该章节哪个变体的决定可以在组件构建完成时做出。

表12.1:SwComponentDocumentation(SwComponentDocumentation)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SoftwareComponentDocumentation | | 说明 | This class specifies the ability to write dedicated documentation to a component type according to ASAM FSX. | | 基类 | ARObject | | 聚合于 | BswModuleDescription.bswModuleDocumentation, SwComponentType .swComponentDocumentation |

属性 类型 多重性 种类 备注
chapter Chapter * aggr These chapters provide additional information about the software component that do not fit in the other chapters. Note that this is subject to variation because Chapter aggregations in the role chapter are variant within the documentation in general. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=chapter.shortName, chapter.variation Point.shortLabel vh.latestBindingTime=postBuild xml.roleElement=true xml.roleWrapperElement=false xml.sequenceOffset=100 xml.typeElement=false
swCalibration Notes Chapter 0..1 aggr This element contains calibration instructions and hints for a calibration engineer. Tags: xml.roleElement=true xml.sequenceOffset=60 xml.typeElement=false
swCarbDoc Chapter 0..1 aggr This element records the documentation requested by CARB. Tags: xml.roleElement=true xml.sequenceOffset=80 xml.typeElement=false
swDiagnostics Notes Chapter 0..1 aggr This element contains general information about diagnostics issues within the component. Tags: xml.roleElement=true xml.sequenceOffset=75 xml.typeElement=false
Class SwComponentDocumentation
swFeatureDef Chapter 0..1 aggr This element contains the definition of the physical functionality of this software component. This definition is more or less formal and is intended to be delivered from modeling tools. Tags: xml.roleElement=true xml.sequenceOffset=20 xml.typeElement=false
swFeatureDesc Chapter 0..1 aggr This element contains the textual description of the software functionality of this software component. Expert should write this description. Tags: xml.roleElement=true xml.sequenceOffset=30 xml.typeElement=false
swMaintenance Notes Chapter 0..1 aggr This element contains information regarding the software maintenance of the component. Tags: xml.roleElement=true xml.sequenceOffset=70 xml.typeElement=false
swTestDesc Chapter 0..1 aggr This element contains suggestions and hints for the test of the software functionality of this software component. Tags: xml.roleElement=true xml.sequenceOffset=50 xml.typeElement=false

表12.2:Chapter(Chapter)

| 包 | M2::MSR::Documentation::Chapters | | 说明 | This meta-class represents a chapter of a document. Chapters are the primary structuring element in documentation. | | 基类 | ARObject , DocumentViewSelectable , Identifiable , MultilanguageReferrable , Paginateable , Referrable | | 聚合于 | ChapterOrMsrQuery.chapter, MsrQueryResultChapter.chapter, SwComponentDocumentation.chapter, SwComponentDocumentation.swCalibrationNotes, SwComponentDocumentation.swCarbDoc, Sw ComponentDocumentation.swDiagnosticsNotes, SwComponentDocumentation.swFeatureDef, Sw ComponentDocumentation.swFeatureDesc, SwComponentDocumentation.swMaintenanceNotes, Sw ComponentDocumentation.swTestDesc, System.systemDocumentation |

属性 类型 多重性 种类 备注
chapterModel ChapterModel 1 aggr This represents the overall contents of the chapter. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.typeElement=false xml.typeWrapperElement=false

glyph[triangle]

表12.3:Chapter(Chapter)

属性 类型 多重性 种类 备注
helpEntry String 0..1 attr This specifies an entry point in an online help system to be linked with the parent class. The syntax shall be defined by the applied help system respectively help system generator. Maybe it is a concatenated Identifier, but as of now we leave it as an arbitrary string. Tags: xml.attribute=true

表12.4:ChapterModel(ChapterModel)

| 包 | M2::MSR::Documentation::Chapters | | 说明 | This is the basic content model of a chapter except the Chapter title. This can be utilized in general chapters as well as in predefined chapters. A chapter has content on three levels: 1. chapter content 2. topics 3. subchapters | | 基类 | ARObject | | 聚合于 | Chapter.chapterModel, PredefinedChapter.chapterModel |

属性 类型 多重性 种类 备注
chapter ChapterOrMsrQuery 0..1 aggr This is a particular subchapter. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=200 xml.typeElement=false xml.typeWrapperElement=false
chapterContent ChapterContent 0..1 aggr This is the chapter content which is not a topic or a subchapter. It is the content which is directly in the chapter. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=30 xml.typeElement=false
topic1 TopicOrMsrQuery 0..1 aggr This is a topic within the chapter. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=170 xml.typeElement=false xml.typeWrapperElement=false

表12.5:AdditionalBindingTimeEnum(AdditionalBindingTimeEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This enumeration specifies the additional binding times applicable for vh.latestBindingTime of variation points. |

字面值 说明
blueprintDerivation Time The point in time when an object is created from a blueprint. Tags: atp.EnumerationLiteralIndex=0
postBuild After the executable has been built. Tags: atp.EnumerationLiteralIndex=1

13. 服务依赖与服务用例

13.1. 概述

元类 SwcServiceDependency 表示描述 AtomicSwComponentType 服务相关能力的强大概念。

仍需要理解如何为特定服务用例配置 SwcServiceDependency 及相关元类。

本章在特定服务用例的上下文中包含与 SwcServiceDependency 相关元类的详细描述,以及配置相应服务用例的建模提示。

13.2. NvM 服务依赖

元类 NvBlockNeeds 用于定义配置 NVRAM 管理器服务的需求。此外,它可以定义 RTE 应如何实现 NvBlockSwComponentType 写入策略的需求。

SwcInternalBehavior 可以提供若干 SwcServiceDependency,后者继而聚合 NvBlockNeeds 元素,每个 NvBlockNeeds 定义来自一个 NVRAM 块的需求(关于 AUTOSAR NVRAM 管理器的更多信息见 [36])。

解释 NVRAM 管理器服务 ServiceNeeds 建模的图见 11.12。

软件组件与 NVRAM 管理器服务交互有若干用例。每个用例在单独的小节讨论。

表13.1:RamBlockStatusControlEnum(RamBlockStatusControlEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::NvBlockComponent | | 说明 | This enumeration type defines options for how the management of the ramBlock status is controlled. | | 聚合于 | NvBlockNeeds.ramBlockStatusControl |

字面值 说明
api The ramBlock status is controlled via service interface by usage of the SetRamBlockStatus operation. Tags: atp.EnumerationLiteralIndex=0
nvRamManager The ramBlock status is controlled exclusively by the Nv Ram Manager. Tags: atp.EnumerationLiteralIndex=1

13.2.1. NvM 用例:永久 RAM 块

场景:AtomicSwComponentType 使用带永久 RAM 块的 NVRAM 块,该块由 PerInstanceMemory 部分或角色 arTypedPerInstanceMemory 中的 VariableDataPrototype 实现。无论哪种情况,永久 RAM 块所需的内存都由 RTE 在 ECU 配置期间分配。

在这种情况下适用以下规则:

[TPS_SWCT_02501] NvM 用例的设置:永久 RAM 块

RoleBasedPortAssignment:

对 NvM 提供的每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment,并把 RoleBasedPortAssignment 的属性 role 的值设置为所用标准化 ClientServerInterface 的名称。以下 ClientServerInterface 应(即下多重性 > 0)或可以(下多重性 = 0)在此上下文中使用:

  • NvmService [0 .. 1];

  • NvMNotifyJobFinished [0 .. 1];

  • NvMNotifyInitBlock [0 .. 1];

  • NvMAdmin [0 .. 1]。

RoleBasedDataAssignment:

应创建 RoleBasedDataAssignment,要么引用角色 usedPim 中的 PerInstanceMemory,要么引用角色 usedDataElement 中的 VariableDataPrototype。RoleBasedDataAssignment 的属性 role 的值应设置为 ramBlock。

可选地,可以创建额外的 RoleBasedDataAssignment,引用角色 usedParameterElement 中的 ParameterDataPrototype。该 ParameterDataPrototype 的值随后被取为 NVRAM 块的初始或默认值。在这种情况下,RoleBasedDataAssignment 的属性 role 的值应设置为 defaultValue。

因此,适用以下角色:

  • ramBlock [1];

  • defaultValue [0 .. 1]。

RepresentedPortGroup:

不适用

更多信息请参阅 [SWS_NvM_00734]、[SWS_NvM_00735]、[SWS_NvM_00736] 与 [SWS_NvM_00737]。

同一机制(见场景描述)也适用于 NvBlockSwComponentType。对每个 NVRAM 块,可以配置 NVRAM 管理器(借助 SwcServiceDependency.assignedData)使用相同的永久 RAM 块。

NVRAM 管理器的职责是:在启动期间或显式请求时在该永久 RAM 块中提供 NVRAM 块的内容,并在关机期间或显式请求时把内容写回存储介质。

13.2.2. NvM 用例:临时 RAM 块

场景:AtomicSwComponentType 使用某个带临时 RAM 块的 NVRAM 块。

在这种情况下,AtomicSwComponentType 负责分配足够的内存。换言之,AtomicSwComponentType 应提供一个内存区域,供对 NVRAM 管理器的 API 调用用于存储 NV 数据。

[TPS_SWCT_02502] NvM 用例的设置:临时 RAM 块

RoleBasedPortAssignment:

这对所述场景是强制的。对 NvM 提供的每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment,并把 RoleBasedPortAssignment 的属性 role 的值设置为所用 ClientServerInterface 的名称。以下 ClientServerInterface 应(即下多重性 > 0)或可以(下多重性 = 0)在此上下文中使用:

  • NvmService [1]。

  • NvMNotifyJobFinished [0 .. 1];

  • NvMNotifyInitBlock [0 .. 1];

  • NvMAdmin [0 .. 1]。

RoleBasedDataAssignment:

使用属性 role 设置为 defaultValue 的 RoleBasedDataAssignment 是可选的,取决于是否需要初始值。

  • defaultValue [0..1]。

RoleBasedDataTypeAssignment:

借此可以定义临时 RAM 块的数据类型。数据类型信息可用于计算 NVRAM 块大小。适用 [constr_1301]。

  • temporaryRamBlock [0..1]。

RepresentedPortGroup:不适用

RoleBasedDataTypeAssignment . role vs. RoleBasedDataAssignment . role 的存在性:

该规则应在 RTE 生成时施加。

[constr_1301] 的依据是:RoleBasedDataAssignment 的存在已经为预期目的提供了足够的信息。RoleBasedDataTypeAssignment 的并行存在因此完全是冗余的,只会导致潜在的不一致。

更多信息请参阅 [SWS_NvM_00734]、[SWS_NvM_00735]、[SWS_NvM_00736] 与 [SWS_NvM_00737]。

13.2.3. NvM 用例:使用镜像接口进行显式同步的 RAM 块

场景:AtomicSwComponentType 使用一个 NVRAM 块,其 RAM 块借助镜像接口使用显式同步。在这种情况下,RAM 块不一定必须通过 PerInstanceMemory 或角色 arTypedPerInstanceMemory 中的 VariableDataPrototype 形式化描述。

因此,软件组件自身负责内存分配。另一方面,这也可能意味着软件组件可以使用若干 RAM 块而不是只有一个 RAM 块。

NvM 用例的设置:使用镜像接口显式同步的 RAM 块:

RoleBasedPortAssignment:

这对所述场景是强制的。对 NvM 提供的每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment,并把 RoleBasedPortAssignment 的属性 role 的值设置为所用 ClientServerInterface 的名称。以下 ClientServerInterface 应(即下多重性 > 0)或可以(下多重性 = 0)在此上下文中使用:

  • NvMService [0..1];

  • NvMNotifyJobFinished [0..1];

  • NvMNotifyInitBlock [0..1];

  • NvMAdmin [0..1];

  • NvMMirror [1]。

RoleBasedDataAssignment:

在这一场景中,RoleBasedDataAssignment 的存在是可选的。RoleBasedDataAssignment 需要引用外层 SwcInternalBehavior 在角色 perInstanceParameter 或 sharedParameter 中聚合的 ParameterDataPrototype。

  • defaultValue [0..1]。

RoleBasedDataTypeAssignment:

借此可以分别定义临时 RAM 块的数据类型以及与 NvMMirror 接口显式同步情况下的内部数据结构。数据类型信息可用于计算 NVRAM 块大小与最小永久 RAM 块大小。适用 [constr_1301]。

  • temporaryRamBlock [0..1]。

RepresentedPortGroup:

不适用

更多信息请参阅 [SWS_NvM_00734]、[SWS_NvM_00735]、[SWS_NvM_00736]、[SWS_NvM_00737] 与 [SWS_NvM_00738]。

13.2.4. NVM 用例:软件组件使用由 NvBlockSwComponentType 提供的 NV 数据(不是 NvM 的 ServiceSwComponent)

场景:AtomicSwComponentType 使用由 NvBlockSwComponentType 管理的 NVRAM 块(见第 11.4.2 节,相对于由 ServiceSwComponentType 提供的 NVRAM 块)。适用约束 [constr_1148]、[constr_1149] 与 [constr_2011]。

[TPS_SWCT_02503] NVM 用例的设置:使用 NvBlockSwComponentType 提供 Nv 数据的软件组件

RoleBasedPortAssignment:

这对所述场景是强制的。对 NvM 提供的每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment,并把 RoleBasedPortAssignment 的属性 role 的值设置为所用 ClientServerInterface 的名称。以下 ClientServerInterface 应(即下多重性 > 0)或可以(下多重性 = 0)在此上下文中使用:

  • NvMService [0..1];

  • NvMNotifyJobFinished [0..1];

  • NvMNotifyInitBlock [0..1];

  • NvMAdmin [0..1];

对软件组件的每个由定义 SwcServiceDependency 的 NvDataInterface 定义类型的 PortPrototype,需要创建一个 RoleBasedPortAssignment,并把属性 assignedPort 的属性 role 的值设置为值 NvDataPort:

  • NvDataPort [1..*]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

为支持这一用例,属性 SwcServiceDependency.category 的值应设置为 NV_BLOCK_COMPONENT。glyph[floorright](RS_SWCT_03225)

更多信息请参阅 [SWS_NvM_00734]、[SWS_NvM_00735]、[SWS_NvM_00736] 与 [SWS_NvM_00737]。注意,NvBlockNeeds(在第 11.4.5 章描述)不在该用例的范围内。

13.3. 看门狗服务依赖

元类 SupervisedEntityNeeds 用于定义配置看门狗服务的需求。与 AUTOSAR 看门狗管理器相关的术语见 [38]。

13.3.1. 看门狗服务用例:本地监督

与看门狗管理器的服务交互包含两个方面:

  • 受监督实体;

  • 检查点。

为这两个方面中的每一个定义了单独的 ServiceNeeds。不过,拥有这些 ServiceNeeds 的 SwcServiceDependency 在语义上绑定,不能彼此独立使用。

换言之,两种 SwcServiceDependency 的协同使用创造了更高层级的语义。当然,为了表达这一更高层级的语义,SwcServiceDependency 之间必须提供引用。

不过,由于 SwcServiceDependency 表示一个通用概念,实际引用需要在特定 ServiceNeeds 子类的层级实现,在这里即 SupervisedEntityNeeds 与 SupervisedEntityCheckpointNeeds。

前者引用后者,以表达受监督实体与其检查点的关系。

表13.2:SupervisedEntityNeeds(SupervisedEntityNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Watchdog Manager for one specific Supervised Entity. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
activateAtStart Boolean 0..1 attr true/false: supervision activation status of Supervised Entity shall be enabled/disabled at start.
checkpoints SupervisedEntity CheckpointNeeds * ref This reference indicates the checkpoints belonging to the Supervised Entity. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=checkpoints.supervisedEntityCheckpoint Needs, checkpoints.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
enable Deactivation Boolean 0..1 attr true: software-component shall be allowed to deactivate supervision of this SupervisedEntity false: software-component shall be not allowed to deactivate supervision of this SupervisedEntity
expectedAlive Cycle TimeValue 0..1 attr Expected cycle time of alive trigger of this Supervised Entity (in seconds).
maxAliveCycle TimeValue 0..1 attr Maximum cycle time of alive trigger of this Supervised Entity (in seconds).
minAliveCycle TimeValue 0..1 attr Minimum cycle time of alive trigger of this Supervised Entity (in seconds).

表13.3:SupervisedEntityNeeds(SupervisedEntityNeeds)

属性 类型 多重性 种类 备注
toleratedFailed Cycles PositiveInteger 0..1 attr Number of consecutive failed alive cycles for this SupervisedEntity which shall be tolerated until the supervision status of the SupervisedEntity is set to WDGM_ALIVE_EXPIRED (see SWS WdgM for more details). Note that this value has to be recalculated with respect to the WdgM's own cycle time for ECU configuration.

the reference SupervisedEntityNeeds . toleratedFailedCycles 的存在性:

表13.4:SupervisedEntityCheckpointNeeds(SupervisedEntityCheckpointNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Watchdog Manager to support a Checkpoint for a Supervised Entity. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.3.2. 看门狗服务用例:全局监督状态通知

场景:AtomicSwComponentType 要求接收由所有个体受监督实体组合而成的全局监督状态。在这种情况下适用以下设置:

要求全局监督状态通知的 AtomicSwComponentType 的设置:

RoleBasedPortAssignment 有效角色:

  • WdgM_GlobalMode [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_WdgM_00336]。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

13.3.3. 看门狗服务用例:控制全局监督或获取全局监督状态

场景:AtomicSwComponentType 要么控制看门狗管理器的全局运作、要么获取当前运作状态的信息,需要以下用例中至少一个:

  • 设置看门狗管理器的当前模式;

  • 获取看门狗管理器的当前模式;

  • 获取看门狗管理器的全局监督状态;

  • 首先到达过期状态的受监督实体的标识符;

  • 指示看门狗管理器引发看门狗复位。

例如,软件组件根据 ECU 的运行状态设置看门狗管理器的当前模式,或轮询全局监督状态。

在这种情况下适用以下设置:

设置或获取全局监督状态的 AtomicSwComponentType 的设置:

ServiceNeeds 种类:

GlobalSupervisionNeeds

RoleBasedPortAssignment 有效角色:

  • WdgM_GlobalSupervision [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.5:GlobalSupervisionNeeds(GlobalSupervisionNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Watchdog Manager to get access on the Global Supervision control and status interface. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.3.4. 看门狗服务用例:软件组件希望获取本地监督的状态

场景:软件组件想获取局部监督的状态。为此,它向 WdgM 暴露一个由 ClientServerInterface WdgM_LocalSupervisionStatus 定义类型的 RPortPrototype。

[TPS_SWCT_01704] 受监督实体的定义

ServiceNeeds 种类:

SupervisedEntityNeeds

RoleBasedPortAssignment 有效角色:

  • WdgM_LocalSupervisionStatus [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,SwcInternalBehavior 可以提供若干 SupervisedEntityNeeds 元素,每个元素定义与一个受监督实体相关的需求。

注意,在这种情况下 AtomicSwComponentType 包含若干引用一个受监督实体的检查点。

在这种情况下,要求该受监督实体向看门狗管理器指示该检查点的存在(供配置用),并在运行时指示该受监督实体已到达该检查点。

更多信息请参阅 [SWS_WdgM_91004]。

13.3.5. 看门狗服务用例:软件组件希望上报检查点

场景:软件组件想向 WdgM 报告一个检查点。为此,软件组件向 WdgM 暴露一个 RPortPrototype。

[TPS_SWCT_01705] 检查点的定义

ServiceNeeds 种类:

SupervisedEntityCheckpointNeeds

RoleBasedPortAssignment 有效角色:

  • WdgM_LocalSupervision [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:不适用

请注意,该场景涵盖单个检查点的报告。在许多情况下,给定受监督实体的上下文中会报告若干检查点。

更多信息请参阅 [SWS_WdgM_00333]。

13.4. COM 管理器服务需求

元类 ComMgrUserNeeds 用于定义配置 ComM 服务的需求。

SwcInternalBehavior 可以提供若干 ComMgrUserNeeds 元素,每个元素定义来自 ComM 服务一个 “用户” 的需求。特别是,它规定哪个 PortGroup 与该 “用户” 关联。

表13.6:ComMgrUserNeeds(ComMgrUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Communication Manager for one "user". | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
maxComm Mode MaxCommModeEnum 0..1 attr Maximum communication mode requested by this ComM user.

表13.7:MaxCommModeEnum(MaxCommModeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Maximum bus communication mode required by a user of the Communication Manager Service. | | 聚合于 | ComMgrUserNeeds.maxCommMode |

字面值 说明
full Full communication is requested. Tags: atp.EnumerationLiteralIndex=0
none No communication is requested. Tags: atp.EnumerationLiteralIndex=1
silent Silent communication is requested: Only listening but not "talking". Tags: atp.EnumerationLiteralIndex=2

13.4.1. ComM 用例:读取当前 ComM 模式

场景:AtomicSwComponentType 读取当前 ComM 模式。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

在这种情况下适用以下规则:

AtomicSwComponentType 读取当前 ComM 模式:

RoleBasedPortAssignment 有效角色:

  • ComM_CurrentMode [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

更多信息请参阅 [SWS_ComM_00847]。

13.4.2. ComM 用例:请求 ComM 模式

场景:AtomicSwComponentType 请求一个 ComM 模式。它也可以稍后检查所请求的 ComM 模式是否已生效。

在这种情况下适用以下规则:

AtomicSwComponentType 请求一个 ComM 模式。它也可以稍后检查所请求的 ComM 模式是否已生效:

RoleBasedPortAssignment 有效角色:

  • ComM_CurrentMode [1]。

  • ComM_UserRequest [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

对适用 PortGroup 的引用 [0..1]

更多信息请参阅 [SWS_ComM_00848]。

13.4.3. ComM 用例:软件组件充当影响 ECU 状态的模式管理器

场景:AtomicSwComponentType 充当影响 ECU 状态的模式管理器。

在这种情况下适用以下规则:

AtomicSwComponentType 充当影响 ECU 状态的模式管理器:

RoleBasedPortAssignment 有效角色:

  • ComM_CurrentMode [0..1];

  • ComM_UserRequest [0..1];

  • ComM_ECUModeLimitation [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

更多信息请参阅 [SWS_ComM_00741]。

13.4.4. 读取 PNC ComM 模式

场景:AtomicSwComponentType 读取当前 PNC ComM 模式。

[TPS_SWCT_01811] AtomicSwComponentType 读取当前 PNC ComM 模式

ServiceNeeds 种类:ComMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • ComM_UserRequest [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

对与特定部分网络关联的适用 PortGroup 的引用。

glyph[floorright](RS_SWCT_03200)

为澄清起见,两个服务用例描述 [TPS_SWCT_01019] 与 [TPS_SWCT_01811] 的区别在于:后者在 PNC 定义的上下文中读取 ComM 模式,而前者不考虑部分网络。

13.5. ECU 状态管理器服务需求

元类 EcuStateMgrUserNeeds 用于定义配置 ECU 状态管理器服务的需求。

SwcInternalBehavior 可以提供若干 EcuStateMgrUserNeeds 元素,每个元素定义来自 EcuM 服务一个 “用户” 的需求(与 AUTOSAR ECU 状态管理器相关的术语见 [39])。

表13.8:EcuStateMgrUserNeeds(EcuStateMgrUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the ECU State Manager for one "user". This class currently contains no attributes. Its name can be regarded as a symbol identifying the user from the viewpoint of the component or module which owns this class. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.5.1. EcuM 用例:读取当前 ECU 模式

场景:AtomicSwComponentType 读取当前 ECU 模式。

在这种情况下适用以下规则:

AtomicSwComponentType 读取当前 ECU 模式:

RoleBasedPortAssignment 有效角色:

  • EcuM_CurrentMode [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup

不适用

13.5.2. EcuM 用例:请求某个 ECU 状态

场景:AtomicSwComponentType 需要维持 ECU 存活、或需要在 ECU 关闭之前执行操作。为此,AtomicSwComponentType 可以请求状态 RUN 或 POST_RUN。

在这种情况下适用以下规则:

[TPS_SWCT_01857] AtomicSwComponentType 应维持 ECU 存活

AtomicSwComponentType 需要维持 ECU 存活、或需要在 ECU 关闭之前执行操作。

RoleBasedPortAssignment 有效角色:

  • EcuM_StateRequest [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

13.5.3. EcuM 用例:选择关机目标

场景:AtomicSwComponentType 想选择一个关机目标。

在这种情况下适用以下规则:

AtomicSwComponentType 想选择一个关机目标:

RoleBasedPortAssignment 有效角色:

  • EcuM_ShutdownTarget [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

13.5.4. EcuM 用例:选择启动目标

场景:AtomicSwComponentType 想选择一个启动目标。

在这种情况下适用以下规则:

AtomicSwComponentType 想选择一个启动目标:

RoleBasedPortAssignment 有效角色:

  • EcuM_BootTarget [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

13.5.5. EcuM 用例:使用闹钟

场景:AtomicSwComponentType 想使用一个闹钟。

在这种情况下适用以下规则:

AtomicSwComponentType 想使用一个闹钟:

RoleBasedPortAssignment 有效角色:

  • EcuM_AlarmClock [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

不适用

13.6. BswM

应用软件组件与 BswM 交互的所有用例都要求在 SwcServiceDependency 处以角色 serviceNeeds 聚合 BswMgrNeeds——ServiceNeeds 的一个子类。

表13.9:BswMgrNeeds(BswMgrNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Basic Software Manager for one "user". | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.6.1. 部分网络(Partial Networking)

SwcServiceDependency 相对于与 BswM 交互的一个特定用例是对部分网络的支持,特别是 PortGroup 与充当 VFC 控制端口和 VFC 状态端口的相关 PortPrototype 的关联。

更多细节请参阅第 4.8 节。

在这种情况下适用以下规则:

[TPS_SWCT_01126] 经由 BswM 访问部分网络

RoleBasedPortAssignment 有效角色:

  • control [0 .. 1];

  • status [0 .. 1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

对与特定部分网络关联的适用 PortGroup 的引用。

这一情况下 RoleBasedPortAssignment 的多重性是在这样的假定下定义的:给定软件组件可以有也可以没有 VFC 控制端口;同样,它可以有 VFC 状态端口。从技术上讲,每个软件组件可能有若干 VFC 状态端口,但最可能只有一个 VFC 状态端口。

13.6.2. 模式管理器

充当模式管理器的软件组件暴露一个由 ModeSwitchInterface 定义类型的 PPortPrototype。借此,模式管理器把特定模式的变化传达给连接的模式用户。

在 BswM 一侧,必须建立用于接收模式切换通知的、由 ModeSwitchInterface 定义类型的 RPortPrototype(更多细节请参阅 [SWS_BswM_00200])。

在这种情况下适用以下规则:

[TPS_SWCT_01552] 软件组件充当模式管理器

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment 有效角色:

  • AppModeInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

无

如果应用模式管理器服务的模式用户既包含 BswM 又包含其他 ApplicationSwComponentType,则存在该用例的一个轻微变体。

应用模式管理器同时与 BswM 和其他 ApplicationSwComponentType 交互:

模式请求:为配置模式请求,应存在两个单独的 AbstractRequiredPortPrototype:

  • 一个 AbstractRequiredPortPrototype 应由 isService 属性设置为 true 的 SenderReceiverInterface 定义类型。该 AbstractRequiredPortPrototype 应连接到由表示 BswM 的 ServiceSwComponentType 定义类型的 SwComponentPrototype。

  • 另一个 AbstractRequiredPortPrototype 应由 isService 属性设置为 false 的 SenderReceiverInterface 定义类型。该 AbstractRequiredPortPrototype 应连接到由请求模式变化的 ApplicationSwComponentType 定义类型的 SwComponentPrototype。

模式切换通知:向 BswM 与其他 ApplicationSwComponentType 两者发送模式切换通知的应用模式管理器,应暴露单个 AbstractProvidedPortPrototype,用于向 BswM 与 ApplicationSwComponentType 发送模式切换通知。

属性 ModeSwitchInterface.isService 的值应设置为 false)。

[TPS_SWCT_01572] 的依据:从技术上讲,为向 BswM 与 ApplicationSwComponentType 两者发送模式切换通知而存在两个单独的 AbstractProvidedPortPrototype,会在 RTE 中形成两个单独的模式机,而让两个模式机保持完美同步将是一个艰难的挑战。

因此,关于属性 isService 用法的这一例外是正当的,以缓解这一影响。

然而在模式请求一侧,情况完全不同,因为模式请求反正需要由应用模式管理器仲裁。这完全在应用模式管理器实现的范围内,AUTOSAR 在进一步标准化这一方面上没有利害关系。

因此,没有动机就 isService 的值作出进一步的例外规定。

BswM 充当面向应用模式管理器的模式请求方:

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment 有效角色:

  • AppModeInterface [0..1]。

RoleBasedDataAssignment 有效角色:

  • AppModeRequestInterface [1]。

RepresentedPortGroup:

无。glyph[floorright](RS_SWCT_03110、RS_SWCT_03200、RS_SWCT_03203)

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = AppModeRequestInterface 属性的存在性:

关于 [constr_1680] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的访问。

13.6.3. 模式用户

充当模式用户的软件组件暴露一个由 ModeSwitchInterface 定义类型的 RPortPrototype。借此,软件组件可以由模式管理器(在此为 BswM)执行的模式切换通知。

在 BswM 一侧,必须建立用于发出模式切换通知的、由 ModeSwitchInterface 定义类型的 PPortPrototype(更多细节请参阅 [SWS_BswM_00202])。

在这种情况下适用以下规则:

软件组件充当模式用户:

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment 有效角色:

  • AppModeInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

无。glyph[floorright](RS_SWCT_03110、RS_SWCT_03200、RS_SWCT_03203)

13.6.4. 模式请求者

充当模式请求方的软件组件暴露一个由 SenderReceiverInterface 定义类型的 PPortPrototype。借此,软件组件可以向模式管理器(在此为 BswM)发送模式请求。

在 BswM 一侧,必须建立用于模式切换请求的、由 SenderReceiverInterface 定义类型的 RPortPrototype(更多细节请参阅 [SWS_BswM_00201])。

在这种情况下适用以下规则:

[TPS_SWCT_01554] 软件组件充当模式请求方

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • AppModeRequestInterface [1]。

RepresentedPortGroup:

无。glyph[floorright](RS_SWCT_03110、RS_SWCT_03200、RS_SWCT_03202)

请注意,[constr_1680] 适用于该服务用例。

13.6.5. 面向服务的用例

面向服务通信的支持由一组在它与 BswM 交互中利用 SwcServiceDependency 的服务用例表示。本节具体处理应用软件组件与 ServiceDiscovery 的交互(经由 BswM)。

AUTOSAR ServiceDiscovery 可以配置为在 ECU 启动期间自主运行(无需应用软件组件发起 ServiceDiscovery)。在这种情况下,相应的应用软件组件无需定义任何面向服务的用例。

这种方法的优势是 ServiceDiscovery 在不了解应用软件组件的情况下执行。但它的缺点是所有

ServiceDiscovery 都在启动时执行,即使某些应用软件组件可能在启动之后并不立即需要该服务功能。

让应用软件组件仅在功能实际需要该信息时才单独控制 ServiceDiscovery 的可能性,可以允许对通信量进行细粒度控制。

特定服务实例是自主控制、还是存在专门的应用交互来控制服务的可用性或订阅,可以在《TPS 系统模板》[10] 中按服务实例单独定义(ProvidedServiceInstance.autoAvailable、ConsumedServiceInstance.autoRequire 与 ConsumedEventGroup.autoRequire)。

13.6.5.1. PortGroup 支持软件组件与服务实例之间的关系

一个服务可以由任意数量的以下内容组成:

  • 表示事件、字段通知器和即发即忘方法的 SenderReceiverInterface;

  • 表示方法、字段取值器和字段设置器的 ClientServerInterface;

  • 表示无实参即发即忘方法的 TriggerInterface。

《TPS 系统模板》[10] 在标题为 “经典平台服务发现服务的描述” 一节中提供了定义哪些 SenderReceiverInterface 与 ClientServerInterface 最终构成该服务的手段。

该定义适用于 PortInterface 层级,因此并不聚焦于个体 PortPrototype。

如果一个应用软件组件想消费同一服务的两个实例,将无法标识哪一组 PortPrototype 属于一个服务实例、哪一组 PortPrototype 属于另一个服务实例。

PortPrototype 与服务实例之间的关系使用 PortGroup 定义。

例 13.1

在图 13.3 描绘的示例中,一个服务器软件组件提供两个 PortPrototype:一个事件与一个方法。使用一个 PortGroup 对这两个 PortPrototype 进行分组。

本节后面描述的服务用例利用 SwcServiceDependency.representedPortGroup 引用来定义专用服务用例适用于哪个 PortGroup(服务实例)。

《TPS 系统模板》[10] 还提供了定义事件组的手段(ProvidedServiceInstance.eventHandler 与 ConsumedServiceInstance.consumedEventGroup)。

这些事件组与本节讨论的 PortGroup 没有直接关系。它们可以以一致的方式定义,但事件组也可能以不同于特定服务实例 PortGroup 的方式定义。

BswM 配置的职责是定义一个或多个合适的 BswMRule,把事件组关联到 PortGroup 中汇集的相应事件。

13.6.5.2. 通用服务器交互

服务器定义了与服务发现交互的 2 个用例:

  • 服务提供(第 13.6.5.5 节);

  • 事件的订阅状态(第 13.6.5.6 节)。

服务提供使该服务实例在系统中可用。

一旦做出服务提供,每个客户端都可以直接调用该服务实例提供的方法。无法为调用方法(包括即发即忘方法)建立专用订阅。

服务器可能对任何客户端对事件(或事件组)的订阅信息感兴趣。状态信息的粒度可以由服务器应用软件组件定义。

例 13.2

图 13.4 示例中描绘的服务器例示了服务器服务发现方法的一些方面:

服务器 Server_SWC_1 很简单,只提供两个事件与一个方法。定义了一个 PPortPrototype 来提供该服务,另一个 RPortPrototype 用于接收关于订阅状态的信息。

服务器 Server_SWC_2 有更多特性,它也提供两个事件与一个方法,另外还接收一个即发即忘方法的 “调用”。一个 PPortPrototype 提供该服务,两个 RPortPrototype 用于接收关于订阅状态的信息。

  • P ServiceOffer_ModeRequestPort

  • R Fire-and-Forget_Method

  • P ServiceOffer_ModeRequestPort

P

Event1

P

Event2

P

Method

P

Method

P

Event2

P

Event1

  • R SubscriptionStatus_Event1

  • R SubscriptionStatus_Event2

ApplicationSwComponentType

Server_SWC_2

R

SubscriptionStatus_Events

ApplicationSwComponentType

Server_SWC_1

13.6.5.3. 通用客户端交互

客户端定义了与服务发现交互的若干用例:

  • 事件(与方法)订阅(第 13.6.5.7 节);

  • 事件(与方法)订阅状态(第 13.6.5.8 节)。

从客户端视角看,AUTOSAR 中客户端的服务发现规定由两步组成:

  • 找到一个服务实例;且

  • 订阅一个事件(组)。

在应用软件组件与服务定义的层级,事件组不可见。事件组在系统描述(见《TPS 系统模板》[10])中于定义通信矩阵的上下文中引入。

服务用例中的事件订阅在事件层级定义。BswM 配置的职责是定义一个或多个合适的 BswMRule,从服务发现订阅的个体服务实例事件中派生相应的事件组。

AUTOSAR 经典平台上的应用软件组件没有任何手段可以在服务发现 find 期间影响对所提供服务实例的选择。这就是本节没有定义显式 find 服务用例的原因。find 包含在相应的订阅用例中。

从客户端的视角看,订阅一个事件与 “订阅” 一个方法没有区别。第 13.6.5.7 节定义的用例不区分涉及的只是

  • 事件;

  • 事件与方法;

  • 还是只有方法。

(这三者中的哪一个。)同样是由 BswM 配置来表示服务发现的相应动作。

例 13.3

图 13.5 中的示例客户端例示了客户端服务发现方法的一些方面:

示例客户端 Client_SWC_1 很简单,只消费两个事件与一个方法。定义了一个 PPortPrototype 来订阅该服务的所有事件与方法。

一个 RPortPrototype 用于告知客户端对整个服务的订阅是否成功。这意味着:如果找到了服务实例(这使方法可用)且对两个事件的订阅都成功,则该 RPortPrototype 指示订阅成功。

这也意味着,如果对至少一个事件的订阅不成功,则整个服务的指示不成功。

客户端 Client_SWC_2 有更多特性:它要求两个事件与一个方法,另外还发送一个即发即忘方法。一个 PPortPrototype

(被)定义为订阅该服务的事件,第二个 PPortPrototype 用于 “订阅” 该服务的方法。定义了两个 RPortPrototype 来接收事件与方法的订阅状态。

对该 PPortPrototype 而言,“订阅” 该服务的方法意味着(如果尚未由对该服务的另一订阅执行)向服务发现发出一个 find。如果 find 成功,则在方法的 RPortPrototype 处的订阅状态通知以成功指示执行。因此应用软件组件可以开始调用该服务的方法。

对该 PPortPrototype 而言,订阅该服务的事件意味着(如果尚未由对该服务的另一订阅执行)向服务发现发出一个 find。

如果 find 成功,则向服务发现发出对事件的订阅。如果随后对两个事件的订阅都成功,则在事件的 RPortPrototype 处的订阅状态通知以成功指示执行。

客户端交互的另一个例子见图 13.8。

13.6.5.4. 无订阅的事件接收

应用软件组件需要考虑的一个副作用,源自服务发现模式请求与事件通信的分开处理。

一旦某个事件被 ECU 内的一个应用软件组件订阅,该事件就会被转发到该 ECU 上的所有接收方,无论它们是否实际订阅了该事件。

通信路径不受服务发现或 BswM 限制。因此,没有办法阻止各个接收应用软件组件接收到它们未订阅的事件。

例 13.4

图 13.6 勾勒了意外接收事件的一个原因。两个独立的应用软件组件对同一服务实例的同一事件感兴趣。

每个应用软件组件有一个实际接收该事件的 RPortPrototype。每个应用软件组件有一个发起该事件订阅的 PPortPrototype 和一个获取事件订阅状态通知的 RPortPrototype。

当其中一个应用软件组件启动该事件的订阅时(例如 Client_SWC_1),BswM 会把订阅请求转发给服务发现。

当服务发现最终收到订阅确认时,BswM 获得通知,并把该订阅状态通知转发给所有定义了相应事件订阅状态通知 RPortPrototype 的应用软件组件。

因此,Client_SWC_1 收到事件订阅成功的通知。但 Client_SWC_2 也收到该事件订阅成功的通知,尽管 Client_SWC_2 并没有订阅该事件!

现在,当事件消息实际到达该 ECU 时,事件被指示由所有拥有接收该事件的 RPortPrototype 的应用软件组件接收。因此 Client_SWC_1 会收到该事件,Client_SWC_2 也会收到该事件。

该问题的一种可能解决方法是用应用软件组件自身的事件订阅请求来保护任何订阅状态通知与事件接收:只有当应用软件组件确实订阅了该事件,进入的订阅状态通知与事件接收才会被该应用软件组件考虑。

另一种方法可能是使用 RTEEvent.disabledMode 配置来在特定模式下禁用通知。

意外事件接收的另一个来源可能是通信矩阵的定义以及事件到事件组的分配。

如果客户端应用软件组件上的两个事件经由两个单独的 PPortPrototype 处理以订阅这些事件,但这两个事件在通信矩阵中被定义为同一事件组的一部分,则两个事件都会被该应用软件组件接收,即使它只请求了其中一个事件的订阅。

13.6.5.5. 用例:服务器服务提供

实现服务器功能的软件组件充当模式请求方,暴露一个由 SenderReceiverInterface 定义类型的 PPortPrototype。借此,软件组件可以向 BswM 发送模式请求,以提供和停止提供该服务实例。

在 BswM 一侧,由同一 SenderReceiverInterface 定义类型的 RPortPrototype 用于模式切换请求。

在这种情况下适用以下规则:

软件组件充当服务器并提供服务:

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • ServerServiceOffer [1]。

RepresentedPortGroup:

对表示该服务器 PortPrototype 的服务实例 PortGroup 的引用 [1]

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = ServerServiceOffer 属性的存在性:

关于 [constr_3688] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的访问。

13.6.5.6. 用例:服务器服务订阅状态

发送事件或字段通知的服务器实例,如果该服务器实例的事件没有任何订阅,可能不需要生成并发送这些事件。

为了通知服务器实例是否至少有一个订阅者对服务器的事件感兴趣,可以使用一个 ModeSwitchInterface 来接收订阅通知。

充当服务器且对服务实例事件订阅状态感兴趣的软件组件暴露一个由 ModeSwitchInterface 定义类型的 RPortPrototype。借此,软件组件可以由 BswM 就订阅变化获得通知。

在 BswM 一侧,由该 ModeSwitchInterface 定义类型的 PPortPrototype 用于发出通知。

在这种情况下适用以下规则:

[TPS_SWCT_03503] 软件组件接收服务器事件订阅状态变化的通知

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment 有效角色:

  • ServerEventSubscriptionStatus [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroup:

对表示该服务器 PortPrototype(或与该通知相关的子集)的服务实例 PortGroup 的引用 [1]

被引用的 representedPortGroup PortGroup 的粒度可以随期望的通知粒度而变化。

一种方法可以是为整个服务实例使用一个 PortGroup。它可以是 [TPS_SWCT_03502] 中也用于服务提供的同一 PortGroup。

在这种情况下,任何由 ClientServerInterface 或 TriggerInterface 定义类型的所含 PortPrototype 都被忽略,因为它们不参与事件的订阅。这一方法勾勒于图 13.7 的示例 Service_SWC_1 中。

另一种方法可以是在单独的 PortGroup 中分组一个或一些 PortPrototype,并为这些 PortGroup 中的每一个定义专用的 SwcServiceDependency。

例 13.5

这一方法在图 13.7 的示例 Service_SWC_2 中例示,其中 Service_SWC_2 有两个 RPortPrototype,分别接收 PortGroup1 与 PortGroup2 的单独通知。

BswM 配置的职责是定义一个或多个合适的 BswMRule,它们从 ServiceDiscovery 取得订阅状态并把它们组合起来,得到表示特定 PortGroup 所含事件订阅状态的状态。

服务器事件订阅状态用例([TPS_SWCT_03503])不限于提供由应用软件组件控制的服务器。也可以在服务器自主提供的情况下获取服务器事件的订阅状态信息。

13.6.5.7. 用例:客户端事件/方法订阅

实现客户端功能的软件组件充当模式请求方,暴露一个由 SenderReceiverInterface 定义类型的 PPortPrototype。

借此,软件组件可以向 BswM 发送模式请求,以订阅和停止订阅专用的事件与方法。

在 BswM 一侧,由同一 SenderReceiverInterface 定义类型的 RPortPrototype 用于模式切换请求。

在这种情况下适用以下规则:

[TPS_SWCT_03504] 软件组件充当客户端并订阅事件与方法

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • ClientEventSubscription [1]。

RepresentedPortGroup:

对表示该客户端 PortPrototype(或与该通知相关的子集)的服务实例 PortGroup 的引用 [1]

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = ClientEventSubscription 属性的存在性:

关于 [constr_3689] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的访问。

13.6.5.8. 用例:客户端事件和方法订阅状态

充当客户端且对事件与方法订阅状态感兴趣的软件组件暴露一个由 ModeSwitchInterface 定义类型的 RPortPrototype。借此,软件组件可以由 BswM 通知订阅是否成功。

在 BswM 一侧,由该 ModeSwitchInterface 定义类型的 PPortPrototype 用于发出通知。

在这种情况下适用以下规则:

软件组件接收客户端事件与方法订阅状态变化的通知:

ServiceNeeds 种类:BswMgrNeeds

RoleBasedPortAssignment 有效角色:

  • ClientEventSubscriptionStatus [1]。

RoleBasedDataAssignment:不适用

RepresentedPortGroup:

对表示该客户端 PortPrototype(或与该通知相关的子集)的服务实例 PortGroup 的引用 [1]

glyph[floorright](RS_SWCT_03110、RS_SWCT_03200、RS_SWCT_03203)

一般而言,事件状态通知用例包含哪些 PortPrototype 取决于 PortGroup 的定义。订阅状态通知的 PortGroup 定义可以不同于订阅本身的 PortGroup 定义。

图 13.8 显示同一客户端服务实例(由两个事件与一个方法组成)的事件订阅状态通知的两种设置。

在示例性的 Client_SWC_1 中,SubscriptionStatus_EventMethod 使用一个 PortGroup 把两个事件与方法都包含在一个状态通知中。

这种设置对客户端订阅(见第 13.6.5.7 节)可能是好方法,因为它一次性请求两个事件与方法变为可用。

但对状态通知而言,这导致组合的通知状态:只有当两个事件与方法都被订阅时,通知才会产生成功的订阅。

当服务发现的第一部分(服务实例 find)成功时,方法可能已经可以调用。如果应用软件组件需要这一信息,订阅通知与 PortGroup 的替代定义可能更合适:

在示例性的 Client_SWC_2 中,定义了两个通知:一个 SubscriptionStatus_Events 与一个 SubscriptionStatus_Method。

虽然 SubscriptionStatus_Events 的通知仍须等到两个事件的订阅确认都成功可用,但方法可用性的通知在服务实例 find 成功时就可以给出。因此即使事件尚不可用,方法也已经可以调用。

13.7. 加密服务依赖

13.7.1. 概述

元类 CryptoServiceNeeds 与 CryptoServiceJobNeeds 用于分别定义配置 CryptoServiceManager 与加密栈的需求。

元类 CryptoKeyManagementNeeds 的用法在第 13.7.4 节描述。

请注意,存在基于创建异步运行作业的加密 API。这一策略的原因是:加密操作——在许多情况下是有意设计的——每次调用往往运行相对较长的时间。这一行为可视化于图 13.10。

在主函数中同步执行这些操作会不可容忍地阻塞相应模块,因此作业 API 是保持软件执行可管理的重要手段。这一行为可视化于图 13.11。

重要的是要注意:执行的异步特性是在服务器侧实现的,与客户端侧的异步调用行为无关(关于客户端侧调用行为的更多解释请参阅第 7.5.2.1 节)。

表13.10:CryptoServiceNeeds(CryptoServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the needs on the configuration of the CryptoServiceManager for one ConfigID (see Specification AUTOSAR_SWS_CSM.doc). An instance of this class is used to find out which ports of a software-component belong to this ConfigID. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
algorithmFamily String 0..1 attr This attribute represents a description of the family (e.g. AES) of crypto algorithm implemented by the crypto service use case.
algorithmMode String 0..1 attr This meta-class has the ability to represent a crypto service use case.
cryptoKey Description String 0..1 attr This attribute allows for a verbal description of the applicable cryptographic key. The goal is to pass a hint for the integrator about how to treat the corresponding service use case.
maximumKey Length PositiveInteger 0..1 attr The maximum length of a cryptographic key, that is used by the software-component or module for this configuration. Unit: bit.

表13.11:CryptoServiceJobNeeds(CryptoServiceJobNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class shall be taken to indicate that the service use case modeled with this kind of Service Needs assumes the usage of the crypto job API. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

加密 PortInterface 的 PortInterface 结果名称所用的后缀:

(该后缀)用于相应加密服务的 PortInterface 结果名称,应取自适用 SwcServiceDependency 的 shortName。glyph[floorright]()

13.7.2. 加密服务用例

13.7.2.1. 加密服务用例:哈希计算

场景:AtomicSwComponentType 使用加密服务的哈希计算。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的哈希计算:

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmHash [0..1];

  • CsmHash_{Config} [0..1];

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmHash_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.2. 加密服务用例:MAC 计算

场景:AtomicSwComponentType 使用加密服务的消息认证码(MAC)计算。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的消息认证码(MAC)计算:

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmMacGenerate [0..1];

  • CsmMacGenerate_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmMacGenerate_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.3. 加密服务用例:MAC 验证

场景:AtomicSwComponentType 使用加密服务的消息认证码(MAC)验证。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的消息认证码(MAC)验证:

ServiceNeeds 种类:CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmMacVerify [0..1];

  • CsmMacVerify_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmMacVerify_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.4. 加密服务用例:随机数生成

场景:AtomicSwComponentType 使用加密服务的随机数生成。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的随机数生成:

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmRandomGenerate [0..1];

  • CsmRandomGenerate_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmRandomGenerate_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.5. 加密服务用例:使用带关联数据的认证加密(AEAD)进行加密

场景:AtomicSwComponentType 使用加密服务的带关联数据的认证加密(AEAD)。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的带关联数据的认证加密(AEAD):

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmAEADEncrypt [0..1];

  • CsmAEADEncrypt_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmAEADEncrypt_{Config} 的 shortName 中的名称片段 {Config} 应按 [TPS_SWCT_01727] 解析。

13.7.2.6. 加密服务用例:使用带关联数据的认证加密(AEAD)进行解密

场景:AtomicSwComponentType 使用加密服务的带关联数据的认证加密(AEAD)。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的带关联数据的认证加密(AEAD):

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmAEADDecrypt [0..1];

  • CsmAEADDecrypt_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmAEADDecrypt_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.7. 加密服务用例:加密

场景:AtomicSwComponentType 使用加密服务的加密。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的加密:

ServiceNeeds 种类:CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmEncrypt [0..1];

  • CsmEncrypt_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmEncrypt_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.8. 加密服务用例:解密

场景:AtomicSwComponentType 使用加密服务的解密。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的解密:

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmDecrypt [0..1];

  • CsmDecrypt_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmDecrypt_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.9. 加密服务用例:签名生成

场景:AtomicSwComponentType 使用加密服务的签名生成。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的签名生成:

ServiceNeeds 种类:CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmSignatureGenerate [0..1];

  • CsmSignatureGenerate_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmSignatureGenerate_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.10. 加密服务用例:签名验证

场景:AtomicSwComponentType 使用加密服务的签名验证。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的签名验证:

ServiceNeeds 种类:

CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmSignatureVerify [0..1];

  • CsmSignatureVerify_{Config} [0..1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmSignatureVerify_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.2.11. 加密服务用例:使用密钥管理

场景:AtomicSwComponentType 使用加密服务的密钥管理。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的密钥管理:

ServiceNeeds 种类:CryptoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • CsmKeyManagement_{Config} [1]。

  • CallbackNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmKeyManagement_{Config} 的 shortName 中的名称片段 {Config} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3. 加密服务作业用例

13.7.3.1. 加密服务用例:使用作业 API 设置密钥有效

场景:AtomicSwComponentType 使用加密服务的作业 API 设置一个密钥有效。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 设置一个密钥有效:

ServiceNeeds 种类:CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobKeySetValid_{Primitive} [1];

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobKeySetValid_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.2. 加密服务用例:使用作业 API 创建随机种子

场景:AtomicSwComponentType 使用加密服务的作业 API 创建一个随机种子。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 创建一个随机种子:

ServiceNeeds 种类:CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobRandomSeed_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobRandomSeed_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.3. 加密服务用例:使用作业 API 生成密钥

场景:AtomicSwComponentType 使用加密服务的作业 API 生成一个密钥。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 生成一个密钥:

ServiceNeeds 种类:CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobKeyGenerate_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobKeyGenerate_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.4. 加密服务用例:使用作业 API 派生密钥

场景:AtomicSwComponentType 使用加密服务的作业 API 派生一个密钥。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 派生一个密钥:

ServiceNeeds 种类:CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobKeyDerive_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobKeyDerive_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.5. 加密服务用例:使用作业 API 执行密钥交换公共值的计算

场景:AtomicSwComponentType 使用加密服务的作业 API 执行密钥交换的公共值计算。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 执行密钥交换的公共值计算:

ServiceNeeds 种类:

CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobKeyExchangeCalcPubVal_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobKeyExchangeCalcPubVal_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.6. 加密服务用例:使用作业 API 执行密钥交换共享秘密的计算

场景:AtomicSwComponentType 使用加密服务的作业 API 执行密钥交换的共享密钥计算。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 执行密钥交换的共享密钥计算:

ServiceNeeds 种类:CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobKeyExchangeCalcSecret_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobKeyExchangeCalcSecret_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.7. 加密服务用例:使用作业 API 执行证书解析

场景:AtomicSwComponentType 使用加密服务的作业 API 执行证书解析。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 执行证书解析:

ServiceNeeds 种类:

CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobCertificateParse_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobCertificateParse_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.3.8. 加密服务用例:使用作业 API 执行证书验证

场景:AtomicSwComponentType 使用加密服务的作业 API 执行证书验证。在这种情况下适用以下设置:

AtomicSwComponentType 使用加密服务的 API 执行证书验证:

ServiceNeeds 种类:

CryptoServiceJobNeeds

RoleBasedPortAssignment 有效角色:

  • CsmJobCertificateVerify_{Primitive} [1]。

  • CallbackNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,出现在 ClientServerInterface CsmJobCertificateVerify_{Primitive} 的 shortName 中的名称片段 {Primitive} 的解析由 [TPS_SWCT_01727] 规定。

13.7.4. 加密密钥管理用例

加密密钥管理的服务用例由在角色 serviceNeeds 中聚合于 SwcServiceDependency 的 CryptoKeyManagementNeeds 的存在指示。

表13.12:CryptoKeyManagementNeeds(CryptoKeyManagementNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class can be used to indicate a service use case for key management. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.7.4.1. KeyM 服务用例:软件组件希望让 KeyM 检查证书

场景:软件组件想在 KeyM 上检查一个证书。软件组件把证书发送给 KeyM(SetCertificate),然后发起该证书的验证(VerifyCertificate)。

在验证仍在运行时,可以获取验证的状态(GetStatus)。

[TPS_SWCT_01813] 软件组件想在 KeyM 上检查证书

ServiceNeeds 种类:

CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyM_Certificate [1];

  • KeyMCertificateNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.2. KeyM 服务用例:软件组件希望从 KeyM 获取证书

场景:软件组件想在 KeyM 上检索一个证书。软件组件通过使用 GetCertificate 请求该证书。这一步骤表示同步操作。

AtomicSwComponentType 想从 KeyM 检索证书:

ServiceNeeds 种类:

CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyM_Certificate [1];

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.3. KeyM 服务用例:软件组件希望从 KeyM 获取证书的元素

场景:软件组件想在 KeyM 上检索证书的元素(CertificateElementGet、CertificateElementGetByIndex、CertificateElementGetCount)。这一步骤表示同步操作。

AtomicSwComponentType 想从 KeyM 检索证书的元素:

ServiceNeeds 种类:

CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyMCertificateElement [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.4. KeyM 服务用例:软件组件希望检查 KeyM 中证书的存在性

场景:软件组件想检查来自 KeyM 的证书的存在性(GetStatus)。

AtomicSwComponentType 想检查来自 KeyM 的证书的存在性:

ServiceNeeds 种类:CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyM_Certificate [1];

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.5. KeyM 服务用例:软件组件希望在 KeyM 中存储(派生的)密钥

场景:软件组件想在 KeyM 中存储一个(派生的)密钥。

AtomicSwComponentType 想在 KeyM 中存储(派生的)密钥:

ServiceNeeds 种类:

CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyMCryptoKey [1];

  • KeyMCryptoKeyNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.6. KeyM 服务用例:软件组件希望在 KeyM 中存储包含(加密)密钥的容器

场景:软件组件想在 KeyM 中存储一个带有(加密)密钥的容器。容器的处理在启用 Start 与 Finish 操作用法的会话上下文中完成。

通过调用 Prepare 操作,软件组件把容器传给 KeyM;KeyM 读取容器的内容并提取其中包含的加密密钥。下一步是 KeyM 更新从容器提取的每个密钥。

AtomicSwComponentType 想在 KeyM 中存储带加密密钥(例如 She 密钥)的容器:

ServiceNeeds 种类:

CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyMCryptoKey [1];

  • KeyMCryptoKeyNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.7.4.7. KeyM 服务用例:软件组件希望验证加密操作是否使用特定密钥执行

场景:软件组件想验证加密操作是否使用特定密钥执行(Verify)。

AtomicSwComponentType 想验证加密操作是否使用特定密钥执行:

ServiceNeeds 种类:CryptoKeyManagementNeeds

RoleBasedPortAssignment 有效角色:

  • KeyMCryptoKey [1];

  • KeyMCryptoKeyNotification [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8. 诊断服务依赖

本章描述在原子软件组件内使用派生自 ServiceNeeds 的特定诊断元类。常见诊断服务需求的概览已在图 7.38 中引入,可分为四个主要部分:

  • 第 13.8.2 章的功能禁止需求(Function Inhibition Needs);

  • 第 13.8.3 章的诊断事件需求(Diagnostic Event Needs);

  • 第 13.8.4 章的诊断通信需求(Diagnostic Communication Needs);

  • 第 13.8.5 章的满足 OBD 相关需求的服务需求。

请注意,对所描述的 Diagnostic Services 用例,适用以下规则:

表达诊断能力:

可能的 role 属性值及相关 PortPrototype 的多重性列于段落 RoleBasedPortAssignment 的用例描述中。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

不使用可选元素结构与诊断栈交互:

该规则应在 RTE 生成时施加。

13.8.1. 开发方法

AUTOSAR 在许多情况下支持对开发工作流各个方面实现自底向上或自顶向下的配置。

在《诊断提取模板》[23] 出现之前,AUTOSAR 官方支持一种建模方法:ApplicationSwComponentType 的配置

可以包含对诊断栈外部配置的贡献。这被视为实现诊断自顶向下配置方法的一种途径。

然而,与每个开发者在未必了解诊断配置更大范围的情况下各自贡献配置的做法相比,《诊断提取模板》引入的开发方法被证明更优越、更不易出错与受限。

因此,《诊断提取模板》的使用已成为配置 AUTOSAR 诊断栈外部行为的规范方法,而 SwcServiceDependency 范围内可用的相应配置属性已从 AUTOSAR 方法论中移除,以减少受众的潜在困惑。

特别是,如果《诊断提取模板》还提供了诊断元素与应用模型元素之间的映射,则可以实现使用《诊断提取模板》的自顶向下方法。如果不需要或无法获得这些映射,也可以使用《诊断提取模板》来派生不涉及应用软件关系的诊断栈自底向上配置。

13.8.2. 功能禁用需求

元类 FunctionInhibitionNeeds 用于定义配置诊断事件管理器服务的需求。

SwcInternalBehavior 可以在 SwcServiceDependency 的上下文中提供 FunctionInhibitionNeeds 与 FunctionInhibitionAvailabilityNeeds 元素。每个 FunctionInhibitionNeeds 与 FunctionInhibitionAvailabilityNeeds 定义与一个功能禁止 ID 相关的需求(与 AUTOSAR 功能禁止管理器相关的术语见 [40])。

表13.13:FunctionInhibitionNeeds(FunctionInhibitionNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Function Inhibition Manager for one Function Identifier (FID). This class currently contains no attributes. Its name can be regarded as a symbol identifying the FID from the viewpoint of the component or module which owns this class. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.14:FunctionInhibitionAvailabilityNeeds(FunctionInhibitionAvailabilityNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Function Inhibition Manager to provide the control function for one Function Identifier (FID). | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
controlledFid FunctionInhibitionNeeds 0..1 ref This reference represents the controlled FID
13.8.2.1. 功能禁用管理器服务用例:读取功能权限

功能禁止管理器服务用例的设置:读取功能许可:

ServiceNeeds 种类:FunctionInhibitionNeeds

RoleBasedPortAssignment 有效角色:

  • FunctionInhibition [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

更多信息请参阅 [SWS_Fim_00090]。

13.8.2.2. 功能禁用管理器用例:对被抑制或不可用的事件作出反应

功能禁止管理器用例:对被抑制或不可用的事件作出反应:

ServiceNeeds 种类:FunctionInhibitionAvailabilityNeeds

RoleBasedPortAssignment 有效角色:

  • ControlFunctionAvailable [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

注意:对变体编码,ClientServerInterface ControlFunctionAvailable 用于停用某个功能(例如把 FID 设置为不可用)。

更多信息请参阅 [SWS_Fim_00107]。

13.8.3. 诊断事件需求

元类 DiagnosticEventManagerNeeds 用于定义配置诊断事件管理器服务的需求。

SwcInternalBehavior 可以提供若干 DiagnosticEventManagerNeeds 元素,它们定义一般诊断事件管理器行为的映射(与 AUTOSAR 诊断事件管理器相关的术语见 [41])。

元类 DiagnosticCapabilityElement 用于提供关于诊断能力的通用信息。此外,DiagnosticCapabilityElement 的用法表明所有继承自 DiagnosticCapabilityElement 的 ServiceNeeds 都表达以下意图:

  • 需要与 AUTOSAR 服务 Dem 或 Dcm 交互;

  • 为车载诊断提供服务。

表13.15:DiagnosticEventManagerNeeds(DiagnosticEventManagerNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the general needs on the configuration of the Diagnostic Event Manager (Dem) which are not related to a particular item. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.16:DiagnosticCapabilityElement(DiagnosticCapabilityElement)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This class identifies the capability to provide generic information about diagnostic capabilities | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 子类 | DiagnosticCommunicationManagerNeeds, DiagnosticComponentNeeds, DiagnosticControlNeeds, DiagnosticEnableConditionNeeds, DiagnosticEventInfoNeeds, DiagnosticEventManagerNeeds, DiagnosticEventNeeds, DiagnosticIoControlNeeds, DiagnosticOperationCycleNeeds, DiagnosticRequest FileTransferNeeds, DiagnosticRoutineNeeds, DiagnosticStorageConditionNeeds, DiagnosticUpload DownloadNeeds, DiagnosticValueNeeds, DiagnosticsCommunicationSecurityNeeds, DtcStatusChange NotificationNeeds, ObdControlServiceNeeds, ObdInfoServiceNeeds, ObdMonitorServiceNeeds, ObdPid ServiceNeeds, ObdRatioDenominatorNeeds, ObdRatioServiceNeeds, WarningIndicatorRequestedBit Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
Class DiagnosticCapabilityElement (abstract)
audience DiagnosticAudience Enum * attr This specifies the intended audience for the diagnostic object. Note that this is not only for the documentation but also subsequent audience specific implementation.
diag Requirement DiagRequirementId String 0..1 attr This denotes the requirement identifier to which the object can be linked to. Note that with the implementation of a generic tracing concept in AUTOSAR this attribute might become obsolete.
securityAccess Level PositiveInteger 0..1 attr This attribute denotes the level of security which is touched by the diagnostic object. The higher the level the more relevance for the security exists. This level shall be mapped to the security level in the ECU.

表13.17:DiagRequirementIdString(DiagRequirementIdString)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This string denotes an Identifier for a requirement. Tags: xml.xsd.customType=DIAG-REQUIREMENT-ID-STRING xml.xsd.pattern=[0-9a-zA-Z_-]+ xml.xsd.type=string |

表13.18:DiagnosticAudienceEnum(DiagnosticAudienceEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The possible values of the intended audience for a diagnostic object. | | 聚合于 | DiagnosticCapabilityElement .audience |

字面值 说明
aftermarket The object is for free aftermarket service organizations. Tags: atp.EnumerationLiteralIndex=1
afterSales The object is relevant for the OEM after-sales organization. Tags: atp.EnumerationLiteralIndex=2
development The object is relevant for engineering only. Tags: atp.EnumerationLiteralIndex=3
manufacturing The object is relevant for manufacturing. Tags: atp.EnumerationLiteralIndex=4
supplier The object is relevant for the ECU-supplier aftermarket organization. Tags: atp.EnumerationLiteralIndex=5

元类 DiagnosticEventNeeds 用于定义配置诊断事件管理器服务的需求。

SwcInternalBehavior 可以提供若干 DiagnosticEventNeeds 元素,每个元素定义与一个诊断事件相关的全部需求(与 AUTOSAR 诊断事件管理器相关的术语见 [41])。

此外,为规定 OBD 诊断服务调用的需求,需要 ObdPidServiceNeeds 与 ObdRatioServiceNeeds。

属性 diagEventDebounceAlgorithm 定义诊断事件管理器预期消抖的种类,或定义消抖由软件组件实现。

类 DiagEventDebounceAlgorithm 继承自 Identifiable,以便允许对消抖算法做进一步文档化,以及借助 Sdg 对诊断事件管理器中 DiagEventDebounceAlgorithm 预期配置做非形式化或非标准化描述。

SwcServiceDependency.assignedPort 与 DiagEventDebounceMonitorInternal:

该规则应在 RTE 生成时施加。

[constr_1138] 存在的依据:故障检测计数器通常是 Dem 的内部状态,即当消抖在 Dem 内部执行时。

另一方面,如果消抖在监控软件组件中实现,可能出现诊断测试仪请求故障检测计数器值的情况。

在这种情况下,Dem 将经由 assignedPort(属性 role 设置为值 CallbackGetFaultDetectCounter)所引用的 PortPrototype 请求故障检测计数器的值。

如果监控器不实现消抖,则该 PortPrototype 不应存在。

属性 role 设置为 CallbackGetFaultDetectCounter 的 RoleBasedPortAssignment 应在角色 portPrototype 中引用 PPortPrototype:

  • 一个 DiagnosticEventNeeds,它又在角色 diagEventDebounceAlgorithm 中聚合 DiagEventDebounceMonitorInternal;且

  • 一个在角色 assignedPort 中的 RoleBasedPortAssignment,其属性 role 设置为 CallbackGetFaultDetectCounter,

则引用 SwcServiceDependency.assignedPort.portPrototype 的目标应为 PPortPrototype。

该规则应在 RTE 生成时施加。

表13.19:DiagnosticEventNeeds(DiagnosticEventNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs on the configuration of the Diagnostic Event Manager for one diagnostic event. Its shortName can be regarded as a symbol identifying the diagnostic event from the viewpoint of the component or module which owns this element. In case the diagnostic event specifies a production error, the shortName shall be the name of the production error. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
deferringFid FunctionInhibitionNeeds * ref This reference contains the link to a function identifier within the FiM which is used by the monitor before delivering a result.
diagEvent Debounce Algorithm DiagEventDebounce Algorithm 0..1 aggr Specifies the abstract need on the Debounce Algorithm applied by the Diagnostic Event Manager.
inhibitingFid FunctionInhibitionNeeds 0..1 ref This represents the primary Function Inhibition Identifier used for inhibition of the diagnostic monitor. The FID might either inhibit the monitoring of a symptom or the reporting of detected faults.
inhibiting SecondaryFid FunctionInhibitionNeeds * ref This represents the secondary Function Inhibition Identifier used for inhibition of the diagnostic monitor. Any of the FID inhibitions leads to an inhibition of the monitoring of a symptom or the reporting of detected faults.
prestored Freezeframe StoredInNvm Boolean 0..1 attr If the Event uses a prestored freeze-frame (using the operations PrestoreFreezeFrame and ClearPrestored FreezeFrame of the service interface DiagnosticMonitor) this attribute indicates if the Event requires the data to be stored in non-volatile memory. TRUE = Dem shall store the prestored data in non-volatile memory, FALSE = Data can be lost at shutdown (not stored in Nvm).
usesMonitor Data Boolean 0..1 attr This attribute defines whether additional monitor data shall be added to the reporting of events.

表13.20:DiagEventDebounceAlgorithm(DiagEventDebounceAlgorithm)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This class represents the ability to specify the pre-debounce algorithm which is selected and/or required by the particular monitor. This class inherits from Identifiable in order to allow further documentation of the expected or implemented debouncing and to use the category for the identification of the expected / implemented debouncing. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 子类 | DiagEventDebounceCounterBased, DiagEventDebounceMonitorInternal, DiagEventDebounceTime Based | | 聚合于 | DiagnosticDebounceAlgorithmProps.debounceAlgorithm, DiagnosticEventNeeds.diagEventDebounce Algorithm |

表13.21:DiagEventDebounceCounterBased(DiagEventDebounceCounterBased)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to indicate that the counter-based debounce algorithm shall be used by the DEM for this diagnostic monitor. This is related to set the ECUC choice container DemDebounceAlgorithmClass to DemDebounce CounterBased. | | 基类 | ARObject , DiagEventDebounceAlgorithm , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DiagnosticDebounceAlgorithmProps.debounceAlgorithm, DiagnosticEventNeeds.diagEventDebounce Algorithm |

属性 类型 多重性 种类 备注
counterBased FdcThreshold StorageValue Integer 0..1 attr Threshold to allocate an event memory entry and to capture the Freeze Frame.
counter DecrementStep Size Integer 0..1 attr This value shall be taken to decrement the internal debounce counter. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterFailed Threshold Integer 0..1 attr This value defines the event-specific limit that indicates the "failed" counter status. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counter IncrementStep Size Integer 0..1 attr This value shall be taken to increment the internal debounce counter. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterJump Down Boolean 0..1 attr This value activates or deactivates the counter jump-down behavior. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterJump DownValue Integer 0..1 attr This value represents the initial value of the internal debounce counter if the counting direction changes from incrementing to decrementing. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterJumpUp Boolean 0..1 attr This value activates or deactivates the counter jump-up behavior. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterJumpUp Value Integer 0..1 attr This value represents the initial value of the internal debounce counter if the counting direction changes from decrementing to incrementing. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
counterPassed Threshold Integer 0..1 attr This value defines the event-specific limit that indicates the "passed" counter status. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

表13.22:DiagEventDebounceTimeBased(DiagEventDebounceTimeBased)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to indicate that the time-based pre-debounce algorithm shall be used by the Dem for this diagnostic monitor. This is related to set the EcuC choice container DemDebounceAlgorithmClass to DemDebounceTime Base. | | 基类 | ARObject , DiagEventDebounceAlgorithm , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DiagnosticDebounceAlgorithmProps.debounceAlgorithm, DiagnosticEventNeeds.diagEventDebounce Algorithm |

属性 类型 多重性 种类 备注
timeBasedFdc Threshold StorageValue TimeValue 0..1 attr Threshold to allocate an event memory entry and to capture the Freeze Frame. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
timeFailed Threshold TimeValue 0..1 attr This value represents the event-specific delay indicating the "failed" status. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime
timePassed Threshold TimeValue 0..1 attr This value represents the event-specific delay indicating the "passed" status. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

表13.23:DiagEventDebounceMonitorInternal(DiagEventDebounceMonitorInternal)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to indicate that no Dem pre-debounce algorithm shall be used for this diagnostic monitor. The SWC might implement an internal debouncing algorithm and report qualified (debounced) results to the Dem/DM. | | 基类 | ARObject , DiagEventDebounceAlgorithm , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DiagnosticDebounceAlgorithmProps.debounceAlgorithm, DiagnosticEventNeeds.diagEventDebounce Algorithm |

图 13.14 显示类 DiagnosticEventNeeds 的关系。除 DiagnosticCapabilityElement 提供的基本属性集之外,给定的 M2 结构支持表达诊断监控器的以下属性:

必须连接到功能禁止管理器的所用 PortPrototype,由 M1 上相关 FunctionInhibitionNeeds 实例的 RoleBasedPortAssignment 决定。

从 ObdRatioServiceNeeds 的 M1 实例到 DiagnosticEventNeeds 的 M1 实例的引用规定相关诊断监控器支持基于速率的监控。更多细节见第 13.8.5 节。

DiagnosticEventNeeds.inhibitingFid 与 DiagnosticEventNeeds.inhibitingSecondaryFid 的语义:

通常,如果其他诊断事件已被报告为 FAILED,FiM 不会授予许可,因为这会导致同一故障的重复检测。

这些功能禁止借助角色 DiagnosticEventNeeds.inhibitingFid 与 DiagnosticEventNeeds.inhibitingSecondaryFid 中的引用规定。

在语义上,DiagnosticEventNeeds.inhibitingFid 与 DiagnosticEventNeeds.inhibitingSecondaryFid 没有区别,即 “inhibiting” 角色中相关引用的集合由 DiagnosticEventNeeds.inhibitingFid 与 DiagnosticEventNeeds.inhibitingSecondaryFid 的合并内容创建。glyph[floorright]()

这一关系描述软件组件的实现。通过这一形式化引用,软件组件的实现者可以让这一信息对后续流程步骤可用。

例 13.6

认证文档需要禁止关系的描述。

例 13.7

如果在后续步骤中为某个 DemEvent 向 ECU 配置添加一个 Ratio(不是通过带 ObdRatioServiceNeeds 的 ServiceDependency 请求的),配置器可以从 DemEvent 自身的 inhibiting/deferring FID 派生该 ratio 的相关 FID。

DiagnosticEventNeeds.deferringFid 的语义:

通常,如果其他事件已被报告为 FAILED,FiM 不会授予许可,因为这会导致同一故障的重复检测。

在某些情况下(见 [40]),诊断监控器的实现不仅在 “无许可” 的情况下完全停机,而是完整计算其结果,只是在满足进一步条件之前不把结果交付给 Dem。

通常,这样的诊断可以快速检测到粗粒度故障。但它避免过早报告 FAIL,给其他事件留出交付更精确 FAIL 的机会。

在这些情况下,只有当 FiM 授予许可(对其他事件在 NOT_TESTED 上设置禁止)时才允许交付结果。这些功能禁止借助属性 DiagnosticEventNeeds.deferringFid 规定。

作为与 DiagnosticEventNeeds 对应的概念,DiagnosticEventInfoNeeds 表示对想获取特定 DTC 信息的给定软件组件的需求。

表13.24:DiagnosticEventInfoNeeds(DiagnosticEventInfoNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component interested to get information regarding specific DTCs. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
Class DiagnosticEventInfoNeeds
obdDtcNumber PositiveInteger 0..1 attr This represents a reasonable Diagnostic Trouble Code. This allows to predefine the Diagnostic Trouble Code, e.g. if the function developer has received a particular requirement from the OEM or from a standardization body. This attribute applies for the OBD diagnostics use case.
udsDtcNumber PositiveInteger 0..1 attr This represents a reasonable Diagnostic Trouble Code. This allows to predefine the Diagnostic Trouble Code, e.g. if the function developer has received a particular requirement from the OEM or from a standardization body. This attribute applies for the UDS diagnostics use case.

表13.25:DiagnosticOperationCycleNeeds(DiagnosticOperationCycleNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component to provide information regarding the operation cycle management to the Dem module. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
operationCycle OperationCycleType Enum 0..1 attr Operation cycles types for the Dem to be supported by cycle-state APIs.

表13.26:OperationCycleTypeEnum(OperationCycleTypeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The possible values of the operation cycles types for the Dem. | | 聚合于 | DiagnosticOperationCycleNeeds.operationCycle | | 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component to provide the capability to set an enable condition. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

字面值 说明
ignition Ignition ON / OFF cycle. Tags: atp.EnumerationLiteralIndex=0
obdDcy OBD Driving cycle. Tags: atp.EnumerationLiteralIndex=1
other Further operation cycle. Tags: atp.EnumerationLiteralIndex=2
power Power ON / OFF cycle. Tags: atp.EnumerationLiteralIndex=3
time Time based operation cycle. Tags: atp.EnumerationLiteralIndex=4
warmup OBD Warm up cycle. Tags: atp.EnumerationLiteralIndex=5
Class DiagnosticEnableConditionNeeds
initialStatus EventAcceptanceStatus Enum

表13.27:EventAcceptanceStatusEnum(EventAcceptanceStatusEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumerator specifies the initial status for enable or disable of acceptance of event reports of a diagnostic event. | | 聚合于 | DiagnosticEnableConditionNeeds.initialStatus |

字面值 说明
eventAcceptance Disabled Acceptance of a diagnostic event is disabled. Tags: atp.EnumerationLiteralIndex=0
eventAcceptance Enabled Acceptance of a diagnostic event is enabled. Tags: atp.EnumerationLiteralIndex=1

表13.28:DiagnosticStorageConditionNeeds(DiagnosticStorageConditionNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component to provide the capability to set a storage condition. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
initialStatus StorageConditionStatus Enum 0..1 attr Defines the initial status for enable or disable of storage of a diagnostic event.

表13.29:StorageConditionStatusEnum(StorageConditionStatusEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration specifies the initial status for enable or disable of storage of a diagnostic event. | | 聚合于 | DiagnosticStorageConditionNeeds.initialStatus |

字面值 说明
eventStorage Disabled Storage of a diagnostic event is disabled. Tags: atp.EnumerationLiteralIndex=0
eventStorage Enabled Storage of a diagnostic event is enabled. Tags: atp.EnumerationLiteralIndex=1
13.8.3.1. Dem 服务用例:诊断监视器,由 Dem 防抖

场景:AtomicSwComponentType 实现一个诊断监控器。故障条件的消抖应由 Dem 配置与处理。在这种情况下适用以下设置:

AtomicSwComponentType 实现一个诊断监控器:

ServiceNeeds 种类:DiagnosticEventNeeds

RoleBasedPortAssignment 有效角色:

  • DiagnosticMonitor [1];

  • DiagnosticInfo [0..1];

  • CallbackInitMonitorForEvent [0..1];

  • CallbackEventUdsStatusChanged [0..1];

  • CallbackClearEventAllowed [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,为实现该场景,应使用 DiagEventDebounceCounterBased 或 DiagEventDebounceTimeBased 算法作为 diagEventDebounceAlgorithm。

13.8.3.2. Dem 服务用例:诊断监视器,由 SWC 防抖

场景:AtomicSwComponentType 实现一个诊断监控器。故障条件的消抖应由软件组件处理。在这种情况下适用以下设置:

AtomicSwComponentType 实现一个诊断监控器:

ServiceNeeds 种类:DiagnosticEventNeeds

RoleBasedPortAssignment 有效角色:

  • DiagnosticMonitor [1];

  • DiagnosticInfo [0..1];

  • CallbackInitMonitorForEvent [0..1];

  • CallbackEventUdsStatusChanged [0..1];

  • CallbackClearEventAllowed [0..1]。

  • CallbackGetFaultDetectCounter [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,为实现该场景,应使用 DiagEventDebounceMonitorInternal 算法作为 diagEventDebounceAlgorithm。

13.8.3.3. Dem 服务用例:软件组件提供运行循环的信息

场景:AtomicSwComponentType 提供关于运行周期的信息,例如点火周期或行驶周期。

AtomicSwComponentType 提供关于运行周期的信息:

ServiceNeeds 种类:DiagnosticOperationCycleNeeds

RoleBasedPortAssignment 有效角色:

  • OperationCycle [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00601]。

13.8.3.4. Dem 服务用例:软件组件总体上启用 DTC 的上报

场景:AtomicSwComponentType 一般性地启用 DTC 的报告。

AtomicSwComponentType 一般性地启用 DTC 的报告:

ServiceNeeds 种类:DiagnosticEnableConditionNeeds

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

RoleBasedPortAssignment 有效角色:

  • EnableCondition [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00604] 与 [ECUC_Dem_00656]。

13.8.3.5. Dem 服务用例:软件组件启用后续 DTC 的存储

场景:AtomicSwComponentType 启用后续 DTC 的存储。

[TPS_SWCT_01135] AtomicSwComponentType 启用后续 DTC 的存储

ServiceNeeds 种类:DiagnosticStorageConditionNeeds

RoleBasedPortAssignment 有效角色:

  • StorageCondition [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00605]。

相关 DTC 应在 ECUC 中配置,因为在设计 AtomicSwComponentType 时关于哪些 DTC 相关的信息尚不完整可用。

13.8.3.6. Dem 服务用例:获取指示灯状态信息

场景:AtomicSwComponentType 检索灯状态的信息。

AtomicSwComponentType 检索灯状态的信息:

ServiceNeeds 种类:IndicatorStatusNeeds

RoleBasedPortAssignment 有效角色:

  • IndicatorStatus [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00606]。

表13.30:IndicatorStatusNeeds(IndicatorStatusNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class shall be taken to signal a service use case that affects the indicator status. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
type DiagnosticIndicatorType Enum 0..1 attr Defines the type of the indicator.

表13.31:DiagnosticIndicatorTypeEnum(DiagnosticIndicatorTypeEnum)

| 包 | M2::AUTOSARTemplates::DiagnosticExtract::Dem::DiagnosticIndicator | | 说明 | Type of an indicator. | | 聚合于 | DiagnosticIndicator.type, IndicatorStatusNeeds.type |

字面值 说明
amberWarning Amber Warning Lamp Tags: atp.EnumerationLiteralIndex=0
malfunction Malfunction Indicator Lamp Tags: atp.EnumerationLiteralIndex=1
protectLamp Protect Lamp Tags: atp.EnumerationLiteralIndex=2
redStopLamp Red Stop Lamp Tags: atp.EnumerationLiteralIndex=3
warning Warning Tags: atp.EnumerationLiteralIndex=4
13.8.3.7. Dem 服务用例:DEM 提供故障存储器溢出的信息

请注意,对这一特定用例,具体 ServiceNeeds 的应用尚未澄清。

场景:Dem 提供故障存储溢出的信息。

Dem 提供故障存储溢出的信息:

RoleBasedPortAssignment 有效角色:

  • EvMemOverflowIndication [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00607]。

13.8.3.8. Dem 服务用例:软件组件抑制 DTC 的存储

场景:AtomicSwComponentType 抑制 Dem 内 DTC 的存储。

AtomicSwComponentType 抑制 Dem 内 DTC 的存储:

ServiceNeeds 种类:DiagnosticEventManagerNeeds

RoleBasedPortAssignment 有效角色:

  • DTCSuppression [1];

  • ClearDTC [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,DTC 只有在先前已被选择时才能被抑制。这意味着抑制要求先调用名为 SelectDTC 的 ClientServerOperation——它是名为 ClearDTC 的 ClientServerInterface 的一部分——以使相应 DTC 进入工作流的焦点。

更多信息请参阅 [SWS_Dem_01253] 与 [SWS_Dem_00608]。

13.8.3.9. Dem 服务用例:软件组件通知 PTO 处于活动状态

场景:AtomicSwComponentType 告知 Dem PTO 处于活动状态。

AtomicSwComponentType 告知 Dem PTO 处于活动状态:

ServiceNeeds 种类:DiagnosticEventManagerNeeds

RoleBasedPortAssignment:

适用以下角色:

  • PowerTakeOff [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00612]。

13.8.3.10. Dem 服务用例:软件组件需要任何 DTC 状态变化的信息

场景:AtomicSwComponentType 需要关于任何 DTC 状态变化的信息。请求该信息的软件组件数量没有限制。

AtomicSwComponentType 在不是诊断监控器的情况下需要关于特定 DTC 的信息:

ServiceNeeds 种类:DtcStatusChangeNotificationNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackDTCStatusChange [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00617]。

如果软件组件需要关于不同种类 DTC 状态变化的通知,建议为每种状态变化创建一个 SwcServiceDependency。

13.8.3.11. Dem 服务用例:给定诊断事件的数据变化时调用操作(I)

场景:AtomicSwComponentType 提供一个由 ClientServerInterface CallbackEventDataChanged 定义类型的 PPortPrototype。如果相应诊断事件在底层数据方面发生变化,服务组件调用 ClientServerOperation EventDataChanged。

对 AtomicSwComponentType 在概念上连接到的每个诊断事件,它需要向服务组件提供一个 PPortPrototype。

诊断事件数据变化时 AtomicSwComponentType 每个事件提供一个回调:

ServiceNeeds 种类:DiagnosticEventInfoNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackEventDataChanged [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00618]。

13.8.3.12. Dem 服务用例:任一诊断事件的数据或状态变化时调用操作(II)

场景:AtomicSwComponentType 应对任何诊断事件状态变化和/或任何诊断事件数据变化作出反应。例如,这可用于在任何事件状态变化时写一个时间戳,与事件 id 无关。

与第 13.8.3.11 或 13.8.3.10 章描述的场景相反,这一情形预见了覆盖所有相关诊断事件的单一 PPortPrototype 的存在。

任何诊断事件数据和/或状态变化时 AtomicSwComponentType 提供回调:

ServiceNeeds 种类:DiagnosticEventManagerNeeds

RoleBasedPortAssignment 有效角色:

  • GeneralCallbackEventDataChanged [0..1];

  • GeneralCallbackEventUdsStatusChange [0..1];

  • GeneralDiagnosticInfo [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00616]、[SWS_Dem_00619] 与 [SWS_Dem_00600]。

为对诊断事件状态变化作出反应,软件组件应提供一个单一的 PPortPrototype,定义为与 GeneralCallbackEventDataChanged 兼容的 client-server 接口。

为对诊断事件数据变化作出反应,软件组件应提供一个单一的 PPortPrototype,定义为与 GeneralCallbackEventDataChanged 兼容的 client-server 接口。

如果软件组件还需要从 Dem 读取特定诊断事件的更多信息,它应提供一个 RPortPrototype,定义为与 GeneralDiagnosticInfo 兼容的 client-server 接口。它还应规定 DiagnosticEventInfoNeeds。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.3.13. Dem 服务用例:软件组件为诊断目的提供数据

请注意,对这一特定用例,具体 ServiceNeeds 的应用尚未澄清。

场景:AtomicSwComponentType 提供用于诊断目的的数据。数据的提供可以借助由 ClientServerInterface 或 SenderReceiverInterface 定义类型的 PPortPrototype 完成。不过后者在适用的 SWS [41] 中未进一步细化,因此本文档不提供更多细节。

AtomicSwComponentType 经由 ClientServerInterface 为诊断目的提供数据:

RoleBasedPortAssignment 有效角色:

  • DataServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

数据服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dem_00621]。

13.8.3.14. Dem 服务用例:软件组件获取特定 DTC 的信息

场景:AtomicSwComponentType 规定 DiagnosticEventInfoNeeds 以便能获取关于特定 DTC 的信息。该用例在某种程度上与 [TPS_SWCT_01426] 相似,但不取代那个用例。

[TPS_SWCT_01453] 软件组件获取关于特定 DTC 的信息

ServiceNeeds 种类:DiagnosticEventInfoNeeds

RoleBasedPortAssignment 有效角色:

  • DiagnosticInfo [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00599]。

13.8.3.15. Dem 服务用例:软件组件希望在监视器状态变化时被触发

场景:软件组件想在特定监控器状态支持的情况下由监控器状态变化触发。基础软件模块报告的事件不能在该服务用例中考虑。

Dem 不会为基础软件模块报告的事件提供相应的 PortPrototype。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

这样,该服务用例不能用于基础软件报告的事件。

不过,对服务用例的创建者而言,没有办法查明该事件将由基础软件还是应用软件组件报告。

[TPS_SWCT_01715] 软件组件想由监控器状态变化触发

ServiceNeeds 种类:DiagnosticEventManagerNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackMonitorStatusChange [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.3.16. Dem 服务用例:软件组件写入参数标识符(PID)

场景:软件组件计算 PID,并把它们推送给 Dem 以存储并向 Dcm 报告。

[TPS_SWCT_01766] 软件组件计算 PID,并把它们推送给 Dem 以存储并向 Dcm 报告

ServiceNeeds 种类:ObdPidServiceNeeds

RoleBasedPortAssignment 有效角色:

  • SetDataOfPID21 [1];

  • SetDataOfPID4D [1];

  • SetDataOfPID4E [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.3.17. Dem 服务用例:软件组件读取参数标识符

场景:位于 OBD 主 ECU 上的软件组件读取 PID 21,并经由 “常规” sender-receiver 通信把该值发送给位于 OBD 主 ECU 上的其他软件组件,后者有义务把 PID 值推送给其本地 Dem。

位于 OBD 主 ECU 上的软件组件读取 PID 21,并经由 “常规” sender-receiver 通信发送该值:

ServiceNeeds 种类:ObdPidServiceNeeds

RoleBasedPortAssignment 有效角色:

  • GetDataOfPID21 [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.3.18. Dem 服务用例:诊断监视器提供监视数据,由 Dem 防抖

场景:AtomicSwComponentType 实现一个能够提供监控数据的诊断监控器。故障条件的消抖应由 Dem 配置与处理。在这种情况下适用以下设置:

AtomicSwComponentType 实现提供监控数据的诊断监控器,消抖由 Dem 完成:

ServiceNeeds 种类:DiagnosticEventNeeds(属性 usesMonitorData 设置为 true)

RoleBasedPortAssignment 有效角色:

  • DiagnosticMonitor [0..1];

  • DiagnosticMonitor_MonitorData [1];

  • DiagnosticInfo [0..1];

  • CallbackInitMonitorForEvent [0..1];

  • CallbackEventStatusChange [0..1]。

  • CallbackClearEventAllowed [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,为实现该场景,应使用子类 DiagEventDebounceCounterBased 或 DiagEventDebounceTimeBased 算法作为属性 DiagnosticEventNeeds.diagEventDebounceAlgorithm 的值。

13.8.3.19. Dem 服务用例:诊断监视器提供监视数据,由软件组件防抖

场景:AtomicSwComponentType 实现一个能够提供监控数据的诊断监控器。故障条件的消抖应由实现该监控器的软件组件配置与处理。在这种情况下适用以下设置:

AtomicSwComponentType 实现提供监控数据的诊断监控器,消抖由软件组件完成:

ServiceNeeds 种类:DiagnosticEventNeeds(属性 usesMonitorData 设置为 true)

RoleBasedPortAssignment 有效角色:

  • DiagnosticMonitor [0..1];

  • DiagnosticMonitor_MonitorData [1];

  • DiagnosticInfo [0..1];

  • CallbackInitMonitorForEvent [0..1];

  • CallbackEventStatusChange [0..1]。

  • CallbackClearEventAllowed [0..1]。

  • CallbackGetFaultDetectCounter [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,为实现该场景,应使用子类 DiagEventDebounceMonitorInternal 作为属性 DiagnosticEventNeeds.diagEventDebounceAlgorithm 的值。

13.8.3.20. Dem 服务用例:软件组件检查事件是否被抑制

场景:表示给定事件监控器的软件组件需要检查该事件的可用性,以决定该事件的报告是否被 Dem 清除。

这一能力的一个典型用例是执行器为测试目的被移到极限的场景。在这一阶段,监控应停止。

为此,软件组件需要向 Dem 暴露一个 RPortPrototype。

[TPS_SWCT_01808] Dem 服务用例:软件组件检查事件是否被抑制

ServiceNeeds 种类:DiagnosticEventInfoNeeds

RoleBasedPortAssignment 有效角色:

  • DiagnosticInfo [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.3.21. Dem 服务用例:软件组件希望获得 DTC 清除的信息

AtomicSwComponentType 想要关于 DTC 清除的信息。ClearDtcNotification 回调的执行可以在 DTC 操作开始时触发(即 DtcStatusChangeNotificationNeeds.notificationTime = DiagnosticClearDtcNotificationEnum.start)或在 DTC 操作结束时触发(即 DtcStatusChangeNotificationNeeds.notificationTime = DiagnosticClearDtcNotificationEnum.finish)。

为此,AtomicSwComponentType 应暴露一个由名为 ClearDtcNotification 的标准化 AUTOSAR ClientServerInterface 定义类型的 PPortPrototype(见 [SWS_Dem_91003])。

AtomicSwComponentType 想要关于 DTC 清除的信息:

ServiceNeeds 种类:DtcStatusChangeNotificationNeeds

RoleBasedPortAssignment 有效角色:

  • ClearDtcNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_01240] 与 [SWS_Dem_01241]。

DtcStatusChangeNotificationNeeds . notificationTime 属性的存在性:

表13.32:DtcStatusChangeNotificationNeeds(DtcStatusChangeNotificationNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component interested to get information regarding any DTC status change. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
notificationTime DiagnosticClearDtc NotificationEnum 0..1 attr This attribute determines the time when the notification about the DTC operation shall be executed. This attribute is only relevant for the configuration of the ClearDtc Notification.

表13.33:DiagnosticClearDtcNotificationEnum(DiagnosticClearDtcNotificationEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration supports the specification of the time when the ClearDtcNotification callback is supposed to be executed. | | 聚合于 | DtcStatusChangeNotificationNeeds.notificationTime |

字面值 说明
finish The ClearDtcCallback shall be executed when the DTC operation finishes. Tags: atp.EnumerationLiteralIndex=1
start The ClearDtcCallback shall be executed when the DTC operation starts. Tags: atp.EnumerationLiteralIndex=0
13.8.3.22. Dem 服务用例:软件组件希望重置降级状态

场景:AtomicSwComponentType 想重置一个降级状态,从而停用 “跛行回家” 模式。

为此,软件组件使用在 ClientServerInterface DiagnosticMonitor 中定义的 ClientServerOperation ResetMonitorStatus。

在这种情况下适用以下设置:

[TPS_SWCT_01870] AtomicSwComponentType 想重置降级状态

ServiceNeeds 种类:DiagnosticEventNeeds

RoleBasedPortAssignment 有效角色:

  • DiagnosticMonitor [1];

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,软件组件可能想先选择获取关于关联 DTC 的信息,见 [TPS_SWCT_01453]。

13.8.3.23. Dem 服务用例:软件组件希望清除 DTC

场景:AtomicSwComponentType 想清除一个 DTC。为此,AtomicSwComponentType 暴露一个由名为 ClearDTC 的标准化 AUTOSAR ClientServerInterface 定义类型的 RPortPrototype(见 [SWS_Dem_00666])。

在这种情况下适用以下设置:

AtomicSwComponentType 想清除一个 DTC:

ServiceNeeds 种类:DiagnosticEventManagerNeeds

RoleBasedPortAssignment 有效角色:

  • ClearDTC [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,DTC 的清除经由名为 ClearDTC 的 ClientServerOperation 完成,后者要求先调用名为 SelectDTC 的 ClientServerOperation——它是名为 ClearDTC 的 ClientServerInterface 的一部分——以使相应 DTC 进入工作流的焦点。

更多信息请参阅 [SWS_Dem_01253]。

13.8.4. 诊断通信需求

元类 DiagnosticCommunicationManagerNeeds 用于定义配置诊断通信管理器服务的需求。

SwcInternalBehavior 可以提供一个 DiagnosticCommunicationManagerNeeds 元素,它定义一般诊断通信的映射(与 AUTOSAR 诊断通信管理器相关的术语见 [42])。

元类 DiagnosticRoutineNeeds 用于定义配置诊断通信管理器服务的需求。由 ClientServerInterface 定义类型的 PPortPrototype 可以提供 ClientServerOperation(例如 “start”、“stop” 与 “RequestResults”)。

该 PPortPrototype 对应诊断服务 RoutineControl。在 SwcInternalBehavior 内最多定义三个 RunnableEntity 来实现前面提到的 ClientServerOperation。

枚举参数 DiagnosticRoutineTypeEnum 用于定义诊断服务器还是客户端负责停止例程。

请注意,DiagnosticRoutineNeeds 的应用适用 [constr_1340] 与 [constr_1341]。这些约束是《诊断提取模板》规范的一部分。

1 其中 isService 应设置为 true

表13.34:DiagnosticCommunicationManagerNeeds(DiagnosticCommunicationManagerNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the general needs on the configuration of the Diagnostic Communication Manager (Dcm) which are not related to a particular item (e.g. a PID or DiagnosticRoutineNeeds). The main use case is the mapping of service ports to the Dcm which are not related to a particular item. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
serviceRequest CallbackType DiagnosticService RequestCallbackType Enum 0..1 attr This represents the ability to define whether the usage of PortInterface ServiceRequestNotification has the characteristics of being initiated by a manufacturer or by a supplier.

表13.35:DiagnosticServiceRequestCallbackTypeEnum(DiagnosticServiceRequestCallbackTypeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This represents the ability to define whether a Service Request Notification was used in the role of a manufacturer or a supplier. | | 聚合于 | DiagnosticCommunicationManagerNeeds.serviceRequestCallbackType |

表13.36:DiagnosticServiceRequestCallbackTypeEnum(DiagnosticServiceRequestCallbackTypeEnum)

属性 类型 多重性 种类 备注
requestCallback TypeManufacturer This represents the case that the usage of PortInterface ServiceRequestNotification has the characteristics of being used by a manufacturer. Tags: atp.EnumerationLiteralIndex=0
requestCallback TypeSupplier This represents the case that the usage of PortInterface ServiceRequestNotification has the characteristics of being used by a supplier. Tags: atp.EnumerationLiteralIndex=1

表13.37:DiagnosticRoutineNeeds(DiagnosticRoutineNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the general needs on the configuration of the Diagnostic Communication Manager (Dcm) which are not related to a particular item (e.g. a PID). The main use case is the mapping of service ports to the Dcm which are not related to a particular item. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
diagRoutine Type DiagnosticRoutineType Enum 0..1 attr This denotes the type of diagnostic routine which is implemented by the referenced server port.

the reference DiagnosticRoutineNeeds . diagRoutineType 的存在性:

表13.38:DiagnosticRoutineTypeEnum(DiagnosticRoutineTypeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumerator specifies the different types of diagnostic routines. | | 聚合于 | DiagnosticRoutineNeeds.diagRoutineType |

字面值 说明
asynchronous This indicates that the diagnostic server is not blocked while the diagnostic routine is running. Tags: atp.EnumerationLiteralIndex=0
synchronous This indicates that the diagnostic routine blocks the diagnostic server in the ECU while the routine is running. Tags: atp.EnumerationLiteralIndex=1

元类 DiagnosticIoControlNeeds 用于定义配置诊断通信管理器服务的需求。该 PPortPrototype 对应诊断服务 InputOutputControlByIdentifier。在 SwcInternalBehavior 内最多定义三个 RunnableEntity 来实现前面提到的 ClientServerOperation。

表13.39:DiagnosticIoControlNeeds(DiagnosticIoControlNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the general needs on the configuration of the Diagnostic Communication Manager (DCM) which are not related to a particular item (e.g. a PID). The main use case is the mapping of service ports to the Dcm which are not related to a particular item. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
currentValue DiagnosticValueNeeds 0..1 ref Reference to the DiagnosticValueNeeds indicating the access to the current value via signalBasedDiagnostics.
freezeCurrent StateSupported Boolean 0..1 attr This attribute determines, if the referenced port supports temporary freezing of I/O value. The temporary freeze is not supported if the enclosing DiagnosticIoControlNeeds is aggregated by a Swc ServiceDependency, see [constr_1364].
resetToDefault Supported Boolean 0..1 attr This represents a flag for the existence of the ResetTo Default operation in the service interface.
shortTerm Adjustment Supported Boolean 0..1 attr This attribute determines, if the referenced port supports temporarily setting of I/O value to a specific value provided by the diagnostic tester. The short term adjustment is not supported if the enclosing DiagnosticIoControlNeeds is aggregated by a SwcServiceDependency, see [constr_1364].

元类 DiagnosticValueNeeds 用于定义配置诊断通信管理器服务以及诊断事件管理器服务的需求。

DCM 可以经由 ClientServerInterface 访问本地值,也可以访问由 SenderReceiverInterface 定义类型的 PPortPrototype 中的 dataElement。为此,DiagnosticValueNeeds 要求与本地值(即 InternalBehavior 内部)或相应 dataElement 的关联。

类型 DiagnosticValueAccessEnum 的属性 DiagnosticValueNeeds.diagnosticValueAccess 允许区分读取诊断信息的当前值(readOnly)与另外被归类为可配置的数据元素(readWrite)。

attributes of DiagnosticValueNeeds 的存在性:

  • DiagnosticValueNeeds.diagnosticValueAccess;

  • DiagnosticValueNeeds.dataLength,

在合同阶段生成执行时不应存在。glyph[floorright]()

attributes of DiagnosticIoControlNeeds 的存在性:

  • DiagnosticIoControlNeeds.freezeCurrentStateSupported;

  • DiagnosticIoControlNeeds.shortTermAdjustmentSupported,

在合同阶段生成执行时不应存在。glyph[floorright]()

无论从哪个角度看,[constr_1363] 与 [constr_1364] 所作的陈述归根结底意味着:这些属性只可以在 BswServiceDependency 的上下文中合理使用。

表13.40:DiagnosticValueNeeds(DiagnosticValueNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the general needs on the configuration of the Diagnostic Communication Manager (DCM) which are not related to a particular item (e.g. a PID). The main use case is the mapping of service ports to the DCM which are not related to a particular item. In the case of using a sender receiver communicated value, the related value shall be taken via assigned Data in the role "signalBasedDiagnostics". In case of using a client/server communicated value, the related value shall be communicated via the port referenced by assignedPort. The details of this communication (e.g. appropriate naming conventions) are specified in the related software specifications (SWS). | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
dataLength PositiveInteger 0..1 attr This attribute is applicable only if the DiagnosticValue Needs is aggregated within a BswModuleDependency. This attribute represents the length of data (in bytes) provided for this particular PID signal.
diagnosticValue Access DiagnosticValueAccess Enum 0..1 attr This attribute is applicable only if the DiagnosticValue Needs is aggregated within a BswModuleDependency. This attribute controls whether the data can be read and written or whether it is to be handled read-only.
fixedLength Boolean 0..1 attr This attribute is applicable only if the DiagnosticValue Needs is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed.
processingStyle DiagnosticProcessing StyleEnum 0..1 attr This attribute controls whether interaction requires the software-component to react synchronously on a request or whether it processes the request in background but still the DCM has to issue the call again to eventually obtain the result of the request.

表13.41:DiagnosticValueAccessEnum(DiagnosticValueAccessEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Defines the access of the configured diagnostic current values which will be used by the Dem or Dcm module. | | 聚合于 | DiagnosticValueNeeds.diagnosticValueAccess |

字面值 说明
Enumeration DiagnosticValueAccessEnum
readOnly The access to the data element is limited to read-only. This is typically used to read-out diagnostic information (e.g. current values). Tags: atp.EnumerationLiteralIndex=0
readWrite The value of the diagnostic data element is classified as configurable (read and write access is possible). Tags: atp.EnumerationLiteralIndex=1
writeOnly The access to the data element is limited to write-only. This supports the use case where the Dcm just writes data to the application software without the intention to read it back, Tags: atp.EnumerationLiteralIndex=2

表13.42:DiagnosticProcessingStyleEnum(DiagnosticProcessingStyleEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to define the processing style of diagnostic requests. | | 聚合于 | DiagnosticValueNeeds.processingStyle |

字面值 说明
processingStyle Asynchronous The software-component processes the request in background but still the Dcm has to issue the call again to eventually obtain the result of the request. Tags: atp.EnumerationLiteralIndex=0
processingStyle AsynchronousWith Error The software-component processes the request in background but still the Dcm has to issue the call again to eventually obtain the result of the request or handle error code. Tags: atp.EnumerationLiteralIndex=1
processingStyle Synchronous The software-component is supposed to react synchronously on the request. Tags: atp.EnumerationLiteralIndex=2

表13.43:DiagnosticsCommunicationSecurityNeeds(DiagnosticsCommunicationSecurityNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the needs of a software-component to verify the access to security level via diagnostic services. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.4.1. Dcm 服务用例:通过 Client/Server 接口读/写当前值

场景:AtomicSwComponentType 提供一个由 ClientServerInterface 定义类型的 PPortPrototype,经由诊断服务读取/写入当前值(例如测量、变体编码)

AtomicSwComponentType 提供由 ClientServerInterface 定义类型的 PPortPrototype 经由诊断服务读取/写入当前值:

ServiceNeeds 种类:DiagnosticValueNeeds

RoleBasedPortAssignment 有效角色:

  • DataServices [1]。

RoleBasedDataAssignment

不适用

RepresentedPortGroups

不适用

数据服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00686]。

13.8.4.2. Dcm 服务用例:通过 Client/Server 接口读/写特定 DID 的当前值

场景:AtomicSwComponentType 提供一个由 ClientServerInterface 定义类型的 PPortPrototype,经由诊断服务读取/写入当前值(例如测量、变体编码),其中适用的 DID 作为实参传递给访问函数。该用例主要适用于软件组件提供与多于一个 DID 相关的信息的情况。

AtomicSwComponentType 提供由 ClientServerInterface 定义类型的 PPortPrototype 经由诊断服务读取/写入当前值,其中适用的 DID 作为实参传递给访问函数:

ServiceNeeds 种类:DiagnosticValueNeeds

RoleBasedPortAssignment 有效角色:

  • DataServices_DIDRange [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

数据服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00769]。

13.8.4.3. Dcm 服务用例:通过 Sender/Receiver 接口或 NV 数据接口读/写当前值

场景:AtomicSwComponentType 提供由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype,经由诊断服务读取/写入对应一个 DID 的元素的当前值(例如测量、变体编码)(与 [TPS_SWCT_01853] 描述的一次性整个 DID 相对)。

这主要用于反正可在端口获得、用于其他通信目的的数据。

注意:该场景可以实现为常规的 sender/receiver 通信,无需使用 SwcServiceDependency。SwcServiceDependency 的描述(即使技术上并非必需)可能有助于宣传相应 dataElement 在诊断方面的特殊角色。

AtomicSwComponentType 提供由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype 经由诊断服务读取/写入当前值:

ServiceNeeds 种类:DiagnosticValueNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • signalBasedDiagnostics [1..2]。

RepresentedPortGroups:

不适用

读取信号时 AtomicSwComponentType 应提供 AbstractProvidedPortPrototype,写入信号时 AtomicSwComponentType 应提供 AbstractRequiredPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

更多信息请参阅 [TPS_SWCT_01579]、[TPS_SWCT_01831] 与 [SWS_Dcm_00687]。

为此使用的服务接口是 DataServices_{Data},另见 [SWS_Dcm_00687]。更多信息请参阅 [TPS_SWCT_01579] 与 [TPS_SWCT_01831]。

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = signalBasedDiagnostics 属性的存在性:

关于 [constr_1679] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的诊断访问。

13.8.4.4. Dcm 服务用例:通过 Sender/Receiver 接口或 NV 数据接口读/写整个 DID

场景:AtomicSwComponentType 提供由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype,经由诊断服务读取/写入整个 DID 的内容。

AtomicSwComponentType 提供由 SenderReceiverInterface 或 NvDataInterface 定义类型的 PortPrototype 经由诊断服务读取/写入整个 DID 的内容:

ServiceNeeds 种类:DiagnosticValueNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • signalBasedDiagnostics [1..2]。

RepresentedPortGroups:

不适用

读取数据时 AtomicSwComponentType 应提供 AbstractProvidedPortPrototype,写入数据时 AtomicSwComponentType 应提供 AbstractRequiredPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

为此使用的服务接口是 DataServices_{Data},另见 [SWS_Dcm_91057]。更多信息请参阅 [TPS_SWCT_01579] 与 [TPS_SWCT_01831]。

适用。:

13.8.4.5. Dcm 服务用例:启动/停止或请求例程结果

场景:AtomicSwComponentType 提供一个由 ClientServerInterface 定义类型的 PortPrototype,用于启动/停止或请求诊断例程的例程结果。

AtomicSwComponentType 提供由 ClientServerInterface 定义类型的 PortPrototype 用于启动/停止或请求诊断例程的例程结果:

ServiceNeeds 种类:DiagnosticRoutineNeeds

RoleBasedPortAssignment 有效角色:

  • RoutineServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

例程服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00690]。

属性 ClientServerOperation.diagArgIntegrity 的用法:

该规则应在 RTE 生成时施加。

换言之,在应用软件层级,属性 diagArgIntegrity 只应在 PPortPrototype 的上下文中存在。

显然,用于表示 Dcm 的 ServiceSwComponentType 将使用一个 RPortPrototype 作为连接到应用软件中所述 PortPrototype 的 AssemblySwConnector 的另一端。

13.8.4.6. Dcm 服务用例:通过 Client/Server 接口进行 IO 控制

场景:AtomicSwComponentType 提供一个由 ClientServerInterface 定义类型的 PortPrototype,经由诊断服务调整 IO 信号。

AtomicSwComponentType 提供由 ClientServerInterface 定义类型的 PortPrototype 经由诊断服务调整 IO 信号:

ServiceNeeds 种类:DiagnosticIoControlNeeds

RoleBasedPortAssignment 有效角色:

  • DataServices [1]。

RoleBasedDataAssignment

不适用

RepresentedPortGroups

不适用

数据服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00686]。

13.8.4.7. Dcm 服务用例:通过 Sender/Receiver 接口进行 IO 控制

该用例表示第 13.8.4.6 章所描述用例的替代方案,即为了同一目的也可以使用 SenderReceiverInterface。

由 SenderReceiverInterface 定义类型的 I/O PortPrototype 存在背后的本质想法是:快速访问当前受控的 dataElement 的可能性。

特别是需要从不同分区(例如多核系统中)访问 dataElement 的情况可以从这一方法受益。

场景:AtomicSwComponentType 提供一个由 SenderReceiverInterface(特别是 IOControlRequest)定义类型的 RPortPrototype 以调整 I/O

信号(经由诊断服务),并提供一个由 SenderReceiverInterface(特别是 IOControlResponse)定义类型的 PPortPrototype 以提供 IO “操作响应”。

在使用 IOControlRequest(拥有三个 dataElement)与 IOControlResponse 的情况下,整个 PortPrototype 与恰好一个 IO 控制相关,且需要保持一致。

因此,需要使用 RoleBasedPortAssignment(而不是 RoleBasedDataAssignment——它通常用于 sender/receiver 场景)以避免建模开销。

AtomicSwComponentType 提供由 SenderReceiverInterface 定义类型的 PortPrototype 经由诊断服务调整 IO 信号:

ServiceNeeds 种类:DiagnosticIoControlNeeds

RoleBasedPortAssignment 有效角色:

  • IOControlRequest [1];

  • IOControlResponse [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

IOControl 服务在其诊断响应中要求 IODID 的当前值,该值与 ReadDataByIdentifer 响应中 DiagnosticValueNeeds 所表示的当前值相同。

从 DiagnosticIoControlNeeds 到 DiagnosticValueNeeds 的引用:

IOControlRequest 与 IOControlResponse 的 PortInterface 结果名称所用的后缀:

该服务用例可视化于图 13.17。该 SwComponentPrototype 包含两个 SwcServiceDependency:一个用于 I/O 控制,另一个用于 Dcm 对 shortName 为 “IOx” 的 dataElement 的访问。

请注意,在该示例中,ApplicationSwComponentType 的 PPortPrototype 上使用的 SenderReceiverInterface 有若干 dataElement(shortName 为 “IOx” 的 dataElement 是其中之一)。这是一个完全有效的配置。

另一方面,表示 Dcm 的 ServiceSwComponentType 的 RPortPrototype 上使用的 SenderReceiverInterface 只能有一个 dataElement。该单一 dataElement 应(就本例而言)被赋予 shortName “IOx”。

注意从 DiagnosticIoControlNeeds 到 DiagnosticValueNeeds 的引用。该引用明确表达了 DID 的访问与 I/O 控制的用法相结合。

属性 role 设置为 “IOControlRequest” 的 RoleBasedPortAssignment 所引用 RPortPrototype 的命名规则:

更多信息请参阅 [SWS_Dcm_01308] 与 [SWS_Dcm_01309]。

在聚合 DiagnosticValueNeeds(进而被 DiagnosticIoControlNeeds 引用)的 SwcServiceDependency 上下文中 DataServices 用法的显式发送语义限制:

  • 它被一个 RoleBasedDataAssignment(属性 role 设置为 signalBasedDiagnostics)引用;该 RoleBasedDataAssignment 由一个聚合 DiagnosticValueNeeds 的 SwcServiceDependency 拥有,而该 DiagnosticValueNeeds 又被一个 DiagnosticIoControlNeeds 引用;

  • 还应被一个 VariableAccess 引用,该 VariableAccess 在角色 dataSendPoint 中由给定 RunnableEntity 聚合,而该 RunnableEntity 属于外层 SwcInternalBehavior;

  • 不应被一个 VariableAccess 引用,该 VariableAccess 在角色 dataWriteAccess 中由给定 RunnableEntity 聚合,而该 RunnableEntity 属于外层 SwcInternalBehavior。

该规则应在 RTE 生成时施加。

换言之,诊断变换器处理的数据只应显式发送。这些数据的隐式发送用法不受支持。

13.8.4.8. Dcm 服务用例:访问协议、会话和安全信息

场景:AtomicSwComponentType 提供一个服务器端口,用于获取协议、会话与安全信息,或请求重置到默认会话。

AtomicSwComponentType 提供服务器端口用于获取协议、会话与安全信息或请求重置到默认会话:

ServiceNeeds 种类:DiagnosticCommunicationManagerNeeds

RoleBasedPortAssignment 有效角色:

  • DCMServices [1]。

RoleBasedDataAssignment

不适用

RepresentedPortGroups

不适用

更多信息请参阅 [SWS_Dcm_00698]。

13.8.4.9. Dcm 服务用例:验证对安全级别的访问

场景:AtomicSwComponentType 提供一个服务器端口,经由诊断服务验证对安全等级的访问。

AtomicSwComponentType 经由诊断服务验证对安全等级的访问:

ServiceNeeds 种类:DiagnosticsCommunicationSecurityNeeds

RoleBasedPortAssignment 有效角色:

  • SecurityAccess [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

安全访问的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00685]。

13.8.4.10. Dcm 服务用例:多个测试仪访问一个 ECU

场景:AtomicSwComponentType 提供一个服务器端口,获取协议通信状态的信息。此外,AtomicSwComponentType 可以禁止某个协议。

AtomicSwComponentType 要求协议通信状态的信息并可以禁止某个协议:

ServiceNeeds 种类:DiagnosticCommunicationManagerNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackDCMRequestServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dcm_00692]。

13.8.4.11. Dcm 服务用例:服务请求通知

场景:AtomicSwComponentType 提供一个服务器端口,经由诊断服务获得关于服务请求的通知。这指示应用成功接收到一个新请求。

在该服务请求通知内,该功能应用可以检查诊断服务/环境的许可。

请注意,服务请求通知可以以两种特性使用,即作为整车厂(适用 [TPS_SWCT_01577])或作为供应商(适用 [TPS_SWCT_01578])。

AtomicSwComponentType 要求经由诊断服务获得整车厂特性的服务请求通知:

属性 DiagnosticCommunicationManagerNeeds.serviceRequestCallbackType 应设置为值 requestCallbackTypeManufacturer。

ServiceNeeds 种类:DiagnosticCommunicationManagerNeeds

RoleBasedPortAssignment 有效角色:

  • ServiceRequestNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

AtomicSwComponentType 要求经由诊断服务获得供应商特性的服务请求通知:

属性 DiagnosticCommunicationManagerNeeds.serviceRequestCallbackType 应设置为值 requestCallbackTypeSupplier。

ServiceNeeds 种类:DiagnosticCommunicationManagerNeeds

RoleBasedPortAssignment 有效角色:

  • ServiceRequestNotification [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dcm_00694]。

13.8.4.12. Dcm 服务用例:通过 Client/Server 接口读/写当前值及 IO 控制

场景:AtomicSwComponentType 提供一个由 ClientServerInterface 定义类型的 PPortPrototype,经由诊断服务读取/写入与 IOCtrl 当前值(例如测量、变体编码)

AtomicSwComponentType 提供由 ClientServerInterface 定义类型的 PPortPrototype 经由诊断服务读取/写入与 IOCtrl 当前值:

ServiceNeeds 种类:DiagnosticValueNeeds、DiagnosticIoControlNeeds

RoleBasedPortAssignment 有效角色:

  • DataServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

数据服务的 PortInterface 结果名称所用的后缀:

13.8.4.13. Dcm 服务用例:软件组件充当诊断测试仪的“文件服务器”

场景:AtomicSwComponentType 充当诊断测试仪的 “文件服务器”。

AtomicSwComponentType 充当诊断测试仪的 “文件服务器”:

ServiceNeeds 种类:DiagnosticRequestFileTransferNeeds

RoleBasedPortAssignment 有效角色:

  • RequestFileTransfer [1]。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.44:DiagnosticRequestFileTransferNeeds(DiagnosticRequestFileTransferNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class indicates the existence of a service use case that involves UDS service 0x38, Request File Transfer. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.5. OBD 相关需求

ObdRatioServiceNeeds 描述基于速率的监控实现的进一步属性(例如 connectionType)以及与 ECU 配置相关的逻辑依赖。

表13.45:ObdRatioServiceNeeds(ObdRatioServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs of a component or module on the configuration of OBD Services in relation to a particular "ratio monitoring" which is supported by this component or module. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds | | 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs of a component or module on the configuration of OBD Service 08 (request control of on-board system) in relation to a particular test-Identifier (TID) supported by this component or module. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
connectionType ObdRatioConnection KindEnum 0..1 attr Defines how the DEM is connected to the component or module to perform the IUMPR (In use monitor performance ratio) service.
rateBased MonitoredEvent DiagnosticEventNeeds 0..1 ref The rate based monitored Diagnostic Event.
usedFid FunctionInhibitionNeeds 0..1 ref This represents the primary Function Inhibition Identifier used for the rate based monitor. This is an optional attribute.
Class ObdControlServiceNeeds

表13.46:ObdRatioConnectionKindEnum(ObdRatioConnectionKindEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Defines the way how the IUMPR service connection between the Dem and the client component or module is handled (for details see the DEM Specification). | | 聚合于 | ObdRatioServiceNeeds.connectionType |

字面值 说明
apiUse The IUMPR service (of the DEM) uses an explicit API to connect to the component or module. Tags: atp.EnumerationLiteralIndex=0
observer The IUMPR service (of the Dem) uses no API but "observes" the associated diagnostic event. Tags: atp.EnumerationLiteralIndex=1

此外,为规定 OBD 诊断服务调用的特定需求,需要 ObdPidServiceNeeds、ObdInfoServiceNeeds、ObdMonitorServiceNeeds 与 ObdControlServiceNeeds。注意,ObdPidServiceNeeds 也用于诊断事件管理器。

ObdRatioServiceNeeds.rateBasedMonitoredEvent 的语义:

表13.47:ObdPidServiceNeeds(ObdPidServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs of a component or module on the configuration of OBD Services in relation to a particular PID (parameter identifier) which is supported by this component or module. In case of using a client/server communicated value, the related value shall be communicated via the port referenced by assignedPort. The details of this communication (e.g. appropriate naming conventions) are specified in the related software specifications (SWS). | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.48:ObdInfoServiceNeeds(ObdInfoServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs of a component or module on the configuration of OBD Services in relation to a given InfoType (OBD Service 09) which is supported by this component or module. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.49:ObdMonitorServiceNeeds(ObdMonitorServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the abstract needs of a component or module on the configuration of OBD Services in relation to a particular on-board monitoring test supported by this component or module. (OBD Service 06). | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
applicationData Type ApplicationDataType 0..1 ref reference to an ApplicationDataType that describes the scaling of the data reported by the software-component to the Dem.

表13.50:ObdMonitorServiceNeeds(ObdMonitorServiceNeeds)

属性 类型 多重性 种类 备注
eventNeeds DiagnosticEventNeeds 0..1 ref This reference identifies the corresponding diagnostic event.
unitAndScaling Id PositiveInteger 0..1 attr Unit and scaling ID according to ISO 15031-5.
updateKind DiagnosticMonitor UpdateKindEnum 0..1 attr This attribute indicates the settings for the acceptance of updates to the Dem.

表13.51:DiagnosticMonitorUpdateKindEnum(DiagnosticMonitorUpdateKindEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration indicates the acceptance criteria for a diagnostic monitor. | | 聚合于 | ObdMonitorServiceNeeds.updateKind |

字面值 说明
always The value 'always' configures Dem to accept the call to SetDTR() regardless of the state of the diagnostics. Tags: atp.EnumerationLiteralIndex=0
steady The value 'steady' configures Dem to accept it only when debouncing is at the limit. Tags: atp.EnumerationLiteralIndex=1
13.8.5.1. Dem 服务用例:使用中监视器性能比(IUMPR)计算

场景:AtomicSwComponentType 实现带使用中监控性能比(IUMPR)的 OBD 系统监控器,并提供客户端端口以提供规定可能发现故障次数的能力。

AtomicSwComponentType 实现带使用中监控性能比的 OBD 系统监控器:

ServiceNeeds 种类:ObdRatioServiceNeeds

RoleBasedPortAssignment 有效角色:

  • IUMPRNumerator [0..1];

  • IUMPRDenominator [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00610] 与 [SWS_Dem_00611]。

角色 IUMPRNumerator 与 ObdRatioServiceNeeds.connectionType 之间的一致性:

如果所含 ObdRatioServiceNeeds 的属性 connectionType 设置为 ObdRatioConnectionKindEnum.observer,则角色值 IUMPRNumerator 不适用。

该规则应在 RTE 生成时施加。

13.8.5.2. Dcm 服务用例:通过诊断服务以 Client/Server 接口读取参数标识符

场景:AtomicSwComponentType 提供一个服务器端口,经由 OBD 服务读取/写入当前值。

AtomicSwComponentType 提供服务器端口经由 OBD 服务读取/写入当前值:

ServiceNeeds 种类:ObdPidServiceNeeds

RoleBasedPortAssignment:

适用以下角色:

  • DataServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

数据服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00686]。

13.8.5.3. Dcm 服务用例:通过诊断服务以 Sender/Receiver 接口读取参数标识符

场景:AtomicSwComponentType 提供 sender-receiver 端口,经由 OBD 服务读取/写入当前值。

AtomicSwComponentType 提供 sender-receiver 端口经由 OBD 服务读取/写入当前值:

ServiceNeeds 种类:ObdPidServiceNeeds

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment:

适用以下角色:

  • signalBasedDiagnostics [1..2]。

RepresentedPortGroups:

不适用

读取信号时 AtomicSwComponentType 应提供 AbstractProvidedPortPrototype,写入信号时 AtomicSwComponentType 应提供 AbstractRequiredPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

更多信息请参阅 [SWS_Dcm_00687]。

请注意,[constr_1679] 适用于该服务用例。

13.8.5.4. Dcm 服务用例:请求车辆信息

场景:AtomicSwComponentType 提供一个服务器端口,经由 OBD 服务读取车辆信息值。

AtomicSwComponentType 提供服务器端口经由 OBD 服务读取车辆信息值:

ServiceNeeds 种类:ObdInfoServiceNeeds

RoleBasedPortAssignment 有效角色:

  • InfotypeServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

信息类型服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00688]。

13.8.5.5. Dem 服务用例:为 OBD 服务 $06 从 SW-C 读取 DTR 数据

场景:AtomicSwComponentType 暴露一个客户端端口以读取 DTR 值。

AtomicSwComponentType 提供客户端端口以读取 DTR 值:

ServiceNeeds 种类:ObdMonitorServiceNeeds

RoleBasedPortAssignment 有效角色:

  • DTRCentralReport [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.5.6. Dcm 服务用例:请求控制车载系统、测试或组件

场景:AtomicSwComponentType 提供一个服务器端口,经由 OBD 服务请求对车载系统、测试或组件的控制。

AtomicSwComponentType 提供服务器端口经由 OBD 服务请求对车载系统、测试或组件的控制:

ServiceNeeds 种类:

ObdControlServiceNeeds

RoleBasedPortAssignment:

适用以下角色:

  • RequestControlServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请求控制服务的 PortInterface 结果名称所用的后缀:

更多信息请参阅 [SWS_Dcm_00691]。

13.8.5.7. Dem 服务用例:使用中监视性能比分母接口

场景:AtomicSwComponentType 实现一个分母(或访问一个比值以传输到其他控制单元)。

[TPS_SWCT_01765] Dem 服务用例:使用中监控性能比分母接口

ServiceNeeds 种类:ObdRatioDenominatorNeeds

RoleBasedPortAssignment:

适用以下角色:

  • IUMPRDenominatorCondition [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dem_00742]。

表13.52:ObdRatioDenominatorNeeds(ObdRatioDenominatorNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class shall be used to indicate that a software-component wants to access the in-use-monitoring performance ration denominator. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs |

表13.53:ObdRatioDenominatorNeeds(ObdRatioDenominatorNeeds)

| 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
denominator Condition DiagnosticDenominator ConditionEnum 0..1 attr This attribute indicates the applicable denominator condition.

表13.54:DiagnosticDenominatorConditionEnum(DiagnosticDenominatorConditionEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration contains valid denominator types. | | 聚合于 | ObdRatioDenominatorNeeds.denominatorCondition |

字面值 说明
_500miles Condition based on definition of 500miles conditions as defined for OBD2. Tags: atp.EnumerationLiteralIndex=2 xml.name=-500-MILES
coldstart Condition based on definition of "cold start" as defined for EU5+ Tags: atp.EnumerationLiteralIndex=0
csers Conditions based on the "Cold start emission reduction strategy" denominator Tags: atp.EnumerationLiteralIndex=5
evap Condition based on definition of "EVAP" conditions as defined for OBD2. Tags: atp.EnumerationLiteralIndex=1
evappurgeflow Conditions based on the "EVAP purge flow" denominator. Tags: atp.EnumerationLiteralIndex=6
individual condition based on definition of individual requirements. Tags: atp.EnumerationLiteralIndex=3
obd Condition based on definition of OBD requirements. Tags: atp.EnumerationLiteralIndex=4
13.8.5.8. Dem 服务用例:SW-C 为 OBD 服务 $06 设置 DTR

场景:实现包含 DTR(Mode $06)数据的 OBD 相关诊断的 AtomicSwComponentType,调用 SetEventStatus() 传 pass/fail(Dem 做 MonitorInternal(无)消抖)或 prepass/prefail 以把消抖移入 Dem。DTR/Mode $06 数据通过调用 SetDTR() 交付。

[TPS_SWCT_01879] AtomicSwComponentType 提供客户端端口以设置 DTR 值

ServiceNeeds 种类:ObdMonitorServiceNeeds

RoleBasedPortAssignment:

适用以下角色:

  • DTRCentralReport [1]。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

请注意,在《TPS 诊断提取模板》的上下文中存在非常类似的建模形式 DiagnosticTestResult.updateKind。

软件组件的实现者了解软件组件使用消抖的方式以及它调用 Dem 的方式。

软件组件的实现者拥有为属性 ObdMonitorServiceNeeds.updateKind 设置恰当值所需的全部信息。

另一方面,DEXT 的作者可能注意到某个诊断软件组件有问题,并可能把 DEXT 作为变通手段,借助 DiagnosticTestResult.updateKind 修复 ObdMonitorServiceNeeds.updateKind 的错误设置。

表13.55:DiagnosticTestResult(DiagnosticTestResult)

| 包 | M2::AUTOSARTemplates::DiagnosticExtract::Dem::DiagnosticTestResult | | 说明 | This meta-class represents the ability to define diagnostic test results. Tags: atp.recommendedPackage=DiagnosticTestResults | | 基类 | ARElement , ARObject , CollectableElement , DiagnosticCommonElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
diagnosticEvent DiagnosticEvent 0..1 ref This attribute represents the diagnostic event that is related to the diagnostic test result. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=diagnosticEvent.diagnosticEvent, diagnostic Event.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
monitored Identifier Diagnostic MeasurementIdentifier 0..1 ref This attribute represents the related diagnostic monitored identifier.
testIdentifier DiagnosticTestIdentifier 0..1 aggr This attribute represents the applicable test identifier.
updateKind DiagnosticTestResult UpdateEnum 0..1 attr This attribute controls the update behavior of the enclosing DiagnosticTestResult. Stereotypes: atpVariation Tags: vh.latestBindingTime=preCompileTime

13.8.6. 基于 IP 的诊断(DoIP)

本章描述特定元类的用法,以支持基于 IP 的诊断的规定。更多细节请参阅 ISO 13400 [43]。

表13.56:DoIpServiceNeeds(DoIpServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This represents an abstract base class for ServiceNeeds related to DoIP. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 子类 | DoIpActivationLineNeeds, DoIpGidNeeds, DoIpGidSynchronizationNeeds, DoIpPowerModeStatus Needs, DoIpRoutingActivationAuthenticationNeeds, DoIpRoutingActivationConfirmationNeeds, Further ActionByteNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.57:DoIpGidNeeds(DoIpGidNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The DoIpGidNeeds indicates that the software-component owning this ServiceNeeds is providing the GID number either after a GID Synchronisation or by other means like e.g. flashed EEPROM parameter. This need can be used independent from DoIpGidSynchronizationNeeds and is necessary if the GID can not be provided out of the DoIP configuration options. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.58:DoIpGidSynchronizationNeeds(DoIpGidSynchronizationNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The DoIpGidSynchronizationNeeds indicates that the software-component owning this ServiceNeeds is triggered by the DoIP entity to start a synchronization of the GID (Group Identification) on the DoIP service 0x0001, 0x0002, 0x0003 or before announcement via service 0x0004 according to ISO 13400-2:2012 if necessary. Note that this need is only relevant for DoIP synchronization masters. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
Class DoIpGidSynchronizationNeeds

表13.59:DoIpPowerModeStatusNeeds(DoIpPowerModeStatusNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The DoIpPowerModeStatusNeeds indicates that the software-component owning this ServiceNeeds is providing the PowerModeStatus for the DoIP service 0x4003 according to ISO 13400-2:2012. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.60:DoIpRoutingActivationAuthenticationNeeds(DoIpRoutingActivationAuthenticationNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | DoIPRoutingActivationAuthenticationNeeds indicates that the software-component owning this Service Needs will have an authentication required for a DoIP routing activation service (0x0005) according to ISO 13400-2:2012. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
dataLength Request PositiveInteger 0..1 attr Describes the length in byte of the additional information for RA authentication that is needed by the software entity. If the software entity is a software-component the attribute does not need to exist as the information is available via the length of the uint8 Array type. Otherwise (i.e the software entity is a Complex Driver) this attribute needs to be filled out if additional information is needed.
dataLength Response PositiveInteger 0..1 attr Describes the length in byte of the additional information for RA authentication that is provided by the software entity. If the software entity is a software-component the attribute does not need to exist as the information is available via the length of the uint8 Array type. Otherwise (i.e the software entity is a Complex Driver) this attribute needs to be filled in if additional information is provided.
routing ActivationType NameToken 0..1 attr Describes the ISO 13400-2:2012 "routing activation request activation type" which is received via DoIP service 0x0005. 0x00 is DEFAULT, 0x01 is WWH-OBD. If neither of the specified values (0x00 or 0x01) is needed the token shall contain RA_ + hex value representation of the integer value shall be used (i.e: RA_0xE1).

表13.61:DoIpRoutingActivationConfirmationNeeds(DoIpRoutingActivationConfirmationNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | DoIpRoutingActivationConfirmationNeeds indicates that the software-component that owns this Service Needs will have a confirmation required for a DoIP routing activation service (0x0005) according to ISO 13400-2:2012. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
dataLength Request PositiveInteger 0..1 attr Describes the length in byte of the additional information for RA confirmation that is needed by the software entity. If the software entity is a software-component the attribute does not need to exist as the information is available via the length of the uint8 Array type. Otherwise (i.e the software entity is a Complex Driver) this attribute needs to be filled out if additional information is needed.
dataLength Response PositiveInteger 0..1 attr Describes the length in byte of the additional information for RA confirmation that is provided by the software entity. If the software entity is a software-component the attribute does not need to exist as the information is available via the length of the uint8 Array type. Otherwise (i.e the software entity is a Complex Driver) this attribute needs to be filled out if additional information is provided.
routing ActivationType NameToken 0..1 attr Describes the ISO 13400-2:2012 "routing activation request activation type" which is received via DoIP service 0x0005. 0x00 is DEFAULT, 0x01 is WWH-OBD. If neither of the specified values (0x00 or 0x01) is needed the token shall contain RA_ + hex value representation of the integer value shall be used (i.e: RA_0xE1).

表13.62:DoIpActivationLineNeeds(DoIpActivationLineNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | A DoIP entity needs to be informed when an external tester is attached or activated. The DoIpActivation ServiceNeeds specifies the trigger for such an event. Examples would be a Pdu via a regular communication bus, a PWM signal, or an I/O. For details please refer to the ISO 13400. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.6.1. DoIP 服务用例:如果 ECU 是 DoIP GID 同步主节点,则可能需要 GID 同步

场景:在测试仪连接到 ECU 的事件中,如果 ECU 是 DoIP GID 同步主机,GID 同步可能是必要的。在这种情况下,需要定义一个 DoIpGidSynchronizationNeeds。

如果 ECU 是 DoIP GID 同步主机,GID 同步可能是必要的:

ServiceNeeds 种类:

DoIpGidSynchronizationNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackTriggerGIDSynchronization [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.6.2. DoIP 服务用例:车辆信息可广播或由测试仪请求

场景:车辆信息被广播或可由测试仪请求。在这种情况下,需要定义一个 DoIpGidNeeds。

车辆信息被广播或可由测试仪请求:

ServiceNeeds 种类:DoIpGidNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackGetGID [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.6.3. DoIP 服务用例:测试仪还可以请求与诊断相关的电源状态

场景:在开始针对 DoIP 实体或经由 DoIP 连接的子网诊断处理之前,测试仪还可以请求与诊断相关的电源状态。为支持这一选项,需要定义一个 DoIpPowerModeStatusNeeds。

测试仪还可以在开始针对 DoIP 实体或经由 DoIP 连接的子网诊断处理之前请求与诊断相关的电源状态:

ServiceNeeds 种类:DoIpPowerModeStatusNeeds

RoleBasedPortAssignment 有效角色:

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

  • CallbackGetPowerMode [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.6.4. DoIP 服务用例:使用路由激活机制,可能对认证或确认带来额外影响

场景:为使测试仪的诊断面向不同目标地址,使用路由激活机制,这可能带来关于认证或确认的额外影响。这里,DoIpRoutingActivationAuthenticationNeeds 和/或 DoIpRoutingActivationConfirmationNeeds 的定义将适用。

路由激活所用 PortInterface 实际名称所用的前缀:

使用路由激活机制,可能带来关于认证或确认的额外影响:

ServiceNeeds 种类:

  • DoIpRoutingActivationAuthenticationNeeds [0..1];

  • DoIpRoutingActivationConfirmationNeeds [0..1];

RoleBasedPortAssignment 有效角色:

  • RoutingActivation [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.6.5. DoIP 服务用例:外部测试仪接入或激活时需要通知 DoIP 实体。

场景:为通过把测试仪连接到 ECU 来启用诊断,应用软件必须知晓测试仪的存在。

为此,适用的 ServiceSwComponentType 应向应用提供一个由名为 DoIPActivationLineStatus 的 ModeSwitchInterface 定义类型的 PPortPrototype。

为触发该 PPortPrototype 的存在,应定义 DoIpActivationLineNeeds。

外部测试仪连接或激活时的通知:

ServiceNeeds 种类:DoIpActivationLineNeeds

RoleBasedPortAssignment 有效角色:

  • DoIPActivationLineStatus [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

13.8.6.6. 服务用例:设置和复位警告指示器请求位

场景:在某些情况下(例如在应用中控制失效安全反应),Dem 中相应事件的 “警告指示符请求” 位应由专门的 “失效安全软件组件” 设置/复位。

失效安全软件组件必须确保 “警告指示符请求” 位的正确状态(例如满足 ISO14229-1 或整车厂特定要求)。

因此,失效安全 SW-C 可以使用既有 Dem 机制获取 Dem 中事件状态变化的信息(例如 Callback EventStatusChanged)。

为此,适用的 ServiceSwComponentType 应向应用提供一个由名为 EventStatus 的 ClientServerInterface 定义类型的 PPortPrototype。

为触发该 PPortPrototype 的存在,应定义 WarningIndicatorRequestedBitNeeds。

设置与复位警告指示符请求位的能力:

ServiceNeeds 种类:WarningIndicatorRequestedBitNeeds

RoleBasedPortAssignment 有效角色:

  • EventStatus [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.63:WarningIndicatorRequestedBitNeeds(WarningIndicatorRequestedBitNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to explicitly request the existence of the WarningIndicator RequestedBit. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.6.7. DoIP 服务用例:原子软件组件向 DoIP 服务组件提供进一步动作字节

场景:AtomicSwComponentType 提供车辆识别/通告报文中使用的 “进一步动作字节”。

原子软件组件向 DoIP 服务组件提供进一步动作字节:

ServiceNeeds 种类:FurtherActionByteNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackGetFurtherActionByte [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.64:FurtherActionByteNeeds(FurtherActionByteNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The FurtherActionByteNeeds indicates that the software-component is able to provide the "further action byte" to the DoIp Service Component. | | 基类 | ARObject , DoIpServiceNeeds , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.7. 其他诊断服务用例

13.8.7.1. Dcm 服务用例:DiagnosticSessionControl

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以获知诊断会话。

AtomicSwComponentType 支持 DiagnosticSessionControl 以获知诊断会话:

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_DiagnosticSessionControlModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_DiagnosticSessionControlModeSwitchInterface 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

表13.65:DiagnosticControlNeeds(DiagnosticControlNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class indicates a service use-case for reporting the controlled status by diagnostic services. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.7.2. Dcm 服务用例:EcuReset

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以获知 EcuReset 服务的当前状态。

AtomicSwComponentType 经由诊断服务支持 EcuReset 服务:

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_EcuResetModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_EcuResetModeSwitchInterface 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.7.3. Dcm 服务用例:EcuReset ModeRapidPowerShutDown

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以获知 EcuReset ModeRapidPowerShutDown 服务的当前状态。

AtomicSwComponentType 经由诊断服务支持 EcuReset ModeRapidPowerShutDown 服务:

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_ModeRapidPowerShutDownModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_ModeRapidPowerShutDownModeSwitchInterface 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.7.4. Dcm 服务用例:CommunicationControl

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以按 ComM 通道获知 CommunicationControl 服务的当前状态。

AtomicSwComponentType 经由诊断服务支持 CommunicationControl 服务:

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_CommunicationControlModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_CommunicationControl 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.7.5. Dcm 服务用例:ControlDTCSetting

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以获知 ControlDTCSetting 服务的当前状态。

AtomicSwComponentType 经由诊断服务支持 ControlDTCSetting 服务:

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_ControlDTCSettingModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_ControlDTCSettingModeSwitchInterface 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.7.6. Dcm 服务用例:SecurityAccess

场景:AtomicSwComponentType 提供一个由 ModeSwitchInterface 定义类型的 RPortPrototype,以获知当前诊断安全等级。

[TPS_SWCT_01712] AtomicSwComponentType 支持 SecurityAccess 以获知安全等级

ServiceNeeds 种类:DiagnosticControlNeeds

RoleBasedPortAssignment 有效角色:

  • Dcm_SecurityAccessModeSwitchInterface [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

角色 Dcm_SecurityAccessModeSwitchInterface 适用于由 ModeSwitchInterface 定义类型的 RPortPrototype。glyph[floorright](RS_SWCT_00170、RS_SWCT_03190)

13.8.7.7. 服务用例:原子软件组件实现硬件关机

场景:如果检测到硬件组件有缺陷,Dem 应告知负责执行硬件关机的、由 AtomicSwComponentType 定义类型的 SwComponentPrototype。

[TPS_SWCT_01680] Dem 用例:原子软件组件实现硬件关机

ServiceNeeds 种类:DiagnosticComponentNeeds

RoleBasedPortAssignment 有效角色:

  • CallbackComponentStatusChanged [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.66:DiagnosticComponentNeeds(DiagnosticComponentNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to specify the service needs for the configuration of component events. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.8.7.8. 服务用例:数据的上传与下载

场景:软件组件实现接受上传数据和/或提供下载数据的能力。为此,软件组件提供一个应连接到 Dcm 服务组件的 PPortPrototype。

Dcm 用例:数据的上传与下载:

ServiceNeeds 种类:DiagnosticUploadDownloadNeeds

RoleBasedPortAssignment 有效角色:

  • UploadDownloadServices [1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

表13.67:DiagnosticUploadDownloadNeeds(DiagnosticUploadDownloadNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to specify needs regarding upload and download by means of diagnostic services. | | 基类 | ARObject , DiagnosticCapabilityElement , Identifiable , MultilanguageReferrable , Referrable , Service Needs |

表13.68:DiagnosticUploadDownloadNeeds(DiagnosticUploadDownloadNeeds)

| 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.9. 诊断日志和跟踪依赖

元类 DltUserNeeds 与 SwcServiceDependency 一起使用,以定义配置诊断日志与跟踪模块的需求(与 AUTOSAR DLT 模块规范相关的术语见 [44])。

表13.69:DltUserNeeds(DltUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class specifies the needs on the configuration of the Diagnostic Log and Trace module for one SessionId. This class currently contains no attributes. An instance of this class is used to find out which PortPrototypes of an AtomicSwComponentType belong to this SessionId in order to group the request and response PortPrototypes of the same SessionId. The actual SessionId value is stored in the PortDefinedArgumentValue of the respective PortPrototype specification. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

请注意,对所描述的 Dlt 服务用例,适用以下规则:对每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment。

由此,RoleBasedPortAssignment 的属性 role 的值必须设置为所用标准化 ClientServerInterface 的名称。

可能的 role 属性值及相关 PortPrototype 的多重性列于段落 RoleBasedPortAssignment 的用例描述中。

13.9.1. Dlt 用例:应用软件组件发送调试信息

场景:AtomicSwComponentType 发送日志消息。在这种情况下适用以下设置:

Dlt 用例的设置:应用软件组件访问 Dlt 模块:

ServiceNeeds 种类:

DltUserNeeds

RoleBasedPortAssignment 有效角色:

  • DltControlService [1];

  • LogTraceSessionControl [1];

  • InjectionCallback [0..1];

  • DltSwcMessageService [0..1]。

RoleBasedDataAssignment:

不适用

RepresentedPortGroups:

不适用

更多信息请参阅 [SWS_Dlt_00495]、[SWS_Dlt_00496] 与 [SWS_Dlt_00498]。

在这种情况下,软件组件必须提供一个客户端端口(DLTService),以注册与注销上下文并发送日志或跟踪消息。

13.10. 同步时间基准管理器依赖

元类 SyncTimeBaseMgrUserNeeds 与 SwcServiceDependency 一起使用,以定义配置同步时基管理器模块的需求(与 AUTOSAR StbM 模块规范相关的术语见 [45])。

表13.70:SyncTimeBaseMgrUserNeeds(SyncTimeBaseMgrUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the needs on the configuration of the Synchronized Time-base Manager for one time-base. This class currently contains no attributes. An instance of this class is used to find out which ports of a software-component belong to this time-base in order to group the request and response ports of the same time-base. The actual time-base value is stored in the PortDefinedArgumentValue of the respective port specification. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

请注意,对所描述的 StbM 服务用例,适用以下规则:

对每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment。

由此,RoleBasedPortAssignment 的属性 role 的值必须设置为所用标准化 ClientServerInterface 的名称。

可能的 role 属性值及相关 PortPrototype 的多重性列于段落 RoleBasedPortAssignment 的用例描述中。

时间同步概念背后的总体想法是:全局时间主机与全局时间从机的角色部分在应用软件中实现。

为此,应用软件提供由标准化 PortInterface GlobalTime_Master 与 GlobalTime_Slave 定义类型的 PortPrototype。

在许多情况下,GlobalTime_Master 与 GlobalTime_Slave 两个 PortInterface 会被一个 ECU 的应用软件同时使用。这意味着该 ECU 在一个域上是全局时间从机,在另一个域上是全局时间主机。

就建模而言,给定的全局时间域由一个 SwcServiceDependency 表示。

如果一个软件组件必须处理不同的全局时间域(例如因为它在一个域中表示从机、在另一个域中表示主机),则相应的 SwcInternalBehavior 需要为每个全局时间域定义一个 SwcServiceDependency。

13.10.1. StbM 用例:启动定时器并可能在到期时获得通知

场景:软件组件想在 StbM 中上发一个具有给定到期时间的定时器。软件组件可能想在定时器到期时收到通知。在这种情况下适用以下设置:

[TPS_SWCT_01678] StbM 用例:启动定时器并可能获知其到期

ServiceNeeds 种类:SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • StartTimer [1];

  • TimeNotification [0..1]。

RoleBasedDataAssignment:不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件需要拥有一个由 ClientServerInterface StartTimer 定义类型的 RPortPrototype 以及(如适用)一个由 ClientServerInterface TimeNotification 定义类型的 PPortPrototype。

13.10.2. StbM 用例:软件组件希望获得状态变化的通知

场景:软件组件想在 StbM 状态变化时接收事件。为此,软件组件配备一个 sender/receiver RPortPrototype。在这种情况下适用以下设置:

[TPS_SWCT_01679] StbM 用例:软件组件想获取状态变化的通知

ServiceNeeds 种类:SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • StatusNotification [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

从 StbM 接收的事件具有固定结构。更多细节请参阅 [SWS_StbM_00284]。

13.10.3. StbM 用例:出于诊断目的处理从全局时间从节点获得的时间快照

场景:软件组件提供一个 PPortPrototype,全局时间从机把时间同步记录的快照推送到其上。该数据通常用于诊断目的。

StbM 用例:处理从全局时间从机获得的时间快照以用于诊断目的:

ServiceNeeds 种类:

SyncTimeBaseMgrUserNeeds

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

RoleBasedPortAssignment 有效角色:

  • MeasurementNotification [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

注意,在这种情况下软件组件充当服务器,而 StbM 实现客户端角色!

测量通知的 PortInterface 结果名称所用的后缀:

13.10.4. StbM 用例:软件组件充当全局时间主节点

场景:软件组件实现全局时间主机角色的应用软件部分。为此,软件组件暴露一个应连接到 StbM 服务组件的 RPortPrototype。

StbM 用例:软件组件表示全局时间主机:

ServiceNeeds 种类:SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • GlobalTime_Master [1];

  • StatusNotification [0..1];

  • MeasurementNotification [0..1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

全局时间主机角色的 PortInterface 结果名称所用的后缀:

13.10.5. StbM 用例:软件组件充当全局时间从节点

场景:软件组件实现全局时间从机角色的应用软件部分。为此,软件组件暴露一个应连接到 StbM 服务组件的 RPortPrototype。

StbM 用例:软件组件表示全局时间从机:

ServiceNeeds 种类:

SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • GlobalTime_Slave [1]。

  • StatusNotification [0..1];

  • MeasurementNotification [0..1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups

不适用

全局时间从机角色的 PortInterface 结果名称所用的后缀:

13.10.6. StbM 用例:软件组件分析关于时间同步过程的预测

场景:时间从机收集时间同步过程的信息,以例如基于其本地全局时间实例预测同步进入,并检查主机与从机是否就当前时间达成一致。软件组件分析这些预测以检测任何损害。

[TPS_SWCT_01810] 软件组件分析关于时间同步过程的预测

ServiceNeeds 种类:

SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • TimeBaseProviderNotification [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

为此,分析器软件组件向 StbM 服务组件暴露一个由 ClientServerInterface TimeBaseProviderNotification_{bus}_{TimeBase} 定义类型的 PPortPrototype。

13.10.7. StbM 用例:软件组件希望发起时间基准的克隆

场景:软件组件想借助使用标准化服务接口 GlobalTime_Master(特别是名为 Clone 的 ClientServerOperation)发起既有时间基的克隆。在这种情况下适用以下设置:

[TPS_SWCT_01854] 软件组件想发起时间基的克隆

ServiceNeeds 种类:

SyncTimeBaseMgrUserNeeds

RoleBasedPortAssignment 有效角色:

  • GlobalTime_Master [1];

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

时间基的克隆受某些前置条件约束。更多信息请参阅 [SWS_StbM_00530]。请注意,关于 “{Name}” 后缀的确定,适用 [TPS_SWCT_01743]。

13.11. 安全车载通信

元类 SecureOnBoardCommunicationNeeds 与 SwcServiceDependency 一起使用,以定义配置车载安全通信模块的需求(与 AUTOSAR SecOc 模块规范相关的术语见 [46])。

表13.71:SecureOnBoardCommunicationNeeds(SecureOnBoardCommunicationNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the need for the existence of the SecOc module on the respective ECU. This class currently contains no attributes. An instance of this class is used to find out which ports of a software-component deal with the administration of secure communication in order to group the request and response ports. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
verification StatusIndication Mode VerificationStatus IndicationModeEnum 0..1 attr This attribute provides the ability to control the mode in which the application software is notified about the result of authentication attempts.

表13.72:VerificationStatusIndicationModeEnum(VerificationStatusIndicationModeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This enumeration provides options for setting the mode of a verification status indication. | | 聚合于 | SecureOnBoardCommunicationNeeds.verificationStatusIndicationMode |

字面值 说明
failureAndSuccess Verification attempts that came out "false" or "true" shall be forwarded to the application software. Tags: atp.EnumerationLiteralIndex=1
failureOnly Only verification attempts that came out "false" shall be forwarded to the application software. Tags: atp.EnumerationLiteralIndex=0

13.11.1. SecOc 用例:获取安全通信的验证状态

在这一场景中,ApplicationSwComponentType 想获取安全通信的状态。

它不关心细节(而且即使细节可用也无济于事)。

SwcServiceDependency 应聚合一个 SecureOnBoardCommunicationNeeds。

SecOc 用例:获取安全通信的验证状态:

RoleBasedPortAssignment 有效角色:

不适用

RoleBasedDataAssignment 有效角色:

  • VerificationStatus [1]。

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = VerificationStatus 属性的存在性:

关于 [constr_1681] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的访问。

13.11.2. SecOc 用例:软件组件在给定期间内退出安全通信

在这一场景中,ApplicationSwComponentType 经历一个重新配置期,在此期间它无法处理任何安全相关数据。在这一期间,验证状态应始终设置为 “failed”。

SwcServiceDependency 应聚合一个 SecureOnBoardCommunicationNeeds。

SecOc 用例:软件组件在给定时期内退出安全通信:

RoleBasedPortAssignment 有效角色:

  • VerifyStatusConfiguration [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.11.3. SecOc 用例:向 SecOC 提供新鲜度值 I

场景:一个专用软件组件计算并向 SecOc 交付新鲜度值。新鲜度可选地由软件组件截断。

为此,软件组件向 SecOc 暴露一个 PPortPrototype。它用于借助 ClientServerOperation GetTxFreshness 或 GetTxFreshnessTruncData 发送受保护的消息。

SecOc 用例:向 SecOC 交付新鲜度值 I:

ServiceNeeds 种类:SecureOnBoardCommunicationNeeds

RoleBasedPortAssignment 有效角色:

  • FreshnessManagement [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.11.4. SecOc 用例:向 SecOC 提供新鲜度值 II

场景:SecOc 在新鲜度管理器处调用发送通知(SPduTxConfirmation)。该信息对新鲜度的计算可能至关重要。

SecOc 用例:向 SecOC 交付新鲜度值 II:

ServiceNeeds 种类:SecureOnBoardCommunicationNeeds

RoleBasedPortAssignment 有效角色:

  • FreshnessManagement [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.11.5. SecOc 用例:向 SecOC 提供新鲜度值 III

场景:由于新鲜度值失步,SecOC 无法验证 MAC,并再次联系新鲜度管理器(软件组件)以获取重新计算的新鲜度值。

新鲜度管理器内部的新鲜度每次重新计算都会计数。在给定重试阈值之后,SecOC 必须丢弃收到的消息。为此使用 ClientServerOperation GetRxFreshness 或 GetRxFreshnessAuthData。

SecOc 用例:向 SecOC 交付新鲜度值 III:

ServiceNeeds 种类:SecureOnBoardCommunicationNeeds

RoleBasedPortAssignment 有效角色:

  • FreshnessManagement [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.11.6. SecOc 用例:即使无法计算 MAC 也允许发送 PDU

场景:存在需要使用默认 MAC 发送与给定新鲜度 id 关联的认证消息的能力的情况,例如某个 ECU 被更换但尚未配置加密密钥。

接收方可以通过查看 MAC 把这种情况与常规认证数据交换区分开来,即在所述情况下使用(可配置的)默认 MAC。

SecOc 用例:即使无法计算 MAC 也支持发送 Pdu:

ServiceNeeds 种类:SecureOnBoardCommunicationNeeds

RoleBasedPortAssignment 有效角色:

  • SendDefaultAuthenticationInformation [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.11.7. SecOc 用例:接收关于认证尝试的通知

场景:软件组件想接收关于认证尝试状态的通知。

这样的通知可用于持续监控验证失败尝试的次数,目标是建立安全管理器/入侵检测系统,能够检测由大量认证请求构成的攻击并以适当的动态对抗措施作出反应。

为此,软件组件暴露一个实现通知处理器的 PPortPrototype。处理器可能只对失败的尝试感兴趣,或对失败与成功的尝试都感兴趣。

这一方面可以借助属性 SecureOnBoardCommunicationNeeds.verificationStatusIndicationMode 配置。

SecOc 用例:接收关于认证尝试的通知:

ServiceNeeds 种类:SecureOnBoardCommunicationNeeds

RoleBasedPortAssignment 有效角色:

  • VerificationStatusIndication [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

13.12. J1939 通信

J1939 特定的元类 J1939RmOutgoingRequestServiceNeeds 与 J1939RmIncomingRequestServiceNeeds 与 SwcServiceDependency 一起使用,以定义配置 J1939 请求管理器的需求(与 AUTOSAR J1939RM 模块规范相关的术语见 [47])。

表13.73:J1939RmOutgoingRequestServiceNeeds(J1939RmOutgoingRequestServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class shall be used to specify needs with respect to the configuration of the J1939Rm, in particular for the case where an ApplicationSwComponentType needs to send a request to another J1939 node. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.74:J1939RmIncomingRequestServiceNeeds(J1939RmIncomingRequestServiceNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | "This meta-class shall be used to specify needs with respect to the configuration of the J1939Rm, in particular for the case where an ApplicationSwComponentType needs to accept a request from another J1939 node. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.12.1. J1939RM 用例:AtomicSwComponentType 向总线发送请求

场景:AtomicSwComponentType 向总线发送请求。在这种情况下适用以下设置:

为指示该用例描述的场景,SwcServiceDependency 应聚合一个 J1939RmOutgoingRequestServiceNeeds。

[TPS_SWCT_01673] 应用软件组件使用 J1939Rm 发送请求

ServiceNeeds 种类:J1939RmOutgoingRequestServiceNeeds

RoleBasedPortAssignment 有效角色:

  • AppSendRequest [1];

  • AppAckIndication [1];

  • AppRequestTimeoutIndication [0..1];

  • AppCancelRequestTimeout [0..1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_03180)

更多信息请参阅以下规定条目:[SWS_J1939Rm_00104]、[SWS_J1939Rm_00106]、[SWS_J1939Rm_00108] 与 [SWS_J1939Rm_00105]。

13.12.2. J1939RM 用例:AtomicSwComponentType 接受来自总线的请求

场景:AtomicSwComponentType 接受来自总线的请求。在这种情况下适用以下设置:

为指示该用例描述的场景,SwcServiceDependency 应聚合一个 J1939RmIncomingRequestServiceNeeds。

[TPS_SWCT_01674] 应用软件组件使用 J1939Rm 接受请求

ServiceNeeds 种类:J1939RmIncomingRequestServiceNeeds

RoleBasedPortAssignment 有效角色:

  • AppRequestIndication [1];

  • AppSendAck [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_03180)

更多信息请参阅以下规定条目:[SWS_J1939Rm_00103] 与 [SWS_J1939Rm_00107]。

13.12.3. J1939Dcm 希望从应用软件组件获取标定验证编号

场景:J1939Dcm 想从应用软件组件检索标定验证号。为此,软件组件向 J1939Dcm 暴露一个 PPortPrototype。

J1939Dcm 想从应用软件组件检索标定验证号:

ServiceNeeds 种类:J1939DcmDm19Support

RoleBasedPortAssignment 有效角色:

  • J1939Dcm_CalibrationInformation [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_03180)

表13.75:J1939DcmDm19Support(J1939DcmDm19Support)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The software-component provides information about calibration verification numbers for inclusion in DM19 | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.13. 错误跟踪器

元类 ErrorTracerNeeds 用于定义配置默认错误跟踪器的需求。

特别是,ErrorTracerNeeds 提供在外层软件组件中实现、并经由 RoleBasedPortAssignment 引用的 PortPrototype 报告的所有 tracedFailure 的穷尽列表。

每个 tracedFailure 关联一个 ID,由属性 TracedFailure.id 表示。

更多解释请查阅《默认错误跟踪器》规范 [48]。

表13.76:ErrorTracerNeeds(ErrorTracerNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the need to report failures to the error tracer. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
tracedFailure TracedFailure * aggr list of traced failures Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=tracedFailure.shortName, traced Failure.variationPoint.shortLabel vh.latestBindingTime=preCompileTime

表13.77:TracedFailure(TracedFailure)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | Specifies the ability to report a specific failure to the error tracer. The short name specifies the literal applicable for the Default Error Tracer. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 子类 | DevelopmentError, RuntimeError, TransientFault | | 聚合于 | ErrorTracerNeeds.tracedFailure |

属性 类型 多重性 种类 备注
id PositiveInteger 0..1 attr ID of detected failure used in reporting API as error or fault id.

表13.78:DevelopmentError(DevelopmentError)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The reported failure is classified as development error. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , TracedFailure | | 聚合于 | ErrorTracerNeeds.tracedFailure |

表13.79:RuntimeError(RuntimeError)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The reported failure is classified as runtime error. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , TracedFailure | | 聚合于 | ErrorTracerNeeds.tracedFailure |

13.13.1. 错误跟踪器用例:默认错误跟踪器服务用例:报告故障

默认错误跟踪器服务用例的设置:开发错误或运行时错误:

场景:软件组件向默认错误跟踪器报告开发错误或运行时错误。在这种情况下适用以下设置:

ServiceNeeds 种类:ErrorTracerNeeds

RoleBasedPortAssignment 有效角色:

  • DETService [1]。

RoleBasedDataAssignment 有效角色:

不适用

RoleBasedDataTypeAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

瞬态故障不适用于软件组件:

13.14. 车联(V2X)设施

元类 V2xFacUserNeeds 与 SwcServiceDependency 一起使用,以定义配置 V2xFac 模块的需求(与 AUTOSAR V2xFac 模块规范相关的术语见 [49])。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

表13.80:V2xFacUserNeeds(V2xFacUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to define service needs for V2x facilities. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

请注意,对所描述的 V2xFac 服务用例,适用以下规则:

对每个被使用的 SenderReceiverInterface,需要创建一个 RoleBasedDataAssignment。

13.14.1. V2xFac 用例:应用软件组件为 CAM 传输向 V2X 协议栈提供车辆特定数据

场景:AtomicSwComponentType 自主调用 V2xFac,把经由车载网络收集的车辆数据提供给模块。在这种情况下适用以下设置:

V2xFac 用例:应用软件组件向 V2X 栈提供车辆特定数据以用于 CAM 传输:

RoleBasedPortAssignment:

不适用

RoleBasedDataAssignment 有效角色:

  • V2xFacVdp [1]。

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个发送端口(V2xFacVdp)来

  • 提供车辆数据。

RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xFacVdp 属性的存在性:

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

关于 [constr_1682] 存在的解释:其意图并非提供对 SwcInternalBehavior 内部局部变量的访问。

13.14.2. V2xFac 用例:应用软件组件触发 DENM 消息的传输

场景:AtomicSwComponentType 应能够触发不同 DENM 类型的传输。在这种情况下适用以下设置:

V2xFac 用例:应用软件组件触发 DENM 消息的传输:

RoleBasedPortAssignment 有效角色:

  • V2xFacDenBs [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个客户端 PortPrototype(由标准化 ClientServerInterface V2xFacDenBs 定义类型)来

  • 触发新的 DENM 消息;

  • 触发更新的 DENM 消息;

  • 触发 DENM 消息的取消。

13.15. 车联(V2X)管理

元类 V2xMUserNeeds 与 SwcServiceDependency 一起使用,以定义配置 V2X 管理器模块的需求(与 AUTOSAR V2xM 模块规范相关的术语见 [50])。

表13.81:V2xMUserNeeds(V2xMUserNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to express service needs for the V2x management. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

表13.82:V2xMUserNeeds(V2xMUserNeeds)

请注意,对所描述的 V2xFac 服务用例,适用以下规则:

对每个被使用的 ClientServerInterface,需要创建一个 RoleBasedPortAssignment。

由此,RoleBasedPortAssignment 的属性 role 的值必须设置为所用标准化 ClientServerInterface 的名称。

可能的 role 属性值及相关 PortPrototype 的多重性列于段落 RoleBasedPortAssignment 的用例描述中。

13.15.1. V2xM 用例:应用软件组件为位置和时间信息向 V2X 协议栈提供车辆特定数据

场景:AtomicSwComponentType 自主调用 V2X 管理器,把经由车载网络收集的车辆数据提供给模块。在这种情况下适用以下设置:

V2xM 用例:应用软件组件向 V2X 栈提供车辆特定数据以用于位置与时间信息:

RoleBasedPortAssignment 有效角色:

  • V2xM_Vdp [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个客户端 PortPrototype(由标准化 ClientServerInterface V2xM_Vdp 定义类型)来

  • 设置当前时间与位置。

13.15.2. V2xM 用例:应用软件组件需要来自 V2X 管理器的 V2X 特定数据

场景:AtomicSwComponentType 自主调用 V2X 管理器,从模块获取 V2X 特定数据的信息。在这种情况下适用以下设置:

V2xM 用例:应用软件组件需要来自 V2X 管理器的 V2X 特定数据:

RoleBasedPortAssignment 有效角色:

  • V2xM_Vdp [1]。

RoleBasedDataAssignment

不适用

RoleBasedDataTypeAssignment

不适用

RepresentedPortGroups

不适用

在这种情况下,软件组件必须提供一个客户端 PortPrototype(由标准化 ClientServerInterface V2xM_Vdp 定义类型)来

  • 访问 V2X 栈基于系统时钟的当前时间;

  • 访问长期证书的最早到期日期;

  • 访问假名证书的最早到期日期。

13.15.3. V2xM 用例:应用软件组件对 V2X 管理器内的假名变更有软控制

场景:AtomicSwComponentType 自主调用 V2X 管理器,设置假名变更的锁定或解锁状态。在这种情况下适用以下设置:

V2xM 用例:应用软件组件对 V2X 管理器内的假名变更有软控制:

RoleBasedPortAssignment 有效角色:

  • V2xM_PseudonymChange [1]。

RoleBasedDataAssignment

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个客户端 PortPrototype(由标准化 ClientServerInterface V2xM_PseudonymChange 定义类型)来

  • 把假名变更的状态设置为锁定;

  • 把假名变更的状态设置为解锁。

13.15.4. V2xM 用例:应用软件组件执行基于位置的计算

场景:AtomicSwComponentType 自主调用 V2X 管理器,获取地理计算的结果。在这种情况下适用以下设置:

V2xM 用例:应用软件组件执行基于位置的计算:

RoleBasedPortAssignment 有效角色:

  • V2xM_GeoMath [1]。

RoleBasedDataAssignment:

不适用

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个客户端 PortPrototype(由标准化 ClientServerInterface V2xM_GeoMath 定义类型)来

  • 计算两个位置元组(纬度、经度)之间的距离;

  • 计算两个航向值之间的允许容差值。

13.16. 车联(V2X)数据管理器

V2X 数据管理器接收 V2X 消息,并能够从进入的消息中挑出专用部分,经由相应 SwComponentPrototype(由 V2X DM 的 ServiceSwComponentType 定义类型)拥有的

PPortPrototype 转发给其他通信参与者。

isService = true 时 V2X 数据管理器的通信用例:

在这种情况下,表示 V2X DM 服务组件的 SwComponentType 拥有的 PPortPrototype 与由 ApplicationSwComponentType 定义类型的 SwComponentType 拥有的 AbstractRequiredPortPrototype 之间的连接由 AssemblySwConnector 建立。glyph[floorright]()

isService = false 时 V2X 数据管理器的通信用例:

因此,表示 V2X DM 服务组件的 SwComponentType 拥有的 PPortPrototype 与 RootSwCompositionPrototype 拥有的 PPortPrototype 之间的连接借助 DelegationSwConnector 建立。glyph[floorright]()

[TPS_SWCT_01867](向本地软件组件发送数据)与 [TPS_SWCT_01868](向不同 ECU 发送数据)提到的用例在图 13.25 中例示。

表13.83:V2xDataManagerNeeds(V2xDataManagerNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to define service needs for V2x Data Manager. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.16.1. V2x DM 用例:应用软件组件接收 V2X 数据

场景:应用软件组件经由 V2X 数据管理器的服务组件定义与提供的目录项接收 ASN.1 消息的部分内容。

V2x DM 用例:应用软件组件接收 ASN.1 消息的部分内容:

ServiceNeeds 种类:V2xDataManagerNeeds

RoleBasedPortAssignment 有效角色:

不适用

RoleBasedDataAssignment 有效角色:

  • dataManagerServiceCommunication [1]。

RoleBasedDataTypeAssignment:

不适用

RepresentedPortGroups:

不适用

在这种情况下,软件组件必须提供一个接收方 RPortPrototype(由 V2X DM 使用的标准化 AUTOSAR SenderReceiverInterface 定义类型),以访问传输的 ASN.1 消息部分。

13.17. 硬件测试管理器

硬件测试管理器的服务用例由元类 HardwareTestNeeds 在角色 SwcServiceDependency.serviceNeeds 中的使用指示。

表13.84:HardwareTestNeeds(HardwareTestNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class represents the ability to indicate that a software-component is interested in the results of the hardware test and will establish a PortPrototype to query the hardware test manager. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.17.1. HtssM 服务用例:查询硬件测试的结果

场景:软件组件想查询由 HtssM 进行的硬件测试的结果。为此,软件组件暴露一个应连接到 HtssM 的 RPortPrototype。

[TPS_SWCT_01763] HtssM 服务用例:查询硬件测试结果

ServiceNeeds 种类:

HardwareTestNeeds

RoleBasedPortAssignment 有效角色:

  • GetTestStatus [1]。

RoleBasedDataAssignment

不适用

RepresentedPortGroups

不适用

13.18. 入侵检测系统管理器

与入侵检测系统管理器的交互包含报告安全事件的能力。

为此提供了两种不同的 ServiceNeeds:用于实际报告安全事件的 IdsMgrNeeds,以及用于 IdsM 检索时间戳的 IdsMgrCustomTimestampNeeds。

表13.85:IdsMgrNeeds(IdsMgrNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class is used to indicate that the enclosing SwcServiceDependency represents a service use case for the Intrusion Detection System Manager. Tags: atp.Status=draft | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

属性 类型 多重性 种类 备注
useSmart SensorApi Boolean 0..1 attr This attribute controls whether the reporting of the security event shall be done by means of the smart sensor API.

表13.86:IdsMgrCustomTimestampNeeds(IdsMgrCustomTimestampNeeds)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | This meta-class is used to indicate that the enclosing SwcServiceDependency represents a service use case for the retrieval of a custom timestamp by the Intrusion Detection System Manager. Tags: atp.Status=draft | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , ServiceNeeds | | 聚合于 | BswServiceDependency.serviceNeeds, SwcServiceDependency.serviceNeeds |

13.18.1. IdsM 服务用例:AtomicSwComponentType 上报安全事件

场景:AtomicSwComponentType 报告一个安全事件。它不使用所谓 Smart Sensor API。

为指示该用例描述的场景,SwcServiceDependency 应聚合一个 IdsMgrNeeds。

应用软件组件报告安全事件:

ServiceNeeds 种类:IdsMgrNeeds

RoleBasedPortAssignment 有效角色:

  • IdsMService [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

IdsM 服务的 PortInterface 结果名称所用的后缀:

13.18.2. IdsM 服务用例:AtomicSwComponentType 使用智能传感器 API 上报安全事件

场景:AtomicSwComponentType 报告一个安全事件。为此使用所谓 Smart Sensor API。

为指示该用例描述的场景,SwcServiceDependency 应聚合一个 IdsMgrNeeds。

应用软件组件使用 Smart Sensor API 报告安全事件:

ServiceNeeds 种类:IdsMgrNeeds

RoleBasedPortAssignment 有效角色:

  • IdsMSmartSensorService [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:不适用

IdsM 服务的 PortInterface 结果名称所用的后缀:

应取自适用 SwcServiceDependency 的 shortName。glyph[floorright](RS_SWCT_00030)

13.18.3. IdsM 服务用例:AtomicSwComponentType 向 IdsM 提供时间戳

场景:AtomicSwComponentType 暴露一个 PPortPrototype,用于向 IdsM 提供时间戳。

为指示该用例描述的场景,SwcServiceDependency 应聚合一个 IdsMgrCustomTimestampNeeds。

[TPS_SWCT_01830] 应用软件组件向 IdsM 提供时间戳

ServiceNeeds 种类:IdsMgrCustomTimestampNeeds

RoleBasedPortAssignment 有效角色:

  • IdsMCustomTimestamp [1]。

RoleBasedDataAssignment 有效角色:

不适用

RepresentedPortGroups:

不适用。glyph[floorright](RS_SWCT_00030)

14. 快速原型场景

14.1. 快速原型场景的定义

快速原型场景由两个主要方面组成:byPassPoint 的描述(见图 14.1)以及与 rptHook 的关系(见图 14.2)。

快速原型场景借助 RptContainer 构造。RptContainer 结构的正确用法在 14.2 描述。

表14.1:RapidPrototypingScenario(RapidPrototypingScenario)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | This meta-class provides the ability to describe a Rapid Prototyping Scenario. Such a Rapid Prototyping Scenario consist out of two main aspects, the description of the byPassPoints and the relation to an rpt Hook. Tags: atp.recommendedPackage=RapidPrototypingScenarios | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
hostSystem System 0..1 ref System which describes the software components of the host ECU.
rptContainer RptContainer * aggr Top-level rptContainer definitions of this specific rapid prototyping scenario. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=rptContainer.shortName, rpt Container.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
rptProfile RptProfile * aggr Defiens the applicable Rapid Prototyping profils which are especially defining the smbol of the service functions and the valid id range. The order of the RptProfiles determines the order of the service function invocation by RTE. Stereotypes: atpSplitable Tags: atp.Splitkey=rptProfile.shortName
rptSystem System 0..1 ref System which describes the rapid prototyping algorithm in the format of AUTOSAR Software Components. Stereotypes: atpSplitable Tags: atp.Splitkey=rptSystem

instance reference RapidPrototypingScenario . hostSystem 的存在性:

角色 hostSystem 中的 ModeDeclaration 应在 RTE 生成时存在。glyph[floorright]()

表14.2:RptContainer(RptContainer)

| 包 | | | 说明 | This meta-class defines a byPassPoint and the relation to a rptHook. Additionally it may contain further rptContainers if the byPassPoint is not atomic. For example a byPass Point referencing to a RunnableEntity may contain rptContainers referring to the data access points of the RunnableEntity. The RptContainer structure on M1 shall follow the M1 structure of the Software Component Descriptions. The category attribute denotes which level of the Software Component Description is annotated. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | RapidPrototypingScenario.rptContainer, RptContainer.rptContainer |

属性 类型 多重性 种类 备注
byPassPoint AtpFeature * iref byPassPoint describes the required preparation of the host ECU. At a byPassPoint the host ECU shall be capable to communicate with a RPT System in order to support the execution of the rapid prototyping algorithms with the original data calculated by the host system and to replace dedicated results of the host system by the results of the rapid prototyping algorithm. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=byPassPoint.contextElement, byPass Point.target, byPassPoint.variationPoint.shortLabel vh.latestBindingTime=preCompileTime InstanceRef implemented by: AnyInstanceRef
explicitRpt ProfileSelection RptProfile * ref This attribute defines the applicable RptProfiles for the specific RptContainer. If not any references to a specific RptProfile is defined, all RptProfiles defined in the Rapid PrototypingScenario are applicable. Stereotypes: atpSplitable Tags: atp.Splitkey=explicitRptProfileSelection
rptContainer RptContainer * aggr Sub-level rptContainer definitions of this specific rapid prototyping scenario. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=rptContainer.shortName, rpt Container.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
rptExecutable EntityProperties RptExecutableEntity Properties 0..1 aggr Describes the required code preparation for rapid prototyping at ExecutableEntity invocation.
rptHook RptHook 0..1 aggr The rptHook describes the link between a byPassPoint and the rapid prototyping algorithm. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=rptHook, rptHook.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
rptImplPolicy RptImplPolicy 0..1 aggr Describes the required code preparation for rapid prototyping at data accesses.
rptSw Prototyping Access RptSwPrototyping Access 0..1 aggr Describes the required accessibility of data and modes by the rapid prototyping tooling.

表14.3:RptHook(RptHook)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | This meta-class provide the ability to describe a rapid prototyping hook. This can either be described by an other AUTOSAR system with the category RPT_SYSTEM or as a non AUTOSAR software. | | 基类 | ARObject | | 聚合于 | RptContainer.rptHook |

属性 类型 多重性 种类 备注
codeLabel CIdentifier 0..1 attr This attribute provides a code label which is used in the implementation of the hook. For example this can be an C function name or the name of data definition.
mcdIdentifier NameToken 0..1 attr This attribute provides an identifier which shall be used in a MCD System to display the Rpt Hook.
rptArHook AtpFeature 0..1 iref This describes the hook with the means of another AUTOSAR system. InstanceRef implemented by: AnyInstanceRef
sdg Sdg * aggr This property allows to keep special data which is not represented by the standard model. It can be utilized to keep e.g. tool specific data.

byPassPoint 规定快速原型能力:

RptHook 规定到快速原型算法的链接:

为了把 RPT 系统描述为 AUTOSAR 软件组件,应定义一个 category 为 RPT_SYSTEM 的 System。

rptSystem 的有效目标:

该规则应在 RTE 生成时施加。

14.2. RptContainer 在 M1 上的使用

M1 上的 RptContainer 结构应遵循软件组件描述的 M1 结构。属性 category 表示被注解的是软件组件描述的哪个层级。

AUTOSAR 标准预定义了属性 category 的以下值:

依据属性 category 值的 byPassPoint 与 rptHook 引用的有效目标:

| Category | Meaning |

| SW_COMPONENT _PROTOTYPE | Adds one SwComponentPrototype to an Rapid Prototyping Scenario. | | DATA_PROTOTYPE | Adds one instance of a DataPrototype to an Rapid Prototyping Scenario. The erence a | | RUNNABLE_ENTITY | Adds one RunnableEntity to an Rapid Proto- typing Scenario. | | ACCESS_POINTS | Adds one VariableAccess , Parame- terAccess , ServerCallPoint , Asyn- chronousServerCallResultPoint , In- ternalTriggeringPoint , ModeSwitch- Point , ModeAccessPoint or External- TriggeringPoint to a Rapid Prototyping Scenario. The byPassPoint ence a VariableAccess ServerCallPoint CallResultPoint Point , ModeSwitchPoint Point or ExternalTriggeringPoint stances. |

该规则应在 RTE 生成时施加。

据此,适用以下语义:

快速原型场景的隐式 SwComponentPrototype 选择:

快速原型场景的隐式 RunnableEntity 选择:

快速原型场景访问点的显式选择:

快速原型场景的显式 DataPrototype 选择:

RapidPrototypingScenario 关于 rptSystem 与 rptArHook 引用的一致性:

该规则应在 RTE 生成时施加。

14.3. M1 上 RptContainer 对 atpSplitable 的使用

为支持 RptHook 的后续定义(它可能同样需要 byPassPoint 的详细规定),RptContainer 与 RptHook 的聚合是 <atpSplitable> 的。

快速原型场景的定义是可拆分的:

请注意,RptHook 的后续规定可能也需要额外的 byPassPoint,以显示它们与组件描述中较低层级元素(例如 VariableAccess)的关系;而与之相反,byPassPoint 在第一步中可能只在较高层级元素(例如 SwComponentPrototype)上规定。

14.4. 为支持 RPT 场景而对元模型的修改

快速原型场景的实现蕴含访问点的定义(见 [constr_2055])。为能够履行这一角色,访问点应由派生自 Referrable 的元类表示。

成为访问点的大多数候选已经继承自 Referrable,因此不需要进一步处理(见图 14.3)。不过,这一集合中有两个元类不派生自 Referrable:

  • ExternalTriggeringPoint;

  • ModeAccessPoint。

通过简单地让这两个元类继承自 Referrable 来修复该问题不可行,因为这会破坏 AUTOSAR XML Schema 的向后兼容性。

1 因为在这种情况下 shortName 变为强制。

因此,实现了一种不同的方法(如图 14.3 所勾勒)。

创建了一个新的元类 IdentCaption,它把元类 Identifiable(后者继承自 Referrable)的能力引入其子类 ModeAccessPointIdent 与 ExternalTriggeringPointIdent。

它们继而又可选地聚合于 ModeAccessPoint 的角色 ident,或聚合于元类 ExternalTriggeringPoint 的角色 ident。

表14.4:IdentCaption(IdentCaption)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | This meta-class represents the caption. This allows having some meta-classes optionally identifiable. | | 基类 | ARObject , AtpClassifier , AtpFeature , AtpStructureElement , Identifiable , MultilanguageReferrable , Referrable | | 子类 | BswServiceDependencyIdent, DiagnosticParameterIdent, ExternalTriggeringPointIdent, ModeAccess PointIdent | | 聚合于 | AtpClassifier .atpFeature |

2 同样,可选聚合是不破坏 AUTOSAR XML schema 向后兼容性的必要前提。

表14.5:ModeAccessPointIdent(ModeAccessPointIdent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | This meta-class has been created to introduce the ability to become referenced into the meta-class Mode AccessPoint without breaking backwards compatibility. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , IdentCaption , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ModeAccessPoint.ident |

表14.6:ExternalTriggeringPointIdent(ExternalTriggeringPointIdent)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | This meta-class has been created to introduce the ability to become referenced into the meta-class ExternalTriggeringPoint without breaking backwards compatibility. | | 基类 | ARObject , AbstractAccessPoint , AtpClassifier , AtpFeature , AtpStructureElement , IdentCaption , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, ExternalTriggeringPoint.ident |

RapidPrototypingScenario 定义的一个例子见附录 B.6.1。

14.5. 扩展缓冲区访问方法

扩展缓冲区访问方法增强了对快速原型(RP)的支持,以支持旁路用户无法重新生成 RTE 的旁路用例。

目标是确保所有经由 RTE API 通信的 VariableDataPrototype 都写入 RP 全局缓冲区并从中读回,该缓冲区可以被快速原型工具(RPT)修改。

该方法适用于所有 RTE API,而不仅是隐式访问的 API,因此称为扩展缓冲区访问方法。

在扩展缓冲区访问方法内,依据是否使用标定后挂钩,VariableDataPrototype 可以在三个层级之一被标记为快速原型。“层级 1” 供标定后挂钩工具使用,“层级 2” 与 “层级 3” 供非标定后挂钩使用。

使用 “层级 2” 与 “层级 3” 时会创建额外的 RP 缓冲区与 RP 标志,扩展缓冲区访问方法包含向 RP 工具描述其创建与使用的机制。

  • RP 全局缓冲区:由 RP 读写的缓冲区。RP 全局缓冲区在概念上与保存变量数据原型值的 RTE 管理缓冲区分离。

  • RP 全局测量缓冲区:RP 用于在替换为 RP 生成值之前保存原始变量数据原型值以供后续测量目的的缓冲区。

  • RP 启用标志:允许运行时启用/停用旁路的布尔标志。

14.5.1. RP 准备

快速原型的扩展缓冲区访问方法要求准备层级的定义(见 [constr_2055]),以启用 RPT 相关的代码生成。

category 为 EXTENDED_BUFFER_ACCESS 的 RptProfile 提供在代码中实现 RPT 支持的公共属性。

一个 ECU 可能必须并行支持多个 RptProfile——例如,在一个 ECU 中支持不同供应商的 RPT 工具。

尽管如此,并非所有组件都可能需要支持所有可能的方法,例如基于 XCP 的 RPT 方法可能不适用于硬实时关键功能,因此可以选择 RptProfile。

适用 RptProfile 的选择:

如果 explicitRptProfileSelection 未定义,则拥有方 RapidPrototypingScenario 中定义的所有 RptProfile 都适用。glyph[floorright](RS_SWCT_03280)

表14.7:RptProfile(RptProfile)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | The RptProfile describes the common properties of a Rapid Prototyping method. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | RapidPrototypingScenario.rptProfile |

属性 类型 多重性 种类 备注
maxService PointId PositiveInteger 0..1 attr Highest service point id useable for RTE generated service points.
minServicePoint Id PositiveInteger 0..1 attr Lowest service point id useable for RTE generated service points.
servicePoint SymbolPost CIdentifier 0..1 attr Complete symbol of the function implementing the post service point. This symbol is used for post-build hooking purposes.
servicePoint SymbolPre CIdentifier 0..1 attr Complete symbol of the function implementing the pre service point. This symbol is used for post-build hooking purposes.

表14.8:RptProfile(RptProfile)

属性 类型 多重性 种类 备注
stimEnabler RptEnablerImplType Enum 0..1 attr Defines if the service points support the stimulation enabler. If RptProfile.stimEnabler is "none" then no stimulation enabler is passed to the service function. Otherwise the stimulation enabler will be passed as a parameter.

RptProfile . maxServicePointId 属性的存在性:

RptProfile . minServicePointId 属性的存在性:

RptProfile . servicePointSymbolPost 属性的存在性:

RptProfile . servicePointSymbolPre 属性的存在性:

RptProfile . stimEnabler 属性的存在性:

表14.9:RptImplPolicy(RptImplPolicy)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | Describes the code preparation for rapid prototyping at data accesses. | | 基类 | ARObject | | 聚合于 | McDataInstance.rptImplPolicy, RptComponent.rpImplPolicy, RptContainer.rptImplPolicy, RptExecutable EntityEvent.rptImplPolicy |

属性 类型 多重性 种类 备注
rptEnablerImpl Type RptEnablerImplType Enum 0..1 attr For Level 2 or Level3 this property determines how the RTE implements the additional "RP enabler" flag.
rptPreparation Level RptPreparationEnum 0..1 attr Mandates RP preparation level for access to VariableData Prototype within generated RTE implementation.

RptImplPolicy . rptEnablerImplType 属性的存在性:

RptImplPolicy . rptPreparationLevel 属性的存在性:

表14.10:RptEnablerImplTypeEnum(RptEnablerImplTypeEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport::RptSupport | | 说明 | Describes the required / implemented usage of enabler flags for data access in the code. | | 聚合于 | RptImplPolicy.rptEnablerImplType, RptProfile.stimEnabler |

字面值 说明
none No "RP enabler" is implemented. Tags: atp.EnumerationLiteralIndex=0
rptEnablerRam "RP enabler" is implemented as a RAM variable Tags: atp.EnumerationLiteralIndex=1
rptEnablerRamAnd Rom The RTE generator implements both the RAM and ROM "RP enabler". Tags: atp.EnumerationLiteralIndex=3
rptEnablerRom "RP enabler" is implemented as a calibrateable ROM variable. Tags: atp.EnumerationLiteralIndex=2

表14.11:RptPreparationEnum(RptPreparationEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport::RptSupport | | 说明 | Determines the RP preparation level for access to VariableDataPrototypes within the generated RTE implementation. | | 聚合于 | RptImplPolicy.rptPreparationLevel |

字面值 说明
none No RP preparation for VariableDataPrototype. Tags: atp.EnumerationLiteralIndex=0
rptLevel1 The RTE implementation uses an "RP global buffer" for measurement and post-build hooking purposes. Tags: atp.EnumerationLiteralIndex=1
rptLevel2 As rpLevel1 but the RTE implementation also uses both "RP enabler flag" to permit RP overwrite at run-time. Tags: atp.EnumerationLiteralIndex=2
rptLevel3 As rpLevel2 but the RTE implementation also uses "RP global measurement buffer" to record the original ECU-generated value in addition to the RP value. Tags: atp.EnumerationLiteralIndex=3

准备层级:

  • 层级 1:如果 RptImplPolicy.rptPreparationLevel 设置为 rptLevel1,则生成的 RTE 使用特定的内存访问模式(在 RTE 生成器创建的访问代码内的写-读循环),适合标定后挂钩工具对缓冲区的补丁写入访问。

  • 层级 2:如果 RptImplPolicy.rptPreparationLevel 设置为 rptLevel2,则除使用 RP 全局缓冲区(同 rptLevel1)之外,生成的代码还包括一个 RP 启用标志,用于使 RP 全局缓冲区的更新成为条件性的。

RP 启用标志可以位于(可标定的)ROM 或 RAM,取决于 RptContainer.rptEnablerImplType。

  • 层级 3:如果 RptImplPolicy.rptPreparationLevel 设置为 rptLevel3,则除 rptLevel2 的要求之外,生成的代码还记录原始 ECU 生成值以及 RP 替换值。

glyph[floorright](RS_SWCT_03280)

从 RptContainer 的引用:

  • VariableDataPrototype:准备层级适用于单个数据项。

  • ArgumentDataPrototype:准备层级适用于单个操作实参。

  • ModeDeclarationGroupPrototype:准备层级适用于单个模式。

  • operation:准备层级适用于所有操作的 ArgumentDataPrototype。

  • RunnableEntity:准备层级适用于该 RunnableEntity 访问的所有数据项/实参。

  • SwComponentPrototype:准备层级适用于软件组件中的所有 RunnableEntity(因而包括所有被访问的数据项与实参)。

glyph[floorright](RS_SWCT_03280)

生成的 RTE 包含适当的描述,使 RP 工具能够访问生成的 RP 缓冲区与 RP 启用标志。

表14.12:RptSwPrototypingAccess(RptSwPrototypingAccess)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport::RptSupport | | 说明 | Describes the accessibility of data and modes by the rapid prototyping tooling. | | 基类 | ARObject | | 聚合于 | McDataInstance.resultingRptSwPrototypingAccess, RptContainer.rptSwPrototypingAccess |

属性 类型 多重性 种类 备注
rptHookAccess RptAccessEnum 0..1 attr The related data element can be modified using a post-build hooking tool. An ENABLED VariableData Prototype is implicitly READABLE/WRITABLE.
rptReadAccess RptAccessEnum 0..1 attr The related data element can be used as input for bypass functionality by RP tool. If rptImplPolicy is not specified then RTE generation shall ensure at least suitable MC read points are created.
rptWriteAccess RptAccessEnum 0..1 attr The related data element can be used as output for bypass functionality by RP tool. The data element shall be prepared to rptLevel2 and related write service points are present.

RptSwPrototypingAccess . rptHookAccess 属性的存在性:

RptSwPrototypingAccess . rptReadAccess 属性的存在性:

RptSwPrototypingAccess . rptWriteAccess 属性的存在性:

表14.13:RptAccessEnum(RptAccessEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport::RptSupport | | 说明 | Determines the access rights to a data object with respect to rapid prototyping. | | 聚合于 | RptSwPrototypingAccess.rptHookAccess, RptSwPrototypingAccess.rptReadAccess, RptSw PrototypingAccess.rptWriteAccess |

字面值 说明
enabled The related data element is accessible by RP tool. Tags: atp.EnumerationLiteralIndex=0
none The related data element is not accessible by RP tool. Tags: atp.EnumerationLiteralIndex=1
protected The data element is known to the RP tool however its usage for RP can be restricted. Use case: limitation based on access rights Tags: atp.EnumerationLiteralIndex=2

14.5.2. 服务点

对 RP 全局缓冲区与 RP 全局测量缓冲区的访问可以通过使用基于服务的 ECU 接口实现,其中向 ECU 应用添加额外的 RP 服务组件,例如 “XCP on CAN” 或 “XCP on Ethernet” 服务。

RP 服务组件是提供 RP 服务的 AUTOSAR 或供应商特定 BSW 模块,例如 “XCP on CAN” 或 “XCP on Ethernet”。

它提供一个或多个 RP 服务函数,在 RP 服务点处采样和/或激励数据。每次 RP 服务函数调用都会传入一个 RP 服务点 ID,以标识服务点并区分不同的调用。

该服务的集成可以在构建前通过基于源代码的集成完成(例如添加 XCP 或自定义 BSW 组件),或在构建后通过修补已编译 ECU 镜像的二进制代码完成。

在基于服务的场景中,数据在 RP 服务点处采样和/或激励。在采样或激励期间,数据在 RP 服务点执行期间从

与 VariableDataPrototype 关联的内存读取和/或写入本地缓冲区,从而传输到/来自 RP 工具。

在 RTE 的上下文中,由 RP 服务点激励的数据是 RP 全局缓冲区与 RP 全局测量缓冲区,但任何可测量的数据都可能被读取。

RP 服务点的语义:

RP 服务函数的语义:

服务点可以是 “SWC 内部”(即由 SWC 开发者插入)或 “RTE 分配”。SWC 内部服务点包含在 SWC 描述中(使用 RapidPrototypingScenario,见下文),而 RTE 分配的服务点由 RTE 生成器基于 SWC 的规范创建。

14.5.2.1. 服务函数

RP 服务函数负责采样所需的数据。采样的数据不作为形参传递——RP 服务函数的调用传入一个 RP 服务点 ID 作为该 RP 服务点的第一个形参,RP 服务组件用它来标识服务点。

RapidPrototypingScenario 的语义:

  • 每个 RptContainer 实例通过引用规定一个或多个适用于基于服务访问的元素。

  • 每个 RptProfile 实例既规定 RP 服务函数的名称(属性 servicePointSymbolPre 与 servicePointSymbolPost),又规定适用的 RP 服务点 ID(属性 minServicePointId 与 maxServicePointId)。

glyph[floorright](RS_SWCT_03280)

快速原型场景中来自 RptContainer 与 RptProfile 的信息的叉积用于构造服务函数调用。

示例:一个 RapidPrototypingScenario 包含引用一个 RTEEvent 实例的单一 RptContainer,以及一个带服务点符号属性 MyServiceFunction 的单一 RptProfile。结果是,RTE 生成器随后用对服务函数 MyServiceFunction 的调用包裹由该事件启动的 RunnableEntity 的调用。

表14.14:RptExecutableEntityProperties(RptExecutableEntityProperties)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | Describes the code preparation for rapid prototyping at ExecutableEntity invocation. | | 基类 | ARObject | | 聚合于 | RptContainer.rptExecutableEntityProperties, RptExecutableEntityEvent.rptExecutableEntityProperties |

属性 类型 多重性 种类 备注
maxRptEventId PositiveInteger 0..1 attr Highest RPT event id usable for RTE generated service points. This attribute is relevant, if dedicated id range shall be applied to the ExecutableEntitys of a software component or specific ExecutableEntitys.
minRptEventId PositiveInteger 0..1 attr Lowest RPT event id usable for RTE generated service points. This attribute is relevant, if dedicated id range shall be applied to the ExecutableEntitys of a software component or specific ExecutableEntitys.
rptExecution Control RptExecutionControl Enum 0..1 attr This attribute specifies the rapid prototyping control of the executable
rptServicePoint RptServicePointEnum 0..1 attr Enables generation of service points by the RTE generator.

RptExecutableEntityProperties . maxRptEventId 属性的存在性:

RptExecutableEntityProperties . minRptEventId 属性的存在性:

RptExecutableEntityProperties . rptExecutionControl 属性的存在性:

RptExecutableEntityProperties . rptServicePoint 属性的存在性:

表14.15:RptExecutionControlEnum(RptExecutionControlEnum)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport::RptSupport | | 说明 | Determines rapid prototyping preparation of an ExecutableEntity. | | 聚合于 | RptExecutableEntityProperties.rptExecutionControl |

表14.16:RptExecutionControlEnum(RptExecutionControlEnum)

属性 类型 多重性 种类 备注
conditional The ExecutableEntity is only executed when the rapid prototyping disable flag is NOT set. Tags: atp.EnumerationLiteralIndex=0
none The ExecutableEntity is executed without specific rapid prototyping condition. Tags: atp.EnumerationLiteralIndex=1

表14.17:RptServicePointEnum(RptServicePointEnum)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::RPTScenario | | 说明 | Specifies whether the invocation of ExecutableEntitys due to activation of specific RteEvents/Bsw Events requires the insertion of Service Points. | | 聚合于 | RptExecutableEntityProperties.rptServicePoint |

字面值 说明
enabled Enables generation of service points by the RTE generator. Tags: atp.EnumerationLiteralIndex=0
none No Service Points are requested. Tags: atp.EnumerationLiteralIndex=1

A. 参考资料

本章包含本规范的一些相关参考材料。

A.1. 缩略语

下表包含本文档范围内使用的缩略语列表以及每个缩略语的全称含义。

| Abbreviation | Meaning |

| API | Application Programming Interface | | BOM | Byte Order Mark | | CAN | Controller Area Network | | CSE | Codes for Scaling Units | | DCM | Diagnostics Communication Manager | | 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 |

| Abbreviation | Meaning |

| 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 |

A.3. 需求追溯

针对本文档的需求只在相应的需求文档 [51] 中陈述。

下表引用 [51] 中规定的需求,并提供关于满足给定需求的个体规定条目的信息。

| Requirement | Description |

| [RS_SWCT_00010] | The Software Component Template shall support inter- and intra-ECU-communication mechanisms with high reliability | | [RS_SWCT_00020] | The Software Component Template shall provide open and standardized software interfaces for intra-ECU and inter-ECU communication | | [RS_SWCT_00030] | The Software Component Template shall provide complete interfaces to application software and basic software modules | | [RS_SWCT_00070] | The Software Component Template shall provide an abstraction of the application software from hardware | | [RS_SWCT_00080] | The Software Component Template shall provide an independence of application software from in-vehicle communication technologies | | [RS_SWCT_00090] | The Software Component Template should provide an independence of application software from operating systems | | [RS_SWCT_00110] | The Software Component Template shall provide a functional interface view of the entire system | | [RS_SWCT_00120] | The Software Component Template shall provide protection/unlock mechanisms for software through appropriate services in the infrastructure | | [RS_SWCT_00150] | The Software Component Template shall provide means to protect SW-Components from malicious SW-Components | | [RS_SWCT_00160] | The Software Component Template shall provide means to achieve compositionality | | Requirement | Description | | [RS_SWCT_00170] | The Software Component Template shall provide diagnostics means during runtime, for production and services purposes | | [RS_SWCT_00190] | The Software Component Template shall support hierarchical design methods | | [RS_SWCT_00200] | Definitions of relations between SW components are exhaustive and formal | | [RS_SWCT_00210] | SW components are protected from illegal access | | [RS_SWCT_00220] | The Software Component Template shall support management of vehicle diversity | | [RS_SWCT_00230] | The Software Component Template shall provide the ability to define naming conventions for public symbols | | [RS_SWCT_02000] | The Software Component Template shall support a top-down hierarchical design | | [RS_SWCT_02010] | Interfaces of atomic software-components shall be supported | | [RS_SWCT_02020] | Bottom-up design of CompositionTypes shall be supported | | Requirement | Description | | [RS_SWCT_02030] | Specification of Communications shall be supported | | [RS_SWCT_02060] | Interaction with basic software shall be considered | | [RS_SWCT_02080] | Designing a Sensor Actuator Component shall be supported | | [RS_SWCT_02090] | Data-consistency for communication among RunnableEntities shall be supported | | [RS_SWCT_02100] | Definition of physical units shall be supported | | [RS_SWCT_02110] | Definition of comments shall be supported | | [RS_SWCT_03000] | The SW-Component template shall support compositions | | [RS_SWCT_03010] | The SW-Component template shall support interfaces | | [RS_SWCT_03040] | The SW-Component template shall support description of the behavior | | [RS_SWCT_03045] | The SW-Component template shall allow enabling of RTE-Feature to get the activating RTE-Event of Runnable Entity | | [RS_SWCT_03046] | The SW-Component template shall support instance specific RTE-Events | | [RS_SWCT_03050] | The SW-Component template shall support the definition of schedulability | | Requirement | Description | | [RS_SWCT_03055] | The SW-Component template shall support optional configuration of ExclusiveArea usage within RunnableEntities | | [RS_SWCT_03065] | The Software Component Template shall support the definition of implicit communication behavior | | [RS_SWCT_03090] | The SW-Component template shall support the definition of needed and usable sensors and actuators | | [RS_SWCT_03100] | The SW-Component template shall support variant handling | | [RS_SWCT_03110] | The SW-Component template shall support modes | | [RS_SWCT_03115] | The SW-Component template shall support mapping of mode declarations | | [RS_SWCT_03120] | The SW-Component template shall support dependency on modes | | [RS_SWCT_03130] | The SW-Component template shall support connections between PortInterfaces | | [RS_SWCT_03135] | The SW-Component template shall support record type subsetting | | [RS_SWCT_03136] | The SW-Component template shall support record type subsetting with primitive types | | [RS_SWCT_03140] | The SW-Component template shall support conditional existence of PortPrototypes | | [RS_SWCT_03141] | The SW-Component template shall support the conditional existence of data element prototypes, operation prototypes, parameter prototypes in an interface | | [RS_SWCT_03142] | The SW-Component template shall support the conditional existence of Component Prototypes | | Requirement | Description | | [RS_SWCT_03143] | The SW-Component template shall support the conditional existence of Connector Prototypes | | [RS_SWCT_03144] | The SW-Component template shall support a configurable size of arrays | | [RS_SWCT_03148] | Attributes swMinAxisPoints and swMaxAxisPoints shall be adjustable by an System Constant Definition | | [RS_SWCT_03149] | The SW-Component template shall support the conditional existence of RunnableEntitys | | [RS_SWCT_03150] | The SW-Component template shall support the conditional existence of RTEEvents | | [RS_SWCT_03151] | The SW-Component template shall support the conditional existence of InterRunnable Variables | | [RS_SWCT_03152] | The SW-Component template shall support the conditional accessibility for measurement | | [RS_SWCT_03153] | The SW-Component template shall support the conditional existence of parameter prototypes | | [RS_SWCT_03154] | The SW-Component template shall support conditional ports for software components | | [RS_SWCT_03155] | The SW-Component template shall support interfaces with different resolutions | | [RS_SWCT_03170] | The SW-Component template shall support fixed data exchange | | [RS_SWCT_03175] | The SW-Component template shall support the definition of calibration datasets | | [RS_SWCT_03180] | The SW-Component template shall support SAE J1939 Protocol Features | | [RS_SWCT_03181] | The SW-Component template shall support arrays of variable number of elements within the maximum size | | [RS_SWCT_03182] | The SW-Component template shall support byte arrays of variable number of elements | | Requirement | Description | | [RS_SWCT_03190] | The SW-Component template shall support the ability to publish/specify the diagnostic capabilities and its resources of an SWC | | [RS_SWCT_03200] | The SW-Component template shall support vehicle and application mode management | | [RS_SWCT_03201] | The SW-Component template shall support Portgroups | | [RS_SWCT_03202] | The SW-Component template shall support enabling SWCs to request dedicated modes | | [RS_SWCT_03203] | The SW-Component template shall support propagation of mode information | | [RS_SWCT_03210] | The SW-Component template shall support integrity and scaling at ports | | Requirement | Description | | [RS_SWCT_03215] | The SW-Component template shall define the need to add application data type on top of implementation data type | | [RS_SWCT_03216] | The SW-Component template shall support application data type | | [RS_SWCT_03217] | The SW-Component template shall support implementation data type | | [RS_SWCT_03218] | The SW-Component template shall support data types for primitive data mapping | | [RS_SWCT_03220] | The SW-Component template shall allow communication attributes on compositions | | [RS_SWCT_03221] | The SW-Component template shall allow port specific configuration of data transformation properties | | [RS_SWCT_03222] | The SW-Component template shall support error notification for transformed data communication | | [RS_SWCT_03225] | The SW-Component template shall support an enhanced non-volatile (NV) memory interface |

| Requirement | Description |

| [RS_SWCT_03230] | The SW-Component template shall support documentation of M1 artifacts | | [RS_SWCT_03240] | The SW-Component template shall support end-to-end communication protection | | [RS_SWCT_03241] | The SW-Component template shall support partial networking | | [RS_SWCT_03250] | The SW-Component template shall support bidirectional communication | | [RS_SWCT_03260] | The SW-Component template shall support rule-based initialization of arrays | | [RS_SWCT_03270] | The SW-Component template shall support overriding the activation period time on instance level | | [RS_SWCT_03280] | The SW-Component template shall support the description of bypass points and bypass scenarios | | [RS_SWCT_03281] | The SW-Component template shall support post-build hooking tools for rapid prototyping | | [RS_SWCT_03282] | The SW-Component template shall support the description of service points and rapid prototyping scenarios | | [RS_SWCT_03290] | The SW-Component template shall support the initialization of runnables without usage of mode management | | [RS_SWCT_03310] | The SW-Component template shall support Diagnostics over IP | | [RS_SWCT_03320] | The SW-Component template shall support the definition of optional elements for communication |

B. 示例

本节包含本文档讨论的选定建模方面的示例集。

请注意,本文档并不设想为所讨论模型元素用法的每一个单独方面都创建示例。

B.1. 数据类型示例

本节包含数据类型定义示例的汇编。注意,本节的目的在于突出数据类型建模的特定且值得注意的方面。

并无意图为 AUTOSAR 方法论可能支持的任何可能数据类型的创建创建全面示例。

B.1.1. 字符串数据类型的定义

本小节描述字符串数据类型定义的示例,包括适用于 category 为 STRING 的 ApplicationPrimitiveDataType 的 SwRecordLayout 的定义。

在 ImplementationDataType 层级,字符串数据类型实现为一个结构化数据类型,它由以下组成:

  1. 以字符数表示的字符串数据类型实例的大小;加

  2. 一个可用于存储字符串数据类型实例所含各个字符的数组。

<APPLICATION-PRIMITIVE-DATA-TYPE>

<SHORT-NAME> MyApplicationStringType </SHORT-NAME> <CATEGORY> STRING </CATEGORY> <SW-DATA-DEF-PROPS> <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" > MyTextBaseType </BASE-TYPE-REF> </SW-TEXT-PROPS> <INVALID-VALUE> <APPLICATION-VALUE-SPECIFICATION> <CATEGORY> STRING </CATEGORY> <SW-VALUE-CONT>

BaseTypes/

1 关于 SwRecordLayout 建模的另一个例子见第 B.2.4 节。

<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>

取决于所使用的编码,该数组可能需要(就元素数量而言)比 size 的相应值更大。

此外,SwRecordLayout 的定义已经考虑到:借助 ImplementationDataType 实现数组数据类型要求定义一个 ImplementationDataTypeElement。

SwRecordLayoutV.swRecordLayoutVProp 标准化值的含义记录于 [TPS_SWCT_01489]。在本示例范围内使用了值 COUNT 与 VALUE。

swRecordLayoutGroupTo 包含值 -1 这一事实意味着迭代结束于数组的最后一个元素。

还请注意,所讨论的 category 为 STRING 的 ApplicationPrimitiveDataType 示例也包含该字符串数据类型 invalidValue 的定义。

下一步是定义一个在实现层级表示字符串类型的 ImplementationDataType。

ImplementationDataType 的定义可以从适用的 SwRecordLayout 的定义派生。

<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>

下一个清单描述字符串数据类型中单个字符的数据类型。

<IMPLEMENTATION-DATA-TYPE>

<SHORT-NAME>

uint8

</SHORT-NAME>

<CATEGORY>

VALUE

</CATEGORY>

<SW-DATA-DEF-PROPS>

<SW-DATA-DEF-PROPS-VARIANTS>

<SW-DATA-DEF-PROPS-CONDITIONAL>

<BASE-TYPE-REF

</SW-DATA-DEF-PROPS-CONDITIONAL>

</SW-DATA-DEF-PROPS-VARIANTS>

</SW-DATA-DEF-PROPS>

</IMPLEMENTATION-DATA-TYPE>

请注意,该 ImplementationDataType 也定义了 invalidValue。

<IMPLEMENTATION-DATA-TYPE> <SHORT-NAME> MyImplementationStringType </SHORT-NAME> <CATEGORY> STRUCTURE </CATEGORY> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <INVALID-VALUE> <RECORD-VALUE-SPECIFICATION> <FIELDS> <NUMERICAL-VALUE-SPECIFICATION> <VALUE> 3 </VALUE> </NUMERICAL-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <NUMERICAL-VALUE-SPECIFICATION> <VALUE> 105 </VALUE>

DEST=

"SW-BASE-TYPE"

BaseTypes/uint8BT

</BASE-TYPE-REF

</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>

</FIELDS>

</RECORD-VALUE-SPECIFICATION>

</INVALID-VALUE>

</SW-DATA-DEF-PROPS-CONDITIONAL>

</SW-DATA-DEF-PROPS-VARIANTS>

</SW-DATA-DEF-PROPS>

<DYNAMIC-ARRAY-SIZE-PROFILE>

VSA_LINEAR

<SUB-ELEMENTS>

<IMPLEMENTATION-DATA-TYPE-ELEMENT>

  • <SHORT-NAME>size</SHORT-NAME>

  • <CATEGORY>TYPE_REFERENCE</CATEGORY>

<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>

</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

<SUB-ELEMENTS>

<IMPLEMENTATION-DATA-TYPE-ELEMENT>

<SHORT-NAME> character </SHORT-NAME>

<CATEGORY>

TYPE_REFERENCE

</CATEGORY>

<ARRAY-SIZE> 200 </ARRAY-SIZE>

<ARRAY-SIZE-HANDLING> ALL-INDICES-SAME-ARRAY-SIZE </ARRAY-SIZEHANDLING>

<ARRAY-SIZE-SEMANTICS> VARIABLE-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>

</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>

</CATEGORY>

</DYNAMIC-ARRAY-SIZE-PROFILE>

如 [TPS_SWCT_01487] 所述,category 为 STRING 的 ApplicationPrimitiveDataType 范围内定义的 invalidValue 与相应 ImplementationDataType 范围内定义的 invalidValue 之间的一致性无法形式化检查。

shortName 为 MyImplementationStringType 的 ImplementationDataType(如清单 B.4 所例示)表示一个可变大小字符串,即字符数量可能在运行时变化。当然,也可以建模固定大小的字符串,但那种情况下不需要大小指示器。

还请注意,清单 B.4 中 ImplementationDataType 定义内载荷数组的大小已设置为值 200,以兼顾相应 ApplicationDataType 定义中 swMaxTextSize 的定义以及 baseTypeEncoding 的值已设置为 UTF-8 这一事实。

作为背景,属性 SwTextProps.swMaxTextSize 的值应规定为字符串中码点的数量。

每个码点将根据适用的编码由一个字节序列编码。例如在 UTF-8 的情况下,每个码点最多由四个字节编码。

在 ImplementationDataType 层级,设计用于保存由 UTF-8 编码的码点组成的字符串的数组,需要足够大以承载码点数量(可能已由 SwTextProps.swMaxTextSize 描述)乘以 4 字节。

这一定义有趣之处在于:在实现层级,(由 SwRecordLayout 的定义驱动)决定把字符串实现为一个大小元素(shortName 为 “size”)与一个值元素(shortName 为 “string”)构成的结构。

值元素定义为数组数据类型,因此拥有一个 shortName 为 “character” 的子元素。

  • <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> uint8BT </SHORT-NAME> <CATEGORY> FIXED_LENGTH </CATEGORY> <BASE-TYPE-SIZE> 8 </BASE-TYPE-SIZE> </SW-BASE-TYPE>

后者(在角色 swDataDefProps.implementationDataType 中)引用平台数据类型 “uint8”(按平台数据类型的规则,它由 ImplementationDataType “uint8” 实现)。

请注意,名为 “MyApplicationStringType” 的 ApplicationPrimitiveDataType 引用了名为 “MyTextBaseType” 的 SwBaseType,它定义于以下 XML 片段:

这一 SwBaseType 定义对字符串数据类型整体定义的贡献由字符编码的定义(设置为 UTF-8)表示。

<DATA-TYPE-MAPPING-SET> <SHORT-NAME> theExample </SHORT-NAME> <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= "IMPLEMENTATIONDATA-TYPE" > ImplementationDataTypes/MyImplementationStringType </ IMPLEMENTATION-DATA-TYPE-REF> </DATA-TYPE-MAP> </DATA-TYPE-MAPS> </DATA-TYPE-MAPPING-SET>

不过仍缺少一个重要部分,即 ApplicationPrimitiveDataType 到 ImplementationDataType 映射的定义(反之亦然,见清单 B.6)。

如前所述,与 category 为 STRING 的 ApplicationPrimitiveDataType 相对应的 ImplementationDataType 的定义,可以在一定程度上从 ApplicationPrimitiveDataType.swDataDefProps.swRecordLayout 派生。

B.1.2. 索引数据类型的定义

以下(见清单 B.7)示例显示了一个所谓索引数据类型的简化与精简(例如没有使模型完整所需的 SwDataDefProps)模型。更多信息请参阅第 5.2.4.2.1.3 节。

<APPLICATION-ARRAY-DATA-TYPE> <SHORT-NAME> CylinderArray </SHORT-NAME> <ELEMENT> <SHORT-NAME> CylinderArrayElement </SHORT-NAME> <ARRAY-SIZE-SEMANTICS> FIXED-SIZE </ARRAY-SIZE-SEMANTICS> <INDEX-DATA-TYPE-REF DEST= "APPLICATION-PRIMITIVE-DATA-TYPE" > myIndexDataType </INDEX-DATA-TYPE-REF> </ELEMENT> </APPLICATION-ARRAY-DATA-TYPE> <APPLICATION-PRIMITIVE-DATA-TYPE> <SHORT-NAME> myIndexDataType </SHORT-NAME> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL>

<COMPU-METHOD-REF DEST= "COMPU-METHOD" > cylinders </COMPU-METHOD-REF> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </APPLICATION-PRIMITIVE-DATA-TYPE>

<COMPU-METHOD> <SHORT-NAME> cylinders </SHORT-NAME> <CATEGORY> TEXTTABLE </CATEGORY> <COMPU-INTERNAL-TO-PHYS> <COMPU-SCALES> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 0 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 0 </UPPER-LIMIT> <COMPU-CONST> <VT> Cylinder1 </VT> </COMPU-CONST> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 1 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 1 </UPPER-LIMIT> <COMPU-CONST> <VT> Cylinder2 </VT> </COMPU-CONST> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 2 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 2 </UPPER-LIMIT> <COMPU-CONST> <VT> Cylinder3 </VT> </COMPU-CONST> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 3 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 3 </UPPER-LIMIT> <COMPU-CONST> <VT> Cylinder4 </VT> </COMPU-CONST> </COMPU-SCALE> </COMPU-SCALES> </COMPU-INTERNAL-TO-PHYS> </COMPU-METHOD>

B.1.3. 可变大小数组的定义

本节包含可变大小数组定义(见第 2.7、5.2.4.2.1.1、5.2.5.5.2 节)及其四个已定义用例的建模示例:线性、方形、矩形与完全灵活。

所有这些示例都可以只用 ImplementationDataType 实现,或如这里所示,从 ApplicationDataType 的定义开始并配有相应的 ImplementationDataType。

B.1.4. 包装联合数据类型的定义

以下清单 B.9 表示按照 [TPS_SWCT_01700]/[TPS_SWCT_01701] 建模包装联合数据类型的简单示例。

<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> Listing B.9: Simplified example of a Wrapped Union Data Type

B.1.5. 多维数组数据类型的定义

图 B.5 左侧显示用一组 ApplicationArrayDataType 描述的三维数组。数组元素由 category 为 BOOLEAN 的 ApplicationPrimitiveDataType 定义类型。

右侧用包含三个嵌套 ImplementationDataTypeElement 的 ImplementationDataType 描述三维数组的实现。

匹配的 ApplicationArrayElement 与 ImplementationDataTypeElement 显示在同一层。

为清晰起见,相互关联的 maxNumberOfElements 与 arraySize 属性用同一个 SwSystemconst 实例而不是值来描述。变体丰富 M1 模型的更多细节不在本示例范围内。

数组元素的数据类型由 ApplicationArrayDataType 借助 category 为 BOOLEAN 的 ApplicationPrimitiveDataType 描述。为满足 [constr_1152],ApplicationArrayElement “Dim3” 的 category 设置为 BOOLEAN。

这一 ApplicationPrimitiveDataType “BOOLEAN” 对应 category 为 VALUE 的 ImplementationDataType “boolean”,后者通常是 AUTOSAR 平台类型的 boolean 类型。请注意 [constr_1063]。

B.1.6. 'Typedef' 的定义

本节的示例例示第 5.2.5.6 节描述的建模方面。对原始数据类型而言,示例中提到的 “typedef” 的创建按照 SWS RTE [2] 中的 [SWS_Rte_07104] 进行。

图 B.8 所描绘的示例由 SWS RTE [2] 中的 [SWS_Rte_07148] 及后续条文支持。

B.1.7. 数组基本类型的定义

在属性 category 设置为值 ARRAY 的 ImplementationDataType 定义的上下文中,属性 baseTypeSize 的值(见第 5.2.6.4 节)建模为 ImplementationDataTypeElement 的一部分,见清单 B.10。

<IMPLEMENTATION-DATA-TYPE>

<SHORT-NAME> MyImplDataType </SHORT-NAME> <CATEGORY> ARRAY </CATEGORY> <SUB-ELEMENTS> <IMPLEMENTATION-DATA-TYPE-ELEMENT> <SHORT-NAME> MyArrayElement </SHORT-NAME> <CATEGORY> VALUE </CATEGORY> <ARRAY-SIZE> 6 </ARRAY-SIZE> <ARRAY-SIZE-SEMANTICS> FIXED-SIZE </ARRAY-SIZE-SEMANTICS> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <BASE-TYPE-REF DEST= "SW-BASE-TYPE" > /SwBaseTypes/MyBaseType </ BASE-TYPE-REF> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS>
  • </IMPLEMENTATION-DATA-TYPE-ELEMENT>

</SUB-ELEMENTS>

  • </IMPLEMENTATION-DATA-TYPE>

被引用的 SwBaseType 勾勒于清单 B.11。

  • </BASE-TYPE-ENCODING>

  • </SW-BASE-TYPE>

<SW-BASE-TYPE> <SHORT-NAME> MyBaseType </SHORT-NAME> <BASE-TYPE-SIZE> 32 </BASE-TYPE-SIZE> <BASE-TYPE-ENCODING> NONE

由于 baseTypeSize 的值在 ImplementationDataTypeElement 引用的 SwDataDefProps 的上下文中定义,应当清楚:该值不应确定整个数组以位计的大小。相反,它明确用于规定数组原始元素以位计的大小。

在清单 B.10 与 B.11 所呈现示例的情况下,数组元素的大小是 32 位。因此整个数组占用 32 ∗ 6 = 192 位。

B.1.8. 可选元素与可用位域的定义

[TPS_SWCT_01881] 所作的陈述描绘于图 B.9。

如 [constr_1639] 形式化,通过使用 category TYPE_REFERENCE,确保为子结构生成一个单独的 category 为 STRUCTURE 的 ImplementationDataType。图 B.10 显示 [constr_1639] 所作陈述的示例:

B.1.9. ArVariableInImplementationDataInstanceRef 的使用

图 B.11 包含嵌套 ImplementationDataType 的示例以及 ArVariableInImplementationDataInstanceRef 的应用。该示例包含 [constr_1423] 中提到的 contextDataPrototype 定义的两种情况。

B.2. 数据属性示例

B.2.1. 数据依赖的定义

以下清单 B.12 例示数据依赖的定义。关于数据依赖性质的更多信息见第 5.4.7 节。

<PER-INSTANCE-PARAMETERS> <PARAMETER-DATA-PROTOTYPE> <SHORT-NAME> A </SHORT-NAME> <DESC> <L-2 L= "DE" > The independent Parameter </L-2> </DESC> <CATEGORY> VALUE </CATEGORY> </PARAMETER-DATA-PROTOTYPE> <PARAMETER-DATA-PROTOTYPE>
<SHORT-NAME> B </SHORT-NAME> <DESC> <L-2 L= "DE" > The dependent Parameter </L-2> </DESC> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <SW-DATA-DEPENDENCY> <SW-DATA-DEPENDENCY-FORMULA> SQRT( X1 * X1) </SW-DATA-DEPENDENCYFORMULA> <SW-DATA-DEPENDENCY-ARGS> <AR-PARAMETER> <LOCAL-PARAMETER-REF DEST= "PARAMETER-DATA-PROTOTYPE" > / DataDependency/foo/bar/A </LOCAL-PARAMETER-REF> </AR-PARAMETER> </SW-DATA-DEPENDENCY-ARGS> </SW-DATA-DEPENDENCY> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </PARAMETER-DATA-PROTOTYPE> <PARAMETER-DATA-PROTOTYPE> <SHORT-NAME> B_AREA </SHORT-NAME> <DESC> <L-2 L= "DE" > The dependent Parameter </L-2> </DESC> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <SW-DATA-DEPENDENCY> <SW-DATA-DEPENDENCY-FORMULA> X1 * X1 </SW-DATA-DEPENDENCY-FORMULA > <SW-DATA-DEPENDENCY-ARGS> <AR-PARAMETER> <LOCAL-PARAMETER-REF DEST= "PARAMETER-DATA-PROTOTYPE" > / DataDependency/foo/bar/B </LOCAL-PARAMETER-REF> </AR-PARAMETER> </SW-DATA-DEPENDENCY-ARGS> </SW-DATA-DEPENDENCY> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </PARAMETER-DATA-PROTOTYPE> <PARAMETER-DATA-PROTOTYPE> <SHORT-NAME> TRIANGULAR_AREA </SHORT-NAME> <DESC> <L-2 L= "DE" > The dependent Parameter </L-2> </DESC> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <SW-DATA-DEPENDENCY> <SW-DATA-DEPENDENCY-FORMULA> (X1 * X2) / 2 </SW-DATA-DEPENDENCYFORMULA> <SW-DATA-DEPENDENCY-ARGS> <AR-PARAMETER>

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

<LOCAL-PARAMETER-REF DEST= "PARAMETER-DATA-PROTOTYPE" > / DataDependency/foo/bar/A </LOCAL-PARAMETER-REF> </AR-PARAMETER> <AR-PARAMETER> <LOCAL-PARAMETER-REF DEST= "PARAMETER-DATA-PROTOTYPE" > / DataDependency/foo/bar/B </LOCAL-PARAMETER-REF> </AR-PARAMETER> </SW-DATA-DEPENDENCY-ARGS> </SW-DATA-DEPENDENCY> </SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </PARAMETER-DATA-PROTOTYPE> </PER-INSTANCE-PARAMETERS>

B.2.2. 单位与物理维度的定义

在以下使用 Unit(见第 5.5.3 节)与 PhysicalDimension(见第 5.5.2 节)的示例中,规定了单位 “km” 与 “m” 及其名为 “Len1” 的物理量纲。SI 基本单位是 “m”(米)。

属性 Unit.offsetSiToUnit 的默认值是 0,Unit.factorSiToUnit 的默认值是 1(见 [TPS_SWCT_01492])。

给定等式 1 km == 1000 m,适用以下方程:

这一关联反映于清单 B.13 所含的示例 ARXML 中。

<UNIT> <SHORT-NAME> KiloMtr </SHORT-NAME> <LONG-NAME> <L-4 L= "EN" > Kilo Meter </L-4> </LONG-NAME> <DISPLAY-NAME> km </DISPLAY-NAME> <FACTOR-SI-TO-UNIT> 0.001 </FACTOR-SI-TO-UNIT> <OFFSET-SI-TO-UNIT> 0 </OFFSET-SI-TO-UNIT> <PHYSICAL-DIMENSION-REF BASE= "PhysicalDimensions" DEST= "PHYSICALDIMENSION" > /SiUnit/Len1 </PHYSICAL-DIMENSION-REF> </UNIT> <UNIT> <SHORT-NAME> Mtr </SHORT-NAME> <LONG-NAME> <L-4 L= "EN" > Meter </L-4> </LONG-NAME> <DISPLAY-NAME> m </DISPLAY-NAME> <FACTOR-SI-TO-UNIT> 1 </FACTOR-SI-TO-UNIT> <OFFSET-SI-TO-UNIT> 0 </OFFSET-SI-TO-UNIT>

<PHYSICAL-DIMENSION-REF BASE= "PhysicalDimensions" DEST= "PHYSICAL-

DIMENSION"> /SiUnit/Len1

</UNIT>

<PHYSICAL-DIMENSION>

<SHORT-NAME> Len1 </SHORT-NAME> <LONG-NAME> <L-4 L= "EN" > Length 1 </L-4> </LONG-NAME> <LENGTH-EXP> 1 </LENGTH-EXP>

</PHYSICAL-DIMENSION>

B.2.3. 记录布局的定义

图 B.13、B.12、B.14、B.15 与 B.16 例示数据类型如何从 SwRecordLayout 派生。请注意,这些图简化了实际建模的某些方面。特别是,为视觉清晰起见,顶层的 SwDataDefProps 聚合与 SwRecordLayoutGroup 聚合被省略。

</PHYSICAL-DIMENSION-REF>

注意,在这些图的每一幅中,“蓝色” 数据类型都是从记录布局派生的。

这些图尤其例示了这一事实:在 ApplicationDataType 层级,甚至曲线与映射这样的复杂实体也表现为原始数据类型。这类实体的内部细节例如由服务库处理。

关于记录布局应用的更多示例见文档《TR 通用蓝图补充》[12]。

B.2.4. 曲线记录布局的定义

以下 XML 片段提供了一个曲线 SwRecordLayout 的示例。注意,在这种情况下,即使 SwRecordLayoutGroup.category 中未提供关键字,识别 A2L 关键字(以 XML 注释显示)所表示的模式也相当直接。

<SW-RECORD-LAYOUT> <SHORT-NAME> RecordLayoutCurve </SHORT-NAME> <SW-RECORD-LAYOUT-GROUP> <SW-RECORD-LAYOUT-V><! --NO_AXIS_PTS_X --> <SHORT-LABEL> noOfAxisPts </SHORT-LABEL> <SW-RECORD-LAYOUT-V-PROP> COUNT </SW-RECORD-LAYOUT-V-PROP> <SW-RECORD-LAYOUT-V-INDEX> 1 </SW-RECORD-LAYOUT-V-INDEX> </SW-RECORD-LAYOUT-V> <SW-RECORD-LAYOUT-GROUP><! --AXIS_PTS_X --> <SHORT-LABEL> xPts </SHORT-LABEL> <CATEGORY> INDEX_INCR </CATEGORY>
<SW-RECORD-LAYOUT-GROUP-AXIS> 1 </SW-RECORD-LAYOUT-GROUP-AXIS> <SW-RECORD-LAYOUT-GROUP-FROM> 1 </SW-RECORD-LAYOUT-GROUP-FROM> <SW-RECORD-LAYOUT-GROUP-TO> -1 </SW-RECORD-LAYOUT-GROUP-TO> <SW-RECORD-LAYOUT-V> <SHORT-LABEL> xPt </SHORT-LABEL> <SW-RECORD-LAYOUT-V-AXIS> 1 </SW-RECORD-LAYOUT-V-AXIS> <! --AXIS_PTS_X --> <SW-RECORD-LAYOUT-V-PROP> VALUE </SW-RECORD-LAYOUT-V-PROP> </SW-RECORD-LAYOUT-V> </SW-RECORD-LAYOUT-GROUP> <SW-RECORD-LAYOUT-GROUP> <SHORT-LABEL> values </SHORT-LABEL><! --FNC_VALUES --> <CATEGORY> COLUMN_DIR </CATEGORY> <SW-RECORD-LAYOUT-GROUP-AXIS> 0 </SW-RECORD-LAYOUT-GROUP-AXIS> <SW-RECORD-LAYOUT-GROUP-FROM> 1 </SW-RECORD-LAYOUT-GROUP-FROM> <SW-RECORD-LAYOUT-GROUP-TO> -1 </SW-RECORD-LAYOUT-GROUP-TO> <SW-RECORD-LAYOUT-V> <SHORT-LABEL> value </SHORT-LABEL> <SW-RECORD-LAYOUT-V-AXIS> 0 </SW-RECORD-LAYOUT-V-AXIS><! -- FNC_VALUES --> <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>

B.2.5. 固定轴的定义

category 为 FIX_AXIS_PAR 的坐标轴的建模勾勒于以下示例模型(图 B.17)。

category 为 FIX_AXIS_PAR_DIST 的坐标轴的建模勾勒于以下示例模型(图 B.18)。

category 为 FIX_AXIS_PAR_LIST 的坐标轴的建模勾勒于以下示例模型(图 B.19)。

B.3. 常量值规范的示例

本节包含常量值建模的选定示例。

B.3.1. category CURVE 的常量规范

以下示例例示如何为 CURVE 规定 ConstantSpecification。请注意,在该示例中 vf 属性既用于 swArraysize 也用于 swValuesPhys。

vf 的基本意图是用于变体丰富的模型,但如果 vf 包含不变值也同样有效。

表B.1:CompuConstFormulaContent(CompuConstFormulaContent)

| 包 | M2::MSR::AsamHdo::ComputationMethod | | 说明 | This meta-class represents the fact that the constant value of the computation method is represented by a variation point. This difference is due to compatibility with ASAM HDO. | | 基类 | ARObject , CompuConstContent | | 聚合于 | CompuConst.compuConstContentType |

属性 类型 多重性 种类 备注
vf Numerical 1 attr Value calculated via a system constant. This element is included in every case where parameters should be generated from numerical values during compile time (not runtime!). Thus for example, the influence of the cylinder number on conversion formulae can be introduced in a repeatable manner. Stereotypes: atpVariation Tags: vh.latestBindingTime=codeGenerationTime xml.sequenceOffset=30

适用约束(例如 [constr_2050]、[constr_2051] 与 [constr_2052])见第 5.6.5 节。

<CONSTANT-SPECIFICATION>

<SHORT-NAME> PhysInitValuesOfCurve </SHORT-NAME> <DESC> <L-2 L= "EN" > This example shows a ConstantSpecification for a CURVE where the axis is a STD_AXIS </L-2> </DESC> <VALUE-SPEC> <APPLICATION-VALUE-SPECIFICATION> <CATEGORY> CURVE </CATEGORY> <SW-AXIS-CONTS> <SW-AXIS-CONT> <CATEGORY> STD_AXIS </CATEGORY> <SW-AXIS-INDEX> 1 </SW-AXIS-INDEX> <SW-ARRAYSIZE> <VF> 4 </VF> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <VF> 0 </VF> <VF> 1 </VF> <VF> 2 </VF> <VF> 3 </VF> </SW-VALUES-PHYS> </SW-AXIS-CONT> </SW-AXIS-CONTS> <SW-VALUE-CONT> <UNIT-REF DEST= "UNIT" > /Units/NwtMtr </UNIT-REF> <SW-ARRAYSIZE> <VF> 4 </VF> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <VF> 00.000 </VF> <VF> 10.000 </VF>

<VF> 20.000 </VF> <VF> 30.000 </VF> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

B.3.2. category MAP 的常量规范

以下示例例示如何为 MAP 规定 ConstantSpecification。在这种情况下,MAP 的一个坐标轴是 STD_AXIS,第二个是 COM_AXIS。

请注意,在该示例中 v 属性既用于 swArraysize 也用于 swValuesPhys。

这是可能的,因为该示例只包含不变值。

<CONSTANT-SPECIFICATION> <SHORT-NAME> PhysInitValuesOfMap </SHORT-NAME> <DESC> <L-2 L= "EN" > This example shows a ConstantSpecification for a MAP where the first axis is a STD_AXIS and the second axis is a COM_AXIS </L-2> </DESC> <VALUE-SPEC> </UNIT-REF>
<APPLICATION-VALUE-SPECIFICATION> <CATEGORY> MAP </CATEGORY> <SW-AXIS-CONTS> <SW-AXIS-CONT> <CATEGORY> STD_AXIS </CATEGORY> <SW-AXIS-INDEX> 1 </SW-AXIS-INDEX> <SW-ARRAYSIZE> <V> 4 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <V> 0 </V> <V> 1 </V> <V> 2 </V> <V> 3 </V> </SW-VALUES-PHYS> </SW-AXIS-CONT> </SW-AXIS-CONTS> <SW-VALUE-CONT> <UNIT-REF DEST= "UNIT" > /Units/NwtMtr <SW-ARRAYSIZE> <V> 4 </V> <V> 2 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <VG> <LABEL>

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

<L-4 L= "EN" > Values for axis index 2 equals 0 </L-4> </LABEL> <V> 00 </V> <V> 10 </V> <V> 20 </V> <V> 30 </V> </VG> <VG> <LABEL> <L-4 L= "EN" > Values for axis index 2 equals 1 </L-4> </LABEL> <V> 01 </V> <V> 11 </V> <V> 21 </V> <V> 31 </V> </VG> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

B.3.3. 带两个 STD_AXIS 的 category MAP 常量规范

本小节所含示例例示为由两个 STD_AXIS 组成的 MAP 创建 ConstantSpecification(与清单 B.16 勾勒的前一示例相对)。

与前例一样,v 属性既用于 swArraysize 也用于 swValuesPhys。

<CONSTANT-SPECIFICATION> <SHORT-NAME> MapExample </SHORT-NAME> <VALUE-SPEC> <APPLICATION-VALUE-SPECIFICATION> <CATEGORY> MAP </CATEGORY> <SW-AXIS-CONTS> <SW-AXIS-CONT> <SW-AXIS-INDEX> 1 </SW-AXIS-INDEX> <SW-ARRAYSIZE> <V> 4 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <V> 1 </V> <V> 2 </V> <V> 3 </V> <V> 4 </V> </SW-VALUES-PHYS> </SW-AXIS-CONT> <SW-AXIS-CONT> <SW-AXIS-INDEX> 2 </SW-AXIS-INDEX> <SW-ARRAYSIZE>

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

<V> 2 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <V> 10 </V> <V> 11 </V> </SW-VALUES-PHYS> </SW-AXIS-CONT> </SW-AXIS-CONTS> <SW-VALUE-CONT> <SW-ARRAYSIZE> <V> 4 </V> <V> 2 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <VG> <LABEL> <L-4 L= "EN" > Values for 10 </L-4> </LABEL> <V> 110 </V> <V> 210 </V> <V> 310 </V> <V> 410 </V> </VG> <VG> <LABEL> <L-4 L= "EN" > Values for 11 </L-4> </LABEL> <V> 111 </V> <V> 211 </V> <V> 311 </V> <V> 411 </V> </VG> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

B.3.4. category COM_AXIS 的常量规范

以下示例例示如何为 COM_AXIS 规定 ConstantSpecification。

<CONSTANT-SPECIFICATION> <SHORT-NAME> PhysInitValuesOfComAxis </SHORT-NAME> <DESC> <L-2 L= "EN" > This example shows a ConstantSpecification for a COM_AXIS </L -2> </DESC> <VALUE-SPEC> <APPLICATION-VALUE-SPECIFICATION> <CATEGORY> COM_AXIS </CATEGORY>
<SW-VALUE-CONT> <UNIT-REF DEST= "UNIT" > /Units/Rpm </UNIT-REF> <SW-ARRAYSIZE> <V> 6 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <V> 0 </V> <V> 500 </V> <V> 1000 </V> <V> 1500 </V> <V> 3000 </V> <V> 5000 </V> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

B.3.5. BITFIELD_TEXTTABLE 的值规范

该示例的更多背景信息见第 5.6.7 节。

<APPLICATION-VALUE-SPECIFICATION> <SHORT-LABEL> tirePressureInit </SHORT-LABEL> <CATEGORY> VALUE </CATEGORY> <SW-VALUE-CONT> <SW-VALUES-PHYS> <VT> problem_low_Pressure|rearRight_yes|rearLeft_yes|frontRight_no| frontLeft_no </VT> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION>
<TEXT-VALUE-SPECIFICATION> <SHORT-LABEL> tirePressureInit </SHORT-LABEL> <VALUE> problem_low_Pressure|rearRight_yes|rearLeft_yes|frontRight_no| frontLeft_no </VALUE> </TEXT-VALUE-SPECIFICATION>

B.3.6. 依记录布局的 MAP 值规范

[constr_10503] 与 [constr_10504] 所作的观察应通过《TR 通用蓝图补充》[12] 中标题为 “记录布局:IntMap 3 x 4” 一节讨论的示例来合理化。

索引的基本原理在同一文档标题为 “索引的定义” 与 “把逻辑视图变换为内存表示” 的各节中描述。

从复合原始数据类型定义的视角可以得出结论:ApplicationValueSpecification 的规定也可以用同样的思路定义,这意味着目标受众预期在定义 ApplicationValueSpecification 时考虑 SwRecordLayout。

| [1,1] | [1,2] |

| [2,1] | [2,2] | | [3,1] | [3,2] |

上图显示 3×4 映射的值如何排列。这些值在计算机内存中的存储可以以两种正交的方式完成:

  • 行优先(通过把相应 SwRecordLayoutGroup.category 的值设置为 ROW_DIR 指示);且

  • 列优先(通过把相应 SwRecordLayoutGroup.category 的值设置为 COLUMN_DIR 指示)。

这两种正交方式的具体例子在第 B.3.6.1 节与第 B.3.6.2 节讨论。

请注意,区别只出现在 SwValueCont 的定义中。SwAxisCont 的定义在示例中只是粗略勾勒,但对两种情况而言是相同的。

B.3.6.1. 行优先

如果遵循 ROW_DIR 场景,则第一个值是元素 [1,1],随后是 [1,2],依此类推。

在 ARXML 中,相应的 ApplicationValueSpecification 会类似于以下勾勒:

<V> 13 </V> <V> 14 </V> </VG> <VG> <LABEL> <L-4 L= "EN" > Second Row </L-4> </LABEL> <V> 21 </V> <V> 22 </V> <V> 23 </V> <V> 24 </V> </VG> <VG> <LABEL> <L-4 L= "EN" > Third Row </L-4> </LABEL> <V> 31 </V> <V> 32 </V> <V> 33 </V> <V> 34 </V> </VG> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION>

在内存中,整个映射的布局(x 轴与 y 轴的示例布局只是为了复杂化而包括的)类似于以下勾勒:

B.3.6.2. 列优先

如果遵循 COLUMN_DIR 场景,则第一个值是元素 [1,1],随后是 [2,1],依此类推。

在 ARXML 中,相应的 ApplicationValueSpecification 会类似于以下勾勒:

<APPLICATION-VALUE-SPECIFICATION> <SW-AXIS-CONTS> <SW-AXIS-CONT> <SW-AXIS-INDEX> 1 </SW-AXIS-INDEX> <SW-ARRAYSIZE> <V> 4 </V> </SW-ARRAYSIZE> </SW-AXIS-CONT> <SW-AXIS-CONT> <SW-AXIS-INDEX> 2 </SW-AXIS-INDEX> <SW-ARRAYSIZE> <V> 3 </V> </SW-ARRAYSIZE> </SW-AXIS-CONT> </SW-AXIS-CONTS> <SW-VALUE-CONT> <SW-ARRAYSIZE> <V> 3 </V> <V> 4 </V> </SW-ARRAYSIZE> <SW-VALUES-PHYS> <VG> <LABEL> <L-4 L= "EN" > First Column </L-4> </LABEL> <V> 11 </V> <V> 21 </V> <V> 31 </V> </VG> <VG> <LABEL> <L-4 L= "EN" > Second Column </L-4>

在内存中,整个映射的布局(x 轴与 y 轴的示例布局只是为了复杂化而包括的)类似于以下勾勒:

B.3.7. 基于规则的值规范

RuleBasedValueSpecification 的建模取决于用于建模应用 RuleBasedValueSpecification 的数组元素的数据类型。

本节包含依据数组元素数据类型的复杂性创建 RuleBasedValueSpecification 的示例。

B.3.8. 原始数据类型元素的基于规则的值规范

作为对原始数组元素数据类型应用 RuleBasedValueSpecification 的示例,考虑以下场景:

图 B.25 描绘的勾勒数组对应于清单 B.23 例示的建模。

<ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 1 </V> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION>

B.3.9. 组合数据类型元素的基于规则的值规范

作为复合数据结构基于规则初始化如何工作的示例,请考虑图 B.26 勾勒的复合结构。

简单地说,它描述一个由元素组成的数组,这些元素自身由两个原始元素构成的结构定义类型。

a

b

10

struct

a

a

b

struct 数组

在该示例中,第一个结构的元素 “a” 应以值 1 初始化,相应的 “b” 元素应赋值为 10。所有后续元素中的所有其他值应设置为 0。这也由图 B.26 中椭圆里的数字指示。

该示例在 ARXML 中的实现例示于清单 B.24。如前文已解释,AbstractRuleBasedValueSpecification 上下文中最后一个(按出现顺序)ValueSpecification 被取来执行该规则(如上所述)。

<ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTS> <RECORD-VALUE-SPECIFICATION> <FIELDS> <APPLICATION-VALUE-SPECIFICATION> <SW-VALUE-CONT> <SW-VALUES-PHYS> <V> 1 </V> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> <APPLICATION-VALUE-SPECIFICATION> <SW-VALUE-CONT> <SW-VALUES-PHYS> <V> 10 </V> </SW-VALUES-PHYS> </SW-VALUE-CONT> </APPLICATION-VALUE-SPECIFICATION> </FIELDS> </RECORD-VALUE-SPECIFICATION> <RECORD-VALUE-SPECIFICATION> <FIELDS> <APPLICATION-VALUE-SPECIFICATION> <SW-VALUE-CONT> <SW-VALUES-PHYS> <V> 0 </V> </SW-VALUES-PHYS> </SW-VALUE-CONT>

b

struct

1

a

1

b

b

a

数组

b

数组

一个更复杂的示例勾勒于图 B.27。这里描述了一个深度嵌套的复合数据结构:一个结构数组,结构又包含一个数组。

为使 ARXML 清单尽可能简单,该示例假定所有 “struct” 元素(相对于先初始化第一个、然后初始化所有其他元素)都应以相同的值初始化。

深度嵌套的 “数组” 借助 ApplicationRuleBasedValueSpecification 初始化。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

b

作为该主题的另一种变体,应讨论多维数组的基于规则初始化。

因此,以下示例把一维的基于规则 ValueSpecification(见图 B.25)扩展到第二个维度。总体布局勾勒于下图:

为清晰起见,图的绘制把二维数组的第一个维度(x 轴)与水平方向对齐,第二个维度(y 轴)与垂直方向对齐。

每个数组元素的方向索引值可见为该元素右下角的下标,即 a12 表示该元素是 x 轴上第一个元素的一部分、并表示 y 轴的第二个元素。元素 a12 的初始值应为 1。

如图 B.28 的勾勒所示,第二个元素(即 “垂直” 数组,即从 a21 到 a24 的所有内容)与所有后续内容(即从 a31 到 a34 的所有内容)应具有相同的初始值。第一个元素在初始值方面与第二个不同。

为该示例创建 ArrayValueSpecification 的基础是带两个实参的 CompositeRuleBasedValueSpecification 的定义:

  • 一个 ArrayValueSpecification,为 x 维上的第一个元素(它自身是数组)携带 ApplicationRuleBasedValueSpecification;且

  • 一个 ArrayValueSpecification,为 x 维上其余每个元素(它们自身是数组)携带 ApplicationRuleBasedValueSpecification。

<ARRAY-VALUE-SPECIFICATION>

<ELEMENTS>

<COMPOSITE-RULE-BASED-VALUE-SPECIFICATION>

<RULE> FILL_UNTIL_END </RULE>

<ARGUMENTS>

<ARRAY-VALUE-SPECIFICATION>

<ELEMENTS>

<APPLICATION-RULE-BASED-VALUE-SPECIFICATION>

<CATEGORY> ARRAY </CATEGORY>

<SW-VALUE-CONT>

<RULE-BASED-VALUES>

<RULE> FILL_UNTIL_END </RULE>

<ARGUMENTSS>

<RULE-ARGUMENTS>

<V> 2 </V>

<V> 1 </V>

<V> 0 </V>

</RULE-ARGUMENTS>

</ARGUMENTSS>

</RULE-BASED-VALUES>

</SW-VALUE-CONT>

</APPLICATION-RULE-BASED-VALUE-SPECIFICATION>

</ELEMENTS>

</ARRAY-VALUE-SPECIFICATION>

<ARRAY-VALUE-SPECIFICATION>

<ELEMENTS>

<APPLICATION-RULE-BASED-VALUE-SPECIFICATION>

<CATEGORY>

ARRAY

</CATEGORY>

<SW-VALUE-CONT>

<RULE-BASED-VALUES>

<RULE>

FILL_UNITL_END

<ARGUMENTSS>

<RULE-ARGUMENTS>

<V>

1

</V>

<V>

</V>

</RULE-ARGUMENTS>

</ARGUMENTSS>

</RULE-BASED-VALUES>

</SW-VALUE-CONT>

</APPLICATION-RULE-BASED-VALUE-SPECIFICATION>

</ELEMENTS>

</ARRAY-VALUE-SPECIFICATION>

</ARGUMENTS>

</COMPOSITE-RULE-BASED-VALUE-SPECIFICATION>

</ELEMENTS>

</ARRAY-VALUE-SPECIFICATION>

下一个示例为数组结构添加一个维度,即它描述一个三维数组,如图 B.29 所勾勒。

在这种情况下,x 轴再次与水平方向对齐,而 y 轴垂直绘制。z 轴最后再次水平。

</RULE>

该示例的主要结构类似于前一示例。

x 维中的第一个数组元素(包括从 a111 到 a143 的所有内容)定义了与其他元素不同的初始值。

请注意,x 方向上第二与第三元素的初始值相同。

<ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTS> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTS> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 3 </V> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 2 </V> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION>

<ELEMENTS>

<APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> </ARGUMENTS> </COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTS> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 1 </V> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 2 </V> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS>

</RULE-BASED-VALUES>

</SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <CATEGORY> ARRAY </CATEGORY> <SW-VALUE-CONT> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> </ARGUMENTS> </COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> </ARGUMENTS> </COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION>

B.3.10. 复合原始对象数组的基于规则的值规范

以下 CompositeRuleBasedValueSpecification 定义示例(另见第 5.6.9.2 节)的目的在于显示 “曲线数组” 如何借助 CompositeRuleBasedValueSpecification 初始化。

在开始 CompositeRuleBasedValueSpecification 的定义之前,必须定义曲线的结构。

因此,该示例从定义曲线输入值的数据类型开始,见清单 B.28。该数据类型用于清单 B.30 中实际曲线数据类型的定义。

<APPLICATION-PRIMITIVE-DATA-TYPE> <SHORT-NAME> axisInputType </SHORT-NAME> <CATEGORY> VALUE </CATEGORY> <SW-DATA-DEF-PROPS> <SW-DATA-DEF-PROPS-VARIANTS> <SW-DATA-DEF-PROPS-CONDITIONAL> <SW-CALIBRATION-ACCESS> READ-ONLY </SW-CALIBRATION-ACCESS>

</SW-DATA-DEF-PROPS-CONDITIONAL> </SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </APPLICATION-PRIMITIVE-DATA-TYPE>

下一步是定义插值结果的数据类型。这一部分勾勒于清单 B.29。该数据类型用于清单 B.30 中实际曲线数据类型的定义。

<APPLICATION-PRIMITIVE-DATA-TYPE>

<SHORT-NAME> curveType </SHORT-NAME>

<CATEGORY> VALUE </CATEGORY>

<SW-DATA-DEF-PROPS>

<SW-DATA-DEF-PROPS-VARIANTS>

<SW-DATA-DEF-PROPS-CONDITIONAL>

<SW-CALIBRATION-ACCESS> READ-ONLY </SW-CALIBRATION-ACCESS>

</SW-DATA-DEF-PROPS-CONDITIONAL>

</SW-DATA-DEF-PROPS-VARIANTS>

</SW-DATA-DEF-PROPS>

</APPLICATION-PRIMITIVE-DATA-TYPE>

最后,定义实际曲线的数据类型,见清单 B.30。

<APPLICATION-PRIMITIVE-DATA-TYPE>

<SHORT-NAME> MyTable </SHORT-NAME>

<CATEGORY> CURVE </CATEGORY>

<SW-DATA-DEF-PROPS>

<SW-DATA-DEF-PROPS-VARIANTS>

<SW-DATA-DEF-PROPS-CONDITIONAL>

<SW-CALIBRATION-ACCESS> READ-ONLY </SW-CALIBRATION-ACCESS>

<SW-CALPRM-AXIS-SET>

<SW-CALPRM-AXIS>

<SW-AXIS-INDEX> 1 </SW-AXIS-INDEX>

<CATEGORY> STD_AXIS </CATEGORY>

<SW-AXIS-INDIVIDUAL>

<INPUT-VARIABLE-TYPE-REF DEST= "APPLICATION-PRIMITIVE-DATA-

TYPE"> /ApplicationDataTypes/axisInputType</INPUT-VARIABLE-

TYPE-REF>

<SW-MAX-AXIS-POINTS> 10 </SW-MAX-AXIS-POINTS>

<SW-MIN-AXIS-POINTS> 0 </SW-MIN-AXIS-POINTS>

</SW-AXIS-INDIVIDUAL>

<SW-CALIBRATION-ACCESS> READ-ONLY </SW-CALIBRATION-ACCESS>

</SW-CALPRM-AXIS>

</SW-CALPRM-AXIS-SET>

<VALUE-AXIS-DATA-TYPE-REF DEST= "APPLICATION-PRIMITIVE-DATA-TYPE" > /

ApplicationDataTypes/curveType</VALUE-AXIS-DATA-TYPE-REF>

</SW-DATA-DEF-PROPS-CONDITIONAL>

</SW-DATA-DEF-PROPS-VARIANTS> </SW-DATA-DEF-PROPS> </APPLICATION-PRIMITIVE-DATA-TYPE>

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

如前所述,上述清单中定义的 category 为 CURVE 的 ApplicationPrimitiveDataType 可以用作 ApplicationArrayDataType 的元素数据类型(ApplicationArrayElement.type)。

这一数组数据类型的定义可以类似于清单 B.31 所含的勾勒。

  • <APPLICATION-ARRAY-DATA-TYPE><SHORT-NAME>MyCurveArrayType</SHORT-NAME><CATEGORY>ARRAY</CATEGORY><ELEMENT><SHORT-NAME>element</SHORT-NAME><CATEGORY>CURVE</CATEGORY><TYPE-TREF DEST="APPLICATION-PRIMITIVE-DATA-TYPE">/ApplicationDataTypes/MyTable</TYPE-TREF><ARRAY-SIZE-SEMANTICS>FIXED-SIZE</ARRAY-SIZE-SEMANTICS><MAX-NUMBER-OF-ELEMENTS>3</MAX-NUMBER-OF-ELEMENTS></ELEMENT>

  • </APPLICATION-ARRAY-DATA-TYPE>

在该示例中,意图是用 “哑” 元素填充数组,其中坐标轴点(由 swAxisCont 定义)定义为从 “1” 到 “10” 的序列,值数组(由 swValueCont 定义)整体设置为 “0”,如图 B.30 所勾勒。

由这样的 ApplicationArrayDataType 定义类型的 DataPrototype 的初始化勾勒于下面的清单 B.32:

<CONSTANT-SPECIFICATION> <SHORT-NAME> MyConst </SHORT-NAME> <VALUE-SPEC> <ARRAY-VALUE-SPECIFICATION> <ELEMENTS> <COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> <RULE> FILL_UNTIL_END </RULE> <COMPOUND-PRIMITIVE-ARGUMENTS>
<APPLICATION-RULE-BASED-VALUE-SPECIFICATION> <SW-AXIS-CONTS> <RULE-BASED-AXIS-CONT> <SW-ARRAYSIZE> <V> 10 </V> </SW-ARRAYSIZE> <SW-AXIS-INDEX> 1 </SW-AXIS-INDEX> <RULE-BASED-VALUES> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 1 </V> <V> 2 </V> <V> 3 </V> <V> 4 </V> <V> 5 </V> <V> 6 </V> <V> 7 </V> <V> 8 </V> <V> 9 </V> <V> 10 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </RULE-BASED-AXIS-CONT> </SW-AXIS-CONTS> <SW-VALUE-CONT> <SW-ARRAYSIZE> <V> 10 </V> </SW-ARRAYSIZE> <RULE-BASED-VALUES> <RULE> FILL_UNTIL_END </RULE> <ARGUMENTSS> <RULE-ARGUMENTS> <V> 0 </V> </RULE-ARGUMENTS> </ARGUMENTSS> </RULE-BASED-VALUES> </SW-VALUE-CONT> </APPLICATION-RULE-BASED-VALUE-SPECIFICATION> </COMPOUND-PRIMITIVE-ARGUMENTS> </COMPOSITE-RULE-BASED-VALUE-SPECIFICATION> </ELEMENTS> </ARRAY-VALUE-SPECIFICATION> </VALUE-SPEC> </CONSTANT-SPECIFICATION>

B.4. CompuMethod 示例

本节呈现 CompuMethod 定义的一些选定示例。CompuMethod 概念的解释见第 5.5.1 节。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

B.4.1. 表示枚举的 CompuMethod

以下示例例示如何使用 CompuMethod 的定义规定枚举(见第 5.2.4.1.2 节)。

<COMPU-METHOD>

<SHORT-NAME> boolean </SHORT-NAME> <CATEGORY> TEXTTABLE </CATEGORY> <COMPU-INTERNAL-TO-PHYS> <COMPU-SCALES> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 0 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 0 </UPPER-LIMIT> <COMPU-CONST> <VT> false </VT> </COMPU-CONST> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 1 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 1 </UPPER-LIMIT> <COMPU-CONST> <VT> true </VT> </COMPU-CONST> </COMPU-SCALE> </COMPU-SCALES> </COMPU-INTERNAL-TO-PHYS> </COMPU-METHOD>

B.4.2. 表示线性换算的 CompuMethod

以下示例例示如何借助 CompuMethod 的定义规定线性转换。

<COMPU-METHOD>

<SHORT-NAME> linear </SHORT-NAME> <CATEGORY> LINEAR </CATEGORY> <UNIT-REF DEST= "UNIT" > kmph </UNIT-REF> <COMPU-INTERNAL-TO-PHYS> <COMPU-SCALES> <COMPU-SCALE> <COMPU-RATIONAL-COEFFS> <COMPU-NUMERATOR> <V> 30 </V> <V> 2 </V> </COMPU-NUMERATOR> <COMPU-DENOMINATOR> <V> 1 </V> </COMPU-DENOMINATOR>

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

</COMPU-RATIONAL-COEFFS> </COMPU-SCALE> </COMPU-SCALES> </COMPU-INTERNAL-TO-PHYS> </COMPU-METHOD>

B.4.3. 表示带文本表的线性换算的 CompuMethod

以下示例例示如何借助 CompuMethod 的定义规定线性转换与文本表的组合。

<COMPU-METHOD> <SHORT-NAME> linearAndTexttable </SHORT-NAME> <CATEGORY> SCALE_LINEAR_AND_TEXTTABLE </CATEGORY> <UNIT-REF DEST= "UNIT" > kmph </UNIT-REF> <COMPU-INTERNAL-TO-PHYS> <COMPU-SCALES> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 0 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 300 </UPPER-LIMIT> <COMPU-RATIONAL-COEFFS> <COMPU-NUMERATOR> <V> 30 </V> <V> 2 </V> </COMPU-NUMERATOR> <COMPU-DENOMINATOR> <V> 1 </V> </COMPU-DENOMINATOR> </COMPU-RATIONAL-COEFFS> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 350 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 350 </UPPER-LIMIT> <COMPU-CONST> <VT> SensorError </VT> </COMPU-CONST> </COMPU-SCALE> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > 351 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "CLOSED" > 351 </UPPER-LIMIT> <COMPU-CONST> <VT> SignalNotAvailable </VT> </COMPU-CONST> </COMPU-SCALE> </COMPU-SCALES> </COMPU-INTERNAL-TO-PHYS> </COMPU-METHOD>

B.4.4. 由有理函数规定的换算

如 [TPS_SWCT_01283] 所指示,有理函数的语义描述为:

以下示例例示下面呈现的具体倒数转换:

<COMPU-METHOD> <SHORT-NAME> rational </SHORT-NAME> <CATEGORY> RAT_FUNC </CATEGORY> <UNIT-REF DEST= "UNIT" > Kelvin </UNIT-REF> <COMPU-PHYS-TO-INTERNAL> <COMPU-SCALES> <COMPU-SCALE> <LOWER-LIMIT INTERVAL-TYPE= "CLOSED" > -29 </LOWER-LIMIT> <UPPER-LIMIT INTERVAL-TYPE= "OPEN" > INF </UPPER-LIMIT> <COMPU-RATIONAL-COEFFS> <COMPU-NUMERATOR> <V> 1000 </V> </COMPU-NUMERATOR> <COMPU-DENOMINATOR> <V> 60 </V> <V> 2 </V> </COMPU-DENOMINATOR> </COMPU-RATIONAL-COEFFS> </COMPU-SCALE> </COMPU-SCALES> </COMPU-PHYS-TO-INTERNAL> </COMPU-METHOD>

CompuMethod

B.4.5. 表示 BITFIELD_TEXTTABLE 的 CompuMethod

以下场景例示属性 category 设置为 BITFIELD_TEXTTABLE 的 CompuMethod 的定义。该示例演示了如何把独立但语义相关的信息编码到属性 category 设置为 VALUE 的 AutosarDataType 的各个位中。

可用位范围各部分中信息的编码与语义总结于表 B.2。

| Bit | Semantics |

| Bit 0 | front left | | Bit 1 | front right | | Bit 2 | rear left | | Bit 3 | rear right | | Bit 4-5 | problem | | Bit 6 | validity |

因此,信息的布局定义为图 B.31 所描绘:

正如位布局文档所示例,并不要求使用所有可用位。

这意味着在同一对象中,关于轮胎选择、问题与有效性的信息是独立编码的,因此必须独立检索。

1 if (validity_valid == (tire_status & validity_BflMask)) && ( problem_flat_tire == (tire_status & problem_BflMask)) && ( rearRight_yes == (tire_status & rearRight_BflMask)) { 2 /* 处理右后轮胎爆胎的情况 */ 3 }

该 CompuMethod 的模型勾勒于清单 B.38。请注意,尽管从技术上讲(见 [TPS_SWCT_01431])只有以下之一

  • symbol;

  • vt;

  • shortLabel,

(三者之一)是派生 CompuScale 的 C 符号所必需的,该示例同时定义了 symbol 与 shortLabel,因为这些模型元素的提供便于(见 [SWS_Rte_07410]、[SWS_Rte_07411]、[SWS_Rte_07412])生成访问信息的宏。

请注意,由于示例 CompuMethod 定义了连续且不重叠的位掩码,因此完全可能把该 CompuMethod 转换为 A2L。

<COMPU-METHOD> <SHORT-NAME> Texttable </SHORT-NAME> <CATEGORY> BITFIELD_TEXTTABLE </CATEGORY> <COMPU-INTERNAL-TO-PHYS> <COMPU-SCALES> <! --FRONT LEFT --> <COMPU-SCALE> <SHORT-LABEL> frontLeft </SHORT-LABEL> <SYMBOL> frontLeft_no </SYMBOL> <MASK> 0b00000001 </MASK> <LOWER-LIMIT> 0b00000000 </LOWER-LIMIT> <UPPER-LIMIT> 0b00000000 </UPPER-LIMIT> </COMPU-SCALE> <COMPU-SCALE> <SHORT-LABEL> frontLeft </SHORT-LABEL> <SYMBOL> frontLeft_yes </SYMBOL> <MASK> 0b00000001 </MASK> <LOWER-LIMIT> 0b00000001 </LOWER-LIMIT> <UPPER-LIMIT> 0b00000001 </UPPER-LIMIT> </COMPU-SCALE> <! --FRONT RIGHT --> <COMPU-SCALE> <SHORT-LABEL> frontRight </SHORT-LABEL> <SYMBOL> frontRight_no </SYMBOL> <MASK> 0b00000010 </MASK> <LOWER-LIMIT> 0b00000000 </LOWER-LIMIT> <UPPER-LIMIT> 0b00000000 </UPPER-LIMIT> </COMPU-SCALE> <COMPU-SCALE> <SHORT-LABEL> frontRight </SHORT-LABEL> <SYMBOL> frontRight_yes </SYMBOL> <MASK> 0b00000010 </MASK> <LOWER-LIMIT> 0b00000010 </LOWER-LIMIT> <UPPER-LIMIT> 0b00000010 </UPPER-LIMIT> </COMPU-SCALE> <! --REAR LEFT --> <COMPU-SCALE> <SHORT-LABEL> rearLeft </SHORT-LABEL> <SYMBOL> rearLeft_no </SYMBOL> <MASK> 0b00000100 </MASK> <LOWER-LIMIT> 0b00000000 </LOWER-LIMIT> <UPPER-LIMIT> 0b00000000 </UPPER-LIMIT> </COMPU-SCALE> <COMPU-SCALE> <SHORT-LABEL> rearLeft </SHORT-LABEL> <SYMBOL> rearLeft_yes </SYMBOL> <MASK> 0b00000100 </MASK> <LOWER-LIMIT> 0b00000100 </LOWER-LIMIT>

<UPPER-LIMIT>0b00000100</UPPER-LIMIT>

  • </COMPU-SCALE>

  • <!--REAR RIGHT-->

  • <COMPU-SCALE>

  • <SHORT-LABEL>rearRight</SHORT-LABEL>

  • <SYMBOL>rearRight_no</SYMBOL>

  • <MASK>0b00001000</MASK>

  • <LOWER-LIMIT>0b00000000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00000000</UPPER-LIMIT>

</COMPU-SCALE>

<COMPU-SCALE>

  • <SHORT-LABEL>rearRight</SHORT-LABEL>

  • <SYMBOL>rearRight_yes</SYMBOL>

  • <MASK>0b0001000</MASK>

  • <LOWER-LIMIT>0b00001000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00001000</UPPER-LIMIT>

</COMPU-SCALE>

  • <!--PROBLEM-->

<COMPU-SCALE>

  • <SHORT-LABEL>problem</SHORT-LABEL>

  • <SYMBOL>problem_flat_tire</SYMBOL>

  • <MASK>0b00110000</MASK>

  • <LOWER-LIMIT>0b00000000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00000000</UPPER-LIMIT>

</COMPU-SCALE>

<COMPU-SCALE>

  • <SHORT-LABEL>problem</SHORT-LABEL>

  • <SYMBOL>problem_low_pressure</SYMBOL>

  • <MASK>0b00110000</MASK>

  • <LOWER-LIMIT>0b00010000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00010000</UPPER-LIMIT>

</COMPU-SCALE>

<COMPU-SCALE>

  • <SHORT-LABEL>problem</SHORT-LABEL>

  • <SYMBOL>problem_unbalanced</SYMBOL>

  • <MASK>0b00110000</MASK>

  • <LOWER-LIMIT>0b00100000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00100000</UPPER-LIMIT>

</COMPU-SCALE>

<COMPU-SCALE>

  • <SHORT-LABEL>problem</SHORT-LABEL>

  • <SYMBOL>problem_unknown</SYMBOL>

  • <MASK>0b00110000</MASK>

  • <LOWER-LIMIT>0b00110000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00110000</UPPER-LIMIT>

</COMPU-SCALE>

  • <!--VALIDITY-->

<COMPU-SCALE>

  • <SHORT-LABEL>validity</SHORT-LABEL>

  • <SYMBOL>validity_valid</SYMBOL>

  • <MASK>0b01000000</MASK>

  • <LOWER-LIMIT>0b00000000</LOWER-LIMIT>

  • <UPPER-LIMIT>0b00000000</UPPER-LIMIT>

  • </COMPU-SCALE>

  • <COMPU-SCALE>

  • <SHORT-LABEL>validity</SHORT-LABEL>

<SYMBOL> validity_invalid </SYMBOL> <MASK> 0b01000000 </MASK> <LOWER-LIMIT> 0b01000000 </LOWER-LIMIT> <UPPER-LIMIT> 0b01000000 </UPPER-LIMIT> </COMPU-SCALE> </COMPU-SCALES> </COMPU-INTERNAL-TO-PHYS> </COMPU-METHOD>

B.5. 兼容性示例

本节提供一些可以解释第 6 章定义的 PortPrototype 兼容性的示例。

B.5.1. 组装层级的兼容性

借助 AssemblySwConnector 连接 dataElement 的兼容性规则也许比委托情形更容易理解,但提供一组例示兼容性问题的示例似乎仍是恰当的。

B.5.1.1. 合法使用

这类例子中不那么平凡的一个是 sender/receiver n:1 通信的情况。图 B.32 勾勒了一个案例:两个发送方软件组件都提供接收软件组件的 RPortPrototype 所需的完整 dataElement 集合。

下一个案例(图 B.33 例示)实现了一种情况:一个发送方提供两个 dataElement {A, B},而另一个发送方只提供其中的子集,即 {B}。

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

由于接收软件组件的 RPortPrototype 只要求 dataElement {B},因此不会出现兼容性问题,因为每个所需的 dataElement 都有兼容的 dataElement 提供。

B.5.1.2. 非法使用

sender/receiver 通信非法配置的一个可能示例是图 B.34 勾勒的场景。尽管发送方软件组件总体上提供了所需 dataElement 集合,但各个 AssemblySwConnector 在发送方与接收方之间建立了不兼容的连接。

B.5.2. 委托层级的兼容性

关于 dataElement 委托的兼容性规则也许需要用示例来解释。第一个示例 B.35 描述了一种合法情况:两个 DelegationSwConnector 拆分 CompositionSwComponentType 拥有的 RPortPrototype 所含的 dataElement。

B.5.2.1. 合法使用

这些示例解释了 DelegationSwConnector 在不同配置与不同 DelegatedPortAnnotation 值下的用法。请注意,

DelegatedPortAnnotation 通常在 CompositionSwComponentType 的内部结构被完全澄清之前定义。

在稍后的时点它必须保持一致或可以被移除。用适用的 DelegatedPortAnnotation 值来装饰示例应有助于理解 DelegatedPortAnnotation 的含义。

所有所需的 dataElement 都由附加到委托 RPortPrototype 的 DelegationSwConnector 提供。dataElement D 未被传送到 SwComponentPrototype 拥有的任何 RPortPrototype 这一事实对兼容性没有任何影响。

换言之:CompositionSwComponentType 处的 RPortPrototype 实际上包含 dataElement 的超集 {A, B, C, D}。SwComponentPrototype 的两个所需内部 PortPrototype 包含 VariableDataPrototype 的子集 {A, B} 与 {B, C}。在这种情况下,B 在 VFB 上产生的通信模式将是 1:n。

这要求把 DelegatedPortAnnotation 的属性 signalFan 的值设置为值 nfold。

在下一个示例中,CompositionSwComponentType 的 RPortPrototype 包含 dataElement 的超集 {A, B}。SwComponentPrototype 的两个 RPortPrototype 包含不同的子集,即 {A} 与 {B}。

在这种情况下,VFB 上产生的通信模式将是 n:1。在这种情况下,DelegatedPortAnnotation 的属性 signalFan 的值应设置为 single。

下一个示例是关于 DelegationSwConnector 的合并。CompositionSwComponentType 拥有的 PPortPrototype 包含 dataElement 的超集 {A, B}。SwComponentPrototype 的两个 PPortPrototype 各包含一个不相交的子集,即 {A} 与 {B}。

在这种情况下,VFB 上产生的通信模式将是 1:x,x 取 0 到 n 之间的值。在这种情况下,DelegatedPortAnnotation 的属性 signalFan 的值应设置为 single。所提供外部 PortPrototype 的所有 VariableDataPrototype 都恰好由一个所提供内部 PortPrototype 提供。

作为该主题的变体,下一个示例展示 CompositionSwComponentType 拥有的、包含 dataElement 超集 {A, B, C} 的 PPortPrototype。

SwComponentPrototype 的 PPortPrototype 又包含 dataElement 的子集,即 {A, B} 与 {B, C}。在这种情况下,{B} 在 VFB 上产生的通信模式将是 n:1。

这要求把 DelegatedPortAnnotation 的属性 signalFan 的值设置为 nfold。委托 PPortPrototype 的所有 dataElement 都由 SwComponentPrototype 的至少一个 PPortPrototype 提供。因此,第 6.14 章定义的完全委托标准得到满足。

下一个示例看起来非常相似。不过,细微的差别是第二个 SwComponentPrototype 提供的 dataElement 是 {C, D} 而不是 {B, C}。

尽管 dataElement {D} 未出现在委托 PPortPrototype 中,兼容性规则在该场景下得到完全满足。

下一个示例展示了经由 CompositionSwComponentType 端到端到达所含 SwComponentPrototype 的有效 SwConnector 委托。

B.5.2.2. 非法使用

非法拆分 dataElement 用法的第一个示例的毛病在于:SwComponentPrototype 的 RPortPrototype 拥有的并非所有 dataElement 都能从 CompositionSwComponentType 拥有的已连接 RPortPrototype 获得。

尽管(就连接总体而言)dataElement 匹配({A} 与 {B} 连接到要求 {A, B} 的 PortPrototype),但兼容性规则未得到满足,因为它们对每个 SwConnector 分别适用

在下一个示例中,兼容性同样未得到满足,因为所需的 dataElement {E} 未由委托 RPortPrototype 提供。

DelegationSwConnector 的不兼容合并勾勒于图 B.43。在这种情况下,dataElement {E} 未由 CompositionSwComponentType 内部 SwComponentPrototype 拥有的某个 PPortPrototype 提供。

下一个示例展示了经由 CompositionSwComponentType 端到端到达所含 SwComponentPrototype 的无效 SwConnector 委托。

与图 B.43 勾勒的示例类似,dataElement {E} 未由 CompositionSwComponentType 内部 SwComponentPrototype 拥有的某个 PPortPrototype 提供。

B.5.3. 连接到 NvBlockComponent 的软件组件

B.5.3.1. 按 constr_1417 的无效连接

以下示例描绘了按 [constr_1417] 被视为非法的场景。

B.5.3.2. 按 constr_1418 的无效连接

以下示例描绘了按 [constr_1418] 被视为非法的场景。

B.6. 快速原型示例

B.6.1. 快速原型场景的定义

本节包含第 14 章记录的快速原型场景建模示例。

以下(简化的)清单 B.39 勾勒了元类 IdentCaption 的用法,目的是有效地允许对 ModeAccessPoint 的引用。

<AR-PACKAGE> <SHORT-NAME> IC_Example </SHORT-NAME> <ELEMENTS> <APPLICATION-SW-COMPONENT-TYPE> <SHORT-NAME> ASCT </SHORT-NAME> <INTERNAL-BEHAVIORS> <SWC-INTERNAL-BEHAVIOR> <SHORT-NAME> IB </SHORT-NAME> <RUNNABLES> <RUNNABLE-ENTITY> <SHORT-NAME> RE </SHORT-NAME> <MODE-ACCESS-POINTS> <MODE-ACCESS-POINT> <IDENT> <SHORT-NAME> ident </SHORT-NAME> </IDENT> </MODE-ACCESS-POINT> </MODE-ACCESS-POINTS> </RUNNABLE-ENTITY> </RUNNABLES> </SWC-INTERNAL-BEHAVIOR> </INTERNAL-BEHAVIORS> </APPLICATION-SW-COMPONENT-TYPE> <COMPOSITION-SW-COMPONENT-TYPE> <SHORT-NAME> CSCT </SHORT-NAME> <COMPONENTS> <SW-COMPONENT-PROTOTYPE>

<SHORT-NAME>

<TYPE-TREF

SCP

</SHORT-NAME>

DEST=

"APPLICATION-SW-COMPONENT-TYPE"

ASCT

</TYPE-TREF>

</SW-COMPONENT-PROTOTYPE>

</COMPONENTS>

</COMPOSITION-SW-COMPONENT-TYPE>

<RAPID-PROTOTYPING-SCENARIO>

<SHORT-NAME>

rptScenario

<RPT-CONTAINERS>

<RPT-CONTAINER>

<SHORT-NAME>

rptContainer

<BY-PASS-POINT-IREFS>

<BY-PASS-POINT-IREF>

<CONTEXT-ELEMENT-REF DEST=

"SW-COMPONENT-PROTOTYPE"

/IC_Example/

/

IC_Example/CSCT/SCP</CONTEXT-ELEMENT-REF>

<TARGET-REF DEST= "MODE-ACCESS-POINT-IDENT" > /IC_Example/ASCT

/IB/RE/ident

</TARGET-REF>

</BY-PASS-POINT-IREF> </BY-PASS-POINT-IREFS> </RPT-CONTAINER> </RPT-CONTAINERS> </RAPID-PROTOTYPING-SCENARIO> </ELEMENTS> </AR-PACKAGE>

</SHORT-NAME>

</SHORT-NAME>

C. 支持的特定用例

C.1. SoftwareComponent 与复杂驱动程序之间的非对称数据变换

C.1.1. 概述

在该场景中,由 ApplicationSwComponentType 定义类型的 SwComponentPrototype 需要与由 ComplexDeviceDriverSwComponentType 定义类型的 SwComponentPrototype 通信。

通信本身的特殊之处在于:它在 ApplicationSwComponentType 一侧终止于任意结构化的数据类型,在 ComplexDeviceDriverSwComponentType 一侧终止于扁平字节数组。

通信本身具有 client-server 性质,其中 ApplicationSwComponentType 主要充当客户端,而 ComplexDeviceDriverSwComponentType 充当服务器。

作为这一设置的结果,结构化数据类型必须以某种方式为调用序列化为扁平字节数组,并且在返回 out 与 inout 实参以及返回值时从扁平字节数组转换回结构数据类型。

为论证该用例的合理性,假定 ComplexDeviceDriverSwComponentType 实现了一个需要与 “AUTOSAR 世界” 交互的自定义通信协议的端点。

这也是服务器实现以扁平字节数组为实参的 ClientServerOperation 的原因。服务器(在此为 ComplexDeviceDriverSwComponentType)本身对数据完全不可知,它只表示必须能够处理任何给定数据结构的端点。

这意味着如果 ApplicationSwComponentType 一侧的数据结构发生任何变化,ComplexDeviceDriverSwComponentType 不必更新与重新部署。

另一方面,对 ApplicationSwComponentType 而言,把相应数据结构也建模为扁平字节数组没有什么动机。通常,相应数据来自内部处理与与其他软件组件通信的混合。

换言之,在 ApplicationSwComponentType 一侧使用扁平字节数组将意味着序列化反正必须完成,可能在 ApplicationSwComponentType 自身的实现内部。

具体地说,从(结构化)数据类型到扁平字节数组及反向的转换需要由一段软件实现,该软件通常按照数据类型的结构生成。不过,这段软件非常专用,只适用于相应的数据类型。

AUTOSAR 中数据序列化的一种方法是数据变换的通用概念,在本场景的特定情况下,需要一个对复杂数据结构做深度优先序列化的数据变换器。

这一方法在 AUTOSAR 中已由所谓 SOME/IP 变换器 [52] 支持。

这一既有概念可以借用来实现本章描述的场景,尽管需要一些定制。例如,SOME/IP 变换器生成的 SOME/IP 特定协议头部对本场景显然无关。

C.1.2. 建模方面

该用例的建模应沿图 C.1 勾勒的简单示例解释:

  • 必须定义两个单独的 ClientServerOperationMapping。

  • 其中之一(本例中为 CSOM1)应引用一个 DataTransformation,其属性 dataTransformationKind 设置为值 DataTransformationKindEnum.asymmetricToByteArray。

  • 另一个(本例中为 CSOM2)应引用一个 DataTransformation,其属性 dataTransformationKind 设置为值 DataTransformationKindEnum.asymmetricFromByteArray。

  • CSOM1 应在角色 firstOperation 中引用(ApplicationSwComponentType 一端的)ClientServerOperation Op1。

  • CSOM1 应在角色 secondOperation 中引用(ComplexDeviceDriverSwComponentType 一端的)ClientServerOperation Op2。

  • CSOM2 应在角色 secondOperation 中引用(ApplicationSwComponentType 一端的)ClientServerOperation Op1。

  • CSOM2 应在角色 firstOperation 中引用(ComplexDeviceDriverSwComponentType 一端的)ClientServerOperation Op2。

  • CSOM1 应在角色 argumentMapping 中聚合两个 DataPrototypeMapping:

  • 第一个 DataPrototypeMapping 应(在角色 firstDataPrototype 中)引用 ClientServerOperation OP1 的名为 In1 的 ArgumentDataPrototype,并(在角色 secondDataPrototype 中)引用 ClientServerOperation OP2 的名为 In 的 ArgumentDataPrototype。

  • 第二个 DataPrototypeMapping 应(在角色 firstDataPrototype 中)引用

ClientServerOperation OP1 的名为 In2 的 ArgumentDataPrototype,并(在角色 secondDataPrototype 中)引用 ClientServerOperation OP2 的名为 In 的 ArgumentDataPrototype。

  • CSOM2 应在角色 argumentMapping 中聚合两个 DataPrototypeMapping:

  • 第一个 DataPrototypeMapping 应(在角色 firstDataPrototype 中)引用 ClientServerOperation OP1 的名为 Out1 的 ArgumentDataPrototype,并(在角色 secondDataPrototype 中)引用 ClientServerOperation OP2 的名为 Out 的 ArgumentDataPrototype。

  • 第二个 DataPrototypeMapping 应(在角色 firstDataPrototype 中)引用 ClientServerOperation OP1 的名为 Out2 的 ArgumentDataPrototype,并(在角色 secondDataPrototype 中)引用 ClientServerOperation OP2 的名为 Out 的 ArgumentDataPrototype。

请注意,在图 C.1 中,出于简化的原因,从 DataPrototypeMapping 出发的引用的角色名被排除在图之外。

D. InstanceRef 的建模

D.1. 简介

所谓 InstanceRef 的存在是 AUTOSAR 内建模使用类型-原型模式的直接结果。当引用一个原型时,还有必要包含对其相应类型所定义类型的原型的引用——这些类型又聚合更多原型以建立上下文。

换言之,InstanceRef 表示结构化的引用:一方面由对上下文原型的引用组成(由 atpContextElement 的子集化或重定义指示),最后是对适用目标原型的引用(由 atpTarget 的重定义指示)。

注意,在特定 InstanceRef 的建模中存在多于一个上下文并不罕见。

对规范读者而言,InstanceRef 的建模表现为从一个元类到另一个元类的、构造型为 <instanceRef> 的 UML 依赖。这是简化的指示:依赖的源实现了到依赖目标处元类的 InstanceRef。

同样,在大多数情况下,这就是读者理解建模所需的全部内容。InstanceRef 的形式化建模通过创建抽象元类 AtpInstanceRef 的子类完成。

在本文档特定章节的上下文中建议对建模有更详细理解的地方,AtpInstanceRef 特定子类的建模直接在相应章节的上下文中解释。

在所有其他情况下,对 AtpInstanceRef 特定子类建模的更深入理解可以从阅读本章获得。

本章所含的类表并未完全填满,因为类表内部的大多数备注缺失。这些类表的首要目的是提供关于 InstanceRef 在 M1 AUTOSAR 模型中序列化的预期顺序的信息。

特别是,关于序列化 M1 模型中顺序的信息可以从 InstanceRef 元类每个属性的 xml.sequenceOffset 标签值获得。

关于建模 AtpInstanceRef 一般概念的更多信息(例如从 AtpInstanceRef 子类到其他元类的关联的重定义或子集化的概念背景),请参阅 [11]。

D.2. 建模

D.2.1. 组件与组合

表D.1:VariableInAtomicSwcInstanceRef(VariableInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 子类 | RVariableInAtomicSwcInstanceRef |

属性 类型 多重性 种类 备注
abstractTarget DataElement VariableDataPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=30
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextPort PortPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=20

请注意上下文关联重定义如何工作的示例:即从 VariableInAtomicSwcInstanceRef 到角色 contextPort 中 PortPrototype 的关联,由子类 RVariableInAtomicSwcInstanceRef 借助到角色 contextRPort 中 RPortPrototype 的关联重定义。

这一建模的效果是:到 PortPrototype 的一般关系已由 VariableInAtomicSwcInstanceRef 在抽象层级建立,但实际上它从未进入生成的 XML Schema,因为它被子类重定义。换言之,就 XML Schema 的生成算法而言,重定义取代了原始关联。

为澄清起见,xml.sequenceOffset 值在这一特定情况下的解释是:在生成的 XML Schema 中 contextRPort 排在前面,随后是 targetDataElement,后者结束了 XML Schema 中该 InstanceRef 的定义。

表D.2:RVariableInAtomicSwcInstanceRef(RVariableInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , VariableInAtomicSwcInstanceRef | | 聚合于 | DataReceivedEvent.data, DataReceiveErrorEvent.data |

属性 类型 多重性 种类 备注
contextRPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetData Element VariableDataPrototype 0..1 ref Tags: xml.sequenceOffset=30

表D.3:RModeInAtomicSwcInstanceRef(RModeInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | RTEEvent .disabledMode, SwcModeSwitchEvent.mode |

属性 类型 多重性 种类 备注
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextMode Declaration GroupPrototype ModeDeclarationGroup Prototype 0..1 ref Tags: xml.sequenceOffset=30
contextPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetMode Declaration ModeDeclaration 0..1 ref Tags: xml.sequenceOffset=40

表D.4:InnerPortGroupInCompositionInstanceRef(InnerPortGroupInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | PortGroup.innerGroup |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
context (ordered) SwComponent Prototype * ref Tags: xml.sequenceOffset=20
target PortGroup 0..1 ref Links a PortGroup in a composition to another PortGroup, that is defined in a component which is part of this CompositionSwComponentType. There shall be at most one innerGroup per contained SwComponentPrototype. Tags: xml.sequenceOffset=30

表D.5:TriggerInAtomicSwcInstanceRef(TriggerInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 子类 | PTriggerInAtomicSwcTypeInstanceRef, RTriggerInAtomicSwcInstanceRef |

属性 类型 多重性 种类 备注
Class TriggerInAtomicSwcInstanceRef (abstract)
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextPort PortPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=20
target Trigger 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=30

表D.6:RTriggerInAtomicSwcInstanceRef(RTriggerInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , TriggerInAtomicSwcInstanceRef | | 聚合于 | ExternalTriggerOccurredEvent.trigger, TransformerHardErrorEvent.requiredTrigger |

属性 类型 多重性 种类 备注
contextRPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetTrigger Trigger 0..1 ref Tags: xml.sequenceOffset=30

表D.7:PTriggerInAtomicSwcTypeInstanceRef(PTriggerInAtomicSwcTypeInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , TriggerInAtomicSwcInstanceRef | | 聚合于 | ExternalTriggeringPoint.trigger, SwcBswSynchronizedTrigger.swcTrigger |

属性 类型 多重性 种类 备注
contextPPort AbstractProvidedPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetTrigger Trigger 0..1 ref Tags: xml.sequenceOffset=30

表D.8:OperationInAtomicSwcInstanceRef(OperationInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 子类 | POperationInAtomicSwcInstanceRef, ROperationInAtomicSwcInstanceRef |

属性 类型 多重性 种类 备注
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextPort PortPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=20
targetOperation ClientServerOperation 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=30

表D.9:ROperationInAtomicSwcInstanceRef(ROperationInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , OperationInAtomicSwcInstanceRef | | 聚合于 | ServerCallPoint .operation |

属性 类型 多重性 种类 备注
contextRPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetRequired Operation ClientServerOperation 0..1 ref Tags: xml.sequenceOffset=30

表D.10:POperationInAtomicSwcInstanceRef(POperationInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , OperationInAtomicSwcInstanceRef | | 聚合于 | OperationInvokedEvent.operation, TransformerHardErrorEvent.operation |

属性 类型 多重性 种类 备注
contextPPort AbstractProvidedPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetProvided Operation ClientServerOperation 0..1 ref Tags: xml.sequenceOffset=30

表D.11:RModeGroupInAtomicSWCInstanceRef(RModeGroupInAtomicSWCInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , ModeGroupInAtomicSwcInstanceRef | | 聚合于 | ModeAccessPoint.modeGroup |

属性 类型 多重性 种类 备注
contextRPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetMode Group ModeDeclarationGroup Prototype 0..1 ref Tags: xml.sequenceOffset=30

表D.12:PModeGroupInAtomicSwcInstanceRef(PModeGroupInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , ModeGroupInAtomicSwcInstanceRef | | 聚合于 | ModeAccessPoint.modeGroup, ModeSwitchPoint.modeGroup, SwcBswSynchronizedModeGroup Prototype.swcModeGroup, SwcModeManagerErrorEvent.modeGroup |

属性 类型 多重性 种类 备注
contextPPort AbstractProvidedPort Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetMode Group ModeDeclarationGroup Prototype 0..1 ref Tags: xml.sequenceOffset=30

表D.13:ComponentInCompositionInstanceRef(ComponentInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition::InstanceRefs | | 说明 | The ComponentInCompositionInstanceRef points to a concrete SwComponentPrototype within a CompositionSwComponentType. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | DiagnosticJ1939SwMapping.swComponentPrototype, EOCEventRef.component, EOCExecutableEntity Ref.component, ExecutionTimeConstraint.component, TDEventSwc .component, TDEventVfb . component |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
context Component (ordered) SwComponent Prototype * ref The context for the scope of this timing event. Tags: xml.sequenceOffset=20
target Component SwComponent Prototype 0..1 ref Tags: xml.sequenceOffset=30

表D.14:PortInCompositionTypeInstanceRef(PortInCompositionTypeInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 子类 | PPortInCompositionInstanceRef, RPortInCompositionInstanceRef | | 聚合于 | DelegationSwConnector.innerPort | | 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , PortInCompositionTypeInstanceRef | | 聚合于 | AssemblySwConnector.provider, DelegationSwConnector.innerPort |

属性 类型 多重性 种类 备注
abstractContext Component SwComponent Prototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=20
base CompositionSw ComponentType 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
targetPort PortPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=30
Class PPortInCompositionInstanceRef
context Component SwComponent Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetPPort AbstractProvidedPort Prototype 0..1 ref Tags: xml.sequenceOffset=30

表D.15:RPortInCompositionInstanceRef(RPortInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef , PortInCompositionTypeInstanceRef | | 聚合于 | AssemblySwConnector.requester, DelegationSwConnector.innerPort, SecurityEventReportToSecurity EventDefinitionMapping.reportedSecurityEvent |

属性 类型 多重性 种类 备注
context Component SwComponent Prototype 0..1 ref Tags: xml.sequenceOffset=20
targetRPort AbstractRequiredPort Prototype 0..1 ref Tags: xml.sequenceOffset=30

表D.16:ApplicationCompositeElementInPortInterfaceInstanceRef(ApplicationCompositeElementInPortInterfaceInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::PortInterface::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | ApplicationCompositeDataTypeSubElementRef.applicationCompositeElement, CompositeNetwork Representation.leafElement |

属性 类型 多重性 种类 备注
base DataInterface 0..1 ref This represents the SenderReceiverInterface that acts as the base in this InstanceRef definition Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextData Prototype (ordered) ApplicationComposite ElementDataPrototype * ref This represents a context ApplicationCompositeData Prototype Tags: xml.sequenceOffset=20
Class ApplicationCompositeElementInPortInterfaceInstanceRef
rootData Prototype AutosarDataPrototype 0..1 ref This refers to the dataPrototype which is typed by the ApplicationDatatype in which which the target can be found. Tags: xml.sequenceOffset=15
targetData Prototype ApplicationComposite ElementDataPrototype 0..1 ref This represents the referenced ApplicationComposite DataPrototype. Tags: xml.sequenceOffset=30

表D.17:VariableInAtomicSWCTypeInstanceRef(VariableInAtomicSWCTypeInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::SwcInternalBehavior::DataElements::InstanceRefs Usage | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | AutosarVariableRef.autosarVariable |

属性 类型 多重性 种类 备注
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextData Prototype (ordered) ApplicationComposite ElementDataPrototype * ref This is the context in a compositeDataType. Tags: xml.sequenceOffset=40
portPrototype PortPrototype 0..1 ref This is the port providing the parameter or the entry point to the parameter structure. Tags: xml.sequenceOffset=20
rootVariable DataPrototype VariableDataPrototype 0..1 ref Tags: xml.sequenceOffset=30

表D.18:VariableInAtomicSWCTypeInstanceRef(VariableInAtomicSWCTypeInstanceRef)

属性 类型 多重性 种类 备注
targetData Prototype DataPrototype 0..1 ref This is the target of the instance ref. Note that it shall be one of ApplicationCompositeElementDataPrototype of VariableDataPrototype. Tags: xml.sequenceOffset=50

D.2.2. 隐式通信行为的定义

表D.19:InnerDataPrototypeGroupInCompositionInstanceRef(InnerDataPrototypeGroupInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior::InstanceRef | | 说明 | This meta-class represents the ability to define an InstanceRef to a nested DataPrototypeGroup | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | DataPrototypeGroup.dataPrototypeGroup |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref This represents the base of the instanceRef. Stereotypes: atpDerived Tags: xml.sequenceOffset=10

表D.20:InnerDataPrototypeGroupInCompositionInstanceRef(InnerDataPrototypeGroupInCompositionInstanceRef)

属性 类型 多重性 种类 备注
contextSw Component Prototype (ordered) SwComponent Prototype * ref This represents the nested structure of SwComponent Prototypes. Tags: xml.sequenceOffset=20
targetData PrototypeGroup DataPrototypeGroup 0..1 ref This represents the target of the InstanceRef Tags: xml.sequenceOffset=30

表D.21:InnerRunnableEntityGroupInCompositionInstanceRef(InnerRunnableEntityGroupInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior::InstanceRef | | 说明 | This meta-class represents the ability to define an InstanceRef to a nested RunnableEntityGroup. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | RunnableEntityGroup.runnableEntityGroup |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref This represents the base of the InstanceRef. Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextSw Component Prototype (ordered) SwComponent Prototype * ref This represents the nested structure of SwComponent Prototypes. Tags: xml.sequenceOffset=20
targetRunnable EntityGroup RunnableEntityGroup 1 ref This represents the target association of the InstanceRef. Tags: xml.sequenceOffset=30

表D.22:RunnableEntityInCompositionInstanceRef(RunnableEntityInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior::InstanceRef | | 说明 | This meta-class represents the ability to define an InstanceRef to a RunnableEntity in the context of a CompositionSwComponentType. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | RunnableEntityGroup.runnableEntity |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref This represents the base of the InstanceRef. Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextSw Component Prototype (ordered) SwComponent Prototype * ref This represents the nested structure of SwComponent Prototypes. Tags: xml.sequenceOffset=20
targetRunnable Entity RunnableEntity 0..1 ref This represents the target RunnableEntity. Tags: xml.sequenceOffset=30

表D.23:VariableDataPrototypeInCompositionInstanceRef(VariableDataPrototypeInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::ImplicitCommunicationBehavior::InstanceRef | | 说明 | This meta-class represents the ability to define an InstanceRef to a VariableDataPrototype in the context of a CompositionSwComponentType. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | DataPrototypeGroup.implicitDataAccess |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref This represents the base of the InstanceRef. Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextPort Prototype PortPrototype 0..1 ref This represents a reference to a context PortPrototype. Tags: xml.sequenceOffset=30
contextSw Component Prototype (ordered) SwComponent Prototype * ref This represents the nested structure of SwComponent Prototypes. Tags: xml.sequenceOffset=20
targetVariable DataPrototype VariableDataPrototype 0..1 ref This represents the target VariableDataPrototype. Tags: xml.sequenceOffset=40

表D.24:InstanceEventInCompositionInstanceRef(InstanceEventInCompositionInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Composition::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | InstantiationRTEEventProps .refinedEvent |

属性 类型 多重性 种类 备注
base CompositionSw ComponentType 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
context Component Prototype (ordered) SwComponent Prototype * ref Tags: xml.sequenceOffset=20
targetEvent RTEEvent 0..1 ref Tags: xml.sequenceOffset=30

D.2.3. 内部行为

{redefines contextPort}

表D.25:ModeGroupInAtomicSwcInstanceRef(ModeGroupInAtomicSwcInstanceRef)

| 包 | M2::AUTOSARTemplates::SWComponentTemplate::Components::InstanceRefs | | 说明 | | | 基类 | ARObject , AtpInstanceRef | | 子类 | PModeGroupInAtomicSwcInstanceRef, RModeGroupInAtomicSWCInstanceRef | | 聚合于 | ModeAccessPoint.modeGroup |

属性 类型 多重性 种类 备注
base AtomicSwComponent Type 0..1 ref Stereotypes: atpDerived Tags: xml.sequenceOffset=10
contextPort PortPrototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=20
target ModeDeclarationGroup Prototype 0..1 ref Stereotypes: atpAbstract Tags: xml.sequenceOffset=30

{subsets contextPort}

E. 本文档提及的类表

为完整起见,本章包含一组类表,代表在本文档上下文中提到、但不直接包含在描述特定元模型语义范围内的元类。

表E.1:ARElement(ARElement)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::ARPackage | | 说明 | An element that can be defined stand-alone, i.e. without being part of another element (except for packages of course). | | 基类 | ARObject , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 子类 | AclObjectSet, AclOperation, AclPermission, AclRole, AliasNameSet, ApplicabilityInfoSet, Application Partition, AutosarDataType , BaseType , BlueprintMappingSet, BswEntryRelationshipSet, BswModule Description, BswModuleEntry, BuildActionManifest, CalibrationParameterValueSet, ClientIdDefinitionSet, ClientServerInterfaceToBswModuleEntryBlueprintMapping, Collection, CompuMethod, Consistency NeedsBlueprintSet, ConstantSpecification, ConstantSpecificationMappingSet, CpSoftwareCluster, Cp SoftwareClusterBinaryManifestDescriptor, CpSoftwareClusterMappingSet, CpSoftwareClusterResource Pool, CryptoEllipticCurveProps, CryptoServiceCertificate, CryptoServiceKey, CryptoServicePrimitive, CryptoServiceQueue, CryptoSignatureScheme, DataConstr, DataExchangePoint, DataTransformation Set, DataTypeMappingSet, DdsCpConfig, DiagnosticCommonElement , DiagnosticConnection, DiagnosticContributionSet, DltContext, DltEcu, Documentation, E2EProfileCompatibilityProps, Ecuc DefinitionCollection, EcucDestinationUriDefSet, EcucModuleConfigurationValues, EcucModuleDef, Ecuc ValueCollection, EndToEndProtectionSet, EthIpProps, EthTcpIpIcmpProps, EthTcpIpProps, Evaluated VariantSet, FMFeature, FMFeatureMap, FMFeatureModel, FMFeatureSelectionSet, FirewallRule, Flat Map, GeneralPurposeConnection, HwCategory, HwElement, HwType, IEEE1722TpConnection , IPSec ConfigProps, IPv6ExtHeaderFilterSet, IdsCommonElement , IdsDesign, Implementation , ImpositionTime DefinitionGroup, InterpolationRoutineMappingSet, J1939ControllerApplication, KeywordSet, LifeCycle InfoSet, LifeCycleStateDefinitionGroup, LogAndTraceMessageCollectionSet, MacSecGlobalKayProps, MacSecParticipantSet, McFunction, McGroup, ModeDeclarationGroup, ModeDeclarationMappingSet, Os TaskProxy, PhysicalDimension, PhysicalDimensionMappingSet, PortInterface , PortInterfaceMappingSet, PortPrototypeBlueprint, PostBuildVariantCriterion, PostBuildVariantCriterionValueSet, PredefinedVariant, RapidPrototypingScenario, SdgDef, SignalServiceTranslationPropsSet, SomeipSdClientEventGroup TimingConfig, SomeipSdClientServiceInstanceConfig, SomeipSdServerEventGroupTimingConfig, SomeipSdServerServiceInstanceConfig, SwAddrMethod, SwAxisType, SwComponentMapping Constraints, SwComponentType , SwRecordLayout, SwSystemconst, SwSystemconstantValueSet, Swc BswMapping, System, SystemSignal, SystemSignalGroup, TDCpSoftwareClusterMappingSet, Tcp OptionFilterSet, TimingExtension , TlsConnectionGroup, TlvDataIdDefinitionSet, TransformationProps | | 聚合于 | ARPackage.element |

表E.2:ARPackage(ARPackage)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::ARPackage | | 说明 | AUTOSAR package, allowing to create top level packages to structure the contained ARElements. ARPackages are open sets. This means that in a file based description system multiple files can be used to partially describe the contents of a package. This is an extended version of MSR's SW-SYSTEM. | | 基类 | ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , MultilanguageReferrable Referrable | | 聚合于 | ARPackage.arPackage, AUTOSAR.arPackage |

属性 类型 多重性 种类 备注
Class ARPackage
arPackage ARPackage * aggr This represents a sub package within an ARPackage, thus allowing for an unlimited package hierarchy. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=arPackage.shortName, arPackage.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime xml.sequenceOffset=30
element PackageableElement * aggr Elements that are part of this package Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=element.shortName, element.variation Point.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=20
referenceBase ReferenceBase * aggr This denotes the reference bases for the package. This is the basis for all relative references within the package. The base needs to be selected according to the base attribute within the references. Stereotypes: atpSplitable Tags: atp.Splitkey=referenceBase.shortLabel xml.sequenceOffset=10

表E.3:AUTOSAR(AUTOSAR)

| 包 | M2::AUTOSARTemplates::AutosarTopLevelStructure | | 说明 | Root element of an AUTOSAR description, also the root element in corresponding XML documents. Tags: xml.globalElement=true | | 基类 | ARObject |

属性 类型 多重性 种类 备注
adminData AdminData 0..1 aggr This represents the administrative data of an Autosar file. Stereotypes: atpSplitable Tags: atp.Splitkey=adminData xml.sequenceOffset=10
arPackage ARPackage * aggr This is the top level package in an AUTOSAR model. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=arPackage.shortName, arPackage.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime xml.sequenceOffset=30
fileInfo Comment FileInfoComment 0..1 aggr This represents a possibility to provide a structured comment in an AUTOSAR file. Stereotypes: atpStructuredComment Tags: xml.roleElement=true xml.sequenceOffset=-10 xml.typeElement=false
Class AUTOSAR
introduction DocumentationBlock 0..1 aggr This represents an introduction on the Autosar file. It is intended for example to represent disclaimers and legal notes. Tags: xml.sequenceOffset=20

表E.4:AbstractNumericalVariationPoint(AbstractNumericalVariationPoint)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling::AttributeValueVariationPoints | | 说明 | This is an abstract NumericalValueVariationPoint. It is introduced to support the case that additional attributes are required for particular purposes. | | 基类 | ARObject , AttributeValueVariationPoint , FormulaExpression , SwSystemconstDependentFormula | | 子类 | LimitValueVariationPoint, NumericalValueVariationPoint | | 聚合于 | VariationPointProxy.valueAccess |

表E.5:AdminData(AdminData)

| 包 | M2::MSR::AsamHdo::AdminData | | 说明 | AdminData represents the ability to express administrative information and custom extensions for an element. This administration information is to be treated as meta-data such as revision id or state of the file. There are basically the following kinds of meta-data • The language and/or used languages. • Revision information covering e.g. revision number, state, release date, changes. Note that this information can be given in general as well as related to a particular company. • Document meta-data specific for a company Beside that a custom extension of model-data is possible by • Special data | | 基类 | ARObject | | 聚合于 | AUTOSAR.adminData, Describable .adminData, Identifiable .adminData |

属性 类型 多重性 种类 备注
docRevision (ordered) DocRevision * aggr This allows to denote information about the current revision of the object. Note that information about previous revisions can also be logged here. The entries shall be sorted descendant by date in order to reflect the history. Therefore the most recent entry representing the current version is denoted first. Tags: xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=50 xml.typeElement=false xml.typeWrapperElement=false

表E.6:AdminData(AdminData)

属性 类型 多重性 种类 备注
language LEnum 0..1 attr This attribute specifies the master language of the document or the document fragment. The master language is the one in which the document is maintained and from which the other languages are derived from. In particular in case of inconsistencies, the information in the master language is priority. Tags: xml.sequenceOffset=20
sdg Sdg * aggr This property allows to keep special data which is not represented by the standard model. It can be utilized to keep e.g. tool specific data. Stereotypes: atpSplitable Tags: atp.Splitkey=sdg.sdgCaption.shortName xml.roleElement=true xml.roleWrapperElement=true xml.sequenceOffset=60 xml.typeElement=false xml.typeWrapperElement=false
usedLanguages MultiLanguagePlainText 0..1 aggr This property specifies the languages which are provided in the document. Therefore it should only be specified in the top level admin data. For each language provided in the document there is one entry in MultilanguagePlain Text. The content of each entry can be used for illustration of the language. The used language itself depends on the language attribute in the entry. Tags: xml.sequenceOffset=30

表E.7:AnyInstanceRef(AnyInstanceRef)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::AnyInstanceRef | | 说明 | Describes a reference to any instance in an AUTOSAR model. This is the most generic form of an instance ref. Refer to the superclass notes for more details. | | 基类 | ARObject , AtpInstanceRef | | 聚合于 | Collection.collectedInstance, Collection.sourceInstance, DocumentationContext.feature, EcucInstance ReferenceValue.value, FlatInstanceDescriptor.ecuExtractReference, FlatInstanceDescriptor.upstream Reference, RptContainer.byPassPoint, RptHook.rptArHook, ViewMap.firstElementInstance, ViewMap. secondElementInstance | | 包 | M2::AUTOSARTemplates::GenericStructure::AbstractStructure | | 说明 | An M0 instance of a classifier may be represented as a tree rooted at that instance, where under each node come the sub-trees representing the instances which act as features under that node. An instance ref specifies a navigation path from any M0 tree-instance of the base (which is a classifier) to a leaf (which is an instance of the target). | | 基类 | ARObject | | 子类 | AnyInstanceRef, ApplicationCompositeElementInPortInterfaceInstanceRef, ComponentInComposition InstanceRef, ComponentInSystemInstanceRef, DataPrototypeInPortInterfaceInstanceRef , Data PrototypeInSystemInstanceRef, InnerDataPrototypeGroupInCompositionInstanceRef, InnerPortGroupIn CompositionInstanceRef, InnerRunnableEntityGroupInCompositionInstanceRef, InstanceEventIn CompositionInstanceRef, ModeDeclarationGroupPrototypeInSystemInstanceRef, ModeGroupInAtomic SwcInstanceRef , ModeInBswModuleDescriptionInstanceRef, ModeInSwcInstanceRef, Operation ArgumentInComponentInstanceRef, OperationInAtomicSwcInstanceRef , OperationInSystemInstance Ref, PModeInSystemInstanceRef, ParameterDataPrototypeInSystemInstanceRef, ParameterInAtomicS WCTypeInstanceRef, PortGroupInSystemInstanceRef, PortInCompositionTypeInstanceRef , RModeIn AtomicSwcInstanceRef, RteEventInCompositionInstanceRef, RteEventInEcuInstanceRef, RteEventIn SystemInstanceRef, RunnableEntityInCompositionInstanceRef, SwcServiceDependencyInSystem InstanceRef, TriggerInAtomicSwcInstanceRef , TriggerInSystemInstanceRef, VariableAccessInEcu InstanceRef, VariableDataPrototypeInCompositionInstanceRef, VariableDataPrototypeInSystemInstance Ref, VariableInAtomicSWCTypeInstanceRef, VariableInAtomicSwcInstanceRef , VariableInComponent |

属性 类型 多重性 种类 备注
base AtpClassifier 1 ref This is the base from which navigation path begins. Stereotypes: atpDerived
contextElement (ordered) AtpFeature * ref This is one step in the navigation path specified by the instance ref.
target AtpFeature 1 ref This is the target of the instance ref.
Class AtpInstanceRef (abstract)
atpBase AtpClassifier 1 ref This is the base from which the navigaion path starts. Stereotypes: atpAbstract; atpDerived
atpContext Element (ordered) AtpPrototype * ref This is one particular step in the navigation path. Stereotypes: atpAbstract
atpTarget AtpFeature 1 ref This is the target of the instance ref. In other words it is the terminal of the navigation path. Stereotypes: atpAbstract

表E.8:BindingTimeEnum(BindingTimeEnum)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This enumerator specifies the applicable binding times for the pre build variation points. | | 聚合于 | AttributeValueVariationPoint .bindingTime, ConditionByFormula.bindingTime, FMFeature.maximum IntendedBindingTime, FMFeature.minimumIntendedBindingTime, FMFeatureSelection.maximum SelectedBindingTime, FMFeatureSelection.minimumSelectedBindingTime |

字面值 说明
codeGeneration Time • Coding by hand, based on requirements document. • Tool based code generation, e.g. from a model. • The model may contain variants. • Only code for the selected variant(s) is actually generated. Tags: atp.EnumerationLiteralIndex=0
linkTime Configure what is included in object code, and what is omitted Based on which variant(s) are selected E.g. for modules that are delivered as object code (as opposed to those that are delivered as source code) Tags: atp.EnumerationLiteralIndex=1
Enumeration BindingTimeEnum
preCompileTime This is typically the C-Preprocessor. Exclude parts of the code from the compilation process, e.g., because they are not required for the selected variant, because they are incompatible with the selected variant, because they require resources that are not present in the selected variant. Object code is only generated for the selected variant(s). The code that is excluded at this stage code will not be available at later stages. Tags: atp.EnumerationLiteralIndex=2
systemDesignTime • Designing the VFB. • Software Component types (PortInterfaces). • SWC Prototypes and the Connections between SWCprototypes. • Designing the Topology • ECUs and interconnecting Networks • Designing the Communication Matrix and Data Mapping Tags: atp.EnumerationLiteralIndex=3

表E.9:BswCalledEntity(BswCalledEntity)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswBehavior | | 说明 | BSW module entity which is designed to be called from another BSW module or cluster. | | 基类 | ARObject , BswModuleEntity , ExecutableEntity , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | BswInternalBehavior.entity |

表E.10:BswImplementation(BswImplementation)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswImplementation | | 说明 | Contains the implementation specific information in addition to the generic specification (BswModule Description and BswBehavior). It is possible to have several different BswImplementations referring to the same BswBehavior. Tags: atp.recommendedPackage=BswImplementations | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , Implementation , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
arRelease Version RevisionLabelString 0..1 attr Version of the AUTOSAR Release on which this implementation is based. The numbering contains three levels (major, minor, revision) which are defined by AUTOSAR.
behavior BswInternalBehavior 0..1 ref The behavior of this implementation. This relation is made as an association because • it follows the pattern of the SWCT • since ARElement cannot be splitted, but we want supply the implementation later, the Bsw Implementation is not aggregated in BswBehavior
Class BswImplementation
preconfigured Configuration EcucModule ConfigurationValues * ref Reference to the set of preconfigured (i.e. fixed) configuration values for this BswImplementation. If the BswImplementation represents a cluster of several modules, more than one EcucModuleConfigurationValues element can be referred (at most one per module), otherwise at most one such element can be referred. Tags: xml.roleWrapperElement=true
recommended Configuration EcucModule ConfigurationValues * ref Reference to one or more sets of recommended configuration values for this module or module cluster.
vendorApiInfix Identifier 0..1 attr In driver modules which can be instantiated several times on a single ECU, SRS_BSW_00347 requires that the names of files, APIs, published parameters and memory allocation keywords are extended by the vendorId and a vendor specific name. This parameter is used to specify the vendor specific name. In total, the implementation specific API name is generated as follows: _. E.g. assuming that the vendorId of the implementer is 123 and the implementer chose a vendorApiInfix of "v11r456" an API name Can_Write defined in the SWS will translate to Can_123_v11r456_Write. This attribute is mandatory for all modules with upper multiplicity > 1. It shall not be used for modules with upper multiplicity =1. See also SWS_BSW_00102.
vendorSpecific ModuleDef EcucModuleDef * ref Reference to • the vendor specific EcucModuleDef used in this Bsw Implementation if it represents a single module • several EcucModuleDefs used in this Bsw Implementation if it represents a cluster of modules • one or no EcucModuleDefs used in this Bsw Implementation if it represents a library Tags: xml.roleWrapperElement=true

表E.11:BswModuleDescription(BswModuleDescription)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswOverview | | 说明 | Root element for the description of a single BSW module or BSW cluster. In case it describes a BSW module, the short name of this element equals the name of the BSW module. Tags: atp.recommendedPackage=BswModuleDescriptions | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , AtpClassifier , AtpFeature , AtpStructureElement CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element, AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
Class BswModuleDescription
bswModule Dependency BswModuleDependency * aggr Describes the dependency to another BSW module. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=bswModuleDependency.shortName, bsw ModuleDependency.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=20
bswModule Documentation SwComponent Documentation 0..1 aggr This adds a documentation to the BSW module. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=bswModuleDocumentation, bswModule Documentation.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=6
expectedEntry BswModuleEntry * ref Indicates an entry which is required by this module. Replacement of outgoingCallback / requiredEntry. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=expectedEntry.bswModuleEntry, expected Entry.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
implemented Entry BswModuleEntry * ref Specifies an entry provided by this module which can be called by other modules. This includes "main" functions, interrupt routines, and callbacks. Replacement of providedEntry / expectedCallback. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=implementedEntry.bswModuleEntry, implementedEntry.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
internalBehavior BswInternalBehavior * aggr The various BswInternalBehaviors associated with a Bsw ModuleDescription can be distributed over several physical files. Therefore the aggregation is <>. Stereotypes: atpSplitable Tags: atp.Splitkey=internalBehavior.shortName xml.sequenceOffset=65
moduleId PositiveInteger 0..1 attr Refers to the BSW Module Identifier defined by the AUTOSAR standard. For non-standardized modules, a proprietary identifier can be optionally chosen.
providedClient ServerEntry BswModuleClientServer Entry * aggr Specifies that this module provides a client server entry which can be called from another partition or core.This entry is declared locally to this context and will be connected to the requiredClientServerEntry of another or the same module via the configuration of the BSW Scheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=providedClientServerEntry.shortName, providedClientServerEntry.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class BswModuleDescription
providedData VariableDataPrototype * aggr Specifies a data prototype provided by this module in order to be read from another partition or core.The providedData is declared locally to this context and will be connected to the requiredData of another or the same module via the configuration of the BSW Scheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=providedData.shortName, provided Data.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=55
providedMode Group ModeDeclarationGroup Prototype * aggr A set of modes which is owned and provided by this module or cluster. It can be connected to the required ModeGroups of other modules or clusters via the configuration of the BswScheduler. It can also be synchronized with modes provided via ports by an associated ServiceSwComponentType, EcuAbstraction SwComponentType or ComplexDeviceDriverSw ComponentType. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=providedModeGroup.shortName, provided ModeGroup.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=25
releasedTrigger Trigger * aggr A Trigger released by this module or cluster. It can be connected to the requiredTriggers of other modules or clusters via the configuration of the BswScheduler. It can also be synchronized with Triggers provided via ports by an associated ServiceSwComponentType, Ecu AbstractionSwComponentType or ComplexDeviceDriver SwComponentType. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=releasedTrigger.shortName, released Trigger.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=35
requiredClient ServerEntry BswModuleClientServer Entry * aggr Specifies that this module requires a client server entry which can be implemented on another partition or core.This entry is declared locally to this context and will be connected to the providedClientServerEntry of another or the same module via the configuration of the BSW Scheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredClientServerEntry.shortName, requiredClientServerEntry.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=50
Class BswModuleDescription
requiredData VariableDataPrototype * aggr Specifies a data prototype required by this module in oder to be provided from another partition or core.The required Data is declared locally to this context and will be connected to the providedData of another or the same module via the configuration of the BswScheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredData.shortName, required Data.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
requiredMode Group ModeDeclarationGroup Prototype * aggr xml.sequenceOffset=60 Specifies that this module or cluster depends on a certain mode group. The requiredModeGroup is local to this context and will be connected to the providedModeGroup of another module or cluster via the configuration of the BswScheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredModeGroup.shortName, required ModeGroup.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=30
requiredTrigger Trigger * aggr Specifies that this module or cluster reacts upon an external trigger.This requiredTrigger is declared locally to this context and will be connected to the providedTrigger of another module or cluster via the configuration of the BswScheduler. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=requiredTrigger.shortName, required Trigger.variationPoint.shortLabel vh.latestBindingTime=preCompileTime xml.sequenceOffset=40

表E.12:BswModuleEntry(BswModuleEntry)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswInterfaces | | 说明 | This class represents a single API entry (C-function prototype) into the BSW module or cluster. The name of the C-function is equal to the short name of this element with one exception: In case of multiple instances of a module on the same CPU, special rules for "infixes" apply, see description of class BswImplementation. Tags: atp.recommendedPackage=BswModuleEntrys | | 基类 | ARElement , ARObject , AtpBlueprint , AtpBlueprintable , CollectableElement , Identifiable , Multilanguage Referrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
argument (ordered) SwServiceArg * aggr An argument belonging to this BswModuleEntry. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=argument.shortName, argument.variation Point.shortLabel vh.latestBindingTime=blueprintDerivationTime xml.sequenceOffset=45

表E.13:BswModuleEntry(BswModuleEntry)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswBehavior | | 说明 | BSW module entity, which is designed for control by the BSW Scheduler. It may for example implement a so-called "main" function. | | 基类 | ARObject , BswModuleEntity , ExecutableEntity , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | BswInternalBehavior.entity |

属性 类型 多重性 种类 备注
bswEntryKind BswEntryKindEnum 0..1 attr This describes whether the entry is concrete or abstract. If the attribute is missing the entry is considered as concrete. Tags: xml.sequenceOffset=40
callType BswCallType 0..1 attr The type of call associated with this service. Tags: xml.sequenceOffset=25
execution Context BswExecutionContext 0..1 attr Specifies the execution context which is required (in case of entries into this module) or guaranteed (in case of entries called from this module) for this service. Tags: xml.sequenceOffset=30
function Prototype Emitter NameToken 0..1 attr This attribute is used to control the generation of function prototypes. If set to "RTE", the RTE generates the function prototypes in the Module Interlink Header File.
isReentrant Boolean 0..1 attr Reentrancy from the viewpoint of function callers: • true: Enables the service to be invoked again, before the service has finished. • false: It is prohibited to invoke the service again before is has finished. Tags: xml.sequenceOffset=15
isSynchronous Boolean 0..1 attr Synchronicity from the viewpoint of function callers: • true: This calls a synchronous service, i.e. the service is completed when the call returns. • false: The service (on semantical level) may not be complete when the call returns. Tags: xml.sequenceOffset=20
returnType SwServiceArg 0..1 aggr The return type belonging to this bswModuleEntry. Tags: xml.sequenceOffset=40
role Identifier 0..1 attr Specifies the role of the entry in the given context. It shall be equal to the standardized name of the service call, especially in cases where no ServiceIdentifier is specified, e.g. for callbacks. Note that the ShortName is not always sufficient because it maybe vendor specific (e.g. for callbacks which can have more than one instance).
serviceId PositiveInteger 0..1 attr Refers to the service identifier of the Standardized Interfaces of AUTOSAR basic software. For non-standardized interfaces, it can optionally be used for proprietary identification. Tags: xml.sequenceOffset=5
swServiceImpl Policy SwServiceImplPolicy Enum 0..1 attr Denotes the implementation policy as a standard function call, inline function or macro. This has to be specified on interface level because it determines the signature of the call. Tags: xml.sequenceOffset=35
Class BswSchedulableEntity

表E.14:BswServiceDependency(BswServiceDependency)

| 包 | M2::AUTOSARTemplates::BswModuleTemplate::BswBehavior | | 说明 | Specialization of ServiceDependency in the context of an BswInternalBehavior. It allows to associate BswModuleEntries and data defined for a BSW module or cluster to a given ServiceNeeds element. | | 基类 | ARObject , ServiceDependency | | 聚合于 | BswInternalBehavior.serviceDependency |

属性 类型 多重性 种类 备注
assignedData RoleBasedData Assignment * aggr Defines the role of an associated data object (owned by this module or cluster) in the context of the ServiceNeeds element. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=assignedData, assignedData.variation Point.shortLabel vh.latestBindingTime=preCompileTime
assignedEntry Role RoleBasedBswModule EntryAssignment * aggr Defines the role of an associated BswModuleEntry in the context of the ServiceNeeds element. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=assignedEntryRole, assignedEntry Role.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
ident BswService DependencyIdent 0..1 aggr This adds the ability to become referrable to BswService Dependency. Stereotypes: atpIdentityContributor Tags: xml.sequenceOffset=-100
serviceNeeds ServiceNeeds 0..1 aggr The associated ServiceNeeds.

表E.15:ConsumedEventGroup(ConsumedEventGroup)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::Fibex4Ethernet::ServiceInstances | | 说明 | This element represents an event-group to which the service consumer wants to subscribe. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ConsumedServiceInstance.consumedEventGroup |

属性 类型 多重性 种类 备注
application Endpoint ApplicationEndpoint 0..1 ref Defines the application endpoint where the events of the event group are received in case of multicast reception. Tags: atp.Status=obsolete

表E.16:ConsumedEventGroup(ConsumedEventGroup)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::Fibex4Ethernet::ServiceInstances | | 说明 | Service instances that are consumed by the ECU that is connected via the ApplicationEndpoint to a CommunicationConnector. | | 基类 | ARObject , AbstractServiceInstance , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ApplicationEndpoint.consumedServiceInstance, ServiceInstanceCollectionSet.serviceInstance |

属性 类型 多重性 种类 备注
autoRequire Boolean 0..1 attr Defines that this ConsumedEventGroup shall be requested (subscribed) as soon as the corresponding ConsumedServiceInstance is requested. This could be at ECU start, if ConsumedServiceInstance.autoRequire is set to TRUE or as soon as the ConsumedServiceInstance is requested by the application, if ConsumedService Instance.autoRequire is set to FALSE.
eventGroup Identifier PositiveInteger 0..1 attr EventGroup ID. Shall be unique within one system to allow service discovery.
eventMulticast Address ApplicationEndpoint * ref This reference defines the multicast address or a multicast address resource where the events of the event group are received. If the multicast address is determined via configuration and not at runtime via service discovery this reference points to the multicast address over which the events will be received. If the multicast address is determined at runtime via service discovery this reference shall be used to define the necessary local multicast address resources, i.e. RAM space in the TcpIp module in which the multicast address is stored at runtime. Please note that in this case the referenced address may be defined as ANY UDP port and ANY IP address since the multicast address will be received at runtime. If several multicast addresses are considered to be used the ConsumedEventGroup shall point to different ApplicationEndpoint objects to reserve the necessary resources in the configuration. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=eventMulticastAddress.applicationEndpoint, eventMulticastAddress.variationPoint.shortLabel
pduActivation RoutingGroup PduActivationRouting Group * aggr The ServiceDiscovery module is able to activate and deactivate the PDU routing for receiving events.
priority PositiveInteger 0..1 attr Defines the frame priority where values from 0 (best effort) to 7 (highest) are allowed.
routingGroup SoAdRoutingGroup * ref The ServiceDiscovery module is able to activate and deactivate the PDU routing for receiving events. Tags: atp.Status=obsolete
sdClientConfig SdClientConfig 0..1 aggr The readiness to receive events is defined by the Service Discovery of the ConsumedEventGroup. The Event Handler shall know about this announcement to decide about the submission of events. Therefore the Event Handler may be configured with Service-Discovery Client attributes. Tags: atp.Status=obsolete
sdClientTimer Config SomeipSdClientEvent GroupTimingConfig 0..1 ref Client Timing configuration settings that are EventGroup specific. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=sdClientTimerConfig.someipSdClientEvent GroupTimingConfig, sdClientTimerConfig.variation Point.shortLabel vh.latestBindingTime=postBuild
Class ConsumedServiceInstance
allowedService Provider NetworkEndpoint * ref NetworkEndpoint on which the ProvidedServiceInstance that is communicating with this ConsumedService Instance is allowed to be located so that the ACL check in the ServiceDiscovery is successful and the connection is allowed to be established. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=allowedServiceProvider.networkEndpoint, allowedServiceProvider.variationPoint.shortLabel atp.Status=draft vh.latestBindingTime=postBuild
autoRequire Boolean 0..1 attr Defines that this ConsumedServiceInstance shall be required (searched for) by the service discovery at ECU start.
blocklisted Version SomeipServiceVersion * aggr Collection of blocklisted versions Tags: atp.Status=draft
consumedEvent Group ConsumedEventGroup * aggr Selection of event-groups the consumer wants to subscribe for. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=consumedEventGroup.shortName, consumedEventGroup.variationPoint.shortLabel vh.latestBindingTime=postBuild
eventMulticast Subscription Address ApplicationEndpoint 0..1 ref Multicast Address that is used by the client to subscribe to the server: This enables the multicast subscription feature. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=eventMulticastSubscription Address.applicationEndpoint, eventMulticastSubscription Address.variationPoint.shortLabel vh.latestBindingTime=postBuild
instance Identifier AnyServiceInstanceId 0..1 attr This attribute represents the ability to describe the required service instance ID.
localUnicast Address ApplicationEndpoint 0..2 ref The local address over which the CSI is consumed (udp, tcp or both). Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=localUnicastAddress.applicationEndpoint, localUnicastAddress.variationPoint.shortLabel vh.latestBindingTime=postBuild
minorVersion AnyVersionString 0..1 attr Minor Version of the ServiceInterface. Value can be set to a number that represents the Minor Version of the searched service or to ANY.
providedService Instance ProvidedService Instance 0..1 ref Reference to a providedServiceInstance to get the instanceIdentifier information from the ProvidedService Instance. Tags: atp.Status=obsolete
Class ConsumedServiceInstance
remoteUnicast Address ApplicationEndpoint 0..2 ref This reference defines the remote address where the service provider is located. This reference shall ONLY be used if the remote address is determined from the configuration and not at runtime from the Service Discovery. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=remoteUnicastAddress.applicationEndpoint, remoteUnicastAddress.variationPoint.shortLabel vh.latestBindingTime=postBuild
sdClientConfig SdClientConfig 0..1 aggr Service Discovery Client configuration. Tags: atp.Status=obsolete
sdClientTimer Config SomeipSdClientService InstanceConfig 0..1 ref Client specific configuration settings relevant for the SOME/IP service discovery. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=sdClientTimerConfig.someipSdClientService InstanceConfig, sdClientTimerConfig.variationPoint.short Label vh.latestBindingTime=postBuild
serviceIdentifier PositiveInteger 0..1 attr This attribute represents the ability to describe the SOME/ IP service ID that is searched.
versionDriven FindBehavior ServiceVersion AcceptanceKindEnum 0..1 attr Defines the service discovery find behavior. Tags: atp.Status=draft

表E.17:DataMapping(DataMapping)

| 包 | M2::AUTOSARTemplates::SystemTemplate::DataMapping | | 说明 | Mapping of port elements (data elements and parameters) to frames and signals. | | 基类 | ARObject | | 子类 | ClientServerToSignalMapping, SenderReceiverCompositeElementToSignalMapping, SenderReceiverTo SignalGroupMapping, SenderReceiverToSignalMapping, TriggerToSignalMapping | | 聚合于 | SystemMapping.dataMapping |

属性 类型 多重性 种类 备注
introduction DocumentationBlock 0..1 aggr This represents introductory documentation about the data mapping.

表E.18:Describable(Describable)

| 说明 | This meta-class represents the ability to add a descriptive documentation to non identifiable elements. | | 基类 | ARObject | | 子类 | CyclicTiming, EventControlledTiming, HwElementConnector, HwPinConnector, HwPinGroupConnector, I PduTiming, Ipv4DhcpServerConfiguration, Ipv6DhcpServerConfiguration, PncMapping, Socket Connection, TransformationComSpecProps , TransformationDescription , TransformationISignalProps |

属性 类型 多重性 种类 备注
Package M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::Identifiable

表E.19:Describable(Describable)

属性 类型 多重性 种类 备注
adminData AdminData 0..1 aggr This represents the administrative data for the describable object. Stereotypes: atpSplitable Tags: atp.Splitkey=adminData xml.sequenceOffset=-20
category CategoryString 0..1 attr The category is a keyword that specializes the semantics of the Describable. It affects the expected existence of attributes and the applicability of constraints. Tags: xml.sequenceOffset=-50
desc MultiLanguageOverview Paragraph 0..1 aggr This represents a general but brief (one paragraph) description what the object in question is about. It is only one paragraph! Desc is intended to be collected into overview tables. This property helps a human reader to identify the object in question. More elaborate documentation, (in particular how the object is built or used) should go to "introduction". Tags: xml.sequenceOffset=-60
introduction DocumentationBlock 0..1 aggr This represents more information about how the object in question is built or is used. Therefore it is a DocumentationBlock. Tags: xml.sequenceOffset=-30

表E.20:DiagnosticDataElement(DiagnosticDataElement)

| 包 | M2::AUTOSARTemplates::DiagnosticExtract::CommonDiagnostics | | 说明 | This meta-class represents the ability to describe a concrete piece of data to be taken into account for diagnostic purposes. | | 基类 | ARObject , DiagnosticServiceMappingDiagTarget , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DiagnosticAbstractParameter .dataElement | | 包 | M2::AUTOSARTemplates::LogAndTraceExtract | | 说明 | This element defines an Argument in a DltMessage. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | DltArgument.dltArgumentEntry, DltMessage.dltArgument |

属性 类型 多重性 种类 备注
arraySize Semantics ArraySizeSemantics Enum 0..1 attr This attribute controls the meaning of the value of the array size.
maxNumberOf Elements PositiveInteger 0..1 attr The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take.
scalingInfoSize PositiveInteger 0..1 attr Size in bytes of scaling information for the DiagnosticData Element if used with DiagnosticReadScalingDataBy Identifier
swDataDef Props SwDataDefProps 0..1 aggr This property allows to specify data definition properties in order to support the definition of e.g. computation formulae and data constraints. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps
Class DltArgument
dltArgument Entry DltArgument * aggr This aggregation is used to describe subElements of a Dlt Argument that defines a Structure.
length PositiveInteger 0..1 attr Describes the DltArgument length in case of Arrays and Strings in number of BaseTypes.
network Representation SwDataDefProps 0..1 aggr Definition of the networkRepresentation of the Dlt Argument. Stereotypes: atpSplitable Tags: atp.Splitkey=networkRepresentation
optional Boolean 0..1 attr This attribute defines whether the argument is optional or not. If set to true, the argument can be omitted from the payload of a DLT message.
predefinedText Boolean 0..1 attr This attribute defines whether the DltArgument is a predefinedText (Static Data).
variableLength Boolean 0..1 attr This attribute defines whether the length of the Dlt Argument is variable (determined at runtime) or not.

表E.21:DocumentationBlock(DocumentationBlock)

| 包 | M2::MSR::Documentation::BlockElements | | 说明 | This class represents a documentation block. It is made of basic text structure elements which can be displayed in a table cell. | | 基类 | ARObject | | 聚合于 | ApplicabilityInfo.remark, AUTOSAR.introduction, BlueprintGenerator.introduction, BlueprintPolicy Modifiable .blueprintDerivationGuide, ClientServerOperationBlueprintMapping.blueprintMappingGuide, DataMapping .introduction, DefItem.def, Describable .introduction, EcucAddInfoParamValue.value, Ecu ResourceEstimation.introduction, Entry.entryContents, FrameMapping.introduction, GeneralAnnotation . annotationText, Identifiable .introduction, IPduMapping.introduction, ISignalMapping.introduction, Item. itemContents, LabeledItem.itemContents, LifeCycleInfo.remark, MappingConstraint .introduction, Msr QueryP2.msrQueryResultP2, Note.noteText, PortDefinedArgumentBlueprint.blueprintMappingGuide, PrmChar.cond, PrmChar.remark, ScheduleTableEntry .introduction, SignalPathConstraint .introduction, StructuredReq.conflicts, StructuredReq.dependencies, StructuredReq.description, StructuredReq. rationale, StructuredReq.remark, StructuredReq.supportingMaterial, StructuredReq.useCase, SwAxis Type.swGenericAxisDesc, TopicContent.blockLevelContent, TraceableText.text, VariationPoint.blueprint Condition |

属性 类型 多重性 种类 备注
defList DefList 0..1 aggr This represents a definition list in the documentation block. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=defList, defList.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=40
figure MlFigure 0..1 aggr This represents a figure in the documentation block. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=figure, figure.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=70
Class <> DocumentationBlock
formula MlFormula 0..1 aggr This is a formula in the definition block. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=formula, formula.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=60
labeledList LabeledList 0..1 aggr This represents a labeled list. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=labeledList, labeledList.variationPoint.short Label vh.latestBindingTime=postBuild xml.sequenceOffset=50
list List 0..1 aggr This represents numbered or unnumbered list. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=list, list.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=30
msrQueryP2 MsrQueryP2 0..1 aggr This represents automatically contributed contents provided by an msrquery in the context of Documentation Block.
note Note 0..1 aggr This represents a note in the text flow. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=note, note.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=80
p MultiLanguage Paragraph 0..1 aggr This is one particular paragraph. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=p, p.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=10
structuredReq StructuredReq 0..1 aggr This aggregation supports structured requirements embedded in a documentation block. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=structuredReq.shortName, structured Req.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=100
trace TraceableText 0..1 aggr This represents traceable text in the documentation block. This allows to specify requirements/constraints in any documentation block. The kind of the trace is specified in the category. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=trace.shortName, trace.variationPoint.short Label vh.latestBindingTime=postBuild
Class <> DocumentationBlock
verbatim MultiLanguageVerbatim 0..1 aggr This represents one particular verbatim text. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=verbatim, verbatim.variationPoint.shortLabel vh.latestBindingTime=postBuild xml.sequenceOffset=20

表E.22:EcuInstance(EcuInstance)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreTopology | | 说明 | ECUInstances are used to define the ECUs used in the topology. The type of the ECU is defined by a reference to an ECU specified with the ECU resource description. Tags: atp.recommendedPackage=EcuInstances | | 基类 | ARObject , CollectableElement , FibexElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
associatedCom IPduGroup ISignalIPduGroup * ref With this reference it is possible to identify which ISignal IPduGroups are applicable for which Communication Connector/ ECU. Only top level ISignalIPduGroups shall be referenced by an EcuInstance. If an ISignalIPduGroup contains other ISignalIPduGroups than these contained ISignalIPdu Groups shall not be referenced by the EcuInstance. Contained ISignalIPduGroups are associated to an Ecu Instance via the top level ISignalIPduGroup.
associated Consumed Provided ServiceInstance Group ConsumedProvided ServiceInstanceGroup * ref With this reference it is possible to identify which ConsumedProvidedServiceInstanceGroups are applicable for which ECUInstance. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=associatedConsumedProvidedService InstanceGroup.consumedProvidedServiceInstanceGroup, associatedConsumedProvidedServiceInstance Group.variationPoint.shortLabel vh.latestBindingTime=postBuild
associatedPdur IPduGroup PdurIPduGroup * ref With this reference it is possible to identify which PduR IPdu Groups are applicable for which Communication Connector/ ECU.
channel Synchronous Wakeup Boolean 0..1 attr If this parameter is available and set to true, then all available channels will be woken up as soon as at least one channel wakeup occurs. If PNCs are configured, then all PNCs will be requested upon a channel wakeup.
clientIdRange ClientIdRange 0..1 aggr Restriction of the Client Identifier for this Ecu to an allowed range of numerical values. The Client Identifier of the transaction handle is generated by the client RTE for inter-Ecu Client/Server communication.
com Configuration GwTimeBase TimeValue 0..1 attr The period between successive calls to Com_Main FunctionRouteSignals of the AUTOSAR COM module in seconds.
com ConfigurationRx TimeBase TimeValue 0..1 attr The period between successive calls to Com_Main FunctionRx of the AUTOSAR COM module in seconds.
Class EcuInstance
com ConfigurationTx TimeBase TimeValue 0..1 attr The period between successive calls to Com_Main FunctionTx of the AUTOSAR COM module in seconds.
comEnable MDTForCyclic Transmission Boolean 0..1 attr Enables for the Com module of this EcuInstance the minimum delay time monitoring for cyclic and repeated transmissions (TransmissionModeTiming has cyclic Timing assigned or eventControlledTiming with numberOf Repetitions > 0).
commController Communication Controller * aggr CommunicationControllers of the ECU. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=commController.shortName, comm Controller.variationPoint.shortLabel vh.latestBindingTime=postBuild
connector Communication Connector * aggr All channels controlled by a single controller. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=connector.shortName, connector.variation Point.shortLabel vh.latestBindingTime=postBuild
dltConfig DltConfig 0..1 aggr Describes the Dlt configuration on this EcuInstance.
doIpConfig DoIpConfig 0..1 aggr DoIp configuration on this EcuInstance. Tags: atp.Status=draft
ecuTaskProxy OsTaskProxy * ref Reference to OsTaskProxies assigned to the Ecu Instance. Stereotypes: atpSplitable Tags: atp.Splitkey=ecuTaskProxy
ethSwitchPort Group Derivation Boolean 0..1 attr Defines whether the derivation of SwitchPortGroups based on VLAN and/or CouplingPort.pncMapping shall be performed for this EcuInstance. If not defined the derivation shall not be done.
firewallRule StateDependentFirewall * ref Firewall rules defined in the context of an EcuInstance. Tags: atp.Status=candidate
partition EcuPartition * aggr Optional definition of Partitions within an Ecu.
pncNmRequest Boolean 0..1 attr Defines if this EcuInstance shall request Nm on all its PhysicalChannels which have Nm variant set to FULL each time a PNC is requested.
pncPrepare SleepTimer TimeValue 0..1 attr Time in seconds the PNC state machine shall wait in PNC_PREPARE_SLEEP.
pnc Synchronous Wakeup Boolean 0..1 attr If this parameter is available and set to true then all available PNCs will be woken up as soon as a channel wakeup occurs. This is ensured by adding all PNCs to all channel wakeup sources during upstream mapping.
pnResetTime TimeValue 0..1 attr Specifies the runtime of the reset timer in seconds. This reset time is valid for the reset of PN requests in the EIRA and in the ERA.
sleepMode Supported Boolean 0..1 attr Specifies whether the ECU instance may be put to a "low power mode" • true: sleep mode is supported • false: sleep mode is not supported Note: This flag may only be set to "true" if the feature is supported by both hardware and basic software.
Class EcuInstance
tcpIpIcmpProps EthTcpIpIcmpProps 0..1 ref EcuInstance specific ICMP (Internet Control Message Protocol) attributes
tcpIpProps EthTcpIpProps 0..1 ref EcuInstance specific TcpIp Stack attributes.
v2xSupported V2xSupportEnum 0..1 attr This attribute is used to control the existence of the V2X stack on the given EcuInstance.
wakeUpOver BusSupported Boolean 0..1 attr Driver support for wakeup over Bus.

表E.23:EndToEndProtectionISignalIPdu(EndToEndProtectionISignalIPdu)

| 包 | M2::AUTOSARTemplates::SystemTemplate::EndToEndProtection | | 说明 | It is possible to protect the inter-ECU data exchange of safety-related ISignalGroups at the level of COM IPdus using protection mechanisms provided by E2E Library. For each ISignalGroup to be protected, a separate EndToEndProtectionISignalIPdu element shall be created within the EndToEndProtectionSet. The EndToEndProtectionISignalIPdu element refers to the ISignalGroup that is to be protected and to the ISignalIPdu that transmits the protected ISignalGroup. The information how the referenced ISignalGroup shall be protected (through which E2E Profile and with which E2E settings) is defined in the EndToEnd Description element. | | 基类 | ARObject | | 聚合于 | EndToEndProtection.endToEndProtectionISignalIPdu |

属性 类型 多重性 种类 备注
dataOffset Integer 0..1 attr This attribute defines the beginning offset (in bits) of the Array representation of the Signal Group (including CRC, counter and application signal group) in the IPdu. This attribute is mandatory and the dataOffset shall always be defined.
iSignalGroup ISignalGroup 0..1 ref Reference to the ISignalGroup that is to be protected.
iSignalIPdu ISignalIPdu 0..1 ref Reference to the ISignalIPdu that transmits the protected ISignalGroup.

表E.24:EndToEndTransformationDescription(EndToEndTransformationDescription)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Transformer | | 说明 | EndToEndTransformationDescription holds these attributes which are profile specific and have the same value for all E2E transformers. | | 基类 | ARObject , Describable , TransformationDescription | | 聚合于 | TransformationTechnology.transformationDescription |

属性 类型 多重性 种类 备注
clearFromValid ToInvalid Boolean 0..1 attr Clear monitoring window on transition from state Valid to state Invalid.
counterOffset PositiveInteger 0..1 attr Offset of the counter in the Data[] array in bits.
crcOffset PositiveInteger 0..1 attr Offset of the CRC in the Data[] array in bits.
dataIdMode DataIdModeEnum 0..1 attr This attribute describes the inclusion mode that is used to include the implicit two-byte Data ID in the one-byte CRC.
dataIdNibble Offset PositiveInteger 0..1 attr Offset of the Data ID nibble in the Data[] array in bits.
Class EndToEndTransformationDescription
e2eProfile Compatibility Props E2EProfileCompatibility Props 0..1 ref Reference to additional settings for the E2E state machine.
maxDelta Counter PositiveInteger 0..1 attr Maximum allowed difference between two counter values of two consecutively received valid messages. For example, if the receiver gets data with counter 1 and Max DeltaCounter is 3, then at the next reception the receiver can accept Counters with values 2, 3 or 4.
maxErrorState Init PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_INIT.
maxErrorState Invalid PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_INVALID.
maxErrorState Valid PositiveInteger 0..1 attr Maximal number of checks in which ProfileStatus equal to E2E_P_ERROR was determined, within the last Window Size checks, for the state E2E_SM_VALID.
maxNoNewOr RepeatedData PositiveInteger 0..1 attr The maximum allowed amount of consecutive failed counter checks.
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.
minOkState Invalid 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_INVALID.
minOkState Valid 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_VALID.
offset PositiveInteger 0..1 attr Offset of the E2E header in the Data[] array in bits.
profileBehavior EndToEndProfile BehaviorEnum 0..1 attr Behavior of the check functionality
profileName NameToken 0..1 attr Definition of the E2E profile.
syncCounterInit PositiveInteger 0..1 attr Number of checks 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.
upperHeader BitsToShift PositiveInteger 0..1 attr This attribute describes the number of upper-header bits to be shifted. value = 0 or not present: shift of upper header is NOT performed. value > 0: the E2E Transformer on the protect-side, takes the first upperHeaderBitsToShift bits from the upper buffer (e.g. SOME/IP header part generated by SOME/IP transformer) and shifts them towards the lower bytes and bits within the Data[] for the length of the E2E header (e.g. 12 bytes in case of E2E Profile 4). This means the shift distance is fixed - it depends on the E2E header size - what is configured here is the number of bits that are to be shifted. This option is defined because the Some/IP header generated by SOME/IP transformer shall be, due to compatibility between non-protected and E2E-protected communication, at the same position, which is before E2E header.
windowSizeInit PositiveInteger 0..1 attr Size of the monitoring window of state Init for the E2E state machine.
Class EndToEndTransformationDescription
windowSize Invalid PositiveInteger 0..1 attr Size of the monitoring window of state Invalid for the E2E state machine.
windowSize Valid PositiveInteger 0..1 attr Size of the monitoring window of state Valid for the E2E state machine.

表E.25:FlatInstanceDescriptor(FlatInstanceDescriptor)

| 包 | M2::AUTOSARTemplates::CommonStructure::FlatMap | | 说明 | Represents exactly one node (e.g. a component instance or data element) of the instance tree of a software system. The purpose of this element is to map the various nested representations of this instance to a flat representation and assign a unique name (shortName) to it. Use cases: • Specify unique names of measurable data to be used by MCD tools • Specify unique names of calibration data to be used by MCD tool • Specify a unique name for an instance of a component prototype in the ECU extract of the system description | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | FlatMap.instance |

属性 类型 多重性 种类 备注
ecuExtract Reference AtpFeature 0..1 iref Refers to the instance in the ECU extract. This is valid only, if the FlatMap is used in the context of an ECU extract. The reference shall be such that it uniquely defines the object instance. For example, if a data prototype is declared as a role within an SwcInternalBehavior, it is not enough to state the SwcInternalBehavior as context and the aggregated data prototype as target. In addition, the reference shall also include the complete path identifying instance of the component prototype and the Atomic SoftwareComponentType, which is refered by the particular SwcInternalBehavior. Tags: xml.sequenceOffset=40 InstanceRef implemented by: AnyInstanceRef
role Identifier 0..1 attr The role denotes the particular role of the downstream memory location described by this FlatInstanceDescriptor. It applies to use case where one upstream object results in multiple downstream objects, e.g. ModeDeclaration GroupPrototypes which are measurable. In this case the RTE will provide locations for current mode, previous mode and next mode.
rtePluginProps RtePluginProps 0..1 aggr The properties of a communication graph with respect to the utilization of RTE Implementation Plug-in. Stereotypes: atpSplitable Tags: atp.Splitkey=rtePluginProps
swDataDef Props SwDataDefProps 0..1 aggr The properties of this FlatInstanceDescriptor. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps

表E.26:FlatInstanceDescriptor(FlatInstanceDescriptor)

属性 类型 多重性 种类 备注
upstream Reference AtpFeature 0..1 iref Refers to the instance in the context of an "upstream" description, which could be: the SYSTEM_ DESCRIPTION, or SYSTEM_EXTRACT, or ECU_ SYSTEM_DESCRIPTION, or SW_CLUSTER_SYSTEM_ DESCRIPTION, or the basic software module description (in this case only the target reference of the AnyInstance Ref is needed), or (if a flat map is used in preliminary context) a description of an atomic component or composition. This reference is optional in case the flat map is used in ECU context. The reference shall be such that it uniquely defines the object instance in the given context. For example, if a data prototype is declared as a role within an SwcInternal Behavior, it is not enough to state the Swc Internal Behavior as context and the aggregated data prototype as target. In addition, the reference shall also include the complete path identifying the instance of the component prototype that contains the particular instance of Swc InternalBehavior. Tags: xml.sequenceOffset=20 InstanceRef implemented by: AnyInstanceRef

表E.27:HwDescriptionEntity(HwDescriptionEntity)

| 包 | M2::AUTOSARTemplates::EcuResourceTemplate | | 说明 | This meta-class represents the ability to describe a hardware entity. | | 基类 | ARObject , Referrable | | 子类 | HwElement, HwPin, HwPinGroup, HwType |

属性 类型 多重性 种类 备注
hwAttribute Value HwAttributeValue * aggr This aggregation represents a particular hardware attribute value. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=hwAttributeValue, hwAttributeValue.variation Point.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=50
hwCategory HwCategory * ref One of the associations representing one particular category of the hardware entity. Tags: xml.sequenceOffset=30
hwType HwType 0..1 ref This association is used to assign an optional HwType which contains the common attribute values for all occurences of this HwDescriptionEntity. Note that Hw Types can not be redefined and therefore shall not have a hwType reference.

表E.28:HwElement(HwElement)

| 包 | M2::AUTOSARTemplates::EcuResourceTemplate | | 说明 | This represents the ability to describe Hardware Elements on an instance level. The particular types of hardware are distinguished by the category. This category determines the applicable attributes. The possible categories and attributes are defined in HwCategory. Tags: atp.recommendedPackage=HwElements | | 基类 | ARElement , ARObject , CollectableElement , HwDescriptionEntity , Identifiable , MultilanguageReferrable , PackageableElement , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
hwElement Connection HwElementConnector * aggr This represents one particular connection between two hardware elements. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=hwElementConnection, hwElement Connection.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=110
hwPinGroup HwPinGroup * aggr This aggregation is used to describe the connection facilities of a hardware element. Note that hardware element has no pins but only pingroups. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=hwPinGroup.shortName, hwPin Group.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=90
nestedElement HwElement * ref This association is used to establish hierarchies of hw elements. Note that one particular HwElement can be target of this association only once. I.e. multiple instantiation of the same HwElement is not supported (at any hierarchy level). Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=nestedElement.hwElement, nested Element.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=70

表E.29:HwType(HwType)

| 包 | M2::AUTOSARTemplates::EcuResourceTemplate::HwElementCategory | | 说明 | This represents the ability to describe Hardware types on an abstract level. The particular types of hardware are distinguished by the category. This category determines the applicable attributes. The possible categories and attributes are defined in HwCategory. Tags: atp.recommendedPackage=HwTypes | | 基类 | ARElement , ARObject , CollectableElement , HwDescriptionEntity , Identifiable , MultilanguageReferrable PackageableElement , Referrable | | 聚合于 | ARPackage.element | | 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication | | 说明 | Signal of the Interaction Layer. The RTE supports a "signal fan-out" where the same System Signal is sent in different SignalIPdus to multiple receivers. To support the RTE "signal fan-out" each SignalIPdu contains ISignals. If the same System Signal is to be mapped into several SignalIPdus there is one ISignal needed for each ISignalToIPduMapping. ISignals describe the Interface between the Precompile configured RTE and the potentially Postbuild configured Com Stack (see ECUC Parameter Mapping). In case of the SystemSignalGroup an ISignal shall be created for each SystemSignal contained in the SystemSignalGroup. | | 基类 | ARElement , ARObject , CollectableElement , FibexElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
Class ISignal
data Transformation DataTransformation 0..1 ref Optional reference to a DataTransformation which represents the transformer chain that is used to transform the data that shall be placed inside this ISignal. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=dataTransformation.dataTransformation, dataTransformation.variationPoint.shortLabel vh.latestBindingTime=codeGenerationTime
dataTypePolicy DataTypePolicyEnum 0..1 attr With the aggregation of SwDataDefProps an ISignal specifies how it is represented on the network. This representation follows a particular policy. Note that this causes some redundancy which is intended and can be used to support flexible development methodology as well as subsequent integrity checks. If the policy "networkRepresentationFromComSpec" is chosen the network representation from the ComSpec that is aggregated by the PortPrototype shall be used. If the "override" policy is chosen the requirements specified in the PortInterface and in the ComSpec are not fulfilled by the networkRepresentationProps. In case the System Description doesn't use a complete Software Component Description (VFB View) the "legacy" policy can be chosen.
initValue ValueSpecification 0..1 aggr Optional definition of a ISignal's initValue in case the System Description doesn't use a complete Software Component Description (VFB View). This supports the inclusion of legacy system signals. This value can be used to configure the Signal's "Init Value". If a full DataMapping exist for the SystemSignal this information may be available from a configured Sender ComSpec and ReceiverComSpec. In this case the initvalues in SenderComSpec and/or ReceiverComSpec override this optional value specification. Further restrictions apply from the RTE specification.
iSignalProps ISignalProps 0..1 aggr Additional optional ISignal properties that may be stored in different files. Stereotypes: atpSplitable Tags: atp.Splitkey=iSignalProps
iSignalType ISignalTypeEnum 0..1 attr This attribute defines whether this iSignal is an array that results in a UINT8_N / UINT8_DYN ComSignalType in the COM configuration or a primitive type.
Class ISignal
length UnlimitedInteger 0..1 attr Size of the signal in bits. The size needs to be derived from the mapped VariableDataPrototype according to the mapping of primitive DataTypes to BaseTypes as used in the RTE. Indicates maximum size for dynamic length signals. The ISignal length of zero bits is allowed.
network Representation Props SwDataDefProps 0..1 aggr Specification of the actual network representation. The usage of SwDataDefProps for this purpose is restricted to the attributes compuMethod and baseType. The optional baseType attributes "memAllignment" and "byteOrder" shall not be used. The attribute "dataTypePolicy" in the SystemTemplate element defines whether this network representation shall be ignored and the information shall be taken over from the network representation of the ComSpec. If "override" is chosen by the system integrator the network representation can violate against the requirements defined in the PortInterface and in the network representation of the ComSpec. In case that the System Description doesn't use a complete Software Component Description (VFB View) this element is used to configure "ComSignalDataInvalid Value" and the Data Semantics. Stereotypes: atpSplitable Tags: atp.Splitkey=networkRepresentationProps
systemSignal SystemSignal 0..1 ref Reference to the System Signal that is supposed to be transmitted in the ISignal.
timeout Substitution Value ValueSpecification 0..1 aggr Defines and enables the ComTimeoutSubstituition for this ISignal.
transformation ISignalProps TransformationISignal Props * aggr A transformer chain consists of an ordered list of transformers. The ISignal specific configuration properties for each transformer are defined in the TransformationISignalProps class. The transformer configuration properties that are common for all ISignals are described in the TransformationTechnology class. Stereotypes: atpSplitable Tags: atp.Splitkey=transformationISignalProps

表E.30:ISignalGroup(ISignalGroup)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication | | 说明 | SignalGroup of the Interaction Layer. The RTE supports a "signal fan-out" where the same System Signal Group is sent in different SignalIPdus to multiple receivers. An ISignalGroup refers to a set of ISignals that shall always be kept together. A ISignalGroup represents a COM Signal Group. Therefore it is recommended to put the ISignalGroup in the same Package as ISignals (see atp.recommendedPackage) Tags: atp.recommendedPackage=ISignalGroup | | 基类 | ARElement , ARObject , CollectableElement , FibexElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
Class ISignalGroup
comBased SignalGroup Transformation DataTransformation 0..1 ref Optional reference to a DataTransformation which represents the transformer chain that is used to transform the data that shall be placed inside this ISignalGroup based on the COMBasedTransformer approach. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=comBasedSignalGroupTransformation.data Transformation, comBasedSignalGroup Transformation.variationPoint.shortLabel vh.latestBindingTime=codeGenerationTime
iSignal ISignal * ref Reference to a set of ISignals that shall always be kept together.
systemSignal Group SystemSignalGroup 0..1 ref Reference to the SystemSignalGroup that is defined on VFB level and that is supposed to be transmitted in the ISignalGroup.
transformation ISignalProps TransformationISignal Props * aggr A transformer chain consists of an ordered list of transformers. The ISignalGroup specific configuration properties for each transformer are defined in the TransformationISignalProps class. The transformer configuration properties that are common for all ISignal Groups are described in the TransformationTechnology class. Stereotypes: atpSplitable Tags: atp.Splitkey=transformationISignalProps

表E.31:ISignalIPdu(ISignalIPdu)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication | | 说明 | Represents the IPdus handled by Com. The ISignalIPdu assembled and disassembled in AUTOSAR COM consists of one or more signals. In case no multiplexing is performed this IPdu is routed to/from the Interface Layer. A maximum of one dynamic length signal per IPdu is allowed. Tags: atp.recommendedPackage=Pdus | | 基类 | ARElement , ARObject , CollectableElement , FibexElement , IPdu , Identifiable , MultilanguageReferrable , PackageableElement , Pdu , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
iPduTiming Specification IPduTiming 0..1 aggr Timing specification for Com IPdus (Transmission Modes). This information is mandatory for the sender in a System Extract. This information may be omitted on receivers in a System Extract. atpVariation: The timing of a Pdu can vary. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=iPduTimingSpecification, iPduTiming Specification.variationPoint.shortLabel vh.latestBindingTime=postBuild
Class ISignalIPdu
iSignalToPdu Mapping ISignalToIPduMapping * aggr Definition of SignalToIPduMappings included in the Signal IPdu. atpVariation: The content of a PDU can be variable. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=iSignalToPduMapping.shortName, iSignalTo PduMapping.variationPoint.shortLabel vh.latestBindingTime=postBuild
unusedBit Pattern Integer 0..1 attr AUTOSAR COM and AUTOSAR IPDUM are filling not used areas of an IPDU with this bit-pattern. This attribute is mandatory to avoid undefined behavior. This byte-pattern will be repeated throughout the IPdu.

表E.32:Identifiable(Identifiable)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::Identifiable | | 说明 | Instances of this class can be referred to by their identifier (within the namespace borders). In addition to this, Identifiables are objects which contribute significantly to the overall structure of an AUTOSAR description. In particular, Identifiables might contain Identifiables. | | 基类 | ARObject , MultilanguageReferrable , Referrable | | 子类 | ARPackage, AbstractDoIpLogicAddressProps , AbstractEvent , AbstractImplementationDataTypeElement , AbstractSecurityEventFilter , AbstractSecurityIdsmInstanceFilter , AbstractServiceInstance , AppOsTask ProxyToEcuTaskProxyMapping, ApplicationEndpoint, ApplicationError, ApplicationPartitionToEcuPartition Mapping, AppliedStandard, AsynchronousServerCallResultPoint, AtpBlueprint , AtpBlueprintable , Atp Classifier , AtpFeature , AutosarOperationArgumentInstance, AutosarVariableInstance, BinaryManifest AddressableObject , BinaryManifestItemDefinition, BinaryManifestResource , BinaryManifestResource Definition, BlockState, BswInternalTriggeringPoint, BswModuleDependency, BuildActionEntity , Build ActionEnvironment, CanTpAddress, CanTpChannel, CanTpNode, Chapter, ClassContentConditional, ClientIdDefinition, ClientServerOperation, Code, CollectableElement , ComManagementMapping, Comm ConnectorPort , CommunicationConnector , CommunicationController , Compiler, ConsistencyNeeds, ConsumedEventGroup, CouplingElementAbstractDetails , CouplingPort, CouplingPortAbstractShaper , CouplingPortStructuralElement , CpSoftwareClusterResource , CpSoftwareClusterResourceToApplication PartitionMapping, CpSoftwareClusterToApplicationPartitionMapping, CpSoftwareClusterToEcuInstance Mapping, CpSoftwareClusterToResourceMapping, CryptoServiceMapping , DataPrototypeGroup, Data Transformation, DdsCpDomain, DdsCpPartition, DdsCpQosProfile, DdsCpTopic, DependencyOnArtifact, DiagEventDebounceAlgorithm , DiagnosticAuthTransmitCertificateEvaluation, DiagnosticConnected Indicator, DiagnosticDataElement, DiagnosticDebounceAlgorithmProps, DiagnosticFunctionInhibit Source, DiagnosticParameterElement, DiagnosticRoutineSubfunction , DltApplication, DltArgument, Dlt LogChannel, DltMessage, DoIpInterface, DoIpLogicAddress, DoIpRoutingActivation, ECUMapping, EOC ExecutableEntityRefAbstract , EcuPartition, EcucContainerValue, EcucDefinitionElement , Ecuc DestinationUriDef, EcucEnumerationLiteralDef, EcucQuery, EcucValidationCondition, EndToEnd Protection, EthernetWakeupSleepOnDatalineConfig, EventHandler, ExclusiveArea, ExecutableEntity , ExecutionTime , FMAttributeDef, FMFeatureMapAssertion, FMFeatureMapCondition, FMFeatureMap Element, FMFeatureRelation, FMFeatureRestriction, FMFeatureSelection, FlatInstanceDescriptor, FlexrayArTpNode, FlexrayTpConnectionControl, FlexrayTpNode, FlexrayTpPduPool, FrameTriggering , GeneralParameter, GlobalTimeGateway, GlobalTimeMaster , GlobalTimeSlave , HeapUsage , HwAttribute Def, HwAttributeLiteralDef, HwPin, HwPinGroup, IEEE1722TpAcfBus , IEEE1722TpAcfBusPart , IPSec Rule, IPv6ExtHeaderFilterList, ISignalToIPduMapping, ISignalTriggering, IdentCaption , ImpositionTime, InternalTriggeringPoint, J1939SharedAddressCluster, J1939TpNode, Keyword, LifeCycleState, Lin ScheduleTable, LinTpNode, Linker, MacMulticastGroup, MacSecKayParticipant, McDataInstance, MemorySection, ModeDeclaration, ModeDeclarationMapping, ModeSwitchPoint, NetworkEndpoint, Nm Cluster , NmEcu, NmNode , NvBlockDescriptor, PackageableElement , ParameterAccess, PduActivation RoutingGroup, PduToFrameMapping, PduTriggering, PerInstanceMemory, PhysicalChannel , Port ElementToCommunicationResourceMapping, PortGroup, PortInterfaceMapping , PossibleErrorReaction, ResourceConsumption, RootSwCompositionPrototype, RptComponent, RptContainer, RptExecutable Entity, RptExecutableEntityEvent, RptExecutionContext, RptProfile, RptServicePoint, RteEventIn CompositionSeparation, RteEventInCompositionToOsTaskProxyMapping, RteEventInSystemSeparation, glyph[triangleinv] |

属性 类型 多重性 种类 备注
Class Identifiable (abstract)
glyph[triangle] RteEventInSystemToOsTaskProxyMapping, RunnableEntityGroup, SdgAttribute , SdgClass, Secure CommunicationAuthenticationProps, SecureCommunicationFreshnessProps, SecurityEventContext Props, ServerCallPoint , ServiceNeeds , SignalServiceTranslationElementProps, SignalServiceTranslation EventProps, SignalServiceTranslationProps, SocketAddress, SomeipTpChannel, SpecElement Reference , StackUsage , StaticSocketConnection, StructuredReq, SwGenericAxisParamType, SwService Arg, SwcServiceDependency, SwcToApplicationPartitionMapping, SwcToEcuMapping, SwcToImpl Mapping, SwitchAsynchronousTrafficShaperGroupEntry, SwitchFlowMeteringEntry, SwitchStreamFilter ActionDestPortModification, SwitchStreamFilterEntry, SwitchStreamFilterRule, SwitchStreamGateEntry, SwitchStreamIdentification, SystemMapping, SystemSignalGroupToCommunicationResourceMapping, SystemSignalToCommunicationResourceMapping, TDCpSoftwareClusterMapping, TDCpSoftware ClusterResourceMapping, TcpOptionFilterList, TimingClock , TimingClockSyncAccuracy, Timing Condition, TimingConstraint , TimingDescription , TimingExtensionResource, TimingModeInstance, Tls CryptoCipherSuite, TlsCryptoCipherSuiteProps, Topic1, TpAddress, TraceableTable, TraceableText, TracedFailure , TransformationProps , TransformationTechnology, Trigger, VariableAccess, VariationPoint
adminData AdminData 0..1 aggr This represents the administrative data for the identifiable object. Stereotypes: atpSplitable Tags: atp.Splitkey=adminData xml.sequenceOffset=-40
annotation Annotation * aggr Possibility to provide additional notes while defining a model element (e.g. the ECU Configuration Parameter Values). These are not intended as documentation but are mere design notes. Tags: xml.sequenceOffset=-25
category CategoryString 0..1 attr The category is a keyword that specializes the semantics of the Identifiable. It affects the expected existence of attributes and the applicability of constraints.
desc MultiLanguageOverview Paragraph 0..1 aggr This represents a general but brief (one paragraph) description what the object in question is about. It is only one paragraph! Desc is intended to be collected into overview tables. This property helps a human reader to identify the object in question. More elaborate documentation, (in particular how the object is built or used) should go to "introduction". Tags: xml.sequenceOffset=-60
introduction DocumentationBlock 0..1 aggr This represents more information about how the object in question is built or is used. Therefore it is a DocumentationBlock. Tags: xml.sequenceOffset=-30

glyph[triangle]

表E.33:Identifiable(Identifiable)

属性 类型 多重性 种类 备注
uuid String 0..1 attr The purpose of this attribute is to provide a globally unique identifier for an instance of a meta-class. The values of this attribute should be globally unique strings prefixed by the type of identifier. For example, to include a DCE UUID as defined by The Open Group, the UUID would be preceded by "DCE:". The values of this attribute may be used to support merging of different AUTOSAR models. The form of the UUID (Universally Unique Identifier) is taken from a standard defined by the Open Group (was Open Software Foundation). This standard is widely used, including by Microsoft for COM (GUIDs) and by many companies for DCE, which is based on CORBA. The method for generating these 128-bit IDs is published in the standard and the effectiveness and uniqueness of the IDs is not in practice disputed. If the id namespace is omitted, DCE is assumed. An example is "DCE:2fac1234-31f8-11b4-a222-08002b34c003". The uuid attribute has no semantic meaning for an AUTOSAR model and there is no requirement for AUTOSAR tools to manage the timestamp. Tags: xml.attribute=true

表E.34:McDataInstance(McDataInstance)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport | | 说明 | Describes the specific properties of one data instance in order to support measurement and/or calibration of this data instance. The most important attributes are: • Its shortName is copied from the ECU Flat map (if applicable) and will be used as identifier and for display by the MC system. • The category is copied from the corresponding data type (ApplicationDataType if defined, otherwise ImplementationDataType) as far as applicable. • The symbol is the one used in the programming language. It will be used to find out the actual memory address by the final generation tool with the help of linker generated information. It is assumed that in the M1 model this part and all the aggregated and referred elements (with the exception of the Flat Map and the references from ImplementationElementInParameterInstanceRef and McAccessDetails) are completely generated from "upstream" information. This means, that even if an element like e.g. a CompuMethod is only used via reference here, it will be copied into the M1 artifact | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | McDataInstance.subElement, McSupportData.mcParameterInstance, McSupportData.mcVariable Instance |

属性 类型 多重性 种类 备注
arraySize PositiveInteger 0..1 attr The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of number of elements.
displayIdentifier McdIdentifier 0..1 attr An optional attribute to be used to set the ASAM ASAP2 DISPLAY_IDENTIFIER attribute.

glyph[triangle]

表E.35:McDataInstance(McDataInstance)

属性 类型 多重性 种类 备注
flatMapEntry FlatInstanceDescriptor 0..1 ref Reference to the corresponding entry in the ECU Flat Map. This allows to trace back to the original specification of the generated data instance. This link shall be added by the RTE generator mainly for documentation purposes. The reference is optional because • The McDataInstance may represent an array or struct in which only the subElements correspond to FlatMap entries. • The McDataInstance may represent a task local buffer for rapid prototyping access which is different from the "main instance" used for measurement access.
instanceIn Memory ImplementationElement InParameterInstance Ref 0..1 aggr Reference to the corresponding data instance in the description of calibration data structures published by the RTE generator. This is used to support emulation methods inside the ECU, it is not required for A2L generation.
mcDataAccess Details McDataAccessDetails 0..1 aggr Refers to "upstream" information on how the RTE uses this data instance. Use Case: Rapid Prototyping
mcData Assignment RoleBasedMcData Assignment * aggr An assignment between McDataInstances. This supports the indication of related McDataElement implementing the of "RP global buffer", "RP global measurement buffer", "RP enabler flag".
resulting Properties SwDataDefProps 0..1 aggr These are the generated properties resulting from decisions taken by the RTE generator for the actually implemented data instance. Only those properties are relevant here, which are needed for the measurement and calibration system. Stereotypes: atpSplitable Tags: atp.Splitkey=resultingProperties
resultingRptSw Prototyping Access RptSwPrototyping Access 0..1 aggr Describes the implemented accessibility of data and modes by the rapid prototyping tooling.
role Identifier 0..1 attr An optional attribute to be used for additional information on the role of this data instance, for example in the context of rapid prototyping.
rptImplPolicy RptImplPolicy 0..1 aggr Describes the implemented code preparation for rapid prototyping at data accesses for a hook based bypassing.
subElement (ordered) McDataInstance * aggr This relation indicates, that the target element is part of a "struct" which is given by the source element. This information will be used by the final generator to set up the correct addressing scheme. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=subElement.shortName, sub Element.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
Class McDataInstance
symbol SymbolString 0..1 attr This String is used to determine the memory address during final generation of the MC configuration data (e.g. "A2L" file) . It shall be the name of the element in the programming language such that it can be identified in linker generated information. In case the McDataInstance is part of composite data in the programming language, the symbol String may include parts denoting the element context, unless the context is given by the symbol attribute of an enclosing McDataInstance. This means in particular for the C language that the "." character shall be used as a separator between the name of a "struct" variable the name of one of its elements. The symbol can differ from the shortName in case of generated C data declarations. It is an optional attribute since it may be missing in case the instance represents an element (e.g. a single array element) which has no name in the linker map. Stereotypes: atpSplitable Tags: atp.Splitkey=symbol

表E.36:McSupportData(McSupportData)

| 包 | M2::AUTOSARTemplates::CommonStructure::MeasurementCalibrationSupport | | 说明 | Root element for all measurement and calibration support data related to one Implementation artifact on an ECU. There shall be one such element related to the RTE implementation (if it owns MC data) and a separate one for each module or component, which owns private MC data. | | 基类 | ARObject | | 聚合于 | Implementation .mcSupport |

属性 类型 多重性 种类 备注
emulation Support McSwEmulationMethod Support * aggr Describes the calibration method used by the RTE. This information is not needed for A2L generation, but to setup software emulation in the ECU. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=emulationSupport, emulation Support.variationPoint.shortLabel vh.latestBindingTime=preCompileTime
mcParameter Instance McDataInstance * aggr A data instance to be used for calibration. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=mcParameterInstance.shortName, mc ParameterInstance.variationPoint.shortLabel vh.latestBindingTime=postBuild
mcVariable Instance McDataInstance * aggr A data instance to be used for measurement. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=mcVariableInstance.shortName, mcVariable Instance.variationPoint.shortLabel vh.latestBindingTime=postBuild
measurable System ConstantValues SwSystemconstant ValueSet * ref Sets of system constant values to be transferred to the MCD system, because the system constants have been specified with "swCalibrationAccess" = readonly.
Class McSupportData
rptSupportData RptSupportData 0..1 aggr The rapid prototyping support data belonging to this implementation. The aggregtion is <> because in case of an already exisiting BSW Implementation model, this description will be added later in the process, namely at code generation time. Stereotypes: atpSplitable Tags: atp.Splitkey=rptSupportData

表E.37:MultilanguageReferrable(MultilanguageReferrable)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::Identifiable | | 说明 | Instances of this class can be referred to by their identifier (while adhering to namespace borders). They also may have a longName. But they are not considered to contribute substantially to the overall structure of an AUTOSAR description. In particular it does not contain other Referrables. | | 基类 | ARObject , Referrable | | 子类 | Caption, DefItem, DocumentationContext, Identifiable , SdgCaption, TraceReferrable , Traceable |

属性 类型 多重性 种类 备注
longName MultilanguageLong Name 0..1 aggr This specifies the long name of the object. Long name is targeted to human readers and acts like a headline.

表E.38:PostBuildVariantCriterionValueSet(PostBuildVariantCriterionValueSet)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This meta-class represents the ability to denote one set of postBuildVariantCriterionValues. Tags: atp.recommendedPackage=PostBuildVariantCriterionValueSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
postBuildVariant CriterionValue PostBuildVariant CriterionValue * aggr This is is one particular postbuild variant criterion/value pair being part of the PostBuildVariantSet.

表E.39:ProvidedServiceInstance(ProvidedServiceInstance)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::Fibex4Ethernet::ServiceInstances | | 说明 | Service instances that are provided by the ECU that is connected via the ApplicationEndpoint to a CommunicationConnector. | | 基类 | ARObject , AbstractServiceInstance , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | ApplicationEndpoint.providedServiceInstance, ServiceInstanceCollectionSet.serviceInstance |

属性 类型 多重性 种类 备注
Class ProvidedServiceInstance
allowedService Consumer NetworkEndpoint * ref NetworkEndpoints on which the ConsumedService Instances that are communicating with this Provided ServiceInstance are allowed to be located so that the ACL check in the ServiceDiscovery is successful and the connection is allowed to be established. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=allowedServiceConsumer.networkEndpoint, allowedServiceConsumer.variationPoint.shortLabel atp.Status=draft vh.latestBindingTime=postBuild
autoAvailable Boolean 0..1 attr Defines that this ProvidedServiceInstance shall be offered by the service discovery at ECU start.
eventHandler EventHandler * aggr Collection of event groups provided by the Provided ServiceInstance Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=eventHandler.shortName, event Handler.variationPoint.shortLabel vh.latestBindingTime=postBuild
instance Identifier PositiveInteger 0..1 attr Instance identifier. Can be used for e.g. service discovery to identify the instance of the service.
loadBalancing Priority PositiveInteger 0..1 attr Defines the value to be used for load balancing priority in the service offer. Lower value means higher priority.
loadBalancing Weight PositiveInteger 0..1 attr Defines the value to be used for load balancing weight in the service offer. Higher value means higher probability to be chosen.
localUnicast Address ApplicationEndpoint 0..2 ref The local address over which the PSI is provided (udp, tcp or both). Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=localUnicastAddress.applicationEndpoint, localUnicastAddress.variationPoint.shortLabel vh.latestBindingTime=postBuild
minorVersion PositiveInteger 0..1 attr Minor Version of the Service that is provided by this ProvidedServiceInstance.
priority PositiveInteger 0..1 attr Defines the frame priority where values from 0 (best effort) to 7 (highest) are allowed.
remoteMulticast Subscription Address ApplicationEndpoint * ref This reference defines the remote multicast subscribed addresses of service consumers. This reference shall ONLY be used if the remote address of the clients is determined from the configuration and not at runtime. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=remoteMulticastSubscription Address.applicationEndpoint, remoteMulticast SubscriptionAddress.variationPoint.shortLabel vh.latestBindingTime=postBuild
remoteUnicast Address ApplicationEndpoint * ref This reference defines the remote addresses of service consumers. This reference shall ONLY be used if the remote address of the clients is determined from the configuration and not at runtime. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=remoteUnicastAddress.applicationEndpoint, remoteUnicastAddress.variationPoint.shortLabel vh.latestBindingTime=postBuild

表E.40:ProvidedServiceInstance(ProvidedServiceInstance)

属性 类型 多重性 种类 备注
sdServerConfig SdServerConfig 0..1 aggr Service Discovery Server configuration. Tags: atp.Status=obsolete
sdServerTimer Config SomeipSdServer ServiceInstanceConfig 0..1 ref Server specific configuration settings relevant for the SOME/IP service discovery. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=sdServerTimerConfig.someipSdServer ServiceInstanceConfig, sdServerTimerConfig.variation Point.shortLabel vh.latestBindingTime=postBuild
serviceIdentifier PositiveInteger 0..1 attr This attribute represents the ability to describe the SOME/ IP service ID that is offered.

表E.41:Referrable(Referrable)

| 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::Identifiable | | 说明 | Instances of this class can be referred to by their identifier (while adhering to namespace borders). | | 基类 | ARObject | | 子类 | AtpDefinition , BswDistinguishedPartition, BswModuleCallPoint , BswModuleClientServerEntry, Bsw VariableAccess, CouplingPortTrafficClassAssignment, DiagnosticEnvModeElement , EthernetPriority Regeneration, ExclusiveAreaNestingOrder, HwDescriptionEntity , ImplementationProps , LinSlaveConfig Ident, ModeTransition, MultilanguageReferrable , PncMappingIdent, SingleLanguageReferrable , SoConI PduIdentifier, SocketConnectionBundle, TimeSyncServerConfiguration, TpConnectionIdent | | 包 | M2::AUTOSARTemplates::SystemTemplate | | 说明 | The RootSwCompositionPrototype represents the top-level-composition of software components within a given System. According to the use case of the System, this may for example be a more or less complete VFB description, the software of a System Extract or the software of a flat ECU Extract with only atomic SWCs. Therefore the RootSwComposition will only occasionally contain all atomic software components that are used in a complete VFB System. The OEM is primarily interested in the required functionality and the interfaces defining the integration of the Software Component into the System. The internal structure of such a component contains often substantial intellectual property of a supplier. Therefore a top-level software composition will often contain empty compositions which represent subsystems. The contained SwComponentPrototypes are fully specified by their SwComponentTypes (including Port Prototypes, PortInterfaces, VariableDataPrototypes, SwcInternalBehavior etc.), and their ports are interconnected using SwConnectorPrototypes. | | 基类 | ARObject , AtpFeature , AtpPrototype , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | AtpClassifier .atpFeature, System.rootSoftwareComposition |

属性 类型 多重性 种类 备注
shortName Identifier 1 attr This specifies an identifying shortName for the object. It needs to be unique within its context and is intended for humans but even more for technical reference. Stereotypes: atpIdentityContributor Tags: xml.enforceMinMultiplicity=true xml.sequenceOffset=-100
shortName Fragment ShortNameFragment * aggr This specifies how the Referrable.shortName is composed of several shortNameFragments. Tags: xml.sequenceOffset=-90
Class RootSwCompositionPrototype
calibration ParameterValue Set CalibrationParameter ValueSet * ref Used CalibrationParameterValueSet for instance specific initialization of calibration parameters. Stereotypes: atpSplitable Tags: atp.Splitkey=calibrationParameterValueSet
flatMap FlatMap 0..1 ref The FlatMap used in the scope of this RootSw CompositionPrototype. Stereotypes: atpSplitable Tags: atp.Splitkey=flatMap
software Composition CompositionSw ComponentType 0..1 tref We assume that there is exactly one top-level composition that includes all Component instances of the system. Stereotypes: isOfType

表E.42:ScaleConstr(ScaleConstr)

| 包 | M2::MSR::AsamHdo::Constraints::GlobalConstraints | | 说明 | This meta-class represents the ability to specify constraints as a list of intervals (called scales). Tags: atp.Status=obsolete | | 基类 | ARObject | | 聚合于 | InternalConstrs.scaleConstr, PhysConstrs.scaleConstr |

属性 类型 多重性 种类 备注
desc MultiLanguageOverview Paragraph 0..1 aggr represents a general but brief description of the object in question. Tags: xml.sequenceOffset=30
lowerLimit Limit 0..1 attr This specifies the lower limit of the scale. Stereotypes: atpVariation Tags: atp.Status=obsolete vh.latestBindingTime=preCompileTime xml.sequenceOffset=40

表E.43:ScaleConstr(ScaleConstr)

属性 类型 多重性 种类 备注
shortLabel Identifier 0..1 attr This element specifies a short name for the scaleConstr. This can for example be used to create more specific messages of a constraint checker. The constraints cannot be associated in the meta-model, therefore shortLabel is somehow a substitute for shortName. Tags: atp.Status=obsolete xml.sequenceOffset=20
upperLimit Limit 0..1 attr This specifies the upper limit of a the scale. Stereotypes: atpVariation Tags: atp.Status=obsolete vh.latestBindingTime=preCompileTime xml.sequenceOffset=50
validity ScaleConstrValidity Enum 0..1 attr Specifies if the values defined by the scales are considered to be valid. If the attribute is missing then the default value is "VALID". Tags: atp.Status=obsolete xml.attribute=true

表E.44:Sdg(Sdg)

| 包 | M2::MSR::AsamHdo::SpecialData | | 说明 | Sdg (SpecialDataGroup) is a generic model which can be used to keep arbitrary information which is not explicitly modeled in the meta-model. Sdg can have various contents as defined by sdgContentsType. Special Data should only be used moderately since all elements should be defined in the meta-model. Thereby SDG should be considered as a temporary solution when no explicit model is available. If an sdg Caption is available, it is possible to establish a reference to the sdg structure. | | 基类 | ARObject | | 聚合于 | AdminData.sdg, BuildActionEnvironment.sdg, BuildActionInvocator.sdg, BuildActionIoElement.sdg, File InfoComment.sdg, RptHook.sdg, SdgContents.sdg, VariationPoint.sdg |

属性 类型 多重性 种类 备注
gid NameToken 1 attr This attributes specifies an identifier. Gid comes from the SGML/XML-Term "Generic Identifier" which is the element name in XML. The role of this attribute is the same as the name of an XML - element. Tags: xml.attribute=true
sdgCaption SdgCaption 0..1 aggr This aggregation allows to assign the properties of Identifiable to the sdg. By this, a shortName etc. can be assigned to the Sdg. Stereotypes: atpIdentityContributor Tags: xml.sequenceOffset=20
sdgContents Type SdgContents 0..1 aggr This is the content of the Sdg. Tags: xml.roleElement=false xml.roleWrapperElement=false xml.sequenceOffset=30 xml.typeElement=false xml.typeWrapperElement=false

表E.45:SenderReceiverToSignalMapping(SenderReceiverToSignalMapping)

| 包 | M2::AUTOSARTemplates::SystemTemplate::DataMapping | | 说明 | Mapping of a sender receiver communication data element to a signal. | | 基类 | ARObject , DataMapping | | 聚合于 | SystemMapping.dataMapping |

属性 类型 多重性 种类 备注
dataElement VariableDataPrototype 0..1 iref Reference to the data element. InstanceRef implemented by: VariableDataPrototypeIn SystemInstanceRef
senderToSignal TextTable Mapping TextTableMapping 0..1 aggr This mapping allows for the text-table translation between the sending DataPrototype that is defined in the Port Prototype and the physicalProps defined for the System Signal.
signalTo ReceiverText TableMapping TextTableMapping 0..1 aggr This mapping allows for the text-table translation between the physicalProps defined for the SystemSignal and a receiving DataPrototype that is defined in the Port Prototype.
systemSignal SystemSignal 0..1 ref Reference to the system signal used to carry the data element.

表E.46:SignalServiceTranslationProps(SignalServiceTranslationProps)

| 包 | M2::AUTOSARTemplates::CommonStructure::SignalServiceTranslation | | 说明 | This element allows to define the properties which are applicable for the signal/service translation service. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | SignalServiceTranslationPropsSet.signalServiceTranslationProps | | 包 | M2::AUTOSARTemplates::GenericStructure::GeneralTemplateClasses::PrimitiveTypes | | 说明 | This represents a String in which white-space shall be normalized before processing. For example: in order to compare two Strings: • leading and trailing white-space needs to be removed • consecutive white-space (blank, cr, lf, tab) needs to be replaced by one blank. Tags: xml.xsd.customType=STRING xml.xsd.type=string |

属性 类型 多重性 种类 备注
control Consumed EventGroup ConsumedEventGroup * ref Reference to the EventGroup which encapsulates the signal-based payload.
controlPnc PncMappingIdent * ref Reference to the PNCs which control the offer/subscribe behavior of the translated service instance. Stereotypes: atpSplitable Tags: atp.Splitkey=controlPnc
controlProvided EventGroup EventHandler * ref Reference to the provided event group (aka Event Handler) which is automatically available when service Control equals translationStart.
serviceControl SignalService TranslationControlEnum 0..1 attr Defines how the service instance control shall behave.
signalService Translation EventProps SignalService TranslationEventProps * aggr Defines properties for a single translated event.
Primitive String

表E.47:SwServiceArg(SwServiceArg)

| 包 | M2::MSR::DataDictionary::ServiceProcessTask | | 说明 | Specifies the properties of a data object exchanged during the call of an SwService, e.g. an argument or a return value. The SwServiceArg can also be used in the argument list of a C-macro. For this purpose the category shall be set to "MACRO". A reference to implementationDataType can optional be added if the actual argument has an implementationDataType. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable | | 聚合于 | BswModuleEntry.argument, BswModuleEntry.returnType |

属性 类型 多重性 种类 备注
direction ArgumentDirection Enum 0..1 attr Specifies the direction of the data transfer. The direction shall indicate the direction of the actual information that is being consumed by the caller and/or the callee, not the direction of formal arguments in C. The attribute is optional for backwards compatibility reasons. For example, if a pointer is used to pass a memory address for the expected result, the direction shall be "out". If a pointer is used to pass a memory address with content to be read by the callee, its direction shall be "in". Tags: xml.sequenceOffset=10
swArraysize ValueList 0..1 aggr This turns the argument of the service to an array. Tags: xml.sequenceOffset=20
swDataDef Props SwDataDefProps 0..1 aggr Data properties of this SwServiceArg. Stereotypes: atpSplitable Tags: atp.Splitkey=swDataDefProps xml.sequenceOffset=30

表E.48:SwSystemconstDependentFormula(SwSystemconstDependentFormula)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This class represents an expression depending on system constants. | | 基类 | ARObject , FormulaExpression | | 子类 | AttributeValueVariationPoint , BlueprintFormula, ConditionByFormula, FMFormulaByFeaturesAndSw Systemconsts |

属性 类型 多重性 种类 备注
Class <> SwSystemconstDependentFormula (abstract)
sysc SwSystemconst 0..1 ref This refers to a system constant. The internal (coded) value of the system constant shall be used. Tags: xml.sequenceOffset=50
syscString SwSystemconst 0..1 ref syscString indicates that the referenced system constant shall be evaluated as a string according to [TPS_SWCT_01431].

表E.49:SwSystemconstantValueSet(SwSystemconstantValueSet)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This meta-class represents the ability to specify a set of system constant values. Tags: atp.recommendedPackage=SwSystemconstantValueSets | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
sw Systemconstant Value SwSystemconstValue * aggr This is one particular value of a system constant.

表E.50:System(System)

| 包 | M2::AUTOSARTemplates::SystemTemplate | | 说明 | The top level element of the System Description. The System description defines five major elements: Topology, Software, Communication, Mapping and Mapping Constraints. The System element directly aggregates the elements describing the Software, Mapping and Mapping Constraints; it contains a reference to an ASAM FIBEX description specifying Communication and Topology. Tags: atp.recommendedPackage=Systems | | 基类 | ARElement , ARObject , AtpClassifier , AtpFeature , AtpStructureElement , CollectableElement , Identifiable , MultilanguageReferrable , PackageableElement , Referrable , UploadableDesignElement , UploadablePackageElement | | 聚合于 | ARPackage.element, AtpClassifier .atpFeature |

属性 类型 多重性 种类 备注
clientId DefinitionSet ClientIdDefinitionSet * ref Set of Client Identifiers that are used for inter-ECU client-server communication in the System.
containerIPdu HeaderByte Order ByteOrderEnum 0..1 attr Defines the byteOrder of the header in ContainerIPdus.
ecuExtract Version RevisionLabelString 0..1 attr Version number of the Ecu Extract.
Class System
fibexElement FibexElement * ref Reference to ASAM FIBEX elements specifying Communication and Topology. All Fibex Elements used within a System Description shall be referenced from the System Element. atpVariation: In order to describe a product-line, all Fibex Elements can be optional. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=fibexElement.fibexElement, fibex Element.variationPoint.shortLabel vh.latestBindingTime=postBuild
interpolation Routine MappingSet InterpolationRoutine MappingSet * ref This reference identifies the InterpolationRoutineMapping Sets that are relevant in the context of the enclosing System.
j1939Shared AddressCluster J1939SharedAddress Cluster * aggr Collection of J1939Clusters that share a common address space for the routing of messages. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=j1939SharedAddressCluster.shortName, j1939SharedAddressCluster.variationPoint.shortLabel vh.latestBindingTime=postBuild
mapping SystemMapping * aggr Aggregation of all mapping aspects (mapping of SW components to ECUs, mapping of data elements to signals, and mapping constraints). In order to support OEM / Tier 1 interaction and shared development for one common System this aggregation is atpSplitable and atpVariation. The content of System Mapping can be provided by several parties using different names for the SystemMapping. This element is not required when the System description is used for a network-only use-case. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=mapping.shortName, mapping.variation Point.shortLabel vh.latestBindingTime=postBuild
pncVector Length PositiveInteger 0..1 attr Length of the partial networking request release information vector (in bytes).
pncVectorOffset PositiveInteger 0..1 attr Absolute offset (with respect to the NM-PDU) of the partial networking request release information vector that is defined in bytes as an index starting with 0.
rootSoftware Composition RootSwComposition Prototype 0..1 aggr Aggregation of the root software composition, containing all software components in the System in a hierarchical structure. This element is not required when the System description is used for a network-only use-case. atpVariation: The RootSwCompositionPrototype can vary. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=rootSoftwareComposition.shortName, root SoftwareComposition.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime
Class System
swCluster CpSoftwareCluster * ref CP Software Clusters of this System Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=swCluster.cpSoftwareCluster, sw Cluster.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime
system Documentation Chapter * aggr Possibility to provide additional documentation while defining the System. The System documentation can be composed of several chapters. Stereotypes: atpSplitable; atpVariation Tags: atp.Splitkey=systemDocumentation.shortName, system Documentation.variationPoint.shortLabel vh.latestBindingTime=systemDesignTime xml.sequenceOffset=-10
systemVersion RevisionLabelString 0..1 attr Version number of the System Description.

表E.51:SystemSignal(SystemSignal)

| 包 | M2::AUTOSARTemplates::SystemTemplate::Fibex::FibexCore::CoreCommunication | | 说明 | The system signal represents the communication system's view of data exchanged between SW components which reside on different ECUs. The system signals allow to represent this communication in a flattened structure, with exactly one system signal defined for each data element prototype sent and received by connected SW component instances. Tags: atp.recommendedPackage=SystemSignals | | 基类 | ARElement , ARObject , CollectableElement , Identifiable , MultilanguageReferrable , Packageable Element , Referrable | | 聚合于 | ARPackage.element |

属性 类型 多重性 种类 备注
dynamicLength Boolean 0..1 attr The length of dynamic length signals is variable in run-time. Only a maximum length of such a signal is specified in the configuration (attribute length in ISignal element).
physicalProps SwDataDefProps 0..1 aggr Specification of the physical representation. Stereotypes: atpSplitable Tags: atp.Splitkey=physicalProps

表E.52:TransientFault(TransientFault)

| 包 | M2::AUTOSARTemplates::CommonStructure::ServiceNeeds | | 说明 | The reported failure is classified as runtime error. | | 基类 | ARObject , Identifiable , MultilanguageReferrable , Referrable , TracedFailure | | 聚合于 | ErrorTracerNeeds.tracedFailure |

属性 类型 多重性 种类 备注
possibleError Reaction PossibleErrorReaction * aggr Describes a possible error reactions for the transient fault handler.

表E.53:VariationPoint(VariationPoint)

| 包 | M2::AUTOSARTemplates::GenericStructure::VariantHandling | | 说明 | This meta-class represents the ability to express a "structural variation point". The container of the variation point is part of the selected variant if swSyscond evaluates to true and each postBuildVariant Criterion is fulfilled. | | 基类 | ARObject |

属性 类型 多重性 种类 备注
blueprint Condition DocumentationBlock 0..1 aggr This represents a description that documents how the variation point shall be resolved when deriving objects from the blueprint. Note that variationPoints are not allowed within a blueprintCondition. Tags: xml.sequenceOffset=28
desc MultiLanguageOverview Paragraph 0..1 aggr This allows to describe shortly the purpose of the variation point. Tags: xml.sequenceOffset=20
formalBlueprint Generator BlueprintGenerator 0..1 aggr This represents a description that documents how the variation point shall be resolved when deriving objects from the blueprint by using ARMQL. Note that variationPoints are not allowed within a formal BlueprintGenerator. Tags: atp.Status=draft xml.sequenceOffset=30
postBuildVariant Condition PostBuildVariant Condition * aggr This is the set of post build variant conditions which all shall be fulfilled in order to (postbuild) bind the variation point. Tags: xml.sequenceOffset=40
sdg Sdg 0..1 aggr An optional special data group is attached to every variation point. These data can be used by external software systems to attach application specific data. For example, a variant management system might add an identifier, an URL or a specific classifier. Tags: xml.sequenceOffset=50
shortLabel Identifier 0..1 attr This provides a name to the particular variation point to support the RTE generator. It is necessary for supporting splitable aggregations and if binding time is later than codeGenerationTime, as well as some RTE conditions. It needs to be unique with in the enclosing Identifiables with the same ShortName. Stereotypes: atpIdentityContributor Tags: xml.sequenceOffset=10
swSyscond ConditionByFormula 0..1 aggr This condition acts as Binding Function for the Variation Point. Note that the multiplicity is 0..1 in order to support pure postBuild variants. Tags: xml.sequenceOffset=30

F. 术语表

  • Artifact(工件):这是一个工作产品定义,为有形的工作产品类型提供描述与定义。工件可以由其他工件组成([53])。

在高层次上,工件表示为单个概念文件。

  • AUTOSAR Tool(AUTOSAR 工具):这是一个支持方法论中定义为一个或多个 AUTOSAR 任务的软件工具。根据支持的任务,AUTOSAR 工具可以充当编写工具、转换工具、处理工具或它们的组合(见单独定义)。

  • AUTOSAR Authoring Tool(AUTOSAR 编写工具):用于创建与修改 AUTOSAR XML 描述的 AUTOSAR 工具。示例:系统描述编辑器。

  • AUTOSAR Converter Tool(AUTOSAR 转换工具):通过转换来自其他 AUTOSAR XML 文件的信息来创建 AUTOSAR XML 文件的 AUTOSAR 工具。示例:ECU 扁平化工具。

  • AUTOSAR Definition(AUTOSAR 定义):这是可以有值的参数的定义。可以说参数值是定义的实例。但在 AUTOSAR 的元模型层级中,定义也是元模型的实例,因此被视为一种描述。AUTOSAR 定义的例子有:EcucParameterDef、PostBuildVariantCriterion、SwSystemconst。

  • AUTOSAR XML Description(AUTOSAR XML 描述):在 AUTOSAR 中这表示 “已填写的模板”。实际上,AUTOSAR XML 描述是 AUTOSAR 模型的 XML 表示。

AUTOSAR XML 描述可以由若干文件组成。每个单独的文件表示一个 AUTOSAR 部分模型,并应针对 AUTOSAR XML schema 成功通过验证。

  • AUTOSAR Meta-Model(AUTOSAR 元模型):这是一个定义描述 AUTOSAR 系统的语言的 UML2.0 模型。AUTOSAR 元模型是 AUTOSAR 模板的 UML 表示。UML2.0 类图用于描述属性及其相互关系。构造型、UML 标签与 OCL 表达式(对象约束语言)用于定义特定语义与约束。

  • AUTOSAR Meta-Model Tool(AUTOSAR 元模型工具):AUTOSAR 元模型工具是生成 AUTOSAR 元模型不同视图(类表、约束列表、图、XML Schema 等)的工具。

  • AUTOSAR Model(AUTOSAR 模型):这是 AUTOSAR 产品的表示。AUTOSAR 模型按 AUTOSAR 方法论表示适合预期用途的方面。

严格地说,这是 AUTOSAR 元模型的一个实例。AUTOSAR 模型中包含的信息可以是按 AUTOSAR 元模型可表示的任何内容。

  • AUTOSAR Partial Model(AUTOSAR 部分模型):在 AUTOSAR 中,模型可能的分区在元模型中用 <atpSplitable> 标记。一个部分模型在 AUTOSAR XML 描述中由一个文件表示。部分模型不需要满足适用于 AUTOSAR 模型的所有语义约束。

  • AUTOSAR Processor Tool(AUTOSAR 处理工具):通过处理来自 AUTOSAR XML 文件的信息来创建非 AUTOSAR 文件的 AUTOSAR 工具。示例:RTE 生成器。

  • AUTOSAR Specification Element(AUTOSAR 规范元素):AUTOSAR 规范元素是 AUTOSAR 规范的一部分的具名元素。示例:需求、约束、规定条目、元模型中的类或属性、方法论、交付物、方法论活动、模型元素、BSW 模块等。

  • AUTOSAR Template(AUTOSAR 模板):术语 “模板” 在 AUTOSAR 中用于描述不同种类描述的格式。术语模板来自这样的想法:AUTOSAR 定义了一种应被填写以描述模型的表格。填写后的表格称为描述。

实际上,AUTOSAR 模板现在定义为元模型。

  • AUTOSAR Validation Tool(AUTOSAR 验证工具):能够依据某个 profile 定义的规则检查 AUTOSAR 模型的专用 AUTOSAR 工具。

  • AUTOSAR XML Schema(AUTOSAR XML 模式):这是定义交换 AUTOSAR 模型语言的 W3C XML schema。该 Schema 派生自 AUTOSAR 元模型。AUTOSAR XML Schema 定义 AUTOSAR 数据交换格式。

  • Blueprint(蓝图):这是一个可以从它通过复制与细化派生出其他模型的模型。注意,与元模型及类型相对,这一过程不是实例化。

  • Instance(实例):一般而言,这是模型或类型的特定范例。

  • Life Cycle(生命周期):生命周期是模型元素在其存续期间的发展/演化阶段进程。

  • Meta-Model(元模型):它定义模型的构建块。在这个意义上,元模型表示构建模型的语言。

  • Meta-Data(元数据):这包括关于数据的相关信息,包括关于作者、版本、访问权限、时间戳等的信息。

  • Model(模型):模型是现实的简化表示。模型表示适合预期目的的方面。

  • Partial Model(部分模型):这是一个模型的一部分,意图持久化在一个特定工件中。

  • Pattern in GST(GST 中的模式):这是一种通过应用模型变换来简化元模型定义的方法。该变换从注解模型创建增强模型。

  • Profile Authoring Support Data(Profile 编写支持数据):用于高效编写 profile 的数据。例如可引用约束的列表、元类、元属性或其他可重用模型资产(蓝图)

  • Profile Authoring Tool(Profile 编写工具):专注于为数据交换点编写 profile 的专用 AUTOSAR 工具。它例如提供从零创建 profile、修改既有 profile 或组合既有 profile 的支持。

  • Profile Compatibility Checker Tool(Profile 兼容性检查工具):专注于检查数据交换 profile 兼容性的专用 AUTOSAR 工具。注意,该兼容性检查包括工程师的人工兼容性检查与使用更形式化算法的自动辅助。

  • Profile Consistency Checker Tool(Profile 一致性检查工具):专注于检查 profile 一致性的专用 AUTOSAR 工具。

  • Property(属性):属性是对象的结构特征。例如 “连接器” 具有 “接收端口” 与 “发送端口” 属性

属性由 <atpVariation> 变体化。

  • Prototype(原型):这是在另一个类型的定义中一个类型的角色的实现。换言之,一个类型可以包含原型,而这些原型又由 “类型” 定义类型。当该类型实例化时,这些原型中的每一个都成为实例。

  • Type(类型):类型提供可以出现在该类型各种角色中的特性。

  • Value(值):这是分配给一个 “定义” 的特定值。

  • Variability(可变性):系统的可变性是它描述一组变体的品质。这些变体由变体特定的属性设置和/或选择表征。例如,这样的系统属性选择表现为连接的特定 “接收端口”。

这借助 <atpVariation> 实现。

  • Variant(变体):系统变体是系统的一个具体实现,其所有属性都已被设置或选择。就绑定时间而言,软件系统不再有可变性。

这借助 EvaluatedVariantSet 实现。

  • Variation Binding(变体绑定):变体是变体绑定过程的结果,该过程通过给系统的所有属性分配特定值/选择来解决系统的可变性。

这由 VariationPoint 实现。

  • Variation Binding Time(变体绑定时间):变体绑定时间决定方法论中解析一组可变属性所给可变性的步骤。

这借助相关属性处的 vh.LatestBindingtime 实现。

变体定义时间:变体定义时间决定方法论中定义变体点的步骤。

变体点:变体点指示一个属性受变体支配。此外,它与一个条件和一个绑定时间相关联,后者定义选择/设置具体变体的系统上下文。

这由 VariationPoint 实现。

G. 约束和规范项的历史

请注意,本章的列表也包括在后续版本中已从规范中移除的约束与规定条目。这些约束与规定条目不在文档中作为超链接出现。

G.1. 本文档 R4.0.1 版本的约束历史

G.1.1. R4.0.1 中变更的约束

不适用

G.1.2. R4.0.1 中新增的约束

| Number | Heading |

| [constr_1000] | End-to-end protection is limited to sender/receive communication | | [constr_1001] | Value of dataId shall be unique | | [constr_1002] | End-to-end protection does not support n:1 communication | | [constr_1004] | Mapping of ApplicationDataType s | | [constr_1005] | Compatibility of ImplementationDataType s mapped to the same Application- DataType | | [constr_1006] | applicable data category s | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1008] | Applicability of category s STRUCTURE and ARRAY | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1010] | If nativeDeclaration does not exist | | [constr_1011] | category of SwBaseType | | [constr_1012] | Value of category is FIXED_LENGTH | | [constr_1013] | Value of category is VARIABLE_LENGTH | | [constr_1014] | Supported value encodings for SwBaseType | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1016] | invalidValue is restricted | | [constr_1017] | Supported combinations of swImplPolicy and swCalibrationAccess | | [constr_1018] | measurementPoint shall not be referenced by a VariableAccess aggregated by RunnableEntity in the role dataReadAccess | | [constr_1019] | Compatibility of input value and axis | | [constr_1020] | ParameterDataPrototype needs to be of compatible data type as referenced in sharedAxisType | | Number | Heading | | [constr_1021] | A CompuMethod shall specify instructions for both directions | | [constr_1022] | Limits shall be defined for each direction of CompuMethod | | [constr_1023] | Specification of Unit s in CompuMethod s | | [constr_1024] | Stepwise definition of CompuMethod s | | [constr_1025] | Avoid division by zero in rational formula | | [constr_1026] | Compatibility of Unit s | | [constr_1027] | Types for record layouts | | [constr_1029] | ConstantSpecificationMapping and ConstantSpecification | | [constr_1030] | ParameterSwComponentType references ConstantSpecificationMap- pingSet | | [constr_1031] | NvBlockSwComponentType references ConstantSpecificationMappingSet | | [constr_1032] | DelegationSwConnector can only connect PortPrototype s of the same kind | | [constr_1033] | Communication scenarios for sender/receiver communication | | [constr_1035] | Recursive definition of CompositionSwComponentType | | [constr_1036] | Connect kinds of PortInterface s | | [constr_1037] | Client may not connect to multiple servers | | [constr_1038] | Reference to ApplicationError | | [constr_1039] | Relevance of swImplPolicy | | [constr_1040] | Conversion of SenderReceiverInterface s | | [constr_1041] | Conversion of ClientServerInterface s | | [constr_1042] | Definition of a linear data scaling | | [constr_1043] | PortInterface vs. ComSpec | | [constr_1044] | Applicability of DataFilter | | [constr_1045] | Supported value encodings for SwBaseType in the context of PortInterface s | | [constr_1046] | Applicability of [constr_1045] | | [constr_1047] | Compatibility of ApplicationPrimitiveDataType s | | [constr_1048] | Compatibility of ApplicationRecordDataType s | | [constr_1049] | Compatibility of ApplicationArrayDataType s | | [constr_1050] | Compatibility of ImplementationDataType s | | [constr_1051] | Compatibility of SwDataDefProps | | [constr_1052] | Compatibility of Unit s | | [constr_1053] | Compatibility of PhysicalDimension s | | [constr_1054] | No DataConstr available at the provider | | [constr_1055] | ImplementationDataType has category VALUE | | [constr_1056] | ImplementationDataType has category TYPE_REFERENCE | | [constr_1057] | ImplementationDataType has category DATA_REFERENCE | | [constr_1058] | ImplementationDataType has category FUNCTION_REFERENCE | | [constr_1059] | Compatibility of data types with category VALUE | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK , or STRING |

glyph[triangle]

| Number | Heading |

| [constr_1061] | Compatibility of data types with category STRUCTURE | | [constr_1062] | Compatibility of data types with category BIT | | [constr_1063] | Compatibility of data types with category BOOLEAN | | [constr_1064] | Compatibility of data types with category COM_AXIS , RES_AXIS , CURVE or MAP | | [constr_1066] | ApplicationDataType is or is not compatible to specific Implementation- DataType | | [constr_1067] | ApplicationDataType is or is not compatible to specific Implementation- DataType | | [constr_1068] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by primitive data types | | [constr_1069] | Compatibility of PortPrototype s of different DataInterface s in the context of AssemblySwConnector s | | [constr_1070] | Compatibility of PortPrototype s of different DataInterface s in the context of DelegationSwConnector s | | [constr_1071] | compatibility of compatibility of ParameterDataPrototype and VariableDat- aPrototype | | [constr_1072] | Compatibility of ModeSwitchInterface s in the context of an AssemblySwCon- nector | | [constr_1073] | Compatibility of ModeSwitchInterface s in the context of an DelegationSwCon- nector | | [constr_1074] | Compatibility of ModeDeclarationGroupPrototype s | | [constr_1075] | Compatibility of ModeDeclarationGroup s | | [constr_1076] | Compatibility of ArgumentDataPrototype s | | [constr_1077] | Compatibility of ApplicationError s | | [constr_1078] | Compatibility of ClientServerOperation s | | [constr_1079] | Compatibility of ClientServerInterface s in the context of an AssemblySwCon- nector | | [constr_1080] | Compatibility of ClientServerInterface s in the context of an Delegation- SwConnector | | [constr_1081] | Compatibility of TriggerInterface s in the context of an AssemblySwConnector | | [constr_1082] | Compatibility of TriggerInterface s in the context of an DelegationSwConnec- tor | | [constr_1083] | Compatibility of Trigger s | | [constr_1084] | delegation of an provided outer PortPrototype | | [constr_1085] | Compatibility in the case of a flat ECU extract | | [constr_1086] | SwConnector between two specific PortPrototype s | | [constr_1087] | AssemblySwConnector inside CompositionSwComponentType | | [constr_1088] | DelegationSwConnector inside CompositionSwComponentType | | [constr_1090] | WaitPoint and RunnableEntity | | [constr_1091] | RTEEvent s that can unblock a WaitPoint | | [constr_1092] | ParameterSwComponentType | | [constr_1093] | Definition of textual strings |

glyph[triangle]

| Number | Heading |

| [constr_1094] | Usage of symbol of RunnableEntity | | [constr_1095] | Values of nDataSets vs. reliability | | [constr_1096] | SwcModeSwitchEvent and WaitPoint | | [constr_1097] | RunnableEntity that has a WaitPoint | | [constr_1098] | Mode switch and mode disabling | | [constr_1099] | Data type of inter-runnable variables | | [constr_1100] | Unconnected RPortPrototype typed by a DataInterface | | [constr_1101] | Mode-related communication | | [constr_1102] | ApplicationError in the scope of one SwComponentType | | [constr_1103] | NonqueuedReceiverComSpec and enableUpdate | | [constr_1104] | Trigger sink and trigger source | | [constr_1105] | Value of arraySize | | [constr_1106] | Structure shall have at least one element | | [constr_1107] | Union shall have at least one element | | [constr_1108] | Value of ApplicationError . errorCode | | [constr_1109] | Mapping of SwComponentPrototype s typed by a SensorActuatorSwCompo- nentType | | [constr_1110] | Value of category in EndToEndDescription | | [constr_1111] | Constraints of dataId in PROFILE_01 | | [constr_1112] | Constraints of dataIdMode in PROFILE_01 | | [constr_1113] | Existence of attributes in PROFILE_01 | | [constr_1114] | Constraints of crcOffset in PROFILE_01 | | [constr_1115] | Constraints of counterOffset in PROFILE_01 | | [constr_1116] | Constraints of dataLength in PROFILE_01 | | [constr_1117] | Constraints of maxDeltaCounterInit in PROFILE_01 | | [constr_1118] | Existence of attributes in PROFILE_02 | | [constr_1119] | Constraints of dataLength in PROFILE_02 | | [constr_1120] | Constraints of dataId in PROFILE_02 | | [constr_1121] | Constraints of maxDeltaCounterInit in PROFILE_02 | | [constr_1122] | Existence of attributes in PROFILE_03 | | [constr_1123] | Constraints of dataLength in PROFILE_03 | | [constr_1124] | Constraints of dataId in PROFILE_03 | | [constr_1125] | Constraints of maxDeltaCounterInit in PROFILE_03 | | [constr_1126] | Compatibility of DataConstr s | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEntity | | [constr_2001] | Initial value for a specific implicitInterRunnableVariable or explicitIn- terRunnableVariable | | [constr_2002] | Referenced VariableDataPrototype from AutosarVariableRef of Vari- ableAccess in role dataReadAccess | | [constr_2003] | Referenced VariableDataPrototype from AutosarVariableRef of Vari- ableAccess in role dataWriteAccess | | Number | Heading | | [constr_2004] | Referenced VariableDataPrototype from AutosarVariableRef of Vari- ableAccess in role dataSendPoint | | [constr_2005] | Referenced VariableDataPrototype from AutosarVariableRef of Vari- ableAccess in role dataReceivePointByValue or dataReceivePointB- yArgument | | [constr_2006] | Number of AsynchronousServerCallResultPoint referencing to one Asyn- chronousServerCallPoint | | [constr_2007] | Consistency of typeDefinition attribute | | [constr_2009] | Supported kinds of ports of a NvBlockSwComponentType | | [constr_2010] | Connections between SwComponentPrototype s of type NvBlockSwComponent- Type | | [constr_2011] | Connections between SwComponentPrototype s typed by NvBlockSwCompo- nentType and SwComponentPrototype s typed by other AtomicSwComponent- Type s | | [constr_2012] | Compatibility of ImplementationDataType s used for ramBlock and romBlock | | [constr_2013] | Compatibility of ImplementationDataType s for NvBlockDataMapping | | [constr_2014] | Limitation of RoleBasedPortAssignment . role in NvBlockDescriptor s | | [constr_2015] | Limitation of SwcInternalBehavior of a NvBlockSwComponentType | | [constr_2016] | Connections between SwComponentPrototype s of type ServiceProxySwCom- ponentType | | [constr_2017] | Ports of ServiceProxySwComponentType s | | [constr_2018] | Supported remote communication of a ServiceProxySwComponentType | | [constr_2019] | ServiceSwComponentType shall have service ports only | | [constr_2020] | dataReadAccess can not be used for queued communication | | [constr_2021] | WaitPoint referencing a DataReceivedEvent can not be used for non-queued communication | | [constr_2022] | Mutually exclusive use of SynchronousServerCallPoint s and Asyn- chronousServerCallPoint s | | [constr_2023] | Consistency of timeout values | | [constr_2024] | enableTakeAddress is restricted to single instantiation | | [constr_2025] | Uniqueness of symbol attributes | | [constr_2026] | Referenced VariableDataPrototype from AutosarVariableRef of Vari- ableAccess in role writtenLocalVariable and readLocalVariable | | [constr_2027] | SwcServiceDependency shall be defined for service ports only | | [constr_2028] | staticMemory is restricted to single instantiation | | [constr_2029] | shortName of constantMemory and staticMemory | | [constr_2030] | AsynchronousServerCallResultPoint combined with WaitPoint shall belong to the same RunnableEntity | | [constr_2031] | Period of TimingEvent shall be greater than 0 | | [constr_2032] | transmissionAcknowledge requires a DataSendCompletedEvent | | [constr_2033] | Timeout of DataSendCompletedEvent | | [constr_2500] | PortInterface s shall be of same kind |

| Number | Heading |

| [constr_2526] | PortInterface s need to be compatible to the blueprints | | [constr_2527] | Blueprints shall live in package of a proper category | | [constr_2528] | PortPrototype s shall not refer to blueprints of PortInterface s | | [constr_2529] | Blueprints of ports and interfaces shall be compatible | | [constr_2533] | Iteration along output axis is only supported for VALUE and VAL_BLK | | [constr_4000] | Local communication of mode switches | | [constr_4001] | Content of ModeRequestTypeMap | | [constr_4002] | Unambiguous mapping of modes to data types | | [constr_4003] | Semantics of SwcModeSwitchEvent | | [constr_4004] | Context of SenderReceiverAnnotation | | [constr_4005] | Context of ClientServerAnnotation | | [constr_4006] | Context of ParameterPortAnnotation | | [constr_4007] | Context of ModePortAnnotation | | [constr_4008] | Context of TriggerPortAnnotation | | [constr_4009] | Context of NvDataPortAnnotation | | [constr_4010] | Context of DelegatedPortAnnotation | | [constr_4011] | ComSpec and ModeSwitchedAckEvent | | [constr_4012] | Timeout of ModeSwitchedAckEvent | | [constr_4035] | ValueSpecification shall fit into data type |

G.1.3. R4.0.1 中删除的约束

不适用

G.2. 本文档 R4.0.2 版本的约束历史

G.2.1. R4.0.2 中变更的约束

| Number | Heading |

| [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1061] | Compatibility of data types with category STRUCTURE | | [constr_2001] | Initial value for a specific implicitInterRunnableVariable or explicitIn- terRunnableVariable |

G.2.2. R4.0.2 中新增的约束

| Number | Heading |

| [constr_1127] | ServiceSwComponentType shall not have ServiceNeeds | | [constr_1128] | Queue length of ClientServerOperation s associated with the same RunnableEntity | | [constr_1129] | swImplPolicy and NonqueuedReceiverComSpec | | [constr_1130] | swImplPolicy and NonqueuedReceiverComSpec | | [constr_1131] | swImplPolicy and NonqueuedSenderComSpec | | [constr_1132] | swImplPolicy and NonqueuedSenderComSpec | | [constr_1133] | Identical CompuScale Symbolic Name s shall have the same range | | [constr_1134] | Allowed structure of TEXTTABLE | | [constr_1135] | Limit of vt in BITFIELD_TEXTTABLE | | [constr_1136] | Compatibility of introduction of blueprint and blueprinted element | | [constr_1137] | Applicability of ParameterInterface | | [constr_1138] | assignedPort and DiagEventDebounceMonitorInternal | | [constr_1139] | assignedPort of DiagEventDebounceMonitorInternal shall refer to an RPortPrototype | | [constr_2034] | SwAddrMethod referenced by RunnableEntity s or BswSchedulableEntity s | | [constr_2035] | swImplPolicy for VariableDataPrototype in SenderReceiverInterface | | [constr_2036] | swImplPolicy for VariableDataPrototype in NvDataInterface | | [constr_2037] | swImplPolicy for VariableDataPrototype in the role ramBlock | | [constr_2038] | swImplPolicy for VariableDataPrototype in the role implicitInter- RunnableVariable | | [constr_2039] | swImplPolicy for VariableDataPrototype in the role explicitInter- RunnableVariable | | [constr_2040] | swImplPolicy for VariableDataPrototype in the role arTypedPerInstance- Memory | | [constr_2041] | swImplPolicy for VariableDataPrototype in the role staticMemory | | [constr_2042] | swImplPolicy for ParameterDataPrototype in ParameterInterface | | [constr_2043] | swImplPolicy for ParameterDataPrototype in the role staticMemory | | [constr_2044] | swImplPolicy for ParameterDataPrototype in the role sharedParameter | | [constr_2045] | swImplPolicy for ParameterDataPrototype in the role perInstanceParam- eter | | [constr_2046] | swImplPolicy for ParameterDataPrototype in the role constantMemory | | [constr_2047] | swImplPolicy for ArgumentDataPrototype | | [constr_2048] | swImplPolicy for SwServiceArg | | [constr_2535] | Target of an autosarParameter in AutosarParameterRef shall refer to a param- eter | | [constr_2536] | Target of an autosarVariable in AutosarVariableRef shall refer to a variable |

G.2.3. R4.0.2 中删除的约束

| Number | Heading |

| [constr_1099] | Data type of inter-runnable variables |

G.3. 本文档 R4.0.3 版本的约束历史

G.3.1. R4.0.3 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data category s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1014] | Supported value encodings for SwBaseType | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1043] | PortInterface vs. ComSpec | | [constr_1051] | Compatibility of SwDataDefProps | | [constr_1053] | Compatibility of PhysicalDimension s | | [constr_1063] | Compatibility of data types with category BOOLEAN | | [constr_1110] | Value of category in EndToEndDescription | | [constr_1113] | Existence of attributes in PROFILE_01 | | [constr_1118] | Existence of attributes in PROFILE_02 | | [constr_1134] | Allowed structure of TEXTTABLE | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEntity | | [constr_2027] | SwcServiceDependency shall be defined for service ports only |

G.3.2. R4.0.3 中新增的约束

| Number | Heading |

| [constr_1140] | Combination of invalidValue with the attribute handleInvalid | | [constr_1141] | Applicability of the scope attribute | | [constr_1142] | category of CompuMethod shall not be extended | | [constr_1143] | category of AutosarDataType shall not be extended | | Number | Heading | | [constr_1144] | SensorActuatorSwComponentType , EcuAbstractionSwComponentType , and ComplexDeviceDriverSwComponentType may only reference a HwType | | [constr_1145] | Finding the symbol for the representation of a CompuScale in C code | | [constr_1146] | Applicability of a symbol for a CompuScale in C code | | [constr_1147] | Standardized values for the attribute category of meta-class PortGroup | | [constr_1148] | PortInterface s of PortPrototype s used to connect to NvBlockSwCompo- nentType s | | [constr_1149] | PortPrototype s used for NV data management | | [constr_1150] | Usage of valueType for PortDefinedArgumentValue | | [constr_1151] | Applicability of PortInterfaceMapping | | [constr_1151] | category of ApplicationArrayElement and AutosarDataType referenced in the role type shall be kept in sync | | [constr_1153] | Applicability of compatibility requirements for CompuScale s | | [constr_1154] | Compatibility of CompuScale s for sender-receiver communication and similar use cases | | [constr_1155] | Compatibility of CompuScale s for client-server communication | | [constr_1156] | Relevance of 'names' of CompuScale s | | [constr_1157] | Applicability of constraints of CompuScale s | | [constr_1158] | Applicable category s for attribute compuMethod | | [constr_1159] | Consistency of VariableAndParameterInterfaceMapping with respect to the referenced DataInterface s | | [constr_1160] | Size of Compound Primitive Data Type is variant | | [constr_1161] | Applicability of the index attribute of Ref | | [constr_1162] | Compatibility of SwRecordLayout s | | [constr_1163] | Compatibility of CompuMethod s | | [constr_1164] | Number of argument s owned by a RunnableEntity | | [constr_1165] | Applicability of RunnableEntityArgument | | [constr_1166] | Restrictions of ModeRequestTypeMap | | [constr_1167] | ImplementationDataType s used as ModeRequestTypeMap . implementa- tionDataType | | [constr_1168] | Compatibility of ImplementationDataType s used used in the ModeRequest- TypeMap | | [constr_1169] | Allowed values for Trigger . swImplPolicy | | [constr_1170] | Interpretation of attribute maxDeltaCounterInit owned by EndToEndDescrip- tion | | [constr_1171] | Interpretation of attribute maxDeltaCounterInit of EndToEndDescription | | [constr_1172] | Allowed values of SwCalibrationAccessEnum for ModeDeclarationGroup- Prototype | | [constr_1173] | Applicability of AutosarParameterRef referencing a VariableDataPrototype | | [constr_1174] | PortInterface s used in the context of CompositionSwComponentType s cannot refer to AUTOSAR services | | [constr_1175] | Depending on its category , CompuMethod shall refer to a unit |

| Number | Heading |

| [constr_1176] | Compatibility of CompuScale s of category LINEAR and RAT_FUNC | | [constr_1177] | Allowed category for SwPointerTargetProps | | [constr_1178] | Existence of attributes of SwDataDefProps in the context of Implementation- DataType | | [constr_1179] | Existence of ModeDeclaration . value within a ModeDeclarationGroup | | [constr_1180] | Existence of ModeDeclarationGroup . onTransitionValue | | [constr_1181] | Numerical values used in ModeDeclaration . value and ModeDeclara- tionGroup . onTransitionValue | | [constr_1182] | Allowed values for InternalTriggeringPoint . swImplPolicy | | [constr_1183] | EndToEndProtectionVariablePrototype s aggregated by EndToEndProtec- tion | | [constr_1184] | Consistency of rootDataPrototype and base in the context of Application- CompositeElementInPortInterfaceInstanceRef | | [constr_1185] | Consistency of data types in the context of ApplicationCompositeElementIn- PortInterfaceInstanceRef | | [constr_1186] | Consistency of data types in the context of ArVariableInImplementation- DataInstanceRef | | [constr_1187] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by composite data types | | [constr_1188] | Existence of ReceiverComSpec . replaceWith | | [constr_1189] | Allowed targets of externalReplacement | | [constr_1190] | Only one mapping for composite to primitive use case | | [constr_2049] | Different ModeDeclarationGroup s shall have different shortName s. | | [constr_2050] | Mandatory information of a SwAxisCont | | [constr_2051] | Mandatory information of a SwValueCont | | [constr_2052] | Values of swArraysize and the number of values provided by swValuesPhys shall be consistent. | | [constr_2053] | Consistency between role IUMPRNumerator and ObdRatioServiceNeeds . con- nectionType | | [constr_2544] | Limits need to be consistent | | [constr_2545] | invalidValue shall fit in the specified ranges | | [constr_2548] | Data constraint of value axis shall match | | [constr_2549] | Units of input axis shall be consistent | | [constr_2550] | Units of value axis shall be consistent | | [constr_2551] | SwCalprmAxis.baseType shall be ignored | | [constr_2561] | Application of DataConstrRule . constrLevel |

G.3.3. R4.0.3 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01000] | Usage of attribute symbol of the symbolProps | | [TPS_SWCT_01001] | Prefix symbols generated for the RunnableEntity | | [TPS_SWCT_01002] | SwComponentType s may only interact by means of their PortPrototype s | | [TPS_SWCT_01003] | Inconsistencies regarding the value of serviceKind and the actual imple- mentation of the PortInterface | | [TPS_SWCT_01004] | Default value if serviceKind is not defined | | [TPS_SWCT_01005] | Usage of SwcServiceDependency s for vendor-specific services | | [TPS_SWCT_01006] | arraySize of ImplementationDataType shall be used to define the size of the array | | [TPS_SWCT_01007] | Semantics of array index | | [TPS_SWCT_01008] | Definition of positive integer values that are directly taken over by the RTE generator for creating the programmatic representations of the ModeDecla- ration | | [TPS_SWCT_01009] | The numerical values used to define the values of ModeDeclaration . value and ModeDeclarationGroup . onTransitionValue can be arbitrarily de- fined | | [TPS_SWCT_01010] | category s for the definition of a ModeDeclarationGroup | | [TPS_SWCT_01011] | Default category of a ModeDeclarationGroup | | [TPS_SWCT_01012] | AtomicSwComponentType reads the current ECU mode (fixed variant) | | [TPS_SWCT_01013] | AtomicSwComponentType shall keep the ECU alive (fixed variant) | | [TPS_SWCT_01014] | AtomicSwComponentType wants to select a shutdown target (fixed variant) | | [TPS_SWCT_01015] | AtomicSwComponentType wants to select a boot target (fixed variant) | | [TPS_SWCT_01016] | AtomicSwComponentType wants to select a shutdown target (flexible vari- ant) | | [TPS_SWCT_01017] | AtomicSwComponentType wants to select a boot target (flexible variant) | | [TPS_SWCT_01018] | AtomicSwComponentType wants to use an alarm clock (flexible variant) | | [TPS_SWCT_01019] | AtomicSwComponentType reads the current ComM mode | | [TPS_SWCT_01020] | AtomicSwComponentType requests a ComM mode. It may also check later whether the requested ComM mode has become effective | | [TPS_SWCT_01021] | AtomicSwComponentType acts as a mode manager that influences the ECU state | | [TPS_SWCT_01022] | Queued processing of internal trigger | | [TPS_SWCT_01023] | Mapping of elements of composite data types | | [TPS_SWCT_01024] | Combination of ApplicationCompositeDataType and nested Implemen- tationDataType | | [TPS_SWCT_01025] | The role of PortPrototype s in the AUTOSAR architecture | | [TPS_SWCT_01026] | The role of PortInterface s in the AUTOSAR architecture | | [TPS_SWCT_01027] | Different flavors of PortInterface s | | [TPS_SWCT_01028] | AtomicSwComponentType implements a Diagnostic Monitor |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01029] | AtomicSwComponentType implements a Diagnostic Monitor | | [TPS_SWCT_01030] | RunnableEntity | | [TPS_SWCT_01031] | ExclusiveArea | | [TPS_SWCT_01032] | CompositionSwComponentType | | [TPS_SWCT_01033] | Nested definition of CompositionSwComponentType s | | [TPS_SWCT_01034] | CompositionSwComponentType s do not have any binary footprint | | [TPS_SWCT_01035] | CompositionSwComponentType aggregates SwComponentPrototype s | | [TPS_SWCT_01036] | SwComponentPrototype implements a specific role | | [TPS_SWCT_01037] | arbitrary numbers of SwComponentPrototype s can be created | | [TPS_SWCT_01038] | Support for Variant Handling in the in Software Component Tem- plate | | [TPS_SWCT_01039] | Purpose of variant handling | | [TPS_SWCT_01040] | SwConnector exists depending on a PostBuild condition | | [TPS_SWCT_01041] | API functions of not existing SwConnector are still part of the software- component's implementation | | [TPS_SWCT_01042] | Four types of locations in the meta-model which may exhibit variability | | [TPS_SWCT_01043] | ApplicationSwComponentType s are independent from actual ECU Hard- ware | | [TPS_SWCT_01044] | ServiceNeeds | | [TPS_SWCT_01045] | Actual values of ECU configuration parameters fulfill the requirements given by the ServiceNeeds | | [TPS_SWCT_01046] | ServiceNeeds are defined in the scope of the SwcInternalBehavior | | [TPS_SWCT_01047] | Reference from the software representation of a sensor/actuator to the actual hardware element | | [TPS_SWCT_01048] | SensorActuatorSwComponentType may use the I/O hardware abstraction directly | | [TPS_SWCT_01049] | Two ways to use the ExclusiveArea s | | [TPS_SWCT_01050] | RunnableEntity always runs inside an ExclusiveArea | | [TPS_SWCT_01051] | RunnableEntity explicitly enters and leaves a specific ExclusiveArea | | [TPS_SWCT_01052] | Inter-runnable variable | | [TPS_SWCT_01053] | Relationship of interchanged data with RunnableEntity s | | [TPS_SWCT_01054] | Semantics of the explicitInterRunnableVariable | | [TPS_SWCT_01055] | Semantics of implicitInterRunnableVariable | | [TPS_SWCT_01056] | Physical dimension | | [TPS_SWCT_01057] | Unit references one physical dimension | | [TPS_SWCT_01058] | UnitGroup | | [TPS_SWCT_01059] | Exponent for each of the seven fundamental dimensions | | [TPS_SWCT_01060] | Negative exponents | | [TPS_SWCT_01061] | Conversion of units | | [TPS_SWCT_01062] | Documentation of software-components |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01063] | PortGroup | | [TPS_SWCT_01064] | PortGroup s have to be defined on the VFB level | | [TPS_SWCT_01065] | PortPrototype may belong to more than one PortGroup s | | [TPS_SWCT_01066] | PortGroup s can be associated with certain ServiceNeeds | | [TPS_SWCT_01067] | Initial mode | | [TPS_SWCT_01068] | Unit s can be grouped with the help of UnitGroup | | [TPS_SWCT_01069] | DataInterface is defined as abstract base class | | [TPS_SWCT_01070] | PortInterface acts as a type for a PortPrototype | | [TPS_SWCT_01071] | ModeDeclaration | | [TPS_SWCT_01072] | ApplicationDataType and ImplementationDataType | | [TPS_SWCT_01073] | Composite ApplicationDataType | | [TPS_SWCT_01074] | Composite ImplementationDataType | | [TPS_SWCT_01075] | SwcInternalBehavior | | [TPS_SWCT_01076] | Number of elements of a specific ApplicationArrayDataType might vary at run-time | | [TPS_SWCT_01077] | Configure the response to mode changes | | [TPS_SWCT_01078] | Configurable array size | | [TPS_SWCT_01079] | SwConnector | | [TPS_SWCT_01080] | Delegation ports | | [TPS_SWCT_01081] | Implications of being a delegation port | | [TPS_SWCT_01082] | AssemblySwConnector | | [TPS_SWCT_01083] | DelegationSwConnector | | [TPS_SWCT_01084] | Outer PortPrototype is referenced by multiple DelegationSwConnec- tor s | | [TPS_SWCT_01085] | Variation on the behavior level | | [TPS_SWCT_01086] | Request mode change | | [TPS_SWCT_01087] | Propagation of mode information | | [TPS_SWCT_01088] | ComSpec s defined by CompositionSwComponentType s | | [TPS_SWCT_01089] | end-to-end communication protection | | [TPS_SWCT_01090] | EndToEndProtection | | [TPS_SWCT_01091] | Two cases for end-to-end protection | | [TPS_SWCT_01092] | EndToEndProtectionSet | | [TPS_SWCT_01093] | Definition of end-to-end protection is splitable | | [TPS_SWCT_01094] | category of EndToEndDescription | | [TPS_SWCT_01095] | category set to NONE | | [TPS_SWCT_01096] | PortGroup | | [TPS_SWCT_01097] | CompositionSwComponentType cannot have RunnableEntity s | | [TPS_SWCT_01098] | Only AtomicSwComponentType can have RunnableEntity s | | [TPS_SWCT_01099] | PortInterfaceMapping |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01100] | Precedence of PortInterfaceMapping | | [TPS_SWCT_01101] | Unmapped elements of PortInterface s | | [TPS_SWCT_01102] | VariableAndParameterInterfaceMapping | | [TPS_SWCT_01103] | Mapping between different kinds of PortInterface s | | [TPS_SWCT_01104] | Possible mappings are restricted by the swImplPolicy | | [TPS_SWCT_01105] | ClientServerInterfaceMapping | | [TPS_SWCT_01106] | ClientServerOperation | | [TPS_SWCT_01107] | swMinAxisPoints and swMaxAxisPoints represent variation points | | [TPS_SWCT_01108] | Added value of an AtomicSwComponentType | | [TPS_SWCT_01109] | Adding the SwcInternalBehavior in a later process step | | [TPS_SWCT_01110] | Symbolic name of a software-component | | [TPS_SWCT_01111] | PortPrototype s need an additional model artifact, the PortInterface | | [TPS_SWCT_01112] | PortPrototype s are either require - or provide -ports. | | [TPS_SWCT_01113] | Connecting two PortPrototype s | | [TPS_SWCT_01114] | SenderReceiverInterface | | [TPS_SWCT_01115] | invalidationPolicy | | [TPS_SWCT_01116] | swImplPolicy | | [TPS_SWCT_01117] | Communication patterns for sender-receiver communication | | [TPS_SWCT_01118] | ClientServerInterface | | [TPS_SWCT_01119] | Direction of ArgumentDataPrototype s | | [TPS_SWCT_01120] | Client needs to provide ArgumentDataPrototype s | | [TPS_SWCT_01121] | Pass correct data type | | [TPS_SWCT_01122] | Synchronous call of ClientServerOperation | | [TPS_SWCT_01123] | No default values for ArgumentDataPrototype s | | [TPS_SWCT_01124] | Definition of ArgumentDataPrototype s within the context of a ClientServerOperation is ordered | | [TPS_SWCT_01125] | serverArgumentImplPolicy | | [TPS_SWCT_01126] | Access to partial networking via BswM | | [TPS_SWCT_01127] | Byte arrary with variable size | | [TPS_SWCT_01128] | SwRecordLayout needed | | [TPS_SWCT_01129] | Express diagnostic capabilities | | [TPS_SWCT_01130] | Measurement and calibration access to model elements is defined by swCal- ibrationAccess | | [TPS_SWCT_01131] | AtomicSwComponentType accepts a request to restart an entire function | | [TPS_SWCT_01132] | AtomicSwComponentType provides information about operating cycles | | [TPS_SWCT_01133] | AtomicSwComponentType provides information about aging cycles | | [TPS_SWCT_01134] | AtomicSwComponentType enables storage of DTCs in general | | [TPS_SWCT_01135] | AtomicSwComponentType enables storage of subsequent DTCs | | [TPS_SWCT_01136] | AtomicSwComponentType retrieves information from the fault storage |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01137] | Dem provides information that the fault storage overflows | | [TPS_SWCT_01138] | AtomicSwComponentType suppresses the storage of DTCs within the Dem | | [TPS_SWCT_01139] | AtomicSwComponentType informs the Dem that the PTO is active | | [TPS_SWCT_01140] | AtomicSwComponentType needs information about specific DTC without be- ing a diagnostic monitor | | [TPS_SWCT_01141] | AtomicSwComponentType may have RPortPrototype s typed by an Nv- DataInterface | | [TPS_SWCT_01142] | non-volatile data are provided by a specialized AtomicSwComponentType | | [TPS_SWCT_01143] | Non-volatile data represented by an NvBlockComponent can be read and writ- ten | | [TPS_SWCT_01144] | NvBlockDescriptor specifies the properties of exactly one NvBlock | | [TPS_SWCT_01145] | ramBlock and the romBlock are described by a VariableDataPrototype and a ParameterDataPrototype | | [TPS_SWCT_01146] | romBlock is optional | | [TPS_SWCT_01147] | No romBlock is configured | | [TPS_SWCT_01148] | NvBlockDataMapping | | [TPS_SWCT_01149] | RoleBasedPortAssignment of NvBlockDescriptor | | [TPS_SWCT_01150] | InternalBehavior of a NvBlockSwComponentType | | [TPS_SWCT_01151] | RunnableEntity s do not have further attributes | | [TPS_SWCT_01152] | InternalBehavior does not have further attributes | | [TPS_SWCT_01153] | IncludedModeDeclarationGroupSet | | [TPS_SWCT_01154] | Attribute prefix of IncludedModeDeclarationGroupSet | | [TPS_SWCT_01155] | IncludedDataTypeSet | | [TPS_SWCT_01156] | Required if the AutosarDataType is not used for any DataPrototype | | [TPS_SWCT_01157] | Attribute literalPrefix of IncludedDataTypeSet | | [TPS_SWCT_01158] | Three cases for PortInterfaceMapping | | [TPS_SWCT_01159] | Mapping is described separately from the SwConnector as reusable AREle- ment | | [TPS_SWCT_01160] | ModeInterfaceMapping | | [TPS_SWCT_01161] | TriggerInterfaceMapping | | [TPS_SWCT_01162] | Conditional existence of TextTableMapping | | [TPS_SWCT_01163] | Conversion from firstValue to secondValue | | [TPS_SWCT_01164] | Conversion from secondValue to firstValue | | [TPS_SWCT_01165] | Invertible mapping | | [TPS_SWCT_01166] | Non-invertible mapping | | [TPS_SWCT_01167] | Validity of ModeInterfaceMapping | | [TPS_SWCT_01168] | Linear conversion factor can be calculated | | [TPS_SWCT_01169] | Support for partial networking | | [TPS_SWCT_01170] | Purpose of Virtual Function Cluster | | [TPS_SWCT_01171] | Purpose of a control port |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01172] | Requesting and releasing partial networks | | [TPS_SWCT_01173] | Control port shall not become a part of the PortGroup | | [TPS_SWCT_01174] | Status port shall not become a member of the PortGroup | | [TPS_SWCT_01175] | Actively query the status of a partial network | | [TPS_SWCT_01176] | last-is-best semantics for sender-receiver communication | | [TPS_SWCT_01177] | Assignment of constant values | | [TPS_SWCT_01178] | Specialized subclasses of ValueSpecification | | [TPS_SWCT_01179] | Compound Primitive Data Type | | [TPS_SWCT_01180] | Maximum possible size of Compound Primitive Data Type | | [TPS_SWCT_01181] | Bound model specifies a primitive which is smaller than the maximum defined by the range of the involved SwSystemconst | | [TPS_SWCT_01182] | Conceptual levels for the definition of initial values | | [TPS_SWCT_01183] | Actual value of an initValue shall be interpreted according to the Autosar- DataType | | [TPS_SWCT_01184] | ApplicationPrimitiveDataType s with category VALUE | | [TPS_SWCT_01185] | initValue s for Compound Primitive Data Type s | | [TPS_SWCT_01186] | ConstantSpecificationMapping | | [TPS_SWCT_01187] | ConstantSpecificationMappingSet referenced by the InternalBe- havior | | [TPS_SWCT_01188] | Definition of calibration data sets through RTE-generator and compiler | | [TPS_SWCT_01189] | DataTypeMap | | [TPS_SWCT_01190] | ModeRequestTypeMap | | [TPS_SWCT_01191] | mapped ApplicationDataType and ImplementationDataType shall be compatible | | [TPS_SWCT_01192] | Meta-classes that have an association to a DataTypeMappingSet | | [TPS_SWCT_01193] | Mappings between application and implementation types do not necessarily have to form a 1:1 relation | | [TPS_SWCT_01194] | Symbolic name of an ImplementationDataType | | [TPS_SWCT_01195] | Mapping of composite element to primitive DataPrototype | | [TPS_SWCT_01196] | Semantics of an external trigger event communication | | [TPS_SWCT_01197] | TriggerInterface | | [TPS_SWCT_01198] | Period for periodic triggering | | [TPS_SWCT_01199] | Queued processing of Trigger s | | [TPS_SWCT_01200] | ModeDeclarationGroupPrototype per ModeSwitchInterface | | [TPS_SWCT_01201] | CompositionSwComponentType requires and provides the modes that are required or provided by its contained SwComponentPrototype s | | [TPS_SWCT_01202] | ApplicationDataType defines a subset of the values used in the Mod- eDeclarationGroup | | [TPS_SWCT_01203] | PortPrototype may own port annotations | | [TPS_SWCT_01204] | GeneralAnnotation | | [TPS_SWCT_01205] | Typical annotations for sender/receiver communication |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01206] | Min and Max annotations are valid for a certain amount of time | | [TPS_SWCT_01207] | VariableDataPrototype s use the same application-level Sender- ReceiverAnnotation | | [TPS_SWCT_01208] | Grouping for SenderReceiverAnnotation | | [TPS_SWCT_01209] | ClientServerAnnotation | | [TPS_SWCT_01210] | IoHwAbstractionServerAnnotation | | [TPS_SWCT_01211] | Assign several annotations to ArgumentDataPrototype | | [TPS_SWCT_01212] | ParameterPortAnnotation | | [TPS_SWCT_01213] | ModePortAnnotation | | [TPS_SWCT_01214] | TriggerPortAnnotation | | [TPS_SWCT_01215] | NvDataPortAnnotation | | [TPS_SWCT_01216] | DelegatedPortAnnotation | | [TPS_SWCT_01217] | Semantics of DelegatedPortAnnotation . signalFan | | [TPS_SWCT_01218] | Big picture of ComSpec | | [TPS_SWCT_01219] | ComSpec for queued and non-queued sender-receiver communication | | [TPS_SWCT_01220] | initValue defines an initial value that shall be taken if the corresponding dataElement has not yet been received | | [TPS_SWCT_01221] | DataFilter | | [TPS_SWCT_01222] | Applicability of DataFilter | | [TPS_SWCT_01223] | networkRepresentation defines how a specific dataElement is repre- sented on a communication bus | | [TPS_SWCT_01224] | CompuMethod s of dataElement and the networkRepresentation are used for conversion purposes | | [TPS_SWCT_01225] | RunnableEntity implements the functionality of two or more ClientServerOperation s | | [TPS_SWCT_01226] | initValue on the level of a ComSpec is relevant for connections to the cor- responding PortPrototype | | [TPS_SWCT_01227] | Unconnected RPortPrototype typed by NvDataInterface | | [TPS_SWCT_01228] | NvProvideComSpec | | [TPS_SWCT_01229] | Three different levels of abstraction regarding the definition of data types | | [TPS_SWCT_01230] | Application Data Level | | [TPS_SWCT_01231] | Application level may impose strong requirements on the design of the corre- sponding implementation level | | [TPS_SWCT_01232] | Implementation Data Level | | [TPS_SWCT_01233] | Use case for the Implementation Data Level | | [TPS_SWCT_01234] | Base Level | | [TPS_SWCT_01235] | Mapping of data defined on the Application level to the Implementation and Base Type level | | [TPS_SWCT_01236] | Big picture of data types | | [TPS_SWCT_01237] | SwDataDefProps | | [TPS_SWCT_01238] | Attribute category used in the context of AutosarDataType |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01239] | default value for attribute category used in the context of AutosarDataType | | [TPS_SWCT_01240] | Subclasses of ApplicationDataType | | [TPS_SWCT_01241] | Applicable category s for subclasses ApplicationDataType | | [TPS_SWCT_01242] | category characterizes the nature of a data type on application level | | [TPS_SWCT_01243] | Definition of enumeration types | | [TPS_SWCT_01244] | Data types for calibration parameters are also described as primitive types | | [TPS_SWCT_01245] | SwDataDefProps control the structure of calibration parameters | | [TPS_SWCT_01246] | SwRecordLayout may be required for A2L generation | | [TPS_SWCT_01247] | ApplicationArrayDataType and ApplicationRecordDataType | | [TPS_SWCT_01248] | Nested definition of ImplementationDataType | | [TPS_SWCT_01249] | ApplicationRecordDataType | | [TPS_SWCT_01250] | ImplementationDataType has been introduced to optimize the formal sup- port for data type handling on the implementation level | | [TPS_SWCT_01251] | Limited set of values for category are applicable for Implementation- DataType | | [TPS_SWCT_01252] | ImplementationDataType can express concepts not available on applica- tion level | | [TPS_SWCT_01253] | Rules apply for the usage of the attribute ImplementationDataType . type- Emitter | | [TPS_SWCT_01254] | ImplementationDataType with array semantics | | [TPS_SWCT_01255] | Indicate whether the array is supposed to have a fixed size or whether the actual size might change during run-time | | [TPS_SWCT_01256] | Definition of multi-dimensional array data types | | [TPS_SWCT_01257] | ImplementationDataType or the aggregated Implementation- DataTypeElement s do not form closed sets | | [TPS_SWCT_01258] | Definition of a pointer to data | | [TPS_SWCT_01259] | Definition of a pointer to a function | | [TPS_SWCT_01260] | SwBaseType | | [TPS_SWCT_01261] | Use case for SwBaseType | | [TPS_SWCT_01262] | memAlignment and byteOrder are platform specific | | [TPS_SWCT_01263] | Further use cases for SwBaseType | | [TPS_SWCT_01264] | Data prototypes implement a role of a data type | | [TPS_SWCT_01265] | DataPrototype aggregates an own set of SwDataDefProps | | [TPS_SWCT_01266] | Three non-abstract classes derived from AutosarDataPrototype | | [TPS_SWCT_01267] | DataPrototype can be aggregated in different roles | | [TPS_SWCT_01268] | Definition of initValue for a VariableDataPrototype or a Parameter- DataPrototype | | [TPS_SWCT_01269] | In PortInterface s, initial values defined for DataPrototype s are ignored | | [TPS_SWCT_01270] | AutosarVariableRef | | [TPS_SWCT_01271] | AutosarParameterRef | | [TPS_SWCT_01272] | Semantics of swComparisonVariable | | Number | Heading | | [TPS_SWCT_01273] | Precedence rules for the application of SwDataDefProps | | [TPS_SWCT_01274] | SwDataDefProps used to support calibration and measurement | | [TPS_SWCT_01275] | values of the attribute swImplPolicy are restricted depending on the context | | [TPS_SWCT_01276] | Computation methods | | [TPS_SWCT_01277] | Computation methods are used for the conversion of internal values into their physical representation and vice versa | | [TPS_SWCT_01278] | CompuMethod s can also be used to assign symbolic names to internal values | | [TPS_SWCT_01279] | Preferred conversion direction depends on the use case | | [TPS_SWCT_01280] | CompuMethod applied to values outside of its limits | | [TPS_SWCT_01281] | Unit associated with a PhysicalDimension | | [TPS_SWCT_01283] | Rational function | | [TPS_SWCT_01284] | CompuScale might require a representation in the generated RTE C code | | [TPS_SWCT_01285] | Physical dimension | | [TPS_SWCT_01286] | DataConstr | | [TPS_SWCT_01287] | Standard limits and extended limits in the ASAM-MCD2 (ASAP2) specification | | [TPS_SWCT_01288] | Interpretation of PhysConstrs and InternalConstrs by tools | | [TPS_SWCT_01289] | Semantics of Limit | | [TPS_SWCT_01290] | SwAddrMethod | | [TPS_SWCT_01291] | Association of MemorySection with SwAddrMethod | | [TPS_SWCT_01292] | Usage of SwAddrMethod in the context of a DataPrototype | | [TPS_SWCT_01293] | RTE Generator has to derive the Memory Allocation Keyword | | [TPS_SWCT_01294] | Missing SwDataDefProps . swAddrMethod | | [TPS_SWCT_01295] | SwRecordLayout | | [TPS_SWCT_01296] | Different approaches of ASAM MCD-2MC and AUTOSAR with respect to SwRecordLayout | | [TPS_SWCT_01297] | Compliance of ApplicationDataType s or ImplementationDataType s to swDataDefProps | | [TPS_SWCT_01298] | Computing SwRecordLayout from ImplementationDataType s is not pos- sible | | [TPS_SWCT_01299] | Relation of swRecordLayoutGroup to subElement | | [TPS_SWCT_01300] | Relationship between record layouts and interpolation routines | | [TPS_SWCT_01301] | Importance of initial values | | [TPS_SWCT_01302] | Semantics of minimumStartInterval | | [TPS_SWCT_01303] | symbol attribute describes the RunnableEntity 's entry point | | [TPS_SWCT_01304] | Cat. 1A and 1B RunnableEntity s will eventually terminate | | [TPS_SWCT_01305] | RunnableEntity as one that cannot be invoked concurrently | | [TPS_SWCT_01306] | Software-component description itself does not put any bounds on the number of concurrent invocations of a RunnableEntity | | [TPS_SWCT_01307] | supportsMultipleInstantiation vs. canBeInvokedConcurrently |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01308] | Combination of supportsMultipleInstantiation = false and can- BeInvokedConcurrently = false | | [TPS_SWCT_01309] | signature of a RunnableEntity depends on the connected RTEEvent | | [TPS_SWCT_01310] | Categories of RunnableEntity s | | [TPS_SWCT_01311] | Name of an operation argument | | [TPS_SWCT_01312] | RunnableEntity has a mapping to BswModuleEntry | | [TPS_SWCT_01313] | Conditions for a transition from suspended to to be started | | [TPS_SWCT_01314] | RTEEvent | | [TPS_SWCT_01315] | Interaction of RunnableEntity with RTEEvent | | [TPS_SWCT_01316] | Abstract base class RTEEvent | | [TPS_SWCT_01317] | RTE triggers RunnableEntity in response to occurring RTEEvent | | [TPS_SWCT_01318] | RunnableEntity and WaitPoint | | [TPS_SWCT_01319] | RTEEvent can be used to trigger WaitPoint s in different RunnableEn- tity s | | [TPS_SWCT_01320] | RunnableEntity s of category 2 | | [TPS_SWCT_01321] | Communication among RunnableEntity s | | [TPS_SWCT_01322] | Interaction patterns for the application of the sender-receiver paradigm | | [TPS_SWCT_01323] | Read and write access to a dataElement | | [TPS_SWCT_01324] | Mode switches need to be completed in finite time | | [TPS_SWCT_01325] | Read and write access is only applicable for RunnableEntity s of category 1 | | [TPS_SWCT_01326] | Constrain the scope of a specific communication | | [TPS_SWCT_01327] | RTE generator can omit the creation of checks at run-time | | [TPS_SWCT_01328] | Default value of attribute scope | | [TPS_SWCT_01329] | Access to specific data is implemented by means of aggregating the meta- class VariableAccess in specific roles | | [TPS_SWCT_01330] | RunnableEntity can also have dataSendPoint s | | [TPS_SWCT_01331] | dataWriteAccess vs. dataSendPoint | | [TPS_SWCT_01332] | dataReceivePointByValue vs. dataReceivePointByArgument | | [TPS_SWCT_01333] | dataReceivePointByValue / dataReceivePointByArgument vs. dataReadAccess | | [TPS_SWCT_01334] | RunnableEntity s of category 1 may have dataReceivePointByValue s/ dataReceivePointByArgument s | | [TPS_SWCT_01335] | Combine dataReceivePointByValue or dataReceivePointByArgu- ment with a WaitPoint | | [TPS_SWCT_01336] | dataSendPoint also allows for the definition of a DataSendCompletedE- vent | | [TPS_SWCT_01337] | DataReceivedEvent | | [TPS_SWCT_01338] | DataReceiveErrorEvent | | [TPS_SWCT_01339] | RTE activates RunnableEntity in response to DataReceiveErrorEvent | | [TPS_SWCT_01340] | DataReceiveErrorEvent cannot be combined with a WaitPoint |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01341] | DataReceiveErrorEvent is directly associated with the corresponding VariableDataPrototype | | [TPS_SWCT_01342] | Invocation of a server operation | | [TPS_SWCT_01343] | Synchronous vs. asynchronous invocation | | [TPS_SWCT_01344] | Consistency of values of timeout | | [TPS_SWCT_01345] | Synchronous operation invocation | | [TPS_SWCT_01346] | Asynchronous operation invocation | | [TPS_SWCT_01347] | Blocking access to operation result in an asynchronous operation invocation | | [TPS_SWCT_01348] | Trigger source | | [TPS_SWCT_01349] | Trigger sink | | [TPS_SWCT_01350] | Calibration Parameters shared among several SwComponentType s | | [TPS_SWCT_01351] | Access to a ParameterDataPrototype | | [TPS_SWCT_01352] | Requested mode is just sent and received as an ordinary data value | | [TPS_SWCT_01353] | RunnableEntity s react on a mode request via a corresponding RTEEvent | | [TPS_SWCT_01354] | PortAPIOption | | [TPS_SWCT_01355] | enableTakeAddress = true | | [TPS_SWCT_01356] | indirectAPI option switches the generation of the RTE's indirect API func- tionality | | [TPS_SWCT_01357] | Definition of implicit values that are passed by the RTE to the server's entry point | | [TPS_SWCT_01358] | Values are hidden from the client components | | [TPS_SWCT_01359] | Private memory per instance | | [TPS_SWCT_01360] | Arbitrary number of per-instance memory blocks | | [TPS_SWCT_01361] | attribute supportsMultipleInstantiation == false | | [TPS_SWCT_01362] | Initialization of PerInstanceMemory | | [TPS_SWCT_01363] | PerInstanceMemory typed by 'C' Data Types | | [TPS_SWCT_01364] | Initial value of a PerInstanceMemory typed by 'C' Data Types | | [TPS_SWCT_01365] | PerInstanceMemory typed by AUTOSAR Data Types | | [TPS_SWCT_01366] | Initial value of a PerInstanceMemory typed by AUTOSAR Data Types | | [TPS_SWCT_01367] | Typed by AUTOSAR data type vs. typed by C data type | | [TPS_SWCT_01368] | Describe static and constant memory | | [TPS_SWCT_01369] | Static and constant memory is not instantiated by the RTE | | [TPS_SWCT_01370] | VariationPointProxy | | [TPS_SWCT_01371] | VariationPointProxy vs. VariationPoint | | [TPS_SWCT_01372] | bindingTime = preCompileTime | | [TPS_SWCT_01373] | RTE generator shall evaluate the SwSystemconstDependentFormula | | [TPS_SWCT_01374] | Implementation of AutosarParameterRef | | [TPS_SWCT_01375] | Implementation of AutosarVariableRef | | [TPS_SWCT_01376] | Software-components need to be capable of reacting to state changes | | Number | Heading | | [TPS_SWCT_01377] | Two mechanisms to define how SwcInternalBehavior should interact with the mode management | | [TPS_SWCT_01378] | AtomicSwComponentType can define an SwcModeSwitchEvent to execute RunnableEntity | | [TPS_SWCT_01379] | AtomicSwComponentType can indicate whether an RTEEvent that starts an associated RunnableEntity is disabled in a certain mode | | [TPS_SWCT_01380] | Mode management behavior on the sender side | | [TPS_SWCT_01381] | Read the currently active mode | | [TPS_SWCT_01382] | Mode switch requests are handled asynchronously by the RTE | | [TPS_SWCT_01383] | ModeSwitchPoint | | [TPS_SWCT_01384] | Execution of initialization code for software-components | | [TPS_SWCT_01385] | Execution of initialization code for software-components | | [TPS_SWCT_01386] | Initialization by mode management | | [TPS_SWCT_01387] | Finalization by mode management | | [TPS_SWCT_01388] | Initial modes of AtomicSwComponentType s are defined by the ini- tialMode | | [TPS_SWCT_01389] | I/O Hardware Abstraction interfaces MCAL drivers | | [TPS_SWCT_01390] | I/O Hardware Abstraction might have sub-structures | | [TPS_SWCT_01391] | I/O Hardware Abstraction abstracts from the location of peripheral I/O devices | | [TPS_SWCT_01392] | Mapping between the EcuAbstractionSwComponentType and the corre- sponding BswModuleDescription | | [TPS_SWCT_01393] | Complex Driver | | [TPS_SWCT_01394] | Complex Driver is represented by the ComplexDeviceDriverSwCompo- nentType | | [TPS_SWCT_01395] | ComplexDeviceDriverSwComponentType has dependencies to ECU Hardware | | [TPS_SWCT_01396] | Mapping between the ComplexDeviceDriverSwComponentType and the corresponding BswModuleDescription | | [TPS_SWCT_01397] | Hybrid concept between Basic Software Modules and a SwComponent- Type | | [TPS_SWCT_01398] | Communication patterns for AUTOSAR services | | [TPS_SWCT_01399] | Dependency is modeled by aggregating required and provided PortProto- type s | | [TPS_SWCT_01400] | PortInterface selected from the set of standardized Service Inter- faces | | [TPS_SWCT_01401] | Form a top-level RootSwCompositionPrototype | | [TPS_SWCT_01402] | Mapping of all AtomicSwComponentType instances to EcuInstance s | | [TPS_SWCT_01403] | Impact of AUTOSAR services on the methodology | | [TPS_SWCT_01404] | Creation of the EcuExtract | | [TPS_SWCT_01405] | Creation of the ServiceSwComponentType s | | [TPS_SWCT_01406] | Creation of SwComponentPrototype typed by a ServiceSwComponent- Type |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01407] | Creation of InternalBehavior typed by a ServiceSwComponentType | | [TPS_SWCT_01408] | Creation of SwcBswMapping | | [TPS_SWCT_01409] | Update of PortDefinedArgumentValue s | | [TPS_SWCT_01410] | Dcm and Dem can directly access dataElement s in PPortPrototype s typed by a SenderReceiverInterface | | [TPS_SWCT_01411] | Use cases for a ServiceSwComponentType to express ServiceNeeds | | [TPS_SWCT_01412] | ServiceSwComponentType shall be added in ECU Configuration phase | | [TPS_SWCT_01413] | Local communication with services | | [TPS_SWCT_01414] | Mode manager needs to communicate with application software components located on other ECUs | | [TPS_SWCT_01415] | Interfaces of ServiceProxySwComponentType | | [TPS_SWCT_01416] | Difference between a ServiceProxySwComponentType and an Applica- tionSwComponentType | | [TPS_SWCT_01417] | Define calibration parameters common to all SwComponentPrototype s of the same SwComponentType | | [TPS_SWCT_01418] | Ways to define a calibration parameter | | [TPS_SWCT_01419] | ParameterSwComponentType shall never aggregate a SwcInternalBe- havior | | [TPS_SWCT_01420] | SwComponentType requiring access to shared calibration parameters needs RPortPrototype typed by a ParameterInterface | | [TPS_SWCT_01421] | ParameterInterface is not restricted to parameters which can actually can be calibrated | | [TPS_SWCT_01422] | Delegation of PortPrototype s typed by a ParameterInterface | | [TPS_SWCT_01423] | ParameterDataPrototype aggregated in the role constantMemory | | [TPS_SWCT_01424] | ParameterDataPrototype aggregated in the role perInstanceParame- ter | | [TPS_SWCT_01425] | AtomicSwComponentType provides one callback per event if diagnostic event data change | | [TPS_SWCT_01426] | AtomicSwComponentType provides callback if any diagnostic event data and/or status changed | | [TPS_SWCT_01427] | AtomicSwComponentType provides data for diagnostic purposes via ClientServerInterface | | [TPS_SWCT_01428] | ServiceSwComponentType representing the Dem provides a PPortProto- type for the Dcm | | [TPS_SWCT_01429] | [constr_1135] only applies for BITFIELD_TEXTTABLE | | [TPS_SWCT_01430] | Conversion specification from internal to physical values as well as the reverse conversion | | [TPS_SWCT_01431] | Finding the symbol for the representation of a CompuScale in C code | | [TPS_SWCT_01432] | Keep the invalidValue transparent to the sending and receiving software components | | [TPS_SWCT_01433] | Invalid values outside the range limits | | [TPS_SWCT_01434] | Sender and receiver have knowledge of invalid value | | [TPS_SWCT_01435] | Invalid values outside the range limits |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01436] | Different receivers require different handling of data invalidation | | [TPS_SWCT_01437] | invalidValue can also be specified without setting a compuMethod | | [TPS_SWCT_01438] | Handling of invalidation in the sending RTE | | [TPS_SWCT_01439] | Handling of invalidation in the receiving RTE | | [TPS_SWCT_01440] | Measurement is not limited to primitive objects | | [TPS_SWCT_01441] | Nature of a TYPE_REFERENCE | | [TPS_SWCT_01442] | ImplementationDataType of category TYPE_REFERENCE does not de- fine own properties | | [TPS_SWCT_01443] | ImplementationDataType of category TYPE_REFERENCE overwrites properties of refined ImplementationDataType | | [TPS_SWCT_01444] | Size of SwBaseType is specified in bits | | [TPS_SWCT_01445] | Applicability of SwDataDefProps for DataPrototype s | | [TPS_SWCT_01446] | References to a DataPrototype may or may not imply the necessity for using an instanceRef | | [TPS_SWCT_01447] | Applicable binding times for model elements in the scope of the Software Component Template | | [TPS_SWCT_01448] | Pre-defined values for the category of VariationPointProxy | | [TPS_SWCT_02000] | Default value for attribute swImplPolicy | | [TPS_SWCT_02001] | Values of SwAxisCont with the category COM_AXIS , RES_AXIS are for dis- play only | | [TPS_SWCT_02002] | AtomicSwComponentType offers a PPortPrototype s typed by ClientServerInterface to read/write current value via diagnostic ser- vices | | [TPS_SWCT_02003] | AtomicSwComponentType offers PortPrototype s typed by Sender- ReceiverInterface s to read/write current values via diagnostic services | | [TPS_SWCT_02004] | AtomicSwComponentType offers a PortPrototype typed by a ClientServerInterface to start/stop or request routine results of diag- nostic routines | | [TPS_SWCT_02005] | AtomicSwComponentType offers PortPrototype s typed by ClientServerInterface s to adjust the IO signal via diagnostic services | | [TPS_SWCT_02006] | AtomicSwComponentType offers sender receiver ports to adjust the IO signal via diagnostic services | | [TPS_SWCT_02007] | AtomicSwComponentType implements a OBD system monitor with In-Use- Monitor Performance Ratio | | [TPS_SWCT_02008] | AtomicSwComponentType offers a server port to read/write current value via OBD services | | [TPS_SWCT_02009] | AtomicSwComponentType offers sender receiver ports to read/write current values via OBD services | | [TPS_SWCT_02010] | AtomicSwComponentType offers a server port to read vehicle information values via OBD services | | [TPS_SWCT_02011] | AtomicSwComponentType offers a server port to read DTR value via OBD services | | [TPS_SWCT_02012] | AtomicSwComponentType offers a server port for request control of on- board system, test or component via OBD services |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_02013] | AtomicSwComponentType offers a server port to get protocol, session and security information or to request a Reset to Default Session | | [TPS_SWCT_02014] | AtomicSwComponentType supports Response On Event (ROE) via diagnos- tic services | | [TPS_SWCT_02015] | AtomicSwComponentType verifies the access to security level via diagnostic services | | [TPS_SWCT_02016] | AtomicSwComponentType requires information on the status of the protocol communication and may disallow a protocol | | [TPS_SWCT_02017] | AtomicSwComponentType requires the notification about a Service Request via diagnostic services | | [TPS_SWCT_02018] | Setup for AtomicSwComponentType which contains a Supervised Entity | | [TPS_SWCT_02019] | Setup for AtomicSwComponentType which requires Global Supervision Sta- tus notification | | [TPS_SWCT_02020] | AtomicSwComponentType uses the hash calculation of the Crypto Service | | [TPS_SWCT_02021] | AtomicSwComponentType uses the message authentication code (MAC) calculation of the Crypto Service | | [TPS_SWCT_02022] | AtomicSwComponentType uses the message authentication code (MAC) verification of the Crypto Service | | [TPS_SWCT_02023] | AtomicSwComponentType uses the generation of random seed of the Crypto Service | | [TPS_SWCT_02024] | AtomicSwComponentType uses the generation of random numbers of the Crypto Service | | [TPS_SWCT_02025] | AtomicSwComponentType uses the symmetrical block encryption of the Crypto Service | | [TPS_SWCT_02026] | AtomicSwComponentType uses the symmetrical block decryption of the Crypto Service | | [TPS_SWCT_02027] | AtomicSwComponentType uses the symmetrical encryption of the Crypto Service | | [TPS_SWCT_02028] | AtomicSwComponentType uses the symmetrical decryption of the Crypto Service | | [TPS_SWCT_02029] | AtomicSwComponentType uses the asymmetrical encryption of the Crypto Service | | [TPS_SWCT_02030] | AtomicSwComponentType uses the asymmetrical decryption of the Crypto Service | | [TPS_SWCT_02031] | AtomicSwComponentType uses the signature generation of the Crypto Ser- vice | | [TPS_SWCT_02032] | AtomicSwComponentType uses the signature verification of the Crypto Ser- vice | | [TPS_SWCT_02033] | AtomicSwComponentType uses the checksum calculation of the Crypto Ser- vice | | [TPS_SWCT_02034] | AtomicSwComponentType uses the key derivation of the Crypto Service | | [TPS_SWCT_02035] | AtomicSwComponentType uses the symmetric key derivation of the Crypto Service | | [TPS_SWCT_02036] | AtomicSwComponentType uses the key exchange interface for public value calculation of the Crypto Service |

| Number | Heading |

| [TPS_SWCT_02037] | AtomicSwComponentType uses the key exchange interface for secret value calculation of the Crypto Service | | [TPS_SWCT_02038] | AtomicSwComponentType uses the key exchange interface to calculate sym- metric key with the Crypto Service | | [TPS_SWCT_02039] | AtomicSwComponentType uses the symmetrical key extraction of the Crypto Service | | [TPS_SWCT_02040] | AtomicSwComponentType uses the symmetrical key wrapping of the Crypto Service to export a symmetrical key structure with a symmetric key | | [TPS_SWCT_02041] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a symmetrical key structure with a asymmetric key | | [TPS_SWCT_02042] | AtomicSwComponentType uses the asymmetrical public key extraction of the Crypto Service | | [TPS_SWCT_02043] | AtomicSwComponentType uses the asymmetrical private key extraction of the Crypto Service | | [TPS_SWCT_02044] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a (asymmetric) private key structure with a symmetri- cal wrapping key | | [TPS_SWCT_02045] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a (asymmetric) private key structure with a asym- metrical wrapping key |

G.3.4. R4.0.3 中删除的约束

| Number | Heading |

| [constr_1023] | Specification of Unit s in CompuMethod s (the text is still there but it does no longer represent a constraint) | | [constr_1062] | Compatibility of data types with category BIT | | [constr_1122] | Existence of attributes in PROFILE_03 | | [constr_1123] | Constraints of dataLength in PROFILE_03 | | [constr_1124] | Constraints of dataId in PROFILE_03 | | [constr_1125] | Constraints of maxDeltaCounterInit in PROFILE_03 | | [constr_1127] | ServiceSwComponentType shall not have ServiceNeeds | | [constr_1136] | Compatibility of introduction of blueprint and blueprinted element | | | The following constraints are moved to [1] | | [constr_2500] | PortInterface s shall be of same kind | | [constr_2526] | PortInterface s need to be compatible to the blueprints | | [constr_2527] | Blueprints shall live in package of a proper category | | [constr_2528] | PortPrototype s shall not refer to blueprints of PortInterface s |

| Number | Heading |

| [constr_2529] | Blueprints of ports and interfaces shall be compatible | | [constr_4001] | Content of ModeRequestTypeMap |

G.3.5. R4.0.3 中删除的规定条目

不适用

G.4. 本文档 R4.1.1 版本的约束历史

G.4.1. R4.1.1 中变更的约束

| Number | Heading |

| [constr_1012] | Value of category is FIXED_LENGTH | | [constr_1013] | Value of category is VARIABLE_LENGTH | | [constr_1016] | Restriction of invalidValue for ImplementationDataType and Implementa- tionDataTypeElement | | [constr_1026] | Compatibility of Unit s | | [constr_1047] | Compatibility of ApplicationPrimitiveDataType s | | [constr_1048] | Compatibility of ApplicationRecordDataType s | | [constr_1049] | Compatibility of ApplicationArrayDataType s | | [constr_1050] | Compatibility of ImplementationDataType s | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK | | [constr_1072] | Compatibility of ModeSwitchInterface s in the context of an AssemblySwCon- nector | | [constr_1073] | Compatibility of ModeSwitchInterface s in the context of an DelegationSwCon- nector | | [constr_1074] | Compatibility of ModeDeclarationGroupPrototype s | | [constr_1075] | Compatibility of ModeDeclarationGroup s | | [constr_1079] | Compatibility of ClientServerInterface s in the context of an AssemblySwCon- nector | | [constr_1080] | Compatibility of ClientServerInterface s in the context of an Delegation- SwConnector | | [constr_1081] | Compatibility of TriggerInterface s in the context of an AssemblySwConnector | | [constr_1082] | Compatibility of TriggerInterface s in the context of an DelegationSwConnec- tor |

| Number | Heading |

| [constr_1068] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by primitive data types | | [constr_1069] | Compatibility of PortPrototype s of different DataInterface s in the context of AssemblySwConnector s | | [constr_1070] | Compatibility of PortPrototype s of different DataInterface s in the context of DelegationSwConnector s | | [constr_1072] | Compatibility of ModeSwitchInterface s in the context of an AssemblySwCon- nector | | [constr_1073] | Compatibility of ModeSwitchInterface s in the context of an DelegationSwCon- nector | | [constr_1074] | Compatibility of ModeDeclarationGroupPrototype s | | [constr_1079] | Compatibility of ClientServerInterface s in the context of an AssemblySwCon- nector | | [constr_1080] | Compatibility of ClientServerInterface s in the context of an Delegation- SwConnector | | [constr_1081] | Compatibility of TriggerInterface s in the context of an AssemblySwConnector | | [constr_1082] | Compatibility of TriggerInterface s in the context of an DelegationSwConnec- tor | | [constr_1108] | Value of ApplicationError . errorCode | | [constr_1177] | Allowed targetCategory for SwPointerTargetProps | | [constr_1187] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by composite data types |

G.4.2. R4.1.1 中新增的约束

| Number | Heading |

| [constr_1191] | Value of Limit shall yield a numerical value | | [constr_1192] | Compatibility of ' IDENTICAL ' to ' RAT_FUNC ' or ' LINEAR ' | | [constr_1193] | ModeDeclaration shall be referenced by at least one ModeTransition in the role enteredMode | | [constr_1194] | Identical ModeTransition s | | [constr_1195] | SwcModeSwitchEvent and the definition of ModeTransition | | [constr_1196] | Existence of networkRepresentation vs. compositeNetworkRepresenta- tion | | [constr_1197] | Existence of compositeNetworkRepresentation shall be comprehensive | | [constr_1200] | Queued communication is not applicable for dataElement s owned by PRPortPro- totype | | [constr_1201] | initValue shall exist in an RPortPrototype | | Number | Heading | | [constr_1202] | Supported connections by AssemblySwConnector for PortPrototype s typed by a SenderReceiverInterface or NvDataInterface | | [constr_1203] | Supported connections by DelegationSwConnector for PortPrototype s typed by a SenderReceiverInterface or NvDataInterface | | [constr_1204] | Supported connections by AssemblySwConnector for PortPrototype s typed by a ClientServerInterface , ModeSwitchInterface , or TriggerInterface | | [constr_1205] | Supported connections by DelegationSwConnector for PortPrototype s typed by a ClientServerInterface , ModeSwitchInterface , or TriggerInter- face | | [constr_1209] | Mapping of ModeDeclaration s of mode user to ModeDeclaration of mode man- ager | | [constr_1210] | Mapping of ModeDeclaration s of mode user to all ModeDeclaration s of mode manager | | [constr_1211] | Constraints of maxNoNewOrRepeatedData in PROFILE_01 | | [constr_1212] | Constraints of syncCounterInit in PROFILE_01 | | [constr_1213] | Constraints of maxNoNewOrRepeatedData in PROFILE_02 | | [constr_1214] | Constraints of syncCounterInit in PROFILE_02 | | [constr_1215] | Interpretation of attribute maxNoNewOrRepeatedData owned by EndToEndDe- scription in PROFILE_01 | | [constr_1216] | Interpretation of attribute syncCounterInit owned by EndToEndDescription in PROFILE_01 | | [constr_1217] | Interpretation of attribute maxNoNewOrRepeatedData owned by EndToEndDe- scription in PROFILE_02 | | [constr_1218] | Interpretation of attribute syncCounterInit owned by EndToEndDescription in PROFILE_02 | | [constr_1219] | Invalidation depends on the value of swImplPolicy | | [constr_1220] | Compatibility of SwBaseType | | [constr_1221] | DataPrototype is typed by an ApplicationPrimitiveDataType | | [constr_1222] | category of an AutosarDataType used to type a DataPrototype is set to STRING | | [constr_1223] | DataPrototype is typed by an ApplicationRecordDataType | | [constr_1224] | DataPrototype is typed by an ApplicationArrayDataType | | [constr_1225] | DataPrototype is typed by an ImplementationDataType that references a CompuMethod of category TEXTTABLE or BITFIELD_TEXTTABLE | | [constr_1226] | Applicable range for ExecutableEntityActivationReason . bitPosition | | [constr_1227] | Value of attribute ExecutableEntityActivationReason . bitPosition shall be unique | | [constr_1228] | RTEEvent that is referenced by a WaitPoint in the role trigger shall not reference ExecutableEntityActivationReason | | [constr_1229] | category of ImplementationDataType boils down to VALUE | | [constr_1230] | ApplicationDataType that qualifies for Integral Primitive Type | | [constr_1231] | ConsistencyNeeds aggregated by CompositionSwComponentType | | [constr_1232] | ConsistencyNeeds aggregated by AtomicSwComponentType | | Number | Heading | | [constr_1233] | InstantiationTimingEventProps shall only reference TimingEvent | | [constr_1234] | Value of RunnableEntity . symbol | | [constr_1237] | Scope of mapped ClientServerOperation s in the context of a ClientServer- OperationMapping | | [constr_1238] | Scope of mapped ApplicationError s in the context of a ClientServerOpera- tionMapping | | [constr_1239] | RuleBasedValueSpecification shall not exceed the number of values required | | [constr_1240] | Consistency of ArgumentDataPrototype s within the context of a ClientServer- OperationMapping | | [constr_1241] | Compound Primitive Data Type s and invalidValue | | [constr_1242] | Restriction of invalidValue for ApplicationPrimitiveDataType | | [constr_1243] | NumericalOrText shall either define vf or vt | | [constr_1244] | DataPrototype s used in application software shall not be typed by C enums | | [constr_1245] | Consideration of ModeTransition s for the compatibility of ModeDeclara- tionGroup s | | [constr_1246] | Consistency of firstMode and secondMode in the scope of one ModeDeclara- tionMappingSet | | [constr_1247] | Consistency of ModeDeclarationMappingSet with respect to the referenced firstModeGroup and secondModeGroup | | [constr_1248] | Compatibility of PortPrototype s of different DataInterface s in the context of a PassThroughSwConnector | | [constr_1249] | Compatibility of ModeSwitchInterface s in the context of a PassThroughSwCon- nector | | [constr_1250] | Compatibility of ClientServerInterface s in the context of a PassThrough- SwConnector | | [constr_1251] | Compatibility of PortPrototype s of TriggerInterface s in the context of a PassThroughSwConnector | | [constr_1252] | Creation of a loop involving a PassThroughSwConnector is not allowed | | [constr_1253] | Supported usage of VariationPointProxy | | [constr_1254] | Definition of a pointer to a pointer | | [constr_1255] | ApplicationPrimitiveDataType s of category BOOLEAN and STRING | | [constr_1256] | Acknowledgement feedback in n:1 writer case | | [constr_1257] | No WaitPoint s allowed | | [constr_1258] | Value of minimumStartInterval for RunnableEntity s triggered by an InitEvent | | [constr_1259] | Aggregation of AsynchronousServerCallPoint and AsynchronousServer- CallResultPoint | | [constr_1260] | No mode disabling for InitEvent s | | [constr_1261] | Applicability for EndToEndDescription . dataIdNibbleOffset | | [constr_1263] | Existence of ModeErrorBehavior . defaultMode | | [constr_1264] | Iteration along output axis is only supported for VALUE and VAL_BLK | | [constr_1268] | ArgumentDataPrototype . direction shall be preserved in a ClientServer- OperationMapping |

| Number | Heading |

| [constr_1269] | Number of argument s shall be preserved in a ClientServerOperationMapping | | [constr_1270] | ArgumentDataPrototype shall be mapped only once in a ClientServerOper- ationMapping | | [constr_1271] | ArrayValueSpecification . element s shall be identical to the number of Appli- cationRecordDataType . element | | [constr_1272] | ArrayValueSpecification . element s shall be identical to the number of subElement s of ImplementationDataType of category STRUCTURE | | [constr_1273] | ArrayValueSpecification . element s shall be identical to the value of Appli- cationArrayDataType . element . maxNumberOfElements | | [constr_1274] | ArrayValueSpecification . element s shall be identical to the value of Imple- mentationDataType . subElement . arraySize of category ARRAY | | [constr_2054] | Valid targets of rptSystem | | [constr_2055] | Valid targets of byPassPoint and rptHook reference | | [constr_2056] | Consistency of RapidPrototypingScenario with respect to rptSystem and rp- tArHook references | | [constr_2057] | Mandatory information of a RuleBasedAxisCont | | [constr_2058] | Mandatory information of a RuleBasedValueCont | | [constr_4082] | RunnableEntity . reentrancyLevel shall not be set. |

G.4.3. R4.1.1 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01000] | Usage of attribute symbol of the symbolProps | | [TPS_SWCT_01001] | Prefix symbols generated for the RunnableEntity | | [TPS_SWCT_01085] | Variation on the behavior level | | [TPS_SWCT_01112] | Semantics of PortPrototype s | | [TPS_SWCT_01113] | Connecting two PortPrototype s | | [TPS_SWCT_01128] | SwRecordLayout needed for ApplicationPrimitiveDataType of cat- egory STRING | | [TPS_SWCT_01179] | Compound Primitive Data Type | | [TPS_SWCT_01368] | Describe static and constant memory |

G.4.4. R4.1.1 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01448] | Pre-defined values for the category of VariationPointProxy | | [TPS_SWCT_01449] | Semantics of a ModeDeclarationGroupPrototypeMapping | | [TPS_SWCT_01450] | Semantics of a ModeTransition | | [TPS_SWCT_01451] | Relations between ModeTransition and ModeDeclaration | | [TPS_SWCT_01452] | Applicability of networkRepresentation for ApplicationComposite- DataType | | [TPS_SWCT_01454] | PRPortPrototype can own both RPortComSpec s and PPortComSpec s | | [TPS_SWCT_01455] | Duplicate existence of initValue in the context of a PRPortPrototype | | [TPS_SWCT_01456] | Predefined values for MemorySection . option and SwAddrMethod . option | | [TPS_SWCT_01457] | ExclusiveAreaNestingOrder | | [TPS_SWCT_01458] | Indicate that the locking behavior is fully described for RunnableEntity | | [TPS_SWCT_01459] | Locking behavior is not described for this RunnableEntity | | [TPS_SWCT_01460] | Relation of SynchronousServerCallPoint to ExclusiveAreaNestin- gOrder | | [TPS_SWCT_01461] | Existence of ImplementationDataType | | [TPS_SWCT_01462] | ModeDeclarationMapping defines the explicit correlation of ModeDecla- ration s | | [TPS_SWCT_01463] | ModeDeclarationGroupPrototypeMapping . modeDeclarationMap- pingSet defines the applicable set of ModeDeclarationMapping s | | [TPS_SWCT_01464] | ModeDeclaration of a mode user is mapped to exactly one ModeDeclara- tion of a mode manager | | [TPS_SWCT_01465] | ModeDeclaration of a mode user is mapped to several ModeDeclara- tion s of a mode manager | | [TPS_SWCT_01466] | ConsistencyNeeds applied on RunnableEntity s that do not use implicit communication | | [TPS_SWCT_01467] | ImplementationDataType references an SwBaseType with a string encod- ing | | [TPS_SWCT_01469] | RTE API for retrieving the current activation reason | | [TPS_SWCT_01470] | RunnableEntityGroup | | [TPS_SWCT_01471] | DataPrototypeGroup | | [TPS_SWCT_01472] | Receiving SwComponentType owns a DataPrototypeGroup in the role regRequiresStability | | [TPS_SWCT_01473] | Receiving SwComponentType owns a RunnableEntityGroup in the role regRequiresStability | | [TPS_SWCT_01474] | Receiving SwComponentType owns a RunnableEntityGroup in the role regRequiresStability and also owns one or several DataPrototype- Group s in the role regRequiresStability | | [TPS_SWCT_01475] | Sending SwComponentType owns a DataPrototypeGroup in the role re- gRequiresStability | | Number | Heading | | [TPS_SWCT_01476] | Sender and receiver of the same implicitly communicated VariableDat- aPrototype s are associated with the same RunnableEntityGroup | | [TPS_SWCT_01477] | Integral Primitive Type s | | [TPS_SWCT_01478] | Array size is defined as an attribute of the ImplementationDataTypeEle- ment | | [TPS_SWCT_01479] | Applicability of ConsistencyNeeds | | [TPS_SWCT_01480] | Stability and/or coherence is not required | | [TPS_SWCT_01481] | The meaning of the term stability with respect to ConsistencyNeeds | | [TPS_SWCT_01482] | The meaning of the term coherence with respect to ConsistencyNeeds | | [TPS_SWCT_01483] | Use static and constant memory to support Measurement and Calibration | | [TPS_SWCT_01484] | Meaning of ApplicationRuleBasedValueSpecification | | [TPS_SWCT_01485] | RuleBasedValueSpecification shall initialize first elements in an array | | [TPS_SWCT_01486] | ApplicationPrimitiveDataType of category STRING may have in- validValue | | [TPS_SWCT_01487] | Correspondence of invalidValue for ApplicationPrimitiveDataType and ImplementationDataType | | [TPS_SWCT_01488] | ApplicationPrimitiveDataType shall be interpreted as a string of a par- ticular encoding | | [TPS_SWCT_01489] | Standardized values of SwRecordLayoutV . swRecordLayoutVProp | | [TPS_SWCT_01490] | AUTOSAR supports ApplicationError s only for ClientServerInter- face s | | [TPS_SWCT_01491] | AUTOSAR system does not need to explicitly describe infrastructure errors | | [TPS_SWCT_01492] | Default values for factorSiToUnit and offsetSiToUnit | | [TPS_SWCT_01493] | The number of RuleArguments .arguments shall not exceed the array size | | [TPS_SWCT_01494] | A RuleBasedValueSpecification of rule FILL_UNITIL_END shall fill the value of the last RuleArguments .argument until the last element of the array | | [TPS_SWCT_01495] | Standardized value of RuleBasedValueSpecification . category | | [TPS_SWCT_01496] | General precedence rule for attributes of SwDataDefProps | | [TPS_SWCT_01497] | Precedence of the unit of value axis | | [TPS_SWCT_01498] | Precedence of the DataConstr of value axis | | [TPS_SWCT_01499] | Precedence of the CompuMethod of value axis | | [TPS_SWCT_01500] | Precedence of the display format of value axis | | [TPS_SWCT_01501] | Precedence of the calibration access of value axis | | [TPS_SWCT_01502] | Precedence of the Unit of the input axis | | [TPS_SWCT_01503] | Precedence of the DataConstr of the input axis | | [TPS_SWCT_01504] | Precedence of the display format of the input axis | | [TPS_SWCT_01505] | Precedence of calibration access along structure hierarchies in complex types | | [TPS_SWCT_01506] | Precedence of the calibration access of input axis | | [TPS_SWCT_01507] | The role of PassThroughSwConnector | | [TPS_SWCT_01508] | Scope of end-to-end protection |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01509] | Implicit communication behavior | | [TPS_SWCT_01510] | The role of pretended networking | | [TPS_SWCT_01511] | Configuration option is encoded into ModeDeclaration | | [TPS_SWCT_01512] | Request change of Pretended Networking mode | | [TPS_SWCT_01513] | React on the change of Pretended Networking mode | | [TPS_SWCT_01514] | Duplicate existence of initValue in the context of a PRPortPrototype | | [TPS_SWCT_01515] | PPortInCompositionInstanceRef shall be used for attaching Delega- tionSwConnector to an inner PRPortPrototype | | [TPS_SWCT_01516] | PortInterface describes the static structure of information interchange | | [TPS_SWCT_01517] | ClientServerOperation cannot be passed as a reference | | [TPS_SWCT_01518] | Priority of initial value definition with respect to conceptual levels | | [TPS_SWCT_01519] | RTE executes certain RunnableEntity periodically | | [TPS_SWCT_01520] | Implication of the existence of possibleError on compatibility of ClientServerOperation s | | [TPS_SWCT_01521] | Use AutosarVariableRef . localVariable for referencing inter-runnable variables | | [TPS_SWCT_01522] | No initial value is specified for implicitInterRunnableVariable or ex- plicitInterRunnableVariable | | [TPS_SWCT_01523] | Internal trigger event | | [TPS_SWCT_01524] | Usage of IoHwAbstractionServerAnnotation | | [TPS_SWCT_01525] | InitEvent references a RunnableEntity in the role startOnEvent | | [TPS_SWCT_01528] | Meaning of NumericalRuleBasedValueSpecification | | [TPS_SWCT_01529] | Default value for EndToEndDescription . dataIdNibbleOffset | | [TPS_SWCT_01530] | Error behavior of mode manager and mode user | | [TPS_SWCT_01531] | The semantics of ModeErrorReactionPolicyEnum | | [TPS_SWCT_01532] | The role of ModeErrorBehavior . defaultMode | | [TPS_SWCT_01533] | ModeDeclarationGroup . initialMode shall be assumed in the absence of ModeDeclarationGroup . modeManagerErrorBehavior | | [TPS_SWCT_01534] | ModeDeclarationGroup . initialMode shall be assumed in the absence of ModeDeclarationGroup . modeUserErrorBehavior | | [TPS_SWCT_01535] | Mode manager reacts on mode error | | [TPS_SWCT_01536] | Coherent behavior of all mode users in case of errors in the mode switch com- munication | | [TPS_SWCT_01541] | Preferential selection of modeUserErrorBehavior | | [TPS_SWCT_01542] | Preferential selection of modeManagerErrorBehavior | | [TPS_SWCT_01543] | PortInterfaceMapping overrides all other compatibility rules | | [TPS_SWCT_01544] | prefix used for the actual name of the used PortInterface for the routing activation | | [TPS_SWCT_01545] | ModeDeclaration of a mode user that is not mapped to a ModeDeclara- tion of a mode manager | | [TPS_SWCT_01546] | Notification when an external tester is attached or activated |

| Number | Heading |

| [TPS_SWCT_01547] | Ability to set and reset the Warning Indicator Status bit | | [TPS_SWCT_02046] | byPassPoint specifies the rapid prototyping capability | | [TPS_SWCT_02047] | RptHook specifies the link to rapid prototyping algorithm | | [TPS_SWCT_02048] | Implicit SwComponentPrototype selection for Rapid Prototyping Scenario | | [TPS_SWCT_02049] | Implicit RunnableEntity selection for Rapid Prototyping Scenario | | [TPS_SWCT_02050] | Explicit access point selection for Rapid Prototyping Scenario | | [TPS_SWCT_02051] | Explicit DataPrototype selection for Rapid Prototyping Scenario | | [TPS_SWCT_02052] | Definition of Rapid Prototyping Scenario is splittable | | [TPS_SWCT_02053] | Values of RuleBasedAxisCont with the category COM_AXIS , RES_AXIS are for display only | | [TPS_SWCT_02507] | Instantiation-specific RTEEvent s |

G.4.5. R4.1.1 中删除的约束

| Number | Heading |

| [constr_1239] | RuleBasedValueSpecification shall not exceed the number of values required | | [constr_1145] | Finding the symbol for the representation of a CompuScale in C code | | [constr_2533] | Iteration along output axis is only supported for VALUE and VAL_BLK |

请注意,[constr_2533] 已重新标记为 [constr_1264],以修复重复的约束 ID。

G.4.6. R4.1.1 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01210] | IoHwAbstractionServerAnnotation |

G.5. 本文档 R4.1.2 版本的约束历史

G.5.1. R4.1.2 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1043] | PortInterface vs. ComSpec | | [constr_1058] | ImplementationDataType has category FUNCTION_REFERENCE | | [constr_1102] | ApplicationError in the scope of one SwComponentType | | [constr_1146] | Applicability of a symbol for a CompuScale in C code | | [constr_1163] | Compatibility of CompuMethod s | | [constr_1133] | Identical CompuScale Symbolic Name s shall have the same range | | [constr_1158] | Applicable category s for attribute ImplementationDataType . swDataDef- Props . compuMethod | | [constr_1225] | DataPrototype is typed by an ImplementationDataType that references a CompuMethod of category TEXTTABLE or BITFIELD_TEXTTABLE | | [constr_2013] | Compatibility of ImplementationDataType s for NvBlockDataMapping | | [constr_2051] | Mandatory information of a SwValueCont |

G.5.2. R4.1.2 中新增的约束

| Number | Heading |

| [constr_1277] | SwDataDefProps . swImplPolicy of a VariableDataPrototype referenced by a VariableAccess aggregated in the role dataReceivePointByValue | | [constr_1278] | PhysConstrs references a Unit | | [constr_1279] | Unmapped elements of ApplicationCompositeDataType s or Implementa- tionDataType s and the attribute swImplPolicy | | [constr_1280] | Unmapped dataElement on the receiver side shall have an initValue | | [constr_1281] | invalidValue shall be inside the scope of the compuMethod | | [constr_1282] | Restriction concerning the usage of RuleBasedValueSpecification or a Ref- erenceValueSpecification for the specification of an invalidValue | | [constr_1283] | invalidValue is outside the scope of the compuMethod | | [constr_1284] | Limitation of the use of TextValueSpecification | | [constr_1285] | Applicability of roles vs. PortPrototype s |

| Number | Heading |

| [constr_1286] | serverArgumentImplPolicy and ArgumentDataPrototype typed by primitive data types | | [constr_1287] | Compatibility of SenderReceiverInterface s with respect to invalidation- Policy | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by Implementation- DataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_1290] | Limitation on the number of PPortComSpec s in the context of one PPortPrototype | | [constr_1291] | Limitation on the number of RPortComSpec s in the context of one PPortPrototype | | [constr_1292] | Limitation on the number of RPortComSpec s/ PPortComSpec s in the context of one PRPortPrototype | | [constr_1293] | Existence of DiagnosticEventNeeds . dtcNumber | | [constr_1294] | Existence of DiagnosticEventInfoNeeds . dtcNumber | | [constr_1295] | PortInterface s and category DATA_REFERENCE | | [constr_1296] | DataPrototype s used as explicitInterRunnableVariable or implicitIn- terRunnableVariable and category DATA_REFERENCE |

G.5.3. R4.1.2 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01006] | ImplementationDataType . subElement . arraySize shall be used to de- fine the size of the array | | [TPS_SWCT_01175] | Actively query the status of a partial network | | [TPS_SWCT_01219] | ComSpec for queued and non-queued sender-receiver communication | | [TPS_SWCT_01154] | Attribute prefix of IncludedModeDeclarationGroupSet | | [TPS_SWCT_02011] | AtomicSwComponentType offers a server port to read DTR value via OBD services |

G.5.4. R4.1.2 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01549] | Definition of linear data scaling | | [TPS_SWCT_01550] | Definition of reciprocal linear data scaling | | [TPS_SWCT_01551] | Mapping of elements on the sender side to elements on the receiver side | | [TPS_SWCT_01552] | Software-component acts as a mode manager | | [TPS_SWCT_01553] | Software-component acts as a mode user | | [TPS_SWCT_01554] | Software-component acts as a mode requester | | [TPS_SWCT_01555] | ModeSwitchedAckEvent is triggered by the RTE regardless | | [TPS_SWCT_01556] | Rule for setting RoleBasedPortAssignment . role | | [TPS_SWCT_01557] | dataWriteAccess also allows for the definition of a DataWriteComplet- edEvent | | [TPS_SWCT_01558] | DataWriteCompletedEvent cannot be combined with a WaitPoint | | [TPS_SWCT_01559] | Default value for attribute SwDataDefProps . swCalibrationAccess | | [TPS_SWCT_01560] | Supported category s of CompuMethod s for data conversion | | [TPS_SWCT_01561] | Application of data conversion to composite AutosarDataType s | | [TPS_SWCT_01562] | Specification of values of an enumeration | | [TPS_SWCT_01563] | Applicable values for nativeDeclaration | | [TPS_SWCT_01564] | Non-recursive definition of a primitive data type | | [TPS_SWCT_01565] | Recursive definition of a primitive data type | | [TPS_SWCT_01566] | Define literals for an MCD system in the context of a FlatIn- stanceDescriptor | | [TPS_SWCT_01567] | Default behavior for invalidationPolicy | | [TPS_SWCT_01568] | Consideration of RPortComSpec or PPortComSpec depending on the own- ership | | [TPS_SWCT_01569] | Definition of CompuScale Symbolic Name | | [TPS_SWCT_01570] | DataTypeMap is mandatory in the presence of ApplicationPrimitive- DataType . swDataDefProps . swRecordLayout |

G.5.5. R4.1.2 中删除的约束

| Number | Heading |

| [constr_1042] | Definition of a linear data scaling | | [constr_1094] | Usage of symbol of RunnableEntity | | [constr_2025] | Uniqueness of symbol attributes (This constraint has been relocated to [10]) | | [constr_2032] | transmissionAcknowledge requires a DataSendCompletedEvent | | [constr_4011] | ComSpec and ModeSwitchedAckEvent |

G.5.6. R4.1.2 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01327] | RTE generator can omit the creation of checks at run-time |

G.6. 本文档 R4.1.3 版本的约束历史

G.6.1. R4.1.3 中新增的可追溯项

| Number | Heading |

| [TPS_SWCT_01573] | A PRPortPrototype is never considered unconnected | | [TPS_SWCT_01574] | PerInstanceMemory . typeDefinition shall not contain a function pointer |

G.6.2. R4.1.3 中变更的可追溯项

| Number | Heading |

| [TPS_SWCT_01009] | The numerical values used to define the values of ModeDeclaration . value and ModeDeclarationGroup . onTransitionValue can be arbitrarily de- fined | | [TPS_SWCT_01049] | Two ways to use the ExclusiveArea s |

G.6.3. R4.1.3 中删除的可追溯项

| Number | Heading |

| [TPS_SWCT_01417] | Define calibration parameters common to all SwComponentPrototype s of the same SwComponentType | | [TPS_SWCT_01419] | ParameterSwComponentType shall never aggregate a SwcInternalBe- havior | | [TPS_SWCT_02006] | AtomicSwComponentType offers sender receiver ports to adjust the IO signal via diagnostic services |

G.6.4. R4.1.3 中新增的约束

| Number | Heading |

| [constr_1297] | Applicability of serverArgumentImplPolicy set to useArrayBaseType | | [constr_1298] | Existence of attributes if category of a ModeDeclarationGroup is set to EX- PLICIT_ORDER | | [constr_1299] | Existence of attributes if category of a ModeDeclarationGroup is set to other than EXPLICIT_ORDER |

G.6.5. R4.1.3 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1230] | ApplicationDataType that qualifies for Integral Primitive Type |

G.6.6. R4.1.3 中删除的约束

| Number | Heading |

| [constr_1179] | Existence of ModeDeclaration . value within a ModeDeclarationGroup | | [constr_1180] | Existence of ModeDeclarationGroup . onTransitionValue |

G.7. 本文档 R4.2.1 版本的约束历史

G.7.1. R4.2.1 中新增的可追溯项

| Number | Heading |

| [TPS_SWCT_01572] | Application Mode Manager interacts with both BswM and other Application- SwComponentType s | | [TPS_SWCT_01577] | AtomicSwComponentType requires the notification about a Service Request via diagnostic services with manufacturer characteristics | | [TPS_SWCT_01578] | AtomicSwComponentType requires the notification about a Service Request via diagnostic services with supplier characteristics | | [TPS_SWCT_01579] | Dcm can directly access dataElement s in PPortPrototype s typed by a SenderReceiverInterface | | [TPS_SWCT_01580] | Dem can directly access dataElement s in PPortPrototype s typed by a SenderReceiverInterface | | [TPS_SWCT_01581] | Communication patterns for mode-related communication | | [TPS_SWCT_01582] | Semantics of DiagnosticEventNeeds . deferringFid | | [TPS_SWCT_01583] | Completeness of TextTableMapping is not a requirement | | [TPS_SWCT_01584] | InternalBehavior of a NvBlockSwComponentType for implementing a writing strategy | | [TPS_SWCT_01585] | Relevance of NvBlockDescriptor . timingEvent . period | | [TPS_SWCT_01586] | Writing strategies for nv data | | [TPS_SWCT_01587] | The cyclic writing of nv data requires the existence of a TimingEvent | | [TPS_SWCT_01588] | DataReceivedEvent for storing nv data immediately | | [TPS_SWCT_01589] | Implementation of emergency storing of nv data | | [TPS_SWCT_01590] | Combination of writing strategies for nv data is possible | | [TPS_SWCT_01591] | Existence of attribute DiagnosticEventNeeds . reportBehavior | | [TPS_SWCT_01592] | Communication among RunnableEntity s of different instances of the same AtomicSwComponentType | | [TPS_SWCT_01593] | Semantics of attribute ReceiverComSpec . transformationCom- SpecProps | | [TPS_SWCT_01594] | Semantics of TransformationComSpecProps | | [TPS_SWCT_01595] | Semantics of attribute ClientComSpec . transformationComSpecProps | | [TPS_SWCT_01596] | Semantics of attribute ServerComSpec . transformationComSpecProps | | [TPS_SWCT_01597] | PortPrototype -specific data transformation configuration | | [TPS_SWCT_01598] | More than one user-defined transformer is used within one transformer chain | | [TPS_SWCT_01599] | PortPrototype -specific configuration for custom transformers | | [TPS_SWCT_01600] | PortPrototype -specific configuration for data transformers related to end- to-end protection | | [TPS_SWCT_01601] | Size Indicator shall be updated by software-component |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01602] | Size Indicator shall be read by the software-component | | [TPS_SWCT_01603] | Variable size array with Size Indicator | | [TPS_SWCT_01604] | Enable Size Indicator | | [TPS_SWCT_01605] | Semantics of ApplicationArrayElement . arraySizeHandling | | [TPS_SWCT_01606] | Internal structure of mapped ImplementationDataType | | [TPS_SWCT_01607] | Profiles for internal structure of mapped ImplementationDataType | | [TPS_SWCT_01608] | Custom profiles for internal structure of mapped ImplementationDataType | | [TPS_SWCT_01609] | A RuleBasedValueSpecification of rule FILL_UNTIL_MAX_SIZE shall fill the value of the last RuleArguments .argument until the number of elements specified in maxSizeToFill | | [TPS_SWCT_01610] | Modeling of a Variable-Size Array Data Type with Size Indicator enabled | | [TPS_SWCT_01611] | Enable Size Indicator | | [TPS_SWCT_01612] | arraySizeHandling specifies how the size is determined | | [TPS_SWCT_01613] | Internal structure of mapped ImplementationDataType | | [TPS_SWCT_01614] | Profiles for internal structure of mapped ImplementationDataType | | [TPS_SWCT_01615] | Custom profiles for internal structure of mapped ImplementationDataType | | [TPS_SWCT_01616] | Semantics of TransformerHardErrorEvent | | [TPS_SWCT_01617] | Structure of an ImplementationDataType that represents a variable-sized array data type | | [TPS_SWCT_01618] | Size Indicator for dynamicArraySizeProfile set to VSA_LINEAR , VSA_SQUARE , or VSA_FULLY_FLEXIBLE | | [TPS_SWCT_01619] | Size Indicator for dynamicArraySizeProfile set to VSA_RECTANGU- LAR | | [TPS_SWCT_01620] | Size Indicator for dynamicArraySizeProfile set to VSA_RECTANGU- LAR | | [TPS_SWCT_01621] | Payload for dynamicArraySizeProfile | | [TPS_SWCT_01622] | Modeling of a Variable-Size Array Data Type only with Implementa- tionDataType | | [TPS_SWCT_01623] | Justification for the existence of attributes ApplicationArrayDataType . dynamicArraySizeProfile and ApplicationArrayElement . array- SizeHandling | | [TPS_SWCT_01624] | Hard error occurs during the execution of a transformer chain | | [TPS_SWCT_01625] | Sending SwComponentType owns a DataPrototypeGroup in the role dp- gRequiresCoherency and also RunnableEntityGroup s | | [TPS_SWCT_01626] | Error notification of data transformer errors | | [TPS_SWCT_01627] | Suffix used for the resulting name of the PortInterface for the Security Access | | [TPS_SWCT_01628] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices | | [TPS_SWCT_01629] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices |

| Number | Heading |

| [TPS_SWCT_01630] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices | | [TPS_SWCT_01631] | Suffix used for the resulting name of the PortInterface for the Infotype Services | | [TPS_SWCT_01632] | Suffix used for the resulting name of the PortInterface for the Routine Services | | [TPS_SWCT_01633] | Suffix used for the resulting name of the PortInterface for the Request Control Services | | [TPS_SWCT_01634] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices | | [TPS_SWCT_01635] | Naming conventions may support the effectiveness of SymbolProps | | [TPS_SWCT_01636] | Definition of profiles for the definition of Variable-Size Array Data Type s |

G.7.2. R4.2.1 中变更的可追溯项

| Number | Heading |

| [TPS_SWCT_01044] | ServiceNeeds | | [TPS_SWCT_01053] | Relationship of interchanged data with RunnableEntity s | | [TPS_SWCT_01141] | AtomicSwComponentType may have AbstractRequiredPortProto- type s typed by an NvDataInterface | | [TPS_SWCT_01150] | InternalBehavior of a NvBlockSwComponentType to enable access to the NVRAM Block management API | | [TPS_SWCT_01162] | Existence of TextTableMapping | | [TPS_SWCT_01180] | Maximum possible size of Compound Primitive Data Type | | [TPS_SWCT_01227] | Unconnected AbstractRequiredPortPrototype typed by NvDataIn- terface | | [TPS_SWCT_01228] | NvProvideComSpec | | [TPS_SWCT_01239] | default value for attribute category used in the context of SwSystemconst | | [TPS_SWCT_01274] | SwDataDefProps used to support calibration and measurement | | [TPS_SWCT_01321] | Communication among RunnableEntity s | | [TPS_SWCT_01330] | RunnableEntity can also have dataSendPoint s | | [TPS_SWCT_01335] | Combine dataReceivePointByValue or dataReceivePointByArgu- ment with a WaitPoint | | [TPS_SWCT_01348] | Trigger source | | [TPS_SWCT_01385] | Execution of finalization code for software-components | | [TPS_SWCT_01456] | Predefined values for MemorySection . option and SwAddrMethod . option | | [TPS_SWCT_01475] | Sending SwComponentType owns a DataPrototypeGroup in the role dp- gRequiresCoherency |

| Number | Heading |

| [TPS_SWCT_01494] | A RuleBasedValueSpecification of rule FILL_UNTIL_END shall fill the value of the last RuleArguments .argument until the last element of the array | | [TPS_SWCT_01495] | Standardized value of RuleBasedValueSpecification . rule | | [TPS_SWCT_01549] | Definition of linear data scaling | | [TPS_SWCT_01560] | Supported category s of CompuMethod s for data conversion | | [TPS_SWCT_02501] | Setup for Nvm Use Case: Permanent RAM Block | | [TPS_SWCT_02502] | Setup for Nvm Use Case: Temporary RAM Block | | [TPS_SWCT_02503] | Setup for NVM Use Case: Software-Components using Nv Data provided by NvBlockSwComponentType | | [TPS_SWCT_02504] | Setup for Nvm Use Case: RAM Block with explicit synchronization using Mirror Interfaces |

G.7.3. R4.2.1 中删除的可追溯项

| Number | Heading |

| Id | Heading | | [TPS_SWCT_01131] | AtomicSwComponentType accepts a request to restart an entire function | | [TPS_SWCT_01386] | Initialization by mode management | | [TPS_SWCT_01387] | Finalization by mode management | | [TPS_SWCT_01410] | Dcm and Dem can directly access dataElement s in PPortPrototype s typed by a SenderReceiverInterface | | [TPS_SWCT_01438] | Handling of invalidation in the sending RTE | | [TPS_SWCT_01439] | Handling of invalidation in the receiving RTE | | [TPS_SWCT_02017] | AtomicSwComponentType requires the notification about a Service Request via diagnostic services |

G.7.4. R4.2.1 中新增的约束

| Number | Heading |

| [constr_1300] | Primitive DataPrototype on the provider side shall not be mapped to element of a composite data type on the requester side | | [constr_1301] | Existence of RoleBasedDataTypeAssignment . role vs. RoleBasedDataAs- signment . role |

| Number | Heading |

| [constr_1302] | Restriction of data invalidation | | [constr_1303] | Applicability of TextTableMapping depending on the value of CompuMethod . cat- egory | | [constr_1304] | Existence of attribute bitfieldTextTableMaskFirst | | [constr_1305] | Existence of attribute bitfieldTextTableMaskSecond | | [constr_1306] | Limitation of TextTableMapping for CompuMethod s that have the value of cate- gory set to BITFIELD_TEXTTABLE | | [constr_1307] | Consistency of values and masks in TextTableMapping | | [constr_1308] | Existence of NvBlockNeeds . cyclicWritingPeriod | | [constr_1309] | Existence of NvBlockDescriptor . timingEvent | | [constr_1310] | Existence of attributes of meta-class NvBlockNeeds | | [constr_1311] | Appearance of safety-related possible values of MemorySection . option or SwAd- drMethod . option according to [TPS_SWCT_01456] | | [constr_1312] | PortPrototype s typed by a ParameterInterface | | [constr_1313] | Completeness of TextTableMapping for the values of a given bit mask on the sender side | | [constr_1314] | Profile VSA_LINEAR for ApplicationArrayDataType | | [constr_1315] | Profile VSA_SQUARE for ApplicationArrayDataType | | [constr_1316] | Profile VSA_RECTANGULAR for ApplicationArrayDataType | | [constr_1317] | Profile VSA_FULLY_FLEXIBLE for ApplicationArrayDataType | | [constr_1318] | Profile VSA_LINEAR for ImplementationDataType | | [constr_1319] | Profile VSA_SQUARE for ImplementationDataType | | [constr_1320] | Profile VSA_RECTANGULAR for ImplementationDataType | | [constr_1321] | Profile VSA_FULLY_FLEXIBLE for ImplementationDataType | | [constr_1322] | Size Indicator for undefined dynamicArraySizeProfile | | [constr_1323] | Applicability of attribute ReceiverComSpec . usesEndToEndProtection | | [constr_1363] | Existence of attributes of DiagnosticValueNeeds | | [constr_1364] | Existence of attributes of DiagnosticIoControlNeeds | | [constr_1375] | Existence of attributes of CompuMethod and related meta-classes |

G.7.5. R4.2.1 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s |

| Number | Heading |

| [constr_1014] | Supported value encodings for SwBaseType | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1037] | Client shall not be connected to multiple servers | | [constr_1072] | Compatibility of ModeSwitchInterface s in the context of an AssemblySwCon- nector | | [constr_1073] | Compatibility of ModeSwitchInterface s in the context of an DelegationSwCon- nector | | [constr_1074] | Compatibility of ModeDeclarationGroupPrototype s | | [constr_1101] | Mode-related communication | | [constr_1112] | Constraints of dataIdMode in PROFILE_01 | | [constr_1149] | PortPrototype s used for NV data management | | [constr_1188] | Existence of ReceiverComSpec . replaceWith | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by Implementation- DataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_2009] | Supported kinds of PortPrototype s of a NvBlockSwComponentType | | [constr_2015] | Limitation of SwcInternalBehavior of a NvBlockSwComponentType | | [constr_2019] | ServiceSwComponentType shall have service ports only | | [constr_2022] | Mutually exclusive use of SynchronousServerCallPoint s and Asyn- chronousServerCallPoint s | | [constr_2051] | Mandatory information of a SwValueCont |

G.7.6. R4.2.1 中删除的约束

| Number | Heading |

| [constr_1189] | Allowed targets of externalReplacement | | [constr_1293] | Existence of DiagnosticEventNeeds . dtcNumber | | [constr_1294] | Existence of DiagnosticEventInfoNeeds . dtcNumber | | [constr_2551] | SwCalprmAxis.baseType shall be ignored |

G.8. 本文档 R4.2.2 版本的约束历史

G.8.1. R4.2.2 中新增的可追溯项

| Number | Heading |

| [TPS_SWCT_01637] | Initial value for a specific implicitInterRunnableVariable or explic- itInterRunnableVariable | | [TPS_SWCT_01638] | Existence of SwConnector between two PRPortPrototype s | | [TPS_SWCT_01639] | AtomicSwComponentType offers a PPortPrototype typed by ClientServerInterface to read/write current value via diagnostic ser- vices where the applicable DID is passed as an argument to the access functions | | [TPS_SWCT_01640] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices | | [TPS_SWCT_01641] | Definition of an 'old-world' dynamic-size array data type by means of an Ap- plicationArrayDataType | | [TPS_SWCT_01642] | Definition of an 'old-world' dynamic-size array data type by means of an Im- plementationDataType | | [TPS_SWCT_01644] | Definition of a 'new-world' variable-size array data type by means of an Ap- plicationArrayDataType | | [TPS_SWCT_01645] | Definition of a 'new-world' variable-size array data type by means of an Im- plementationDataType | | [TPS_SWCT_01646] | Sending invalidValue without invalidation applied by RTE/Com | | [TPS_SWCT_01647] | Size Indicator for dynamicArraySizeProfile set to VSA_LIN- EAR , VSA_SQUARE , or VSA_FULLY_FLEXIBLE if only Implementation- DataType is present | | [TPS_SWCT_01648] | Size Indicator for dynamicArraySizeProfile set to VSA_RECTANGU- LAR if only ImplementationDataType is present | | [TPS_SWCT_01649] | Payload for dynamicArraySizeProfile if only Implementation- DataType is present | | [TPS_SWCT_01650] | Structure of the VSA ImplementationDataType | | [TPS_SWCT_01651] | UTF-16BE | | [TPS_SWCT_01652] | UTF-16LE | | [TPS_SWCT_01653] | UTF-16 -encoded strings are not allowed to start with a BOM | | [TPS_SWCT_01654] | AtomicSwComponentType offers PortPrototype s typed by Sender- ReceiverInterface s to adjust the IO signal via diagnostic services | | [TPS_SWCT_01655] | Reference from DiagnosticIoControlNeeds to DiagnosticValue- Needs | | [TPS_SWCT_01656] | Suffix used for the resulting name of the PortInterface for IOControlRe- quest and IOControlResponse | | [TPS_SWCT_01657] | NamingRule for RPortPrototype referenced by a RoleBasedPortAs- signment with attribute role set to 'IOControlRequest' |

| Number | Heading |

| [TPS_SWCT_01658] | NamingRule for PPortPrototype referenced by a RoleBasedPortAs- signment with attribute role set to 'IOControlResponse' | | [TPS_SWCT_01659] | Mapping of VariableDataPrototype to a NvBlockDescriptor |

G.8.2. R4.2.2 中变更的可追溯项

| Number | Heading |

| [TPS_SWCT_01133] | AtomicSwComponentType provides information about aging cycles | | [TPS_SWCT_01158] | Three cases for PortInterfaceMapping | | [TPS_SWCT_01179] | Compound Primitive Data Type | | [TPS_SWCT_01244] | Data types for calibration parameters are also described as primitive types | | [TPS_SWCT_01370] | VariationPointProxy | | [TPS_SWCT_01431] | Finding the symbol for the representation of a CompuScale with a point-range in C code | | [TPS_SWCT_01432] | Keep the invalidValue transparent to the sending and receiving software components | | [TPS_SWCT_01434] | Sender and receiver have knowledge of invalid value | | [TPS_SWCT_01610] | Modeling of a Variable-Size Array Data Type with Size Indicator enabled | | [TPS_SWCT_01616] | Semantics of TransformerHardErrorEvent | | [TPS_SWCT_01617] | Structure of an ImplementationDataType that represents a variable-sized array data type | | [TPS_SWCT_01624] | Hard error occurs during the execution of a transformer chain | | [TPS_SWCT_02001] | Values of SwAxisCont with the category , COM_AXIS , RES_AXIS are for display only | | [TPS_SWCT_02053] | Values of RuleBasedAxisCont with the category COM_AXIS , RES_AXIS are for display only |

G.8.3. R4.2.2 中删除的可追溯项

| Number | Heading |

| [TPS_SWCT_01308] | Combination of supportsMultipleInstantiation = false and can- BeInvokedConcurrently = false | | [TPS_SWCT_01433] | Invalid values outside the range limits |

| Number | Heading |

| [TPS_SWCT_01435] | Invalid values outside the range limits | | [TPS_SWCT_01603] | Variable size array with Size Indicator | | [TPS_SWCT_01611] | Enable Size Indicator |

G.8.4. R4.2.2 中新增的约束

| Number | Heading |

| [constr_1381] | Appearance of core-related possible values of MemorySection . option or SwAd- drMethod . option according to [TPS_SWCT_01456] | | [constr_1382] | Mutually exclusive existence of attributes SwVariableRefProxy . autosarVari- able vs. SwVariableRefProxy . mcDataInstanceVar | | [constr_1383] | Existence of CompuMethod and DataConstr for ImplementationDataType s of category TYPE_REFERENCE | | [constr_1384] | Definition of invalidValue for DataPrototype typed by ApplicationPrimi- tiveDataType of category CURVE , MAP , CUBOID , CUBE_4 , CUBE_5 , COM_AXIS , RES_AXIS , and VAL_BLK | | [constr_1385] | DataPrototype is typed by an ImplementationDataType | | [constr_1386] | PortDefinedArgumentValue shall only be defined for AbstractProvided- PortPrototype | | [constr_1388] | VariationPointProxy of category VALUE shall not mix 'pre-build' and 'post- build' use-cases | | [constr_1389] | Restriction regarding the value of category of VariationPointProxy . imple- mentationDataType | | [constr_1390] | Restriction to the value of SenderReceiverInterface . invalidationPolicy . handleInvalid | | [constr_1391] | Compatibility of Unit s in the context of assignment using an ApplicationValue- Specification | | [constr_1392] | Compatibility of Unit s in the context of assignment using an ApplicationRule- BasedValueSpecification | | [constr_1393] | Existence of RuleBasedValueCont . unit | | [constr_1395] | NvBlockDataMapping shall be complete | | [constr_1396] | Restriction for the value of attribute category for non-terminating Implementa- tionDataTypeElement s taken to model a Variable-Size Array Data Type | | [constr_1397] | Existence of attributes of TransformerHardErrorEvent | | [constr_1398] | Existence of attributes of BaseTypeDirectDefinition | | [constr_1399] | Standardized values of ModeDeclarationGroup . category | | [constr_1400] | Reference to a specific DataTransformation | | [constr_1401] | Restrictions on the relation between DataPrototypeMapping and DataTrans- formation |

| Number | Heading |

| [constr_1402] | Applicability of core-related possible values of MemorySection . option or SwAd- drMethod . option related to SwAddrMethod . sectionInitializationPolicy | | [constr_1403] | NvBlockDataMapping s to a given nvData shall be unambiguous | | [constr_1404] | All NvDataInterface . nvData of PortPrototype s in the context of a specific SwcServiceDependency shall be mapped to the same NvBlockDescriptor |

G.8.5. R4.2.2 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1040] | Conversion of SenderReceiverInterface s | | [constr_1045] | Supported value encodings for SwBaseType in the context of PortInterface s | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK | | [constr_1064] | Compatibility of data types with category COM_AXIS , RES_AXIS , CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 | | [constr_1066] | Forbidden mappings to ImplementationDataType | | [constr_1075] | Compatibility of ModeDeclarationGroup s | | [constr_1164] | Number of argument s owned by a RunnableEntity | | [constr_1234] | Value of RunnableEntity . symbol | | [constr_1318] | Profile VSA_LINEAR for ImplementationDataType | | [constr_1319] | Profile VSA_SQUARE for ImplementationDataType | | [constr_1320] | Profile VSA_RECTANGULAR for ImplementationDataType | | [constr_1321] | Profile VSA_FULLY_FLEXIBLE for ImplementationDataType | | [constr_1322] | Size Indicator for undefined dynamicArraySizeProfile | | [constr_2051] | Mandatory information of a SwValueCont | | [constr_2058] | Mandatory information of a RuleBasedValueCont |

G.8.6. R4.2.2 中删除的约束

| Number | Heading |

| [constr_1002] | End-to-end protection does not support n:1 communication | | [constr_1067] | ApplicationDataType is or is not compatible to specific Implementation- DataType | | [constr_2001] | Initial value for a specific implicitInterRunnableVariable or explicitIn- terRunnableVariable |

G.9. 本文档 R4.3.0 版本的约束历史

G.9.1. R4.3.0 中新增的可追溯项

| Number | Heading |

| [TPS_SWCT_01660] | Values of SwcServiceDependency . category reserved by the standard | | [TPS_SWCT_01661] | Default value of SwcServiceDependency . category | | [TPS_SWCT_01662] | Applicability of DataTypeMappingSet s inside an NvBlockSwComponent- Type | | [TPS_SWCT_01663] | dataReadAccess vs. dataReceivePointByValue or dataReceive- PointByArgument | | [TPS_SWCT_01664] | BswM acts as a mode requester towards an application mode manager | | [TPS_SWCT_01665] | Usage of SwcModeSwitchEvent for triggering a write procedure of nv data | | [TPS_SWCT_01666] | Semantics of ModeSwitchEventTriggeredActivity . role | | [TPS_SWCT_01667] | Avoidance of overlapping of directly adjacent intervals within CompuMethod s | | [TPS_SWCT_01668] | SecOc Use Case: obtain the verification status of secure communication | | [TPS_SWCT_01672] | SecOc Use Case: software component retires from secure communication for a given period | | [TPS_SWCT_01673] | Application Software Component sends requests using the J1939Rm | | [TPS_SWCT_01674] | Application Software Component accepts requests using the J1939Rm | | [TPS_SWCT_01675] | Recommendations for attributes of NvBlockNeeds or for NvBlockDescrip- tor | | [TPS_SWCT_01676] | Preferred approach to checking the compatibility of input value and axis | | [TPS_SWCT_01677] | Fall-back approach to checking the compatibility of input value and axis | | [TPS_SWCT_01678] | StbM use Case: Application software component accesses the Synchronized Time-Base Manager | | [TPS_SWCT_01679] | StbM use Case: Synchronized Time-Base Manager notifies application soft- ware component |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01680] | Dem Use Case: Atomic Software-Component implements a Hardware Shut- down | | [TPS_SWCT_01681] | Context path in ArVariableInImplementationDataInstanceRef | | [TPS_SWCT_01682] | The meaning of E2E-related attributes in a ReceiverComSpec if a TransformationComSpecProps of type EndToEndTransformation- ComSpecProps is defined. | | [TPS_SWCT_01683] | Specification of an array of input variable for an array of axes | | [TPS_SWCT_01684] | Specification of a single input variable for an array of axes | | [TPS_SWCT_01685] | Specification of an array of group axes for an array of category CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 | | [TPS_SWCT_01686] | Specification of a single group axis for an array of elements of category CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 | | [TPS_SWCT_01687] | Support of locked communication buffers | | [TPS_SWCT_01688] | initValue should exist in an RPortPrototype | | [TPS_SWCT_01689] | Relation between SwcServiceDependency s and PortPrototype s | | [TPS_SWCT_01690] | AtomicSwComponentType offers a PPortPrototype typed by ClientServerInterface to read/write and IOCtrl current value via di- agnostic services | | [TPS_SWCT_01691] | Suffix used for the resulting name of the PortInterface for the Data Ser- vices | | [TPS_SWCT_01692] | Meaning of CompositeRuleBasedValueSpecification | | [TPS_SWCT_01693] | Usage of VendorSpecificServiceNeeds | | [TPS_SWCT_01694] | Setup for Default Error Tracer Service use Case: development errors or run- time error | | [TPS_SWCT_01695] | Relation between ValueSpecification and the definition of CompuScale s | | [TPS_SWCT_01696] | CompuScale Value Symbolic Name | | [TPS_SWCT_01697] | Supported development approach for software-components that interact with AUTOSAR services | | [TPS_SWCT_01698] | Attributes that are subject to development approach | | [TPS_SWCT_01699] | Usage of ApplicationArrayElement . indexDataType | | [TPS_SWCT_01700] | Definition of unions that can be transmitted over a communication network | | [TPS_SWCT_01701] | Wrapped Union Data Type | | [TPS_SWCT_01702] | Initialization of the 'payload' of a Wrapped Union Data Type | | [TPS_SWCT_01703] | Setup for AtomicSwComponentType which sets or gets the Global Supervi- sion Status | | [TPS_SWCT_01704] | Definition of supervised entity | | [TPS_SWCT_01705] | Definition of Checkpoints | | [TPS_SWCT_01706] | AtomicSwComponentType supports DiagnosticSessionControl to get in- formed about the diagnostic session | | [TPS_SWCT_01707] | AtomicSwComponentType supports EcuReset service via diagnostic ser- vices | | [TPS_SWCT_01708] | AtomicSwComponentType supports EcuReset ModeRapidPowerShutDown service via diagnostic services |

| Number | Heading |

| [TPS_SWCT_01709] | AtomicSwComponentType supports CommunicationControl service via di- agnostic services | | [TPS_SWCT_01710] | Suffix used for the resulting name of the PortInterface for the Communi- cation Control | | [TPS_SWCT_01711] | AtomicSwComponentType supports ControlDTCSetting service via diagnos- tic services | | [TPS_SWCT_01712] | AtomicSwComponentType supports SecurityAccess to get informed about the security level | | [TPS_SWCT_01713] | ExclusiveArea is entered and exited by a common set of APIs | | [TPS_SWCT_01714] | ExclusiveArea is entered and exited by an individual set of APIs | | [TPS_SWCT_01715] | Software-Component wants to be triggered on Monitor Status Changes | | [TPS_SWCT_01716] | SecOc Use Case: deliver freshness to SecOC I | | [TPS_SWCT_01717] | SecOc Use Case: deliver freshness to SecOC II | | [TPS_SWCT_01718] | SecOc Use Case: deliver freshness to SecOC III | | [TPS_SWCT_01719] | Selection of applicable RptProfile s | | [TPS_SWCT_01720] | Preparation Levels | | [TPS_SWCT_01721] | References from RptContainer | | [TPS_SWCT_01722] | Semantics of RP Service Point | | [TPS_SWCT_01723] | Semantics of RP Service Function | | [TPS_SWCT_01724] | Semantics of RapidPrototypingScenario | | [TPS_SWCT_01725] | AtomicSwComponentType uses the secure counter of the Crypto Service | | [TPS_SWCT_01726] | AtomicSwComponentType uses the key management of the Crypto Service | | [TPS_SWCT_01727] | Suffix used for the resulting name of the PortInterface for crypto PortIn- terface s | | [TPS_SWCT_01728] | V2xFac Use Case: Application software component provides Vehicle specific data to the V2X-Stack for CAM transmission | | [TPS_SWCT_01729] | V2xFac Use Case: V2xFac notifies application software component about re- ceived messages | | [TPS_SWCT_01730] | V2xFac Use Case: Application software component triggers transmission of DENM message | | [TPS_SWCT_01731] | V2xM Use Case: Application software component provides Vehicle specific data to the V2X-Stack for Position and Time information | | [TPS_SWCT_01732] | V2xM Use Case: Application software component needs V2X specific data from the V2X Manager | | [TPS_SWCT_01733] | V2xM Use Case: Application software component has soft-control over Pseudonym-Change within V2X Manager | | [TPS_SWCT_01734] | V2xM Use Case: Application software component has the ability to do Verification-on-Demand | | [TPS_SWCT_01735] | V2xM Use Case: Application software component do location based calcula- tions |

G.9.2. R4.3.0 中变更的可追溯项

| Number | Heading |

| [TPS_SWCT_01005] | Usage of SwcServiceDependency s for vendor-specific services | | [TPS_SWCT_01054] | Semantics of the explicitInterRunnableVariable | | [TPS_SWCT_01134] | AtomicSwComponentType enables reporting of DTCs in general | | [TPS_SWCT_01158] | Cases for PortInterfaceMapping | | [TPS_SWCT_01173] | Control port shall not become a part of the PortGroup | | [TPS_SWCT_01174] | Status port shall not become a member of the PortGroup | | [TPS_SWCT_01182] | Conceptual levels for the definition of initial values | | [TPS_SWCT_01275] | values of the attribute swImplPolicy are restricted depending on the context | | [TPS_SWCT_01331] | dataWriteAccess vs. dataSendPoint | | [TPS_SWCT_01355] | enableTakeAddress = true | | [TPS_SWCT_01463] | ModeDeclarationGroupPrototypeMapping . modeDeclarationMap- pingSet defines the applicable set of ModeDeclarationMapping s | | [TPS_SWCT_01493] | The number of RuleBasedValueSpecification . arguments shall not ex- ceed the array size | | [TPS_SWCT_01494] | A RuleBasedValueSpecification of rule FILL_UNTIL_END shall fill the value of the last RuleBasedValueSpecification . arguments until the last element of the array | | [TPS_SWCT_01552] | Software-component acts as a mode manager | | [TPS_SWCT_01553] | Software-component acts as a mode user | | [TPS_SWCT_01554] | Software-component acts as a mode requester | | [TPS_SWCT_01569] | Definition of CompuScale Code Symbolic Name | | [TPS_SWCT_01586] | Writing strategies for nv data | | [TPS_SWCT_01609] | A RuleBasedValueSpecification of rule FILL_UNTIL_MAX_SIZE shall fill the value of the last RuleBasedValueSpecification . arguments until the number of elements specified in maxSizeToFill | | [TPS_SWCT_01635] | Naming conventions may support the effectiveness of SymbolProps | | [TPS_SWCT_02001] | Values of SwAxisCont with the category COM_AXIS , RES_AXIS are for dis- play only | | [TPS_SWCT_02014] | AtomicSwComponentType supports Response On Event (ROE) via diagnos- tic services | | [TPS_SWCT_02020] | AtomicSwComponentType uses the hash calculation of the Crypto Service | | [TPS_SWCT_02021] | AtomicSwComponentType uses the message authentication code (MAC) calculation of the Crypto Service | | [TPS_SWCT_02022] | AtomicSwComponentType uses the message authentication code (MAC) verification of the Crypto Service | | [TPS_SWCT_02024] | AtomicSwComponentType uses the generation of random numbers of the Crypto Service | | [TPS_SWCT_02025] | AtomicSwComponentType uses the Authenticated Encryption with Associ- ated Data (AEAD) of the Crypto Service |

| Number | Heading |

| [TPS_SWCT_02026] | AtomicSwComponentType uses the Authenticated Encryption with Associ- ated Data (AEAD) of the Crypto Service | | [TPS_SWCT_02027] | AtomicSwComponentType uses the encryption of the Crypto Service | | [TPS_SWCT_02028] | AtomicSwComponentType uses the decryption of the Crypto Service | | [TPS_SWCT_02031] | AtomicSwComponentType uses the signature generation of the Crypto Ser- vice | | [TPS_SWCT_02032] | AtomicSwComponentType uses the signature verification of the Crypto Ser- vice | | [TPS_SWCT_02053] | Values of RuleBasedAxisCont with the category COM_AXIS , RES_AXIS are for display only | | [TPS_SWCT_02503] | Setup for NVM Use Case: Software-Components using Nv Data provided by NvBlockSwComponentType | | [TPS_SWCT_02506] | Setup for Dlt use Case: Application software component accesses the Dlt mod- ule |

G.9.3. R4.3.0 中删除的可追溯项

| Number | Heading |

| [TPS_SWCT_01279] | Preferred conversion direction depends on the use case | | [TPS_SWCT_01428] | ServiceSwComponentType representing the Dem provides a PPortProto- type for the Dcm | | [TPS_SWCT_02018] | Setup for AtomicSwComponentType which contains a Supervised Entity | | [TPS_SWCT_02023] | AtomicSwComponentType uses the generation of random seed of the Crypto Service | | [TPS_SWCT_02029] | AtomicSwComponentType uses the asymmetrical encryption of the Crypto Service | | [TPS_SWCT_02030] | AtomicSwComponentType uses the asymmetrical decryption of the Crypto Service | | [TPS_SWCT_02033] | AtomicSwComponentType uses the checksum calculation of the Crypto Ser- vice | | [TPS_SWCT_02034] | AtomicSwComponentType uses the key derivation of the Crypto Service | | [TPS_SWCT_02035] | AtomicSwComponentType uses the symmetric key derivation of the Crypto Service | | [TPS_SWCT_02036] | AtomicSwComponentType uses the key exchange interface for public value calculation of the Crypto Service | | [TPS_SWCT_02037] | AtomicSwComponentType uses the key exchange interface for secret value calculation of the Crypto Service | | [TPS_SWCT_02038] | AtomicSwComponentType uses the key exchange interface to calculate sym- metric key with the Crypto Service |

| Number | Heading |

| [TPS_SWCT_02039] | AtomicSwComponentType uses the symmetrical key extraction of the Crypto Service | | [TPS_SWCT_02040] | AtomicSwComponentType uses the symmetrical key wrapping of the Crypto Service to export a symmetrical key structure with a symmetric key | | [TPS_SWCT_02041] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a symmetrical key structure with a asymmetric key | | [TPS_SWCT_02042] | AtomicSwComponentType uses the asymmetrical public key extraction of the Crypto Service | | [TPS_SWCT_02043] | AtomicSwComponentType uses the asymmetrical private key extraction of the Crypto Service | | [TPS_SWCT_02044] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a (asymmetric) private key structure with a symmetri- cal wrapping key | | [TPS_SWCT_02045] | AtomicSwComponentType uses the asymmetrical key wrapping of the Crypto Service to export a (asymmetric) private key structure with a asym- metrical wrapping key |

G.9.4. R4.3.0 中新增的约束

| Number | Heading |

| [constr_1407] | Definition of SwDataDefProps . dataConstr depending on the capabilities of the data type | | [constr_1408] | Definition of SwDataDefProps . displayFormat depending on the capabilities of the data type | | [constr_1409] | Definition of SwDataDefProps . dataConstr depending on the capabilities of the element data type | | [constr_1410] | Definition of SwDataDefProps . displayFormat depending on the capabilities of the element data type | | [constr_1413] | Definition of SwDataDefProps . stepSize depending on the capabilities of the data type | | [constr_1414] | Definition of SwDataDefProps . stepSize depending on the capabilities of the ele- ment data type | | [constr_1415] | Supported values of ModeSwitchEventTriggeredActivity . role | | [constr_1416] | Existence of ApplicationArrayElement . maxNumberOfElements | | [constr_1417] | Invalid connection between NvBlockSwComponentType and other AtomicSwCom- ponentType (I) | | [constr_1418] | Invalid connection between NvBlockSwComponentType and other AtomicSwCom- ponentType (II) | | [constr_1420] | Existence of SwAxisIndividual . inputVariableType |

| Number | Heading |

| [constr_1422] | Value of category is VOID | | [constr_1423] | Completeness of references ArVariableInImplementationDataInstanceRef . contextDataPrototype | | [constr_1424] | Existence of ArVariableInImplementationDataInstanceRef . contextDat- aPrototype | | [constr_1425] | Definition of swCalprmAxisSet . swCalprmAxis / SwAxisIndividual . swVari- ableRef depending on the capabilities of the data type | | [constr_1426] | Consistency of array sizes for axes and input variable array | | [constr_1427] | Definition of swCalprmAxisSet . swCalprmAxis / SwAxisGrouped . swCalprmRef depending on the capabilities of the data type | | [constr_1428] | Consistency of array sizes for arrays of elements of category CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 arrays and used group axes arrays | | [constr_1429] | Access to data within PortPrototype s from within RunnableEntity s | | [constr_1430] | Access to local data from within RunnableEntity s | | [constr_1431] | Access to parameters from within RunnableEntity s | | [constr_1432] | Multiplicity of CommunicationBufferLocking | | [constr_1433] | Transient faults are not applicable to software-components | | [constr_1434] | CompuScale s shall not have identical CompuScale Value Symbolic Name s | | [constr_1436] | DiagnosticCommunicationManagerNeeds . serviceRequestCallbackType is set to requestCallbackTypeSupplier | | [constr_1437] | DiagnosticCommunicationManagerNeeds . serviceRequestCallbackType is set to requestCallbackTypeManufacturer | | [constr_1438] | ApplicationArrayElement . indexDataType needs to refer to a CompuMethod of category TEXTTABLE | | [constr_1439] | Requirements on ApplicationArrayElement if attribute indexDataType exists | | [constr_1440] | Size of the CompuMethod of category TEXTTABLE referenced by Application- ArrayElement . indexDataType | | [constr_1442] | category TYPE_REFERENCE shall not be used for modeling the 'payload' of a Wrapped Union Data Type | | [constr_1443] | category UNION shall not be used for ImplementationDataType | | [constr_1444] | Limited applicability of Wrapped Union Data Type | | [constr_1445] | Initialization of the Member Selector of a Wrapped Union Data Type | | [constr_1446] | No definition of invalidValue for a Wrapped Union Data Type | | [constr_1468] | Limitation on the number of SwcExclusiveAreaPolicy s | | [constr_1469] | Applicability of constraints depending on the existence of a data transformation |

G.9.5. R4.3.0 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1011] | category of SwBaseType | | [constr_1014] | Supported value encodings for SwBaseType | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1024] | Stepwise definition of CompuMethod s | | [constr_1045] | Supported value encodings for SwBaseType in the context of PortInterface s | | [constr_1105] | Value of arraySize | | [constr_1240] | Consistency of ArgumentDataPrototype s within the context of a ClientServer- OperationMapping | | [constr_1271] | RecordValueSpecification . field s shall be identical to the number of Appli- cationRecordDataType . element s | | [constr_1272] | RecordValueSpecification . field s shall be identical to the number of subEle- ment s of ImplementationDataType of category STRUCTURE | | [constr_1284] | Limitation of the use of TextValueSpecification | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by Implementation- DataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_1302] | Restriction of data invalidation | | [constr_1375] | Existence of attributes of CompuMethod and related meta-classes | | [constr_1400] | Reference to a specific DataTransformation | | [constr_2006] | Number of AsynchronousServerCallResultPoint referencing to one Asyn- chronousServerCallPoint | | [constr_2015] | Limitation of SwcInternalBehavior of a NvBlockSwComponentType | | [constr_2041] | swImplPolicy for VariableDataPrototype in the role staticMemory | | [constr_2051] | Mandatory information of a SwValueCont | | [constr_2058] | Mandatory information of a RuleBasedValueCont |

G.9.6. R4.3.0 中删除的约束

| Number | Heading |

| [constr_1019] | Compatibility of input value and axis | | [constr_1021] | A CompuMethod shall specify instructions for both directions | | [constr_1133] | Identical CompuScale Symbolic Name s shall have the same range | | [constr_1201] | initValue shall exist in an RPortPrototype | | [constr_1323] | Applicability of attribute ReceiverComSpec . usesEndToEndProtection |

G.10. 本文档 R4.3.1 版本的约束历史

G.10.1. R4.3.1 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01736] | Default values for Unit . physicalDimension | | [TPS_SWCT_01737] | Default values for physical exponents | | [TPS_SWCT_01738] | Context path in ArParameterInImplementationDataInstanceRef | | [TPS_SWCT_01739] | Function Inhibition Manager Use Case: react on suppressed or unavailable events | | [TPS_SWCT_01740] | StbM use Case: Process time snapshot obtained from global time slave for diagnostics purposes | | [TPS_SWCT_01741] | Suffix used for the resulting name of the PortInterface for measurement notification | | [TPS_SWCT_01742] | StbM use Case: Software-component represents a global time master | | [TPS_SWCT_01743] | Suffix used for the resulting name of the PortInterface for the global time master role | | [TPS_SWCT_01744] | StbM use Case: Software-component represents a global time slave | | [TPS_SWCT_01745] | Suffix used for the resulting name of the PortInterface for the global time slave role | | [TPS_SWCT_01746] | Atomic Software-Component provides the further action byte to the DoIP Ser- vice Component | | [TPS_SWCT_01747] | Value of category for fix axis | | [TPS_SWCT_01748] | Sub-categories of fix axes | | [TPS_SWCT_01749] | Semantics of SwAxisGeneric . swAxisType in the definition of a fix axis | | [TPS_SWCT_01750] | Semantics of SwAxisGeneric . swGenericAxisParam in the definition of a fix axis |

G.10.2. R4.3.1 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01193] | Mappings between application and implementation types do not necessarily have to form a 1:1 relation | | [TPS_SWCT_01222] | Applicability of DataFilter | | [TPS_SWCT_01225] | RunnableEntity implements the functionality of more than one ClientServerOperation s | | [TPS_SWCT_01288] | Interpretation of PhysConstrs and InternalConstrs by tools | | [TPS_SWCT_01444] | Size of SwBaseType is specified in bits | | [TPS_SWCT_01560] | Supported category s of CompuMethod s for data conversion | | [TPS_SWCT_01675] | Recommendations for attributes of NvBlockNeeds or for NvBlockDe- scriptor | | [TPS_SWCT_01678] | StbM use Case: start timer and potentially get notified about its expiration | | [TPS_SWCT_01679] | StbM use Case: Software-Components wants to get notifications of status changes | | [TPS_SWCT_01714] | ExclusiveArea is entered and exited by an individual set of APIs | | [TPS_SWCT_02506] | Setup for Dlt use Case: Application software component accesses the Dlt module |

G.10.3. R4.3.1 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01490] | AUTOSAR supports ApplicationError s only for ClientServerInter- face s |

G.10.4. R4.3.1 中新增的约束

| Number | Heading |

| [constr_1515] | Existence of ImplementationDataTypeSubElementRef . implementation- DataTypeElement as opposed to ImplementationDataTypeSubElementRef . parameterImplementationDataTypeElement | | [constr_1516] | Completeness of references ArParameterInImplementationDataIn- stanceRef . contextDataPrototype | | [constr_1517] | Existence of ArParameterInImplementationDataInstanceRef . context- DataPrototype |

| Number | Heading |

| [constr_1518] | Consistency of data types in the context of ArParameterInImplementation- DataInstanceRef | | [constr_1519] | Existence of attributes vs. category of ApplicationValueSpecification | | [constr_1520] | Semantics of ObdRatioServiceNeeds . rateBasedMonitoredEvent | | [constr_1521] | Reference from AsynchronousServerCallReturnsEvent to Asyn- chronousServerCallResultPoint | | [constr_1523] | No mode disabling for OperationInvokedEvent s | | [constr_1538] | Restriction for ReceiverComSpec . dataElement | | [constr_1539] | Restriction for SenderComSpec . dataElement | | [constr_1540] | Existence of ClientComSpec . operation | | [constr_1541] | Existence of ServerComSpec . operation | | [constr_1544] | Modeling of SwAxisGeneric for the definition of a fix axis | | [constr_1545] | No initialization for fix axis |

G.10.5. R4.3.1 中变更的约束

| Number | Heading |

| [constr_1004] | Mapping of ApplicationDataType s in the scope of single AtomicSwCompo- nentType s | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1011] | category of SwBaseType | | [constr_1012] | Value of category is FIXED_LENGTH | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1038] | Reference to ApplicationError | | [constr_1044] | Applicability of DataFilter | | [constr_1090] | WaitPoint and RunnableEntity | | [constr_1102] | ApplicationError in the scope of one SwComponentType | | [constr_1126] | Compatibility of DataConstr s | | [constr_1220] | Compatibility of SwBaseType | | [constr_1229] | category of ImplementationDataType boils down to VALUE | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by Implementa- tionDataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_1422] | Value of category is VOID | | [constr_2027] | SwcServiceDependency shall be defined for service ports only |

| Number | Heading |

| [constr_2043] | swImplPolicy for ParameterDataPrototype in the role romBlock | | [constr_2044] | swImplPolicy for ParameterDataPrototype in the role sharedParameter | | [constr_2045] | swImplPolicy for ParameterDataPrototype in the role perInstanceParam- eter | | [constr_2046] | swImplPolicy for ParameterDataPrototype in the role constantMemory |

G.10.6. R4.3.1 中删除的约束

| Number | Heading |

| [constr_1013] | Value of category is VARIABLE_LENGTH | | [constr_1436] | DiagnosticCommunicationManagerNeeds . serviceRequestCallbackType is set to requestCallbackTypeSupplier | | [constr_1437] | DiagnosticCommunicationManagerNeeds . serviceRequestCallbackType is set to requestCallbackTypeManufacturer |

G.11. 本文档 R4.4.0 版本的约束历史

G.11.1. R4.4.0 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01751] | The meaning of E2E-related attributes in a SenderComSpec if a TransformationComSpecProps of type EndToEndTransformation- ComSpecProps is defined | | [TPS_SWCT_01752] | Initialization of a variable-size array | | [TPS_SWCT_01753] | Application of compatibility rules for ReceiverComSpec . replaceWith | | [TPS_SWCT_01754] | initValue defined in the context of a ComSpec | | [TPS_SWCT_01755] | Duplicate existence of initValue in the context of a PRPortPrototype typed by an NvDataInterface | | [TPS_SWCT_01756] | Semantics of SwDataDefProps . displayPresentation | | [TPS_SWCT_01757] | Not-applicable scenario for presentationContinuous | | [TPS_SWCT_01758] | Applicable value range of SwDataDefProps . displayPresentation | | [TPS_SWCT_01759] | Use cases for unions |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01760] | Defining the dimension of an ApplicationPrimitiveDataType of cat- egory VAL_BLK | | [TPS_SWCT_01761] | Physical limits of pure textual conversions | | [TPS_SWCT_01762] | Physical limits of mixed textual conversions | | [TPS_SWCT_01763] | HtssM Service Use Case: Query results of hardware tests | | [TPS_SWCT_01764] | V2xFac Use Case: Application software component shall be able to process the MAP (topology) Extended Message | | [TPS_SWCT_01765] | Dem Service Use Case: In-Use-Monitoring Performance Ratio Denominator interface | | [TPS_SWCT_01766] | Software-component computes the PIDs, and pushes them to Dem for stor- age and reporting to Dcm | | [TPS_SWCT_01767] | Software-component located on an OBD master ECU reads the PID 21, and and sends the value around via 'regular' sender-receiver communication | | [TPS_SWCT_01768] | Semantics of DataPrototypeMapping . secondToFirstDataTransfor- mation | | [TPS_SWCT_01769] | Dcm Use Case: Upload and download of data | | [TPS_SWCT_01770] | V2xFac Use Case: Application software component processes Infrastructure to Vehicle Information Message | | [TPS_SWCT_01771] | Definition of optional elements on the level of ApplicationDataType | | [TPS_SWCT_01772] | Semantics of attribute ImplementationDataType . isStructWithOp- tionalElement | | [TPS_SWCT_01773] | Definition of Optional Element Structure on the level of Implemen- tationDataType | | [TPS_SWCT_01774] | Modeling of ImplementationDataType with optional elements | | [TPS_SWCT_01775] | Structured data types with optional elements | | [TPS_SWCT_01776] | AtomicSwComponentType uses the API of the Crypto Service to set a key valid | | [TPS_SWCT_01777] | AtomicSwComponentType uses the API of the Crypto Service to create a random seed | | [TPS_SWCT_01778] | AtomicSwComponentType uses the API of the Crypto Service to generate a key | | [TPS_SWCT_01779] | AtomicSwComponentType uses the API of the Crypto Service to derive a key | | [TPS_SWCT_01780] | AtomicSwComponentType uses the API of the Crypto Service to execute calculation of the public value for key exchange | | [TPS_SWCT_01781] | AtomicSwComponentType uses the API of the Crypto Service to execute calculation of shared secret for key exchange | | [TPS_SWCT_01782] | AtomicSwComponentType uses the API of the Crypto Service to execute certificate parsing | | [TPS_SWCT_01783] | AtomicSwComponentType uses the API of the Crypto Service to execute certificate verification | | [TPS_SWCT_01784] | SecOc Use Case: enable the sending of Pdus even if computation of the MAC is not possible |

| Number | Heading |

| [TPS_SWCT_01785] | Initial value for ImplementationDataType of category STRUCTURE where attribute isStructWithOptionalElement set to the value True | | [TPS_SWCT_01786] | Initial value for the ImplementationDataTypeElement where the short- Name is set to the value availabilityBitfield | | [TPS_SWCT_01787] | Initialization of not-available ImplementationDataTypeElement | | [TPS_SWCT_01788] | V2xFac Use Case: Application software component processes Signal Phase And Timing Extended Message | | [TPS_SWCT_01789] | AtomicSwComponentType implements a Diagnostic Monitor that provides monitor data, debouncing by Dem | | [TPS_SWCT_01790] | AtomicSwComponentType implements a Diagnostic Monitor that provides monitor data, debouncing by software-component | | [TPS_SWCT_01791] | AtomicSwComponentType acts as a "file server" to a diagnostic tester |

G.11.2. R4.4.0 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01016] | AtomicSwComponentType wants to select a shutdown target | | [TPS_SWCT_01017] | AtomicSwComponentType wants to select a boot target | | [TPS_SWCT_01018] | AtomicSwComponentType wants to use an alarm clock | | [TPS_SWCT_01028] | AtomicSwComponentType implements a Diagnostic Monitor | | [TPS_SWCT_01029] | AtomicSwComponentType implements a Diagnostic Monitor | | [TPS_SWCT_01132] | AtomicSwComponentType provides information about operating cycles | | [TPS_SWCT_01136] | AtomicSwComponentType retrieves information of the lamp status | | [TPS_SWCT_01180] | Maximum possible size of Compound Primitive Data Type | | [TPS_SWCT_01275] | values of the attribute swImplPolicy are restricted depending on the con- text | | [TPS_SWCT_01374] | Implementation of AutosarParameterRef | | [TPS_SWCT_01375] | Implementation of AutosarVariableRef | | [TPS_SWCT_01398] | Communication patterns for AUTOSAR services | | [TPS_SWCT_01405] | Creation of the ServiceSwComponentType s | | [TPS_SWCT_01426] | AtomicSwComponentType provides callback if any diagnostic event data and/or status changed | | [TPS_SWCT_01456] | Predefined values for MemorySection . option and SwAddrMethod . op- tion | | [TPS_SWCT_01678] | StbM use Case: start timer and potentially get notified about its expiration | | [TPS_SWCT_01698] | Attributes that are subject to development approach | | [TPS_SWCT_01706] | AtomicSwComponentType supports DiagnosticSessionControl to get in- formed about the diagnostic session |

glyph[triangle]

| Number | Heading |

| [TPS_SWCT_01707] | AtomicSwComponentType supports EcuReset service via diagnostic ser- vices | | [TPS_SWCT_01708] | AtomicSwComponentType supports EcuReset ModeRapidPowerShut- Down service via diagnostic services | | [TPS_SWCT_01709] | AtomicSwComponentType supports CommunicationControl service via di- agnostic services | | [TPS_SWCT_01711] | AtomicSwComponentType supports ControlDTCSetting service via diag- nostic services | | [TPS_SWCT_01712] | AtomicSwComponentType supports SecurityAccess to get informed about the security level | | [TPS_SWCT_01715] | Software-Component wants to be triggered on Monitor Status Changes | | [TPS_SWCT_01727] | Suffix used for the resulting name of the PortInterface for crypto Port- Interface s | | [TPS_SWCT_01728] | V2xFac Use Case: Application software component provides Vehicle specific data to the V2X-Stack for CAM transmission | | [TPS_SWCT_01729] | V2xFac Use Case: V2xFac notifies application software component about received messages | | [TPS_SWCT_01730] | V2xFac Use Case: Application software component triggers transmission of DENM message | | [TPS_SWCT_02000] | Default value for attribute swImplPolicy | | [TPS_SWCT_02014] | AtomicSwComponentType supports Response On Event (ROE) via diag- nostic services | | [TPS_SWCT_02020] | AtomicSwComponentType uses the hash calculation of the Crypto Service | | [TPS_SWCT_02021] | AtomicSwComponentType uses the message authentication code (MAC) calculation of the Crypto Service | | [TPS_SWCT_02022] | AtomicSwComponentType uses the message authentication code (MAC) verification of the Crypto Service | | [TPS_SWCT_02024] | AtomicSwComponentType uses the generation of random numbers of the Crypto Service | | [TPS_SWCT_02025] | AtomicSwComponentType uses the Authenticated Encryption with Associ- ated Data (AEAD) of the Crypto Service | | [TPS_SWCT_02026] | AtomicSwComponentType uses the Authenticated Encryption with Associ- ated Data (AEAD) of the Crypto Service | | [TPS_SWCT_02027] | AtomicSwComponentType uses the encryption of the Crypto Service | | [TPS_SWCT_02028] | AtomicSwComponentType uses the decryption of the Crypto Service | | [TPS_SWCT_02031] | AtomicSwComponentType uses the signature generation of the Crypto Ser- vice | | [TPS_SWCT_02032] | AtomicSwComponentType uses the signature verification of the Crypto Ser- vice | | [TPS_SWCT_02506] | Setup for Dlt use Case: Application software component accesses the Dlt module |

G.11.3. R4.4.0 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01012] | AtomicSwComponentType reads the current ECU mode (fixed variant) | | [TPS_SWCT_01013] | AtomicSwComponentType shall keep the ECU alive (fixed variant) | | [TPS_SWCT_01014] | AtomicSwComponentType wants to select a shutdown target (fixed variant) | | [TPS_SWCT_01015] | AtomicSwComponentType wants to select a boot target (fixed variant) | | [TPS_SWCT_01125] | serverArgumentImplPolicy | | [TPS_SWCT_01133] | AtomicSwComponentType provides information about aging cycles | | [TPS_SWCT_01658] | NamingRule for PPortPrototype referenced by a RoleBasedPortAs- signment with attribute role set to 'IOControlResponse' | | [TPS_SWCT_01710] | Suffix used for the resulting name of the PortInterface for the Communi- cation Control | | [TPS_SWCT_01725] | AtomicSwComponentType uses the secure counter of the Crypto Service |

G.11.4. R4.4.0 中新增的约束

| Number | Heading |

| [constr_1583] | PortInterfaceMapping for DataPrototype typed by Compound Primitive Data Type | | [constr_1592] | Definition of SwDataDefProps . displayPresentation depending on the capa- bilities of the data type | | [constr_1602] | Definition of SwDataDefProps . displayPresentation depending on the capa- bilities of the element | | [constr_1607] | Only Wrapped Union Data Type s in PortInterface | | [constr_1608] | Existence of rootParameterDataPrototype | | [constr_1609] | Existence of rootVariableDataPrototype | | [constr_1610] | Existence of SwDataDefProps . swValueBlockSize and SwDataDefProps . swValueBlockSizeMult | | [constr_1611] | Existence of ImplementationDataTypeSubElementRef . implementation- DataTypeElement as opposed to ImplementationDataTypeSubElementRef . parameterImplementationDataTypeElement | | [constr_1622] | Value of TimingEvent . offset vs. TimingEvent . period | | [constr_1631] | Applicability of DataPrototypeMapping . secondToFirstDataTransforma- tion | | [constr_1632] | Restriction for firstToSecondDataTransformation and secondToFirst- DataTransformation | | [constr_1634] | Allowed combinations of ApplicationDataType . category vs. CompuMethod . category | | [constr_1635] | Relevance of attribute isOptional |

| Number | Heading |

| [constr_1636] | Mapping of data types that represent an Optional Element Structure | | [constr_1637] | Existence of ImplementationDataTypeElement . isOptional vs. Implemen- tationDataType . isStructWithOptionalElement | | [constr_1638] | First ImplementationDataTypeElement of ImplementationDataType that represents an Optional Element Structure | | [constr_1639] | ImplementationDataTypeElement with attribute isOptional set to True | | [constr_1640] | No use of Optional Element Structure for interaction with the diagnostic stack | | [constr_1662] | Compatibility of ApplicationRecordDataType and Implementation- DataType that both represent an Optional Element Structure |

G.11.5. R4.4.0 中变更的约束

| Number | Heading |

| [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1024] | Stepwise definition of CompuMethod s | | [constr_1048] | Compatibility of ApplicationRecordDataType s | | [constr_1050] | Compatibility of ImplementationDataType s | | [constr_1273] | Rules for the initialization of ApplicationArrayDataType by means of Array- ValueSpecification | | [constr_1274] | Rules for the initialization of array-shaped ImplementationDataType by means of ArrayValueSpecification | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by Implementa- tionDataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_1400] | Reference to a specific DataTransformation | | [constr_1444] | Limited applicability of Wrapped Union Data Type | | [constr_1519] | Existence of attributes vs. category of ApplicationValueSpecification | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEn- tity |

G.11.6. R4.4.0 中删除的约束

| Number | Heading |

| [constr_1032] | DelegationSwConnector can only connect PortPrototype s of the same kind | | [constr_1297] | Applicability of serverArgumentImplPolicy set to useArrayBaseType | | [constr_1443] | category UNION shall not be used for ImplementationDataType | | [constr_1515] | Existence of ImplementationDataTypeSubElementRef . implementation- DataTypeElement as opposed to ImplementationDataTypeSubElementRef . parameterImplementationDataTypeElement |

G.12. 本文档 R19-11 版本的约束历史

G.12.1. R19-11 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01792] | Initialization of a DataPrototype associated with a CompuMethod of cat- egory BITFIELD_TEXTTABLE | | [TPS_SWCT_01793] | Initialization of a variable-size array typed by an Implementation- DataType | | [TPS_SWCT_01794] | Initialization of a variable-size array typed by an ApplicationArray- DataType | | [TPS_SWCT_01795] | Further specification to facilitate the association of writing strategies to the corresponding RunnableEntity | | [TPS_SWCT_01796] | Prioritization of SwDataDefProps . dataConstr for a DataPrototype of category ARRAY | | [TPS_SWCT_01797] | Prioritization of SwDataDefProps . displayFormat for a DataPrototype of category ARRAY | | [TPS_SWCT_01798] | Prioritization of SwDataDefProps . stepSize for a DataPrototype of category ARRAY | | [TPS_SWCT_01799] | Mapping of bitfields between NvBlockDescriptor and PortPrototype | | [TPS_SWCT_01801] | Support for Meta-Data | | [TPS_SWCT_01802] | Definition of meta-data in the context of a SenderReceiverInterface | | [TPS_SWCT_01803] | MetaDataItem s define the same value of attribute length | | [TPS_SWCT_01804] | Standardized values of attribute MetaDataItem . metaDataItemType . value | | [TPS_SWCT_01805] | Semantics of the aggregation NvBlockSwComponentType . bulkNv- DataDescriptor |

| Number | Heading |

| [TPS_SWCT_01806] | Simultaneous aggregation of NvBlockSwComponentType . bulkNv- DataDescriptor and NvBlockSwComponentType . nvBlockDescrip- tor | | [TPS_SWCT_01807] | Application of NvBlockDataMapping on BulkNvDataDescriptor | | [TPS_SWCT_03500] | Status forwarding to data transformer | | [TPS_SWCT_03501] | Applicability of status forwarding to data transformer |

G.12.2. R19-11 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01029] | AtomicSwComponentType implements a Diagnostic Monitor | | [TPS_SWCT_01030] | RunnableEntity | | [TPS_SWCT_01132] | AtomicSwComponentType provides information about operating cycles | | [TPS_SWCT_01148] | NvBlockDataMapping | | [TPS_SWCT_01182] | Conceptual levels for the definition of initial values | | [TPS_SWCT_01220] | initValue defines an initial value that shall be taken if the corresponding dataElement has not yet been received | | [TPS_SWCT_01243] | Definition of enumeration types | | [TPS_SWCT_01309] | signature of a RunnableEntity depends on the connected RTEEvent | | [TPS_SWCT_01310] | Categories of RunnableEntity s | | [TPS_SWCT_01654] | AtomicSwComponentType offers PortPrototype s typed by Sender- ReceiverInterface s to adjust the IO signal via diagnostic services | | [TPS_SWCT_01656] | Suffix used for the resulting name of the PortInterface for DataSer- vices , IOControlRequest , and IOControlResponse | | [TPS_SWCT_01789] | AtomicSwComponentType implements a Diagnostic Monitor that provides monitor data, debouncing by Dem | | [TPS_SWCT_01790] | AtomicSwComponentType implements a Diagnostic Monitor that provides monitor data, debouncing by software-component |

G.12.3. R19-11 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01344] | Consistency of values of timeout | | [TPS_SWCT_01429] | [constr_1135] only applies for BITFIELD_TEXTTABLE | | [TPS_SWCT_01752] | Initialization of a variable-size array |

G.12.4. R19-11 中新增的约束

| Number | Heading |

| [constr_1679] | Existence of attribute RoleBasedDataAssignment . usedDataElement . local- Variable for RoleBasedDataAssignment . role = signalBasedDiagnos- tics | | [constr_1680] | Existence of attribute RoleBasedDataAssignment . usedDataElement . local- Variable for RoleBasedDataAssignment . role = AppModeRequestInter- face | | [constr_1681] | Existence of attribute RoleBasedDataAssignment . usedDataElement . local- Variable for RoleBasedDataAssignment . role = VerificationStatus | | [constr_1682] | Existence of attribute RoleBasedDataAssignment . usedDataElement . local- Variable for RoleBasedDataAssignment . role = V2xFacVdp | | [constr_1683] | Existence of attribute RoleBasedDataAssignment . usedDataEle- ment . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationCam | | [constr_1684] | Existence of attribute RoleBasedDataAssignment . usedDataEle- ment . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationMapem | | [constr_1685] | Existence of attribute RoleBasedDataAssignment . usedDataEle- ment . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationIvim | | [constr_1686] | Existence of attribute RoleBasedDataAssignment . usedDataEle- ment . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationSpatem | | [constr_1694] | Allowed target of SwDataDefProps . implementationDataType | | [constr_1706] | Definition of initial value for data transmission | | [constr_1712] | Existence of attribute ArrayValueSpecification . intendedPartialIni- tializationCount | | [constr_1713] | NvBlockDescriptor . writingStrategyRole . usedDataElement shall refer to AutosarDataPrototype | | [constr_1714] | AutosarDataPrototype shall only be referenced by a single NvBlockDescrip- tor . writingStrategyRole | | [constr_1715] | Possible values of attribute NvBlockDescriptor . writingStrategyRole . role |

| Number | Heading |

| [constr_1716] | Consistency of attribute NvBlockDescriptor . writingStrategyRole . role set to storeAtShutdown | | [constr_1717] | Consistency of attribute NvBlockDescriptor . writingStrategyRole . role set to storeImmediate | | [constr_1718] | Inheritance of SwDataDefProps . dataConstr from an array data type to the array elements | | [constr_1719] | Inheritance of SwDataDefProps . displayFormat from an array data type to the array elements | | [constr_1720] | Inheritance of SwDataDefProps . stepSize from an array data type to the array elements | | [constr_1724] | Usage of attribute ClientServerOperation .diagArgIntegrity | | [constr_1726] | Ordering of MetaDataItemSet . metaDataItem | | [constr_1735] | Limitation of the aggregation of AutosarVariableRef in the context of an NvBlockDataMapping owned by a BulkNvDataDescriptor | | [constr_1741] | Restriction to explicit sending semantics for the usage of DataServices in the context of a SwcServiceDependency that aggregates DiagnosticValueNeeds that in turn is referenced by a DiagnosticIoControlNeeds |

G.12.5. R19-11 中变更的约束

| Number | Heading |

| [constr_1051] | Compatibility of SwDataDefProps | | [constr_1059] | Compatibility of data types with category VALUE | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK | | [constr_1061] | Compatibility of data types with category STRUCTURE | | [constr_1063] | Compatibility of data types with category BOOLEAN | | [constr_1064] | Compatibility of data types with category COM_AXIS , RES_AXIS , CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 | | [constr_1078] | Compatibility of ClientServerOperation s | | [constr_1137] | Applicability of ParameterInterface | | [constr_1273] | Rules for the initialization of ApplicationArrayDataType by means of Array- ValueSpecification | | [constr_1274] | Rules for the initialization of array-shaped ImplementationDataType by means of ArrayValueSpecification | | [constr_1607] | Only Wrapped Union Data Type s in PortInterface | | [constr_1662] | Compatibility of ApplicationRecordDataType and Implementation- DataType that both represent an Optional Element Structure | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEn- tity | | [constr_2013] | Compatibility of ImplementationDataType s for NvBlockDataMapping |

文档 ID 62:AUTOSAR_CP_TPS_SoftwareComponentTemplate

G.12.6. R19-11 中删除的约束

无

G.13. 本文档 R20-11 版本的约束历史

G.13.1. R20-11 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01808] | Dem Service Use Case: software-component checks whether an event is suppressed | | [TPS_SWCT_01809] | J1939Dcm wants to retrieve calibration verification numbers from an applica- tion software-component | | [TPS_SWCT_01810] | Software-component analyzes predictions about the time synchronization process | | [TPS_SWCT_01811] | AtomicSwComponentType reads the current PNC ComM mode | | [TPS_SWCT_01812] | Conditional relevance of attribute EndToEndTransformationCom- SpecProps . disableEndToEndStateMachine | | [TPS_SWCT_01813] | Software-Component wants check a certificate on KeyM | | [TPS_SWCT_01814] | AtomicSwComponentType wants to retrieve a certificate from KeyM | | [TPS_SWCT_01815] | AtomicSwComponentType wants to retrieve elements of a certificate from KeyM | | [TPS_SWCT_01816] | AtomicSwComponentType wants to check the existence of a certificate from KeyM | | [TPS_SWCT_01817] | AtomicSwComponentType wants to store a (derived) key in KeyM | | [TPS_SWCT_01818] | AtomicSwComponentType wants to store a container with encrypted keys (e.g. She-keys) in KeyM | | [TPS_SWCT_01819] | AtomicSwComponentType wants to verify if cryptographic operation was ex- ecuted using a specific key | | [TPS_SWCT_01820] | Existence of attribute SenderComSpec . handleOutOfRange | | [TPS_SWCT_01821] | Semantics of attribute NotAvailableValueSpecification . default- Pattern | | [TPS_SWCT_01822] | Application of attribute NotAvailableValueSpecification . default- Pattern happens only during initialization | | [TPS_SWCT_01823] | Definition of ValueSpecification for an ApplicationRecord- DataType with unavailable optional elements | | [TPS_SWCT_01826] | Application Software Component reports security event | | [TPS_SWCT_01827] | Suffix used for the resulting name of the PortInterface for the IdsM Ser- vices | | [TPS_SWCT_01828] | Application Software Component reports security event using Smart Sensor API |

| Number | Heading |

| [TPS_SWCT_01829] | Suffix used for the resulting name of the PortInterface for the IdsM Ser- vices | | [TPS_SWCT_01830] | Application Software Component provides time stamp to IdsM |

G.13.2. R20-11 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01004] | Specific default value if serviceKind is not defined | | [TPS_SWCT_01078] | Configurable array size | | [TPS_SWCT_01178] | Specialized subclasses of ValueSpecification | | [TPS_SWCT_01221] | DataFilter | | [TPS_SWCT_01495] | Standardized value of RuleBasedValueSpecification . rule | | [TPS_SWCT_01642] | Definition of an 'old-world' dynamic-size array data type by means of an ImplementationDataType | | [TPS_SWCT_01673] | Application Software Component sends requests using the J1939Rm | | [TPS_SWCT_01674] | Application Software Component accepts requests using the J1939Rm | | [TPS_SWCT_02003] | AtomicSwComponentType offers PortPrototype s typed by Sender- ReceiverInterface s or NvDataInterface s to read/write current values via diagnostic services | | [TPS_SWCT_02052] | Definition of Rapid Prototyping Scenario is splittable |

G.13.3. R20-11 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01039] | Purpose of variant handling | | [TPS_SWCT_01510] | The role of pretended networking | | [TPS_SWCT_01511] | Configuration option is encoded into ModeDeclaration | | [TPS_SWCT_01512] | Request change of Pretended Networking mode | | [TPS_SWCT_01513] | React on the change of Pretended Networking mode |

G.13.4. R20-11 中新增的约束

| Number | Heading |

| [constr_1754] | Aggregation of NumericalRuleBasedValueSpecification | | [constr_1755] | Aggregation of CompositeRuleBasedValueSpecification | | [constr_1771] | Existence of SwValueCont . unit | | [constr_1773] | Value of attribute dataSendPoint . returnValueProvision | | [constr_1774] | Value of attribute dataReceivePointByArgument . returnValueProvision | | [constr_1775] | Value of attribute serverCallPoint . returnValueProvision | | [constr_1776] | Value of attribute asynchronousServerCallResultPoint . returnValuePro- vision | | [constr_1777] | Value of attribute externalTriggeringPoint . returnValueProvision | | [constr_1778] | Value of attribute modeSwitchPoint . returnValueProvision | | [constr_1779] | Scope of the definition of an AbstractRuleBasedValueSpecification | | [constr_1783] | Existence of attribute ImplementationDataTypeElement . arrayImplPolicy | | [constr_1860] | Multiplicity of DelegationSwConnector . innerPort | | [constr_1861] | Multiplicity of DelegationSwConnector . outerPort | | [constr_1862] | Multiplicity of PassThroughSwConnector . requiredOuterPort | | [constr_1863] | Multiplicity of PassThroughSwConnector . providedOuterPort | | [constr_1864] | Multiplicity of InstantiationRTEEventProps . refinedEvent | | [constr_1865] | Existence of InvalidationPolicy . dataElement | | [constr_1866] | Existence of MetaDataItem . length | | [constr_1867] | Existence of MetaDataItem . metaDataItemType | | [constr_1868] | Existence of MetaDataItemSet . dataElement | | [constr_1869] | Existence of attribute ArgumentDataPrototype . direction | | [constr_1870] | Existence of attribute ApplicationError . errorCode | | [constr_1871] | Existence of attribute ModeRequestTypeMap . implementationDataType | | [constr_1872] | Existence of attribute ModeRequestTypeMap . modeGroup | | [constr_1873] | Existence of DataPrototypeMapping . firstDataPrototype | | [constr_1874] | Existence of DataPrototypeMapping . secondDataPrototype | | [constr_1875] | Existence of reference ClientServerOperationMapping . firstOperation | | [constr_1876] | Existence of reference ClientServerOperationMapping . secondOperation | | [constr_1877] | Existence of reference ModeDeclarationGroupPrototypeMapping . first- ModeGroup | | [constr_1878] | Existence of reference ModeDeclarationGroupPrototypeMapping . second- ModeGroup | | [constr_1879] | Existence of reference ModeDeclarationMapping . firstMode | | [constr_1880] | Existence of reference ModeDeclarationMapping . secondMode | | [constr_1881] | Existence of reference TriggerMapping . firstTrigger | | [constr_1882] | Existence of reference TriggerMapping . secondTrigger | | Number | Heading | | [constr_1883] | Existence of ApplicationCompositeDataTypeSubElementRef . applica- tionCompositeElement | | [constr_1884] | Existence of attribute TextTableMapping . identicalMapping | | [constr_1885] | Existence of attribute TextTableMapping . mappingDirection | | [constr_1886] | Existence of attribute TextTableValuePair . firstValue | | [constr_1887] | Existence of attribute TextTableValuePair . secondValue | | [constr_1888] | Existence of attribute DataTransformation . executeDespiteDataUnavail- ability | | [constr_1889] | Existence of attribute QueuedReceiverComSpec . queueLength | | [constr_1890] | Existence of attribute DataFilter . dataFilterType | | [constr_1891] | Existence of attribute NonqueuedReceiverComSpec . initValue | | [constr_1892] | Existence of attribute TransmissionAcknowledgementRequest . timeout | | [constr_1893] | Existence of attribute ServerComSpec . queueLength | | [constr_1894] | Existence of attribute ModeSwitchSenderComSpec . queueLength | | [constr_1895] | Existence of attribute ModeSwitchSenderComSpec . modeGroup | | [constr_1896] | Existence of attribute ModeSwitchReceiverComSpec . modeGroup | | [constr_1897] | Existence of reference ParameterProvideComSpec . parameter | | [constr_1898] | Existence of reference ParameterRequireComSpec . parameter | | [constr_1899] | Existence of reference NvRequireComSpec . variable | | [constr_1900] | Existence of reference NvProvideComSpec . variable | | [constr_1901] | Existence of attribute EndToEndDescription . category | | [constr_1902] | Existence of attribute EndToEndProtection . endToEndProfile | | [constr_1903] | Existence of reference DataTypeMap . applicationDataType | | [constr_1904] | Existence of reference DataTypeMap . implementationDataType | | [constr_1905] | Existence of attribute SwTextProps . arraySizeSemantics | | [constr_1906] | Existence of attribute SwTextProps . swMaxTextSize | | [constr_1907] | Existence of attribute ApplicationArrayDataType . element | | [constr_1908] | Existence of attribute ApplicationRecordDataType . element | | [constr_1909] | Existence of attribute ImplementationProps . symbol | | [constr_1910] | Existence of attribute BaseType . baseTypeDefinition | | [constr_1911] | Existence of ArVariableInImplementationDataInstanceRef . targetDat- aPrototype | | [constr_1912] | Existence of reference ArParameterInImplementationDataInstanceRef . targetDataPrototype | | [constr_1913] | Existence of attribute CompuRationalCoeffs . compuDenominator | | [constr_1914] | Existence of attribute CompuRationalCoeffs . compuNumerator | | [constr_1915] | Existence of attribute PhysicalDimensionMapping . firstPhysicalDimen- sion | | [constr_1916] | Existence of attribute PhysicalDimensionMapping . secondPhysicalDimen- sion | | [constr_1917] | Existence of ConstantSpecification . valueSpec |

glyph[triangle]

| Number | Heading |

| [constr_1918] | Existence of RecordValueSpecification . field | | [constr_1919] | Existence of TextValueSpecification . value | | [constr_1920] | Existence of NumericalValueSpecification . value | | [constr_1921] | Existence of ReferenceValueSpecification . referenceValue | | [constr_1922] | Existence of ApplicationRuleBasedValueSpecification . category | | [constr_1923] | Existence of RuleBasedAxisCont . ruleBasedValues | | [constr_1924] | Existence of RuleBasedValueCont . ruleBasedValues | | [constr_1925] | Existence of NumericalRuleBasedValueSpecification . ruleBasedValues | | [constr_1926] | Existence of RuleBasedValueSpecification . rule | | [constr_1927] | Existence of RuleBasedValueSpecification . arguments | | [constr_1928] | Existence of CompositeRuleBasedValueSpecification . rule | | [constr_1929] | Existence of CompositeRuleBasedValueSpecification . argument | | [constr_1930] | Existence of ConstantReference . constant | | [constr_1931] | Existence of ConstantSpecificationMapping . applConstant | | [constr_1932] | Existence of ConstantSpecificationMapping . implConstant | | [constr_1933] | Existence of CalibrationParameterValue . initializedParameter | | [constr_1934] | Existence of attribute SwcInternalBehavior . handleTerminationAn- dRestart | | [constr_1935] | Existence of attribute SwcInternalBehavior . supportsMultipleInstantia- tion | | [constr_1936] | Existence of attribute RunnableEntity . symbol | | [constr_1937] | Existence of attribute TimingEvent . period | | [constr_1938] | Existence of attribute RunnableEntityArgument . symbol | | [constr_1939] | Existence of attribute ExecutableEntityActivationReason . bitPosition | | [constr_1940] | Existence of attribute AsynchronousServerCallReturnsEvent . eventSource | | [constr_1941] | Existence of attribute DataSendCompletedEvent . eventSource | | [constr_1942] | Existence of attribute DataWriteCompletedEvent . eventSource | | [constr_1943] | Existence of attribute DataReceivedEvent . data | | [constr_1944] | Existence of attribute DataReceiveErrorEvent . data | | [constr_1945] | Existence of attribute OperationInvokedEvent . operation | | [constr_1946] | Existence of attribute SwcModeSwitchEvent . activation | | [constr_1947] | Existence of reference SwcModeSwitchEvent . mode | | [constr_1948] | Existence of attribute ModeSwitchedAckEvent . eventSource | | [constr_1949] | Existence of attribute ExternalTriggerOccurredEvent . trigger | | [constr_1950] | Existence of attribute InternalTriggerOccurredEvent . eventSource | | [constr_1951] | Existence of attribute WaitPoint . timeout | | [constr_1952] | Existence of reference WaitPoint . trigger | | [constr_1953] | Existence of attribute SwcExclusiveAreaPolicy . apiPrinciple | | [constr_1954] | Existence of attribute VariableAccess . accessedVariable | | [constr_1955] | Existence of attribute ServerCallPoint . operation |

glyph[triangle]

| Number | Heading |

| [constr_1956] | Existence of attribute ServerCallPoint . timeout | | [constr_1957] | Existence of attribute AsynchronousServerCallResultPoint . asyn- chronousServerCallPoint | | [constr_1958] | Existence of attribute ParameterAccess . accessedParameter | | [constr_1959] | Existence of attribute InstantiationDataDefProps . swDataDefProps | | [constr_1960] | Existence of attribute PortAPIOption . port | | [constr_1961] | Existence of attribute PortDefinedArgumentValue . value | | [constr_1962] | Existence of attribute PortDefinedArgumentValue . valueType | | [constr_1963] | Existence of attribute CommunicationBufferLocking . supportBufferLock- ing | | [constr_1964] | Existence of attribute PerInstanceMemory . type | | [constr_1965] | Existence of attribute PerInstanceMemory . typeDefinition | | [constr_1966] | Existence of attribute Implementation . swVersion | | [constr_1967] | Existence of attribute Implementation . vendorId | | [constr_1968] | Existence of attribute Implementation . codeDescriptor | | [constr_1969] | Existence of attribute SwcImplementation . behavior | | [constr_1970] | Existence of attribute PerInstanceMemorySize . alignment | | [constr_1971] | Existence of attribute PerInstanceMemorySize . perInstanceMemory | | [constr_1972] | Existence of attribute PerInstanceMemorySize . size | | [constr_1973] | Existence of attribute ModeDeclarationGroup . initialMode | | [constr_1974] | Existence of attribute ModeDeclarationGroup . modeDeclaration | | [constr_1975] | Existence of attribute ModeTransition . enteredMode | | [constr_1976] | Existence of attribute ModeTransition . exitedMode | | [constr_1977] | Existence of attribute ModeErrorBehavior . errorReactionPolicy | | [constr_1978] | Existence of attribute SwcModeManagerErrorEvent . modeGroup | | [constr_1979] | Existence of the reference SwcBswMapping . bswBehavior | | [constr_1980] | Existence of the reference SwcBswMapping . swcBehavior | | [constr_1981] | Existence of attribute NvBlockDescriptor . nvBlockNeeds | | [constr_1982] | Existence of attribute ModeSwitchEventTriggeredActivity . role | | [constr_1983] | Existence of attribute ModeSwitchEventTriggeredActivity . swcMod- eSwitchEvent | | [constr_1984] | Existence of instance reference NvBlockDataMapping . nvRamBlockElement | | [constr_1985] | Existence of the reference SupervisedEntityNeeds . toleratedFailedCy- cles | | [constr_1986] | Existence of the reference DiagnosticRoutineNeeds . diagRoutineType | | [constr_1987] | Existence of instance reference RapidPrototypingScenario . hostSystem | | [constr_1988] | Existence of attribute RptProfile . maxServicePointId | | [constr_1989] | Existence of attribute RptProfile . minServicePointId | | [constr_1990] | Existence of attribute RptProfile . servicePointSymbolPost | | [constr_1991] | Existence of attribute RptProfile . servicePointSymbolPre | | [constr_1992] | Existence of attribute RptProfile . stimEnabler |

| Number | Heading |

| [constr_1993] | Existence of attribute RptImplPolicy . rptEnablerImplType | | [constr_1994] | Existence of attribute RptImplPolicy . rptPreparationLevel | | [constr_1995] | Existence of attribute RptSwPrototypingAccess . rptHookAccess | | [constr_1996] | Existence of attribute RptSwPrototypingAccess . rptReadAccess | | [constr_1997] | Existence of attribute RptSwPrototypingAccess . rptWriteAccess | | [constr_1998] | Existence of attribute RptExecutableEntityProperties . maxRptEventId | | [constr_1999] | Existence of attribute RptExecutableEntityProperties . minRptEventId | | [constr_5234] | Existence of attribute E2EProfileCompatibilityProps . transitToIn- validExtended is mandatory for each EndToEndTransformationCom- SpecProps | | [constr_10000] | Existence of attribute RptExecutableEntityProperties . rptExecutionCon- trol | | [constr_10001] | Existence of attribute RptExecutableEntityProperties . rptServicePoint | | [constr_10005] | Existence of attribute NotAvailableValueSpecification . defaultPattern | | [constr_10006] | Valid interval of attribute NotAvailableValueSpecification . defaultPat- tern | | [constr_10009] | Aggregation of ApplicationRuleBasedValueSpecification | | [constr_10016] | Applicability of OsTaskExecutionEvent | | [constr_10017] | Existence of attribute SwAxisCont . category | | [constr_10018] | Existence of attribute SwAxisCont . swAxisIndex | | [constr_10019] | Existence of attribute SwAxisCont . swValuesPhys | | [constr_10020] | Existence of attribute RoleBasedDataTypeAssignment . usedImplementa- tionDataType | | [constr_10028] | Existence of reference stereotyped glyph[lessmuch] isOfType glyph[greatermuch] |

G.13.5. R20-11 中变更的约束

| Number | Heading |

| [constr_1051] | Compatibility of SwDataDefProps | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK | | [constr_1066] | Forbidden mappings to ImplementationDataType | | [constr_1197] | Existence of compositeNetworkRepresentation shall be comprehensive | | [constr_1224] | DataPrototype is typed by an ApplicationArrayDataType | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by Application- DataType s | | [constr_1296] | DataPrototype s used as explicitInterRunnableVariable or implicit- InterRunnableVariable and category DATA_REFERENCE |

| Number | Heading |

| [constr_1393] | Existence of RuleBasedValueCont . unit | | [constr_1397] | Existence of attributes of TransformerHardErrorEvent | | [constr_1422] | Value of category is VOID | | [constr_1741] | Restriction to explicit sending semantics for the usage of DataServices in the context of a SwcServiceDependency that aggregates DiagnosticValueNeeds that in turn is referenced by a DiagnosticIoControlNeeds | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEn- tity | | [constr_2034] | SwAddrMethod referenced by RunnableEntity s, BswCalledEntity s, or BswSchedulableEntity s | | [constr_2052] | Values of swArraysize and the number of values provided by swValuesPhys shall be consistent. | | [constr_2058] | Mandatory information of a RuleBasedValueCont |

G.13.6. R20-11 中删除的约束

无

G.14. 本文档 R21-11 版本的约束历史

G.14.1. R21-11 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01831] | Dcm can directly access SenderReceiverInterface . dataElement s or NvDataInterface . nvData s in AbstractRequiredPortPrototype s | | [TPS_SWCT_01832] | SecOc Use Case: Receive notification about an authentication attempt | | [TPS_SWCT_01833] | Semantics of ServiceDependency . diagnosticRelevance | | [TPS_SWCT_01834] | invalidValue is inside the scope of the compuMethod | | [TPS_SWCT_01835] | invalidValue is outside the scope of the compuMethod | | [TPS_SWCT_01836] | Attributes of CompositeRuleBasedValueSpecification | | [TPS_SWCT_01837] | Types for record layouts | | [TPS_SWCT_01838] | ValueSpecification shall fit into data type | | [TPS_SWCT_01839] | Size of Compound Primitive Data Type is variant | | [TPS_SWCT_01840] | A ParameterSwComponentType references a ConstantSpecificationMappingSet |

| Number | Heading |

| [TPS_SWCT_01841] | A NvBlockSwComponentType references a ConstantSpecificationMappingSet | | [TPS_SWCT_01842] | Applicability of constraints of CompuScale s | | [TPS_SWCT_01843] | Value of PassThroughSwConnector . category | | [TPS_SWCT_01844] | Optional method arguments |

G.14.2. R21-11 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01049] | Two ways to use the ExclusiveArea s | | [TPS_SWCT_01195] | Mapping of composite element to primitive DataPrototype | | [TPS_SWCT_01253] | Rules apply for the usage of the attribute ImplementationDataType . typeEmitter | | [TPS_SWCT_01314] | RTEEvent | | [TPS_SWCT_01551] | Mapping of elements on the 'source' end to elements on the 'target' end | | [TPS_SWCT_01579] | Dcm can directly access SenderReceiverInterface . dataElement s, NvDataInterface . nvData s, or ParameterInterface . parameter s in AbstractProvidedPortPrototype | | [TPS_SWCT_01580] | Dem can directly access SenderReceiverInterface . dataElement s, NvDataInterface . nvData s, or ParameterInterface . parameter s in PPortPrototype s | | [TPS_SWCT_01586] | Writing strategies for nv data | | [TPS_SWCT_01795] | Further specification to facilitate the association of writing strategies to the corresponding RunnableEntity | | [TPS_SWCT_02011] | AtomicSwComponentType offers a client port to read DTR value |

G.14.3. R21-11 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01591] | Existence of attribute DiagnosticEventNeeds . reportBehavior | | [TPS_SWCT_01697] | Supported development approach for software-components that interact with AUTOSAR services | | [TPS_SWCT_01698] | Attributes that are subject to development approach |

G.14.4. R21-11 中新增的约束

| Number | Heading |

| [constr_10032] | Restrictions for the usage of ServiceDependency . diagnosticRelevance | | [constr_10033] | Existence of MemorySection . swAddrmethod | | [constr_10034] | Existence of MemorySection . alignment | | [constr_10040] | Value of ApplicationValueSpecification . swAxisCont . category | | [constr_10041] | Value of ApplicationRuleBasedValueSpecification . swAxisCont . category | | [constr_10067] | Creation of AssemblySwConnector for service communication | | [constr_10068] | Standardized values for SectionInitializationPolicyType | | [constr_10071] | Allowed multiplicities of SenderComSpec attributes for communication between ApplicationSwComponentType and NvBlockSwComponentType | | [constr_10072] | Allowed multiplicities of SenderComSpec attributes for communication between NvBlockSwComponentType and ApplicationSwComponentType | | [constr_10073] | Existence of DataReceiveErrorEvent | | [constr_10074] | Consistency of attribute NvBlockDescriptor . writingStrategy . role set to storeOnChange | | [constr_10075] | Existence of CompositeRuleBasedValueSpecification . argument vs. compoundPrimitiveArgument | | [constr_10087] | Restriction for the existence of a SubElementMapping |

G.14.5. R21-11 中变更的约束

| Number | Heading |

| [constr_1004] | Mapping of ApplicationDataType s in the scope of single AtomicSwComponentType s | | [constr_1005] | Compatibility of ImplementationDataType s mapped to the same ApplicationDataType | | [constr_1006] | applicable data categories | | [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1010] | If nativeDeclaration does not exist | | [constr_1011] | category of SwBaseType | | [constr_1012] | Value of category is FIXED_LENGTH | | [constr_1014] | Supported value encodings for SwBaseType | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1016] | Restriction of invalidValue for ImplementationDataType and ImplementationDataTypeElement | | Number | Heading | | [constr_1017] | Supported combinations of swImplPolicy and swCalibrationAccess | | [constr_1018] | measurementPoint shall not be referenced by a VariableAccess aggregated by RunnableEntity in the role dataReadAccess | | [constr_1020] | ParameterDataPrototype needs to be of compatible data type as referenced in sharedAxisType | | [constr_1022] | Limits shall be defined for each direction of CompuMethod | | [constr_1024] | Stepwise definition of CompuMethod s | | [constr_1025] | Avoid division by zero in rational formula | | [constr_1026] | Compatibility of Unit s | | [constr_1029] | ConstantSpecificationMapping and ConstantSpecification | | [constr_1033] | Communication scenarios for sender/receiver communication | | [constr_1035] | Recursive definition of CompositionSwComponentType | | [constr_1036] | Connect kinds of PortInterface s | | [constr_1037] | Client shall not be connected to multiple servers | | [constr_1038] | Reference to ApplicationError | | [constr_1039] | Relevance of swImplPolicy | | [constr_1040] | Conversion of SenderReceiverInterface s | | [constr_1041] | Conversion of ClientServerInterface s | | [constr_1043] | PortInterface vs. ComSpec | | [constr_1044] | Applicability of DataFilter | | [constr_1045] | Supported value encodings for SwBaseType in the context of PortInterface s | | [constr_1046] | Applicability of [constr_1045] | | [constr_1047] | Compatibility of ApplicationPrimitiveDataType s | | [constr_1048] | Compatibility of ApplicationRecordDataType s | | [constr_1049] | Compatibility of ApplicationArrayDataType s | | [constr_1050] | Compatibility of ImplementationDataType s | | [constr_1051] | Compatibility of SwDataDefProps | | [constr_1052] | Compatibility of Unit s | | [constr_1053] | Compatibility of PhysicalDimension s | | [constr_1054] | No DataConstr available at the provider | | [constr_1055] | ImplementationDataType has category VALUE | | [constr_1056] | ImplementationDataType has category TYPE_REFERENCE | | [constr_1057] | ImplementationDataType has category DATA_REFERENCE | | [constr_1058] | ImplementationDataType has category FUNCTION_REFERENCE | | [constr_1059] | Compatibility of data types with category VALUE | | [constr_1060] | Compatibility of data types with category ARRAY , VAL_BLK | | [constr_1061] | Compatibility of data types with category STRUCTURE | | [constr_1063] | Compatibility of data types with category BOOLEAN | | [constr_1064] | Compatibility of data types with category COM_AXIS , RES_AXIS , CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 | | Number | Heading | | [constr_1066] | Forbidden mappings to ImplementationDataType | | [constr_1068] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by primitive data types | | [constr_1069] | Compatibility of PortPrototype s of different DataInterface s in the context of AssemblySwConnector s | | [constr_1070] | Compatibility of PortPrototype s of different DataInterface s in the context of DelegationSwConnector s | | [constr_1071] | compatibility of ParameterDataPrototype and VariableDataPrototype | | [constr_1072] | Compatibility of ModeSwitchInterface s in the context of an AssemblySwConnector | | [constr_1073] | Compatibility of ModeSwitchInterface s in the context of an DelegationSwConnector | | [constr_1074] | Compatibility of ModeDeclarationGroupPrototype s | | [constr_1075] | Compatibility of ModeDeclarationGroup s | | [constr_1076] | Compatibility of ArgumentDataPrototype s | | [constr_1077] | Compatibility of ApplicationError s | | [constr_1078] | Compatibility of ClientServerOperation s | | [constr_1079] | Compatibility of ClientServerInterface s in the context of an AssemblySwConnector | | [constr_1080] | Compatibility of ClientServerInterface s in the context of an DelegationSwConnector | | [constr_1081] | Compatibility of TriggerInterface s in the context of an AssemblySwConnector | | [constr_1082] | Compatibility of TriggerInterface s in the context of an DelegationSwConnector | | [constr_1083] | Compatibility of Trigger s | | [constr_1084] | delegation of a provided outer PortPrototype | | [constr_1086] | SwConnector between two specific PortPrototype s | | [constr_1087] | AssemblySwConnector inside CompositionSwComponentType | | [constr_1088] | DelegationSwConnector inside CompositionSwComponentType | | [constr_1092] | ParameterSwComponentType | | [constr_1093] | Definition of textual strings | | [constr_1095] | Values of nDataSets vs. reliability | | [constr_1096] | SwcModeSwitchEvent and WaitPoint | | [constr_1097] | RunnableEntity that has a WaitPoint | | [constr_1098] | Mode switch and mode disabling | | [constr_1100] | Unconnected RPortPrototype typed by a DataInterface | | [constr_1101] | Mode-related communication | | [constr_1102] | ApplicationError in the scope of one SwComponentType | | [constr_1103] | NonqueuedReceiverComSpec and enableUpdate | | [constr_1104] | Trigger sink and trigger source | | Number | Heading | | [constr_1105] | Value of arraySize | | [constr_1106] | Structure shall have at least one element | | [constr_1107] | Union shall have at least one element | | [constr_1108] | Value of ApplicationError . errorCode | | [constr_1109] | Mapping of SwComponentPrototype s typed by a SensorActuatorSwComponentType | | [constr_1111] | Constraints of dataId in PROFILE_01 | | [constr_1112] | Constraints of dataIdMode in PROFILE_01 | | [constr_1113] | Existence of attributes in PROFILE_01 | | [constr_1114] | Constraints of crcOffset in PROFILE_01 | | [constr_1115] | Constraints of counterOffset in PROFILE_01 | | [constr_1116] | Constraints of dataLength in PROFILE_01 | | [constr_1117] | Constraints of maxDeltaCounterInit in PROFILE_01 | | [constr_1118] | Existence of attributes in PROFILE_02 | | [constr_1119] | Constraints of dataLength in PROFILE_02 | | [constr_1120] | Constraints of dataId in PROFILE_02 | | [constr_1121] | Constraints of maxDeltaCounterInit in PROFILE_02 | | [constr_1126] | Compatibility of DataConstr s | | [constr_1128] | Queue length of ClientServerOperation s associated with the same RunnableEntity | | [constr_1129] | swImplPolicy and NonqueuedReceiverComSpec | | [constr_1130] | swImplPolicy and QueuedReceiverComSpec | | [constr_1131] | swImplPolicy and NonqueuedSenderComSpec | | [constr_1132] | swImplPolicy and QueuedSenderComSpec | | [constr_1134] | Allowed structure of TEXTTABLE | | [constr_1135] | Limit of vt in BITFIELD_TEXTTABLE | | [constr_1137] | Applicability of ParameterInterface | | [constr_1138] | assignedPort and DiagEventDebounceMonitorInternal | | [constr_1139] | assignedPort of DiagEventDebounceMonitorInternal shall refer to an RPortPrototype | | [constr_1140] | Combination of invalidValue with the attribute handleInvalid | | [constr_1141] | Applicability of the scope attribute | | [constr_1142] | category of CompuMethod shall not be extended | | [constr_1144] | SensorActuatorSwComponentType , EcuAbstractionSwComponentType , and ComplexDeviceDriverSwComponentType may only reference a HwType | | [constr_1146] | Applicability of a symbol for a CompuScale in C code | | [constr_1147] | Standardized values for the attribute category of meta-class PortGroup | | [constr_1148] | PortInterface s of PortPrototype s used to connect to NvBlockSwComponentType s | | [constr_1149] | PortPrototype s used for NV data management | | Number | Heading | | [constr_1150] | Usage of valueType for PortDefinedArgumentValue | | [constr_1151] | Applicability of PortInterfaceMapping | | [constr_1153] | Applicability of compatibility requirements for CompuScale s | | [constr_1154] | Compatibility of CompuScale s for sender-receiver communication and similar use cases | | [constr_1155] | Compatibility of CompuScale s for client-server communication | | [constr_1156] | Relevance of 'names' of CompuScale s | | [constr_1158] | Applicable category s for attribute ImplementationDataType . swDataDefProps . compuMethod | | [constr_1159] | Consistency of VariableAndParameterInterfaceMapping with respect to the referenced DataInterface s | | [constr_1161] | Applicability of the attribute Ref . index | | [constr_1162] | Compatibility of SwRecordLayout s | | [constr_1163] | Compatibility of CompuMethod s | | [constr_1164] | Number of argument s owned by a RunnableEntity | | [constr_1165] | Applicability of RunnableEntityArgument | | [constr_1166] | Restrictions of ModeRequestTypeMap | | [constr_1167] | ImplementationDataType s used as ModeRequestTypeMap . implementationDataType | | [constr_1168] | Compatibility of ImplementationDataType s used in the ModeRequestTypeMap | | [constr_1169] | Allowed values for Trigger . swImplPolicy | | [constr_1172] | Allowed values of SwCalibrationAccessEnum for ModeDeclarationGroupPrototype | | [constr_1173] | Applicability of AutosarParameterRef referencing a VariableDataPrototype | | [constr_1174] | PortInterface s used in the context of CompositionSwComponentType s cannot refer to AUTOSAR services | | [constr_1175] | Depending on its category , CompuMethod shall refer to a unit | | [constr_1176] | Compatibility of CompuScale s of category LINEAR and RAT_FUNC | | [constr_1177] | Allowed targetCategory for SwPointerTargetProps | | [constr_1178] | Existence of attributes of SwDataDefProps in the context of ImplementationDataType | | [constr_1181] | Numerical values used in ModeDeclaration . value and ModeDeclarationGroup . onTransitionValue | | [constr_1182] | Allowed values for InternalTriggeringPoint . swImplPolicy | | [constr_1183] | EndToEndProtectionVariablePrototype s aggregated by EndToEndProtection | | [constr_1184] | Consistency of rootDataPrototype and base in the context of ApplicationCompositeElementInPortInterfaceInstanceRef | | [constr_1185] | Consistency of data types in the context of ApplicationCompositeElementInPortInterfaceInstanceRef | | [constr_1186] | Consistency of data types in the context of ArVariableInImplementationDataInstanceRef | | Number | Heading | | [constr_1187] | Compatibility of VariableDataPrototype s or ParameterDataPrototype s typed by composite data types | | [constr_1188] | Existence of ReceiverComSpec . replaceWith | | [constr_1191] | Value of Limit shall yield a numerical value | | [constr_1192] | Compatibility of ' IDENTICAL ' to ' RAT_FUNC ' or ' LINEAR ' | | [constr_1193] | ModeDeclaration shall be referenced by at least one ModeTransition in the role enteredMode | | [constr_1194] | Identical ModeTransition s | | [constr_1195] | SwcModeSwitchEvent and the definition of ModeTransition | | [constr_1196] | Existence of networkRepresentation vs. compositeNetworkRepresentation | | [constr_1197] | Existence of compositeNetworkRepresentation shall be comprehensive | | [constr_1200] | Queued communication is not applicable for dataElement s owned by PRPortPrototype | | [constr_1202] | Supported connections by AssemblySwConnector for PortPrototype s typed by a SenderReceiverInterface or NvDataInterface | | [constr_1203] | Supported connections by DelegationSwConnector for PortPrototype s typed by a SenderReceiverInterface or NvDataInterface | | [constr_1204] | Supported connections by AssemblySwConnector for PortPrototype s typed by a ClientServerInterface , ModeSwitchInterface , or TriggerInterface | | [constr_1205] | Supported connections by DelegationSwConnector for PortPrototype s typed by a ClientServerInterface , ModeSwitchInterface , or TriggerInterface | | [constr_1209] | Mapping of ModeDeclaration s of mode user to ModeDeclaration of mode manager | | [constr_1210] | Mapping of ModeDeclaration s of mode user to all ModeDeclaration s of mode manager | | [constr_1211] | Constraints of maxNoNewOrRepeatedData in PROFILE_01 | | [constr_1212] | Constraints of syncCounterInit in PROFILE_01 | | [constr_1213] | Constraints of maxNoNewOrRepeatedData in PROFILE_02 | | [constr_1214] | Constraints of syncCounterInit in PROFILE_02 | | [constr_1219] | Invalidation depends on the value of swImplPolicy | | [constr_1220] | Compatibility of SwBaseType | | [constr_1221] | DataPrototype is typed by an ApplicationPrimitiveDataType | | [constr_1222] | category of an AutosarDataType used to type a DataPrototype is set to STRING | | [constr_1223] | DataPrototype is typed by an ApplicationRecordDataType | | [constr_1224] | DataPrototype is typed by an ApplicationArrayDataType | | [constr_1225] | DataPrototype is typed by an ImplementationDataType that references a CompuMethod of category TEXTTABLE or BITFIELD_TEXTTABLE | | [constr_1226] | Applicable range for ExecutableEntityActivationReason . bitPosition | | Number | Heading | | [constr_1227] | Value of attribute ExecutableEntityActivationReason . bitPosition shall be unique | | [constr_1228] | RTEEvent that is referenced by a WaitPoint in the role trigger shall not reference ExecutableEntityActivationReason | | [constr_1229] | category of ImplementationDataType boils down to VALUE | | [constr_1230] | ApplicationDataType that qualifies for Integral Primitive Type | | [constr_1231] | ConsistencyNeeds aggregated by CompositionSwComponentType | | [constr_1232] | ConsistencyNeeds aggregated by AtomicSwComponentType | | [constr_1233] | InstantiationTimingEventProps shall only reference TimingEvent | | [constr_1234] | Value of RunnableEntity . symbol | | [constr_1237] | Scope of mapped ClientServerOperation s in the context of a ClientServerOperationMapping | | [constr_1238] | Scope of mapped ApplicationError s in the context of a ClientServerOperationMapping | | [constr_1240] | Consistency of ArgumentDataPrototype s within the context of a ClientServerOperationMapping | | [constr_1241] | Compound Primitive Data Type s and invalidValue | | [constr_1242] | Restriction of invalidValue for ApplicationPrimitiveDataType of category STRING | | [constr_1243] | NumericalOrText shall either define vf or vt | | [constr_1244] | DataPrototype s used in application software shall not be typed by C enums | | [constr_1245] | Consideration of ModeTransition s for the compatibility of ModeDeclarationGroup s | | [constr_1246] | Consistency of firstMode and secondMode in the scope of one ModeDeclarationMappingSet | | [constr_1247] | Consistency of ModeDeclarationMappingSet with respect to the referenced firstModeGroup and secondModeGroup | | [constr_1248] | Compatibility of PortPrototype s of different DataInterface s in the context of a PassThroughSwConnector | | [constr_1249] | Compatibility of ModeSwitchInterface s in the context of a PassThroughSwConnector | | [constr_1250] | Compatibility of ClientServerInterface s in the context of a PassThroughSwConnector | | [constr_1251] | Compatibility of PortPrototype s of TriggerInterface s in the context of a PassThroughSwConnector | | [constr_1252] | Creation of a loop involving a PassThroughSwConnector is not allowed | | [constr_1253] | Supported usage of VariationPointProxy | | [constr_1254] | Definition of a pointer to a pointer | | [constr_1255] | ApplicationPrimitiveDataType s of category BOOLEAN and STRING | | [constr_1256] | Acknowledgement feedback in n:1 writer case | | [constr_1257] | No WaitPoint s allowed | | [constr_1258] | Value of minimumStartInterval for RunnableEntity s triggered by an InitEvent |

glyph[triangle]

| Number | Heading |

| [constr_1259] | Aggregation of AsynchronousServerCallPoint and AsynchronousServerCallResultPoint | | [constr_1260] | No mode disabling for InitEvent s | | [constr_1261] | Applicability for EndToEndDescription . dataIdNibbleOffset | | [constr_1263] | Existence of ModeErrorBehavior . defaultMode | | [constr_1264] | Iteration along output axis is only supported for VALUE and VAL_BLK | | [constr_1268] | ArgumentDataPrototype . direction shall be preserved in a ClientServerOperationMapping | | [constr_1269] | Number of argument s shall be preserved in a ClientServerOperationMapping | | [constr_1270] | ArgumentDataPrototype shall be mapped only once in a ClientServerOperationMapping | | [constr_1271] | RecordValueSpecification . field s shall be identical to the number of ApplicationRecordDataType . element s | | [constr_1272] | RecordValueSpecification . field s shall be identical to the number of subElement s of ImplementationDataType of category STRUCTURE | | [constr_1273] | Rules for the initialization of ApplicationArrayDataType by means of ArrayValueSpecification | | [constr_1274] | Rules for the initialization of array-shaped ImplementationDataType with a fixed size by means of ArrayValueSpecification | | [constr_1277] | SwDataDefProps . swImplPolicy of a VariableDataPrototype referenced by a VariableAccess aggregated in the role dataReceivePointByValue | | [constr_1278] | PhysConstrs references a Unit | | [constr_1279] | Unmapped elements of ApplicationCompositeDataType s or ImplementationDataType s and the attribute swImplPolicy | | [constr_1280] | Unmapped dataElement on the 'target' end shall have an initValue | | [constr_1282] | Restriction concerning the usage of RuleBasedValueSpecification or a ReferenceValueSpecification for the specification of an invalidValue | | [constr_1284] | Limitation of the use of TextValueSpecification | | [constr_1285] | Applicability of roles vs. PortPrototype s | | [constr_1286] | serverArgumentImplPolicy and ArgumentDataPrototype typed by primitive data types | | [constr_1287] | Compatibility of SenderReceiverInterface s with respect to invalidationPolicy | | [constr_1288] | Allowed Attributes vs. category for DataPrototype s typed by ImplementationDataType s | | [constr_1289] | Allowed Attributes vs. category for DataPrototype s typed by ApplicationDataType s | | [constr_1290] | Limitation on the number of PPortComSpec s in the context of one PPortPrototype | | [constr_1291] | Limitation on the number of RPortComSpec s in the context of one PPortPrototype | | Number | Heading | | [constr_1292] | Limitation on the number of RPortComSpec s/ PPortComSpec s in the context of one PRPortPrototype | | [constr_1295] | PortInterface s and category DATA_REFERENCE | | [constr_1296] | DataPrototype s used as explicitInterRunnableVariable or implicitInterRunnableVariable and category DATA_REFERENCE | | [constr_1298] | Existence of attributes if category of a ModeDeclarationGroup is set to EXPLICIT_ORDER | | [constr_1299] | Existence of attributes if category of a ModeDeclarationGroup is set to other than EXPLICIT_ORDER | | [constr_1300] | Primitive DataPrototype on the 'source' end shall not be mapped to element of a composite data type on the 'target' end of the SwConnector | | [constr_1301] | Existence of RoleBasedDataTypeAssignment . role vs. RoleBasedDataAssignment . role | | [constr_1302] | Restriction of data invalidation | | [constr_1303] | Applicability of TextTableMapping depending on the value of CompuMethod . category | | [constr_1304] | Existence of attribute bitfieldTextTableMaskFirst | | [constr_1305] | Existence of attribute bitfieldTextTableMaskSecond | | [constr_1306] | Limitation of TextTableMapping for CompuMethod s that have the value of category set to BITFIELD_TEXTTABLE | | [constr_1307] | Consistency of values and masks in TextTableMapping | | [constr_1308] | Existence of NvBlockNeeds . cyclicWritingPeriod | | [constr_1309] | Existence of NvBlockDescriptor . timingEvent | | [constr_1310] | Existence of attributes of meta-class NvBlockNeeds | | [constr_1311] | Appearance of safety-related possible values of MemorySection . option or SwAddrMethod . option | | [constr_1312] | PortPrototype s typed by a ParameterInterface | | [constr_1313] | Completeness of TextTableMapping for the values of a given bit mask on the sender side | | [constr_1314] | Profile VSA_LINEAR for ApplicationArrayDataType | | [constr_1315] | Profile VSA_SQUARE for ApplicationArrayDataType | | [constr_1316] | Profile VSA_RECTANGULAR for ApplicationArrayDataType | | [constr_1317] | Profile VSA_FULLY_FLEXIBLE for ApplicationArrayDataType | | [constr_1318] | Profile VSA_LINEAR for ImplementationDataType | | [constr_1319] | Profile VSA_SQUARE for ImplementationDataType | | [constr_1320] | Profile VSA_RECTANGULAR for ImplementationDataType | | [constr_1321] | Profile VSA_FULLY_FLEXIBLE for ImplementationDataType | | [constr_1322] | Size Indicator for undefined dynamicArraySizeProfile | | [constr_1363] | Existence of attributes of DiagnosticValueNeeds | | [constr_1364] | Existence of attributes of DiagnosticIoControlNeeds | | [constr_1375] | Existence of attributes of CompuMethod and related meta-classes | | Number | Heading | | [constr_1381] | Appearance of core-related possible values of MemorySection . option or SwAddrMethod . option | | [constr_1382] | Mutually exclusive existence of attributes SwVariableRefProxy . autosarVariable vs. SwVariableRefProxy . mcDataInstanceVar | | [constr_1383] | Existence of CompuMethod and DataConstr for ImplementationDataType s of category TYPE_REFERENCE | | [constr_1384] | Definition of invalidValue for DataPrototype typed by ApplicationPrimitiveDataType of category CURVE , MAP , CUBOID , CUBE_4 , CUBE_5 , COM_AXIS , RES_AXIS , and VAL_BLK | | [constr_1385] | DataPrototype is typed by an ImplementationDataType | | [constr_1386] | PortDefinedArgumentValue shall only be defined for AbstractProvidedPortPrototype | | [constr_1388] | VariationPointProxy of category VALUE shall not mix 'pre-build' and 'post-build' use-cases | | [constr_1389] | Restriction regarding the value of category of VariationPointProxy . implementationDataType | | [constr_1390] | Restriction to the value of SenderReceiverInterface . invalidationPolicy handleInvalid | | [constr_1391] | Compatibility of Unit s in the context of assignment using an ApplicationValueSpecification | | [constr_1392] | Compatibility of Unit s in the context of assignment using an ApplicationRuleBasedValueSpecification | | [constr_1393] | Existence of RuleBasedValueCont . unit | | [constr_1395] | NvBlockDataMapping shall be complete | | [constr_1396] | Restriction for the value of attribute category for non-terminating ImplementationDataTypeElement s taken to model a Variable-Size Array Data Type | | [constr_1397] | Existence of attributes of TransformerHardErrorEvent | | [constr_1398] | Existence of attributes of BaseTypeDirectDefinition | | [constr_1399] | Standardized values of ModeDeclarationGroup . category | | [constr_1400] | Reference to a specific DataTransformation | | [constr_1401] | Restrictions on the relation between DataPrototypeMapping and DataTransformation | | [constr_1402] | Applicability of core-related possible values of MemorySection . option or SwAddrMethod . option related to SwAddrMethod . sectionInitializationPolicy | | [constr_1403] | NvBlockDataMapping s to a given nvData shall be unambiguous | | [constr_1404] | All NvDataInterface . nvData of PortPrototype s in the context of a specific SwcServiceDependency shall be mapped to the same NvBlockDescriptor | | [constr_1407] | Definition of SwDataDefProps . dataConstr depending on the capabilities of the data type | | [constr_1408] | Definition of SwDataDefProps . displayFormat depending on the capabilities of the data type | | Number | Heading | | [constr_1409] | Definition of SwDataDefProps . dataConstr depending on the capabilities of the element data type | | [constr_1410] | Definition of SwDataDefProps . displayFormat depending on the capabilities of the element data type | | [constr_1413] | Definition of SwDataDefProps . stepSize depending on the capabilities of the data type | | [constr_1414] | Definition of SwDataDefProps . stepSize depending on the capabilities of the element data type | | [constr_1415] | Supported values of ModeSwitchEventTriggeredActivity . role | | [constr_1416] | Existence of ApplicationArrayElement . maxNumberOfElements | | [constr_1417] | Invalid connection between NvBlockSwComponentType and other AtomicSwComponentType (I) | | [constr_1418] | Invalid connection between NvBlockSwComponentType and other AtomicSwComponentType (II) | | [constr_1420] | Existence of SwAxisIndividual . inputVariableType | | [constr_1422] | Value of category is VOID | | [constr_1423] | Completeness of references ArVariableInImplementationDataInstanceRef . contextDataPrototype | | [constr_1424] | Existence of ArVariableInImplementationDataInstanceRef . contextDataPrototype | | [constr_1425] | Definition of swCalprmAxisSet . swCalprmAxis / SwAxisIndividual . swVariableRef depending on the capabilities of the data type | | [constr_1426] | Consistency of array sizes for axes and input variable array | | [constr_1427] | Definition of swCalprmAxisSet . swCalprmAxis / SwAxisGrouped . swCalprmRef depending on the capabilities of the data type | | [constr_1428] | Consistency of array sizes for arrays of elements of category CURVE , MAP , CUBOID , CUBE_4 , or CUBE_5 arrays and used group axes arrays | | [constr_1429] | Access to data within PortPrototype s from within RunnableEntity s | | [constr_1430] | Access to local data from within RunnableEntity s | | [constr_1431] | Access to parameters from within RunnableEntity s | | [constr_1432] | Multiplicity of CommunicationBufferLocking | | [constr_1433] | Transient faults are not applicable to software-components | | [constr_1434] | CompuScale s shall not have identical CompuScale Value Symbolic Name s | | [constr_1438] | ApplicationArrayElement . indexDataType needs to refer to a CompuMethod of category TEXTTABLE | | [constr_1439] | Requirements on ApplicationArrayElement if attribute indexDataType exists | | [constr_1440] | Size of the CompuMethod of category TEXTTABLE referenced by ApplicationArrayElement . indexDataType | | [constr_1442] | category TYPE_REFERENCE shall not be used for modeling the 'payload' of a Wrapped Union Data Type | | [constr_1444] | Limited applicability of Wrapped Union Data Type | | Number | Heading | | [constr_1445] | Initialization of the Member Selector of a Wrapped Union Data Type | | [constr_1446] | No definition of invalidValue for a Wrapped Union Data Type | | [constr_1468] | Limitation on the number of SwcExclusiveAreaPolicy s | | [constr_1469] | Applicability of constraints depending on the existence of a data transformation | | [constr_1516] | Completeness of references ArParameterInImplementationDataInstanceRef . contextDataPrototype | | [constr_1517] | Existence of ArParameterInImplementationDataInstanceRef . contextDataPrototype | | [constr_1518] | Consistency of data types in the context of ArParameterInImplementationDataInstanceRef | | [constr_1519] | Existence of attributes vs. category of ApplicationValueSpecification | | [constr_1520] | Semantics of ObdRatioServiceNeeds . rateBasedMonitoredEvent | | [constr_1521] | Reference from AsynchronousServerCallReturnsEvent to AsynchronousServerCallResultPoint | | [constr_1523] | No mode disabling for OperationInvokedEvent s | | [constr_1538] | Restriction for ReceiverComSpec . dataElement | | [constr_1539] | Restriction for SenderComSpec . dataElement | | [constr_1540] | Existence of ClientComSpec . operation | | [constr_1541] | Existence of ServerComSpec . operation | | [constr_1544] | Modeling of SwAxisGeneric for the definition of a fix axis | | [constr_1545] | No initialization for fix axis | | [constr_1583] | PortInterfaceMapping for DataPrototype typed by Compound Primitive Data Type | | [constr_1592] | Definition of SwDataDefProps . displayPresentation depending on the capabilities of the data type | | [constr_1602] | Definition of SwDataDefProps . displayPresentation depending on the capabilities of the element | | [constr_1607] | Only Wrapped Union Data Type s in PortInterface | | [constr_1608] | Existence of rootParameterDataPrototype | | [constr_1609] | Existence of rootVariableDataPrototype | | [constr_1610] | Existence of SwDataDefProps . swValueBlockSize and SwDataDefProps . swValueBlockSizeMult | | [constr_1622] | Value of TimingEvent . offset vs. TimingEvent . period | | [constr_1631] | Applicability of DataPrototypeMapping . secondToFirstDataTransformation | | [constr_1632] | Restriction for firstToSecondDataTransformation and secondToFirstDataTransformation | | [constr_1634] | Allowed combinations of ApplicationDataType . category vs. CompuMethod . category | | [constr_1635] | Relevance of attribute isOptional | | [constr_1636] | Mapping of data types that represent an Optional Element Structure | | Number | Heading | | [constr_1637] | Existence of ImplementationDataTypeElement . isOptional vs. ImplementationDataType . isStructWithOptionalElement | | [constr_1638] | First ImplementationDataTypeElement of ImplementationDataType that represents an Optional Element Structure | | [constr_1639] | ImplementationDataTypeElement with attribute isOptional set to True | | [constr_1640] | No use of Optional Element Structure for interaction with the diagnostic stack | | [constr_1662] | Compatibility of ApplicationRecordDataType and ImplementationDataType that both represent an Optional Element Structure | | [constr_1679] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = signalBasedDiagnostics | | [constr_1680] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = AppModeRequestInterface | | [constr_1681] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = VerificationStatus | | [constr_1682] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xFacVdp | | [constr_1683] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationCam | | [constr_1684] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationMapem | | [constr_1685] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationIvim | | [constr_1686] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationSpatem | | [constr_1694] | Allowed target of SwDataDefProps . implementationDataType | | [constr_1706] | Definition of initial value for data transmission | | [constr_1712] | Existence of attribute ArrayValueSpecification . intendedPartialInitializationCount | | [constr_1713] | NvBlockDescriptor . writingStrategy . usedDataElement shall refer to AutosarDataPrototype | | [constr_1714] | AutosarDataPrototype shall only be referenced by a single NvBlockDescriptor . writingStrategy | | [constr_1715] | Possible values of attribute NvBlockDescriptor . writingStrategy . role | | [constr_1716] | Consistency of attribute NvBlockDescriptor . writingStrategy . role set to storeAtShutdown | | [constr_1717] | Consistency of attribute NvBlockDescriptor . writingStrategy . role set to storeImmediate | | Number | Heading | | [constr_1718] | Inheritance of SwDataDefProps . dataConstr from an array data type to the array elements | | [constr_1719] | Inheritance of SwDataDefProps . displayFormat from an array data type to the array elements | | [constr_1720] | Inheritance of SwDataDefProps . stepSize from an array data type to the array elements | | [constr_1724] | Usage of attribute ClientServerOperation . diagArgIntegrity | | [constr_1726] | Ordering of MetaDataItemSet . metaDataItem | | [constr_1735] | Limitation of the aggregation of AutosarVariableRef in the context of an NvBlockDataMapping owned by a BulkNvDataDescriptor | | [constr_1741] | Restriction to explicit sending semantics for the usage of DataServices in the context of a SwcServiceDependency that aggregates DiagnosticValueNeeds that in turn is referenced by a DiagnosticIoControlNeeds | | [constr_1754] | Aggregation of NumericalRuleBasedValueSpecification | | [constr_1755] | Aggregation of CompositeRuleBasedValueSpecification | | [constr_1771] | Existence of SwValueCont . unit | | [constr_1773] | Value of attribute dataSendPoint . returnValueProvision | | [constr_1774] | Value of attribute dataReceivePointByArgument . returnValueProvision | | [constr_1775] | Value of attribute serverCallPoint . returnValueProvision | | [constr_1776] | Value of attribute asynchronousServerCallResultPoint . returnValueProvision | | [constr_1777] | Value of attribute externalTriggeringPoint . returnValueProvision | | [constr_1778] | Value of attribute modeSwitchPoint . returnValueProvision | | [constr_1779] | Scope of the definition of an AbstractRuleBasedValueSpecification | | [constr_1783] | Existence of attribute ImplementationDataTypeElement . arrayImplPolicy | | [constr_1860] | Multiplicity of DelegationSwConnector . innerPort | | [constr_1861] | Multiplicity of DelegationSwConnector . outerPort | | [constr_1862] | Multiplicity of PassThroughSwConnector . requiredOuterPort | | [constr_1863] | Multiplicity of PassThroughSwConnector . providedOuterPort | | [constr_1864] | Multiplicity of InstantiationRTEEventProps . refinedEvent | | [constr_1865] | Existence of InvalidationPolicy . dataElement | | [constr_1866] | Existence of MetaDataItem . length | | [constr_1867] | Existence of MetaDataItem . metaDataItemType | | [constr_1868] | Existence of MetaDataItemSet . dataElement | | [constr_1869] | Existence of attribute ArgumentDataPrototype . direction | | [constr_1870] | Existence of attribute ApplicationError . errorCode | | [constr_1871] | Existence of attribute ModeRequestTypeMap . implementationDataType | | [constr_1872] | Existence of attribute ModeRequestTypeMap . modeGroup | | [constr_1888] | Existence of attribute DataTransformation . executeDespiteDataUnavailability | | [constr_1889] | Existence of attribute QueuedReceiverComSpec . queueLength | | Number | Heading | | [constr_1891] | Existence of attribute NonqueuedReceiverComSpec . initValue | | [constr_1892] | Existence of attribute TransmissionAcknowledgementRequest . timeout | | [constr_1895] | Existence of attribute ModeSwitchSenderComSpec . modeGroup | | [constr_1896] | Existence of attribute ModeSwitchReceiverComSpec . modeGroup | | [constr_1897] | Existence of reference ParameterProvideComSpec . parameter | | [constr_1898] | Existence of reference ParameterRequireComSpec . parameter | | [constr_1899] | Existence of reference NvRequireComSpec . variable | | [constr_1900] | Existence of reference NvProvideComSpec . variable | | [constr_1901] | Existence of attribute EndToEndDescription . category | | [constr_1902] | Existence of attribute EndToEndProtection . endToEndProfile | | [constr_1903] | Existence of reference DataTypeMap . applicationDataType | | [constr_1904] | Existence of reference DataTypeMap . implementationDataType | | [constr_1905] | Existence of attribute SwTextProps . arraySizeSemantics | | [constr_1906] | Existence of attribute SwTextProps . swMaxTextSize | | [constr_1909] | Existence of attribute ImplementationProps . symbol | | [constr_1910] | Existence of attribute BaseType . baseTypeDefinition | | [constr_1911] | Existence of ArVariableInImplementationDataInstanceRef . targetDataPrototype | | [constr_1912] | Existence of reference ArParameterInImplementationDataInstanceRef . targetDataPrototype | | [constr_1913] | Existence of attribute CompuRationalCoeffs . compuDenominator | | [constr_1914] | Existence of attribute CompuRationalCoeffs . compuNumerator | | [constr_1915] | Existence of attribute PhysicalDimensionMapping . firstPhysicalDimension | | [constr_1916] | Existence of attribute PhysicalDimensionMapping . secondPhysicalDimension | | [constr_1917] | Existence of ConstantSpecification . valueSpec | | [constr_1918] | Existence of RecordValueSpecification . field | | [constr_1919] | Existence of TextValueSpecification . value | | [constr_1920] | Existence of NumericalValueSpecification . value | | [constr_1921] | Existence of ReferenceValueSpecification . referenceValue | | [constr_1923] | Existence of RuleBasedAxisCont . ruleBasedValues | | [constr_1924] | Existence of RuleBasedValueCont . ruleBasedValues | | [constr_1925] | Existence of NumericalRuleBasedValueSpecification . ruleBasedValues | | [constr_1926] | Existence of RuleBasedValueSpecification . rule | | [constr_1927] | Existence of RuleBasedValueSpecification . arguments | | [constr_1928] | Existence of CompositeRuleBasedValueSpecification . rule | | [constr_1929] | Existence of CompositeRuleBasedValueSpecification . argument | | [constr_1930] | Existence of ConstantReference . constant | | [constr_1931] | Existence of ConstantSpecificationMapping . applConstant | | Number | Heading | | [constr_1932] | Existence of ConstantSpecificationMapping . implConstant | | [constr_1933] | Existence of CalibrationParameterValue . initializedParameter | | [constr_1935] | Existence of attribute SwcInternalBehavior . supportsMultipleInstantiation | | [constr_1936] | Existence of attribute RunnableEntity . symbol | | [constr_1938] | Existence of attribute RunnableEntityArgument . symbol | | [constr_1939] | Existence of attribute ExecutableEntityActivationReason . bitPosition | | [constr_1940] | Existence of attribute AsynchronousServerCallReturnsEvent . eventSource | | [constr_1941] | Existence of attribute DataSendCompletedEvent . eventSource | | [constr_1942] | Existence of attribute DataWriteCompletedEvent . eventSource | | [constr_1943] | Existence of attribute DataReceivedEvent . data | | [constr_1944] | Existence of attribute DataReceiveErrorEvent . data | | [constr_1945] | Existence of attribute OperationInvokedEvent . operation | | [constr_1952] | Existence of reference WaitPoint . trigger | | [constr_1954] | Existence of attribute VariableAccess . accessedVariable | | [constr_1955] | Existence of attribute ServerCallPoint . operation | | [constr_1956] | Existence of attribute ServerCallPoint . timeout | | [constr_1957] | Existence of attribute AsynchronousServerCallResultPoint . asynchronousServerCallPoint | | [constr_1958] | Existence of attribute ParameterAccess . accessedParameter | | [constr_1959] | Existence of attribute InstantiationDataDefProps . swDataDefProps | | [constr_1960] | Existence of attribute PortAPIOption . port | | [constr_1964] | Existence of attribute PerInstanceMemory . type | | [constr_1965] | Existence of attribute PerInstanceMemory . typeDefinition | | [constr_1973] | Existence of attribute ModeDeclarationGroup . initialMode | | [constr_1974] | Existence of attribute ModeDeclarationGroup . modeDeclaration | | [constr_2000] | Compatibility of ClientServerOperation s triggering the same RunnableEntity | | [constr_2002] | Referenced VariableDataPrototype from AutosarVariableRef of VariableAccess in role dataReadAccess | | [constr_2003] | Referenced VariableDataPrototype from AutosarVariableRef of VariableAccess in role dataWriteAccess | | [constr_2004] | Referenced VariableDataPrototype from AutosarVariableRef of VariableAccess in role dataSendPoint | | [constr_2005] | Referenced VariableDataPrototype from AutosarVariableRef of VariableAccess in role dataReceivePointByValue or dataReceivePointByArgument | | [constr_2006] | Number of AsynchronousServerCallResultPoint referencing to one AsynchronousServerCallPoint | | [constr_2007] | Consistency of typeDefinition attribute | | [constr_2009] | Supported kinds of PortPrototype s of a NvBlockSwComponentType |

glyph[triangle]

| Number | Heading |

| [constr_2010] | Connections between SwComponentPrototype s of type NvBlockSwComponentType | | [constr_2012] | Compatibility of ImplementationDataType s used for ramBlock and romBlock | | [constr_2013] | Compatibility of ImplementationDataType s for NvBlockDataMapping | | [constr_2015] | Limitation of SwcInternalBehavior of a NvBlockSwComponentType | | [constr_2016] | Connections between SwComponentPrototype s of type ServiceProxySwComponentType | | [constr_2017] | Ports of ServiceProxySwComponentType s | | [constr_2018] | Supported remote communication of a ServiceProxySwComponentType | | [constr_2019] | ServiceSwComponentType shall have service ports only | | [constr_2020] | dataReadAccess can not be used for queued communication | | [constr_2021] | WaitPoint referencing a DataReceivedEvent can not be used for non-queued communication | | [constr_2022] | Mutually exclusive use of SynchronousServerCallPoint s and AsynchronousServerCallPoint s | | [constr_2023] | Consistency of timeout values | | [constr_2024] | enableTakeAddress is restricted to single instantiation | | [constr_2026] | Referenced VariableDataPrototype from AutosarVariableRef of VariableAccess in role writtenLocalVariable and readLocalVariable | | [constr_2027] | SwcServiceDependency shall be defined for service ports only | | [constr_2028] | staticMemory is restricted to single instantiation | | [constr_2030] | AsynchronousServerCallResultPoint combined with WaitPoint shall belong to the same RunnableEntity | | [constr_2031] | Period of TimingEvent shall be greater than 0 | | [constr_2033] | Timeout of DataSendCompletedEvent | | [constr_2034] | SwAddrMethod referenced by RunnableEntity s, BswCalledEntity s, or BswSchedulableEntity s | | [constr_2035] | swImplPolicy for VariableDataPrototype in SenderReceiverInterface | | [constr_2036] | swImplPolicy for VariableDataPrototype in NvDataInterface | | [constr_2037] | swImplPolicy for VariableDataPrototype in the role ramBlock | | [constr_2038] | swImplPolicy for VariableDataPrototype in the role implicitInterRunnableVariable | | [constr_2039] | swImplPolicy for VariableDataPrototype in the role explicitInterRunnableVariable | | [constr_2040] | swImplPolicy for VariableDataPrototype in the role arTypedPerInstanceMemory | | [constr_2041] | swImplPolicy for VariableDataPrototype in the role staticMemory | | [constr_2042] | swImplPolicy for ParameterDataPrototype in ParameterInterface | | [constr_2043] | swImplPolicy for ParameterDataPrototype in the role romBlock | | [constr_2044] | swImplPolicy for ParameterDataPrototype in the role sharedParameter | | [constr_2045] | swImplPolicy for ParameterDataPrototype in the role perInstanceParameter | | Number | Heading | | [constr_2046] | swImplPolicy for ParameterDataPrototype in the role constantMemory | | [constr_2047] | swImplPolicy for ArgumentDataPrototype | | [constr_2048] | swImplPolicy for SwServiceArg | | [constr_2049] | Different ModeDeclarationGroup s shall have different shortName s. | | [constr_2050] | Mandatory information of a SwAxisCont | | [constr_2051] | Mandatory information of a SwValueCont | | [constr_2052] | Values of swArraysize and the number of values provided by swValuesPhys shall be consistent. | | [constr_2053] | Consistency between role IUMPRNumerator and ObdRatioServiceNeeds . connectionType | | [constr_2054] | Valid targets of rptSystem | | [constr_2055] | Valid targets of byPassPoint and rptHook reference | | [constr_2056] | Consistency of RapidPrototypingScenario with respect to rptSystem and rptArHook references | | [constr_2057] | Mandatory information of a RuleBasedAxisCont | | [constr_2058] | Mandatory information of a RuleBasedValueCont | | [constr_2535] | Target of an autosarParameter in AutosarParameterRef shall refer to a parameter | | [constr_2536] | Target of an autosarVariable in AutosarVariableRef shall refer to a variable | | [constr_2544] | Limits need to be consistent | | [constr_2545] | invalidValue shall fit in the specified ranges | | [constr_2548] | Data constraint of value axis shall match | | [constr_2549] | Units of input axis shall be consistent | | [constr_2550] | Units of value axis shall be consistent | | [constr_2561] | Application of DataConstrRule . constrLevel | | [constr_4002] | Unambiguous mapping of modes to data types | | [constr_4003] | Semantics of SwcModeSwitchEvent | | [constr_4004] | Context of SenderReceiverAnnotation | | [constr_4005] | Context of ClientServerAnnotation | | [constr_4006] | Context of ParameterPortAnnotation | | [constr_4007] | Context of ModePortAnnotation | | [constr_4008] | Context of TriggerPortAnnotation | | [constr_4009] | Context of NvDataPortAnnotation | | [constr_4012] | Timeout of ModeSwitchedAckEvent | | [constr_4082] | RunnableEntity . reentrancyLevel shall not be set. | | [constr_10005] | Existence of attribute NotAvailableValueSpecification . defaultPattern | | [constr_10006] | Valid interval of attribute NotAvailableValueSpecification . defaultPattern | | [constr_10009] | Aggregation of ApplicationRuleBasedValueSpecification | | [constr_10016] | Applicability of OsTaskExecutionEvent |

| Number | Heading |

| [constr_10017] | Existence of attribute SwAxisCont . category | | [constr_10018] | Existence of attribute SwAxisCont . swAxisIndex | | [constr_10019] | Existence of attribute SwAxisCont . swValuesPhys | | [constr_10028] | Existence of reference stereotyped glyph[lessmuch] isOfType glyph[greatermuch] |

G.14.6. R21-11 中删除的约束

| Number | Heading |

| [constr_1001] | Value of dataId shall be unique | | [constr_1008] | Applicability of category s STRUCTURE and ARRAY | | [constr_1027] | Types for record layouts | | [constr_1030] | ParameterSwComponentType references ConstantSpecificationMappingSet | | [constr_1031] | NvBlockSwComponentType references ConstantSpecificationMappingSet | | [constr_1143] | category of AutosarDataType shall not be extended | | [constr_1157] | Applicability of constraints of CompuScale s | | [constr_1160] | Size of Compound Primitive Data Type is variant | | [constr_1281] | invalidValue is inside the scope of the compuMethod | | [constr_1283] | invalidValue is outside the scope of the compuMethod | | [constr_4000] | Local communication of mode switches | | [constr_4035] | ValueSpecification shall fit into data type |

G.15. 本文档 R22-11 版本的约束历史

G.15.1. R22-11 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01845] | Supported value encodings for SwBaseType | | [TPS_SWCT_01846] | Use InstantiationDataDefProps to facilitate the definition of access to calibration parameters | | Number | Heading | | [TPS_SWCT_01847] | Define role-specific data properties of elements of composite data types used for the definition of calibration parameters | | [TPS_SWCT_01848] | Semantics of NvBlockDescriptor . instantiationDataDefProps | | [TPS_SWCT_01849] | shortName of constantMemory and staticMemory | | [TPS_SWCT_01850] | Usage of attribute RPortPrototype . requiredComSpec . maxDeltaCounterInit vs. EndToEndProtection . endToEndProfile . maxDeltaCounterInit | | [TPS_SWCT_01851] | Usage of attribute RPortPrototype . requiredComSpec . maxNoNewOrRepeatedData vs. EndToEndProtection . endToEndProfile . maxNoNewOrRepeatedData | | [TPS_SWCT_01852] | Usage of attribute RPortPrototype . requiredComSpec . syncCounterInit vs. attribute EndToEndProtection . endToEndProfile . syncCounterInit | | [TPS_SWCT_01853] | AtomicSwComponentType offers PortPrototype typed by SenderReceiverInterface or NvDataInterface s to read/write the content of an entire DID via diagnostic services | | [TPS_SWCT_01854] | Software-Components wants to initiate the cloning of a time base | | [TPS_SWCT_01855] | Definition of initial value for data transmission | | [TPS_SWCT_01856] | AtomicSwComponentType reads the current ECU mode | | [TPS_SWCT_01857] | AtomicSwComponentType shall keep the ECU alive | | [TPS_SWCT_01858] | Optional existence of reference VariationPointProxy . implementationDataType if the bindingTime is set to preCompileTime | | [TPS_SWCT_01859] | Specification of constant value for a String modeled by ApplicationDataType | | [TPS_SWCT_01860] | Specification of constant value for a String modeled by ImplementationDataType | | [TPS_SWCT_01861] | Specification of baseTypeSize in the context of an ImplementationDataType where attribute category is set to ARRAY | | [TPS_SWCT_01862] | AtomicSwComponentType wants information about DTC clearance | | [TPS_SWCT_01863] | Existence of VariableInAtomicSWCTypeInstanceRef . rootVariableDataPrototype in the context of NvBlockDataMapping . nvRamBlockElement | | [TPS_SWCT_01864] | Semantics of DiagnosticEventNeeds . inhibitingFid and DiagnosticEventNeeds . inhibitingSecondaryFid | | [TPS_SWCT_01865] | Definition of attributes for an "embedded" axis if reference inputVariableType exists | | [TPS_SWCT_01866] | Definition of attributes for an "embedded" axis if reference inputVariableType does not exist | | [TPS_SWCT_01867] | Communication Use case of the V2X Data Manager where isService = true | | [TPS_SWCT_01868] | Communication Use case of the V2X Data Manager where isService = false | | [TPS_SWCT_01869] | V2x DM Use Case: Application software component receives portions of an ASN.1 message |

| Number | Heading |

| [TPS_SWCT_01870] | AtomicSwComponentType wants to reset a degradation state | | [TPS_SWCT_03502] | Software-component acts as a server and offers the service | | [TPS_SWCT_03503] | Software-component receives notification on server event subscription status changes | | [TPS_SWCT_03504] | Software-component acts as a client and subscribe to events and methods | | [TPS_SWCT_03505] | Software-component receives notification on client event and method subscription status changes |

G.15.2. R22-11 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01038] | Support for Variant Handling in the in Software Component Template | | [TPS_SWCT_01094] | Standardized values of attribute EndToEndDescriptioncategory | | [TPS_SWCT_01234] | Base Type Level | | [TPS_SWCT_01236] | Big picture of data types | | [TPS_SWCT_01260] | Applicability of SwBaseType for the definition of data types | | [TPS_SWCT_01296] | Different approaches of ASAM MCD-2MC and AUTOSAR with respect to SwRecordLayout | | [TPS_SWCT_01444] | Size of SwBaseType is specified in bits | | [TPS_SWCT_01487] | Correspondence of invalidValue for ApplicationPrimitiveDataType and ImplementationDataType | | [TPS_SWCT_01489] | Standardized values of SwRecordLayoutV . swRecordLayoutVProp | | [TPS_SWCT_01549] | Definition of linear data scaling | | [TPS_SWCT_01560] | Supported category s of CompuMethod s for data conversion | | [TPS_SWCT_01654] | AtomicSwComponentType offers PortPrototype s typed by SenderReceiverInterface s to adjust the IO signal via diagnostic services | | [TPS_SWCT_01656] | Suffix used for the resulting name of the PortInterface for IOControlRequest and IOControlResponse | | [TPS_SWCT_03500] | Status forwarding to data transformer |

G.15.3. R22-11 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01261] | Use case for SwBaseType | | [TPS_SWCT_01263] | Further use cases for SwBaseType | | [TPS_SWCT_01275] | values of the attribute swImplPolicy are restricted depending on the context | | [TPS_SWCT_01467] | ImplementationDataType references an SwBaseType with a string encoding | | [TPS_SWCT_01517] | ClientServerOperation cannot be passed as a reference | | [TPS_SWCT_01729] | V2xFac Use Case: V2xFac notifies application software component about received messages | | [TPS_SWCT_01764] | V2xFac Use Case: Application software component shall be able to process the MAP (topology) Extended Message | | [TPS_SWCT_01770] | V2xFac Use Case: Application software component processes Infrastructure to Vehicle Information Message | | [TPS_SWCT_01788] | V2xFac Use Case: Application software component processes Signal Phase And Timing Extended Message | | [TPS_SWCT_01803] | MetaDataItem s define the same value of attribute length | | [TPS_SWCT_02014] | AtomicSwComponentType supports Response On Event (ROE) via diagnostic services |

G.15.4. R22-11 中新增的约束

| Number | Heading |

| [constr_3688] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = ServerServiceOffer | | [constr_3689] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = ClientEventSubscription | | [constr_10096] | Shared axis shall not be a fixed axis | | [constr_10097] | Buffer locking is only supported if returnValueProvision is set to returnValueProvided | | [constr_10099] | Allowed values of the attribute SwDataDefProps . swImplPolicy vs. DataPrototype s and their roles | | [constr_10104] | RoleBasedPortAssignment where attribute role is set to CallbackGetFaultDetectCounter shall refer to a PPortPrototype in the role portPrototype | | [constr_10118] | Structural consistency of the modeling of InvalidationPolicy |

| Number | Heading |

| [constr_10119] | SenderReceiverInterface .dataElement shall be referenced by at most one InvalidationPolicy | | [constr_10120] | Structural consistency of the modeling of MetaDataItemSet | | [constr_10121] | SenderReceiverInterface . dataElement shall be referenced by at most one MetaDataItemSet | | [constr_10123] | Existence of attribute DtcStatusChangeNotificationNeeds . notificationTime | | [constr_10196] | Definition of invalidValue for DataPrototype is typed by an ImplementationDataType that references a CompuMethod of category TEXTTABLE or BITFIELD_TEXTTABLE | | [constr_10372] | Relation between Type of PortPrototype , Type of ComSpec , and Type of PortInterface | | [constr_10373] | ImplementationDataType of category VALUE shall not refer to SwBaseType of category VOID | | [constr_10383] | Supported value encodings for SwBaseType in the context of PortInterface s where attribute isService is set to false |

G.15.5. R22-11 中变更的约束

| Number | Heading |

| [constr_1000] | End-to-end protection is limited to sender/receiver communication | | [constr_1006] | Applicable data categories, depending on specific model elements related to data definition properties | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1026] | Compatibility of Unit s | | [constr_1038] | Reference to ApplicationError | | [constr_1043] | Allowed combinations of a specific Type of PortInterface , a specific Type of PortPrototype , and a specific Type of ComSpec | | [constr_1046] | Applicability of [TPS_SWCT_01845] | | [constr_1047] | Compatibility of ApplicationPrimitiveDataType s | | [constr_1050] | Compatibility of ImplementationDataType s | | [constr_1052] | Compatibility of Unit s | | [constr_1083] | Compatibility of Trigger s | | [constr_1091] | RTEEvent s that may reference a WaitPoint | | [constr_1092] | Restrictions for the ParameterSwComponentType | | [constr_1104] | Trigger communication shall not implement an n:1 pattern | | [constr_1108] | Existence and value of attribute ApplicationError . errorCode | | [constr_1138] | SwcServiceDependency . assignedPort and DiagEventDebounceMonitorInternal |

| Number | Heading |

| [constr_1170] | Existence of attribute EndToEndDescription . maxDeltaCounterInit for PROFILE_01 | | [constr_1171] | Existence of attribute EndToEndDescription . maxDeltaCounterInit for PROFILE_02 | | [constr_1177] | Allowed targetCategory for SwPointerTargetProps | | [constr_1215] | Existence of attribute EndToEndDescription . maxNoNewOrRepeatedData for PROFILE_01 | | [constr_1216] | Existence of attribute EndToEndDescription . syncCounterInit for PROFILE_01 | | [constr_1217] | Existence of attribute EndToEndDescription . maxNoNewOrRepeatedData for PROFILE_02 | | [constr_1218] | Existence of attribute EndToEndDescription . syncCounterInit for PROFILE_02 | | [constr_1219] | Invalidation depends on the value of swImplPolicy | | [constr_1290] | Limitation on the number of PPortComSpec s in the context of one PPortPrototype | | [constr_1291] | Limitation on the number of RPortComSpec s in the context of one PPortPrototype | | [constr_1292] | Limitation on the number of RPortComSpec s/ PPortComSpec s in the context of one PRPortPrototype | | [constr_1726] | Ordering of MetaDataItemSet . metaDataItem | | [constr_2011] | Connections between SwComponentPrototype s typed by NvBlockSwComponentType and SwComponentPrototype s typed by other AtomicSwComponentType s | | [constr_2014] | Limitation of NvBlockDescriptor . clientServerPort . role | | [constr_2031] | Value of TimingEvent . period shall be greater than 0 |

G.15.6. R22-11 中删除的约束

| Number | Heading |

| [constr_1014] | Supported value encodings for SwBaseType | | [constr_1045] | Supported value encodings for SwBaseType in the context of PortInterface s | | [constr_1090] | WaitPoint and RunnableEntity | | [constr_1110] | Value of category in EndToEndDescription | | [constr_1139] | assignedPort of DiagEventDebounceMonitorInternal shall refer to an RPortPrototype | | [constr_1162] | Compatibility of SwRecordLayout s | | [constr_1264] | Iteration along output axis is only supported for VALUE and VAL_BLK |

| Number | Heading |

| [constr_1683] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationCam | | [constr_1684] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationMapem | | [constr_1685] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationIvim | | [constr_1686] | Existence of attribute RoleBasedDataAssignment . usedDataElement . localVariable for RoleBasedDataAssignment . role = V2xApplRxIndicationSpatem | | [constr_1706] | Definition of initial value for data transmission | | [constr_1870] | Existence of attribute ApplicationError . errorCode | | [constr_1937] | Existence of attribute TimingEvent . period | | [constr_2029] | shortName of constantMemory and staticMemory | | [constr_2048] | swImplPolicy for SwServiceArg | | [constr_10028] | Existence of reference stereotyped glyph[lessmuch] isOfType glyph[greatermuch] |

G.16. 本文档 R23-11 版本的约束历史

G.16.1. R23-11 中新增的规定条目

| Number | Heading |

| [TPS_SWCT_01871] | Definition of a ConstantSpecification in the application domain | | [TPS_SWCT_01872] | Definition of a ValueSpecification in the implementation domain | | [TPS_SWCT_01873] | Definition of 'source' and 'target' of an SwConnector for a sender/receiver-style interaction | | [TPS_SWCT_01874] | Definition of 'source' and 'target' of an SwConnector for a client/server-style interaction | | [TPS_SWCT_01875] | Usage of attributes of BaseTypeDirectDefinition depending on the area of applicability | | [TPS_SWCT_01876] | Minimum value of baseTypeSize for a given baseTypeEncoding | | [TPS_SWCT_01877] | Description of supported category s of CompuMethod s | | [TPS_SWCT_01878] | Applicability of attribute CompuScale . a2lDisplayText | | [TPS_SWCT_01879] | AtomicSwComponentType offers a client port to set DTR value |

| Number | Heading |

| [TPS_SWCT_01880] | AtomicSwComponentType wants to clear a DTC | | [TPS_SWCT_01881] | Scope of the availabilityBitfield | | [TPS_SWCT_01882] | Ordering of elements within ApplicationValueSpecification . swValueCont . swValuesPhys |

G.16.2. R23-11 中变更的规定条目

| Number | Heading |

| [TPS_SWCT_01138] | AtomicSwComponentType suppresses the storage of DTCs within the Dem | | [TPS_SWCT_01178] | Specialized subclasses of ValueSpecification | | [TPS_SWCT_01186] | ConstantSpecificationMapping | | [TPS_SWCT_01229] | Three different levels of abstraction regarding the definition of data types | | [TPS_SWCT_01307] | Semantics of combining supportsMultipleInstantiation and canBeInvokedConcurrently | | [TPS_SWCT_01398] | Communication patterns for AUTOSAR services | | [TPS_SWCT_01432] | invalidValue outside limits of compuMethod requires processing by RTE | | [TPS_SWCT_01434] | invalidValue is inside the limits of the compuMethod , handled by software-components | | [TPS_SWCT_01489] | Description of standardized values of SwRecordLayoutV . swRecordLayoutVProp | | [TPS_SWCT_01505] | Precedence of calibration access along structural hierarchies in complex types | | [TPS_SWCT_01675] | Recommendations for attributes of NvBlockNeeds or for NvBlockDescriptor |

G.16.3. R23-11 中删除的规定条目

| Number | Heading |

| [TPS_SWCT_01734] | V2xM Use Case: Application software component has the ability to do Verification-on-Demand |

G.16.4. R23-11 中新增的约束

| Number | Heading |

| [constr_10415] | Initial value on the level of an ImplementationDataTypeElement where attribute isOptional is set to the value True | | [constr_10424] | Reference from MemorySection to ExecutableEntity | | [constr_10433] | Existence of attributes of ApplicationDataType depending on the category | | [constr_10434] | Existence of attributes of ImplementationDataType depending on the category | | [constr_10435] | Existence of attributes of ImplementationDataTypeElement depending on the category | | [constr_10439] | Initialization of a DataPrototype typed by a Compound Primitive Data Type | | [constr_10502] | Number of elements of ApplicationValueSpecification . swValueCont . swArraysize vs. ApplicationValueSpecification . category | | [constr_10503] | ApplicationValueSpecification where attribute category is set to MAP , CUBOID , CUBE_4 , or CUBE_5 and ROW_DIR SwRecordLayout | | [constr_10504] | ApplicationValueSpecification where attribute category is set to VAL_BLK and ApplicationPrimitiveDataType . swDataDefProps . swValueBlockSizeMult exists for ROW_DIR SwRecordLayout | | [constr_10505] | ApplicationValueSpecification where attribute category is set to MAP , CUBOID , CUBE_4 , or CUBE_5 and COLUMN_DIR SwRecordLayout | | [constr_10506] | ApplicationValueSpecification where attribute category is set to VAL_BLK and ApplicationPrimitiveDataType . swDataDefProps . swValueBlockSizeMult exists for COLUMN_DIR SwRecordLayout | | [constr_10507] | ApplicationValueSpecification where attribute category is set to VAL_BLK and ApplicationPrimitiveDataType . swDataDefProps . swValueBlockSize exists |

G.16.5. R23-11 中变更的约束

| Number | Heading |

| [constr_1007] | Allowed attributes of SwDataDefProps for ApplicationDataType s | | [constr_1009] | SwDataDefProps applicable to ImplementationDataType s | | [constr_1015] | Prioritization of SwDataDefProps | | [constr_1029] | ConstantSpecificationMapping and ConstantSpecification | | [constr_1375] | Existence of attributes of CompuMethod and related meta-classes depending on the value of the category | | [constr_1639] | ImplementationDataTypeElement with attribute isOptional set to True | | [constr_10068] | Standardized values for SectionInitializationPolicyType |

G.16.6. R23-11 中删除的约束

| Number | Heading |

| [constr_1893] | Existence of attribute ServerComSpec . queueLength | | [constr_1934] | Existence of attribute SwcInternalBehavior . handleTerminationAndRestart |

G.16.7. R23-11 中新增的建议

无

G.16.8. R23-11 中变更的建议

无

G.16.9. R23-11 中删除的建议

无

H. 上游映射

H.1. 简介

本章描述 ECU 配置参数(M1 模型)到 AUTOSAR 上游模板(此处为《软件组件模板》)元类与属性的映射。

描述上游模板与 ECU 配置之间的关系,是为了回答这样的典型问题:

  • 供应商应如何使用系统描述中的信息来满足系统工程师定义的需求?

  • 工具供应商应如何从系统描述的 ECU 提取生成 ECU 配置描述?

请注意,上游映射表包含以下列:

| Column Name | Column Meaning |

| BSW Module | Name of BSW module | | BSW Context | Reference to parameter container | | BSW Parameter | Name of the BSW parameter | | BSW Type | Type of parameter | | BSW Description | Description from the configuration document | | Template Description | Class note or attribute note of the M2 model element | | M2 Parameter | Name of the upstream template model element | | Mapping Rule | Textual description on how to transform between M2 and BSW domains | | Mapping Type | One of: local no mapping needed since parameter local to BSW partial some data can be automatically mapped but not all full all data can be automatically mapped | | Mapping Status | Indication of life-cycle status of the mapping | | ECUC Parameter ID | ID of the parameter in the respective SWS document (may be empty if the mapping is owned by an enumeration literal) |

H.2. BswM

属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeCondition/BswMConditionValue/BswMCompu ScaleModeValue
BSW 参数 BswMCompuMethodRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF BSW Description This is a foreign reference to the CompuMethod used for mode requests.
模板描述 This meta-class represents the ability to express the relationship between a physical value and the mathematical representation. Note that this is still independent of the technical implementation in data types. It only specifies the formula how the internal value corresponds to its physical pendant.
M2 参数 AsamHdo::ComputationMethod:: CompuMethod
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01040]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeCondition/BswMConditionValue/BswMMode Declaration
BSW 参数 BswMModeValueRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to the Mode Declaration used for the mode requests corresponding to this condition.
模板描述 Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclaration
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00864]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeRequestPort/BswMModeInitValue/BswMCompu ScaleModeValue
BSW 参数 BswMCompuMethodRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to the CompuMethod used for mode requests.
模板描述 This meta-class represents the ability to express the relationship between a physical value and the mathematical representation. Note that this is still independent of the technical implementation in data types. It only specifies the formula how the internal value corresponds to its physical pendant.
M2 参数 AsamHdo::ComputationMethod:: CompuMethod
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01040]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeRequestPort/BswMModeRequestSource/Bsw MBswModeNotification
BSW 参数 BswMBswModeDeclarationGroupPrototypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to the Mode Declaration Group Prototype.
模板描述 The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is provided or required in the given context.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclarationGroupPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00927]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeRequestPort/BswMModeRequestSource/Bsw MSwcModeNotification
BSW 参数 BswMSwcModeNotificationModeDeclarationGroupPrototype Ref
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to the ModeDeclarationGroupPrototype.
模板描述 The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is provided or required in the given context.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclarationGroupPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00893]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMArbitration/BswMModeRequestPort/BswMModeRequestSource/Bsw MSwcModeRequest
BSW 参数 BswMSwcModeRequestVariableDataPrototypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a reference to the VariableDataPrototype.
模板描述 A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics.
M2 参数 SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01046]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMDataTypeMappingSets
BSW 参数 BswMDataTypeMappingSetRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to DataTypeMappingSet.
模板描述 This class represents a list of mappings between ApplicationDataTypes and ImplementationDataTypes. In addition, it can contain mappings between ImplementationDataTypes and ModeDeclarationGroups.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: DataTypeMappingSet
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00937]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMAction/BswMAvailableActions/BswMRteMode Request
BSW 参数 BswMRequestedModeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to the Mode Declaration used for the mode request
模板描述 Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclaration
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01024]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMAction/BswMAvailableActions/BswMRteSwitch
BSW 参数 BswMSwitchedMode
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This parameter contains the integer value that corresponds to a certain mode in a Mode Declaration Group.
模板描述 Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclaration
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00896]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMAction/BswMAvailableActions/BswMSchMSwitch
BSW 参数 BswMSchMSwitchedMode
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This parameter contains the integer value that corresponds to a certain mode in a Mode Declaration Group.
模板描述 Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclaration
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00901]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMRteModeRequestPort
BSW 参数 BswMRteModeRequestPortInterfaceRef
BSW 类型 ECUC-INSTANCE-REFERENCE-DEF
BSW 说明 This is an instance reference to the variable data prototype used for the mode request.
模板描述 A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics.
M2 参数 SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01025]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMRteModeRequestPort
BSW 参数 BswMRteModeRequestVariableDataPrototypeSRRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 This is a foreign reference to a VariableDataPrototype used for the mode request.
模板描述 A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics.
M2 参数 SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01057]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMSwitchPort
BSW 参数 BswMModeSwitchInterfaceRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ModeSwitchInterface from which the BswM will generate a PPortPrototype.
模板描述 A mode switch interface declares a ModeDeclarationGroupPrototype to be sent and received.
M2 参数 SWComponentTemplate::PortInterface:: ModeSwitchInterface
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_00951]
属性 值
BSW 模块 BswM
BSW 上下文 BswM/BswMConfig/BswMModeControl/BswMSwitchPort
BSW 参数 BswMSchMModeDeclarationGroupRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ModeDeclarationGroup from which the BswM will generate a ModeDeclarationGroupPrototype.
模板描述 A collection of Mode Declarations. Also, the initial mode is explicitly identified.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclarationGroup
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_BswM_01031]

H.3. Com

属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription
BSW 参数 ComFilter
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration parameters of the AUTOSAR COM module's Filters. Note: On sender side the container is used to specify the transmission mode conditions.
模板描述 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.
M2 参数 CommonStructure::Filter:: DataFilter
映射规则 Create container on the receiver side if the NonqueuedReceiverComSpec contains a DataFilter. Create Container on the sender side if the TransmissionModeCondition element contains a reference to this signal.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00339]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterAlgorithm
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 The range of values is specified in the [17] specification, chapter 2.2.2, Reception Filtering.
模板描述 This attribute specifies the type of the filter.
M2 参数 CommonStructure::Filter::DataFilter. dataFilterType
映射规则 Mapping between DataFilterTypeEnum and ComFilterAlgorithm Enum is necessary.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00146]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterMask
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Mask for old and new value.
M2 参数 CommonStructure::Filter::DataFilter. mask
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00235]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterMax
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the upper boundary
M2 参数 CommonStructure::Filter::DataFilter. max
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00317]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterMin
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the lower boundary
M2 参数 CommonStructure::Filter::DataFilter. min
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00318]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterOffset
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering. Range = 0..(ComFilterPeriod-1)
模板描述 Specifies the initial number of messages to occur before the first message is passed
M2 参数 CommonStructure::Filter::DataFilter. offset
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00313]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterPeriod
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 This parameter defines the period of the ComFilterAlgorithm ONE_EVERY_N.
模板描述 Specifies number of messages to occur before the message is passed again
M2 参数 CommonStructure::Filter::DataFilter. period
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00312]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription/ComFilter
BSW 参数 ComFilterX
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to compare with
M2 参数 CommonStructure::Filter::DataFilter. x
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00147]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComGwMapping/ComGwDestination/ComGwDestinationDescription
BSW 参数 ComSignalInitValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 Initial value for this signal. In case of UINT8_N the default value is a string of length ComSignalLength with all bytes set to 0x00. In case of UINT8_DYN the initial size shall be 0. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description Initial value to be sent if sender component is not yet fully initialized, but receiver needs data already. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignal. initValue , SWComponent Template::Communication::NonqueuedSenderComSpec. initValue Mapping Rule It is possible to aggregate an initValue at the level of a ComSpec in the SWC Template. in case the System Description doesn't use a complete Software Component Description (VFB View) the init Value is defined in the System Template. Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_Com_00170]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComDataInvalidAction
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 This parameter defines the action performed upon reception of an invalid signal. Relating to signal groups the action in case if one of the included signals is an invalid signal. If Replace is used the ComSignalInitValue will be used for the replacement. Template Description InvalidationPolicy: 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. ISignalPort.handleInvalid: This attribute defines how invalidation is applied to the ISignals received in the context of this ISignalPort. M2 Parameter SWComponentTemplate::PortInterface:: InvalidationPolicy , SystemTemplate::Fibex::FibexCore::Core Communication::ISignalPort. handleInvalid If strategy HandleInvalidEnum.keep is defined then set ComDataInvalidAction to NOTIFY. If strategy HandleInvalidEnum.replace is defined then set ComDataInvalidAction to REPLACE. In all other cases the ComDataInvalidAction shall not be configured.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00314]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComFilter
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration parameters of the AUTOSAR COM module's Filters. Note: On sender side the container is used to specify the transmission mode conditions.
模板描述 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.
M2 参数 CommonStructure::Filter:: DataFilter
映射规则 Create container on the receiver side if the NonqueuedReceiverComSpec contains a DataFilter. Create Container on the sender side if the TransmissionModeCondition element contains a reference to this signal.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00339]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterAlgorithm
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 The range of values is specified in the [17] specification, chapter 2.2.2, Reception Filtering.
模板描述 This attribute specifies the type of the filter.
M2 参数 CommonStructure::Filter::DataFilter. dataFilterType
映射规则 Mapping between DataFilterTypeEnum and ComFilterAlgorithm Enum is necessary.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00146]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterMask
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Mask for old and new value.
M2 参数 CommonStructure::Filter::DataFilter. mask
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00235]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterMax
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the upper boundary
M2 参数 CommonStructure::Filter::DataFilter. max
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00317]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterMin
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the lower boundary
M2 参数 CommonStructure::Filter::DataFilter. min
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00318]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterOffset
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering. Range = 0..(ComFilterPeriod-1)
模板描述 Specifies the initial number of messages to occur before the first message is passed
M2 参数 CommonStructure::Filter::DataFilter. offset
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00313]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterPeriod
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 This parameter defines the period of the ComFilterAlgorithm ONE_EVERY_N.
模板描述 Specifies number of messages to occur before the message is passed again
M2 参数 CommonStructure::Filter::DataFilter. period
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00312]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal/ComFilter
BSW 参数 ComFilterX
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to compare with
M2 参数 CommonStructure::Filter::DataFilter. x
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00147]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComSignalDataInvalidValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 Defines the data invalid value of the signal. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description InvalidationPolicy: 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. SwDataDefProps.invalidValue: Optional value to express invalidity of the actual data element. M2 Parameter SWComponentTemplate::PortInterface:: InvalidationPolicy , DataDictionary::DataDefProperties::SwDataDefProps. invalidValue ComSignalDataInvalidValue is only derived 1:1 from the SwDataDefProps.invalidValue if the InvalidationPolicy equals keep or replace. In all other cases of InvalidationPolicy the ComSignal DataInvalidValue shall not be configured.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00391]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComSignalInitValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 Initial value for this signal. In case of UINT8_N the default value is a string of length ComSignalLength with all bytes set to 0x00. In case of UINT8_DYN the initial size shall be 0. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description Initial value to be sent if sender component is not yet fully initialized, but receiver needs data already. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignal. initValue , SWComponent Template::Communication::NonqueuedSenderComSpec. initValue It is possible to aggregate an initValue at the level of a ComSpec in the SWC Template. in case the System Description doesn't use a complete Software Component Description (VFB View) the init Value is defined in the System Template.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00170]
ECUC 参数 ID glyph[triangle]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComTimeout
BSW 类型 ECUC-FLOAT-PARAM-DEF BSW Description Defines the length of the deadline monitoring timeout period in seconds. The period for the first timeout period can be configured separately by ECUC_Com_00183. Template Description ISignalPort.timeout: - ISignalPort with communicationDirection = in: Optional timeout value in seconds for the reception of the ISignal. The attribute value is used to configure the ComTimeout in the COM module. The RTE ignores this attribute. The timeout can also be specified with the NonqueuedReceiverCom Spec.aliveTimeout attribute. If a full DataMapping exists for the SystemSignal and the value is available in the configured ReceiverComSpec, then the timeout value in the ReceiverComSpec overrides this optional timeout specification during the creation of the Base Ecu Configuration of the COM module. - ISignalPort with communicationDirection = out: Optional timeout value in seconds for the transmission of the ISignal. The attribute value is used to configure the Com Timeout in the COM module. The RTE ignores this attribute. The timeout can also be specified with the enderCom Spec.transmissionAcknowledge.timeout attribute. If a full DataMapping exists for the SystemSignal and the value is available in the configured SenderComSpec, then the timeout value in the SenderComSpec overrides this optional timeout specification during the creation of the Base Ecu Configuration of the COM module. This attribute can be used in the following cases: - legacy signal where the System Description doesn't use a complete Software Component Description (VFB View) and where the DataMapping is missing. - bus monitoring use cases in which the DataMapping is ignored. TransmissionAcknowledgementRequest.timeout: Number of seconds before an error is reported or in case of allowed redundancy, the value is sent again. NonqueuedReceiverComSpec.aliveTimeout: 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. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignalPort. timeout , SWComponent Template::Communication::TransmissionAcknowledgementRequest. timeout , SWComponent Template::Communication::NonqueuedReceiverComSpec. aliveTimeout
映射规则 TX Signals: If a full DataMapping exist for the SystemSignal this information may be available from a configured SenderComSpec.transmissionAcknowledge.timeout that specifies 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 transmitted according to the specified timing description. In this case the timeout value in SenderComSpec overrides the optional timeout specification in the System Template defined on the ISignalPort. RX Signals: If a full DataMapping exist for the SystemSignal this information may be available from a configured NonqueuedReceiverComSpec.aliveTimeout. In this case the timeout value in ReceiverComSpec overrides the optional timeout specification in the System Template defined on the ISignalPort. Please note that the SWS_RTE defines an algorithm to finally set the applicable timeout value.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00263]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignal
BSW 参数 ComTimeoutSubstitutionValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 The signal substitution value will be used in case of a timeout and ComRxDataTimeoutAction is set to SUBSTITUTE. In case of UINT8_N the default value is a string of length ComSignalLength with all bytes set to 0x00. In case ofUINT8_DYN the initial size shall be 0. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description Defines and enables the ComTimeoutSubstituition for this ISignal. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignal. timeoutSubstitutionValue The mapping of ComTimeoutSubstitutionValue depends on the setting in the ISignal.dataType Policy: - ISignal.dataTypePolicy = override or legacy: SystemTemplate::Fibex::FibexCore::Core Communication::ISignal.timeoutSubstitutionValue - ISignal.dataTypePolicy = networkRepresentationFromComSpec: SWComponent Template::Communication::NonequeuedReceiverComSpec.timeoutSubstitutionValue - ISignal.dataTypePolicy = transformingISignal this is not supported.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_10006]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup
BSW 参数 ComDataInvalidAction
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 This parameter defines the action performed upon reception of an invalid signal. Relating to signal groups the action in case if one of the included signals is an invalid signal. If Replace is used the ComSignalInitValue will be used for the replacement. Template Description InvalidationPolicy: 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. ISignalPort.handleInvalid: This attribute defines how invalidation is applied to the ISignals received in the context of this ISignalPort. M2 Parameter SWComponentTemplate::PortInterface:: InvalidationPolicy , SystemTemplate::Fibex::FibexCore::Core Communication::ISignalPort. handleInvalid If strategy HandleInvalidEnum.keep is defined then set ComDataInvalidAction to NOTIFY. If strategy HandleInvalidEnum.replace is defined then set ComDataInvalidAction to REPLACE. In all other cases the ComDataInvalidAction shall not be configured.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00314]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal
BSW 参数 ComFilter
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration parameters of the AUTOSAR COM module's Filters. Note: On sender side the container is used to specify the transmission mode conditions.
模板描述 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.
M2 参数 CommonStructure::Filter:: DataFilter
映射规则 Create container on the receiver side if the NonqueuedReceiverComSpec contains a DataFilter. Create Container on the sender side if the TransmissionModeCondition element contains a reference to this signal.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00339]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterAlgorithm
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 The range of values is specified in the [17] specification, chapter 2.2.2, Reception Filtering.
模板描述 This attribute specifies the type of the filter.
M2 参数 CommonStructure::Filter::DataFilter. dataFilterType
映射规则 Mapping between DataFilterTypeEnum and ComFilterAlgorithm Enum is necessary.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00146]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterMask
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Mask for old and new value.
M2 参数 CommonStructure::Filter::DataFilter. mask
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00235]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterMax
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the upper boundary
M2 参数 CommonStructure::Filter::DataFilter. max
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00317]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterMin
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to specify the lower boundary
M2 参数 CommonStructure::Filter::DataFilter. min
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00318]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterOffset
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering. Range = 0..(ComFilterPeriod-1)
模板描述 Specifies the initial number of messages to occur before the first message is passed
M2 参数 CommonStructure::Filter::DataFilter. offset
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00313]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterPeriod
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 This parameter defines the period of the ComFilterAlgorithm ONE_EVERY_N.
模板描述 Specifies number of messages to occur before the message is passed again
M2 参数 CommonStructure::Filter::DataFilter. period
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00312]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal/ComFilter
BSW 参数 ComFilterX
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 The name of this attribute corresponds to the parameter name in the [17] specification of Reception Filtering.
模板描述 Value to compare with
M2 参数 CommonStructure::Filter::DataFilter. x
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00147]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal
BSW 参数 ComSignalDataInvalidValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 Defines the data invalid value of the signal. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description InvalidationPolicy: 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. SwDataDefProps.invalidValue: Optional value to express invalidity of the actual data element. M2 Parameter SWComponentTemplate::PortInterface:: InvalidationPolicy , DataDictionary::DataDefProperties::SwDataDefProps. invalidValue ComSignalDataInvalidValue is only derived 1:1 from the SwDataDefProps.invalidValue if the InvalidationPolicy equals keep or replace. In all other cases of InvalidationPolicy the ComSignal DataInvalidValue shall not be configured.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00391]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal
BSW 参数 ComSignalInitValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 Initial value for this signal. In case of UINT8_N the default value is a string of length ComSignalLength with all bytes set to 0x00. In case of UINT8_DYN the initial size shall be 0. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description Initial value to be sent if sender component is not yet fully initialized, but receiver needs data already. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignal. initValue , SWComponent Template::Communication::NonqueuedSenderComSpec. initValue It is possible to aggregate an initValue at the level of a ComSpec in the SWC Template. in case the System Description doesn't use a complete Software Component Description (VFB View) the init Value is defined in the System Template.
映射规则 full
映射类型 valid
映射状态 [ECUC_Com_00170]
ECUC 参数 ID —
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup/ComGroupSignal
BSW 参数 ComTimeoutSubstitutionValue
BSW 类型 ECUC-STRING-PARAM-DEF
BSW 说明 The signal substitution value will be used in case of a timeout and ComRxDataTimeoutAction is set to SUBSTITUTE. In case of UINT8_N the default value is a string of length ComSignalLength with all bytes set to 0x00. In case ofUINT8_DYN the initial size shall be 0. In case the ComSignalType is UINT8, UINT16, UINT32, UINT64, SINT8, SINT16, SINT32, SINT64 the string shall be interpreted as defined in the chapter Integer Type in the AUTOSAR EcuC specification. In case the ComSignalType is FLOAT32, FLOAT64 the string shall be interpreted as defined in the chapter Float Type in the AUTOSAR EcuC specification. In case the ComSignalType is BOOLEAN the string shall be interpreted as defined in the chapter Boolean Type in the AUTOSAR EcuC specification. In case the ComSignal is a UINT8_N, UINT8_DYN the string shall be interpreted as a decimal representation of the characters separated by blanks, e.g. "97 98 100" means a string "abd", where the char "a" is in byte 0(lowest address), "b" is in byte 1, and "d" is in byte 2 and (highest address). For the ComSignalType UINT8_DYN the dynamic length shall be set to the number of configured characters. An empty string "" shall be interpreted as 0-sized dynamic signal. Template Description Defines and enables the ComTimeoutSubstituition for this ISignal.
M2 参数 SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignal. timeoutSubstitutionValue
映射规则 The mapping of ComTimeoutSubstitutionValue depends on the setting in the ISignal.dataType Policy: - ISignal.dataTypePolicy = override or legacy: SystemTemplate::Fibex::FibexCore::Core Communication::ISignal.timeoutSubstitutionValue - ISignal.dataTypePolicy = networkRepresentationFromComSpec: SWComponent Template::Communication::NonequeuedReceiverComSpec.timeoutSubstitutionValue - ISignal.dataTypePolicy = transformingISignal this is not supported.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_10006]
属性 值
BSW 模块 Com
BSW 上下文 Com/ComConfig/ComSignalGroup
BSW 参数 ComTimeout
BSW 类型 ECUC-FLOAT-PARAM-DEF
BSW 说明 Defines the length of the deadline monitoring timeout period in seconds. The period for the first timeout period can be configured separately by ECUC_Com_00183.
模板描述 ISignalPort.timeout: - ISignalPort with communicationDirection = in: Optional timeout value in seconds for the reception of the ISignal. The attribute value is used to configure the ComTimeout in the COM module. The RTE ignores this attribute. The timeout can also be specified with the NonqueuedReceiverCom Spec.aliveTimeout attribute. If a full DataMapping exists for the SystemSignal and the value is available in the configured ReceiverComSpec, then the timeout value in the ReceiverComSpec overrides this optional timeout specification during the creation of the Base Ecu Configuration of the COM module. - ISignalPort with communicationDirection = out: Optional timeout value in seconds for the transmission of the ISignal. The attribute value is used to configure the Com Timeout in the COM module. The RTE ignores this attribute. The timeout can also be specified with the enderCom Spec.transmissionAcknowledge.timeout attribute. If a full DataMapping exists for the SystemSignal and the value is available in the configured SenderComSpec, then the timeout value in the SenderComSpec overrides this optional timeout specification during the creation of the Base Ecu Configuration of the COM module. This attribute can be used in the following cases: - legacy signal where the System Description doesn't use a complete Software Component Description (VFB View) and where the DataMapping is missing. - bus monitoring use cases in which the DataMapping is ignored. TransmissionAcknowledgementRequest.timeout: Number of seconds before an error is reported or in case of allowed redundancy, the value is sent again. NonqueuedReceiverComSpec.aliveTimeout: 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. M2 Parameter SystemTemplate::Fibex::FibexCore::CoreCommunication::ISignalPort. timeout , SWComponent Template::Communication::TransmissionAcknowledgementRequest. timeout , SWComponent Template::Communication::NonqueuedReceiverComSpec. aliveTimeout
映射规则 TX Signals: If a full DataMapping exist for the SystemSignal this information may be available from a configured SenderComSpec.transmissionAcknowledge.timeout that specifies 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 transmitted according to the specified timing description. In this case the timeout value in SenderComSpec overrides the optional timeout specification in the System Template defined on the ISignalPort. RX Signals: If a full DataMapping exist for the SystemSignal this information may be available from a configured NonqueuedReceiverComSpec.aliveTimeout. In this case the timeout value in ReceiverComSpec overrides the optional timeout specification in the System Template defined on the ISignalPort. Please note that the SWS_RTE defines an algorithm to finally set the applicable timeout value.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Com_00263]

H.4. Dcm

属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsd
BSW 参数 DcmDsdServiceRequestManufacturerNotification
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 The name of this container is used to define the name of the R-Port through which the DCM accesses the interface Service RequestNotification. The R-Port is named ServiceRequestManufacturerNotification_{Name} where {Name} is the name of the container DcmDsdServiceRequestManufacturerNotification. The lowerMultiplicity is 0: If container DcmDsdServiceRequestManufacturerNotification does not exist the Indication API is not available. Template Description This represents the ability to define whether the usage of PortInterface ServiceRequestNotification has the characteristics of being initiated by a manufacturer or by a supplier. M2 Parameter CommonStructure::ServiceNeeds::DiagnosticCommunicationManagerNeeds. serviceRequestCallbackType If DiagnosticCommunicationManagerNeeds.serviceRequestCallbackType is set to Diagnostic ServiceRequestCallbackTypeEnum.requestCallbackTypeManufacturer then DcmDsdService RequestManufacturerNotification shall exist and the value of DcmDsdServiceRequestManufacturer Notification.shortName shall be taken from the SwcServiceDependency.shortName that aggregates the DiagnosticCommunicationManagerNeeds.
映射规则 full
映射类型 valid
映射状态 [ECUC_Dcm_00681]
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsd
BSW 参数 DcmDsdServiceRequestSupplierNotification
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF BSW Description The name of this container is used to define the name of the R-Port through which the DCM accesses the interface Service RequestNotification. The R-Port is named ServiceRequestSupplierNotification_<SWC> where <SWC> is the name of the container DcmDsdServiceRequestSupplierNotification. The lowerMultiplicity is 0: If the container DcmDsdRequestSupplierNotification does not exist the Indication API is not available. Template Description This represents the ability to define whether the usage of PortInterface ServiceRequestNotification has the characteristics of being initiated by a manufacturer or by a supplier. M2 Parameter CommonStructure::ServiceNeeds::DiagnosticCommunicationManagerNeeds. serviceRequestCallbackType
映射规则 If DiagnosticCommunicationManagerNeeds.serviceRequestCallbackType is set to Diagnostic ServiceRequestCallbackTypeEnum.requestCallbackTypeSupplier then DcmDsdServiceRequest SupplierNotification shall exist and the value of DcmDsdServiceRequestSupplierNotification.short Name shall be taken from the SwcServiceDependency.shortName that aggregates the Diagnostic CommunicationManagerNeeds.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00816]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData
BSW 参数 DcmDspDataResetToDefaultFnc
BSW 类型 ECUC-FUNCTION-NAME-DEF
BSW 说明 Function name to request to application to reset an IOControl to default value. (ResetToDefault-function). This parameter is related to the interface Xxx_ResetToDefault. Template Description DiagnosticIoControlNeeds.resetToDefaultSupported: This represents a flag for the existence of the ResetToDefault operation in the service interface. DiagnosticServiceSwMapping.mappedBswServiceDependency: This is supposed to represent a reference to a BswServiceDependency. the latter is not derived from Referrable and therefore this detour needs to be implemented to still let BswServiceDependency become the target of a reference. M2 Parameter CommonStructure::ServiceNeeds::DiagnosticIoControlNeeds. resetToDefaultSupported , DiagnosticExtract::Diagnostic Mapping::ServiceMapping::DiagnosticServiceSwMapping. mappedBswServiceDependency It could be possible to get the FNC name via BswServiceDependency
映射规则 full
映射类型 valid
映射状态 [ECUC_Dcm_00673]
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData
BSW 参数 DcmDspDataShortTermAdjustmentFnc
BSW 类型 ECUC-FUNCTION-NAME-DEF
BSW 说明 Function name to request to application to adjust the IO signal. (ShortTermAdjustment-function). Template Description DiagnosticIoControlNeeds.shortTermAdjustmentSupported: This attribute determines, if the referenced port supports temporarily setting of I/O value to a specific value provided by the diagnostic tester. The short term adjustment is not supported if the enclosing DiagnosticIoControlNeeds is aggregated by a SwcService Dependency, see [constr_1364]. DiagnosticServiceSwMapping.mappedBswServiceDependency: This is supposed to represent a reference to a BswServiceDependency. the latter is not derived from Referrable and therefore this detour needs to be implemented to still let BswServiceDependency become the target of a reference. M2 Parameter CommonStructure::ServiceNeeds::DiagnosticIoControlNeeds. shortTermAdjustmentSupported , Diagnostic Extract::DiagnosticMapping::ServiceMapping::DiagnosticServiceSwMapping. mappedBswServiceDependency
映射规则 It could be possible to get the FNC name via BswServiceDependency
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00675]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 BOOLEAN
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is boolean.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = BOOLEAN baseTypeSize = 1 maxNumberOfElements shall not exist array SizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float. Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array. glyph[triangle] Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT16
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint16. Template Description BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = 2C baseTypeSize = 16 maxNumberOfElements shall not exist arraySize
映射规则 full
映射类型 Semantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT16_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint16 array. Template Description BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength baseTypeEncoding = 2C baseTypeSize = 16 maxNumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT32
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint32.
模板描述 BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = 2C baseTypeSize = 32 maxNumberOfElements shall not exist arraySize Semantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
ECUC 参数 ID Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate glyph[triangle]
映射状态 —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT32_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint32 array.
模板描述 BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength baseTypeEncoding = 2C baseTypeSize = 32 maxNumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT8
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint8. Template Description BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength Mapping Rule Mapping Type baseTypeEncoding = 2C baseTypeSize = 8 maxNumberOfElements shall not exist arraySize Semantics shall not exist full Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 SINT8_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is sint8 array. Template Description BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength baseTypeEncoding = 2C baseTypeSize = 8 maxNumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT16
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is uint16.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, UTF-16 baseTypeSize = 16 maxNumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 类型 UINT16_N BSW Description Type of the data is uint16 array. Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength full
BSW 参数 baseTypeEncoding = NONE, UTF-16 baseTypeSize = 16 maxNumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 valid
ECUC 参数 ID ECUC-ENUMERATION-LITERAL-DEF glyph[triangle]
映射类型 —
映射状态 —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT32
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF BSW Description Type of the data is uint32. Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, UTF-32 baseTypeSize = 32 maxNumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT32_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is uint32 array. Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength Mapping Rule Mapping Type glyph[triangleinv] baseTypeEncoding = NONE, UTF-32 baseTypeSize = 32 maxNumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible. full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT8
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is uint8.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT8_DYN
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is uint8 array with dynamic length.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01002) arraySizeSemantics exists and is set to ArraySizeSemanticsEnum.variableSize (cf. TPS_DEXT_01002) Derivation from DiagnosticValueNeeds.fixedLength=0 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataType
BSW 参数 UINT8_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is uint8 array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticDataElement.arraySizeSemantics: This attribute controls the meaning of the value of the array size. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , DiagnosticExtract::CommonDiagnostics::DiagnosticDataElement. arraySizeSemantics , Diagnostic Extract::CommonDiagnostics::DiagnosticDataElement. maxNumberOfElements , CommonStructure::Service Needs::DiagnosticValueNeeds. fixedLength Mapping Rule Mapping Type glyph[triangle] baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements exists and value is greater than 0 (cf. TPS_DEXT_01001) arraySizeSemantics either does not exist or exists and is set to ArraySizeSemanticsEnum.fixedSize (cf. TPS_ DEXT_01001) Derivation from DiagnosticValueNeeds.fixedLength=1 possible. full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData
BSW 参数 DcmDspDataUsePort
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 Defines which interface shall be used to access the data.
模板描述 This attribute controls whether interaction requires the software-component to react synchronously on a request or whether it processes the request in background but still the DCM has to issue the call again to eventually obtain the result of the request.
M2 参数 CommonStructure::ServiceNeeds::DiagnosticValueNeeds. processingStyle
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00713]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort
BSW 参数 USE_DATA_ASYNCH_CLIENT_SERVER
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 The DCM will access the Data using an R-Port requiring a asynchronous ClientServertInterface DataServices_{Data}. The R-Port is named DataServices_{Data} where {Data} is the name of the container DcmDspData.
模板描述 The software-component processes the request in background but still the Dcm has to issue the call again to eventually obtain the result of the request.
M2 参数 CommonStructure::ServiceNeeds::DiagnosticProcessingStyleEnum. processingStyleAsynchronous
映射规则 DiagnosticServiceSwMapping is having a SwcServiceDependency and ServiceNeeds::Diagnostic ProcessingStyleEnum is equal to processingStyleAsynchronous
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort
BSW 参数 USE_DATA_ASYNCH_CLIENT_SERVER_ERROR
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 The Dcm will access the Data using an R-Port requiring a asynchronous ClientServertInterface DataServices_{Data}. The parameter ErrorCode can be returned to allow the application to trigger a negative response during the operation. The R-Port is named DataServices_{Data} where {Data} is the name of the container DcmDspData.
模板描述 The software-component processes the request in background but still the Dcm has to issue the call again to eventually obtain the result of the request or handle error code.
M2 参数 CommonStructure::ServiceNeeds::DiagnosticProcessingStyleEnum. processingStyleAsynchronousWithError
映射规则 DiagnosticServiceSwMapping is having a SwcServiceDependency and ServiceNeeds::Diagnostic ProcessingStyleEnum is equal to processingStyleAsynchronousWithError
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDataUsePort
BSW 参数 USE_DATA_SYNCH_CLIENT_SERVER
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 The DCM will access the Data using an R-Port requiring a synchronous ClientServertInterface DataServices_{Data}. The R-Port is named DataServices_{Data} where {Data} is the name of the container DcmDspData.
模板描述 The software-component is supposed to react synchronously on the request.
M2 参数 CommonStructure::ServiceNeeds::DiagnosticProcessingStyleEnum. processingStyleSynchronous
映射规则 DiagnosticServiceSwMapping is having a SwcServiceDependency and ServiceNeeds::Diagnostic ProcessingStyleEnum is equal to processingStyleSynchronous
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDiagnosisScaling/DcmDspAlternativeData Interface
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a VariableDataPrototoype in a DataInterface. The CompuMethod of the data type of the referenced VariableDataPrototype will be applied to the data type of the Variable DataPrototype in the interface used by the Dcm.
模板描述 A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics.
M2 参数 Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00995]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDiagnosisScaling/DcmDspAlternativeData Interface
BSW 参数 DcmPortInterfaceMapping
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Optional reference to PortInterfaceMapping which defines the mapping rules. The PortInterfaceMapping is used to get the DataPrototypeMapping that describes a conversion between the data prototype referenced by DcmDataElement and the data prototype referenced from DcmDspExternalSRDataElementClass. Template Description Specifies one PortInterfaceMapping to support the connection of Ports typed by two different PortInterfaces with PortInterface elements having unequal names and/or unequal semantic (resolution or range). M2 Parameter SWComponentTemplate::PortInterface:: PortInterfaceMapping Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_Dcm_00996]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspData/DcmDspDiagnosisScaling/DcmDspAlternativeData Type
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidControl
BSW 参数 DcmDspDidFreezeCurrentState
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 This indicates the presence of "FreezeCurrentState".
模板描述 DiagnosticIOControl.freezeCurrentState: Setting this attribute to true represents the ability of the Dcm to execute a freezeCurrentState. DiagnosticIoControlNeeds.freezeCurrentStateSupported: This attribute determines, if the referenced port supports temporary freezing of I/O value. The temporary freeze is not supported if the enclosing DiagnosticIoControlNeeds is aggregated by a SwcService Dependency, see [constr_1364]. M2 Parameter DiagnosticExtract::Dcm::DiagnosticService::IOControl::DiagnosticIOControl. freezeCurrentState , Common Structure::ServiceNeeds::DiagnosticIoControlNeeds. freezeCurrentStateSupported Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_Dcm_00624]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidControl
BSW 参数 DcmDspDidResetToDefault
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 This indicates the presence of "ResetToDefault". Template Description DiagnosticIOControl.resetToDefault: Setting this attribute to true represents the ability of the Dcm to execute a resetToDefault. DiagnosticIoControlNeeds.resetToDefaultSupported: This represents a flag for the existence of the ResetToDefault operation in the service interface. M2 Parameter DiagnosticExtract::Dcm::DiagnosticService::IOControl::DiagnosticIOControl. resetToDefault , CommonStructure::Service Needs::DiagnosticIoControlNeeds. resetToDefaultSupported
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00623]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspDidInfo/DcmDspDidControl
BSW 参数 DcmDspDidShortTermAdjustment
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 This indicates the presence of "ShortTermAdjustment". Template Description DiagnosticIOControl.shortTermAdjustment: Setting this attribute to true represents the ability of the Dcm to execute a shortTermAdjustment. DiagnosticIoControlNeeds.shortTermAdjustmentSupported: This attribute determines, if the referenced port supports temporarily setting of I/O value to a specific value provided by the diagnostic tester. The short term adjustment is not supported if the enclosing DiagnosticIoControlNeeds is aggregated by a SwcService Dependency, see [constr_1364]. M2 Parameter DiagnosticExtract::Dcm::DiagnosticService::IOControl::DiagnosticIOControl. shortTermAdjustment , Common Structure::ServiceNeeds::DiagnosticIoControlNeeds. shortTermAdjustmentSupported
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00625]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspMemoryTransfer
BSW 参数 DcmDspMemoryTransferUsePort
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 If this parameter is set to true, the Dcm uses a port requiring a PortInterface UploadDownload. If the parameter is false, the DCM uses the according C-API callouts.
模板描述 This meta-class represents the ability to specify needs regarding upload and download by means of diagnostic services.
M2 参数 CommonStructure::ServiceNeeds:: DiagnosticUploadDownloadNeeds
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01133]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData
BSW 参数 DcmDspPidDataByteSize
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 Defines the array length in bytes or the maximum array length for variable datalengths. Template Description BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticDataElement.maxNumberOfElements: The existence of this attribute turns the data instance into an array of data. The attribute determines the size of the array in terms of how many elements the array can take. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , DiagnosticExtract::CommonDiagnostics::DiagnosticData Element. maxNumberOfElements glyph[triangle]
映射规则 S/R via array: DcmDspPidDataByteSize= maxNumberOfElements * (baseTypeSize / 8) C/S of FNC callback: DcmDspPidDataByteSize= maxNumberOfElements Note: 8 is the baseType Size of UINT8
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01108]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01/DcmDsp DiagnosisScaling/DcmDspAlternativeDataInterface
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF BSW Description Alternative Diagnosis Representation for the data defined by the means of a VariableDataPrototoype in a DataInterface. The CompuMethod of the data type of the referenced VariableDataPrototype will be applied to the data type of the Variable DataPrototype in the interface used by the Dcm. Template Description A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics. M2 Parameter SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00995]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01/DcmDsp DiagnosisScaling/DcmDspAlternativeDataInterface
BSW 参数 DcmPortInterfaceMapping
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Optional reference to PortInterfaceMapping which defines the mapping rules. The PortInterfaceMapping is used to get the DataPrototypeMapping that describes a conversion between the data prototype referenced by DcmDataElement and the data prototype referenced from DcmDspExternalSRDataElementClass.
模板描述 Specifies one PortInterfaceMapping to support the connection of Ports typed by two different PortInterfaces with PortInterface elements having unequal names and/or unequal semantic (resolution or range).
M2 参数 SWComponentTemplate::PortInterface:: PortInterfaceMapping
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00996]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspPid/DcmDspPidData/DcmDspPidService01/DcmDsp DiagnosisScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine
BSW 参数 DcmDspRequestRoutineResults
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 Provides the configuration of RequestResult subservice for RoutineControl service. Existence indicates that the Request RoutineResults in the RoutineControl is supported.
模板描述 DiagnosticRoutine.requestResult: This represents the ability to request the result of a running routine. DiagnosticRoutineNeeds.diagRoutineType: This denotes the type of diagnostic routine which is implemented by the referenced server port.
M2 参数 DiagnosticExtract::CommonDiagnostics::DiagnosticRoutine. requestResult , CommonStructure::ServiceNeeds::Diagnostic RoutineNeeds. diagRoutineType
映射规则 1:1 mapping for DiagnosticRoutine.requestResult OR DiagnosticRoutineNeeds.diagRoutineTyoe == asynchronous
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01023]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignal/DcmDspArgumentScaling/DcmDsp AlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignal/DcmDspArgumentScaling/DcmDsp AlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignalCompositePool/DcmDspRequest RoutineResultsInSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF glyph[triangle]
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignalCompositePool/DcmDspRequest RoutineResultsInSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignalCompositePool/DcmDspRequest RoutineResultsInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsIn/DcmDspRequestRoutineResultsInSignalCompositePool/DcmDspRequest RoutineResultsInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignal/DcmDspArgumentScaling/DcmDsp AlternativeArgumentData
BSW 类型 glyph[triangle] ECUC-FOREIGN-REFERENCE-DEF
BSW 参数 DcmDataElement
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignal/DcmDspArgumentScaling/DcmDsp AlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignalCompositePool/DcmDspRequest RoutineResultsOutSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF glyph[triangle]
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignalCompositePool/DcmDspRequest RoutineResultsOutSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignalCompositePool/DcmDspRequest RoutineResultsOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspRequestRoutineResults/DcmDspRequest RoutineResultsOut/DcmDspRequestRoutineResultsOutSignalCompositePool/DcmDspRequest RoutineResultsOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine
BSW 参数 DcmDspStartRoutine
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF glyph[triangle]
BSW 说明 Provides the configuration of Start subservice for RoutineControl service.
模板描述 DiagnosticRoutine.start: This represents the ability to start a routine DiagnosticRoutineNeeds: particular item.
M2 参数 DiagnosticExtract::CommonDiagnostics::DiagnosticRoutine. start , CommonStructure::ServiceNeeds:: DiagnosticRoutineNeeds
映射规则 A routine always comes with a start routine, independently of whether the execution is done synchronously or asynchronously.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01021]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignalCompositePool/DcmDspStartRoutineInSignal/DcmDspArgumentScaling/ DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignalCompositePool/DcmDspStartRoutineInSignal/DcmDspArgumentScaling/ DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 glyph[triangle] Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm. Template Description A primitive data type defines a set of allowed values. M2 Parameter SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType 1:1 mapping
映射规则 full
映射类型 valid
映射状态 [ECUC_Dcm_00998]
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignalCompositePool/DcmDspStartRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineIn/Dcm DspStartRoutineInSignalCompositePool/DcmDspStartRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate glyph[triangle] A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignalCompositePool/DcmDspStartRoutineOutSignal/DcmDspArgument Scaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm. Template Description An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation. M2 Parameter SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignalCompositePool/DcmDspStartRoutineOutSignal/DcmDspArgument Scaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 glyph[triangle] Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm. Template Description A primitive data type defines a set of allowed values. M2 Parameter SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType 1:1 mapping
映射规则 full
映射类型 valid
映射状态 [ECUC_Dcm_00998]
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignalCompositePool/DcmDspStartRoutineOutSignal/DcmDspRoutine SignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStartRoutine/DcmDspStartRoutineOut/ DcmDspStartRoutineOutSignalCompositePool/DcmDspStartRoutineOutSignal/DcmDspRoutine SignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array. Template Description BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine
BSW 参数 DcmDspStopRoutine
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF BSW Description Provides the configuration of Stop subservice for RoutineControl service. Existence indicates that the StopRoutine in the RoutineControl is supported. Template Description DiagnosticRoutine.stop: This represents the ability to stop a running routine. DiagnosticRoutineNeeds.diagRoutineType: This denotes the type of diagnostic routine which is implemented by the referenced server port. M2 Parameter DiagnosticExtract::CommonDiagnostics::DiagnosticRoutine. stop , CommonStructure::ServiceNeeds::DiagnosticRoutine Needs. diagRoutineType
映射规则 1:1 mapping for DiagnosticRoutine.stop
映射类型 full OR DiagnosticRoutineNeeds.diagRoutineType == asynchronous
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01022]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm. Template Description An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation. M2 Parameter SWComponentTemplate::PortInterface:: ArgumentDataPrototype Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignalCompositePool/DcmDspStopRoutineInSignal/DcmDspArgumentScaling/ DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF glyph[triangle]
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignalCompositePool/DcmDspStopRoutineInSignal/DcmDspArgumentScaling/ DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignalCompositePool/DcmDspStopRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineIn/Dcm DspStopRoutineInSignalCompositePool/DcmDspStopRoutineInSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignal/DcmDspArgumentScaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF glyph[triangle]
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignal/DcmDspArgumentScaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignal/DcmDspRoutineSignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength
映射规则 baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignalCompositePool/DcmDspStopRoutineOutSignal/DcmDspArgument Scaling/DcmDspAlternativeArgumentData
BSW 参数 DcmDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF glyph[triangle]
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ArgumentDataPrototype. The CompuMethod of the data type of the referenced ArgumentDataPrototype will be applied to the data type of the ArgumentDataPrototype in the interface used by the Dcm.
模板描述 An argument of an operation, much like a data element, but also carries direction information and is owned by a particular ClientServerOperation.
M2 参数 SWComponentTemplate::PortInterface:: ArgumentDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_01056]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignalCompositePool/DcmDspStopRoutineOutSignal/DcmDspArgument Scaling/DcmDspAlternativeDataType
BSW 参数 DcmApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dcm.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00998]
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignalCompositePool/DcmDspStopRoutineOutSignal/DcmDspRoutine SignalType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspRoutine/DcmDspStopRoutine/DcmDspStopRoutineOut/ DcmDspStopRoutineOutSignalCompositePool/DcmDspStopRoutineOutSignal/DcmDspRoutine SignalType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dcm
BSW 上下文 Dcm/DcmConfigSet/DcmDsp/DcmDspSecurity
BSW 参数 DcmDspSecurityRow
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF glyph[triangle]
BSW 说明 Definition of a single Row of configuration for security level configuration (per security level) The name of this container is used to define the name of the R-Port through which the DCM accesses the interface SecurityAccess_{SecurityLevel}. The R-Port is named SecurityAccess_{SecurityLevel} where {SecurityLevel} is the name of the container DcmDspSecurityRow. If there is no reference, no check of security level shall be done.
模板描述 This meta-class represents the needs of a software-component to verify the access to security level via diagnostic services.
M2 参数 CommonStructure::ServiceNeeds:: DiagnosticsCommunicationSecurityNeeds
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dcm_00759]

H.5. Dem

属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet
BSW 参数 DemDebounceCounterBasedClass
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration of Debounce Counter Based Class
模板描述 This meta-class represents the ability to indicate that the counter-based debounce algorithm shall be used by the DEM for this diagnostic monitor. This is related to set the ECUC choice container DemDebounceAlgorithmClass to DemDebounceCounterBased.
M2 参数 CommonStructure::ServiceNeeds:: DiagEventDebounceCounterBased
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00881]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemDebounceCounterBasedClass
BSW 参数 DemDebounceCounterJumpDown
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Switch for the activation of Jump-Down. true: Jump-Down activated false: Jump-Down deactivated
模板描述 This value activates or deactivates the counter jump-down behavior. glyph[triangle]
M2 参数 CommonStructure::ServiceNeeds::DiagEventDebounceCounterBased. counterJumpDown
映射规则 Shall be taken from DiagnosticExtract::DiagnosticCommonProps.debounceAlgorithm Props.debounceAlgorithm.counterJumpDown. Applicable if DiagnosticExtract::DiagnosticCommonProps.debounceAlgorithmProps.debounce Algorithm is modeled by means of a DiagEventDebounceCounterBased.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00685]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemDebounceCounterBasedClass
BSW 参数 DemDebounceCounterPassedThreshold
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 Defines the value of the internal debounce counter, which indicates the passed status.
模板描述 This value defines the event-specific limit that indicates the "passed" counter status.
M2 参数 CommonStructure::ServiceNeeds::DiagEventDebounceCounterBased. counterPassedThreshold
映射规则 Shall be taken from DiagnosticExtract::DiagnosticCommonProps.debounceAlgorithm Props.debounceAlgorithm.counterPassedThreshold. Applicable if DiagnosticExtract::DiagnosticCommonProps.debounceAlgorithmProps.debounce Algorithm is modeled by means of a DiagEventDebounceCounterBased.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00636]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemEventParameter
BSW 参数 DemDebounceAlgorithmClass
BSW 类型 ECUC-CHOICE-CONTAINER-DEF
BSW 说明 Debounce algorithm class: counter based, time based, or monitor internal.
模板描述 This class represents the ability to specify the pre-debounce algorithm which is selected and/or required by the particular monitor. This class inherits from Identifiable in order to allow further documentation of the expected or implemented debouncing and to use the category for the identification of the expected / implemented debouncing.
M2 参数 CommonStructure::ServiceNeeds:: DiagEventDebounceAlgorithm
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00604]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass
BSW 参数 DemDebounceCounterBased
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration (parameters) for counter based debouncing.
模板描述 This meta-class represents the ability to indicate that the counter-based debounce algorithm shall be used by the DEM for this diagnostic monitor. This is related to set the ECUC choice container DemDebounceAlgorithmClass to DemDebounceCounterBased.
M2 参数 CommonStructure::ServiceNeeds:: DiagEventDebounceCounterBased
映射规则 There are two ways to derive the existence of DemDebounceCounterBased: 1. DiagEventNeeds,diagEventDebounceAlgoritm exists and is modeled as a DiagEventDebounce CounterBased. 2. DiagnosticContributionSet.commonProperties.debounceAlgorithmProps.debounceAlgorithm exists and is modeled as a DiagEventDebounceCounterBased If both alternatives exist at the same time then the definition ot DiagnosticContributionSet.common Properties.debounceAlgorithmProps.debounceAlgorithm shall be handled with priority.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00711]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass
BSW 参数 DemDebounceMonitorInternal
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration (parameters) for monitor internal debouncing.
模板描述 This meta-class represents the ability to indicate that no Dem pre-debounce algorithm shall be used for this diagnostic monitor. The SWC might implement an internal debouncing algorithm and report qualified (debounced) results to the Dem/ DM.
M2 参数 CommonStructure::ServiceNeeds:: DiagEventDebounceMonitorInternal
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00712]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemEventParameter/DemDebounceAlgorithmClass
BSW 参数 DemDebounceTimeBased
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 This container contains the configuration (parameters) for time based debouncing.
模板描述 This meta-class represents the ability to indicate that the time-based pre-debounce algorithm shall be used by the Dem for this diagnostic monitor. This is related to set the EcuC choice container DemDebounceAlgorithmClass to DemDebounceTimeBase.
M2 参数 CommonStructure::ServiceNeeds:: DiagEventDebounceTimeBased
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00713]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemConfigSet/DemEventParameter
BSW 参数 DemFFPrestorageInNvm
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 If the event uses a pre-stored freeze-frame this attribute indicates if the event requires the pre-stored data to be stored in non-volatile memory. TRUE = store the pre-stored data in non-volatile memory, FALSE = pre-stored data is not stored in non-volatile memory. Template Description DiagnosticEventNeeds.prestoredFreezeframeStoredInNvm: If the Event uses a prestored freeze-frame (using the operations PrestoreFreezeFrame and ClearPrestoredFreezeFrame of the service interface DiagnosticMonitor) this attribute indicates if the Event requires the data to be stored in non-volatile memory. TRUE = Dem shall store the prestored data in non-volatile memory, FALSE = Data can be lost at shutdown (not stored in Nvm). DiagnosticEvent.prestoredFreezeframeStoredInNvm: If the Event uses a prestored freeze-frame (using the operations PrestoreFreezeFrame and ClearPrestoredFreezeFrame of the service interface DiagnosticMonitor) this attribute indicates if the Event requires the data to be stored in non-volatile memory. TRUE = Dem shall store the prestored data in non-volatile memory, FALSE = Data can be lost at shutdown (not stored in Nvm) M2 Parameter CommonStructure::ServiceNeeds::DiagnosticEventNeeds. prestoredFreezeframeStoredInNvm , Diagnostic Extract::Dem::DiagnosticEvent::DiagnosticEvent. prestoredFreezeframeStoredInNvm
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00948]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalCSDataElementClass/DemDataElement DataType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalCSDataElementClass/DemDataElement DataType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalCSDataElementClass
BSW 参数 DemDataElementProvideMonitorData
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 glyph[triangle] If the parameter is set to true, the generated function call to retrieve the data element has the monitorData0 as additional first parameter.
模板描述 This attribute defines whether additional monitor data shall be added to the reporting of events.
M2 参数 CommonStructure::ServiceNeeds::DiagnosticEventNeeds. usesMonitorData
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00951]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalSRDataElementClass/DemDataElement DataType
BSW 参数 FLOAT
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalSRDataElementClass/DemDataElement DataType
BSW 参数 FLOAT_N
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Type of the data is float array.
模板描述 BaseTypeDirectDefinition.baseTypeEncoding: This specifies, how an object of the current BaseType is encoded, e.g. in an ECU within a message sequence. BaseTypeDirectDefinition.baseTypeSize: Describes the length of the data type specified in the container in bits. DiagnosticValueNeeds.fixedLength: This attribute is applicable only if the DiagnosticValueNeeds is aggregated within a BswModuleDependency. This attribute controls whether the data length of the data is fixed. M2 Parameter AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeEncoding , AsamHdo::BaseTypes::BaseTypeDirectDefinition. baseTypeSize , CommonStructure::ServiceNeeds::DiagnosticValueNeeds. fixedLength baseTypeEncoding = NONE, WINDOWS-1252, UTF-8, BCD-P, BCD-UP baseTypeSize = 8 max NumberOfElements shall not exist arraySizeSemantics shall not exist Derivation from DiagnosticValueNeeds.fixedLength=1 possible.
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalSRDataElementClass/DemDiagnosis Scaling/DemAlternativeDataInterface
BSW 参数 DemDataElement
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a VariableDataPrototoype in a DataInterface. The CompuMethod of the data type of the referenced VariableDataPrototype will be applied to the data type of the Variable DataPrototype in the interface used by the Dem. Template Description A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics. M2 Parameter SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00845]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalSRDataElementClass/DemDiagnosis Scaling/DemAlternativeDataInterface
BSW 参数 DemPortInterfaceMapping
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Optional reference to PortInterfaceMapping which defines the mapping rules. The PortInterfaceMapping is used to get the DataPrototypeMapping that describes a conversion between the data prototype referenced by DemDataElement and the data prototype referenced from DcmDspExternalSRDataElementClass. Template Description glyph[triangle] Specifies one PortInterfaceMapping to support the connection of Ports typed by two different PortInterfaces with PortInterface elements having unequal names and/or unequal semantic (resolution or range).
M2 参数 SWComponentTemplate::PortInterface:: PortInterfaceMapping
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00846]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemDataElementClass/DemExternalSRDataElementClass/DemDiagnosis Scaling/DemAlternativeDataType
BSW 参数 DemApplicationDataType
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Alternative Diagnosis Representation for the data defined by the means of a ApplicationDataType of category VALUE, BOOLEAN or ARRAY. The CompuMethod that applies to the referenced ApplicationDataType in case of category VALUE or BOOLEAN will be applied to the data type of the VariableDataPrototype in the interface used by the Dem.
模板描述 A primitive data type defines a set of allowed values.
M2 参数 SWComponentTemplate::Datatype::Datatypes:: ApplicationPrimitiveDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00848]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemEventMemorySet
BSW 参数 DemClearDTCNotification
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 Contains callback function definition which are called during clear DTC operations.
模板描述 This meta-class represents the needs of a software-component interested to get information regarding any DTC status change.
M2 参数 CommonStructure::ServiceNeeds:: DtcStatusChangeNotificationNeeds
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00925]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemEventMemorySet/DemClearDTCNotification
BSW 参数 DemClearDtcNotificationTime
BSW 类型 ECUC-ENUMERATION-PARAM-DEF
BSW 说明 Configure, whether the callback shall be called on start of a clear or after finishing a clear DTC operation (refer to _ ClearDtcNotification)
模板描述 This attribute determines the time when the notification about the DTC operation shall be executed. This attribute is only relevant for the configuration of the ClearDtcNotification.
M2 参数 CommonStructure::ServiceNeeds::DtcStatusChangeNotificationNeeds. notificationTime
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Dem_00927]
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemEventMemorySet/DemClearDTCNotification/DemClearDtcNotificationTime
BSW 参数 FINISH
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 The ClearDtcCallback shall be executed when the DTC operation finishes.
模板描述 CommonStructure::ServiceNeeds::DiagnosticClearDtcNotificationEnum. finish
M2 参数 1:1 mapping
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —
属性 值
BSW 模块 Dem
BSW 上下文 Dem/DemGeneral/DemEventMemorySet/DemClearDTCNotification/DemClearDtcNotificationTime
BSW 参数 START
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 The ClearDtcCallback shall be executed when the DTC operation starts.
模板描述 CommonStructure::ServiceNeeds::DiagnosticClearDtcNotificationEnum. start
M2 参数 1:1 mapping
映射规则 full
映射类型 valid
映射状态 —
ECUC 参数 ID —

H.6. EcuC

属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType
BSW 参数 MetaDataItem
BSW 类型 ECUC-PARAM-CONF-CONTAINER-DEF
BSW 说明 The content of meta data in a Pdu consists of an ordered list of meta data items. This container represents a meta data item that is contained in meta data of a Pdu.
模板描述 This meta-class represents a single meta-data item.
M2 参数 SWComponentTemplate::PortInterface:: MetaDataItem
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_EcuC_00074]
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem
BSW 参数 MetaDataItemLength
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 This parameter defines the length of a meta data item in bytes.
模板描述 This attribute determines the length of the MetaDataItem at run-time.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. length
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_EcuC_00075]
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 ADDRESS_EXTENSION_8
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Address extension field (N_AE) of the mixed addressing modes with 11bit and 29bit CAN ID of ISO 15765-2. Size: 8 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == ADDRESS_ EXTENSION_16
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 CAN_ID_32
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 CAN ID according to ISO 11898-2, either 29 bits or 11 bits. Encoding according to Can_IdType. Size: 32 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == CAN_ID_32
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 ETHERNET_MAC_64
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 For 48bit MAC addresses the upper 16 bit are not used by the producer and ignored by the consumer.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == ETHERNET_ MAC_64
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 LIN_NAD_8
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 LIN node address as used in the LIN transport protocol. Size: 8 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == LIN_NAD_8
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 PRIORITY_8
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Priority field of SAE J1939 IDs, or Ethernet QoS parameter. Size: 8 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == PRIORITY_8
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 SOCKET_CONNECTION_ID_16
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 SoAd socket connection ID. Size: 16 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == SOCKET_ CONNECTION_ID_16
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 SOURCE_ADDRESS_16
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Source address of CanTp, FrTp, or DoIP transport protocol messages, or of SAE J1939 messages. Size: 16 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == SOURCE_ ADDRESS_16
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/MetaDataType/MetaDataItem/MetaDataItemType
BSW 参数 TARGET_ADDRESS_16
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Target address of CanTp, FrTp, or DoIP transport protocol messages, or destination address of SAE J1939 messages. Size: 16 bits.
模板描述 This aggregation contributes the specification of the concrete meta-data item type.
M2 参数 SWComponentTemplate::PortInterface::MetaDataItem. metaDataItemType
映射规则 SWComponentTemplate::PortInterface::MetaDataItem.metaDataItemType == TARGET_ ADDRESS_16
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucConfigSet/EcucPduCollection/Pdu
BSW 参数 MetaDataTypeRef
BSW 类型 ECUC-REFERENCE-DEF
BSW 说明 Reference to meta data that is transported in the Pdu through the AUTOSAR layers.
模板描述 VariableDataPrototype: A VariableDataPrototype represents a formalized generic piece of information that is typically mutable by the application software layer. VariableDataPrototype is used in various contexts and the specific context gives the otherwise generic VariableDataPrototype a dedicated semantics. SenderReceiverToSignalMapping: Mapping of a sender receiver communication data element to a signal. SystemSignal: The system signal represents the communication system's view of data exchanged between SW components which reside on different ECUs. The system signals allow to represent this communication in a flattened structure, with exactly one system signal defined for each data element prototype sent and received by connected SW component instances. ISignal: Signal of the Interaction Layer. The RTE supports a "signal fan-out" where the same System Signal is sent in different Signal IPdus to multiple receivers. To support the RTE "signal fan-out" each SignalIPdu contains ISignals. If the same System Signal is to be mapped into several SignalIPdus there is one ISignal needed for each ISignalToIPduMapping. Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate ISignals describe the Interface between the Precompile configured RTE and the potentially Postbuild configured Com Stack (see ECUC Parameter Mapping). In case of the SystemSignalGroup an ISignal shall be created for each SystemSignal contained in the SystemSignalGroup. ISignalIPdu: Represents the IPdus handled by Com. The ISignalIPdu assembled and disassembled in AUTOSAR COM consists of one or more signals. In case no multiplexing is performed this IPdu is routed to/from the Interface Layer. A maximum of one dynamic length signal per IPdu is allowed. M2 Parameter SWComponentTemplate::Datatype::DataPrototypes:: VariableDataPrototype , SystemTemplate::DataMapping:: SenderReceiverToSignalMapping , SystemTemplate::Fibex::FibexCore::CoreCommunication:: SystemSignal , System Template::Fibex::FibexCore::CoreCommunication:: ISignal , SystemTemplate::Fibex::FibexCore::CoreCommunication:: ISignalIPdu A MetaDataTypeRef shall be derived for a given Pdu if a MetaDataItemSet exists that refers to a VariablePrototype that is also referenced from a SenderReceiverToSignalMapping that in turn references a SystemSignal that is referenced by a ISignal that is mapped to an ISignalIPdu that is derived to the mentioned Pdu in EcuC.
映射规则 full
映射类型 valid
映射状态 [ECUC_EcuC_00077]
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucPartitionCollection/EcucPartition
BSW 参数 EcucPartitionSoftwareComponentInstanceRef
BSW 类型 ECUC-INSTANCE-REFERENCE-DEF
BSW 说明 References the SW Component instances from the Ecu Extract that shall be executed in this partition.
模板描述 SystemTemplate::SWmapping::SwcToEcuMapping. partition
M2 参数 The EcucPartitionSoftwareComponentInstanceRef is derived from an SwcToEcuMapping which references an EcuPartition and one or several SwComponentPrototypes. For each SwComponent Prototype that is referenced by the SwcToEcuMapping in the component role an EcucPartition SoftwareComponentInstanceRef shall be created that refers to the same SwComponentPrototype as the SwcToEcuMapping.
映射规则 full
映射类型 valid
映射状态 [ECUC_EcuC_00036]
ECUC 参数 ID —
属性 值
BSW 模块 EcuC
BSW 上下文 EcuC/EcucUnitGroupAssignment
BSW 参数 EcucUnitGroupRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Optional reference to the UnitGroup to support the generation of ASAM MCD file. These UnitGroups are selecting a set of units for a specific country.
模板描述 glyph[triangle] This meta-class represents the ability to specify a logical grouping of units.The category denotes the unit system that the referenced units are associated to. In this way, e.g. country-specific unit systems (CATEGORY="COUNTRY") can be defined as well as specific unit systems for certain application domains. In the same way a group of equivalent units, can be defined which are used in different countries, by setting CATEGORY="EQUIV_UNITS". KmPerHour and MilesPerHour could such be combined to one group named "vehicle_speed". The unit MeterPerSec would not belong to this group because it is normally not used for vehicle speed. But all of the mentioned units could be combined to one group named "speed". Note that the UnitGroup does not ensure the physical compliance of the units. This is maintained by the physical dimension. AsamHdo::Units:: UnitGroup
M2 参数 1:1 mapping
映射规则 full
映射类型 valid
映射状态 [ECUC_EcuC_00062]
ECUC 参数 ID —

H.7. MemMap

属性 值
BSW 模块 MemMap
BSW 上下文 MemMap/MemMapAllocation/MemMapGenericMapping
BSW 参数 MemMapSwAddressMethodRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the SwAddrMethod which applies to the MemMapGenericMapping.
模板描述 Used to assign a common addressing method, e.g. common memory section, to data or code objects. These objects could actually live in different modules or components.
M2 参数 DataDictionary::AuxillaryObjects:: SwAddrMethod
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_MemMap_- 00013]
属性 值
BSW 模块 MemMap
BSW 上下文 MemMap/MemMapAllocation/MemMapSectionSpecificMapping
BSW 参数 MemMapMemorySectionRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the MemorySection which applies to the MemMapSectionSpecificMapping.
模板描述 Provides a description of an abstract memory section used in the Implementation for code or data. It shall be declared by the Implementation Description of the module or component, which actually allocates the memory in its code. This means in case of data prototypes which are allocated by the RTE, that the generated Implementation Description of the RTE shall contain the corresponding MemorySections. The attribute "symbol" (if symbol is missing: "shortName") defines the module or component specific section name used in the code. For details see the document "Specification of Memory Mapping". Typically the section name is build according the pattern: - <SwAddrMethod shortName>[_<further specialization nominator>][_<alignment>] where - [<SwAddrMethod shortName>] is the shortName of the referenced SwAddrMethod - [_<further specialization nominator>] is an optional infix to indicate the specialization in the case that several Memory Sections for different purpose of the same Implementation Description referring to the same or equally named SwAddr Methods. - [_<alignment>] is the alignment attributes value and is only applicable in the case that the memoryAllocationKeyword Policy value of the referenced SwAddrMethod is set to addrMethodShortNameAndAlignment MemorySection used to Implement the code of RunnableEntitys and BswSchedulableEntitys shall have a symbol (if missing: shortName) identical to the referred SwAddrMethod to conform to the generated RTE header files. In addition to the section name described above, a prefix is used in the corresponding macro code in order to define a name space. This prefix is by default given by the shortName of the BswModuleDescription resp. the SwComponentType. It can be superseded by the prefix attribute. CommonStructure::ResourceConsumption::MemorySectionUsage:: MemorySection
M2 参数 1:1 mapping
映射规则 full
映射类型 valid
映射状态 [ECUC_MemMap_- 00016]
ECUC 参数 ID —

H.8. NvM

属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockJobPriority
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 Defines the job priority for a NVRAM block (0 = Immediate priority).
模板描述 NvBlockNeeds.writingPriority: Requires the priority of writing this block in case of concurrent requests to write other blocks. NvBlockNeeds.storeEmergency: Defines whether or not the associated RAM Block shall be implicitly stored in case of ECU failure (e.g. loss of power) by the basic software. If the attribute storeEmergency is set to true the associated RAM Block shall be configured to have immediate priority. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. writingPriority , CommonStructure::ServiceNeeds::NvBlockNeeds. storeEmergency Mapping Rule Mapping Type It is the integrators job to secure the value-monotonic assignment of writingPriority to NvMBlock JobPriority. This means that the lowest assigned value of writingPriority=MEDIUM shall be greater than highest assigned value of writingPriority=HIGH etc.If NvBlockNeeds.storeEmergency is set to true, then NvMBlockJobPriority shall be 0 (Immediate priority). If NvBlockNeeds.storeEmergency is set to false, then the value of NvMBlockJobPriority depends on the value of NvBlock Needs.writingPriority. full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00477]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockManagementType ECUC-ENUMERATION-PARAM-DEF
BSW 类型 Defines the block management type for the NVRAM block.[SWS_NvM_00137]
BSW 说明 Reliability against data loss on the non-volatile medium.
模板描述 CommonStructure::ServiceNeeds::NvBlockNeeds. reliability
M2 参数 if (reliability == errorDetection | noProtection) && nDataSets==0 then NvmBlockManagementType = NVM_BLOCK_NATIVE. if reliability == errorCorrection then NvmBlockManagementType = NVM_ BLOCK_REDUNDANT. [constr_1095] applies.
映射规则 full
映射类型 valid
映射状态 [ECUC_NvM_00062]
ECUC 参数 ID —
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockUseAutoValidation
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines whether the RAM Block shall be auto validated during shutdown phase. true: if auto validation mechanism is used, false: otherwise
模板描述 If set to true the RAM Block shall be auto validated during shutdown phase.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. useAutoValidationAtShutDown
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00557]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 类型 NvMBlockUseCRCCompMechanism BSW Description Defines whether the CRC of the RAM Block shall be compared during a write job with the CRC which was calculated during the last successful read or write job. true: if compare mechanism is used, false: otherwise Template Description If set to true the CRC of the RAM Block shall be compared during a write job with the CRC which was calculated during the last successful read or write job in order to skip unnecessary NVRAM writings. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. useCRCCompMechanism Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_NvM_00556]
BSW 参数 —
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockUseCrc
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines CRC usage for the NVRAM block, i.e. memory space for CRC is reserved in RAM and NV memory. true: CRC will be used for this NVRAM block. false: CRC will not be used for this NVRAM block. Note: Configuring CRC for a block with immediate priority is not recommended, since the CRC calculation may extend over more than one NvM main function and this could increase the time of writing the immediate data significantly, thus defeating the purpose of immediate priority. Template Description Reliability against data loss on the non-volatile medium. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. reliability Mapping Rule reliability == errorCorrection | errorDetection means that NvmBlockUseCrc shall bet set to true, else NvmBlockUseCrc = false Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_NvM_00036]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockUseSetRamBlockStatus
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines if NvMSetRamBlockStatusApi shall be used for this block or not. Note: If NvMSetRamBlockStatusApi is disabled this configuration parameter shall be ignored. true: calling of NvMSetRamBlockStatus for this RAM block shall set the status of the RAM block. false: calling of NvMSetRamBlockStatus for this RAM block shall be ignored. Template Description Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate ECUC-BOOLEAN-PARAM-DEF This attribute defines how the management of the RAM Block status is controlled.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. ramBlockStatusControl
映射规则 If the value of NvBlockNeeds.ramBlockStatusControl is set to RamBlockStatusControlEnum.api the parameter shall be set to true. If the value of NvBlockNeeds.ramBlockStatusControl is set to RamBlockStatusControlEnum.nvRamManager it shall be set to false.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00552]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMBlockWriteProt
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines an initial write protection of the NV block true: Initial block write protection is enabled. false: Initial block write protection is disabled.
模板描述 true: data of this NVRAM Block are write protected for normal operation (but protection can be disabled) false: no restriction
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. readonly
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00033]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMCalcRamBlockCrc
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines CRC (re)calculation for the permanent RAM block or NVRAM blocks which are configured to use explicit synchronization mechanism. true: CRC will be (re)calculated for this permanent RAM block. false: CRC will not be (re)calculated for this permanent RAM block.
模板描述 Defines if CRC (re)calculation for the permanent RAM Block is required.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. calcRamBlockCrc
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00119]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMNvBlockNum
BSW 类型 ECUC-INTEGER-PARAM-DEF BSW Description Defines the number of multiple NV blocks in a contiguous area according to the given block management type. - 1-255 For NVRAM blocks to be configured of block management type NVM_BLOCK_DATASET. The actual range is limited according to SWS_NvM_00444. - 1 For NVRAM blocks to be configured of block management type NVM_BLOCK_NATIVE - 2 For NVRAM blocks to be configured of block management type NVM_BLOCK_REDUNDANT Template Description NvBlockNeeds.nDataSets: Number of data sets to be provided by the NVRAM manager for this block. This is the total number of ROM Blocks and RAM Blocks. NvBlockNeeds.reliability: Reliability against data loss on the non-volatile medium. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. nDataSets , CommonStructure::ServiceNeeds::NvBlockNeeds. reliability
映射规则 if (nDataSets == 0 && reliability ==noProtection | errorDetection) then NvMNvBlockNum = 1. if (n DataSets >0 && reliability ==noProtection | errorDetection) then NvMNvBlockNum = nDataSets.
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00480]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMResistantToChangedSw
BSW 类型 ECUC-BOOLEAN-PARAM-DEF BSW Description Defines whether a NVRAM block shall be treated resistant to configuration changes or not. If there is no default data available at configuration time then the application shall be responsible for providing the default initialization data. In this case the application has to use NvM_GetErrorStatus()to be able to distinguish between first initialization and corrupted data. true: NVRAM block is resistant to changed software. false: NVRAM block is not resistant to changed software. Template Description Defines whether an NVRAM Block shall be treated resistant to configuration changes (true) or not (false). For details how to handle initialization in the latter case, please refer to the NVRAM specification. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. resistantToChangedSw
映射规则 1:1 Mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00483]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 类型 NvMRomBlockNum BSW Description Defines the number of multiple ROM blocks in a contiguous area according to the given block management type. 0-254 For NVRAM blocks to be configured of block management type NVM_BLOCK_DATASET. The actual range is limited according to SWS_NvM_00444. 0-1 For NVRAM blocks to be configured of block management type NVM_BLOCK_NATIVE 0-1 For NVRAM blocks to be configured of block management type NVM_BLOCK_REDUNDANT Template Description Number of ROM Blocks to be provided by the NVRAM manager for this block. Please note that these multiple ROM Blocks are given in a contiguous area. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. nRomBlocks Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_NvM_00485]
BSW 参数 —
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMSelectBlockForFirstInitAll
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines whether a block will be processed or not by NvM_FirstInitAll. A block can be configured to be processed even if it doesn't have permanent RAM and/or explicit synchronization. TRUE: block will be processed by NvM_FirstInitAll FALSE: block will not be processed by NvM_FirstInitAll Template Description If this attribute is set to true the NvM shall process this block in the NvM_FirstInitAll() function. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. selectBlockForFirstInitAll Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_NvM_00558]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMSelectBlockForReadAll
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines whether a NVRAM block shall be processed during NvM_ReadAll or not. This configuration parameter has only influence on those NVRAM blocks which are configured to have a permanent RAM block or which are configured to use explicit synchronization mechanism. true: NVRAM block shall be processed by NvM_ReadAll false: NVRAM block shall not be processed by NvM_ReadAll
模板描述 Document ID 62: AUTOSAR_CP_TPS_SoftwareComponentTemplate ECUC-INTEGER-PARAM-DEF Defines whether the associated RAM Block shall be implicitly restored during startup by the basic software.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. restoreAtStart
映射规则 1:1 Mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00117]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMSelectBlockForWriteAll
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines whether a NVRAM block shall be processed during NvM_WriteAll or not. This configuration parameter has only influence on those NVRAM blocks which are configured to have a permanent RAM block or which are configured to use explicit synchronization mechanism. true: NVRAM block shall be processed by NvM_WriteAll false: NVRAM block shall not be processed by NvM_WriteAll
模板描述 Defines whether or not the associated RAM Block shall be implicitly stored during shutdown by the basic software.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. storeAtShutdown
映射规则 1:1 Mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00549]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMStaticBlockIDCheck
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines if the Static Block ID check is enabled. false: Static Block ID check is disabled. true: Static Block ID check is enabled.
模板描述 Defines if the Static Block Id check shall be enabled.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. checkStaticBlockId
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00532]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMWriteBlockOnce
BSW 类型 ECUC-BOOLEAN-PARAM-DEF BSW Description Defines write protection after first write. The NVRAM manager sets the write protection bit either after the NV block was written the first time or if the block was already written and it is detected as valid and consistent during a read for it. true: Defines write protection after first write is enabled. false: Defines write protection after first write is disabled. Template Description Defines write protection after first write: true: This block is prevented from being changed/erased or being replaced with the default ROM data after first initialization by the software-component. false: No such restriction. M2 Parameter CommonStructure::ServiceNeeds::NvBlockNeeds. writeOnlyOnce
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00072]
属性 值
BSW 模块 NvM
BSW 上下文 NvM/NvMBlockDescriptor
BSW 参数 NvMWriteVerification
BSW 类型 ECUC-BOOLEAN-PARAM-DEF
BSW 说明 Defines if Write Verification is enabled. false: Write verification is disabled. true: Write Verification is enabled.
模板描述 Defines if Write Verification shall be enabled for this NVRAM Block.
M2 参数 CommonStructure::ServiceNeeds::NvBlockNeeds. writeVerification
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_NvM_00534]

H.9. Os

属性 值
BSW 模块 Os
BSW 上下文 Os/OsIoc/OsIocCommunication/OsIocDataProperties
BSW 参数 OsIocDataTypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF BSW Description This is the type of the data to be transferred on the IOC communication channel. This attribute is necessary to generate the parameter type of the Ioc functions. Additionally this information should be used to compute the data size for necessary data copy operations within the Ioc module. If more than one attribute is defined, the IOC generator should generate an IocXxxGroup function (Xxx= CHOICE [Send, Receive, Write, Read]). N:1 or N:M communication (Multiplicity of OsIocSenderProperties > 1) is only allowed for multiplicity of OsIocDataTypeRef = 1 Template Description Describes a reusable data type on the implementation level. This will typically correspond to a typedef in C-code. M2 Parameter CommonStructure::ImplementationDataTypes:: ImplementationDataType Mapping Rule 1:1 mapping Mapping Status valid Mapping Type full ECUC Parameter ID [ECUC_Os_01005]
属性 值
BSW 模块 Os
BSW 上下文 Os/OsIoc/OsIocCommunication/OsIocDataProperties
BSW 参数 OsMemoryMappingCodeLocationRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the memory mapping containing details about the section where the IOC buffer is placed.
模板描述 Describes a reusable data type on the implementation level. This will typically correspond to a typedef in C-code.
M2 参数 CommonStructure::ImplementationDataTypes:: ImplementationDataType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Os_00405]

H.10. Rte

属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteImplicitCommunication
BSW 参数 RteVariableReadAccessRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the VariableAccess in the dataReadAccess role.
模板描述 The presence of a VariableAccess implies that a RunnableEntity needs access to a VariableDataPrototype. The kind of access is specified by the role in which the class is used.
M2 参数 SWComponentTemplate::SwcInternalBehavior::DataElements:: VariableAccess
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09035]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteImplicitCommunication
BSW 参数 RteVariableWriteAccessRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the VariableAccess in the dataWriteAccess role.
模板描述 The presence of a VariableAccess implies that a RunnableEntity needs access to a VariableDataPrototype. The kind of access is specified by the role in which the class is used.
M2 参数 SWComponentTemplate::SwcInternalBehavior::DataElements:: VariableAccess
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09036]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteOsInteraction/RteModeToScheduleTableMapping/RteModeSchtblMapBsw
BSW 参数 RteModeSchtblMapBswProvidedModeGroupRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to an instance of a ModeDeclarationGroupPrototype of a Bsw-Module.
模板描述 The ModeDeclarationGroupPrototype specifies a set of Modes (ModeDeclarationGroup) which is provided or required in the given context.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclarationGroupPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09053]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteOsInteraction/RteModeToScheduleTableMapping
BSW 参数 RteModeSchtblMapModeDeclarationRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ModeDeclarations.
模板描述 Declaration of one Mode. The name and semantics of a specific mode is not defined in the meta-model.
M2 参数 CommonStructure::ModeDeclaration:: ModeDeclaration
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09054]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteOsInteraction/RteModeToScheduleTableMapping/RteModeSchtblMapSwc
BSW 参数 RteModeSchtblMapSwcPortRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the PPortPrototype of a SwComponentPrototype.
模板描述 Component port providing a certain port interface.
M2 参数 SWComponentTemplate::Components:: PPortPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09057]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteEventToIsrMapping
BSW 参数 RteIsrEventRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the description of the ExternalTriggerOccurredEvent or TimingEvent which is pointing to the RunnableEntity being mapped. This allows a fine grained mapping of RunnableEntites based on the activating RTEEvent.
模板描述 Abstract base class for all RTE-related events
M2 参数 SWComponentTemplate::SwcInternalBehavior::RTEEvents:: RTEEvent
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09153]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteEventToTaskMapping
BSW 参数 RteActivationOffset
BSW 类型 ECUC-FLOAT-PARAM-DEF
BSW 说明 Activation offset in seconds.
模板描述 The value makes an assumption about the time offset of the first activation of the RunnableEntity triggered by the mapped TimingEvent relative to the periodic activation of the time base of this TimingEvent. Unit: second.
M2 参数 SWComponentTemplate::SwcInternalBehavior::RTEEvents::TimingEvent. offset
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09018]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteEventToTaskMapping
BSW 参数 RteEventRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the description of the RTEEvent which is pointing to the RunnableEntity being mapped. This allows a fine grained mapping of RunnableEntites based on the activating RTEEvent.
模板描述 Abstract base class for all RTE-related events
M2 参数 SWComponentTemplate::SwcInternalBehavior::RTEEvents:: RTEEvent
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09019]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteEventToTaskMapping
BSW 参数 RteServerQueueLength
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 Specifies the length of the queue for the server call serialization. This value overwrites the queueLength specified at the ServerComSpec.
模板描述 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.
M2 参数 SWComponentTemplate::Communication::ServerComSpec. queueLength
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09133]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteExclusiveAreaImplementation
BSW 参数 RteExclusiveAreaRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ExclusiveArea.
模板描述 Prevents an executable entity running in the area from being preempted.
M2 参数 CommonStructure::InternalBehavior:: ExclusiveArea
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09032]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteInternalTriggerConfig
BSW 参数 RteSwcTriggerSourceRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to an InternalTriggeringPoint of the related component instance. The referenced InternalTriggeringPoint has to belong to the same software component instance as the RteSwComponent Instance owning this parameter configures.
模板描述 If a RunnableEntity owns an InternalTriggeringPoint it is entitled to trigger the execution of RunnableEntities of the corresponding software-component.
M2 参数 SWComponentTemplate::SwcInternalBehavior::Trigger:: InternalTriggeringPoint
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09097]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteNvRamAllocation
BSW 参数 RteSwNvBlockDescriptorRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the NvBlockDescriptor in case the RTE needs to call the NvM directly (e.g. for the supportDirtyFlag feature, storeCyclic feature, server invocation for NV data management or mode switch based invocation NvM services).
模板描述 Specifies the properties of exactly on NVRAM Block.
M2 参数 SWComponentTemplate::NvBlockComponent:: NvBlockDescriptor
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09132]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance/RteNvRamAllocation
BSW 参数 RteSwNvRamMappingRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the SwSeriveDependency which is used to specify the NvBlockNeeds.
模板描述 Specialization of ServiceDependency in the context of an SwcInternalBehavior. It allows to associate ports, port groups and (in special cases) data defined for an atomic software component to a given ServiceNeeds element.
M2 参数 SWComponentTemplate::SwcInternalBehavior::ServiceMapping:: SwcServiceDependency
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09044]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentInstance
BSW 参数 RteSoftwareComponentInstanceRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to a SwComponentPrototype.
模板描述 Role of a software component within a composition.
M2 参数 SWComponentTemplate::Composition:: SwComponentPrototype
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09004]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentType/RteComponentTypeCalibration
BSW 参数 RteCalibrationSwAddrMethodRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the SwAddrMethod for which software calibration support shall be enabled.
模板描述 Used to assign a common addressing method, e.g. common memory section, to data or code objects. These objects could actually live in different modules or components.
M2 参数 DataDictionary::AuxillaryObjects:: SwAddrMethod
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09038]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentType
BSW 参数 RteComponentTypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to either AtomicSwComponentType or ParameterSwComponentType.
模板描述 Base class for AUTOSAR software components.
M2 参数 SWComponentTemplate::Components:: SwComponentType
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09003]
属性 值
BSW 模块 Rte
BSW 上下文 Rte/RteSwComponentType
BSW 参数 RteImplementationRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 The Implementation which shall be assigned to the SwComponentType.
模板描述 This meta-class represents a specialization of the general Implementation meta-class with respect to the usage in application software.
M2 参数 SWComponentTemplate::SwcImplementation:: SwcImplementation
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_Rte_09028]

H.11. SecOC

属性 值
BSW 模块 SecOC
BSW 上下文 SecOC/SecOCRxPduProcessing/SecOCClientServerVerificationStatusPropagationMode
BSW 参数 BOTH
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Both "TRUE" and "FALSE" AuthenticationStatus is propagated to SW-C
模板描述 Verification attempts that came out "false" or "true" shall be forwarded to the application software.
M2 参数 CommonStructure::ServiceNeeds::VerificationStatusIndicationModeEnum. failureAndSuccess
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID —
属性 值
BSW 模块 SecOC
BSW 上下文 SecOC/SecOCRxPduProcessing/SecOCClientServerVerificationStatusPropagationMode
BSW 参数 FAILURE_ONLY
BSW 类型 ECUC-ENUMERATION-LITERAL-DEF
BSW 说明 Only "FALSE" Authentication Status is propagated to SW-C
模板描述 Only verification attempts that came out "false" shall be forwarded to the application software.
M2 参数 CommonStructure::ServiceNeeds::VerificationStatusIndicationModeEnum. failureOnly
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID —

H.12. SwCluC

属性 值
BSW 模块 SwCluC
BSW 上下文 SwCluC/SwCluCBManif/SwCluCBManifResourceType/SwCluCBManifNotifierHandle
BSW 参数 SwCluCBManifHandleImpleTypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ImplementationDataType of the handle. This type can be additionally configured to get a correct casting of the native handle type to the returned handel type.
模板描述 Abstract base class for all RTE-related events
M2 参数 SWComponentTemplate::SwcInternalBehavior::RTEEvents:: RTEEvent
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_SwCluC_- 00015]
属性 值
BSW 模块 SwCluC
BSW 上下文 SwCluC/SwCluCBManif/SwCluCBManifResourceType/SwCluCBManifProvideHandle
BSW 参数 SwCluCBManifHandleImpleTypeRef
BSW 类型 ECUC-FOREIGN-REFERENCE-DEF
BSW 说明 Reference to the ImplementationDataType of the handle. This type can be additionally configured to get a correct casting of the native handle type to the returned handel type.
模板描述 Abstract base class for all RTE-related events
M2 参数 SWComponentTemplate::SwcInternalBehavior::RTEEvents:: RTEEvent
映射规则 1:1 mapping
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_SwCluC_- 00015]

H.13. WdgM

属性 值
BSW 模块 WdgM
BSW 上下文 WdgM/WdgMConfigSet/WdgMMode/WdgMLocalStatusParams
BSW 参数 WdgMFailedAliveSupervisionRefCycleTol
BSW 类型 ECUC-INTEGER-PARAM-DEF
BSW 说明 This parameter shall contain the acceptable amount of reference cycles with incorrect/failed alive supervisions for this Supervised Entity.
模板描述 Number of consecutive failed alive cycles for this SupervisedEntity which shall be tolerated until the supervision status of the SupervisedEntity is set to WDGM_ALIVE_EXPIRED (see SWS WdgM for more details). Note that this value has to be recalculated with respect to the WdgM's own cycle time for ECU configuration.
M2 参数 CommonStructure::ServiceNeeds::SupervisedEntityNeeds. toleratedFailedCycles
映射规则 1:1
映射类型 full
映射状态 valid
ECUC 参数 ID [ECUC_WdgM_- 00327]

I. 本文档范围内的可拆分元素

本章包含本文档范围内构造型为 <atpSplitable> 的所有模型元素的表。

表中每个条目由特定模型元素自身的标识与标签值 atp.Splitkey 的适用值组成。

关于可拆分模型元素概念及其处理方式的更多信息请参阅 [11]。

| Name of splitable element | Splitkey |

| AbstractProvidedPortPrototype.providedComSpec | providedComSpec | | AbstractRequiredPortPrototype.requiredComSpec | requiredComSpec | | AdminData.sdg | sdg.sdgCaption.shortName | | ApplicationRecordDataType.element | element.shortName, element.variationPoint.short Label | | ApplicationRuleBasedValueSpecification.swValueCont | swValueCont | | ARPackage.arPackage | arPackage.shortName, arPackage.variation Point.shortLabel | | ARPackage.element | element.shortName, element.variationPoint.short Label | | ARPackage.referenceBase | referenceBase.shortLabel | | ArrayValueSpecification.element | element, element.variationPoint.shortLabel | | AtomicSwComponentType.internalBehavior | internalBehavior.shortName, internal Behavior.variationPoint.shortLabel | | AtomicSwComponentType.symbolProps | symbolProps.shortName | | AutosarDataType.swDataDefProps | swDataDefProps | | BulkNvDataDescriptor.nvBlockDataMapping | nvBlockDataMapping, nvBlockData Mapping.variationPoint.shortLabel | | CalibrationParameterValueSet.calibrationParameterValue | calibrationParameterValue, calibrationParameter Value.variationPoint.shortLabel | | ClientServerInterface.operation | operation.shortName, operation.variationPoint.short Label | | ClientServerInterfaceMapping.operationMapping | operationMapping | | ClientServerOperation.argument | argument.shortName, argument.variationPoint.short Label | | ClientServerOperationMapping.argumentMapping | argumentMapping | | CompositeNetworkRepresentation.networkRepresentation | networkRepresentation | | CompositionSwComponentType.component | component.shortName, component.variation Point.shortLabel | | CompositionSwComponentType.connector | connector.shortName, connector.variationPoint.short Label | | CompositionSwComponentType.constantValueMapping | constantValueMapping | | CompositionSwComponentType.dataTypeMapping | dataTypeMapping | | CompositionSwComponentType.instantiationRTEEventProps | instantiationRTEEventProps.shortLabel, instantiationRTEEventProps.variationPoint.short Label | | Compu.compuContent | compuContent | | CompuMethod.compuInternalToPhys | compuInternalToPhys | | CompuMethod.compuPhysToInternal | compuPhysToInternal | | CompuScales.compuScale | compuScale, compuScale.variationPoint.shortLabel |

glyph[triangle]

| Name of splitable element | Splitkey |

| ConsistencyNeeds.dpgDoesNotRequireCoherency | dpgDoesNotRequireCoherency.shortName, dpg DoesNotRequireCoherency.variationPoint.short Label | | ConsistencyNeeds.dpgRequiresCoherency | dpgRequiresCoherency.shortName, dpgRequires Coherency.variationPoint.shortLabel | | ConsistencyNeeds.regDoesNotRequireStability | regDoesNotRequireStability.shortName, regDoes NotRequireStability.variationPoint.shortLabel | | ConsistencyNeeds.regRequiresStability | regRequiresStability.shortName, regRequires Stability.variationPoint.shortLabel | | ConstantSpecification.valueSpec | valueSpec | | DataPrototype.swDataDefProps | swDataDefProps | | DataPrototypeGroup.dataPrototypeGroup | dataPrototypeGroup.contextSwComponent Prototype, dataPrototypeGroup.targetDataPrototype Group, dataPrototypeGroup.variationPoint.short Label | | DataPrototypeGroup.implicitDataAccess | implicitDataAccess.contextSwComponentPrototype, implicitDataAccess.contextPortPrototype, implicit DataAccess.targetVariableDataPrototype, implicit DataAccess.variationPoint.shortLabel | | DataPrototypeMapping.subElementMapping | subElementMapping | | Describable.adminData | adminData | | EndToEndProtection.endToEndProfile | endToEndProfile | | EndToEndProtection.endToEndProtectionISignalIPdu | endToEndProtectionISignalIPdu, endToEnd ProtectionISignalIPdu.variationPoint.shortLabel | | EndToEndProtection.endToEndProtectionVariablePrototype | endToEndProtectionVariablePrototype.shortLabel, endToEndProtectionVariablePrototype.variation Point.shortLabel | | EndToEndProtectionSet.endToEndProtection | endToEndProtection.shortName, endToEnd Protection.variationPoint.shortLabel | | ErrorTracerNeeds.tracedFailure | tracedFailure.shortName, tracedFailure.variation Point.shortLabel | | ExecutableEntity.canEnter | canEnter.exclusiveArea, canEnter.variation Point.shortLabel | | ExecutableEntity.runsInside | runsInside.exclusiveArea, runsInside.variation Point.shortLabel | | Identifiable.adminData | adminData | | Implementation.buildActionManifest | buildActionManifest.buildActionManifest, buildAction Manifest.variationPoint.shortLabel | | Implementation.generatedArtifact | generatedArtifact.shortName, generated Artifact.variationPoint.shortLabel | | Implementation.mcSupport | mcSupport | | Implementation.requiredArtifact | requiredArtifact.shortName, required Artifact.variationPoint.shortLabel | | Implementation.requiredGeneratorTool | requiredGeneratorTool.shortName, required GeneratorTool.variationPoint.shortLabel | | Implementation.resourceConsumption | resourceConsumption.shortName | | ImplementationDataType.subElement | subElement.shortName, subElement.variation Point.shortLabel | | ImplementationDataType.symbolProps | symbolProps.shortName | | ImplementationDataTypeElement.subElement | subElement.shortName, subElement.variation Point.shortLabel | | ImplementationDataTypeElement.swDataDefProps | swDataDefProps | | InstantiationDataDefProps.swDataDefProps | swDataDefProps |

glyph[triangle]

| Name of splitable element | Splitkey |

| InternalBehavior.constantMemory | constantMemory.shortName, constant Memory.variationPoint.shortLabel | | InternalBehavior.constantValueMapping | constantValueMapping | | InternalBehavior.dataTypeMapping | dataTypeMapping | | InternalBehavior.exclusiveArea | exclusiveArea.shortName, exclusiveArea.variation Point.shortLabel | | InternalBehavior.exclusiveAreaNestingOrder | exclusiveAreaNestingOrder.shortName, exclusive AreaNestingOrder.variationPoint.shortLabel | | InternalBehavior.staticMemory | staticMemory.shortName, staticMemory.variation Point.shortLabel | | ModeDeclarationGroup.modeDeclaration | modeDeclaration.shortName, mode Declaration.variationPoint.shortLabel | | NvBlockDescriptor.clientServerPort | clientServerPort, clientServerPort.variation Point.shortLabel | | NvBlockDescriptor.constantValueMapping | constantValueMapping | | NvBlockDescriptor.dataTypeMapping | dataTypeMapping | | NvBlockDescriptor.instantiationDataDefProps | instantiationDataDefProps, instantiationDataDef Props.variationPoint.shortLabel | | NvBlockDescriptor.modeSwitchEventTriggeredActivity | modeSwitchEventTriggeredActivity, modeSwitch EventTriggeredActivity.variationPoint.shortLabel | | NvBlockDescriptor.nvBlockDataMapping | nvBlockDataMapping, nvBlockData Mapping.variationPoint.shortLabel | | NvBlockSwComponentType.bulkNvDataDescriptor | bulkNvDataDescriptor.shortName, bulkNvData Descriptor.variationPoint.shortLabel | | NvBlockSwComponentType.nvBlockDescriptor | nvBlockDescriptor.shortName, nvBlock Descriptor.variationPoint.shortLabel | | ParameterAccess.swDataDefProps | swDataDefProps | | ParameterSwComponentType.constantMapping | constantMapping | | ParameterSwComponentType.dataTypeMapping | dataTypeMapping | | ParameterSwComponentType.instantiationDataDefProps | instantiationDataDefProps, instantiationDataDef Props.variationPoint.shortLabel | | PerInstanceMemory.swDataDefProps | swDataDefProps | | PortGroup.outerPort | outerPort.portPrototype, outerPort.variation Point.shortLabel | | PortInterfaceMappingSet.portInterfaceMapping | portInterfaceMapping.shortName, portInterface Mapping.variationPoint.shortLabel | | RapidPrototypingScenario.rptContainer | rptContainer.shortName, rptContainer.variation Point.shortLabel | | RapidPrototypingScenario.rptProfile | rptProfile.shortName | | RapidPrototypingScenario.rptSystem | rptSystem | | ReceiverComSpec.compositeNetworkRepresentation | compositeNetworkRepresentation | | ReceiverComSpec.networkRepresentation | networkRepresentation | | RecordValueSpecification.field | field, field.variationPoint.shortLabel | | RptContainer.byPassPoint | byPassPoint.contextElement, byPassPoint.target, by PassPoint.variationPoint.shortLabel | | RptContainer.explicitRptProfileSelection | explicitRptProfileSelection | | RptContainer.rptContainer | rptContainer.shortName, rptContainer.variation Point.shortLabel | | RptContainer.rptHook | rptHook, rptHook.variationPoint.shortLabel |

glyph[triangle]

| Name of splitable element | Splitkey |

| RTEEvent.disabledMode | disabledMode.contextPort, disabledMode.context ModeDeclarationGroupPrototype, disabled Mode.targetModeDeclaration | | RuleArguments.vtf | vtf, vtf.variationPoint.shortLabel | | RuleBasedValueCont.ruleBasedValues | ruleBasedValues | | RuleBasedValueSpecification.arguments | arguments, arguments.variationPoint.shortLabel | | RunnableEntity.asynchronousServerCallResultPoint | asynchronousServerCallResultPoint.shortName, asynchronousServerCallResultPoint.variation Point.shortLabel | | RunnableEntity.dataReadAccess | dataReadAccess.shortName, dataRead Access.variationPoint.shortLabel | | RunnableEntity.dataReceivePointByArgument | dataReceivePointByArgument.shortName, data ReceivePointByArgument.variationPoint.shortLabel | | RunnableEntity.dataReceivePointByValue | dataReceivePointByValue.shortName, dataReceive PointByValue.variationPoint.shortLabel | | RunnableEntity.dataSendPoint | dataSendPoint.shortName, dataSendPoint.variation Point.shortLabel | | RunnableEntity.dataWriteAccess | dataWriteAccess.shortName, dataWrite Access.variationPoint.shortLabel | | RunnableEntity.externalTriggeringPoint | externalTriggeringPoint.ident.shortName, external TriggeringPoint.variationPoint.shortLabel | | RunnableEntity.internalTriggeringPoint | internalTriggeringPoint.shortName, internal TriggeringPoint.variationPoint.shortLabel | | RunnableEntity.modeAccessPoint | modeAccessPoint.ident.shortName, modeAccess Point.variationPoint.shortLabel | | RunnableEntity.modeSwitchPoint | modeSwitchPoint.shortName, modeSwitch Point.variationPoint.shortLabel | | RunnableEntity.parameterAccess | parameterAccess.shortName, parameter Access.variationPoint.shortLabel | | RunnableEntity.readLocalVariable | readLocalVariable.shortName, readLocal Variable.variationPoint.shortLabel | | RunnableEntity.serverCallPoint | serverCallPoint.shortName, serverCallPoint.variation Point.shortLabel | | RunnableEntity.writtenLocalVariable | writtenLocalVariable.shortName, writtenLocal Variable.variationPoint.shortLabel | | RunnableEntityGroup.runnableEntity | runnableEntity.contextSwComponentPrototype, runnableEntity.targetRunnableEntity, runnable Entity.variationPoint.shortLabel | | RunnableEntityGroup.runnableEntityGroup | runnableEntityGroup.contextSwComponent Prototype, runnableEntityGroup.targetRunnable EntityGroup, runnableEntityGroup.variation Point.shortLabel | | SenderComSpec.compositeNetworkRepresentation | compositeNetworkRepresentation | | SenderComSpec.networkRepresentation | networkRepresentation | | ServiceDependency.assignedDataType | assignedDataType, assignedDataType.variation Point.shortLabel | | SignalServiceTranslationProps.controlPnc | controlPnc | | SubElementMapping.firstElement | firstElement, firstElement.variationPoint.shortLabel | | SubElementMapping.secondElement | secondElement, secondElement.variationPoint.short Label | | SupervisedEntityNeeds.checkpoints | checkpoints.supervisedEntityCheckpointNeeds, checkpoints.variationPoint.shortLabel | | SwcBswMapping.runnableMapping | runnableMapping, runnableMapping.variation Point.shortLabel |

| Name of splitable element | Splitkey |

| SwcBswMapping.synchronizedModeGroup | synchronizedModeGroup, synchronizedMode Group.variationPoint.shortLabel | | SwcBswMapping.synchronizedTrigger | synchronizedTrigger, synchronizedTrigger.variation Point.shortLabel | | SwcImplementation.perInstanceMemorySize | perInstanceMemorySize, perInstanceMemory Size.variationPoint.shortLabel | | SwcInternalBehavior.arTypedPerInstanceMemory | arTypedPerInstanceMemory.shortName, arTypedPer InstanceMemory.variationPoint.shortLabel | | SwcInternalBehavior.event | event.shortName, event.variationPoint.shortLabel | | SwcInternalBehavior.exclusiveAreaPolicy | exclusiveAreaPolicy, exclusiveAreaPolicy.variation Point.shortLabel | | SwcInternalBehavior.explicitInterRunnableVariable | explicitInterRunnableVariable.shortName, explicit InterRunnableVariable.variationPoint.shortLabel | | SwcInternalBehavior.implicitInterRunnableVariable | implicitInterRunnableVariable.shortName, implicit InterRunnableVariable.variationPoint.shortLabel | | SwcInternalBehavior.includedDataTypeSet | includedDataTypeSet | | SwcInternalBehavior.includedModeDeclarationGroupSet | includedModeDeclarationGroupSet | | SwcInternalBehavior.instantiationDataDefProps | instantiationDataDefProps, instantiationDataDef Props.variationPoint.shortLabel | | SwcInternalBehavior.perInstanceMemory | perInstanceMemory.shortName, perInstance Memory.variationPoint.shortLabel | | SwcInternalBehavior.perInstanceParameter | perInstanceParameter.shortName, perInstance Parameter.variationPoint.shortLabel | | SwcInternalBehavior.portAPIOption | portAPIOption, portAPIOption.variationPoint.short Label | | SwcInternalBehavior.runnable | runnable.shortName, runnable.variationPoint.short Label | | SwcInternalBehavior.serviceDependency | serviceDependency.shortName, service Dependency.variationPoint.shortLabel | | SwcInternalBehavior.sharedParameter | sharedParameter.shortName, shared Parameter.variationPoint.shortLabel | | SwcInternalBehavior.variationPointProxy | variationPointProxy.shortName | | SwComponentDocumentation.chapter | chapter.shortName, chapter.variationPoint.short Label | | SwComponentType.consistencyNeeds | consistencyNeeds.shortName, consistency Needs.variationPoint.shortLabel | | SwComponentType.port | port.shortName, port.variationPoint.shortLabel | | SwComponentType.portGroup | portGroup.shortName, portGroup.variation Point.shortLabel | | SwComponentType.swComponentDocumentation | swComponentDocumentation, swComponent Documentation.variationPoint.shortLabel | | SwcServiceDependency.assignedData | assignedData, assignedData.variationPoint.short Label | | SwcServiceDependency.assignedPort | assignedPort, assignedPort.variationPoint.short Label | | SwDataDefProps.swPointerTargetProps | | | SwPointerTargetProps.swDataDefProps | swDataDefProps | | SwServiceArg.swDataDefProps | swDataDefProps | | SwSystemconst.swDataDefProps | swDataDefProps | | SwValues.vtf | vtf, vtf.variationPoint.shortLabel | | VariableAndParameterInterfaceMapping.dataMapping | dataMapping |

J. 本文档范围内的变体点

本章包含本文档范围内构造型为 <atpVariation> 的所有模型元素的表。

表中每个条目由模型元素自身的标识与标签值 vh.latestBindingTime 的适用值组成。

关于变体点概念以及包含变体点的模型元素处理方式的更多信息请参阅 [11]。

| Variation Point | Latest Binding Time |

| ApplicationArrayElement.maxNumberOfElements | preCompileTime | | ApplicationRecordDataType.element | preCompileTime | | ARPackage.arPackage | blueprintDerivationTime | | ARPackage.element | systemDesignTime | | ArrayValueSpecification.element | preCompileTime | | AtomicSwComponentType.internalBehavior | preCompileTime | | BulkNvDataDescriptor.nvBlockDataMapping | preCompileTime | | CalibrationParameterValueSet.calibrationParameterValue | preCompileTime | | ClientServerInterface.operation | blueprintDerivationTime | | ClientServerOperation.argument | blueprintDerivationTime | | CompositionSwComponentType.component | postBuild | | CompositionSwComponentType.connector | postBuild | | CompositionSwComponentType.instantiationRTEEventProps | codeGenerationTime | | CompuConstFormulaContent.vf | codeGenerationTime | | CompuNominatorDenominator.v | preCompileTime | | CompuScale.lowerLimit | preCompileTime | | CompuScale.upperLimit | preCompileTime | | CompuScales.compuScale | blueprintDerivationTime | | ConsistencyNeeds.dpgDoesNotRequireCoherency | preCompileTime | | ConsistencyNeeds.dpgRequiresCoherency | preCompileTime | | ConsistencyNeeds.regDoesNotRequireStability | preCompileTime | | ConsistencyNeeds.regRequiresStability | preCompileTime | | DataPrototypeGroup.dataPrototypeGroup | preCompileTime | | DataPrototypeGroup.implicitDataAccess | preCompileTime | | DiagEventDebounceCounterBased.counterDecrementStepSize | preCompileTime | | DiagEventDebounceCounterBased.counterFailedThreshold | preCompileTime | | DiagEventDebounceCounterBased.counterIncrementStepSize | preCompileTime | | DiagEventDebounceCounterBased.counterJumpDown | preCompileTime | | DiagEventDebounceCounterBased.counterJumpDownValue | preCompileTime | | DiagEventDebounceCounterBased.counterJumpUp | preCompileTime | | DiagEventDebounceCounterBased.counterJumpUpValue | preCompileTime | | DiagEventDebounceCounterBased.counterPassedThreshold | preCompileTime | | DiagEventDebounceTimeBased.timeBasedFdcThresholdStorageValue | preCompileTime | | DiagEventDebounceTimeBased.timeFailedThreshold | preCompileTime | | DiagEventDebounceTimeBased.timePassedThreshold | preCompileTime |

glyph[triangle]

| Variation Point | Latest Binding Time |

| EndToEndProtection.endToEndProtectionISignalIPdu | preCompileTime | | EndToEndProtection.endToEndProtectionVariablePrototype | preCompileTime | | EndToEndProtectionSet.endToEndProtection | preCompileTime | | ErrorTracerNeeds.tracedFailure | preCompileTime | | ExecutableEntity.canEnter | preCompileTime | | ExecutableEntity.runsInside | preCompileTime | | Implementation.buildActionManifest | codeGenerationTime | | Implementation.generatedArtifact | preCompileTime | | Implementation.requiredArtifact | preCompileTime | | Implementation.requiredGeneratorTool | preCompileTime | | ImplementationDataType.subElement | preCompileTime | | ImplementationDataTypeElement.arraySize | preCompileTime | | ImplementationDataTypeElement.subElement | preCompileTime | | InternalBehavior.constantMemory | preCompileTime | | InternalBehavior.exclusiveArea | preCompileTime | | InternalBehavior.exclusiveAreaNestingOrder | preCompileTime | | InternalBehavior.staticMemory | preCompileTime | | InternalConstrs.lowerLimit | preCompileTime | | InternalConstrs.upperLimit | preCompileTime | | ModeDeclarationGroup.modeDeclaration | blueprintDerivationTime | | NumericalOrText.vf | preCompileTime | | NumericalValueSpecification.value | preCompileTime | | NvBlockDescriptor.clientServerPort | preCompileTime | | NvBlockDescriptor.instantiationDataDefProps | preCompileTime | | NvBlockDescriptor.modeSwitchEventTriggeredActivity | preCompileTime | | NvBlockDescriptor.nvBlockDataMapping | preCompileTime | | NvBlockSwComponentType.bulkNvDataDescriptor | preCompileTime | | NvBlockSwComponentType.nvBlockDescriptor | preCompileTime | | ParameterSwComponentType.instantiationDataDefProps | preCompileTime | | PerInstanceMemorySize.size | preCompileTime | | PhysConstrs.lowerLimit | preCompileTime | | PhysConstrs.upperLimit | preCompileTime | | PortGroup.outerPort | preCompileTime | | PortInterface.isService | blueprintDerivationTime | | PortInterfaceMappingSet.portInterfaceMapping | blueprintDerivationTime | | RapidPrototypingScenario.rptContainer | preCompileTime | | ReceiverComSpec.maxDeltaCounterInit | preCompileTime | | ReceiverComSpec.usesEndToEndProtection | preCompileTime | | RecordValueSpecification.field | preCompileTime | | RptContainer.byPassPoint | preCompileTime | | RptContainer.rptContainer | preCompileTime | | RptContainer.rptHook | preCompileTime | | RuleArguments.vf | preCompileTime | | RuleArguments.vtf | preCompileTime | | RuleBasedValueSpecification.arguments | preCompileTime |

glyph[triangle]

| Variation Point | Latest Binding Time |

| RunnableEntity.asynchronousServerCallResultPoint | preCompileTime | | RunnableEntity.dataReadAccess | preCompileTime | | RunnableEntity.dataReceivePointByArgument | preCompileTime | | RunnableEntity.dataReceivePointByValue | preCompileTime | | RunnableEntity.dataSendPoint | preCompileTime | | RunnableEntity.dataWriteAccess | preCompileTime | | RunnableEntity.externalTriggeringPoint | preCompileTime | | RunnableEntity.internalTriggeringPoint | preCompileTime | | RunnableEntity.modeAccessPoint | preCompileTime | | RunnableEntity.modeSwitchPoint | preCompileTime | | RunnableEntity.parameterAccess | preCompileTime | | RunnableEntity.readLocalVariable | preCompileTime | | RunnableEntity.serverCallPoint | preCompileTime | | RunnableEntity.writtenLocalVariable | preCompileTime | | RunnableEntityGroup.runnableEntity | preCompileTime | | RunnableEntityGroup.runnableEntityGroup | preCompileTime | | ScaleConstr.lowerLimit | preCompileTime | | ScaleConstr.upperLimit | preCompileTime | | SenderComSpec.usesEndToEndProtection | preCompileTime | | ServiceDependency.assignedDataType | preCompileTime | | SubElementMapping.firstElement | preCompileTime | | SubElementMapping.secondElement | preCompileTime | | SupervisedEntityNeeds.checkpoints | preCompileTime | | SwAxisIndividual.swMaxAxisPoints | preCompileTime | | SwAxisIndividual.swMinAxisPoints | preCompileTime | | SwcBswMapping.runnableMapping | preCompileTime | | SwcBswMapping.synchronizedModeGroup | preCompileTime | | SwcBswMapping.synchronizedTrigger | preCompileTime | | SwcImplementation.perInstanceMemorySize | preCompileTime | | SwcInternalBehavior.arTypedPerInstanceMemory | preCompileTime | | SwcInternalBehavior.event | preCompileTime | | SwcInternalBehavior.exclusiveAreaPolicy | preCompileTime | | SwcInternalBehavior.explicitInterRunnableVariable | preCompileTime | | SwcInternalBehavior.implicitInterRunnableVariable | preCompileTime | | SwcInternalBehavior.instantiationDataDefProps | preCompileTime | | SwcInternalBehavior.perInstanceMemory | preCompileTime | | SwcInternalBehavior.perInstanceParameter | preCompileTime | | SwcInternalBehavior.portAPIOption | preCompileTime | | SwcInternalBehavior.runnable | preCompileTime | | SwcInternalBehavior.serviceDependency | preCompileTime | | SwcInternalBehavior.sharedParameter | preCompileTime | | SwComponentDocumentation.chapter | postBuild | | SwComponentType.consistencyNeeds | preCompileTime | | SwComponentType.port | preCompileTime | | SwComponentType.portGroup | preCompileTime |

| Variation Point | Latest Binding Time |

| SwComponentType.swComponentDocumentation | preCompileTime | | SwcServiceDependency.assignedData | preCompileTime | | SwcServiceDependency.assignedPort | preCompileTime | | SwDataDefProps | codeGenerationTime | | SwDataDefProps.swValueBlockSize | preCompileTime | | SwDataDefProps.swValueBlockSizeMult | preCompileTime | | SwGenericAxisParam.vf | preCompileTime | | SwTextProps.swMaxTextSize | preCompileTime | | SwValues.vf | preCompileTime | | SwValues.vtf | preCompileTime | | TextTableMapping.bitfieldTextTableMaskFirst | preCompileTime | | TextTableMapping.bitfieldTextTableMaskSecond | preCompileTime | | TextTableValuePair.firstValue | preCompileTime | | TextTableValuePair.secondValue | preCompileTime | | ValueList.vf | preCompileTime |