Main Content

isConnected

Get Boolean value representing target computer connection status

Since R2022b

    Description

    status = isConnected(tg) returns the status as true if the target is connected. And false if the target is not connected.

    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");

    Get the status of the target connection.

    status = isConnected(tg);

    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

    Output Arguments

    collapse all

    Status value will be set to true if the target is connected. And it will be set to false if the target is not connected.

    Version History

    Introduced in R2022b