#include <iostream>
int main() {
client.
connect(
"opc.tcp://localhost:4840");
opcua::Node objectsNode(client, opcua::ObjectId::ObjectsFolder);
const auto result = objectsNode.
callMethod(greetMethodNode.
id(), {opcua::Variant(
"World")});
}
void connect(std::string_view endpointUrl)
Connect to the selected server.
High-level node class to access node attribute, browse and populate address space.
CallMethodResult callMethod(const NodeId &methodId, Span< const Variant > inputArguments)
Call server methods.
const NodeId & id() const noexcept
Get the node id.
Node browseChild(Span< const QualifiedName > path)
Browse child node specified by its relative path from this node (only local nodes).
Span< const Variant > outputArguments() const noexcept