Main Content

remove

Class: sltest.testmanager.LoggedSignalSet
Namespace: sltest.testmanager

Remove a logged signal set

Syntax

remove(lgset)

Description

remove(lgset) removes an sltest.testmanager.LoggedSignalSet object from an sltest.testmanager.TestCase object and invalidates its child signal objects.

Input Arguments

expand all

Logged signal set object contained in a test case.

Examples

expand all

Open the model for this example.

sldemo_absbrake

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

tf = sltest.testmanager.TestFile('rmSigs_testfile');
ts = sltest.testmanager.TestSuite(tf,'rmSigs_testsuite');
tc = sltest.testmanager.TestCase(ts,'baseline','rmsigs_testcase');

Create a signal set.

lgset = addLoggedSignalSet(tc);

Open the Vehicle Dynamics block and then the Vehicle block. Select the Vehicle Speed block. Then, enter gcb to obtain the full block path. Use the returned path to create a Simulink.BlockPath object.

blkpath=['sldemo_absbrake/'...
    'Vehicle Dynamics/Vehicle  /Vehicle Speed'];
bPath = Simulink.BlockPath(blkpath);
sig1 = lgset.addLoggedSignal(bPath,1);
sig2 = lgset.addLoggedSignal(bPath,2);

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

Remove the signal and check that the signal has been removed.

remove(sig2);
sigs = lgset.getLoggedSignals
sigs = 
  LoggedSignal with properties:

           Name: 'Vehicle Velocity'
         Source: 'sldemo_absbrake/Vehicle Dynamics/Vehicle  /Vehicle Speed'
      PortIndex: 1
         Active: 1
    PlotIndices: []

Version History

Introduced in R2019a