computer_session.cpp
Go to the documentation of this file.
1 
11 #include "common.h"
12 
13 #include <opc/ua/client/remote_server.h>
14 
15 #include <stdexcept>
16 
17 TEST(Session, Works)
18 {
19  std::unique_ptr<OpcUa::Services> computer = OpcUa::Connect(GetEndpoint());
20 
22  session.ClientDescription.Name.Text = "opcua client";
23  session.SessionName = "test";
24  session.EndpointUrl = GetEndpoint();
25  session.Timeout = 1000;
26 
27  computer->CreateSession(session);
28  computer->ActivateSession();
29  computer->CloseSession();
30 }
31 
ApplicationDescription ClientDescription
Definition: services.h:49
TEST(Session, Works)
Test Remote computer connection. GNU LGPL.
EndpointDescription GetEndpoint(OpcUa::Binary::IOStream &stream)
std::unique_ptr< RemoteConnection > Connect(const std::string &host, unsigned port, const Common::Logger::SharedPtr &logger)
computer
Definition: test.py:6


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:06:04