Skip to content

Latest commit

 

History

History
776 lines (632 loc) · 21.4 KB

File metadata and controls

776 lines (632 loc) · 21.4 KB

OPCUA Protocol Configuration

This section describes the configuration types for the OPCUA protocol adapter and contains the extensions and specific configuration types

Protocol Adapters

OpcuaSourceConfiguration

The OpcuaSourceConfiguration extends the common Source configuration with OPCUA specific source configuration data

Name Description Type Comments
Channels

The element is a map indexed by the channel identifier.

Map[String,OpcuaNodeChannelConfiguration] At least 1 channel must be configured.
AdapterOpcuaServer Server Identifier for the OPCUA server to read from. This referenced server must be present in the OpcuaServers section of the adapter referred to by the ProtocolAdapter attribute of the source. String Must be an identifier of a server in the OpcuaServers section of the OPCUA adapter used by the source.
SourceReadingMode

Mode for reading values from OPCUA server.

  • "Subscription": connector will create a subscription and will monitor the node items configured in the channels for the source. When reading from the adapter in this mode, only items that have been changed in the schedule interval period will be returned, except for the initial read that will return all monitored items.

  • "Polling", the connector will batch-read all nodes configured in the channels for the source with the interval defined in the schedule.

A string that can have the value “Subscription" or "Polling".

Default is "Subscription".

When the source has any nodes that collect data for alarm or event, these nodes are always read in subscription mode, even if the mode is set to Polling.

Data nodes are always read in the specified mode.

SubscribePublishingInterval Time in milliseconds that will be used as the SubscribePublishingInterval when creating the subscription with the server when reading in subscription mode. By default, the interval of the schedule is used. An OPCUA server might time out the subscription if this period is too long, in which case the SubscribePublishingInterval can be explicitly set to a shorter period to avoid the subscription timeout. Integer
EventQueueSize Queue size for events that can be received in a reading interval. More events are received, the oldest events are discarded. Integer Default is 10
EventSamplingInterval Sampling interval for events in milliseconds Integer Default is 0 (0 stands for best effort cyclic rate that the Server uses to sample the item from its source)

Opcua Protocol Configuration

OpcuaNodeChannelConfiguration

The OpcuaNodeChannelConfiguration extends the common Channel configuration with OPCUA specific channel configuration data

Name Description Type Comments
NodeId A string containing the id of the node to read the value from or to monitor. String

The id must have the format:

ns=<namespaceIndex>;<identifiertype>=<identifier>

with the fields:

  • <namespace index>: The namespace index formatted as a number.

  • <identifier type>: A flag that specifies the identifier type. The flag has the following values:

    • I: Integer

    • S: String

    • G: Guid

    • B: ByteString

  • <identifier>: The identifier encoded as string.

IndexRange Range to read subsets from array values. String If not set all values from an array are read. For syntax see https://reference.opcfoundation.org/v104/Core/docs/Part4/7.22/
NodeChangeFilter Change filter used in subscription for node that defines the conditions when a value change must be reported. OpcuaNodeChangeFilter Optional
Selector

Evaluate a JMESpath query against the value of a structured data type and returns the result.

The selector can be used to restructure or select values from structured data types.

Datatype: Structure or array Parameter: JMESPath expression, see https://jmespath.org/
EventSamplingInterval Sampling interval for events in milliseconds. Use this value to specify a specific interval for this node which overrides the interval at source level. Integer Default is 0 value configured for the OPCUA source
EventType For collecting data from event or alarm nodes the type of the event must be specified. This can either be the name of the event (e.g., BaseEventType) or the node identifier (e.g., ns=0;i=17). String (name of the event or node identifier)

Valid OPCUA defined event and alarm names can be found at https://reference.opcfoundation.org/Core/Part9/v105/docs/5.8, and https://reference.opcfoundation.org/Core/Part3/v104/docs/9.1

If an event type is used which is not an OPCUA or server profile defined event type a warning is generated and the OPCUA defined "BaseEventType" is used.

If a server profile has been defined and used for the server the source for the channel is reading from, the names and identifiers for event types in that profile can be used as well.

The event type is used to filter the events that are raised by a node and to determine the values that can be read from the event. To receive multiple event types from a node, separate channels need to be configured for each event type.

Opcua Protocol Configuration

OpcuaNodeChangeFilter

Data change filter for OPCUA node channels when running adapter in subscription mode.

Name Description Type Comments
Value Data change value Double Default is 0.0
Type
  • "Absolute": Value is absolute value change.

  • "Percent": Value is data change in percent.

String Optional

Opcua Protocol Configuration

OpcuaAdapterConfiguration

The OpcuaAdapterConfiguration extends the common adapter configuration with OPCDA specific adapter configuration settings. The AdapterType to use for this adapter is "OPCUA".

Name Description Type Comments
OpcuaServers Opcua servers configured for this adapter. The opcua source using the adapter must have a reference to one of these in its AdapterOpcuaServer attribute. Map[String,OpcuaServerConfiguration]
ServerProfiles Profiles configured for this adapter. Servers in this adapter can have a reference to one if its profiles in their ServerProfile attribute. Map[String,OpcuaServerProfileConfiguration]

OpcuaServerProfileConfiguration

Name Description Type Comments
EventTypes Additional event types that can be used for a server, Map[ String, OpcUaEvenTypeConfiguration ]]

Opcua Protocol Configuration

OpcuaEventTypeConfiguration

Defines an event or alarm type that can be used in a server profile to read custom events and alarms (e.g., from industry specific companion specifications)

Name Description Type Comments
NodeId

