Main Content

sltest.testsequence.addSymbol

Add symbol to test sequence

Description

sltest.testsequence.addSymbol(blockPath,name,kind,scope) adds a symbol name with properties specified by scope and kind to a Test Sequence block specified by blockPath. The new symbol appears in the Symbols sidebar of the Test Sequence Editor. Symbols include data, messages, function calls, and triggers.

example

Examples

collapse all

This example creates a parameter theta in the Test Sequence block.

Open the Model and the Test Harness

rollModel = 'RollAutopilotMdlRef';
testHarness = 'RollReference_Requirement1_3';

open_system(rollModel);
sltest.harness.open([rollModel '/Roll Reference'],testHarness);

Add a New Parameter

sltest.testsequence.addSymbol...
   ('RollReference_Requirement1_3/Test Sequence',...
   'theta','Data','Parameter');

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'

Name of the new symbol, specified as a character vector. The symbol must not already exist in the Test Sequence block.

Example: 'theta'

Symbol type, specified as a character vector.

Example: 'Data'

Symbol scope, specified as a character vector.

Example: 'Parameter'

Version History

Introduced in R2016a