- Open the “Model Explorer” from your model.
- In “Model Explorer”, navigate to “sc_dictionary” > “Design Data” > “myStruct”.
- Click on “Show in Interface Editor” located at the bottom right corner.
- The “Interface Editor” will open. On the right-hand side, locate the “Code Generation” section and click the arrow to expand it.
- Modify the “Data Scope” setting to either “Imported” or “Exported” as needed.
How to change the datascope of numeric/value data types created in AUTOSAR Interface Dictionary
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
There is no option to set the scope of data type.
I want to use this data type in export function. But tool is throwing error that,
"The data scope of data type 'TqFT' must be set to 'Imported' or 'Exported'. This condition is required to be able to export the declaration of argument"
0 Kommentare
Antworten (1)
Kautuk Raj
am 20 Aug. 2024
I reckon that you wish to change the data scope of the numeric/value data type ‘TqFT’ in the AUTOSAR Interface Dictionary to either “Imported” or “Exported” to ensure it can be used in an export function, as the current configuration is causing an error in MATLAB R2023a.
In MATLAB R2023a, a graphical user interface (GUI) has been introduced to facilitate this process. You can follow these steps:
Refer to the following documentation page for more details: https://www.mathworks.com/help/releases/R2023a/autosar/ug/configure-autosar-component-using-autosar-properties-explorer.html
For the benefit of others using MATLAB R2022b, I am sharing the workflow in this version as well. One can change the data scope to "Imported" or "Exported" using the Simulink API. Here is a sample:
dd = Simulink.data.dictionary.open('sl_dictionary.sldd');
designData = dd.getSection('Design Data');
s = designData.getEntry('myStruct');
v = s.getValue;
v.DataScope = 'Exported';
s.setValue(v);
I hope these streamlined processes would makes it easier to configure data types for code generation.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Manage Design Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!