Main Content

getTarget

Get handle of target computer

Since R2022b

    Description

    example

    tg = getTarget(tgs,targetName) returns the handle of the target targetName if it is already added to the target object.

    Examples

    collapse all

    Add a target with name LinuxTarget1 for the target object and get the handle of the target.

    tgs = linux.Targets();
    addTarget(tgs, "LinuxTarget1", "178.10.10.1", "user1", "myPassword");
    tg = getTarget(tgs, "LinuxTarget1");

    tg contains the handle for the target.

    Input Arguments

    collapse all

    Target object created by the linux.Targets class.

    Example: tgs, target_object

    Specify a name for the target.

    Example: "LinuxTarget1"

    Output Arguments

    collapse all

    Holds the handle for the specified target.

    Version History

    Introduced in R2022b