MATLAB Answers

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

17 views (last 30 days)
Can I update a Simulink implementation of my AUTOSAR Software Component to use datatypes I define in an updated ARXML?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Jul 2020 at 4:00
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).

  0 Comments

Sign in to comment.

More Answers (0)


Translated by