メインコンテンツ

setInterface

R2026b

ポートのインターフェイスを設定する

    説明

    setInterface(port,interface) は、ポートのインターフェイスを設定します。

    例

    例

    すべて折りたたむ

    モデルを作成し、ルート アーキテクチャを取得します。

    model = systemcomposer.createModel("archModel");
    systemcomposer.openModel("archModel");
    rootArch = get(model,"Architecture");

    コンポーネントを追加し、そのコンポーネントにポートを追加します。

    newComponent = addComponent(rootArch,"newComponent");
    newPort = addPort(newComponent.Architecture,"newPort","in");

    データ インターフェイスを追加し、ポートのインターフェイスを設定します。

    newInterface = addInterface(model.InterfaceDictionary,"newInterface");
    setInterface(newPort,newInterface)

    ポートのデータ インターフェイスを削除します。

    newPort.setInterface("")

    入力引数

    すべて折りたたむ

    ポート。systemcomposer.arch.ArchitecturePort オブジェクトまたは systemcomposer.arch.ComponentPort オブジェクトとして指定します。

    設定するインターフェイス。systemcomposer.interface.DataInterface オブジェクト、systemcomposer.ValueType オブジェクト、systemcomposer.interface.PhysicalInterface オブジェクト、または systemcomposer.interface.ServiceInterface オブジェクトとして指定します。空の string または文字ベクトルを渡すと、ポートのインターフェイスが削除されます。

    詳細

    すべて折りたたむ

    バージョン履歴

    R2019a で導入

    参考

    関数

    オブジェクト

    ブロック

    ツール