Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <opc/ua/server/addons/services_registry.h>
00012 #include <opc/ua/server/services_registry.h>
00013
00014 namespace
00015 {
00016
00017 class ServicesRegistryAddon : public Common::Addon, public OpcUa::Server::ServicesRegistry
00018 {
00019 public:
00020 DEFINE_CLASS_POINTERS(ServicesRegistryAddon);
00021
00022 public:
00023 virtual void Initialize(Common::AddonsManager&, const Common::AddonParameters&)
00024 {
00025 Impl = OpcUa::Server::CreateServicesRegistry();
00026 }
00027
00028 virtual void Stop()
00029 {
00030 Impl.reset();
00031 }
00032
00033 virtual OpcUa::Services::SharedPtr GetServer() const
00034 {
00035 return Impl->GetServer();
00036 }
00037
00038 virtual void RegisterEndpointsServices(std::shared_ptr<OpcUa::EndpointServices> endpoints)
00039 {
00040 Impl->RegisterEndpointsServices(endpoints);
00041 }
00042
00043 virtual void UnregisterEndpointsServices()
00044 {
00045 Impl->UnregisterEndpointsServices();
00046 }
00047
00048 virtual void RegisterViewServices(std::shared_ptr<OpcUa::ViewServices> views)
00049 {
00050 Impl->RegisterViewServices(views);
00051 }
00052
00053 virtual void UnregisterViewServices()
00054 {
00055 Impl->UnregisterViewServices();
00056 }
00057
00058 virtual void RegisterAttributeServices(std::shared_ptr<OpcUa::AttributeServices> attributes)
00059 {
00060 Impl->RegisterAttributeServices(attributes);
00061 }
00062
00063 virtual void UnregisterAttributeServices()
00064 {
00065 Impl->UnregisterAttributeServices();
00066 }
00067
00068 virtual void RegisterMethodServices(std::shared_ptr<OpcUa::MethodServices> method)
00069 {
00070 Impl->RegisterMethodServices(method);
00071 }
00072
00073 virtual void UnregisterMethodServices()
00074 {
00075 Impl->UnregisterMethodServices();
00076 }
00077
00078 virtual void RegisterNodeManagementServices(std::shared_ptr<OpcUa::NodeManagementServices> nodes)
00079 {
00080 Impl->RegisterNodeManagementServices(nodes);
00081 }
00082
00083 virtual void UnregisterNodeManagementServices()
00084 {
00085 Impl->UnregisterNodeManagementServices();
00086 }
00087
00088 virtual void RegisterSubscriptionServices(std::shared_ptr<OpcUa::SubscriptionServices> subscriptions)
00089 {
00090 Impl->RegisterSubscriptionServices(subscriptions);
00091 }
00092
00093 virtual void UnregisterSubscriptionServices()
00094 {
00095 Impl->UnregisterSubscriptionServices();
00096 }
00097
00098 private:
00099 ServicesRegistry::UniquePtr Impl;
00100 };
00101
00102
00103 }
00104
00105 namespace OpcUa
00106 {
00107 namespace Server
00108 {
00109
00110
00111 Common::Addon::UniquePtr ServicesRegistryFactory::CreateAddon()
00112 {
00113 return Common::Addon::UniquePtr(new ::ServicesRegistryAddon());
00114 }
00115
00116 }
00117 }