AmsTcpIpRouter Constructor (AmsNetId, Int32, IPAddress, Int32, IPNetwork, ILogger)

Initializes a new instance of the AmsTcpIpRouter class.

Namespace:  TwinCAT.Ads.TcpRouter
Assembly:  TwinCAT.Ads.TcpRouter (in TwinCAT.Ads.TcpRouter.dll) Version: 6.0.328+39e3229

Syntax

C#

public AmsTcpIpRouter(
    AmsNetId local,
    int externalPort,
    IPAddress? loopbackIP,
    int loopbackPort,
    IPNetwork? loopbackCommunicationNetwork,
    ILogger? logger
)

Parameters

local

Type: TwinCAT.Ads.AmsNetId
The (enforced) local NET Id.

externalPort

Type: System.Int32
The TCP/IP port the AmsTcpIpRouter is using.

loopbackIP

Type: System.Net.IPAddress
The loopback ip.

loopbackPort

Type: System.Int32
The loopback port.

loopbackCommunicationNetwork

Type: IPNetwork
The loopback communication sources.

logger

Type: Microsoft.Extensions.Logging.ILogger
The logger.

Remarks

This constructor doesn't read the 'StaticRoutes.xml'. Instead, it is expected to force the local AmsNetId, the TCP/IP port and add the routes as Dynamic routes.

Reference

AmsTcpIpRouter Class

AmsTcpIpRouter Overload

TwinCAT.Ads.TcpRouter Namespace