Mapping Data Types when "configuring a model as an AUTOSAR component"

3 次查看(过去 30 天)
Hi, I have a question regarding the option of "configuring a model as an AUTOSAR component" in Simulink. My understanding is that in this process, the data types used in the constants /signals/etc of Simulink models should be mapped to AUTOSAR's data types, which are defined in the Generic Structure Template in a package called Primitive Types.
However, after configuring a Simulink model as an AUTOSAR component and generating its ARXML files in Simulink, I found that the ARXML files have data types defined in them other than those in the GenericStructure Template. For example, the ARXML files have an Int32 data type which is not in the GenericStructure template; the GenericStructure Template has an Integer data type. Note that the data types in the ARXML files are tagged as "Implementation-Data-Types".
Thus, if the process of "configuring a model as an AUTOSAR component" in Simulink maps the data types to comply with AUTOSAR's data types, why do the data types in the generated ARXML files not correspond to the data types in the GenericStructure template? Or , do the data types in the ARXML files correspond to the types that will be used in code generation ?
Thanks a lot

采纳的回答

Jyotish Robin
Jyotish Robin 2017-4-10
Hi Gehan!
It looks like the Generic Structure Template is talking about the AUTOSAR metamodel and not about the ARXML or ASWC types.
The meta model is used to represent the various objects in AUTOSAR in UML. It can be used to store the objects so code and/or ARXML can be generated later. Simulink stores an AUTOSAR meta model under the hood (in the slx) and uses that to generate the mapping and ARXML.
In summary, Simulink won't be using the types described in the Generic Structure Template in a manner that is visible to the user.
In regards to this question:
  • do the data types in the ARXML files correspond to the types that will be used in code generation ? *
Yes, the data types in the code will reflect the content in the ARXML and not the Generic Structure Template.
I hope you find the above information useful!
Regards,
Jyotish
  1 个评论
Gehan Selim
Gehan Selim 2017-5-19
Thank you so much Jyotish, this is very helpful indeed ! So this means that when we configure a Simulink model as an AUTOSAR component, Matlab/Simulink automatically maps the data types in the model to their correct corresponding types in AUTOSAR ? Ie, the user need not worry about ensuring that the mapping of the data types has been done correctly... Is that right ?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 AUTOSAR Blockset 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by