Main Content

setipaddr

Set IP address and netmask on the target computer

Description

target_object = slrealtime.setipaddr(target_object,'ipaddr','netmask') sets the IP address and netmask on the target computer that is identified by the target object. If the netmask argument is omitted, the default value is '255.255.255.0'.

example

Examples

collapse all

For target object tg, set the target computer IP address to '192.168.7.5' and the netmask to '255.255.255.0'. These values are retained by the target computer.

tg = slrealtime('TargetPC1');
tg = slrealtime.setipaddr(tg,'192.168.7.5','255.255.255.0');
reboot(tg);

Input Arguments

collapse all

Object that represents target computer, specified as a Target object. The object provides access to methods that manipulate the target computer properties.

Example: tg

This value sets the IP address of the target computer.

Example: '192.168.7.5'

This value sets the netmask of the target computer.

Example: '255.255.255.0'

Output Argument

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Version History

Introduced in R2020b

expand all