在本规范的早期版本中,对PortInterfaces相互匹配的要求可能会导致以下情况:出于正式原因(例如dataElements的shortName不匹配),“实际”兼容的PortInterfaces将被拒绝。
为了也支持CompositionSwComponentType的开发人员需要连接彼此匹配但不满足正式要求的PortPrototype的情况,引入了“端口接口映射”的概念。
本章共11小节:
1、综述
2、端口接口映射
2.1、S/R接口、参数接口、和存储接口元素的映射
2.2、C/S接口元素的映射
2.3、模式接口元素映射
2.4、触发器接口元素的映射
2.5、组合数据类型元素的映射
3、数据变换
3.1、线性数据缩放
3.2、表转换
4、数据转换的相关性
本节分为三部分:
2.3、模式接口元素映射
2.4、触发器接口元素的映射
2.5、组合数据类型元素的映射

2.3模式接口元素的映射
模式接口映射
ModeInterfaceMapping定义在ModeSwitchInterfaces上下文中定义的ModeDeclarationGroupPrototypes的相关性。
ModeInterfaceMapping的有效性
仅当ModeDeclarationGroupPrototypes的映射由兼容的ModeDeclarationGroups(读为“索引”)键入时才有效。
ModeDeclarationGroupPrototypeMapping的语义
必须使用ModeDeclarationGroupPrototypeMapping来标识两个ModeDeclarationGroup,之后再将其视为兼容。 如果两个ModeDeclarationGroups相对于所包含的modeTransitions有所不同,这也适用。

在一个ModeDeclarationMappingSet范围内,firstMode和secondMode的一致性
在一个ModeDeclarationMappingSet的范围内,所有firstMode应属于一个且仅一个ModeDeclarationGroup,而所有secondMode应属于一个且仅另一个ModeDeclarationGroup
关于引用的firstModeGroup和secondModeGroup的ModeDeclarationMappingSet的一致性
如果存在ModeDeclarationGroupPrototypeMapping.modeDeclarationMappingSet,则拥有在firstMode角色中引用的modeDeclaration的ModeDeclarationGroup应为ModeDeclarationGroupPrototypeMapping.firstModeGroup的类型,而拥有在secondMode角色中引用的modeDeclaration的ModeDeclarationGroup应为ModeMapping。
ModeDeclarationMapping定义ModeDeclarations的显式关联
元类ModeDeclarationMapping定义了在两个ModeDeclarationGroups上下文中定义的ModeDeclarations的显式关联。
ModeDeclarationGroupPrototypeMapping.modeDeclarationMappingSet定义适用的ModeDeclarationMappings集
属性ModeDeclarationGroupPrototypeMapping.modeDeclarationMappingSet定义了适用于以下对象的ModeDeclarationMappings集:
由ModeDeclarationGroups键入的具有不同名称的ModeDeclarations和/或具有不同数量的ModeDeclarations的ModeDeclarationGroupPrototypes连接。
模式用户的ModeDeclaration恰好映射到模式管理器的一个ModeDeclaration
当输入或退出与模式管理器的映射(即由同一ModeDeclarationMapping引用)的模式管理器相对应的模式管理器的模式时,进入或退出与模式用户的ModeDeclaration对应的模式。
模式用户的ModeDeclaration映射到模式管理器的多个ModeDeclaration
输入与适用的ModeDeclarationMapping引用的ModeDeclarations对应的Mode Manager的任何模式时,将输入与模式用户的映射ModeDeclaration对应的模式。
如果新模式未映射到模式用户的相关模式,则退出与适用的ModeDeclarationMapping引用的ModeDeclarations对应的模式管理器的任何模式时,将退出与模式用户的映射ModeDeclaration对应的模式。
请注意,是否通过多个ModeDeclarationMappings将模式用户的一个ModeDeclaration映射到模式管理器的多个ModeDeclaration,则以模式管理器的各个模式转换分别表示“退出”和“进入”事件的方式定义了预期的语义。对于模式用户。换句话说,模式用户可以识别各个过渡。
如果在单个ModeDeclarationMapping的上下文中(通过利用角色firstMode的多样性)将模式用户的一个ModeDeclaration映射到模式管理器的多个ModeDeclaration,则以如下方式定义语义:模式用户无法识别。
将模式用户的ModeDeclaration映射到模式管理器的ModeDeclaration
拒绝将代表一个模式用户模式的多个ModeDeclaration映射到一个代表模式管理器模式的ModeDeclaration的配置。
将模式用户的ModeDeclaration映射到模式管理器的所有ModeDeclaration
如果存在引用代表模式管理器模式的ModeDeclaration的ModeDeclarationMapping,则应该存在将模式管理器的所有模式映射到模式用户模式的ModeDeclarationMappings。
请注意,上述会阻止存在以下配置:
没有过渡正在进行时,模式用户未处于定义的模式
未映射到模式管理器的ModeDeclaration的模式用户的ModeDeclaration
未映射到模式管理器的ModeDeclaration的模式用户的ModeDeclaration表示有效模型。
在这种情况下,在ECU运行期间永远不会进入或退出相关模式。
2.4、触发器接口元素的映射
TriggerInterfaceMapping
TriggerInterfaceMapping定义在上下文TriggerInterfaces中定义的触发器的相关性。

