メインコンテンツ

getStereotype

プロファイル内のステレオタイプを名前で検索

    説明

    stereotype = getStereotype(profile,name) は、プロファイル内のステレオタイプを名前で検索します。

    すべて折りたたむ

    レイテンシ特性のプロファイルを作成します。

    profile = systemcomposer.profile.Profile.createProfile("LatencyProfileB");
    
    connLatency = profile.addStereotype("ConnectorLatency",AppliesTo="Connector");
    connLatency.addProperty("secure",Type="boolean");
    connLatency.addProperty("linkDistance",Type="double");
    
    nodeLatency = profile.addStereotype("NodeLatency",AppliesTo="Component");
    nodeLatency.addProperty("resources",Type="double",DefaultValue="1");
    
    portLatency = profile.addStereotype("PortLatency",AppliesTo="Port");
    portLatency.addProperty("queueDepth",Type="double");
    portLatency.addProperty("dummy",Type="int32");

    プロファイルに含まれるステレオタイプ ConnectorLatency を取得します。

    stereotype = getStereotype(profile,"ConnectorLatency")
    stereotype = 
      Stereotype with properties:
    
                        Name: 'ConnectorLatency'
                 Description: ''
                      Parent: [0×0 systemcomposer.profile.Stereotype]
                   AppliesTo: 'Connector'
                    Abstract: 0
                        Icon: ''
        ComponentHeaderColor: [210 210 210]
          ConnectorLineColor: [168 168 168]
          ConnectorLineStyle: 'Default'
          FullyQualifiedName: 'LatencyProfileB.ConnectorLatency'
                     Profile: [1×1 systemcomposer.profile.Profile]
             OwnedProperties: [1×2 systemcomposer.profile.Property]
                  Properties: [1×2 systemcomposer.profile.Property]
    
    

    この例を再度実行するには、プロファイルを閉じます。

    profile.close(true)
    

    入力引数

    すべて折りたたむ

    プロファイル。systemcomposer.profile.Profile オブジェクトとして指定します。

    ステレオタイプの名前。文字ベクトルまたは string として指定します。ステレオタイプの名前はプロファイル内で一意でなければなりません。

    例: "electricalComponent"

    データ型: char | string

    出力引数

    すべて折りたたむ

    見つかったステレオタイプ。systemcomposer.profile.Stereotype オブジェクトとして返されます。

    詳細

    すべて折りたたむ

    バージョン履歴

    R2019a で導入