opcua-adapter-plugin
is an ingress plugin for MTConnect Agents. The plugin runs inside the agent as an internal adapter. It collects data from OPC UA servers and provides stream updates.
Devices = _metaagent_.xml
Port = 7979
Adapters
{
OPCUA_ADAPTER:OPCUA_ADAPTER
{
url = opc.tcp://demo.metalogi.io:4840
# namespaceFilter= <comma separated list of node's id using regex matching. stream data only from this node or below>
namespaceFilter= ns=3
# sampleInterval = <the fastest rate at which OPC UA server's monitored items should be accessed and evaluated (ms)>
# default is 0, indicates that it should use the fastest practical rate
#
# Additional optional connection info
# cert = <location of the certificate file. Format: DER>
# key = <location of the key file. Format: PEM>
# user = <user's id>
# password = <user's password>
#
# certificateCheck = [true, false]
# default is false
#
# messageSecurityMode = [None, sign, sign&encrypt]
# securityPolicy = [None, Basic128Rsa15, Basic256, Basic256Sha256, Aes128_Sha256_RsaOaep]
#
# messageSecurityMode and SecurityPolicy are only required if the server does not provide discovery service
#
#cert = ../certs/public.cert.der
#key = ../certs/key.pem
#user = demo
#password = test
# licenseKey = <your license key - default is demo mode if not provided>
# option to override logger config for this adapter
logger_config {
output = file opcua.log
level = info
}
}
}
url
: The OPC UA server's connection URLapplicationUrl
: Specify the application URL, for some OPC UA servers, they may require it to match the client's certificate and the server's application URL, the default is urn:open62541.server.application.namespaceFilter
: comma-separated list of node's id using regex matching. stream data only from this node or below.sampleInterval
: the fastest rate at which the OPC UA server's monitored items should be accessed and evaluated (ms), the default is 0, indicating that it should use the fastest practical rate.user / password
: the OPC UA server's login credential if required.key /cert
: the location of the client's certificate and its key file.certificateCheck
: Validate the OPC UA server's certificate, the default is false.messageSecurityMode
: None, sign, or sign&encrypt.securityPolicy
: None, Basic128Rsa15, Basic256, Basic256Sha256, or Aes128_Sha256_RsaOaep.
C:\Program Files\MetaAgent\examples\opcua-adapter-plugin>agent run
MTConnect Agent Version 2.2.0.592 - built on Mon Oct 9 22:38:46 2023
[2023-10-29 08:58:06.816103] [0x000023a0] [trace] Found file 'agent.cfg' in path "C:\\Program Files\\MetaAgent\\examples\\opcua-adapter-plugin"
[2023-10-29 08:58:06.816103] [0x000023a0] [info] Loading configuration from: "C:\\Program Files\\MetaAgent\\examples\\opcua-adapter-plugin\\agent.cfg"
Loading configuration from:"C:\\Program Files\\MetaAgent\\examples\\opcua-adapter-plugin\\agent.cfg"