Documentation

sltest.harness.clone

Copy test harness

Syntax

sltest.harness.clone(HarnessOwner,HarnessName)
sltest.harness.clone(HarnessOwner,HarnessName,NewHarness)
sltest.harness.clone(HarnessOwner,HarnessName,Name,Value)

Description

sltest.harness.clone(HarnessOwner,HarnessName) clones the test harness HarnessName associated with the model or component HarnessOwner. The cloned harness contains the source harness model contents, configuration settings, and callbacks.

sltest.harness.clone(HarnessOwner,HarnessName,NewHarness) uses an additional argument NewHarness to specify the name of the cloned harness.

sltest.harness.clone(HarnessOwner,HarnessName,Name,Value) clones the test harness HarnessName associated with HarnessOwner using additional options specified by one or more Name,Value pair arguments.

Examples

collapse all

Create a test harness ControllerHarness1 for the Controller subsystem of the model f14. Clone the harness and save it as ControllerHarness2.

f14
sltest.harness.create('f14/Controller','Name','ControllerHarness1',...
'SynchronizationMode','SyncOnOpenAndClose')
sltest.harness.clone('f14/Controller','ControllerHarness1','ControllerHarness2')

Clone the test harness ControllerHarness1 created in the previous step to the Aircraft Dynamics Model subsystem and save it as ControllerHarnessClone.

sltest.harness.clone('f14/Controller','ControllerHarness1','DestinationOwner',...
'f14/Aircraft Dynamics Model','Name','ControllerHarnessClone')

Input Arguments

collapse all

Model or component handle or path, specified as a character vector or a double.

Example: 1.9500e+03

Example: 'f14'

Example: 'f14/Controller'

The name of the source harness, specified as a character vector.

Example: 'ControllerHarness'

The name of the cloned harness, specified as a character vector. If no value is specified, a default value is automatically generated.

Example: 'ControllerHarness2'

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'DestinationOwner','model3/Controller3','Name','newClonedHarness'

collapse all

Owner block to which the test harness is cloned, specified as the comma-separated pair consisting of 'DestinationOwner' and a character vector.

Example: 'DestinationOwner','model3/Controller3'

The name of the cloned test harness, specified as the comma-separated pair consisting of 'Name' and a character vector. If no value is specified for Name, a default value is automatically generated.

Example: 'Name','newClonedHarness'

Introduced in R2015b

Was this topic helpful?