ANSI C Based OPC UA Client/Server/PubSub SDK  1.9.1.442
Getting Started with PubSub Configuration

The PubSub configuration can be done on-line with an external PubSub configuration tool acting as OPC UA Client, it can be done in the OPC UA PubSub application based on vendor specific configuration options or off-line by creating the PubSub configuration binary file in the UA binary format defined by the OPC UA specification.

The UaExpert with version 1.6 contains a PubSub configuration plug-in that allows the creation of PubSub configurations and the download of the configurations to the involved OPC UA servers.

In UaExpert the PubSub configuration can be opened with Document > Add > Select Document Type “PubSub Config View” > Add.

Existing configurations can be loaded from a server or new configurations can be created. A new configuration can be downloaded to a server.

In a configuration, a PubSubConnection must be created. Make sure the Publisher ID is unique in your network for the address (multi-cast). The PubSubConnection is needed to send and receive messages from a network address e.g. UDP multi-cast address or message broker for MQTT. The PublisherId of the connection is only relevant for the Publisher part (sending of messages). For UDP multi-cast, it is necessary to configure the used network interface by entering the IP-address of the adapter in the configuration option 'Address Network Interface'.

To send data, it is necessary to create a WriterGroup and a DataSetWriter. If UaExpert is connected to the OPC UA server of the Publisher, the Variables can be selected in the Address Space view and can be added to Published DataSet with drag&drop. For first tests with the ANSI C SDK Demo Server the simulated variables in Objects > Demo > 001_Dynamic > Scalar can be used as source variables with different data types.

To receive data in the Subscriber, it is necessary to create a ReaderGroup and a DataSetReader. To create a DataSetReader, it is necessary to have the corresponding configuration of the related DataSetWriter available in the UaExpert PubSub configuration. The configuration of a Publisher can be loaded as a standard PubSub binary configuration file.

If UaExpert is connected to the OPC UA server of the Subscriber, the target variables can be selected with drag&drop from the Address Space view to the Target Variable list of the DataSetReader. For first tests with the ANSI C SDK Demo Server the variables in Objects > Demo > 000_Static > Scalar can be used as target variables with different data types.

See the documentation of UaExpert for more details.

The following pages provide further information on the PubSub functionality in the SDK: