Clear Filters
Clear Filters

Exclude 'MEASUREMENT' signals from A2L for AUTOSAR model

7 views (last 30 days)
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?

Answers (1)

Paras Gupta
Paras Gupta on 18 Jun 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.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!