speedgoat.IpAliasConfiguration
speedgoat.IpAliasConfiguration —
Configure additional network addresses for an Ethernet interface
Description
This Speedgoat API class provides all the necessary tools for adding, removing or showing
additional network addresses (IP aliases) for an Ethernet interface on your Speedgoat
real-time target machine.
Syntax
Construct the API class:
ipAliasObj = speedgoat.IpAliasConfiguration()
Construct the API class using additional options and one or more name-value pair arguments:
ipAliasObj = speedgoat.IpAliasConfiguration(___, name, value)
Add one or multiple IP aliases to an Ethernet interface:
ipAliasObj.add(ethernetInterfaceName, ipAliasList)
Remove one or multiple IP aliases from an Ethernet Interface:
ipAliasObj.remove(ethernetInterfaceName, ipAliasList)
Remove all IP aliases from an Ethernet Interface:
ipAliasObj.removeAll(ethernetInterfaceName)
Show the configuration list for all Ethernet interfaces:
ipAliasObj.show()
Examples
Construct the IP alias object for the default target machine:
ipAliasObj = speedgoat.IpAliasConfiguration()
Construct the IP alias object for a specified target machine using the target name (for example, 'TargetPC1'):
ipAliasObj = speedgoat.IpAliasConfiguration(___, 'TargetName', 'TargetPC1')
Construct the IP Alias object for a specified target machine using the target object (for example, tg):
ipAliasObj = speedgoat.IpAliasConfiguration(___, 'TargetObject', tg)
Add one IP alias to the ETH1 Ethernet interface:
ipAliasObj.add('ETH1', {'10.10.10.2'})Add multiple IP aliases to the ETH1 Ethernet interface:
ipAliasObj.add('ETH1', {'10.10.10.2', '10.10.10.3', '10.10.10.4', '10.10.10.5'})Remove one IP alias from the ETH1 Ethernet interface:
ipAliasObj.remove('ETH1', {'10.10.10.2'})Remove multiple IP aliases from the ETH1 Ethernet interface:
ipAliasObj.remove('ETH1', {'10.10.10.2', '10.10.10.3', '10.10.10.4', '10.10.10.5'})Remove all IP aliases from the ETH1 Ethernet interface:
ipAliasObj.removeAll('ETH1')Show the configuration list for all Ethernet interfaces:
ipAliasObj.show()
Input Arguments
ethernetInterfaceName - Ethernet Interface Name
[character vector].
The Ethernet interface name that you want to configure with an IP alias (for example,
'ETH1').
The name must be the same as it appears in the list generated by running ipAliasObj.show.
Refer to the Notes section below if you want to use the 'Host Link'
interface.
ipAliasList - IP alias (list)
[character vector | character cell arrays].
The IP alias that you want to add or remove from the Ethernet interface. There could be
either one or multiple aliases (up to 255) in a cell array.
Name-Value Pair Arguments:
'TargetName' - Target machine name
[character vector].
The name of the target machine you want to use.
'TargetObject' - Target object
[target object].
The target object of the target machine you want to use.
Notes
This function requires an Ethernet connection to your Speedgoat real-time target machine.
If no 'TargetObject' or 'TargetName' argument is given to the function, the default target
is used. Moreover, the 'TargetObject' argument takes precedence: if both arguments
are supplied, 'TargetName' will therefore be ignored.
Only Ethernet interfaces that are configured for IP communication can receive an IP alias. To
configure one use the speedgoat.configureEthernet API function.
IP aliases are persistent except for the Host Link (supported as of MATLAB R2022a).
Adding IP aliases to the Host Link and using them with protocols reduces the performance of
host-target-link applications such as Simulation Data Inspector (SDI).