Main Content

sltest.testsequence.readTransition

Read properties of test sequence transition

Description

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.

Examples

collapse all

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

1. Load the model.

Model = 'sltestRollRefTestExample';
load_system(Model)

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'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi')
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'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi','Action')
stepAction = 
    'Phi = 11.5;
     APEng = false;'

4. Read the transition properties for the parent step.

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 the model.

close_system(Model,0)

Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a string or character vector. Instead of the block path, you can use a block handle.

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. If the Test Sequence block is using scenarios, add the scenario name that contains the step to the beginning of the step path, for example, Scenario_2.SystemHeatingTest.InitializeHeating.

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

Version History

Introduced in R2017a