AmsNetId Class
Class representing an Address in the TwinCAT System (AMS/ADS Net ID).
Inheritance Hierarchy
SystemObject
TwinCAT.AdsAmsNetId
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads.Abstractions (in
TwinCAT.Ads.Abstractions.dll) Version:
7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
[SerializableAttribute]
public class AmsNetId : IComparable<AmsNetId>,
IComparableThe AmsNetId type exposes the following members.
Constructors
|
|
Name |
Description |
|---|---|---|
|
|
Copy Constructor | |
|
|
Constructor | |
|
|
Initializes a new instance of the AmsNetId class from Memory. | |
|
|
Constructor |
Properties
|
|
Name |
Description |
|---|---|---|
|
|
Gets the broadcast address (255.255.255.255.255.255) | |
|
|
Creates an empty NetId ("0.0.0.0.0.0") | |
|
|
Gets a value indicating whether this AmsNetId is the broadcast address (255.255.255.255.255.255) | |
|
|
Gets a value indicating whether this instance is empty / Uninitialized (AmsNetId: 0.0.0.0.0.0) | |
|
|
Determines, whether the AmsNetId is the Address of the local system (or the LocalHost address). | |
|
|
Indicates, that this AmsNetId indicates a Loopback (ID: 127.0.0.1.X.X) | |
|
|
Gets a value indicating whether this AmsNetId indicates a SubNet. | |
|
|
Gets a value indicating whether this AmsNetId is a valid remote. | |
|
|
Gets or sets the Byte with the specified index. | |
|
|
Gets the Local Net ID (System service must be running) | |
|
|
Creates the local NetId ("127.0.0.1.1.1") |
Methods
|
|
Name |
Description |
|---|---|---|
|
|
Returns the AmsNetId as byte Span. | |
|
|
Creates a new AmsNetId from an existing one with changed SubNet IDs | |
|
|
Creates a new AmsNetId from an existing one with changed SubNet IDs | |
|
|
Clones the NetId | |
|
|
Compares the current object with another object of the same type. | |
|
|
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. | |
|
|
Equals | |
|
|
Determines whether the specified AmsNetIds are equal. | |
|
|
Allows an object to try to free resources and perform other
cleanup operations before it is reclaimed by garbage
collection. | |
|
|
Creates the AmsNetId from bin hex string. | |
|
|
Gets the HashCode of the Address | |
|
|
Gets the Type of the current
instance. | |
|
|
Determines whether the AmsNetIds refer to the same target. | |
|
|
Determines whether the AmsNetIds refer to the same target. | |
|
|
Determines whether the AmsNetIds refer to the same target. | |
|
|
Determines whether the AmsNetIds refer to the same target. | |
|
|
Creates a shallow copy of the current Object. | |
|
|
Compares the netIds | |
|
|
Compares the NetIds | |
|
|
Compares the NetIds for SubID equality. | |
|
|
Converts the string representation of the address to AmsNetId. | |
|
|
Converts the AmsNetId to a BinHex string. | |
|
|
Converts the specified AmsNetId to a BinHex string. | |
|
|
Converts the NetId object to byte array | |
|
|
Converts the netId to string | |
|
|
Returns a String that represents this instance. | |
|
|
Gets the Local NetID | |
|
|
Converts the string representation of the address to AmsNetId. | |
|
|
Writes the AmsNetId to memory. |
Operators
|
|
Name |
Description |
|---|---|---|
|
|
Operator== | |
|
|
Implements the != operator. |
Remarks
This class is immutable - once created the AmsNetId cannot change. Digits 5 and 6 of the NetId (last 2 bytes) are the SubNet IDs, which are used for local addressing (e.g. to address a specific submodule of a system). The first 4 digits (first 4 bytes) indicate the global ID of the AmsNetId. The SubNet IDs are ignored for comparison and local/remote checks, what means that AmsNetIds with different SubNet IDs but same global ID are considered equal in this context. This also means that the local system can have multiple AmsNetIds, which differ only in the SubNet IDs, but all refer to the same local system.
- AmsNetId Constructor (.Byte.)
- AmsNetId Constructor (String)
- AmsNetId Constructor (AmsNetId)
- AmsNetId Constructor (ReadOnlySpan.Byte.)
- AmsNetId.Broadcast Property
- AmsNetId.Empty Property
- AmsNetId.IsBroadcast Property
- AmsNetId.IsEmpty Property
- AmsNetId.IsLocal Property
- AmsNetId.IsLoopback Property
- AmsNetId.IsSubAddress Property
- AmsNetId.Item Property
- AmsNetId.Local Property
- AmsNetId.LocalHost Property
- AmsNetId.AsSpan Method
- AmsNetId.Clone Method
- AmsNetId.CompareTo Method (Object)
- AmsNetId.CompareTo Method (AmsNetId)
- AmsNetId.Equals Method (Object)
- AmsNetId.Equals Method (AmsNetId, AmsNetId)
- AmsNetId.FromBinHexString Method
- AmsNetId.GetHashCode Method
- AmsNetId.IsSameTarget Method (AmsNetId, AmsNetId)
- AmsNetId.IsSameTarget Method (AmsNetId, AmsNetId, Boolean)
- AmsNetId.NetIdsEqual Method (.Byte.)
- AmsNetId.NetIdsEqual Method (.Byte., .Byte.)
- AmsNetId.NetIdsEqual Method (.Byte., .Byte., Boolean)
- AmsNetId.Parse Method
- AmsNetId.ToBinHex Method
- AmsNetId.ToBinHex Method (AmsNetId)
- AmsNetId.ToBytes Method
- AmsNetId.ToString Method
- AmsNetId.ToString Method (String, IFormatProvider)
- AmsNetId.TryParse Method
- AmsNetId.TryWriteBytes Method
- AmsNetId.TryGetLocalNetId Method
- AmsNetId.Equality Operator
- AmsNetId.Inequality Operator