AmsRouterConfiguration Class

AmsRouterConfiguration configuration class.

Inheritance Hierarchy

SystemObject
  TwinCAT.Ads.ConfigurationAmsRouterConfiguration

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

Syntax

C#

public class AmsRouterConfiguration

The AmsRouterConfiguration type exposes the following members.

Properties

 

Name

Description

AmsRouter

Gets or sets the RouterConfig object.

Methods

 

Name

Description

Align

Aligns the AmsRouterConfiguration with the AmsConfiguration global object.
Obsolete

CreateDefault

Creates a default AmsRouterConfiguration object with address set to '1.1.1.1.1.1'.

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)

GetHashCode

Serves as the default hash function.
(Inherited from Object)

GetType

Gets the Type of the current instance.
(Inherited from Object)

MemberwiseClone

Creates a shallow copy of the current Object.
(Inherited from Object)

ToString

Returns a string that represents the current object.
(Inherited from Object)

Remarks

This configuration object is used in conjunction with the 'Microsoft.Extensions.Configuration.ConfigurationBinder' Get method to transform the generic IConfiguration into a concrete configuration class.

C#

AmsRouterConfiguration? config = ConfigurationBinder.Get<AmsRouterConfiguration>(_configuration);

The content of the configuration is read by a so called configuration builder (https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration) When the configuration (coming from Environment Variables, appsettings configuration files etc.) aligns to the RouterConfig class, an instance with filled properties is created. To see an example for the configuration please have look at RouterConfig

Reference

TwinCAT.Ads.Configuration Namespace

Other Resources

https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration

Beckhoff Automation GmbH & Co. KG 2001-2026