MqttConfig Class
MQTT configuration object
Inheritance Hierarchy
SystemObject
TwinCAT.Ads.ConfigurationMqttConfig
TwinCAT.Ads.ConfigurationRemoteEtherCATConfig
Namespace: TwinCAT.Ads.Configuration
Assembly: TwinCAT.Ads.ConfigurationProviders
(in TwinCAT.Ads.ConfigurationProviders.dll) Version:
7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
public class MqttConfigThe MqttConfig type exposes the following members.
Properties
|
|
Name |
Description |
|---|---|---|
|
|
Gets or sets the MQTT Broker address | |
|
|
Gets a value indicating whether [clean session]. | |
|
|
Gets the client identifier (ComputerName if not set) | |
|
|
Gets the display name (ComputerName if not set) | |
|
|
Gets the keep alive. | |
|
|
Gets a value indicating whether [no retain]. | |
|
|
Gets or sets the MQTT Password | |
|
|
Gets or sets the used MQTT port. | |
|
|
Gets or sets the PSK Security configuration | |
|
|
Gets the Quality of Service value or null. | |
|
|
Gets the type of security. | |
|
|
Gets or sets the TLS Security configuration | |
|
|
Gets or sets the MQTT topic. | |
|
|
Gets a value indicating whether this MqttConfig is unidirectional. | |
|
|
Gets or sets the MQTT User Name | |
|
|
Gets a value indicating whether [wildcard workaround]. |
Methods
|
|
Name |
Description |
|---|---|---|
|
|
Determines whether the specified object is equal to the current
object. | |
|
|
Allows an object to try to free resources and perform other
cleanup operations before it is reclaimed by garbage
collection. | |
|
|
Serves as the default hash function. | |
|
|
Gets the Type of the current
instance. | |
|
|
Creates a shallow copy of the current Object. | |
|
|
Parses the element. | |
|
|
Returns a String that represents this
instance. |
Remarks
The MQTT configuration is established as IConfiguration object in the application host. See AmsRouterConfiguration. A valid MQTT configuration could look like this (Environment variables)
Batch Script
AmsRouter__Mqtt__0__NETID=3.79.104.236.1.1
AmsRouter__Mqtt__0__NORETAIN=false
AmsRouter__Mqtt__0__UNIDIRECTIONAL=false
AmsRouter__Mqtt__0__PORT=8883
AmsRouter__Mqtt__0__ADDRESS=ba-0f8cfe2680560cffb.eu-central-1.demo.beckhoff-cloud-instances.com
AmsRouter__Mqtt__0__TOPIC = VirtualAmsNetwork1
AmsRouter__Mqtt__0__TLS__IGNORECN=false
AmsRouter__Mqtt__0__TLS__CA__0=C:\Program Files(x86)\Beckhoff\TwinCAT\3.1\Target\Certificates\BA-0f8cfe2680560cffb\intermediateCA.pem
AmsRouter__Mqtt__0__TLS__CERT = C:\Program Files(x86)\Beckhoff\TwinCAT\3.1\Target\Certificates\BA-0f8cfe2680560cffb\MyDevice.pem
AmsRouter__Mqtt__0__TLS__KEY = C:\Program Files(x86)\Beckhoff\TwinCAT\3.1\Target\Certificates\BA-0f8cfe2680560cffb\MyDevice.key
AmsRouter__Mqtt__0__TLS__VERSION = tlsv1.2Further information can be found at https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_grundlagen/4320983179.html or https://github.com/Beckhoff/ADS-over-MQTT_Samples.