How do I create AUTOSAR CompuMethods of ”BITFIELD_TEXTTABLE“ and "SCALE_LINEAR_AND_TEXTABLE" categories?
7 views (last 30 days)
Show older comments
MathWorks Support Team
on 12 Jul 2023
Answered: MathWorks Support Team
on 31 Aug 2023
I am working on an AUTOSAR model, and I would like to create CompuMethods of ”BITFIELD_TEXTTABLE“ and "SCALE_LINEAR_AND_TEXTABLE" categories, add Simulink Data Types to these CompuMethods, and generate model codes and ARXMLs. How can I create and use such CompuMethods?
Accepted Answer
MathWorks Support Team
on 12 Jul 2023
As of MATLAB R2023b, you can create CompuMethods of ”BITFIELD_TEXTTABLE“ and "SCALE_LINEAR_AND_TEXTABLE" and associate them with Simulink Data Types via the Round-Trip Workflow. That is, you first use the XML description generated by an AUTOSAR authoring tool to import an AUTOSAR software component into a model. Later, you generate AUTOSAR C and XML code from the model.
When you have the ARXML available, you can use the following codes to import ARXML and update the AUTOSAR properties in the model, so that the CompuMethod from ARXML can show up within AUTOSAR Dicitionary:
ar = arxml.importer('MWExampleARXML.arxml');
ar.updateAUTOSARProperties(model);
You can then assign Simulink Data Types to the imported CompuMethod within AUTOSAR Dictionary.
For more information, please refer to the following documentation:
1) Model AUTOSAR Data Types
https://www.mathworks.com/help/autosar/ug/data-types.html
2) Configure AUTOSAR CompuMethods
https://www.mathworks.com/help/autosar/ug/configure-autosar-compumethods.html
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!