AmsNetIdTryGetLocalNetId Method
Gets the Local NetID
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads.Abstractions (in
TwinCAT.Ads.Abstractions.dll) Version:
7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
public static bool TryGetLocalNetId(
ILogger? logger,
out AmsNetId?? netId
)Return Value
Boolean
true if the local NetId is determined,
false otherwise.
Remarks
The LocalNetId will be determined in a sequence with theses priorities
- Host IConfiguration object. Access key is 'AmsRouter:NetId'
- Environment variables (AmsRouter:NetId, AmsNetId, LocalNetId variables)
- Via Tcp (Loopback) from Router if available
- From Registry (on Windows systems)