Configuration Properties for OPC-UA Protocol Adapter

OPC-UA configurations are stored in the opcua block, and there are four different types: The following fields are common among all four block types: transport_addr, data_map, log_level, log_name, trace_level and options.

transport_addr

The transport_addr field determines the location of the OPC-UA endpoint the block will communicate with. Its prefix can be any of the following:
Possible prefixes
'opc-tcp'

data_map

An array of objects. Each object has a type key and an alias key. The top-level key is the address of the tag to be written on the OPC-UA server, in OPC-UA XML Notation.
  • The type value is the data type to be written. It corresponds to one of the types described in Key Concept - Flat JSON format.
  • The alias value is an array of strings. If the string "X" is in alias, then any JSON in flat JSON format received where data.X is a key will have data.X.val written to the OPC-UA server.
Note: The data_map field's structure is different for the OPC-UA Sub/Poll Flat and the OPC-UA Sink Flat blocks. To see the structure for each block, see that block's section below.

log_level and log_name

For details about the log_level and log_name fields, see the Generic CDP Blocks section of the Protocol Adapters documentation page.

trace_level

The trace_level enables logging for the underlying client that connects to the OPC-UA device. It should be set once for the adapter and will affect every OPC-UA block (poll, subscription, etc.) in the configuration file. When used multiple times, the first trace_level encountered will be used. The default value is none.

Possible Values
content, debug, info, warning, error, none

options

FieldTypeRequiredDefaultDescription
usernameStringyes if using username/password authenticationUsername for OPC-UA username/password authentication
passwordStringyes if using username/password authenticationPassword for private key in client_private_key_pathwhen using certificate authentication or usernamewhen using username/password authentication
client_private_key_pathStringPath to the private key for OPC-UA certificate authentication. This private key should be kept secret and not moved to any other server. Interchangeable with user_private_key_path.
client_cert_pathStringPath to the public certificate for OPC-UA certificate authentication. The file at this path should be added to your OPC-UA server’s trust store. Interchangeable with user_cert_path.
user_cert_pathStringPath to the public certificate this client uses for user authentication. Only DER encoded files are currently supported. The certificate should match with the private key specified by user_private_key_path. Interchangeable with client_cert_path.
user_private_key_pathStringPath to the private key this client uses for user certificate. Only PEM encoded private keys are supported. Interchangeable with client_private_key_path
user_cert_passwordStringPassword to the private key this client uses for user certificate. Only PEM encoded private keys are supported.
encryption_cert_pathStringPath to the public certificate this client uses for encrypted connection. Only DER encoded files are currently supported. The certificate should match with the private key specified by encryption_private_key_path.
encryption_private_key_pathStringPath to the private key this client uses for encrypted connection. Only PEM encoded private keys are supported.
encryption_cert_passwordStringPassword to the private key this client uses for encrypted connection. Only PEM encoded private keys are supported.
application_uriStringurn:ge.edge.research.com:GEPredix:OPCUAClientThe application URI for this client. Must match the URI in the client’s encryption certificate.
pki_root_pathStringThe path where the client PKI structure is created if encryption connection is used. Only applies if encryption certificate is used.
security_modeStringSpecifies the security policy to use for encrypted connection. Only applies if encryption certificate is used.
session_timeoutInteger1200000 (20 minutes)Indicates how long, in milliseconds, the server will retain a connection without receiving a message from the client.
connect_timeoutInteger5000The length of time, in milliseconds, a client will wait for a reply to a connect request.
watchdog_intervalInteger5000The number of milliseconds between watchdog checks.
watchdog_timeoutInteger5000The maximum amount of time, in milliseconds, a client will wait for a response to a watchdog request. After the first failure, the watchdog timeout doubles; after a second failure, the connection ends.
publishing_intervalInteger1000Controls how often, in milliseconds, the client will check for available data (to which the client is subscribed).
Note: Used only by blocks that support subscription.
sampling_interval Integer 200 Controls how often, in milliseconds, the server samples the value of a tag.
Note: Valid only for OPC-UA adapters that subscribe to tags (otherwise the option is ignored).
lifetime_countInteger1200Controls the lifetime, in seconds, of the subscription (as opposed to the lifetime of the session). The lifetime of the subscription is set to publishing interval * lifetime count. The default is 1200 (20 minutes).
Note: Used only by blocks that support subscription.
max_batch_size Integer 200 The maximum number of tags that can be subscribed to in a single network request. For example, an adapter with 1000 tags and a max_batch_size of 200 would send five network requests.
Note: Used only by blocks that support subscription.
max_nodes_per_sub Integer 800 The maximum number of subscription tags that can be associated with a single subscription. Once this limit is reached, a new subscription is created.
Note: Valid only for OPC-UA adapters that subscribe to tags (otherwise the option is ignored).
queue_size Integer 1 The number of data samples queued for publication. Used when the sampling interval is less than the publishing interval. A value of 0 or 1 results in only the most recent value being published.
Note: Valid only for OPC-UA adapters that subscribe to tags (otherwise the option is ignored).