Simulink.CloneDetection.Settings Class
Namespace: Simulink.CloneDetection
Description
Use objects of the Simulink.CloneDetection.Settings
class to
specify certain conditions when calling the Simulink.CloneDetection.findClones
function.
Creation
Description
Simulink.CloneDetection.Settings
creates an object of the
Simulink.CloneDetection.Settings
class.
Properties
IgnoreSignalName
— Ignore differences in signal names
false
or 0
|
true
or 1
Option to ignore signal name differences while detecting clones, specified
as false
or true
.
IgnoreBlockProperty
— Ignore differences in block property
false
or 0
|
true
or 1
Option to ignore block property differences while detecting clones,
specified as false
or true
.
ExcludeModelReferences
— Model references exclusion
false
or 0
|
true
or 1
Option to exclude Model Reference blocks from search clone patterns,
specified as false
or true
.
ExcludeLibraryLinks
— Exclude library links
false
or 0
|
true
or 1
Option to exclude library links from search clone patterns, specified as
false
or true
.
ParamDifferenceThreshold
— Maximum number of parameter differences allowed to consider pattern as clone
uint32
Number of differences allowed to consider a pattern as a clone, specified
as a uint32
integer.
ReplaceExactClonesWithSubsystemReference
— Replace exact clones with Subsystem Reference blocks
false
or 0
|
true
or 1
Option to replace exact clones with Subsystem Reference blocks, specified
as false
or true
.
Libraries
— Path to libraries
character vector
| array of character
vectors
| strings
Path to libraries used to replace patterns in the model, specified as a character vector or array of character vectors.
Folders
— Path to folders
character vector
| array of character
vectors
| strings
Path to folders that contain the models, specified as a character vector or array of character vectors.
FindClonesRecursivelyInFolders
— Find clones recursively in folders
false
or 0
|
true
or 1
Option to find clones in models from the folders present inside the
specified folder, specified as false
or
true
.
This property applies only when you provide input to
Folders
.
DetectClonesAcrossModel
— Option to detect clones across model
false
or 0
|
true
or 1
Option to detect clones anywhere across the model, specified as
false
or true
.
MinimumRegionSize
— Minimum number of blocks
uint32
Minimum number of blocks in a region required to consider a pattern as a
clone, specified as a uint32
integer.
This property applies only when DetectClonesAcrossModel
is true
.
MinimumCloneGroupSize
— Minimum number of clone pattern occurrences
uint32
Minimum number of clone pattern occurrences required to consider a pattern
as a clone group, specified as a uint32
integer.
This property applies only when DetectClonesAcrossModel
is true
.
ExcludeInactiveRegions
— Exclude inactive or commented-out regions
false
or 0
|
true
or 1
Option to exclude inactive regions or commented-out regions from search
clone patterns, specified as false
or
true
.
DataTypeCheck
— Data type check
false
or 0
|
true
or 1
Option to determine whether the inport data types of the library subsystem
matches the inport data types of the clones in the model, specified as
false
or true
.
Methods
Public Methods
addLibraries | Add library with subsystems |
removeLibraries | Remove library |
addFolders | Add folders with models |
removeFolders | Remove folder |
Examples
Create Settings Object for Clone Detection Operations
Create a
cloneDetectionSettings
object fromSimulink.CloneDetection.Settings
class.cloneDetectionSettings = Simulink.CloneDetection.Settings();
Change the property of
IgnoreSignalName
totrue
to ignore signal name differences while detecting clones.cloneDetectionSettings.IgnoreSignalName = true
cloneDetectionSettings = Settings with properties: IgnoreSignalName: 1 IgnoreBlockProperty: 0 ExcludeModelReferences: 0 ExcludeLibraryLinks: 0 SelectedSystemBoundary: '' FindClonesRecursivelyInFolders: 1 ParamDifferenceThreshold: 50 ReplaceExactClonesWithSubsystemReference: 0 Libraries: {} Folders: {} DetectClonesAcrossModel: 0 ExcludeInactiveRegions: 0 DataTypeCheck: 0
Version History
Introduced in R2021a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)