39 using namespace OpcUa;
47 void CreateCommonAddonsConfiguration(
const Common::AddonParameters & params, std::vector<Common::AddonInformation> & addons)
59 AddParameters(endpointsRegistry, group);
72 AddParameters(addressSpaceRegistry, group);
78 AddParameters(opcTcpAsync, group);
79 addons.push_back(opcTcpAsync);
84 AddParameters(asioAddon, group);
89 AddParameters(subscriptionService, group);
94 AddParameters(serverObject, group);
98 addons.push_back(endpointsRegistry);
99 addons.push_back(addressSpaceRegistry);
100 addons.push_back(asioAddon);
101 addons.push_back(subscriptionService);
104 addons.push_back(serverObject);
107 inline void RegisterAddons(std::vector<Common::AddonInformation> addons,
Common::AddonsManager & manager)
123 async.Parameters.push_back(debugMode);
124 addons.
Groups.push_back(async);
127 addressSpace.Parameters.push_back(debugMode);
128 addons.
Groups.push_back(addressSpace);
131 endpointServices.Parameters.push_back(debugMode);
132 addons.
Groups.push_back(endpointServices);
135 subscriptionServices.Parameters.push_back(debugMode);
136 addons.
Groups.push_back(subscriptionServices);
139 opc_tcp.Parameters.push_back(debugMode);
144 addons.
Groups.push_back(opc_tcp);
156 services.
Factory = std::make_shared<OpcUa::Server::ServicesRegistryFactory>();
164 config.
Factory = std::make_shared<OpcUa::Server::AddressSpaceAddonFactory>();
173 config.
Factory = std::make_shared<OpcUa::Server::StandardNamespaceAddonFactory>();
182 endpoints.
Factory = std::make_shared<OpcUa::Server::EndpointsRegistryAddonFactory>();
201 opcTcp.
Factory = std::make_shared<OpcUa::Server::AsyncOpcTcpAddonFactory>();
212 serverObjectAddon.
Factory = std::make_shared<OpcUa::Server::ServerObjectFactory>();
217 return serverObjectAddon;
223 asioAddon.
Factory = std::make_shared<OpcUa::Server::AsioAddonFactory>();
231 subscriptionAddon.
Factory = std::make_shared<OpcUa::Server::SubscriptionServiceAddonFactory>();
236 return subscriptionAddon;
241 std::vector<Common::AddonInformation> addons;
243 CreateCommonAddonsConfiguration(addonParameters, addons);
244 RegisterAddons(addons, manager);
250 std::vector<Common::AddonInformation> addons(configuration.
Modules.size());
256 CreateCommonAddonsConfiguration(configuration.
Parameters, addons);
257 RegisterAddons(addons, manager);
Configuration ParseConfigurationFiles(const std::string &directory)
ApplicationDescription Application
virtual const Logger::SharedPtr & GetLogger() const
const char AsyncOpcTcpAddonId[]
const char EndpointsRegistryAddonId[]
const char SubscriptionServiceAddonId[]
Common::AddonInformation GetAddonInfomation(const ModuleConfiguration &config)
std::vector< Parameter > Parameters
Common::AddonInformation CreateEndpointsRegistryAddon()
Common::AddonInformation CreateOpcTcpAsyncAddon()
Common::AddonInformation CreateStandardNamespaceAddon()
std::vector< ParametersGroup > Groups
std::vector< EndpointDescription > Endpoints
const char AddressSpaceRegistryAddonId[]
void LoadConfiguration(const std::string &configDirectoryPath, Common::AddonsManager &addons)
Load parameters from configuration files. This function will enumerate '*.config' files in the direct...
Common::AddonInformation CreateAsioAddon()
const char ServicesRegistryAddonId[]
EndpointDescription Endpoint
OpcUa::ApplicationDescription Server
Common::AddonParameters Parameters
Common::AddonInformation CreateAddressSpaceAddon()
OPC UA Address space part. GNU LGPL.
void RegisterCommonAddons(const Parameters ¶ms, Common::AddonsManager &addons)
parameters of server. can be used at embedded.
Common::AddonInformation CreateServicesRegistryAddon()
std::vector< ParametersGroup > Groups
Common::AddonInformation CreateSubscriptionServiceAddon()
Common::AddonInformation CreateServerObjectAddon()
const char ServerObjectAddonId[]
virtual void Register(const AddonInformation &caddonConfiguration)=0
register new addon.
std::vector< ModuleConfiguration > Modules
const char StandardNamespaceAddonId[]
std::vector< Parameter > Parameters
std::vector< Common::ParametersGroup > CreateCommonParameters(const std::vector< Server::ApplicationData > &endpoints, const Common::Logger::SharedPtr &logger)