deviceaccess-opcuabackend

OPC UA based device backend for the ChimeraTK framework

https://github.com/chimeratk/deviceaccess-opcuabackend

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

OPC UA based device backend for the ChimeraTK framework

Basic Info
  • Host: GitHub
  • Owner: ChimeraTK
  • License: lgpl-3.0
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 1.36 MB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 1
  • Open Issues: 1
  • Releases: 1
Created almost 7 years ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.md

DeviceAccess-OPC-UA-Backend

License DOI Supported Platforms

This backend uses the opcua client from open62541. The version of open62541 is the same as the one used in the ConstrolsystemAdapter-OPC-UA. port is a required parameter in the device mapping file and the syntax in the device mapping file is as following:

  # using target name 
  test (opcua:localhost?port=16664)
  # using target ip
  test (opcua:127.0.0.1?port=16664)

Optional parameters

The following optional parameters are supported and default values are indicated: - map - username - password - publishingInterval=500 - connectionTimeout=5000 - rootNode - logLevel=info - certificate - privateKey - trustAny=false - trustListFolder - revocationListFolder

Detailed information about the parameters are given in the following.

Encryption and security settings

If authentication should be used when connecting to a server use optional device mapping parameters username and password. For an encrypted connection use certificate and privateKey. If you want to disable the server certificate validation set trustAny=true. In that case trustListFolder and revocationListFolder settings are ignored. Else you need to set trustListFolder to a directory that includes the server certificate. If certificate authorities are used consider also setting revocationListFolder to a directory that includes the revocation lists.

Logging level

The loggingg severiy level of the client can be set using logLevel. Supported log levels are: - trace - debug - info - warning - error - fatal

Connection settings

The parameter publishingInterval is relevant for asynchronous reading. It defines the shortest update time of the backend. Server side data updates that happen faster than the publishing interval will not be seen by the backend. The unit of the publishing interval is ms and in case no publishing interval is given a publishing of 500ms is used. No queues are used on the backend side!

If the connection to the server is lost the backend will try to recover the connection after a specified timeout. The default timeout is 5000ms. This can be changed using the backend parameter connectionTimeout and passing the desired timeout in milli seconds.

Node selection

The backend can be used in two different ways:

  • Automatic catalog creation via browsing the server (only works for ChimeraTK OPC-UA servers) → use test (opcua:localhost?port=16664) in the device mapping file

For the automatic catalog creation it is possible to only consider subdirectories. This is possible by using the mapping parameter rootNode. The rootNode is given as namespace:directoryName, e.g. 1:Test/ControllerDir. Pay attention that node names of directories always include "Dir" at the end.

  • Manual catalog creation via map file → use test (opcua:localhost?port=16664&map=mymap.map) in the device mapping file

For manual catalog creation the mapping parameter rootNode can be used to prepend a root directory name to the entries in the given map file. If e.g. one wants to use a single map file for different servers, that differ in the root folder name this feature can be used. Consider variable serverA/test of a server and serverB/test of another server. In that case a common map file can be used mapping test and the parameter rootNode=serverA and rootNode=serverB can be used as mapping parameter.

Map file based catalog creation

XML version

The XML scheme is defined in opcua_map.xsd. It includes also comments on the individual parameters. The legacy example in the xml style looks as follows:

<?xml version="1.0"?>
<csa:opcua_map xmlns:csa="https://github.com/ChimeraTK/DeviceAccess-OpcUaBackend">
  <pv ns="1" >/dir/var1</pv>
  <pv ns="1">123</pv>
  <pv ns="1" name="myname1">/dir/var1</pv>
  <pv ns="1" name="myname1">123</pv>
  <pv range="2" ns="1" name="Test/singleElement">array</pv>
  <pv range="2:5" ns="1" name="Test/arraySubset">array</pv>
</csa:opcua_map>

The last two mappings for array include a range. This feature is only possible using xml based map file.

Legacy version

This options is useful when connecting to servers with many process variables. No browsing is done in that case and therefor no load is put on the target server. The map file syntax is as following:

#Sting node id       Namespace id
/dir/var1            1
#Numeric node id     Namespace id
123                  1
#New Name   Sting node id      Namespace id
myname1     /dir/var1          1
#New name   Numeric node id    Namespace id
myname2     123                1 

In case a numeric id is used and no new name is given it will appear with the register path: /numeric/id.

Technical details

Behaviour after server restart

During the development, the reconnection after a connection error was tested. This was done by killing the server the backend was connected to. After, the server was restarted. On the backend side the client read server data very fast for 5 times and the result was always 0. The 5 subsequent reads happen, because there is a full queue of read triggers. The que was filled during the server was down by the PeriodicTrigger module that was used in the test. After the client recovered from the error state this queue was emptied first. After, periodic triggers from the PeriodicTrigger module followed as expected and correct values were read from the server.

The read value of 0 did not result e.g. from the client connection being not fully set up. But this is the initial register value after starting a ChimeraTK server. Thus, the opc ua server was opened but the application did not reach the first mainLoop during the first backend reads. So value of 0 read from the server via the backend is correct.

Owner

  • Name: ChimeraTK
  • Login: ChimeraTK
  • Kind: organization

Control system and Hardware Interface with Mapped and Extensible Register-based device Abstraction Tool Kit

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: OPC UA based device backend for the ChimeraTK framework
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Klaus
    family-names: Zenker
    orcid: 'https://orcid.org/0000-0002-8120-6806'
    affiliation: Helmholtz-Zentrum Dresden-Rossendorf
identifiers:
  - type: doi
    value: 10.14278/rodare.3254
    description: The URL of the latest version of the software
repository-code: 'https://github.com/ChimeraTK/DeviceAccess-OpcUaBackend'
keywords:
  - OPC UA
  - ChimeraTK
  - Control System
license: LGPL-3.0
commit: >-
  https://github.com/ChimeraTK/DeviceAccess-OpcUaBackend/commit/7a1401fd511608b2107118026fb066a1ff4720da
version: 01.04.00
date-released: '2024-11-08'

GitHub Events

Total
  • Release event: 1
  • Delete event: 6
  • Push event: 14
  • Pull request event: 15
  • Fork event: 1
  • Create event: 9
Last Year
  • Release event: 1
  • Delete event: 6
  • Push event: 14
  • Pull request event: 15
  • Fork event: 1
  • Create event: 9

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • zenker (1)
Pull Request Authors
  • mhier (10)
  • zenker (8)
  • killenb (5)
  • phako (3)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pyproject.toml pypi