Main Content

sltest.testmanager.SignalCriteria Class

Namespace: sltest.testmanager

Add or modify signal criteria

Description

An instance of sltest.testmanager.SignalCriteria is an individual signal in a criteria set in a test case that determines the pass-fail criteria.

The sltest.testmanager.SignalCriteria class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

obj = getAllSignalCriteria creates a sltest.testmanager.SignalCriteria object for a baseline or equivalence test case object.

example

Properties

expand all

Absolute tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: scalar

Signal block path, returned as a character vector. This property is read-only.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: char

Signal data source, returned as a character vector. This property is read-only.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: char

Indicates if the signal criteria is enabled, 0 if it is not enabled, and 1 if it is enabled.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: logical

The method of interpolation used to align signal data, specified as 'zoh' or 'linear'. The method can be one of the following:

  • 'zoh' — Zero-order hold. Data values are interpolated by holding their value at the previous time point.

  • 'linear' — Interpolated data values are determined by taking the data values at the previous and next time points. These two points form the linear interpolant, which becomes a straight line between these points. The interpolated data value is the point at which the linear interpolant and time point meet.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: char

Lagging time tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set. LaggingTol is in seconds.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: scalar

Leading time tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set. LeadingTol is in seconds.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: scalar

Signal name, returned as a character vector.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: char

Relative tolerance at a signal level, specified as a scalar. Set this value on the signal to override the value set in the baseline or equivalence criteria set.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: scalar

Signal identifier, returned as a character vector.

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: char

The method of time synchronization used when a signal is compared to another signal, specified as 'union' or 'intersection'. The method can be one of the following:

  • 'union' — Compare using a time vector that is the union of the time vectors of both timeseries. This method of time synchronization might require value interpolation.

  • 'intersection' — Compare using a time vector that is the intersection of the time vectors of both timeseries. This method of time synchronization does not require value interpolation because only time points common to both time series are considered.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: char

Methods

expand all

Examples

collapse all

Open the model for this example.

sldemo_absbrake

Create the test file, test suite, and test case structure.

tf = sltest.testmanager.TestFile('test_file.mldatx');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'baseline','Baseline API Test Case');

Remove the default test suite.

tsDel = getTestSuiteByName(tf,'New Test Suite 1');
remove(tsDel);

Assign the system under test to the test case.

setProperty(tc,'Model','sldemo_absbrake');

Capture the baseline criteria.

baseline = captureBaselineCriteria(tc,'baseline_API.mat',true);

Test a new model parameter by overriding it in the test case parameter set.

ps = addParameterSet(tc,'Name','API Parameter Set');
po = addParameterOverride(ps,'m',55);

Set the baseline criteria tolerance for one signal.

sc = getSignalCriteria(baseline);
sc(1).AbsTol = 9;

Clear the Test Manager.

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

Version History

Introduced in R2015b