AmsNetIdIsSameTarget(AmsNetId, Boolean) Method

Determines whether the AmsNetIds refer to the same target.


Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public bool IsSameTarget(
    AmsNetId netID,
    bool ignoreSubId
)

Parameters

netID  AmsNetId

The NetId to comparer

ignoreSubId  Boolean

Indicates only to check the first 4 parts of the address (for SubId check).

Return Value

Boolean
true if the target systems are the same, otherwise false.

Exceptions

Exception

Condition

ArgumentNullException

netIDA

ArgumentNullException

netIDB

Remarks

In comparison to the Equals(Object) or Equals(AmsNetId, AmsNetId) methods, this Method alse checks against the LocalHost ID, which means that LocalHost is the same target as Local

Reference

AmsNetId Class IsSameTarget Overload TwinCAT.Ads Namespace Equals(Object) Equals(AmsNetId, AmsNetId)

Beckhoff Automation GmbH & Co. KG 2001-2026