How do I import BITFIELD_TEXTTABLE CompuMethods with the AUTOSAR ARXML Importer?

25 views (last 30 days)
I want to import the AUTOSAR "CompuMethods" of category "BITFIELD_TEXTTABLE" from an ARXML file in order to access the bitfields defined in my model.
Which versions of MATLAB support "CompuMethods" in such a way that I can access directly the fields, as I would do with "bus" or "enum" ?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Apr 2023
Edited: MathWorks Support Team on 1 May 2023
This functionality is available as of R2019a.
Given the ARXML file "MyARXML", the following commands will generate "QF_defineIntEnumTypes.m" which can be used to access the BITFIELD_TEXTTABLE compu method enumeration data types.  
>> arProps = autosar.api.getAUTOSARProperties("CTRV")
>> createEnumeration(arProps,"/Pkg_CompuMethods/SomeCompuMethod")
//Found AUTOSAR enumeration types. You can use SomeCompuMethod_defineIntEnumTypes.m to recreate these enumeration types.
This will generate "SomeCompuMethod_defineIntEnumTypes.m" and give you access to the enumeration data.
For context, when you import an ARXML file and create a component, the BITFIELD_TEXTTABLE category is not automatically imported because Simulink allows users to customize what information they want to pull in. This is similar behavior to importing a "math" library in some programming languages. 

More Answers (0)

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!