NvBlock SwComponentPrototypes 的代码会由rte generator 负责实现。NvBlockSwComponentType 提供了获取和管理存储在nvram中的数据的pirt interface。
上图表现了NvBlockSwComponentType 的使用介绍。根据不同的使用场景,swc可以有不同的方式和NvBlockSwComponentType 连接。如果port类型是 SenderReceiverInterfaces / NvDataInterfaces 的连接模式为了获得访问NV data的权限,port类型是ClientServerInterfaces是用于管理nv data。多个swc 可以读出相同的NvBlockSwComponentType 的VariableDataPrototypes。
每个NvBlockSwComponentType 可以包含多个NvBlockDescriptors, 每一个NvBlockDescriptor关联一个NVRAM block。
一个NvBlockDescriptor 包含了一个VariableDataPrototype,作为NVRAM block的ram block, ParameterDataPrototype 作为default ROM value, 可选。ROM 和RAM block的类型应该是要匹配的。RTE会给VariableDataPrototype分配memory。
对于每个存在NvBlockDescriptor 中的element, 应该有一个NvBlockDataMapping ,这个mapping关系把能读写对应VariableDataPrototype element的port关系表现出来了。
NvBlockSwComponentType 可以用于减少ecu上面 nvram的数量,他可以把一些小的数据元素放在一个