Can I update a Simulink implementation of my AUTOSAR Software Component to use datatypes I define in an updated ARXML?

3 visualizaciones (últimos 30 días)
Can I update a Simulink implementation of my AUTOSAR Software Component to use datatypes I define in an updated ARXML?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 13 de Jul. de 2020
Using AUTOSAR datatypes defined in an ARXML file is possible if you map the specific component with the datatype. Please see the documentation link I have provided below for more information on this:
If you have already been working on the design of a Simulink model, but want to use datatypes that are defined in a new ARXML file:
  • You can use the updateAUTOSARProperties function. After using this function, you will have to map the datatypes from the ARXML to the Simulink model as in the previous example. The use of updateAUTOSARProperties does not create any new object, but it only imports their definitions into the model’s AUTOSAR Properties.
  • Once that is done you can create workspace variables for any types using the following APIs, depending on the data type:
  • createNumericType
  • createEnumeration
  • You now can see them in the workspace. Enumerations are imported as CompuMethods.
  • Another alternative: updateModel does create new objects. However, this may not be suitable for all cases, because it will update the whole model according to the new ARXML, so that some elements may be deleted. I would not recommend using this option for importing new data types unless updating the model is required at the same time by your workflow.
  • Another alternative would be to use createComponentAsModel. This function does create new objects, but they would appear in a new model. You could then copy or move these types to your model an use them there as needed (Simulink allows for this functionality).

Más respuestas (0)

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by