这篇文章我们继续讲解code-mapping的Data stores页,这个页的内容对应的SIMULINK中的模块是Data store memory。

我们首先在模型中创建一个Data store memory模块,如图:

基于MATLAB开发AUTOSAR软件应用层Code mapping专题-part 4 Data store标签页介绍-LMLPHP

Data store memory模块的作用相当于一个全局变量,我们可以在模型的功能逻辑里将一个信号存进去,在另外的一个控制逻辑里读出来使用,分别使用另外两个模块去进行读取,分别为Data store write  和Data store read

上图中我们在root层级创建了一个Data store memory名称为A(大的红色圈的位置),之后在两个子系统中分别使用了Data store write(小红圈)和Data store read

08-23 09:05