Main Content

addLoggedSignalSet

Class: sltest.testmanager.TestCase
Namespace: sltest.testmanager

Add logged signal set to a test case

Syntax

obj = addLoggedSignalSet(tc,Name,Value)
obj = addLoggedSignalSet(tc,source,Name,Value)

Description

obj = addLoggedSignalSet(tc,Name,Value) creates and adds a LoggedSignalSet object to an sltest.testmanager.TestCase object.

obj = addLoggedSignalSet(tc,source,Name,Value) copies the LoggedSignalSet object, source, from another test case and adds it to the test case, tc, object.

Input Arguments

expand all

Test case object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Name of the logged signal set.

Example: obj = addLoggedSignalSet(tc,'Name','mylogset');

When the test case is an equivalence test, this index specifies the simulation that contains the signal set.

Example: obj = getLoggedSignalSets(tc_equiv,'SimulationIndex',2);

Logged signal set to copy to the test case, specified as an sltest.testmanager.LoggedSignalSet object from a different test case. You can copy only one logged signal set at a time. If the name of the copied signal set or the name you assign to it already exists in the test case, a number is appended to the name.

Example: obj = getLoggedSignalSets(tc,'Source',logset);

Examples

expand all

Create a test file, test suite, and test case. Then, create and add a signal set to the test case. Create another test case and copy the first signal set to the new test case.

tf = sltest.testmanager.TestFile('mytf.mldatx');
ts = sltest.testmanager.TestSuite(tf,'myts');
tc = sltest.testmanager.TestCase(ts,'baseline','mytc');

lgset = tc.addLoggedSignalSet;

tc1 = sltest.testmanager.TestCase(ts,'baseline','another_tc');
addLoggedSignalSet(tc1,'Source',lgset);

Version History

Introduced in R2019a

expand all