tests/server/common.h
Go to the documentation of this file.
1 
11 #ifndef opcua_tests_common_utils_h
12 #define opcua_tests_common_utils_h
13 
15 
16 #include <gmock/gmock.h>
17 #include <gtest/gtest.h>
18 
19 namespace OpcUa
20 {
21 namespace Tests
22 {
24 {
25  if (const char * path = getenv("TCP_ADDON_PATH"))
26  {
27  return path;
28  }
29 
30  return std::string();
31 }
33 {
34  if (const char * path = getenv("BUILTIN_COMPUTER_ADDON_PATH"))
35  {
36  return path;
37  }
38 
39  return std::string();
40 }
41 /*
42  inline std::string GetEndpointsAddonPath()
43  {
44  if (const char* path = getenv("ENDPOINTS_ADDON_PATH"))
45  {
46  return path;
47  }
48  return std::string();
49  }
50 */
52 {
53  if (const char * path = getenv("ENDPOINTS_CONFIG_PATH"))
54  {
55  return path;
56  }
57 
58  return std::string();
59 }
60 
61 /*
62  class IncomingConnectionProcessorMock : public OpcUa::UaServer::IncomingConnectionProcessor
63  {
64  public:
65  MOCK_METHOD1(Process, void (std::shared_ptr<OpcUa::IOChannel>));
66  MOCK_METHOD1(StopProcessing, void (std::shared_ptr<OpcUa::IOChannel> clientChannel));
67  };
68 
69  class EchoProcessor : public OpcUa::UaServer::IncomingConnectionProcessor
70  {
71  public:
72  virtual void Process(std::shared_ptr<OpcUa::IOChannel> clientChannel)
73  {
74  char data[4] = {0};
75  clientChannel->Receive(data, 4);
76  clientChannel->Send(data, 4);
77  }
78  virtual void StopProcessing(std::shared_ptr<OpcUa::IOChannel> clientChannel)
79  {
80  }
81  };
82 */
83 
84 // std::unique_ptr<Common::AddonsManager> LoadAddons(const std::string& configPath);
85 
86 } // namspace Tests
87 } // namespace OpcUa
88 
89 #endif // opcua_tests_common_utils_h
90 
std::string GetEndpointsConfigPath()
std::string GetTcpServerAddonPath()
OPC UA Address space part. GNU LGPL.
std::string GetBuiltinServerAddonPath()


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