How to programmatically update "Code Mappings - AUTOSAR SW Component "?

How I can update "Code Mappings - AUTOSAR SW Component " settings of an AUTOSAR component programmatically (using matlab scripts)?
My component have large number of outports and I want to automate the process of updating Code Mapping settings.

 採用された回答

Gargi Patil
Gargi Patil 2021 年 8 月 9 日
編集済み: Gargi Patil 2021 年 8 月 9 日

0 投票

Outports and other model elements can be programmatically configured through the interface for code mappings.
You can refer to this linked documentation which provides code to configure outputs. Here is a sample code you can use:
set_param(model,'DefaultParameterBehavior','Tunable');
codeMappings = coder.mapping.utils.create(model);
outports = find(codeMappings, 'Outports');
setOutport(codeMappings,outports(1), property, valueToSet);
For further information, the documentations for coder.mapping.api.CodeMapping and AUTOSAR Programmatic Interfaces outline related functions.

2 件のコメント

Vishvam Rastogi
Vishvam Rastogi 2021 年 8 月 9 日
Thanks for the information.
Below link mentions about modifying outport property in Code Mappings - AUTOSAR SW Component in detail.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAUTOSAR Blockset についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 8 月 6 日

コメント済み:

Y
Y
2025 年 6 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by