- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Paras Gupta
2024-6-18
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AUTOSAR Blockset 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!