Main Content


Get handle of target computer

Since R2022b



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


    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", "", "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