メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

getSignalsOfInterest

クラス: coder.codedescriptor.CodeDescriptor
名前空間: coder.codedescriptor

Return description of signals of interest

R2025a 以降

構文

signals = getSignalsOfInterest(selector)
signals = getSignalsOfInterest(selector1,selector2,...)

説明

signals = getSignalsOfInterest(selector) returns a list of SignalOfInterest objects describing signals that match the given selector selector.

signals = getSignalsOfInterest(selector1,selector2,...) returns a list of SignalOfInterest objects describing signals that match any of the given selectors.

入力引数

すべて展開する

Selector matching the type of signal for which you want to retrieve information in the generated code, specified as a character vector.

  • 'TestPoint' — Return a description of test points in the generated code.

  • 'DataLogging' — Return a description of logged signals in the generated code.

データ型: char

Output Arguments

すべて展開する

List of signals of interest in the generated code, returned as a vector of coder.descriptor.SignalOfInterest objects.

すべて展開する

  1. Open the model.

    openExample('CustomCodeComments')
  2. Create a test point for the output of the Stateflow® block.

    portHandles = get_param('CustomCodeComments/Stateflow','portHandles');
    outportHandle = portHandles.Outport;
    set_param(outportHandle,'TestPoint','on')

  3. Build the model.

    slbuild('CustomCodeComments')

  4. Create a coder.codedescriptor.CodeDescriptor object for the required model.

    codeDescObj = coder.getCodeDescriptor('CustomCodeComments')
    

  5. Retrieve information about the code representation of the test point by calling getSignalsOfInterest with the appropriate selector.

    signals = codeDescObj.getSignalsOfInterest('TestPoint')
    signals = 
    
      SignalOfInterest with properties:
        DataInterface: [1×1 coder.descriptor.DataInterface]

バージョン履歴

R2025a で導入