Main Content


Get list of available target computers

Since R2022b


    targetNames = getAllTargets(tgs) returns the list of the target names available in the target object.


    collapse all

    Create a target object and add targets with names LinuxTarget1 and LinuxTarget2. Return the list of target names.

    tgs = linux.Targets();
    tg = tgs.addTarget("LinuxTarget1", "", "user1", "myPassword");
    tg1 = tgs.addTarget("LinuxTarget2", "", "user1", "myPassword");
    targetNames = getAllTargets(tgs);

    Input Arguments

    collapse all

    Target object created by the linux.Targets class.

    Example: tgs, target_object

    Output Arguments

    collapse all

    Contains the list of the target names that were added to the target object.

    Version History

    Introduced in R2022b