endpoints_registry.cpp
Go to the documentation of this file.
1 
12 
13 #include "endpoints_parameters.h"
14 
18 
19 using namespace OpcUa;
20 using namespace OpcUa::Server;
21 
22 namespace
23 {
24 
25 class EndpointServicesRegistry : public OpcUa::Server::EndpointsRegistry
26 {
27 public:
29 
30 public:
31  virtual std::vector<ApplicationDescription> FindServers(const FindServersParameters & params) const override
32  {
33  // TODO apply filter
34  return Applications;
35  }
36 
37  virtual std::vector<EndpointDescription> GetEndpoints(const GetEndpointsParameters & filter) const override
38  {
39  // TODO apply filter.
40  return Endpoints;
41  }
42 
43  virtual void RegisterServer(const OpcUa::ServerParameters & parameters) override
44  {
45  }
46 
47 public:
48  virtual void AddEndpoints(const std::vector<EndpointDescription> & endpoints) override
49  {
50  Endpoints.insert(Endpoints.begin(), endpoints.begin(), endpoints.end());
51  }
52 
53  void AddApplications(const std::vector<OpcUa::ApplicationDescription> & applications) override
54  {
55  Applications.insert(Applications.begin(), applications.begin(), applications.end());
56  }
57 
58 private:
59  Server::ServicesRegistry::SharedPtr InternalServer;
60 
61  std::vector<EndpointDescription> Endpoints;
62  std::vector<ApplicationDescription> Applications;
63 };
64 
65 } // namespace
66 
67 
68 namespace OpcUa
69 {
70 Server::EndpointsRegistry::UniquePtr Server::CreateEndpointsRegistry()
71 {
72  return Server::EndpointsRegistry::UniquePtr(new EndpointServicesRegistry);
73 }
74 }
75 
EndpointsRegistry::UniquePtr CreateEndpointsRegistry()
OPC UA Address space part. GNU LGPL.
#define DEFINE_CLASS_POINTERS(ClassName)
Exception declarations GNU LGPL.


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