Examples

  • Discovery services * Find Servers * Get Endppoints
  • Connection and disconnection

Example on how to call FindServers request goes here.

Warning

Some warning tests example. TODO: remove it later.

ClientConfiguration config("opc.tcp://opcuaserver.com:48010");
config.createSession = true;
config.connectionSettings.transportSettings.maxSendChunkCount = 5;
config.connectionSettings.transportSettings.sendBufferSize = 128;
config.connectionSettings.transportSettings.receiveBufferSize = 1024;
config.connectionSettings.transportSettings.maxSendMessageSize = 32*1024;
auto connection = Connection::create((StateChangeCallback) [](const std::string& endpointUrl, ConnectionState state, const OperationResult& result)
{
  std::cout << "Connection state on endpoint [" << endpointUrl << "] changed to [" << Utils::toString(state) << "], result = [" << result.toString() << "]" << std::endl;
});
connection->setConfiguration(config);
OperationResult connectResult = connection->connect([](const OperationResult& r) {
  std::cout << "Specific connect callback message: " << r.text.text << "\n";
}).get();
if (connectResult.isGood())
{
  auto f = connection->disconnect(false, true);
  OperationResult disconnectResult = f.get();
}

Image example

../_images/test.png

Note

This is a note example. This is the second line of the first paragraph.

  • The note contains all indented body elements following.
  • It includes this bullet list.

Section

This is section text

Contact Support for more information.

Subsection 1

this is subsection text

Subsection 2

Text for subsection 2

Sub-subsection 2.1

Sub-sub se4ction text

Sub-subsection 2.2

Some text

  • List
    List text
    • Sub-list 1 Sub list text
    • Sub list 2 Sub list 2 text