Main Content

getAllTargets

Get list of available target computers

Since R2022b

    Description

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

    Examples

    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", "178.10.10.1", "user1", "myPassword");
    tg1 = tgs.addTarget("LinuxTarget2", "178.10.10.2", "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