Main Content

sltest.testsequence.readStep

Read Test Sequence block steps

Description

stepInfo = sltest.testsequence.readStep(blockPath,stepPath) returns a struct stepInfo of properties for the test step stepPath in the Test Sequence block blockPath.

stepInfo = sltest.testsequence.readStep(blockPath,stepPath,Property) returns the value stepInfo of the Property for the test step.

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'

Property of the test step, specified as a character vector.

Example: 'TransitionCount'

Output Arguments

collapse all

Properties of the test step.

Example: struct

Version History

Introduced in R2017a