- evalc - https://www.mathworks.com/help/matlab/ref/evalc.html
- coder.asap2.getEcuDescriptions - https://www.mathworks.com/help/ecoder/ref/coder.asap2.getecudescriptions.html
- find - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.find.html
- set - https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.set.html
- coder.asap2.export - https://www.mathworks.com/help/ecoder/ref/coder.asap2.export.html
Exclude 'MEASUREMENT' signals from A2L for AUTOSAR model
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm trying to generate A2L file for an AUTOSAR model using API, 'coder.asap2.export'. Unlike the A2L file generated during build, A2L generated with this method is having 'MEASUREMENT' signals for IOs.
Is there any way to generate A2L for AUTOSAR model, without 'MEASUREMENT' signals?
0 Commenti
Risposte (1)
Paras Gupta
il 18 Giu 2024
Hi Shardul,
In order to generate an A2L file for an AUTOSAR model without the 'MEASUREMENT' signals', you can refer to the following code snippet:
% Open the specified Simulink model
open_system(model);
% Build the Simulink model, suppressing output with evalc
evalc('slbuild(model)');
% Get the ECU (Electronic Control Unit) descriptions from the model
desc = coder.asap2.getEcuDescriptions(model);
% Find all measurement objects within the ECU descriptions
measurements = desc.find('Measurement');
% Loop through each measurement object to set its 'Export' property to false
for idx = 1:length(measurements)
set(desc, measurements(idx) , 'Export', false);
end
% Export the modified ECU descriptions to a file named "CustomEcuDescriptions"
coder.asap2.export(model, "CustomEcuDescriptions",desc);
Please refer to the below documentations links for more information on the functions used above:
Hope this helps.
0 Commenti
Vedere anche
Categorie
Scopri di più su AUTOSAR Blockset in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!