Main Content

Simulink.SubsystemReference.generateSignatures

Generate unit test signatures of subsystem file

Since R2023a

Description

example

Simulink.SubsystemReference.generateSignatures(SSRefName) generates simulation signatures of all the unit tests of the subsystem file SSRefName.

example

Simulink.SubsystemReference.generateSignatures(SSRefName,{testHarness1,...,testHarnessN}) generates the simulation signatures of one or more unit tests testHarness1,...,testHarnessN of the subsystem file SSRefName.

Examples

collapse all

Generate signatures of all the unit tests of the subsystem file slexReusableSS.

ssfile = "slexReusableSS";
open_system(ssfile);
Simulink.SubsystemReference.generateSignatures(ssfile);
save_system(ssfile);

Generate signatures of specified unit tests of the subsystem file slexReusableSS.

ssfile = "slexReusableSS";
open_system(ssfile);
Simulink.SubsystemReference.generateSignatures...
    (ssfile,{"ssref1_double"});
save_system(ssfile);

Input Arguments

collapse all

Name of the subsystem file, specified as a string scalar or character vector. You can also specify the handle of the subsystem file.

Example: "slexReusableSS"

Data Types: string | char

Names of the unit tests, specified as a cell array of strings or character vectors.

Example: {'ssref1_double'}

Example: {'ssref1_double','ssref1_int32'}

Data Types: cell

Version History

Introduced in R2023a