# 软件组件模板 (Software Component Template) > AUTOSAR CP Release 4.4.0 | 项目 | 内容 | |---|---| | **文档标题 (Document Title)** | Software Component Template | | **文档所有者 (Document Owner)** | AUTOSAR | | **文档责任方 (Document Responsibility)** | AUTOSAR | | **文档标识号 (Document Identification No)** | 062 | | **文档状态 (Document Status)** | Final | | **所属 AUTOSAR 标准 (Part of AUTOSAR Standard)** | Classic Platform | | **所属标准版本 (Part of Standard Release)** | 4.4.0 | ## 文档变更历史 (Document Change History) | 日期 | 版本 | 修改者 | 描述 | |---|---|---|---| | 2018-10-31 | 4.4.0 | AUTOSAR Release Management | • Support for optional elements in structured data types
• Improved description of service use cases
• minor corrections / clarifications / editorial changes | | 2017-12-08 | 4.3.1 | AUTOSAR Release Management | • minor corrections / clarifications / editorial changes | | 2016-11-30 | 4.3.0 | AUTOSAR Release Management | • Improved support for Unions
• Improved upstream mapping
• Improved description of service use cases
• Minor corrections / clarifications / editorial changes | | 2015-07-31 | 4.2.2 | AUTOSAR Release Management | • Minor corrections / clarifications / editorial changes | | 2014-10-31 | 4.2.1 | AUTOSAR Release Management | • Efficient NV data handling
• Introduction of data transformation
• Support for variable-size Arrays of arbitrary data types
• Support for ASIL/QM development
• Minor corrections / clarifications / editorial changes | | 2014-03-31 | 4.1.3 | AUTOSAR Release Management | • Various fixes and clarifications | | 2013-10-31 | 4.1.2 | AUTOSAR Release Management | • Various fixes and clarifications | | 2013-03-15 | 4.1.1 | AUTOSAR Administration | • Introduction of PRPortPrototype
• Definition of implicit communication behavior
• Support for the formal analysis of resource locking
• Introduction of refined scheduling of RunnableEntitys
• Get information about activating RTEEvent
• Connection of Mode Managers and Mode Users with different number of ModeDeclarations
• Support activation of RunnableEntitys on remote ECUs
• Support for ModeTransition
• Support for the definition of the network representation of composite data types
• ServiceNeeds for diagnostics over IP
• Various fixes and clarifications | | 2011-12-22 | 4.0.3 | AUTOSAR Administration | • Added CompuMethod categories SCALE_LINEAR_AND_TEXTTABLE and SCALE_RATIONAL_AND_TEXTTABLE
• Clarification concerning the usage of invalid values
• Revised support for data filters
• Support for partial networking
• Support for the specification of local connections between software-components
• Improved description of service needs
• Change history of constraints and specification items
• Miscellaneous improvements and clarifications
• "Support for Standardization" moved to Standardization Template
• Remove restriction on data type of inter-runnable variables
• Rework end-to-end communication protection
• Add more constraints on the usage of the meta-model
• Various fixes and clarifications | | 2011-04-15 | 4.0.2 | AUTOSAR Administration | • New requirements tracing table
• Support for fixed data exchange
• Implementation of meta-model cleanup
• Fundamental revision of the data type concept
• Support for variant handling
• Support for end-to-end communication protection
• Support for documentation
• Support for stopping and restarting of software-components
• Support for triggered events
• Support for explicit mapping of interface elements
• Revised concept of mode management
• Support for integrity and scaling at ports
• Support for standardization within AUTOSAR | | 2009-12-18 | 4.0.1 | AUTOSAR Administration | • Improved support for on-board diagnostics
• Small layout adaptations made
• Improved support for measurement and calibration
• Improved semantics of delegation ports | | 2008-08-13 | 3.1.1 | AUTOSAR Administration | • Improved support for measurement and calibration
• Improved semantics of delegation ports | | 2007-12-21 | 3.0.1 | AUTOSAR Administration | • Introduction of abstract memory classes
• Document meta information extended
• Small layout adaptations made | | 2007-01-24 | 2.1.15 | AUTOSAR Administration | • Harmonization of the document with other specifications (e.g. RTE)
• Introduction of a new concept to support calibration and measurement - harmonized with RTE
• Description of needs of the Software Component Template toward AUTOSAR services and of the interaction of the Software Component Template and services (on XML level)
• Legal disclaimer revised
• Release notes added
• "Advice for users" added
• "Revision information" added | | 2006-05-16 | 2.0.0 | AUTOSAR Administration | • Second | | 2005-05-31 | 1.0.0 | AUTOSAR Administration | • Initial release | > **注**:原文中的版权声明(Disclaimer)按规范要求**不翻译**,保留原文。 --- ## 目录 (Table of Contents) - [1 介绍 (Introduction)](#1-介绍-introduction) - [1.1 概览 (Overview)](#11-概览-overview) - [1.2 范围 (Scope)](#12-范围-scope) - [1.3 元模型组织 (Organization of the Meta-Model)](#13-元模型组织-organization-of-the-meta-model) - [1.4 模板结构 (Structure of the Template)](#14-模板结构-structure-of-the-template) - [1.5 缩写 (Abbreviations)](#15-缩写-abbreviations) - [1.6 文档约定 (Document Conventions)](#16-文档约定-document-conventions) - [1.7 需求追踪 (Requirements Tracing)](#17-需求追踪-requirements-tracing) - [2 概念性方面 (Conceptual Aspects)](#2-概念性方面-conceptual-aspects) - [2.1 介绍 (Introduction)](#21-介绍-introduction) - [2.2 测量与标定 (Measurement and Calibration)](#22-测量与标定-measurement-and-calibration) - [2.3 运行时与数据一致性方面 (Runtime and Data Consistency Aspects)](#23-运行时与数据一致性方面-runtime-and-data-consistency-aspects) - [2.4 软件组件模板中的变体处理 (Variant Handling in the Software Component Template)](#24-软件组件模板中的变体处理) - [2.5 组合组件类型的通信规范 (Communication Specification of Composition Component Types)](#25-组合组件类型的通信规范) - [2.6 PRPortPrototype](#26-prportprototype) - [2.7 伪联网 (Pretended Networking)](#27-伪联网-pretended-networking) - [2.8 可变大小数组数据类型 (Variable-size Array Data Types)](#28-可变大小数组数据类型-variable-size-array-data-types) - [2.9 结构中的可选元素 (Optional Elements in Structures)](#29-结构中的可选元素-optional-elements-in-structures) - [3 概览:软件组件、端口与接口 (Overview: Software Components, Ports, and Interfaces)](#3-概览软件组件端口与接口-overview-software-components-ports-and-interfaces) - [4 详细:软件组件、端口与接口 (Details: Software Components, Ports, and Interfaces)](#4-详细软件组件端口与接口-details-software-components-ports-and-interfaces) - [5 数据描述 (Data Description)](#5-数据描述-data-description) - [6 兼容性 (Compatibility)](#6-兼容性-compatibility) - [7 内部行为 (Internal Behavior)](#7-内部行为-internal-behavior) - [8 实现 (Implementation)](#8-实现-implementation) - [9 模式管理 (Mode Management)](#9-模式管理-mode-management) - [10 ECU 抽象与复杂驱动 (ECU Abstraction and Complex Drivers)](#10-ecu-抽象与复杂驱动-ecu-abstraction-and-complex-drivers) - [11 服务 (Services)](#11-服务-services) - [12 软件组件文档 (Software Component Documentation)](#12-软件组件文档-software-component-documentation) - [13 服务依赖与服务用例 (Service Dependencies and Service Use Cases)](#13-服务依赖与服务用例-service-dependencies-and-service-use-cases) - [14 快速原型场景 (Rapid Prototyping Scenarios)](#14-快速原型场景-rapid-prototyping-scenarios) - [A 词汇表 (Glossary)](#a-词汇表-glossary) - [B 支持的特殊用例 (Supported Special Use Cases)](#b-支持的特殊用例-supported-special-use-cases) - [C 约束与规范项历史 (History of Constraints and Specification Items)](#c-约束与规范项历史) - [D InstanceRef 建模 (Modeling of InstanceRef)](#d-instanceref-建模-modeling-of-instanceref) - [E 示例 (Examples)](#e-示例-examples) - [F 引用的类表 (Mentioned Class Tables)](#f-引用的类表-mentioned-class-tables) - [G 上游映射 (Upstream Mapping)](#g-上游映射-upstream-mapping) - [H 可拆分元素 (Splitable Elements)](#h-可拆分元素-splitable-elements) - [I 变体点 (Variation Points)](#i-变体点-variation-points) --- ## 1 介绍 (Introduction) ### 1.1 概览 (Overview) 本文档包含 **AUTOSAR 软件组件模板 (Software-Component Template)** 的规范说明。实际上,它是作为 AUTOSAR 元模型对软件组件模板形式化定义的补充而创建的。换言之,除了形式化规范之外,本文档还对 AUTOSAR 元模型中与软件组件定义相关的部分提供了介绍性描述和基本原理。 在此上下文中,术语"软件组件 (software-component)" 指的是需要 AUTOSAR RTE [2] 来执行的、形式化描述的软件片段。 请注意,应用程序软件组件语义背后的总体思路已在 **虚拟功能总线 (Virtual Functional Bus)** [3] 规范中描述。然而,后者代表的概念性工作强烈影响但不全面控制软件组件的形式化定义。 进一步注意,本文档不提供软件组件建模的任何"最佳实践"建议,也不要求或强制执行特定的方法论。请注意,方法论方面由 AUTOSAR 方法论 [4] 的规范涵盖。 尽管使用合适的 AUTOSAR 创作工具来处理 AUTOSAR 软件组件毫无疑问是合理的,但本规范不对工具做出任何假设,也不提供有关工具的建议。 ### 1.2 范围 (Scope) 如第 1.1 章所述,本文档的范围是 **AUTOSAR 软件组件的描述**。本文档涵盖以下三个方面: - 使用 `PortPrototype` 和 `PortInterface` 对 `SwComponentType` 的一般描述,即本文档将 `SwComponentType` 定义为一种实体,可以通过提供或需要 `PortInterface` 的 `PortPrototype` 来描述。 - 对 **组合软件组件类型 (CompositionSwComponentTypes)** 的描述,它们由连接的**软件组件实例**组成的子系统,即软件组件可以以层次化子系统的形式定义,而层次化子系统又由软件组件组成。此类层次化结构的描述在本文档的范围内。 - 对 **原子软件组件类型 (AtomicSwComponentType)** 的描述,它被实现为可以映射到 AUTOSAR ECU 的一段软件。 `AtomicSwComponentType` 因此显示在图 1.1 所示的 ECU 软件架构中。在该图中,绿色(垂直条纹)和蓝色(对角条纹)边框显示了**由软件组件模板描述的方面**。 > **图 1.1**:本文档在 ECU SW 架构 [5] 中的范围 与 RTE 无关的 AUTOSAR **基础软件 (BSW)** 的方面不在范围内;这些由 **基础软件模块描述模板** [6] 涵盖。 此外,本文档不涵盖关于 AUTOSAR 软件组件执行的**时序分析**方面。此问题在**时序扩展规范** [7] 以及相应的需求规范 [8] 中解释。 ### 1.3 元模型组织 (Organization of the Meta-Model) 图 1.2 概述了元模型的整体结构,该结构正式定义了描述 AUTOSAR 软件组件所需的词汇表。如下图所示,其他模板规范(例如 **ECU 资源模板** [9] 和**系统模板** [10])也使用相同的建模方法来定义 AUTOSAR 软件描述的整体一致模型。 > **图 1.2**:元模型的结构 图中的虚线箭头描述了元模型内包之间的导入关系依赖关系。例如,包 `SWComponentTemplate` 导入在包 `GenericStructure` [11] 和 `ECUResourceTemplate` [9] 中定义的元类。 请注意,本规范文档将(有一些明确定义的例外)主要讨论在包 `SWComponentTemplate` 中定义的元模型元素。 **元模型中的主要包**: - `AutosarTopLevelStructure` — 顶层结构 - `CommonStructure` — 通用结构 - `SWComponentTemplate` — 软件组件模板 - `EcuResourceTemplate` — ECU 资源模板 - `AdaptivePlatform` — 自适应平台 - `SystemTemplate` — 系统模板 - `DiagnosticExtract` — 诊断提取 - `ECUCDescriptionTemplate` — ECUC 描述模板 - `ECUCParameterDefTemplate` — ECUC 参数定义模板 - `BswModuleTemplate` — BSW 模块模板 - `StandardizationTemplate` — 标准化模板 - `GenericStructure` — 通用结构 - `FeatureModelTemplate` — 特征模型模板 为澄清起见,请注意包 `GenericStructure` 包含一些基础架构元类和通用模式,这些在 [11] 中描述。由于这些被所有其他模板规范使用,为清楚起见,依赖关系关联未在图中描述。 ### 1.4 模板结构 (Structure of the Template) 本模板的描述在不同章节中提供,侧重于软件描述的不同方面: - **第 1.4.1 节** 描述了 VFB 级别的软件组件描述 - **第 1.4.2 节** 描述了 RTE 级别的软件组件描述 - **第 1.4.3 节** 描述了实现级别的软件组件描述 #### 1.4.1 VFB 级别上的软件组件描述 (Description of Software Components on VFB Level) VFB 级别上的软件组件描述侧重于组件的**接口和行为契约**,而无需考虑具体 ECU 的实现细节。 #### 1.4.2 RTE 级别上的软件组件描述 (Description of Software Components on RTE Level) RTE 级别上的描述考虑了**特定 ECU** 的运行时环境方面,包括 RTE 事件、调度等。 #### 1.4.3 实现级别上的软件组件描述 (Descriptions of Software Components on Implementation Level) 实现级别上的描述处理**实现细节**,包括代码生成、内存布局、任务映射等。 ### 1.5 缩写 (Abbreviations) | 缩写 | 全称 | 描述 | |---|---|---| | **AUTOSAR** | AUTomotive Open System ARchitecture | 汽车开放系统架构 | | **BSW** | Basic Software | 基础软件 | | **CDD** | Complex Device Driver | 复杂设备驱动 | | **COM** | Communication | 通信 | | **DCM** | Diagnostic Communication Manager | 诊断通信管理器 | | **DEM** | Diagnostic Event Manager | 诊断事件管理器 | | **DET** | Default Error Tracer | 默认错误跟踪器 | | **DID** | Data Identifier | 数据标识符 | | **Dlt** | Diagnostic Log and Trace | 诊断日志和跟踪 | | **DoIP** | Diagnostics over Internet Protocol | 基于 IP 的诊断 | | **DTC** | Diagnostic Trouble Code | 诊断故障码 | | **ECU** | Electronic Control Unit | 电子控制单元 | | **EcuM** | ECU State Manager | ECU 状态管理器 | | **FiM** | Function Inhibition Manager | 功能抑制管理器 | | **HW** | Hardware | 硬件 | | **IoHwAb** | I/O Hardware Abstraction | I/O 硬件抽象 | | **J1939** | SAE J1939 | SAE J1939 协议 | | **MBSM** | Mode Batch Sender/Receiver Mode | 模式批处理发送/接收模式 | | **McData** | Multicast Data | 多播数据 | | **NvM** | NVRAM Manager | 非易失性 RAM 管理器 | | **OS** | Operating System | 操作系统 | | **PduR** | PDU Router | PDU 路由器 | | **Pnc** | Partial Network Cluster | 部分网络集群 | | **RAM** | Random Access Memory | 随机访问存储器 | | **ROM** | Read-Only Memory | 只读存储器 | | **RTE** | Runtime Environment | 运行时环境 | | **RTE API** | RTE Application Programming Interface | RTE 应用程序接口 | | **SW-C** | Software Component | 软件组件 | | **UDS** | Unified Diagnostic Services | 统一诊断服务 | | **VFB** | Virtual Functional Bus | 虚拟功能总线 | | **WdgM** | Watchdog Manager | 看门狗管理器 | | **XML** | Extensible Markup Language | 可扩展标记语言 | ### 1.6 文档约定 (Document Conventions) 本规范中采用以下约定: - **等宽字体** 用于技术术语(例如 `PortPrototype`)。 - **UML 构造型** 用 `« »` 包围表示(例如 `«atpVariation»`)。 - **UML 标签** 用 `tag.name` 格式表示(例如 `atp.Splitkey`)。 - **需求标识符** 使用方括号包围的 ID 引用(例如 `[TPS_SWCT_00001]`)。 ### 1.7 需求追踪 (Requirements Tracing) > **完整需求追踪表见原文 PDF 第 34-43 页** 本文档的需求追踪表列出了本文档中定义的可追溯性项与其对应的需求([12] 中的 `RS_SWCT_*` 标识符)之间的关系。 **主要需求类别**: - `RS_SWCT_00001` - 软件组件建模的通用需求 - `RS_SWCT_00020` - 端口与接口 - `RS_SWCT_00030` - 内部行为 - `RS_SWCT_00040` - 模式管理 - `RS_SWCT_00050` - 测量与标定 - `RS_SWCT_00060` - 通信规范 - `RS_SWCT_00070` - 兼容性 - `RS_SWCT_00080` - 服务 - `RS_SWCT_00090` - 文档 - `RS_SWCT_00100` - 快速原型 --- ## 2 概念性方面 (Conceptual Aspects) ### 2.1 介绍 (Introduction) 本章描述了与软件组件模板相关的关键概念性方面。 ### 2.2 测量与标定 (Measurement and Calibration) 测量与标定(Measurement and Calibration,MC)是 AUTOSAR 软件组件的关键功能之一。它允许运行时访问**标定参数 (Calibration Parameters)** 和**测量数据 (Measurement Data)**。 #### 2.2.1 测量与标定的基本方法 (Basic Approach of Measurement and Calibration) **核心思想**: - 标定参数是软件组件使用的**可调整参数**(例如查找表、曲线) - 测量数据是软件组件**暴露给测量工具**的内部数据 - 测量和标定工具通过**标准接口**访问这些数据 **类表 2.1:MeasurementAndCalibrationSupport**(摘要) | 字段 | 值 | |---|---| | **Class** | `SwcImplementation` (in context) | | **Attribute** `supportsMultipleInstantiation** | 类型:`Boolean`,多重性:0..1 — 是否支持多实例化 | #### 2.2.2 标定参数概览 (Calibration Parameters Overview) **`CalibrationParameter`** 是带有**标定访问**的数据元素的专门类型。 #### 2.2.3 使用标定参数 (Using Calibration Parameters) ##### 2.2.3.1 在组合中共享标定参数 (Sharing Calibration Parameters within Compositions) 组合中的标定参数可以通过 `PerInstanceParameter` 在多个实例之间共享。 ##### 2.2.3.2 在相同 SwComponentType 的 SwComponentPrototypes 之间共享标定参数 通过 `SharedParameter` 在同一组件类型的不同实例之间共享。 ##### 2.2.3.3 提供实例特定特征数据 (Providing Instance Individual Characteristic Data) 每个实例可以有自己的特征数据。 ### 2.3 运行时与数据一致性方面 (Runtime and Data Consistency Aspects) #### 2.3.1 背景:问题 (Background: the Issues) 数据一致性问题是并发系统中的关键挑战。 ##### 2.3.1.1 使用信号量进行互斥 (Mutual Exclusion with Semaphores) **`ExclusiveArea`** 类定义了互斥区域。 ##### 2.3.1.2 中断禁用 (Interrupt Disabling) 中断禁用可作为互斥的替代方法。 ##### 2.3.1.3 优先级上限 (Priority Ceiling) 优先级上限协议避免优先级反转。 ##### 2.3.1.4 通过变量副本的隐式通信 隐式通信使用变量副本。 #### 2.3.2 运行时数据一致性 (Data Consistency at Runtime) RTE 提供数据一致性机制。 #### 2.3.3 数据一致性的建模方面 (Modeling Aspects of Data Consistency) 通过 `DataConsistency` 属性建模。 ### 2.4 软件组件模板中的变体处理 (Variant Handling in the Software Component Template) 变体处理在软件组件模板中的特殊应用。 ### 2.5 组合组件类型的通信规范 (Communication Specification of Composition Component Types) #### 2.5.1 基本原理 (Rationale) 组合组件类型的通信规范有特殊考虑。 ### 2.6 PRPortPrototype `PRPortPrototype`(Provider/Receiver Port Prototype)支持**可配置的提供/接收关系**。 #### 2.6.1 用例 1 (Use Case 1) 展示了 PRPortPrototype 的第一种用例。 #### 2.6.2 用例 2 (Use Case 2) 展示了 PRPortPrototype 的第二种用例。 #### 2.6.3 用例 3 (Use Case 3) 展示了 PRPortPrototype 的第三种用例。 #### 2.6.4 解决方案 (Solution) PRPortPrototype 提供了灵活的方式来建模 P/R 关系。 ### 2.7 伪联网 (Pretended Networking) 伪联网 (Pretended Networking) 是一种在网络不需要时被部分网络节点忽略的机制。 ### 2.8 可变大小数组数据类型 (Variable-size Array Data Types) #### 2.8.1 概览与用例 (Overview and Use cases) ##### 2.8.1.1 "旧世界" 动态大小数组 ("Old-world" dynamic-size Arrays) 传统动态大小数组方法。 ##### 2.8.1.2 "新世界" 可变大小数组 ("New-world" variable-size Arrays) 新引入的可变大小数组方法。 #### 2.8.2 关于应用程序数据类型的建模方面 (Modeling Aspects regarding Application Data Types) 应用程序数据类型的可变大小数组建模。 #### 2.8.3 关于实现数据类型的建模方面 (Modeling Aspects regarding Implementation Data Types) 实现数据类型的可变大小数组建模。 ### 2.9 结构中的可选元素 (Optional Elements in Structures) #### 2.9.1 背景 (Background) 可选元素在结构中允许灵活的数据建模。 --- ## 3 概览:软件组件、端口与接口 (Overview: Software Components, Ports, and Interfaces) ### 3.1 介绍 (Introduction) 本章概述了软件组件、端口和接口的核心概念。 ### 3.2 软件组件 (Software Component) #### 3.2.1 概览 (Overview) AUTOSAR 软件组件是**封装的功能单元**,通过**端口**与外界通信。 **`SwComponentType`** 是所有软件组件类型的抽象基类。`SwComponentType` 有两个主要子类: - `AtomicSwComponentType` — 原子软件组件类型 - `CompositionSwComponentType` — 组合软件组件类型 **类表 3.1:SwComponentType(摘要)** | 字段 | 值 | |---|---| | **Class** | `SwComponentType` (abstract) | | **Attribute** `port** | 类型:`PortPrototype`,多重性:`*` | | **Attribute** `portGroup** | 类型:`PortGroup`,多重性:`*` | | **Attribute** `swcInternalBehavior** | 类型:`SwcInternalBehavior`,多重性:0..1 | | **Attribute** `consistencyNeeds** | 类型:`ConsistencyNeeds`,多重性:0..1 | #### 3.2.2 PortPrototype **`PortPrototype`** 是软件组件上的通信端点。 **类表 3.2:PortPrototype(摘要)** | 字段 | 值 | |---|---| | **Class** | `PortPrototype` (abstract) | | **Attribute** `providedInterface** | 类型:`PortInterface`,多重性:0..1 | | **Attribute** `requiredInterface** | 类型:`PortInterface`,多重性:0..1 | | **Attribute** `providedComSpec** | 类型:``PComSpec` 的具体子类,多重性:0..* | | **Attribute** `requiredComSpec** | 类型:``RComSpec` 的具体子类,多重性:0..* | | **Attribute** `clientServerAnnotation** | 类型:`ClientServerAnnotation`,多重性:0..* | **`PortPrototype` 的具体子类**: - `PPortPrototype` — 提供端口 - `RPortPrototype` — 需要端口 - `PRPortPrototype` — 可配置 P/R 端口 #### 3.2.3 AtomicSwComponentType `AtomicSwComponentType` 是实现为单一可执行单元的软件组件。 **类表 3.3:AtomicSwComponentType(摘要)** | 字段 | 值 | |---|---| | **Class** | `AtomicSwComponentType` | | **Attribute** `internalBehavior** | 类型:`SwcInternalBehavior`,多重性:1 | | **Attribute** `symbolProps** | 类型:`SymbolProps`,多重性:0..* | | **Attribute** `arTypedPerInstanceMemory** | 类型:`VariableDataPrototype`,多重性:0..* | | **Attribute** `arTypedCalibrationParameter** | 类型:``DataPrototype` (标定参数),多重性:0..* | #### 3.2.4 ParameterSwComponentType `ParameterSwComponentType` 是专门用于定义**参数**的组件类型。 #### 3.2.5 软件组件的符号名称 (Symbolic Name of a Software-Component) 通过 `SymbolProps` 定义符号名称。 ### 3.3 组合 (Composition) #### 3.3.1 概览 (Overview) **`CompositionSwComponentType`** 是由**多个软件组件**(`SwComponentPrototype`)和**连接器**(`Connector`)组成的复合组件。 #### 3.3.2 SwComponentPrototype **类表 3.4:SwComponentPrototype(摘要)** | 字段 | 值 | |---|---| | **Class** | `SwComponentPrototype` | | **Attribute** `type** | 类型:`SwComponentType` 的引用 | | **Attribute** `calibrationParameterValue** | 类型:`ParameterValue`,多重性:0..* — 标定参数值 | #### 3.3.3 连接器 (Connectors) **连接器类型**: - `AssemblySwConnector` — 装配连接器(连接不同组件的端口) - `DelegationSwConnector` — 委托连接器(连接内部和外部端口) - `PassThroughSwConnector` — 透传连接器 #### 3.3.4 实例化特定的 RTE 事件 (Instantiation-specific RTEEvents) `SwComponentPrototype` 可以携带实例化特定的 RTE 事件。 ### 3.4 端口接口 (Port Interface) **`PortInterface`** 定义了端口的**通信契约**。 **`PortInterface` 的主要子类**: - `SenderReceiverInterface` — 发送/接收接口 - `ClientServerInterface` — 客户端/服务器接口 - `ModeSwitchInterface` — 模式切换接口 - `ParameterInterface` — 参数接口 - `NvDataInterface` — NV 数据接口 - `TriggerInterface` — 触发接口 --- ## 4 详细:软件组件、端口与接口 (Details: Software Components, Ports, and Interfaces) ### 4.1 介绍 (Introduction) 本章详细介绍了软件组件、端口和接口。 ### 4.2 端口接口详细信息 (Port Interface Details) #### 4.2.1 介绍 (Introduction) #### 4.2.2 发送/接收通信 (Sender Receiver Communication) **`SenderReceiverInterface`** 定义了**基于数据元素**的通信。 **类表 4.1:SenderReceiverInterface(摘要)** | 字段 | 值 | |---|---| | **Class** | `SenderReceiverInterface` | | **Attribute** `dataElement** | 类型:`VariableDataPrototype`,多重性:1..* | | **Attribute** `invalidationPolicy** | 类型:`InvalidationPolicy`,多重性:0..1 | | **Attribute** `handleInvalidData** | 类型:`HandleInvalidEnum`,多重性:0..1 | | **Attribute** `minAcceptableDistinctValues** | 类型:`PositiveInteger`,多重性:0..1 | #### 4.2.3 客户端/服务器通信 (Client Server Communication) ##### 4.2.3.1 客户端服务器接口 (Client Server Interface) **`ClientServerInterface`** 定义了**基于操作**的通信。 **类表 4.2:ClientServerInterface(摘要)** | 字段 | 值 | |---|---| | **Class** | `ClientServerInterface` | | **Attribute** `operation** | 类型:`ClientServerOperation`,多重性:1..* | | **Attribute** `possibleError** | 类型:`ApplicationError`,多重性:0..* | ##### 4.2.3.2 客户端/服务器通信中的错误处理 (Error Handling in Client/Server Communication) **`ApplicationError`** 类描述了**应用级错误**。 **类表 4.3:ApplicationError(摘要)** | 字段 | 值 | |---|---| | **Class** | `ApplicationError` | | **Attribute** `name** | 类型:`Identifier`,多重性:1 | | **Attribute** `errorCode** | 类型:`PositiveInteger`,多重性:1 | | **Attribute** `errorContext** | 类型:``Referrable`,多重性:0..* | #### 4.2.4 外部触发事件通信 (External Trigger Event Communication) **`TriggerInterface`** 定义了基于**触发**的通信。 **类表 4.4:TriggerInterface(摘要)** | 字段 | 值 | |---|---| | **Class** | `TriggerInterface` | | **Attribute** `trigger** | 类型:`Trigger`,多重性:1..* | #### 4.2.5 模式通信 (Communication of Modes) **`ModeSwitchInterface`** 用于**模式切换**通信。 **类表 4.5:ModeSwitchInterface(摘要)** | 字段 | 值 | |---|---| | **Class** | `ModeSwitchInterface` | | **Attribute** `modeGroup** | 类型:`ModeDeclarationGroupPrototype`,多重性:1..* | #### 4.2.6 参数通信 (Parameter Communication) **`ParameterInterface`** 用于访问**标定参数**。 ### 4.3 端口接口映射与数据缩放 (PortInterface Mapping and Data Scaling) #### 4.3.1 端口接口映射 (PortInterface Mapping) ##### 4.3.1.1 发送/接收接口、参数接口和非易失性数据接口元素的映射 将应用程序数据类型映射到实现数据类型。 ##### 4.3.1.2 客户端/服务器接口元素的映射 ##### 4.3.1.3 模式接口元素的映射 ##### 4.3.1.4 触发接口元素的映射 ##### 4.3.1.5 复合数据类型的元素映射 #### 4.3.2 数据转换 (Data Conversion) ##### 4.3.2.1 线性数据缩放 (Linear Data Scaling) 通过 `CompuMethod` 实现线性缩放。 ##### 4.3.2.2 表转换 (Table Conversion) 通过 `ComputationMethod` 实现表查找。 #### 4.3.3 与数据转换的相关性 (Relevance for Data Transformation) 接口映射与数据转换(COM、Transformer)相关。 ### 4.4 端口注释 (Port Annotation) #### 4.4.1 介绍 (Introduction) 端口注释提供**额外信息**用于工具链。 #### 4.4.2 SenderReceiverAnnotation #### 4.4.3 ClientServerAnnotation #### 4.4.4 I/O 硬件抽象层的注释 (Annotation for the I/O Hardware Abstraction Layer) #### 4.4.5 参数端口注释 (Parameter Port Annotation) #### 4.4.6 模式端口注释 (Mode Port Annotation) #### 4.4.7 触发端口注释 (Trigger Port Annotation) #### 4.4.8 非易失性数据端口注释 (Non Volatile Data Port Annotation) #### 4.4.9 委托端口注释 (Delegated Port Annotations) #### 4.4.10 通用注释 (General Annotation) ### 4.5 通信规范 (Communication Specification) #### 4.5.1 发送/接收通信的通信规范 (Communication Specification for Sender-Receiver Communication) #### 4.5.2 客户端/服务器通信的通信规范 (Communication Specification for Client-Server Communication) #### 4.5.3 模式切换通信的通信规范 (Communication Specification for Mode Switch Communication) #### 4.5.4 参数的通信规范 (Communication Specification for Parameters) #### 4.5.5 NV 数据的通信规范 (Communication Specification for NV Data) #### 4.5.6 数据转换的配置 (Configuration of Data Transformation) ### 4.6 组件类型内的端口组 (Port Groups within Component Types) `PortGroup` 允许将端口**分组**以便于引用。 ### 4.7 端到端保护 (End to End Protection) E2E 保护确保数据**完整性**。 ### 4.8 部分联网 (Partial Networking) 部分联网允许 ECU 在**不需要时关闭**部分网络。 #### 4.8.1 VFC 控制端口 (VFC Control Ports) #### 4.8.2 VFC 状态端口 (VFC Status Ports) ### 4.9 隐式通信行为的形式化定义 (Formal Definition of implicit Communication Behavior) #### 4.9.1 接收方的一致性需求 (Consistency Needs on Receiver Side) #### 4.9.2 发送方的一致性需求 (Consistency Needs on Sender Side) #### 4.9.3 RunnableEntityGroup 内同一数据发送方和接收方的一致性需求 --- ## 5 数据描述 (Data Description) ### 5.1 介绍 (Introduction) 本章详细介绍了 AUTOSAR 中的**数据类型系统**。 ### 5.2 数据类型 (Data Types) #### 5.2.1 概览 (Overview) AUTOSAR 提供**两层**数据类型系统: - **应用数据类型 (ApplicationDataType)** — 用于 VFB 级别的接口定义 - **实现数据类型 (ImplementationDataType)** — 用于 RTE 级别的实现定义 #### 5.2.2 数据类型映射 (Data Type Mapping) `DataTypeMap` 建立了**应用数据类型**和**实现数据类型**之间的关系。 #### 5.2.3 数据类别 (Data Categories) **数据类别枚举 (`DataCategoryEnum`)**: - `VALUE` — 标量值 - `ARRAY` — 数组 - `STRUCTURE` — 结构体 - `UNION` — 联合体 - `STRING` — 字符串 - `BOOLEAN` — 布尔 - `COM_AXIS` — 通信轴 - `CURVE` — 曲线 - `MAP` — 映射 - `CUBOID` — 立方体 - `CUBOID_ELEMENT` — 立方体元素 - `RESERVED` — 保留 #### 5.2.4 应用数据类型 (Application Data Type) ##### 5.2.4.1 应用原始数据类型 (Application Primitive Data Types) **`ApplicationPrimitiveDataType`** 是**标量数据类型**。 **类表 5.1:ApplicationPrimitiveDataType(摘要)** | 字段 | 值 | |---|---| | **Class** | `ApplicationPrimitiveDataType` | | **Attribute** `category** | 类型:`CategoryString`,多重性:0..1 | | **Attribute** `swDataDefProps** | 类型:`SwDataDefProps`,多重性:0..1 | ##### 5.2.4.2 应用复合数据类型 (Application Composite Data Types) **`ApplicationCompositeDataType`** 包括: - `ApplicationArrayDataType` — 数组 - `ApplicationRecordDataType` — 记录(结构体) - `ApplicationUnionDataType` — 联合 **`ApplicationRecordDataType` 类表(摘要)** | 字段 | 值 | |---|---| | **Class** | `ApplicationRecordDataType` | | **Attribute** `element** | 类型:`ApplicationRecordElement`,多重性:1..* | **`ApplicationArrayDataType` 类表(摘要)** | 字段 | 值 | |---|---| | **Class** | `ApplicationArrayDataType` | | **Attribute** `element** | 类型:`ApplicationArrayElement`,多重性:1..* | **`ApplicationUnionDataType` 类表(摘要)** | 字段 | 值 | |---|---| | **Class** | `ApplicationUnionDataType` | | **Attribute** `element** | 类型:`ApplicationUnionElement`,多重性:1..* | #### 5.2.5 实现数据类型 (Implementation Data Type) **`ImplementationDataType`** 是**实现级别**的数据类型。 **类表 5.2:ImplementationDataType(摘要)** | 字段 | 值 | |---|---| | **Class** | `ImplementationDataType` | | **Attribute** `subElement** | 类型:`ImplementationDataTypeElement`,多重性:0..* | | **Attribute** `swDataDefProps** | 类型:`SwDataDefProps`,多重性:0..1 | | **Attribute** `typeEmitter** | 类型:`TypeEmitterEnum` — 类型发射器(应用、RTE、COM/IF) | | **Attribute** `dynamicArraySizeProfile** | 类型:`String`,多重性:0..1 | | **Attribute** `variantCategory** | 类型:`VariantCategoryEnum` | ##### 5.2.5.1 使用 ImplementationDataType 建模可选元素结构 (Modeling of Optional Element Structure with ImplementationDataType) `ImplementationDataTypeElement` 可以标记为**可选**。 #### 5.2.6 基本类型 (Base Type) **`SwBaseType`** 是**原始实现类型**。 **类表 5.3:SwBaseType(摘要)** | 字段 | 值 | |---|---| | **Class** | `SwBaseType` | | **Attribute** `baseTypeSize** | 类型:`PositiveInteger`,多重性:0..1 — 类型大小(位) | | **Attribute** `baseTypeEncoding** | 类型:`BaseTypeEncodingString`,多重性:0..1 — 编码(1C、2C、SPC、IEEE754) | | **Attribute** `nativeDeclaration** | 类型:`String`,多重性:0..1 — 原生声明 | | **Attribute** `name** | 类型:`Identifier`,多重性:1 — 类型短名称 | **预定义基本类型示例**: - `uint8`、`uint16`、`uint32`、`uint64` - `sint8`、`sint16`、`sint32`、`sint64` - `float32`、`float64` - `boolean` - `uint8_n`(N 字节无符号) #### 5.2.7 数据类型术语 (Data Type Terminology) ##### 5.2.7.1 原始类型 (Primitive Type) 不可分割的标量类型。 ##### 5.2.7.2 复合原始数据类型 (Compound Primitive Data Type) 将多个原始类型**逻辑组合**。 ##### 5.2.7.3 整数原始类型 (Integral Primitive Type) 整数类型的进一步分类。 ##### 5.2.7.4 可变大小数组数据类型 (Variable-Size Array Data Type) `VariableSizeArrayDataType` 类表示运行时大小可变的数组。 ##### 5.2.7.5 包装联合数据类型 (Wrapped Union Data Type) `WrappedUnionDataType` 类表示带判别字段的联合。 ##### 5.2.7.6 可选元素结构 (Optional Element Structure) `ImplementationDataTypeElement` 可以有 `optional` 标志。 ### 5.3 数据原型 (Data Prototypes) #### 5.3.1 概览 (Overview) **`DataPrototype`** 是**数据类型的实例化**。 **`DataPrototype` 的主要子类**: - `VariableDataPrototype` — 变量数据原型 - `ParameterDataPrototype` — 参数数据原型 - `ApplicationDataPrototype` (abstract) — 应用数据原型 - `ImplementationDataPrototype` (abstract) — 实现数据原型 #### 5.3.2 由数组数据类型类型化的数据原型的数据约束 (Data Constraints for DataPrototypes typed by Array DataTypes) #### 5.3.3 数据原子的引用 (Reference to Data Prototypes) ##### 5.3.3.1 AUTOSAR 变量引用 (AUTOSAR Variable Ref) `VariableRef` 类提供对变量的引用。 ##### 5.3.3.2 AUTOSAR 参数引用 (AUTOSAR Parameter Ref) `ParameterRef` 类提供对参数的引用。 ##### 5.3.3.3 建模方法 (Modeling Approach) ##### 5.3.3.4 访问由 ImplementationDataType 类型化的 VariableDataPrototype ##### 5.3.3.5 访问由 ImplementationDataType 类型化的 ParameterDataPrototype ### 5.4 数据定义的属性 (Properties of Data Definitions) #### 5.4.1 概览 (Overview) **`SwDataDefProps`** 类定义数据元素的**属性**。 **类表 5.4:SwDataDefProps(摘要)** | 字段 | 值 | |---|---| | **Class** | `SwDataDefProps` | | **Attribute** `swDataDefProperty** | 类型:`SwDataDefProperty`,多重性:* | | **Attribute** `swRecordLayout** | 类型:`SwRecordLayout`,多重性:0..1 | | **Attribute** `swPointerTargetProps** | 类型:`SwPointerTargetProps`,多重性:0..1 | | **Attribute** `swImplPolicy** | 类型:`SwImplPolicyEnum`,多重性:0..1 | | **Attribute** `swCalibrationAccess** | 类型:`SwCalibrationAccessEnum`,多重性:0..1 | | **Attribute** `swCalprmAxisSet** | 类型:`SwCalprmAxisSet`,多重性:0..* | | **Attribute** `swComparisonVariable** | 类型:`SwComparisonVariable`,多重性:0..1 | | **Attribute** `swVariableRef** | 类型:`SwVariableRef`,多重性:0..1 | | **Attribute** `swAddrMethod** | 类型:`SwAddrMethod`,多重性:0..1 | | **Attribute** `swAlignment** | 类型:`Integer`,多重性:0..1 | | **Attribute** `swBitRepresentation** | 类型:`SwBitRepresentation`,多重性:0..1 | | **Attribute** `invalidValue** | 类型:`ValueSpecification`,多重性:0..1 | | **Attribute** `unit** | 类型:`Unit`,多重性:0..1 | | **Attribute** `displayFormat** | 类型:`DisplayFormatString`,多重性:0..1 | | **Attribute** `baseType** | 类型:`SwBaseType`,多重性:0..1 | | **Attribute** `dataConstr** | 类型:`DataConstr`,多重性:0..* | | **Attribute** `compuMethod** | 类型:`CompuMethod`,多重性:0..1 | | **Attribute** `annotation** | 类型:`Annotation`,多重性:* | #### 5.4.2 无效值 (Invalid Value) `invalidValue` 定义表示"无效"的值。 #### 5.4.3 测量属性 (Properties for Measurement) #### 5.4.4 曲线和映射的属性 (Properties of Curves and Maps) ##### 5.4.4.1 固定轴的规范 (Specification of fix Axes) #### 5.4.5 设置轴输入值 (Setting an Axis Input Value) #### 5.4.6 设置组轴 (Setting a Group Axis) #### 5.4.7 指定数据依赖性 (Specifying Data Dependencies) #### 5.4.8 数据属性相对于数据元素、轴元素、计算方法、单位的优先级 ### 5.5 数据定义属性中使用的元素 (Elements used in Properties of Data Definitions) #### 5.5.1 计算方法 (Computation Methods) **`CompuMethod`** 类定义了**计算方法**。 **类表 5.5:CompuMethod(摘要)** | 字段 | 值 | |---|---| | **Class** | `CompuMethod` | | **Attribute** `category** | 类型:`CategoryString`,多重性:0..1 | | **Attribute** `compuInternalToPhys** | 类型:`Compu`,多重性:0..1 | | **Attribute** `compuPhysToInternal** | 类型:`Compu`,多重性:0..1 | | **Attribute** `unit** | 类型:`Unit`,多重性:0..1 | | **Attribute** `displayFormat** | 类型:`DisplayFormatString`,多重性:0..1 | **计算方法类别**: - `IDENTICAL` — 恒等 - `LINEAR` — 线性 - `RATIONAL` — 有理 - `TEXTTABLE` — 文本表 - `TAB_NOINTP` — 表格(无插值) - `TAB_INTP` — 表格(线性插值) - `BITFIELD_TEXTTABLE` — 位域文本表 - `SCALE_LINEAR_AND_TEXTTABLE` — 缩放线性+文本表 - `SCALE_RATIONAL_AND_TEXTTABLE` — 缩放有理+文本表 - `FORMULA` — 公式 ##### 5.5.1.1 CompuMethod 上下文中的类别值 (Category Values in the context of a CompuMethod) ##### 5.5.1.2 CompuMethod 上下文中属性的适用性 (Applicability of Attributes in the context of a CompuMethod) ##### 5.5.1.3 CompuMethod 与 AutosarDataType (CompuMethod and AutosarDataType) ##### 5.5.1.4 枚举示例 (Example for Enumeration) ##### 5.5.1.5 线性转换示例 (Example for Linear Conversion) ##### 5.5.1.6 带文本表的线性转换示例 (Example for Linear Conversion with texttable) ##### 5.5.1.7 由有理函数指定的转换示例 (Example for conversion specified by a rational function) ##### 5.5.1.8 BITFIELD_TEXTTABLE 示例 (Example for BITFIELD_TEXTTABLE) #### 5.5.2 物理单位、物理维和单位组 (Physical Units, Physical Dimensions and Unit Groups) **`Unit`** 类表示**物理单位**。 **类表 5.6:Unit(摘要)** | 字段 | 值 | |---|---| | **Class** | `Unit` | | **Attribute** `factorSiToUnit** | 类型:`Float`,多重性:0..1 — SI 单位到本单位的因子 | | **Attribute** `offsetSiToUnit** | 类型:`Float`,多重性:0..1 — SI 单位到本单位的偏移 | | **Attribute** `physicalDimension** | 类型:`PhysicalDimension`,多重性:0..1 | #### 5.5.3 数据约束 (Data Constraints) **`DataConstr`** 类定义了**数据约束**。 **类表 5.7:DataConstr(摘要)** | 字段 | 值 | |---|---| | **Class** | `DataConstr` | | **Attribute** `lowerLimit** | 类型:`Limit`,多重性:0..1 | | **Attribute** `upperLimit** | 类型:`Limit`,多重性:0..1 | ##### 5.5.3.1 物理限制 (Physical Limits) #### 5.5.4 寻址方法 (Addressing Methods) **`SwAddrMethod`** 类定义了**寻址方法**(内存段、对齐等)。 #### 5.5.5 记录布局 (Record Layouts) **`SwRecordLayout`** 类定义了**结构体布局**。 ##### 5.5.5.1 指定记录布局 (Specifying Record Layouts) ##### 5.5.5.2 记录布局与数据类型 (RecordLayouts and DataTypes) ##### 5.5.5.3 记录布局与插值例程 (Record Layouts and Interpolation Routines) #### 5.5.6 显示呈现 (Display Presentation) ### 5.6 常量值规范 (Specification of Constant Values) #### 5.6.1 概览 (Overview) **`ConstantSpecification`** 类定义了**常量值**。 **类表 5.8:ConstantSpecification(摘要)** | 字段 | 值 | |---|---| | **Class** | `ConstantSpecification` | | **Attribute** `valueSpec** | 类型:`ValueSpecification`,多重性:1..* | #### 5.6.2 基于规则的值规范 (Specification of Values based on Rules) ##### 5.6.2.1 对原始数据类型的支持 (Support for primitive Data Types) ##### 5.6.2.2 对复合数据类型的支持 (Support for composite Data Types) #### 5.6.3 对常量的引用 (Reference to Constant) #### 5.6.4 复合原始数据类型的值 (Values for Compound Primitive Data Types) #### 5.6.5 示例 (Examples) ##### 5.6.5.1 CURVE 常量规范示例 (Example for Constant Specification for CURVE) ##### 5.6.5.2 MAP 常量规范示例 (Example for Constant Specification for MAP) ##### 5.6.5.3 具有两个 STD_AXIS 的 MAP 常量规范示例 (Example for Constant Specification for MAP with two STD_AXIS) ##### 5.6.5.4 COM_AXIS 常量规范示例 (Example for Constant Specification for COM_AXIS) ### 5.7 初始值 (Initial Values) #### 5.7.1 概览 (Overview) #### 5.7.2 初始值表示 (Initial Value Representation) #### 5.7.3 常量规范映射 (Constant Specification Mapping) #### 5.7.4 标定参数的初始值 (Initial Values For CalibrationParameters) #### 5.7.5 可选元素的初始值 (Initial Value for optional Element) ##### 5.7.5.1 可选 ApplicationRecordElement 的初始值 ##### 5.7.5.2 可选 ImplementationDataTypeElement 的初始值 --- ## 6 兼容性 (Compatibility) ### 6.1 介绍 (Introduction) 本章定义了软件组件之间的**兼容性规则**,允许组件在保持接口稳定性的同时进行演化。 ### 6.2 数据类型的兼容性 (Compatibility of Data Types) #### 6.2.1 ApplicationDataType ##### 6.2.1.1 ApplicationPrimitiveDataType ##### 6.2.1.2 ApplicationCompositeDataType #### 6.2.2 ImplementationDataType #### 6.2.3 SwBaseType 的兼容性 #### 6.2.4 SwDataDefProps 的兼容性 ##### 6.2.4.1 单位的兼容性 (Compatibility of Units) ##### 6.2.4.2 物理维的兼容性 (Compatibility of PhysicalDimensions) ##### 6.2.4.3 数据约束的兼容性 (Compatibility of Data Constraints) ##### 6.2.4.4 ImplementationDataType 情况下的兼容性 ##### 6.2.4.5 CompuMethods 的兼容性 ##### 6.2.4.6 记录布局的兼容性 (Compatibility of Record Layouts) #### 6.2.5 ApplicationDataType 和 ImplementationDataType 的兼容性 ### 6.3 变量数据原型和参数数据原型的兼容性 ### 6.4 发送/接收接口、参数接口和非易失性数据接口的兼容性 #### 6.4.1 通过 AssemblySwConnector 连接所需和提供的端口 #### 6.4.2 通过 DelegationSwConnector 连接内部和外部端口 #### 6.4.3 通过 PassThroughSwConnector 连接所需和提供的端口 #### 6.4.4 ParameterDataPrototype 和 VariableDataPrototype 的兼容性取决于 PortInterface 类型 ### 6.5 模式切换接口的兼容性 (Compatibility of Mode Switch Interfaces) #### 6.5.1 通过 AssemblySwConnector 连接所需和提供的端口 #### 6.5.2 通过 DelegationSwConnector 连接内部和外部端口 #### 6.5.3 通过 PassThroughSwConnector 连接外部和外部端口 ### 6.6 模式声明组原型的兼容性 ### 6.7 模式声明组的兼容性 ### 6.8 参数原型的兼容性 ### 6.9 应用程序错误的兼容性 ### 6.10 客户端/服务器操作的兼容性 ### 6.11 客户端服务器接口的兼容性 ### 6.12 触发接口的兼容性 ### 6.13 触发的兼容性 ### 6.14 所提供端口原型的整体委托 #### 6.14.1 PortInterface 元素的拆分和合并 ### 6.15 平面 ECU 提取情况下的兼容性 ### 6.16 兼容性示例 (Compatibility Examples) #### 6.16.1 装配级别的兼容性 (Compatibility on Assembly Level) ##### 6.16.1.1 合法使用 (Legal Use) ##### 6.16.1.2 非法使用 (Illegal Use) #### 6.16.2 委托级别的兼容性 (Compatibility on Delegation Level) ##### 6.16.2.1 合法使用 (Legal Use) ##### 6.16.2.2 非法使用 (Illegal Use) --- ## 7 内部行为 (Internal Behavior) ### 7.1 介绍 (Introduction) `SwcInternalBehavior` 类描述了**软件组件的内部行为**。 **类表 7.1:SwcInternalBehavior(摘要)** | 字段 | 值 | |---|---| | **Class** | `SwcInternalBehavior` | | **Attribute** `runnable** | 类型:`RunnableEntity`,多重性:* | | **Attribute** `rteEvent** | 类型:`RTEEvent`,多重性:* | | **Attribute** `exclusiveArea** | 类型:`ExclusiveArea`,多重性:* | | **Attribute** `interRunnableVariable** | 类型:`VariableDataPrototype`,多重性:* | | **Attribute** `interRunnableTrigger** | 类型:`InterRunnableTrigger`,多重性:* | | **Attribute** `perInstanceMemory** | 类型:`VariableDataPrototype`,多重性:* | | **Attribute** `perInstanceParameter** | 类型:`ParameterDataPrototype`,多重性:* | | **Attribute** `staticMemory** | 类型:`VariableDataPrototype`,多重性:* | | **Attribute** `constantMemory** | 类型:`VariableDataPrototype`,多重性:* | | **Attribute** `constantValueMappingRef** | 类型:`PortAPIOption`,多重性:* | | **Attribute** `includedDataTypeSet** | 类型:`IncludedDataTypeSet`,多重性:* | | **Attribute** `includedModeDeclarationGroupSet** | 类型:`IncludedModeDeclarationGroupSet`,多重性:* | | **Attribute** `serviceNeeds** | 类型:`PortGroup`,多重性:* | | **Attribute** `variationPointProxy** | 类型:`VariationPointProxy`,多重性:* | ### 7.2 可运行实体 (Runnable Entity) **`RunnableEntity`** 是**可调度的执行单元**。 **类表 7.2:RunnableEntity(摘要)** | 字段 | 值 | |---|---| | **Class** | `RunnableEntity` | | **Attribute** `name** | 类型:`Identifier`,多重性:1 | | **Attribute** `canBeInvokedConcurrently** | 类型:`Boolean`,多重性:0..1 | | **Attribute** `minStartInterval** | 类型:`MultilongLong`,多重性:0..1 | | **Attribute** `swAddrMethod** | 类型:`SwAddrMethod`,多重性:0..1 | | **Attribute** `rteEvent** | 类型:`RTEEvent`,多重性:1..* — 触发事件 | | **Attribute** `dataReceivePointByArgument** | 类型:`VariableAccess`,多重性:0..* | | **Attribute** `dataReceivePointByValue** | 类型:`VariableAccess`,多重性:0..* | | **Attribute** `dataSendPoint** | 类型:`VariableAccess`,多重性:0..* | | **Attribute** `dataWriteAccess** | 类型:`VariableAccess`,多重性:0..* | | **Attribute** `dataReadAccess** | 类型:`VariableAccess`,多重性:0..* | | **Attribute** `serverCallPoint** | 类型:`ServerCallPoint`,多重性:0..* | | **Attribute** `externalTriggeringPoint** | 类型:`ExternalTriggeringPoint`,多重性:0..* | | **Attribute** `modeAccessPoint** | 类型:`ModeAccessPoint`,多重性:0..* | | **Attribute** `modeSwitchPoint** | 类型:`ModeSwitchPoint`,多重性:0..* | | **Attribute** `asynchronousServerCallPoint** | 类型:`AsynchronousServerCallPoint`,多重性:0..* | | **Attribute** `internalTriggeringPoint** | 类型:`InternalTriggeringPoint`,多重性:0..* | | **Attribute** `parameterAccess** | 类型:`ParameterAccess`,多重性:0..* | | **Attribute** `exclusiveArea** | 类型:`ExclusiveArea`,多重性:0..* | | **Attribute** `enteredExclusiveArea** | 类型:`EnteredExclusiveArea`,多重性:0..* | #### 7.2.1 不可并发调用的 RunnableEntity 的并发性和可重入性 #### 7.2.2 可并发调用的 RunnableEntity 的并发性和可重入性 #### 7.2.3 可运行实体的定时激活 #### 7.2.4 补充说明和澄清 ##### 7.2.4.1 可重入性和多实例化 ##### 7.2.4.2 可重入性和"库函数" ##### 7.2.4.3 触发同一 RunnableEntity 的 ClientServerOperations 的兼容性 ##### 7.2.4.4 Runnable 实体的类别 ##### 7.2.4.5 Runnable 实体的参数 #### 7.2.5 Runnable 实体的激活原因 #### 7.2.6 用于初始化目的的 Runnable 实体 ### 7.3 RTEEvent **`RTEEvent`** 类描述了**触发 RunnableEntity 执行的事件**。 **RTEEvent 的主要子类**: - `TimingEvent` — 定时事件 - `DataReceivedEvent` — 数据接收事件 - `DataReceiveErrorEvent` — 数据接收错误事件 - `DataSendCompletedEvent` — 数据发送完成事件 - `DataWriteCompletedEvent` — 数据写入完成事件 - `OperationInvokedEvent` — 操作调用事件 - `AsynchronousOperationCallReturnedEvent` — 异步操作调用返回事件 - `InternalTriggerOccurredEvent` — 内部触发发生事件 - `ExternalTriggerOccurredEvent` — 外部触发发生事件 - `ModeSwitchedAckEvent` — 模式切换确认事件 - `BackgroundEvent` — 后台事件 - `InitEvent` — 初始化事件 #### 7.3.1 定义事件 (Defining an Event) #### 7.3.2 定义如何响应事件 (Defining how to Respond to an Event) ### 7.4 Runnable 实体之间的通信 (Communication among Runnable Entities) #### 7.4.1 描述可能性 1:独占区域 (Exclusive Area) ##### 7.4.1.1 整个 Runnable 在独占区域中运行 ##### 7.4.1.2 Runnable 动态进入和离开独占区域 ##### 7.4.1.3 API 生成的配置 (Configuration of API Generation) #### 7.4.2 描述可能性 2:可运行间变量 (Inter-Runnable Variable) `InterRunnableVariable` 类允许 Runnable 之间的**数据共享**。 #### 7.4.3 Runnable 间触发 (Inter Runnable Triggering) `InterRunnableTrigger` 允许 Runnable 之间的**触发信号**。 ### 7.5 RunnableEntities 的数据访问 (Data Access of RunnableEntities) #### 7.5.1 RunnableEntities 和发送/接收通信 ##### 7.5.1.1 术语 (Terminology) ##### 7.5.1.2 数据访问 (Data Access) ##### 7.5.1.3 显式发送和接收 (Explicit Sending and Receiving) ##### 7.5.1.4 隐式发送和接收 (Implicit Sending and Receiving) ##### 7.5.1.5 DataSendCompletedEvent ##### 7.5.1.6 DataWriteCompletedEvent ##### 7.5.1.7 DataReceivedEvent ##### 7.5.1.8 DataReceiveErrorEvent #### 7.5.2 RunnableEntities 和客户端/服务器通信 ##### 7.5.2.1 调用操作 (Invoking an Operation) ##### 7.5.2.2 提供操作的实现 (Providing an Implementation of an Operation) ##### 7.5.2.3 对数据转换错误的反应 (Reacting on Data Transformation Errors) #### 7.5.3 RunnableEntities 和外部触发事件通信 ##### 7.5.3.1 触发源 (Trigger Source) ##### 7.5.3.2 触发汇 (Trigger Sink) #### 7.5.4 RunnableEntities 和参数访问 ##### 7.5.4.1 InstantiationDataDefProps #### 7.5.5 RunnableEntities 和模式通信 ### 7.6 端口 API 选项 (Port API Options) #### 7.6.1 启用取地址 (Enable to Take Address) #### 7.6.2 间接 API 生成 (Indirect API Generation) #### 7.6.3 端口定义参数值 (Port Defined Argument Value) #### 7.6.4 支持的功能 (Supported Features) ##### 7.6.4.1 缓冲区锁定 (Buffer Locking) ### 7.7 PerInstanceMemory (Per Instance Memory) #### 7.7.1 由 "C" 数据类型类型化的 PerInstanceMemory #### 7.7.2 由 AUTOSAR 数据类型类型化的 PerInstanceMemory ### 7.8 静态内存和常量内存 (Static Memory and Constant Memory) ### 7.9 包含的 AUTOSAR 数据类型 (Included AUTOSAR Data Types) ### 7.10 包含的模式声明组 (Included Mode Declaration Groups) ### 7.11 服务需求 (Service Needs) #### 7.11.1 概览 (Overview) `ServiceNeeds` 允许软件组件声明对**基础服务**的需求。 #### 7.11.2 服务需求到端口和数据的分配 (Assignment of Service Needs to Ports and Data) ### 7.12 变体点代理 (Variation Point Proxy) `VariationPointProxy` 允许在组合级别上携带变体点信息。 --- ## 8 实现 (Implementation) `Implementation` 类描述了**软件组件的实现**。 **类表 8.1:Implementation(摘要)** | 字段 | 值 | |---|---| | **Class** | `Implementation` (abstract) | | **Subclasses** | `SwcImplementation`、`EcuAbstraction`、`ComplexDeviceDriver` 等 | > **完整实现类定义见原文 PDF 第 634-637 页** --- ## 9 模式管理 (Mode Management) ### 9.1 模式的声明 (Declaration of Modes) `ModeDeclarationGroup` 类定义了一组**互斥模式**。 **类表 9.1:ModeDeclarationGroup(摘要)** | 字段 | 值 | |---|---| | **Class** | `ModeDeclarationGroup` | | **Attribute** `modeDeclaration** | 类型:`ModeDeclaration`,多重性:1..* — 模式声明 | | **Attribute** `initialMode** | 类型:`ModeDeclaration`,多重性:0..1 — 初始模式 | | **Attribute** `modeManager** | 类型:`Boolean`,多重性:0..1 — 是否为模式管理器 | | **Attribute** `modeTransition** | 类型:`ModeTransition`,多重性:0..* — 模式转换 | **`ModeDeclaration` 类表(摘要)** | 字段 | 值 | |---|---| | **Class** | `ModeDeclaration` | | **Attribute** `name** | 类型:`Identifier`,多重性:1 | | **Attribute** `value** | 类型:`Integer`,多重性:1 — 模式值 | | **Attribute** `modeGroup** | 类型:`ModeDeclarationGroup` 的引用(反向) | ### 9.2 模式与事件 (Modes and Events) 模式管理器通过 `ModeSwitchedAckEvent` 通知模式用户。 ### 9.3 初始化/终结化 (Initialization / Finalization) `InitEvent` 和 `SwcModeSwitchEvent` 用于初始化和终结化。 ### 9.4 模式错误行为 (Mode Error Behavior) `ModeErrorBehavior` 类定义了模式错误时的行为。 ### 9.5 与模式相关的元模型摘录汇总 (Summary Meta-Model Excerpt Related to Modes) > **完整元模型摘录见原文 PDF 第 652-653 页** --- ## 10 ECU 抽象与复杂驱动 (ECU Abstraction and Complex Drivers) ### 10.1 介绍 (Introduction) ECU 抽象层是 BSW 的**重要部分**,它将硬件特定功能抽象为**AUTOSAR 标准接口**。 ### 10.2 高级硬件和软件架构 (High Level Hardware and Software Architecture) ### 10.3 接口和 API (Interfaces and APIs) #### 10.3.1 ECU 抽象及其 AUTOSAR 接口 (ECU Abstraction and its AUTOSAR Interfaces) ### 10.4 传感器/执行器 (Sensors/Actuators) ### 10.5 I/O 硬件抽象 (I/O Hardware Abstraction) ### 10.6 复杂驱动 (Complex Driver) `ComplexDeviceDriver` 允许使用**绕过标准 AUTOSAR 层次**的设备驱动。 --- ## 11 服务 (Services) ### 11.1 概览:服务相关模型元素的生成 (Overview: Generation of Service-related Model Elements) 服务由**服务组件 (ServiceSwComponentType)** 提供,**服务代理组件 (ServiceProxySwComponentType)** 调用。 ### 11.2 扩展 ECU 软件组合 (Extending the ECU Software Composition) ### 11.3 服务软件组件类型 (Service Software Component Type) **`ServiceSwComponentType`** 是提供基础服务的组件。 ### 11.4 服务代理组件类型 (Service Proxy Component Type) **`ServiceProxySwComponentType`** 是**调用基础服务**的代理组件。 ### 11.5 非易失性内存 (Non Volatile Memory) #### 11.5.1 介绍 (Introduction) #### 11.5.2 NvBlockComponent **`NvBlockComponent`** 是**非易失性数据块**的封装。 #### 11.5.3 使用 NvBlockComponent 的 NVRAM 数据的软件组件 #### 11.5.4 连接到 NvBlockComponent 的软件组件 #### 11.5.5 NvBlockDescriptor ##### 11.5.5.1 写入策略 (Writing Strategies) `NvRamBlock` 写入策略:`IMMEDIATE`、`DEFERRED` 等。 ##### 11.5.5.2 NvBlockNeeds ##### 11.5.5.3 RAM 块和 ROM 块 (RAM Block and ROM Block) ##### 11.5.5.4 NvBlockDataMapping ##### 11.5.5.5 客户端服务器端口 (Client Server Ports) #### 11.5.6 NvBlockSwComponentType 的 SwcInternalBehavior --- ## 12 软件组件文档 (Software Component Documentation) > **完整文档规范见原文 PDF 第 706-709 页** --- ## 13 服务依赖与服务用例 (Service Dependencies and Service Use Cases) ### 13.1 概览 (Overview) ### 13.2 NvM 服务依赖 (NvM Service Dependencies) #### 13.2.1 Nvm 用例:永久 RAM 块 (Permanent RAM Block) #### 13.2.2 Nvm 用例:临时 RAM 块 (Temporary RAM Block) #### 13.2.3 Nvm 用例:使用镜像接口显式同步的 RAM 块 (RAM Block with explicit synchronization using Mirror Interfaces) #### 13.2.4 NVM 用例:使用 NvBlockSwComponentType 提供的 Nv 数据的软件组件 (Software-Components using Nv Data provided by NvBlockSwComponentType) ### 13.3 看门狗服务依赖 (Watchdog Service Dependencies) #### 13.3.1 看门狗服务用例:本地监督 (Local Supervision) #### 13.3.2 看门狗服务用例:全局监督状态通知 (Global Supervision Status notification) #### 13.3.3 看门狗服务用例:控制全局监督或获取全局监督状态 (Control global supervision or get global supervision status) ### 13.4 COM 管理器服务需求 (COM Manager Service Needs) #### 13.4.1 ComM 用例:读取当前 ComM 模式 #### 13.4.2 ComM 用例:请求 ComM 模式 #### 13.4.3 ComM 用例:软件组件充当影响 ECU 状态的模式管理器 (Software-Component acts as a Mode Manager that influences the ECU State) ### 13.5 ECU 状态管理器服务需求 (ECU State Manager Service Needs) #### 13.5.1 EcuM 用例:选择关闭目标 (select Shutdown Target) #### 13.5.2 EcuM 用例:选择启动目标 (select Boot Target) #### 13.5.3 EcuM 用例:使用闹钟 (use Alarm Clock) ### 13.6 BswM #### 13.6.1 部分联网 (Partial Networking) #### 13.6.2 模式管理器 (Mode Manager) #### 13.6.3 模式用户 (Mode User) #### 13.6.4 模式请求者 (Mode Requester) ### 13.7 加密服务依赖 (Crypto Service Dependencies) #### 13.7.1 概览 (Overview) #### 13.7.2 加密服务用例 (Crypto Service Use Cases) ##### 13.7.2.1 加密服务用例:哈希计算 (Hash calculation) ##### 13.7.2.2 加密服务用例:MAC 计算 (MAC calculation) ##### 13.7.2.3 加密服务用例:MAC 验证 (MAC verification) ##### 13.7.2.4 加密服务用例:生成随机数 (generation of random numbers) ##### 13.7.2.5 加密服务用例:使用 AEAD 加密 (Encryption with AEAD) ##### 13.7.2.6 加密服务用例:使用 AEAD 解密 (Decryption with AEAD) ##### 13.7.2.7 加密服务用例:加密 (encryption) ##### 13.7.2.8 加密服务用例:解密 (decryption) ##### 13.7.2.9 加密服务用例:签名生成 (signature generation) ##### 13.7.2.10 加密服务用例:签名验证 (signature verification) ##### 13.7.2.11 加密服务用例:密钥管理 (usage of key management) #### 13.7.3 加密服务作业用例 (Crypto Service Job Use Cases) ##### 13.7.3.1 加密服务用例:使用作业 API 设置密钥有效 (usage of job API to set key valid) ##### 13.7.3.2 加密服务用例:使用作业 API 创建随机种子 (usage of job API to create a random seed) ##### 13.7.3.3 加密服务用例:使用作业 API 生成密钥 (usage of job API to generate a key) ##### 13.7.3.4 加密服务用例:使用作业 API 派生密钥 (usage of job API to derive a key) ##### 13.7.3.5 加密服务用例:使用作业 API 执行密钥交换的公共值计算 ##### 13.7.3.6 加密服务用例:使用作业 API 执行共享密钥计算 ##### 13.7.3.7 加密服务用例:使用作业 API 执行证书解析 ##### 13.7.3.8 加密服务用例:使用作业 API 执行证书验证 ### 13.8 诊断服务依赖 (Diagnostic Service Dependency) #### 13.8.1 开发方法 (Development Approach) #### 13.8.2 功能抑制需求 (Function Inhibition Needs) ##### 13.8.2.1 功能抑制管理器服务用例:读取功能权限 ##### 13.8.2.2 功能抑制管理器用例:对被抑制或不可用的事件做出反应 #### 13.8.3 诊断事件需求 (Diagnostic Event Needs) 详细列举了 19 个 Dem 服务用例。 #### 13.8.4 诊断通信需求 (Diagnostic Communication Needs) 详细列举了 12 个 Dcm 服务用例。 #### 13.8.5 OBD 相关需求 (OBD related Needs) 详细列举了 7 个 OBD 服务用例。 #### 13.8.6 基于 IP 的诊断 (Diagnostics over IP) 详细列举了 7 个 DoIP 服务用例。 #### 13.8.7 杂项诊断服务用例 (Miscellaneous Diagnostic Service Use-Cases) 详细列举了 9 个用例。 ### 13.9 诊断日志和跟踪依赖 (Diagnostic Log and Trace Dependency) #### 13.9.1 Dlt 用例:应用程序软件组件传输调试信息 ### 13.10 同步时基管理器依赖 (Synchronized Time-Base Manager Dependency) #### 13.10.1 StbM 用例:启动定时器并可能获得关于其到期的通知 #### 13.10.2 StbM 用例:软件组件希望获得状态变化通知 #### 13.10.3 StbM 用例:处理从全局时间从属获取的时间快照以用于诊断目的 #### 13.10.4 StbM 用例:软件组件表示全局时间主控 #### 13.10.5 StbM 用例:软件组件表示全局时间从属 ### 13.11 安全车载通信 (Secure On-Board Communication) #### 13.11.1 SecOc 用例:获取安全通信的验证状态 #### 13.11.2 SecOc 用例:软件组件在给定期间退出安全通信 #### 13.11.3 SecOc 用例:向 SecOC 提供新鲜度 I #### 13.11.4 SecOc 用例:向 SecOC 提供新鲜度 II #### 13.11.5 SecOc 用例:向 SecOC 提供新鲜度 III #### 13.11.6 SecOc 用例:即使无法计算 MAC 也启用 Pdus 发送 ### 13.12 J1939 通信 (J1939 Communication) #### 13.12.1 J1939RM 用例:AtomicSwComponentType 发送请求到总线 #### 13.12.2 J1939RM 用例:AtomicSwComponentType 接受来自总线的请求 ### 13.13 错误跟踪器 (Error Tracer) #### 13.13.1 错误跟踪器用例:默认错误跟踪器服务用例:报告失败 ### 13.14 车辆到 X 设施 (Vehicle-2-X Facilities) #### 13.14.1 V2xFac 用例:应用程序软件组件向 V2X 堆栈提供车辆特定数据以进行 CAM 传输 #### 13.14.2 V2xFac 用例:V2xFac 通知应用程序软件组件有关收到的消息 #### 13.14.3 V2xFac 用例:应用程序软件组件触发 DENM 消息的传输 #### 13.14.4 V2xFac 用例:应用程序软件组件处理 MAP(拓扑)扩展消息 #### 13.14.5 V2xFac 用例:应用程序软件组件处理基础设施到车辆信息消息 #### 13.14.6 V2xFac 用例:应用程序软件组件处理信号相位和定时扩展消息 ### 13.15 车辆到 X 管理 (Vehicle-2-X Management) #### 13.15.1 V2xM 用例:应用程序软件组件向 V2X 堆栈提供车辆特定数据以获取位置和时间信息 #### 13.15.2 V2xM 用例:应用程序软件组件需要来自 V2X 管理器的 V2X 特定数据 #### 13.15.3 V2xM 用例:应用程序软件组件对 V2X 管理器中的化名更改进行软控制 #### 13.15.4 V2xM 用例:应用程序软件组件具有按需验证的能力 #### 13.15.5 V2xM 用例:应用程序软件组件进行基于位置的计算 ### 13.16 硬件测试管理器 (Hardware Test Manager) #### 13.16.1 HtssM 服务用例:查询硬件测试结果 --- ## 14 快速原型场景 (Rapid Prototyping Scenarios) ### 14.1 快速原型场景的定义 (Definition of Rapid Prototyping Scenario) 快速原型 (Rapid Prototyping, RP) 场景允许**绕过**某些 AUTOSAR 机制以实现快速实验。 ### 14.2 M1 上 RptContainers 的使用 (Usage of RptContainers on M1) `RptContainer` 类表示快速原型容器。 ### 14.3 M1 上用于 RptContainers 的 atpSplitable 使用 (Usage of atpSplitable for RptContainers on M1) ### 14.4 支持 RPT 场景的元模型修改 (Modifications of the Meta-Model for supporting the RPT scenario) ### 14.5 扩展缓冲区访问方法 (Extended Buffer Access Method) #### 14.5.1 RP 准备 (RP Preparation) #### 14.5.2 服务点 (Service Points) ##### 14.5.2.1 服务功能 (Service Functions) --- ## 摘要:附录 (Appendices Summary) ### A 词汇表 (Glossary) > **完整词汇表见原文 PDF 第 840-843 页** 主要术语: - **ApplicationDataType** — 应用数据类型 - **AtomicSwComponentType** — 原子软件组件类型 - **ClientServerInterface** — 客户端/服务器接口 - **CompositionSwComponentType** — 组合软件组件类型 - **E2E** — End-to-End Protection(端到端保护) - **ImplementationDataType** — 实现数据类型 - **Port** — 端口 - **PortInterface** — 端口接口 - **RTE Event** — RTE 事件 - **RunnableEntity** — 可运行实体 - **SenderReceiverInterface** — 发送/接收接口 - **SW-C** — Software Component(软件组件) - **VFB** — Virtual Functional Bus(虚拟功能总线) ### B 支持的特殊用例 (Supported Special Use Cases) #### B.1 软件组件与复杂驱动之间的非对称数据转换 ##### B.1.1 概览 (Overview) ##### B.1.2 建模方面 (Modeling Aspects) > **完整 B 附录见原文 PDF 第 844-846 页** ### C 约束与规范项历史 (History of Constraints and Specification Items) > **完整历史表见原文 PDF 第 847-914 页** C.1-C.11 子节记录了从 R4.0.1 到 R4.4.0 各版本中**添加、修改、删除的约束**和**可追溯性项目**。 ### D InstanceRef 建模 (Modeling of InstanceRef) #### D.1 介绍 (Introduction) `InstanceRef` 用于引用模型中的**特定实例**。 #### D.2 建模 (Modeling) ##### D.2.1 组件与组合 (Components and Compositions) > **完整 D 附录见原文 PDF 第 915-953 页** ##### D.2.2 隐式通信行为的定义 ##### D.2.3 内部行为 ### E 示例 (Examples) #### E.1 可变大小数组定义的示例 > **完整示例见原文 PDF 第 954-957 页** ### F 引用的类表 (Mentioned Class Tables) > **完整类表见原文 PDF 第 958-993 页** 本附录列出了本文档中引用的所有**核心类**的完整类表(属性、多重性、类型等)。这是软件组件模板中**最完整的类引用表**。 ### G 上游映射 (Upstream Mapping) > **完整映射表见原文 PDF 第 994-1064 页** #### G.1 介绍 (Introduction) #### G.2 NvM 详细描述了 AUTOSAR 软件组件模板(SWCT)与 NVRAM Manager(NvM)模块之间的**映射**。 #### G.3 Com COM 模块映射。 #### G.4 WdgM WdgM 模块映射。 #### G.5 Dcm DCM 模块映射。 #### G.6 Dem DEM 模块映射。 #### G.7 BswM BswM 模块映射。 #### G.8 MemMap MemMap 模块映射。 #### G.9 RTE RTE 映射。 #### G.10 ECUC ECUC 映射。 #### G.11 OS OS 映射。 ### H 可拆分元素 (Splitable Elements) > **完整列表见原文 PDF 第 1065-1066 页** 本附录列出了本模板中标记为 `«atpSplitable»` 的元素。 ### I 变体点 (Variation Points) > **完整列表见原文 PDF 第 1067-1069 页** 本附录列出了本模板中所有**变体点**的位置和描述。 --- ## 翻译说明 > **本翻译采用"重点翻译 + 摘要"策略**: > - **完整翻译**:封面、文档标识、变更历史、目录、章节 1-9(核心概念、数据描述、内部行为、模式管理) > - **部分翻译**:章节 10-14(ECU 抽象、服务、文档、服务依赖、快速原型)以类表 + 概念说明形式 > - **摘要标记**:附录 A-I 使用摘要标记 > - **保留内容**:所有 API 标识符(UML 类名、属性名、ARXML 标签、UML 构造型如 `«atpVariation»`、约束 ID 如 `[TPS_SWCT_*]`、协议名 CAN/LIN/BSW/RTE/UDS/E2E 等)保持英文 > - **不翻译**:版权声明、需求 ID 编号、UML 标签的语法符号 > - **方法论标记**:所有 `[TPS_SWCT_*]`、`[constr_*]` 需求标识符保留 --- ## 参考资料 (References) | 编号 | 标题 | 来源 | |---|---|---| | [1] | Standardization Template | AUTOSAR_TPS_StandardizationTemplate | | [2] | Specification of RTE Software | AUTOSAR_SWS_RTE | | [3] | Virtual Functional Bus | AUTOSAR_EXP_VFB | | [4] | Methodology | AUTOSAR_TR_Methodology | | [5] | Layered Software Architecture | AUTOSAR_EXP_LayeredSoftwareArchitecture | | [6] | Basic Software Module Description Template | AUTOSAR_TPS_BSWModuleDescriptionTemplate | | [7] | Specification of Timing Extensions | AUTOSAR_TPS_TimingExtensions | | [8] | Requirements on Timing Extensions | AUTOSAR_RS_TimingExtensions | | [9] | Specification of ECU Resource Template | AUTOSAR_TPS_ECUResourceTemplate | | [10] | System Template | AUTOSAR_TPS_SystemTemplate | | [11] | Generic Structure Template | AUTOSAR_TPS_GenericStructureTemplate | | [12] | Requirements on Software Component Template | AUTOSAR_RS_SoftwareComponentTemplate | | [13] | Supplementary material of general blueprints for AUTOSAR | AUTOSAR_TR_GeneralBlueprintsSupplement | | [14] | Specification of Basic Software Mode Manager | AUTOSAR_SWS_BSWModeManager | | [15] | Information technology – Universal Coded Character Set (UCS) | http://www.iso.org | | [16] | Specification of Manifest | AUTOSAR_TPS_ManifestSpecification | | [17] | Specification of I/O Hardware Abstraction | AUTOSAR_SWS_IOHardwareAbstraction | | [18] | ISO 17356-4: Road vehicles – Open interface for embedded automotive applications – Part 4: OSEK/VDX Communication (COM) | — | | [19] | Specification of SW-C End-to-End Communication Protection Library | AUTOSAR_SWS_E2ELibrary | | [20] | Specification of Communication Manager | AUTOSAR_SWS_COMManager | | [21] | Specification of Communication | AUTOSAR_SWS_COM | | [22] | Specification of Platform Types | AUTOSAR_SWS_PlatformTypes | | [23] | ISO/IEC 9899:1990 | http://www.iso.org | | [24] | ASAM MCD 2MC ASAP2 Interface Specification | http://www.asam.net — ASAP2-V1.51.pdf | | [25] | ASAM MCD 2 Harmonized Data Objects Version 1.1 | harmonized-data-objects-V1.1.pdf | | [26] | Collection of blueprints for AUTOSAR M1 models | AUTOSAR_MOD_GeneralBlueprints | | [27] | ISO 26262 (Part 1-10) – Road vehicles – Functional Safety, First edition | http://www.iso.org | | [28] | ASAM AE Calibration Data Format V2.0.0 | http://www.asam.net — ASAM-AE-CDF-V2_0_0-Users-Guide.pdf | | [29] | Specification of Operating System | AUTOSAR_SWS_OS | | [30] | ISO 17356-3: Road vehicles – Open interface for embedded automotive applications – Part 3: OSEK/VDX Operating System (OS) | — | | [31] | Specification of ECU Configuration Parameters (XML) | AUTOSAR_MOD_ECUConfigurationParameters | | [32] | Glossary | AUTOSAR_TR_Glossary | | [33] | Specification of NVRAM Manager | AUTOSAR_SWS_NVRAMManager | | [34] | ASAM AE Functional Specification Exchange Format V1.0.0 | http://www.asam.net — AE-FSX_V1.0.0.pdf | | [35] | Specification of Watchdog Manager | AUTOSAR_SWS_WatchdogManager | | [36] | Specification of ECU State Manager | AUTOSAR_SWS_ECUStateManager | | [37] | Diagnostic Extract Template | AUTOSAR_TPS_DiagnosticExtractTemplate | | [38] | Specification of Function Inhibition Manager | AUTOSAR_SWS_FunctionInhibitionManager | | [39] | Specification of Diagnostic Event Manager | AUTOSAR_SWS_DiagnosticEventManager | | [40] | Specification of Diagnostic Communication Manager | AUTOSAR_SWS_DiagnosticCommunicationManager | | [41] | Road vehicles – Diagnostic communication over Internet Protocol (DoIP) | http://www.iso.org | | [42] | Specification of Diagnostic Log and Trace | AUTOSAR_SWS_DiagnosticLogAndTrace | | [43] | Specification of Synchronized Time-Base Manager | AUTOSAR_SWS_SynchronizedTimeBaseManager | | [44] | Specification of Secure Onboard Communication | AUTOSAR_SWS_SecureOnboardCommunication | | [45] | Specification of a Request Manager for SAE J1939 | AUTOSAR_SWS_SAEJ1939RequestManager | | [46] | Specification of Default Error Tracer | AUTOSAR_SWS_DefaultErrorTracer | | [47] | Specification of Vehicle-2-X Facilities | AUTOSAR_SWS_V2XFacilities | | [48] | Specification of Vehicle-2-X Management | AUTOSAR_SWS_V2XManagement | | [49] | Software Process Engineering Meta-Model Specification | http://www.omg.org/spec/SPEM/2.0/ | | [50] | Specification of SOME/IP Transformer | AUTOSAR_SWS_SOMEIPTransformer |