Main Content

getOutputTriggerResults

Class: sltest.testmanager.TestIterationResult
Namespace: sltest.testmanager

Create output trigger results object for test iteration

Since R2023a

Syntax

otr = getOutputTriggerResults(tir)
otr = getOutputTriggerResults(tcr)

Description

otr = getOutputTriggerResults(tir) creates an output trigger results object from a test iteration result tir object.

otr = getOutputTriggerResults(tcr) creates an output trigger results object from a test case result tcr object. Use this syntax for a test case that does not have iterations.

Input Arguments

expand all

Test iteration result from which to get the output trigger results, specified as a sltest.testmanager.TestIterationResult object.

Test case result from which to get the output trigger results, specified as a sltest.testmanager.TestCaseResult object.

Output Arguments

expand all

Output trigger result of the specified test case iteration, returned as an sltest.testmanager.OutputTriggerResult object.

Examples

expand all

This example shows how to get output trigger results for an iteration. The test file has iterations and has a duration trigger set to start at 5 seconds after simulation starts and end at the end of simulation.

Load the test file.

tf = sltest.testmanager.load('GetTestIterationResults');

Run the test and get the results.

resultset = run(tf);
tfr = getTestFileResults(resultset);
tsr = getTestSuiteResults(tfr);
tcr = getTestCaseResults(tsr);
tir = getIterationResults(tcr);

Create and view the output trigger results object for the first iteration.

ot = getOutputTriggerResults(tir(1))
ot = 
  OutputTriggerResult with properties:

         StartLoggingMode: Duration
          StopLoggingMode: SameAsSim
    StartLoggingCondition: ''
     StopLoggingCondition: ''
     StartLoggingDuration: 5
      StopLoggingDuration: 0
              ShiftToZero: 1
    LoggingStartTimeInSim: 5
     LoggingStopTimeInSim: 14.0900
       LoggedRunStartTime: 0
        LoggedRunStopTime: 9.0900

Clear and close the Test Manager.

sltest.testmanager.clear
sltest.testmanager.clearResults
sltest.testmanager.close

Version History

Introduced in R2023a