target.Alias - Create alternative identifier for target object - MATLAB (original) (raw)
Main Content
target.Alias Class
Namespace: target
Create alternative identifier for target object
Description
Use the target.Alias
class to create alternative identifiers for target objects. For example, if a target object has a long class identifier, you can create atarget.Alias
object that provides a short identifier for the target object.
To create a target.Alias
object, use the target.create function.
Properties
Alternative identifier for target object.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Original target object.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Examples
To create alternative identifiers for target objects, use the target.Alias
class.
For example, if a target.Processor
object has a long class identifier, you can create a target.Alias
object that provides a short identifier for the target.Processor
object.
Retrieve the target.Processor
object.
proccesorObj = target.get("Processor", ... "Analog Devices-ADSP-CM40x (ARM Cortex-M)");
Use the target.create
function to create a target.Alias
object.
aliasProcessorObj = target.create("Alias");
Use target.Alias
object properties to specify the alternative identifier and original target object.
aliasProcessorObj.Name = "myShortName"; aliasProcessorObj.For = proccesorObj;
Add the target.Alias
object to an internal database.
objectsAdded = target.add(aliasProcessorObj);
target.add summary:
Objects added to internal database for current MATLAB session:
target.Alias "myShortName"
1 object not added because they already exist.
To retrieve the original target.Processor
object, enter:
target.get("Processor","myShortName");
To remove the objects from the internal database, enter:
target.remove(objectsAdded)
target.remove summary:
Objects removed from internal database:
target.Alias "myShortName"
Version History
Introduced in R2019a