Comment on page
Which Plugins to load (appsettings.xml)
Open the appsettings.xml file with a text editor of your choice. Preferably, you can use a dedicated XML editor, as the Senseforce Edge XML files are supported by a rich set of XML schemas, allowing configuration validation inside the editor.
A minimum appsettings.xml is illustrated below.
<?xml version="1.0" encoding="utf-8"?>
<AgentConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://senseforce.io/ configurations/Schemas/appsettings.xsd" >
<EgressPlugins>
<!--Add your output plugins here-->
</EgressPlugins>
<IngressPlugins>
<!--Add your input plugins here-->
</IngressPlugins>
<!-- Mode: Live or offline -->
<Mode>Live</Mode>
<!-- Where to find the data routing definition file -->
<Mappings>
<FilePath>$(LunaAppDataPath)configurations</FilePath>
<FileName>EventDefinition.xml</FileName>
</Mappings>
<!-- Where to put the log file and which log level to set -->
<Logger>
<FilePath>$(LunaAppDataPath)Logs</FilePath>
<FileName>agent.log</FileName>
<!--LogLevel: Debug,Information,Warning,Error,Critical,None-->
<LogLevel>Information</LogLevel>
</Logger>
</AgentConfiguration>
To define which plugin to load, add one or more of the following configuration sections inside the "IngressPlugins"-section (Line 7 to 9)
S7
MS SQL
SQLite
OpcUA
REST
<IngressPlugin name="S7Net">
<FilePath>$(RuntimePath)Plugins/Ingress/S7Net/S7Net.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.S7Net.S7NetHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/S7Net/S7Settings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="MsSQL">
<FilePath>$(RuntimePath)Plugins/Ingress/MsSql/MsSql.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.MsSql.MsSqlHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/SQL/SqlSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="Sqlite">
<FilePath>$(RuntimePath)Plugins/Ingress/Sqlite/Sqlite.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.Sqlite.SqliteHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/SQLite/SqliteSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="OpcUa">
<FilePath>$(RuntimePath)Plugins/Ingress/OpcUa/OpcUa.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.OpcUa.OpcUaHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/OPCUA/OpcUaSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="Rest">
<FilePath>$(RuntimePath)Plugins/Ingress/Rest_Schildknecht/Rest_Schildknecht.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.Rest_Schildknecht.RestSchildknechtHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/Rest_Schildknecht/RestSettings.xml</ConfigurationFile>
</IngressPlugin>
TCP Listener
XML Parsing
SINUMERIK
Heidenhain
<IngressPlugin name="Tcp">
<FilePath>$(RuntimePath)Plugins/Ingress/TcpSocketRead/TcpSocketRead.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.TcpSocketRead.TcpSocketReadHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/TcpSocketRead/TcpSocketSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="Xml">
<FilePath>$(RuntimePath)Plugins/Ingress/XmlFileParsing/XmlFileParsing.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.XmlFileParsing.XmlFileParsingHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/XmlFileParsing/XmlFileParsingSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="Sinumerik">
<FilePath>$(RuntimePath)Plugins/Ingress/SiemensPlc/SiemensPlc.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.SiemensPlc.SiemensPlcHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/SiemensPlc/SiemensPlcSettings.xml</ConfigurationFile>
</IngressPlugin>
<IngressPlugin name="Heidenhain_demo">
<FilePath>$(RuntimePath)Plugins/Ingress/Heidenhain/Heidenhain.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Ingress.Plugins.Heidenhain.HeidenhainHandler</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/InputPlugins/Heidenhain/HeidenhainSettings.xml</ConfigurationFile>
</IngressPlugin>
The default configuration files for the Heidenhain plugin are located in the Plugins installation folder (
Plugins/Ingress/Heidenhain/configs
). Copy them to [YourConfigLocation]/configurations/InputPlugins/Heidenhain/.
(This is C:/Program Files/Luna/configs if you run the Edge as command line application and C:/ProgramData/Senseforce/Luna Data/Your
ServiceName_X
/configs
if you run the Edge as a service. If you run your edge as a Linux service, copy the configs to the location where the configs of your other plugins are located)The plugin attribute "name" is reserved for future use and does not provide any further service.
It is possible to load more than one Input Plugin. Simply add several of the above configuration sections (5 lines per plugin) to appsettings.xml, one below each other.
To define which output plugin to load, add one or more of the following configuration sections inside the "EgressPlugins"-section (Line 4 to 6)
MQTT
SQLITE
<EgressPlugin name="Mqtt_senseforce">
<FilePath>$(RuntimePath)Plugins/Egress/MqttNet/MqttNetPlugin.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Egress.Plugins.MqttNet.MqttHandlerTpl</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/OutputPlugins/MqttNet/MqttSettings.xml</ConfigurationFile>
</EgressPlugin>
<EgressPlugin name="Sqlite_senseforce">
<FilePath>$(RuntimePath)Plugins/Egress/Sqlite/SqliteOut.dll</FilePath>
<TypeName>Senseforce.Agent.Extensibility.Egress.Plugins.Sqlite.SqliteHandlerTpl</TypeName>
<ConfigurationFile>$(LunaAppDataPath)configurations/OutputPlugins/Sqlite/SqliteSettings.xml</ConfigurationFile>
</EgressPlugin>
The plugin attribute "name" is used for data routing. Make sure it is unique throughout all plugins (which unique name you choose is up to you). Remember this name for the data routing process.
It is possible to load more than one Output Plugin. Simply add several of the above configuration sections (5 lines per plugin) to appsettings.xml, one below each other.
Using the FileName and FilePath settings on line 16/17 as well as 22/23 it is possible to change the location where the Edge Solution expects the Data Routing Definition as well as the Logging output path. For most cases, it is best to leave these settings on default.
Using the setting LogLevel on line 25 allows setting how much information is written to the log files. All plugins integrate their own log files with their own logging configuration. The setting in appsettings.xml only changes the log-level for the Edge core application.
Please check the edge-logging page for more information:
Using the "Mode"-setting allows disabling the live date transmission.
Mode | Consequence |
Live | The Edge solution connects with the remote servers and transmits data from input to output. |
Offline | The Edge solution connects with the remote servers but only reads the data and transmits them to the output - but does not deliver it past the output plugin. Use this setting to commission your Edge software as well as for troubleshooting. Best combined with LogLevel Trace |
appsettings.xml
5KB
Text
appsettings.xml
Last modified 1yr ago