Main Content

setIPAddress

Set IP address for target computer

Since R2022b

    Description

    setIPAddress(tg, IPAddress) sets the specified IP address for the target.

    example

    Examples

    collapse all

    Create a target object and add a target with name LinuxTarget1 containing user name user1 and password myPassword.

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

    Set the IP address.

    tg.setIPAddress("178.12.121.150");

    Input Arguments

    collapse all

    Object represents a target computer. Use the object to establish the connection with Linux target, to deploy the applications on Linux target, and perform several other actions.

    Example: myTargetHandle

    Specify the IP address for the selected target. Only IPv4 addresses are accepted.

    Example: "171.12.134.151"

    Version History

    Introduced in R2022b