00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 #pragma once 00012 00013 #include <src/server/opcua_protocol.h> 00014 00015 #include <opc/ua/server/addons/opcua_protocol.h> 00016 #include <opc/ua/server/addons/endpoints_services.h> 00017 #include <opc/common/addons_core/addon_manager.h> 00018 00019 00020 /* 00021 <parameters> 00022 <!-- Enable/disable debuging of module. --> 00023 <debug>1</debug> 00024 <application> 00025 <!-- Common parameters for all endpoints --> 00026 <application_name>Test OPC UA Server</application_name> 00027 <application_uri>opcua.treww.org</application_uri> 00028 <application_type>server</application_type> 00029 <security_mode>none</security_mode> 00030 <security_policy_uri>http://opcfoundation.org/UA/SecurityPolicy#None</security_policy_uri> 00031 <transport_profile_uri>http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary</transport_profile_uri> 00032 <user_token_policy> 00033 <id>anonymous</id> 00034 <type>anonymous</type> 00035 <uri>http://opcfoundation.org/UA/SecurityPolicy#None</uri> 00036 </user_token_policy> 00037 00038 <!-- endpoint specific parameters. It may overwrite common parameters. --> 00039 <endpoint> 00040 <url>opc.tcp://localhost:4841</url> 00041 </endpoint> 00042 <application> 00043 </parameters> 00044 */ 00045 00046 00047 namespace OpcUa 00048 { 00049 namespace Test 00050 { 00051 /* 00052 void RegisterOpcTcpAddon(Common::AddonsManager& addons) 00053 { 00054 Common::AddonInformation opcTcp; 00055 opcTcp.Factory.reset(new OpcUa::UaServer::OpcUaProtocolAddonFactory()); 00056 opcTcp.Id = OpcUa::UaServer::OpcUaProtocolAddonId; 00057 opcTcp.Dependencies.push_back(OpcUa::UaServer::EndpointsRegistryAddonId); 00058 00059 Common::ParametersGroup application("application"); 00060 application.Parameters.push_back(Common::Parameter("application_name","Test OPC UA Server")); 00061 application.Parameters.push_back(Common::Parameter("application_uri","opcua.treww.org")); 00062 application.Parameters.push_back(Common::Parameter("application_type","server")); 00063 00064 Common::ParametersGroup userTokenPolicy("user_token_policy"); 00065 userTokenPolicy.Parameters.push_back(Common::Parameter("id", "anonymous")); 00066 userTokenPolicy.Parameters.push_back(Common::Parameter("type", "anonymous")); 00067 userTokenPolicy.Parameters.push_back(Common::Parameter("uri", "http://opcfoundation.org/UA/SecurityPolicy#None")); 00068 application.Groups.push_back(userTokenPolicy); 00069 00070 Common::ParametersGroup endpoint("endpoint"); 00071 endpoint.Parameters.push_back(Common::Parameter("url", "opc.tcp://localhost:4841")); 00072 endpoint.Parameters.push_back(Common::Parameter("security_mode","none")); 00073 endpoint.Parameters.push_back(Common::Parameter("transport_profile_uri","http://opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary")); 00074 application.Groups.push_back(endpoint); 00075 00076 opcTcp.Parameters.Groups.push_back(application); 00077 //opcTcp.Parameters.Parameters.push_back(Common::Parameter("debug", "1")); 00078 00079 addons.Register(opcTcp); 00080 } 00081 */ 00082 } 00083 }