2.5、复合数据类型的元素映射
PortInterfaces元素的映射不限于将整个DataPrototypes相互映射。
组合数据类型的元素的映射
对于DataInterfaces的应用程序,也可以正式描述STRUCTURE或ARRAY类的ApplicationCompositeDataTypes或ImplementationDataTypes元素之间的映射。
例如,可以使用此功能。 发送方和接收方的dataElement由不同的ApplicationRecordDataTypes键入。
在这种情况下,类别STRUCTURE或ARRAY的ApplicationCompositeDataTypes或ImplementationDataTypes元素之间的映射允许定义满足兼容性规则的特定元素对。
发送方的元素到接收方的元素的映射
除非将属性swImplPolicy设置为已排队,否则不需要将发送方的所有元素都映射到接收方的元素以实现兼容性。
ApplicationCompositeDataTypes或ImplementationDataTypes的未映射元素以及属性swImplPolicy
如果将属性swImplPolicy设置为已排队,则不允许在接收方具有类别为STRUCTURE或ARRAY的ApplicationCompositeDataTypes或ImplementationDataTypes的未映射元素。
接收方未映射的dataElement必须具有initValue
如果在SubElementMapping中未考虑类别为STRUCTURE或ARRAY的ApplicationCompositeDataTypes或ImplementationDataTypes元素,则如果NonqueuedReceiverComSpec由AbstractRequiredPortPrototype聚合,则封闭的dataElement应具有initValue。

ApplicationCompositeDataType和嵌套的ImplementationDataType的组合
类别STRUCTURE或ARRAY的ApplicationCompositeDataTypes或ImplementationDataTypes的元素映射适用于ApplicationCompositeDataType和嵌套的ImplementationDataTypes,甚至适用于它们的组合,即一个PortInterface可以使用ApplicationCompositeDataType,而另一个PortInterface使用嵌套的ImplementationDataType。
组合元素到原始DataPrototype的映射
也可以将提供侧的复合数据类型的元素映射到所需侧的原始DataPrototype。 为此,第一个元素的多重性应设置为1,第二个元素的多重性应设置为0。
通常,firstElement的多重性在技术上也可以设置为0,但是这种情况保留供将来使用。
复合到原始用例的仅一个映射
在上面描述的情况下,在封闭的DataPrototypeMapping处仅应存在一个subElementMapping。
提供者端的原始DataPrototype不应映射到请求者端的复合数据类型的元素
DataPrototypeMapping或SubElementMapping的用法不支持以下配置:
•在提供者/客户端上引用的AutosarDataPrototype由类别VALUE的ApplicationPrimitiveDataType或类别VALUE或类别TYPE_REFERENCE的ApplicationPrimitiveDataType键入,最终解析为类别VALUE。
•DataPrototypeMapping聚合一个子元素映射,该子元素映射引用请求者/服务器端的ImplementationDataTypeElement或ApplicationCompositeElementDataPrototype。
相对于ImplementationDataTypeSubElementRef.parameterImplementationDataTypeElement的ImplementationDataTypeSubElementRef.implementationDataTypeElement的存在
对于任何给定的ImplementationDataTypeSubElementRef,无论是聚合
•ImplementationDataTypeSubElementRef.implementationDataTypeElement或
•ImplementationDataTypeSubElementRef.parameterImplementationDataTypeElement
都应该存在。
换句话说,ImplementationDataTypeSubElementRef应该引用VariableDataPrototype或ParameterDataPrototype内部的嵌套层次结构。

在ApplicationCompositeElementInPortInterfaceInstanceRef上下文中rootDataPrototype和base的一致性
ApplicationCompositeElementInPortInterfaceInstanceRef引用的rootDataPrototype应归角色库中引用的DataInterface的适用子类所有。这意味着如果基数是ParameterInterface,则rootDataPrototype应该是ParameterDataPrototype。 否则,rootDataPrototype将为VariableDataPrototype。
ApplicationCompositeElementInPortInterfaceInstanceRef上下文中数据类型的一致性
属性contextDataPrototype和targetDataPrototype的定义(通过类型-原型模式)应包含在用于键入rootDataPrototype的数据类型的定义的上下文中。
换句话说,将有可能通过由用于键入rootDataPrototype的数据类型的定义所创建的类型-原型链来达到contextDataPrototype和targetDataPrototype。 并且,如InstanceRef的定义所暗示,contextDataPrototypes必须相互封装,并最终将targetDataPrototype封装起来。

ArParameterInImplementationDataInstanceRef上下文中数据类型的一致性
属性contextDataPrototype和targetDataPrototype的定义应包含在用于键入rootParameterDataPrototype的数据类型的定义的上下文中。

&spm=1001.2101.3001.5002&articleId=105211007&d=1&t=3&u=f2d70d1b0bbe4830944590ee8c4c5193)
1226

被折叠的 条评论
为什么被折叠?



