diff --git a/exe/src/example.cpp b/exe/src/example.cpp index 47129d20..9203c46b 100644 --- a/exe/src/example.cpp +++ b/exe/src/example.cpp @@ -9,9 +9,11 @@ /// #include #include +#include + +#include +#include -#include -#include #include #include @@ -28,6 +30,7 @@ int main(int argc, char** argv) try { server.SetLoadCppAddressSpace(true); + server.SetEndpoint("opc.tcp://localhost:4841"); //server.AddAddressSpace("standard_address_space.xml"); //server.AddAddressSpace("user_address_space.xml"); server.Start(); @@ -42,6 +45,12 @@ int main(int argc, char** argv) QualifiedName qn("NewObject", 2); root.AddObject(nid, qn); + std::cout << "Ctrl-C to exit" << std::endl; + for(;;) + { + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + } + } catch (const std::exception& exc) {