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

4 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Jyotish Robin
Jyotish Robin el 10 de Abr. de 2017
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 comentario
Gehan Selim
Gehan Selim el 19 de Mayo de 2017
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 ?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre AUTOSAR Blockset en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by