Main Content

目标。get

Retrieve target objects from internal database

Since R2019a

Description

example

targetObject= target.get(targetType,targetObjectId)retrieves a target object from an internal database.

tFOList= target.get(targetType)returns a list oftargetTypeobjects that are stored in the internal database.

example

tFOList= target.get(targetType, Name, Value)returns a list oftargetTypeobjects that have properties that match the name-value pairs.

Examples

collapse all

This example shows how you can remove a目标。LanguageImplementationobject associated with an object identifier,myLanguageImplementationID.

Retrieve the object from the internal database.

objectToRemove = target.get('LanguageImplementation', myLanguageImplementationID);

Remove the object.

目标。remove(objectToRemove);

This example shows how to create a目标。Boardobject that provides MATLAB®with a description of processor attributes. It uses目标。getto retrieve the description of a supported processor.

Create a board object.

hostTarget = target.create('Board','Name','Host Intel processor');

Specify the processor for the board by reusing a supported processor.

hostTarget.Processors = target.get('Processor',...'Intel-x86-64 (Linux 64)');

Input Arguments

collapse all

Specify the class of the object that you want to retrieve. For example, to retrieve:

  • A目标。Processorobject, specify'Processor'.

  • A目标。LanguageImplementationobject, specify'LanguageImplementation'.

For the list of supported classes, seetarget Package.

Specify the unique identifier of the object that you want to retrieve, that is, theIdproperty value of the object.

Output Arguments

collapse all

Retrieved target object. For example:

  • IftargetTypeis'Processor', the returned object is a目标。Processorobject.

  • IftargetTypeis'LanguageImplementation', the returned object is a目标。LanguageImplementationobject.

For the list of supported classes, seetarget Package.

List of retrieved target objects.

Version History

Introduced in R2019a