Show HN: OPC UA Server Qt C++ Library
To build the examples:
To start using QUaServer it is necessary to include the header as follows:
To create a server simply create an instance and call the method:
Note it is necessary to create a and execute it, because makes use of Qt’s event loop. To change the listening port, simply pass it as the first argument of the QUaServer constructor:
To start creating OPC Objects and Variables it is necessary to get the Objects Folder of the server and start adding instances to it:
Instances must only be added using the QUaServer API, by using the following methods:
Once connected to the server, the address space should look something like this:
Note that some instances seen to be added but they have no name. When adding an instance using the QUaServer API, the library creates the required HierarchicalReference type necessary to display the new instance in the instances tree (it uses the HasComponent, HasProperty or Organizes reference types accordingly).
Source: github.com