Node identifier for the event type.

This identifier must match the identifier used for the event on the OPCUA server.

It can be used instead of the event name to specify the event type for a node to read in the channels of a source, or as the type to inherit from in other events in the same profile.

String

Required

Syntax is ns=namespaceindex;type=value

e.g., ns=0;i=9000

Properties Properties defined for the event type. Each property is defined as a string which is a Qualified name, consisting of the namespace for that property and the browse name. The format is ns:browsename List of String Required, an at least one property must be defined.
Inherits

Event type to inherit from.

When this attribute is set then all the properties of the referred type (and types that type inherits from) will be added to the properties of the event.

This field can include the name or node identifier of an OPCUA defined event type, or an event in the same profile.

String

Optional.

Must refer to and existing OPCUA or other vent type in the same profile.

Opcua Protocol Configuration

OpcuaServerConfiguration

Configuration data for connecting to and reading from source OPCUA servers

Name Description Type Comments
Address Address of the OPCUA server String
Port OPCUA server port Integer Default is 53530
Path Server path or name String The connection address that will be used is <Address>:<Port>[/Path]
ConnectTimeout Timeout in milliseconds connecting to the server Integer Default is 10000, the minimum value is 1000
ReadTimeout Timeout in milliseconds reading from the server Integer Default is 10000
WaitAfterConnectError Time in milliseconds to wait to reconnect after a connection error Integer Default is 10000, the minimum value is 1000
WaitAfterReadError Time in milliseconds to wait after a read error Integer Default is 10000, the minimum value is 1000
ReadBatchSize Max number of nodes to read in a single batch read Integer Default is 500
ConnectionWatchdogInterval Interval period in milliseconds for checking the server connection when the source is reading in Subscription reading mode. It will check the connection by trying to read the server status of the OPCUA server. This is needed in case the connection to a (stopped) server is lost, which will not be detected by a client that uses a subscription to obtain server values. Integer

Default is 1000

Set to 0 to disable the watchdog

MaxMessageSize The maximum message size in bytes Integer

Default is 2,097,152 (2MB)

Min is 8196 (8 KB)

Max is 2,147,483,639 (MaxInt-8 is approx. 2048GB)

MaxChunkSize The maximum size of a single chunk of a message in bytes Integer

Default is 65535 (64KB)

Min is 8196 (8KB)

Max is 2,147,483,639 (MaxInt-8 is approx. 2048GB)

MaxChunkCount The maximum number of chunks that a message can break down into Integer Default is (MaxMessageSize / MaxChunkSize) * 2. More than chunks than constitute MaxMessageSize are needed because of overhead when constructing chunks; not all the chunk size is dedicated to message bytes.
ServerProfile Any of the profiles in the adapters ServerProfiles section. String
SecurityPolicy

Any of the following policy names

  • None

  • Basic128Rsa15

  • Basic256

  • Basic256Sha256

  • Aes128ShaRsaOaep

For other value other than None a client certificate must be configured

String Default is None
Certificate Client certificate configuration CertificateConfiguration
CertificateValidation Certificate validation configuration CertificateValidationConfiguration

Opcua Protocol Configuration

CertificateConfiguration

Client certificate configuration for OPCUA client

Name Description Type Comments
CertificateFile Pathname to pem or pkcs12 certificate file String
PrivateKeyFile Path name to pem private key file (optional for pkcs12, required for pem) String
Alias Alias to use for pkcs12 certificate files String Default is "alias"
Password Password for pkcs12 certificate files String
SelfSignedCertificate Self-signed certificate configuration used to generate a self-signed certificate SelfSignedCertificateConfiguration
Format Format of the certificate file, can either be "Pem" or "Pkcs12". String If not specified the adapter will attempt to determine the type from the filename of the key file.
ExpirationWarningPeriod Period in days in which the adapter will generate a daily warning and metrics value before the client certificate expires. Integer Default is 30, set to 0 to disable.

Opcua Protocol Configuration

SelfSignedCertificateConfiguration

Configuration for generating self-signed certificates

Name Description Type Comments
CommonName

Common name of the certificate

X509 Name CN

String Must be specified
Organization X509 Name O String
OrganizationalUnit X509 Name OU String Default is "alias"
LocalityName X509 Name L String
StateName X509 Name ST String
CountryCode X509 Name C String
ValidPeriodInDays Number of days certificate is valid Integer Default is 1095 (=3 years)

CertificateValidationConfiguration

Configuration for validating certificates

Name Description Type Comments
Active Flag to set to enable or disable the validation of server certificates Boolean Default is true
Directory Pathname to base directory under which certificates and certificate revocation lists are stored String This directory must exist, subdirectories will be created by the adapter if they do not exist.
ValidationOptions Configuration of op optional checks CertificateValidationOptions When not set then all options are enabled

Opcua Protocol Configuration

CertificateValidationOptions

Optional validation options configuration

Name Description Type Comments
HostOrIp Host or IP address must be present in Alternate Subject Names and will be checked Boolean Default is true
Validity Check certificate expiry Boolean Default is true
KeyUsageEndEntity Key usage extension must be present and will be validated for end-entity certificates Boolean Default is true
ExtKeyUsageEndEntity Extended key usage extension must be present and will be validated for end-entity certificates Boolean Default is true
KeyUsageIssuer Key usage must be present and will be checked for CA certificates Boolean Default is true
Revocation Revocation checking Boolean Default is true
ApplicationUri Check Application description against the ApplicationUri from Subject Alternative Names Boolean Default is true

Opcua Protocol Configuration

^top