Main Content

Migrator

Migrate data types and interfaces from base workspace and data dictionaries to an interface dictionary

Description

The interface dictionary Migrator object lets you perform migration from a model or an architecture.

The object functions let you programmatically execute the steps in the migration workflow, including:

  • Analyze the data types and interfaces to migrate

  • Apply the migration analysis

  • Revert the migration analysis

  • Save the applied migration changes

Image of interface dictionary migration data flow

Creation

migratorObj = Simulink.interface.dictionary.Migrator(modelName, 'InterfaceDictionaryName', dictionaryName, 'DeleteFromOriginalSource',deleteFlag, 'ConflictResolutionPolicy', conflictResolutionPolicyFlag) constructs a Migrator object representing the data types and interfaces to migrate from the base workspace and data dictionaries to the interface dictionary. See Create Interface Dictionary Migrator Object

The Migrator function input arguments select the model, interface dictionary, whether to delete variables from the model, and the conflict resolution policy.

Input Arguments

  • modelName — Name of the model

    character vector | string

    Name of source system architecture, specified as a character vector or string.

  • dictionaryName — Name of interface dictionary

    character vector | string

    Name of interface dictionary, specified as a character vector or string. The name must include the .sldd extension and must be a valid MATLAB® identifier.

  • deleteFlag — Select variable deletion

    true (default) | false

    Selects (if true) whether to delete variables (data types and interfaces) from the source base workspace and data dictionaries after these migrate to the interface dictionary.

  • conflictResolutionPolicyFlag — Select conflict resolution

    'Error' (default) | 'OverwriteInterfaceDictionary' | 'KeepInterfaceDictionary'

    Selects resolution policy for merge conflicts between data types and interfaces in the base workspace and the data dictionaries versus those already present in the interface dictionary.

    Keep Interface Dictionary

    Image of keep interface dictionary policy

    Overwrite Interface Dictionary

    Image of overwrite interface dictionary policy

Output Arguments

  • migratorObjMigrator object

    Migrator object

    Migrator object, specified by a Simulink.interface.dictionary.Migratorfunction.

Properties

expand all

Selects (if true) whether to delete variables from the source base workspace and data dictionaries after these migrate to the interface dictionary.

Selects resolution policy for merge conflicts between data types and interfaces in source base workspace and data dictionaries versus those already present in the interface dictionary.

Analysis result from the analyze function listing data types and interfaces to migrate from the base workspace and data dictionaries to the interface dictionary. An interface is a Simulink.Bus used in a root IO. Other Simulink.Bus objects are considered as data types

Analysis result from the analyze function listing interfaces to migrate from the base workspace and data dictionaries to the interface dictionary.

Analysis result from the analyze function listing objects in conflict with the interface dictionary.

Analysis result from the analyze function listing objects not used in the base workspace and data dictionaries.

Analysis result from the analyze function listing unsupported objects to migrate.

Object Functions

analyzeAnalyze a model or an architecture for migration to interface dictionary
analyzeAndApplyAnalyze a model or an architecture and apply migration to interface dictionary
applyApply interface dictionary migration changes from analysis of a model or an architecture
revertRevert interface dictionary migration changes applied from analysis of a model or an architecture
saveSave applied interface dictionary migration changes from analysis of a model or an architecture

Examples

collapse all

Create a Migrator object to migrate data types and interfaces from base workspace and data dictionaries to an interface dictionary.

To create a Migrator object, use the Simulink.interface.dictionary.Migrator function. After creating the object, you can use the analyze function to populate the object properties.

myMigratorObj= Simulink.interface.dictionary.Migrator('mySoftwareArch', ...
    'InterfaceDictionaryName','MyInterfaces.sldd')
myMigratorObj = 

  Migrator with properties:

    DeleteFromOriginalSource: 1
    ConflictResolutionPolicy: "Error"
          DataTypesToMigrate: []
         InterfacesToMigrate: []
             ConflictObjects: []
               UnusedObjects: []
        UnsupportedMigration: []

Version History

Introduced in R2022b