target.upgrade

Upgrade existing definitions of hardware devices

Description

target.upgrade(upgraderForRegistrationMechanism, pathToRegistrationFile) uses an upgrade procedure to create objects from data definitions in current artifacts. The function creates registerUpgradedTargets.m in the current working folder.

To register the upgraded data definitions with MATLAB®, run registerUpgradedTargets().

For persistence across MATLAB sessions, run registerUpgradedTargets('UserInstall', true).

target.upgrade(___, Name,Value) specifies additional options using one or more name-value pair arguments.

Examples

Upgrade Hardware Device Data Definitions

For a workflow example that uses the function, see Upgrade Data Definitions for Hardware Devices.

Input Arguments

collapse all

Select upgrade procedure for current registration mechanism.

Specify file that contains current registration mechanism.

Example: target.upgrade('rtwTargetInfo', 'myPath/mySubfolder/rtwTargetInfo.m')

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 quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: target.upgrade('rtwTargetInfo', 'myPath/mySubfolder/rtwTargetInfo.m','ExportFileName','myNewFile')

  • true –– Generate a MATLAB function that registers the upgraded definitions using target.add.

  • false –– Do not generate a function.

If ExportToMATLABFunction is true, the argument specifies the file name of the generated MATLAB function . Otherwise, the argument is ignored.

  • true –– If the file specified by ExportFileName exists, overwrite the file.

  • false –– If the file specified by ExportFileName exists, the function produces an error.

If ExportToMATLABFunction is false, the argument is ignored.

Introduced in R2019b