This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Read properties of test sequence transition


transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index)
transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index,Property)


transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index) returns a struct transitionInfo of properties for the transition index, in the test step stepPath of the Test Sequence block blockPath.

transitionInfo = sltest.testsequence.readTransition(blockPath,stepPath,index,Property) returns the value transitionInfo of the Property for the transition.


collapse all

This example reads properties of a test step and a transition in a Test Sequence block.

1. Load the model.

Model = 'sltestRollRefTestExample';

2. Read the properties of the test step SetMedPhi, which is a sub-step of AttitudeLevels.APEngage_MedRoll.

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

3. Read the action of the same step.

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

4. Read the transition properties for the parent step.

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

5. Close the model.


Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a character vector.

Example: 'FanSpeedTestHarness/Test Sequence'

Path of the step in the Test Sequence block, specified as a character vector. The path includes the step location in the Test Sequence hierarchy, using . to separate hierarchy levels.

Example: 'SystemHeatingTest.InitializeHeating'

Integer specifying the transition in the test step to be edited. Corresponds to the integer displayed in the Transition cell of the Test Sequence Editor.

Example: 3

Transition property, specified as a character vector. To find valid properties for a particular symbol, read properties of the symbol using sltest.testsequence.readTransition(blockPath,stepPath,index).

Example: 'Step'

Example: 'Index'

Example: 'Condition'

Example: 'NextStep'

Output Arguments

collapse all

Properties of the test step transition.

Example: struct

Introduced in R2017a