メインコンテンツ

sltest.testsequence.readTransition

テスト シーケンス遷移のプロパティを読み取る

説明

transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index) は、Test Sequence ブロック blockPath のテスト ステップ stepPath にある、遷移 index のプロパティの struct transitionInfo を返します。

transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index,Property) は、遷移の Property の値 transitionInfo を返します。

すべて折りたたむ

この例では、Test Sequence ブロック内のテスト ステップと遷移のプロパティを読み取ります。

1.モデルを読み込みます。

Model = 'sltestRollRefTestExample';
load_system(Model)

2.AttitudeLevels.APEngage_MedRoll のサブステップであるテスト ステップ SetMedPhi のプロパティを読み取ります。

stepInfo = sltest.testsequence.readStep([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi')
stepInfo = struct with fields:
               Name: 'AttitudeLevels.APEngage_MedRoll.SetMedPhi'
             Action: 'Phi = 11.5;↵APEng = false;'
         IsWhenStep: 0
      IsWhenSubStep: 0
        Description: ''
              Index: 1
    TransitionCount: 1

3.同じステップのアクションを読み取ります。

stepAction = sltest.testsequence.readStep([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi','Action')
stepAction = 
    'Phi = 11.5;
     APEng = false;'

4.親ステップの遷移のプロパティを読み取ります。

xInfo = sltest.testsequence.readTransition([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll',1)
xInfo = struct with fields:
         Step: 'AttitudeLevels.APEngage_MedRoll'
        Index: 1
    Condition: 'duration(DD_PhiRef == 0,sec) >= DurationLimit'
     NextStep: 'AttitudeLevels.APEngage_HighRoll'

5.モデルを閉じます。

close_system(Model,0)

入力引数

すべて折りたたむ

Test Sequence ブロックのブロック名を含むパス。string または文字ベクトルとして指定します。ブロック パスの代わりにブロック ハンドルを使用できます。

例: 'FanSpeedTestHarness/Test Sequence'

Test Sequence ブロック内のステップのパス。文字ベクトルとして指定します。パスにはテスト シーケンス階層におけるステップの場所を含めます。階層レベルは . を使用して区切ります。Test Sequence ブロックでシナリオを使用している場合は、ステップを含むシナリオの名前をステップ パスの先頭に追加します。たとえば、Scenario_2.SystemHeatingTest.InitializeHeating のようになります。

例: 'SystemHeatingTest.InitializeHeating'

編集するテスト ステップ内の遷移を指定する整数。Test Sequence エディターの Transition セルに表示される整数に対応します。

例: 3

遷移のプロパティ。文字ベクトルとして指定します。特定のシンボルの有効なプロパティを見つけるには、sltest.testsequence.readTransition(blockPath,stepPath,index) を使用してシンボルのプロパティを読み取ります。

例: 'Step'

例: 'Index'

例: 'Condition'

例: 'NextStep'

出力引数

すべて折りたたむ

テスト ステップ遷移のプロパティ。

例: struct

バージョン履歴

R2017a で導入