当前位置: 首页>>代码示例>>C#>>正文


C# IServerInternal类代码示例

本文整理汇总了C#中IServerInternal的典型用法代码示例。如果您正苦于以下问题:C# IServerInternal类的具体用法?C# IServerInternal怎么用?C# IServerInternal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IServerInternal类属于命名空间,在下文中一共展示了IServerInternal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QuickstartNodeManager

 /// <summary>
 /// Initializes the node manager.
 /// </summary>
 protected QuickstartNodeManager(
     IServerInternal server,
     params string[] namespaceUris)
 :
     this(server, (ApplicationConfiguration)null, namespaceUris)
 {            
 }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:10,代码来源:QuickstartNodeManager.cs

示例2: CreateMasterNodeManager

        /// <summary>
        /// Creates the node managers for the server.
        /// </summary>
        /// <remarks>
        /// This method allows the sub-class create any additional node managers which it uses. The SDK
        /// always creates a CoreNodeManager which handles the built-in nodes defined by the specification.
        /// Any additional NodeManagers are expected to handle application specific nodes.
        /// </remarks>
        protected override MasterNodeManager CreateMasterNodeManager(IServerInternal server, ApplicationConfiguration configuration)
        {
            Utils.Trace("Creating the Node Managers.");

            List<INodeManager> nodeManagers = new List<INodeManager>();

            // create the custom node managers.
            nodeManagers.Add(new TutorialNodeManager(server, configuration));

            #region Task #C4 - Add Support for COM Wrapper
            // manually configure the COM server to prevent unapproved wrappers.
            ComDaClientConfiguration wrapperConfig = new ComDaClientConfiguration();

            wrapperConfig.ServerName = "COM";
            wrapperConfig.ServerUrl = "opc.com://localhost/OPCSample.OpcDaServer";
            wrapperConfig.MaxReconnectWait = 10000;
            wrapperConfig.SeperatorChars = null;
            wrapperConfig.BrowseToNotSupported = false;
            wrapperConfig.ItemIdParser = new ItemIdParser();

            // create an instance of the wrapper node manager.
            TutorialDaComNodeManager manager = new TutorialDaComNodeManager(
                server,
                wrapperConfig.ServerUrl,
                wrapperConfig,
                true);

            nodeManagers.Add(manager);
            #endregion

            // create master node manager.
            return new MasterNodeManager(server, configuration, null, nodeManagers.ToArray());
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:41,代码来源:TutorialServer.cs

示例3: SamplingGroupManager

        /// <summary>
        /// Creates a new instance of a sampling group.
        /// </summary>
        public SamplingGroupManager(
            IServerInternal                server,
            INodeManager                   nodeManager,
            uint                           maxQueueSize,
            IEnumerable<SamplingRateGroup> samplingRates)
        {
            if (server == null)      throw new ArgumentNullException("server");
            if (nodeManager == null) throw new ArgumentNullException("nodeManager");

            m_server          = server;
            m_nodeManager     = nodeManager;
            m_samplingGroups  = new List<SamplingGroup>();
            m_sampledItems    = new Dictionary<ISampledDataChangeMonitoredItem,SamplingGroup>();
            m_maxQueueSize    = maxQueueSize;

            if (samplingRates != null)
            {
                m_samplingRates = new List<SamplingRateGroup>(samplingRates);
            
                if (m_samplingRates.Count == 0)
                {
                    m_samplingRates = new List<SamplingRateGroup>(s_DefaultSamplingRates);
                }
            }

            if (m_samplingRates == null)
            {
                m_samplingRates = new List<SamplingRateGroup>(s_DefaultSamplingRates);
            }
        }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:33,代码来源:SamplingGroupManager.cs

示例4: CoreNodeManager

        /// <summary>
        /// Initializes the object with default values.
        /// </summary>
        public CoreNodeManager(
            IServerInternal          server,
            ApplicationConfiguration configuration,
            ushort                   dynamicNamespaceIndex)
        {
            if (server == null)        throw new ArgumentNullException("server");
            if (configuration == null) throw new ArgumentNullException("configuration");
                  
            m_server                         = server;
            m_nodes                          = new NodeTable(server.NamespaceUris, server.ServerUris, server.TypeTree);
            m_monitoredItems                 = new Dictionary<uint,MonitoredItem>();
            m_defaultMinimumSamplingInterval = 1000;
            m_namespaceUris                  = new List<string>();
            m_dynamicNamespaceIndex          = dynamicNamespaceIndex; 
            
            #if LEGACY_CORENODEMANAGER
            m_eventSources = new Dictionary<object,IEventSource>();
            #endif

            // use namespace 1 if out of range.
            if (m_dynamicNamespaceIndex == 0 || m_dynamicNamespaceIndex >= server.NamespaceUris.Count)
            {
                m_dynamicNamespaceIndex = 1;
            }

            m_samplingGroupManager = new SamplingGroupManager(
                server, 
                this,
                (uint)configuration.ServerConfiguration.MaxNotificationQueueSize,
                configuration.ServerConfiguration.AvailableSamplingRates);
        }
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:34,代码来源:CoreNodeManager.cs

示例5: OnServerStarted

 /// <summary>
 /// Called after the server has been started.
 /// </summary>
 protected override void OnServerStarted(IServerInternal server)
 {
     base.OnServerStarted(server);
     
     // request notifications when the user identity is changed. all valid users are accepted by default.
     server.SessionManager.ImpersonateUser += new ImpersonateEventHandler(SessionManager_ImpersonateUser);
 }
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:10,代码来源:SampleServer.cs

示例6: ComDaClientNodeManager

        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public ComDaClientNodeManager(IServerInternal server, string namespaceUri, ComDaClientConfiguration configuration, bool ownsTypeModel)
        :
            base(server, namespaceUri, ownsTypeModel)
        {
            SystemContext.SystemHandle = m_system = new ComDaClientManager();
            SystemContext.NodeIdFactory = this;

            // save the configuration for the node manager.
            m_configuration = configuration;

            // set the alias root.
            AliasRoot = m_configuration.ServerName;

            if (String.IsNullOrEmpty(AliasRoot))
            {
                AliasRoot = "DA";
            }

            // set the default parser if none provided.
            if (configuration.ItemIdParser == null)
            {
                configuration.ItemIdParser = new ComItemIdParser();
            }

            // create the list of subscriptions.
            m_subscriptionManagers = new Dictionary<string, SubscribeRequestManager>();
            m_subscriptionManagers[String.Empty] = new SubscribeRequestManager(SystemContext, null, 1000);
            m_monitoredItems = new Dictionary<uint, SubscribeRequestManager>();
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:32,代码来源:ComDaClientNodeManager.cs

示例7: SamplingGroup

        /// <summary>
        /// Creates a new instance of a sampling group.
        /// </summary>
        public SamplingGroup(
            IServerInternal         server,
            INodeManager            nodeManager,
            List<SamplingRateGroup> samplingRates,
            OperationContext        context,
            double                  samplingInterval)
        {
            if (server == null)        throw new ArgumentNullException("server");
            if (nodeManager == null)   throw new ArgumentNullException("nodeManager");
            if (samplingRates == null) throw new ArgumentNullException("samplingRates");

            m_server           = server;
            m_nodeManager      = nodeManager;
            m_samplingRates    = samplingRates;
            m_session          = context.Session;
            m_diagnosticsMask  = (DiagnosticsMasks)context.DiagnosticsMask & DiagnosticsMasks.OperationAll;
            m_samplingInterval = AdjustSamplingInterval(samplingInterval);

            m_itemsToAdd    = new List<ISampledDataChangeMonitoredItem>();
            m_itemsToRemove = new List<ISampledDataChangeMonitoredItem>();
            m_items         = new Dictionary<uint, ISampledDataChangeMonitoredItem>();

            // create a event to signal shutdown.
            m_shutdownEvent = new ManualResetEvent(true);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:28,代码来源:SamplingGroup.cs

示例8: SubscriptionManager

        /// <summary>
        /// Initializes the manager with its configuration.
        /// </summary>
        public SubscriptionManager(
            IServerInternal          server,
            ApplicationConfiguration configuration)
        {
            if (server == null)        throw new ArgumentNullException("server");
            if (configuration == null) throw new ArgumentNullException("configuration");
            
            m_server = server;
            
            m_minPublishingInterval      = configuration.ServerConfiguration.MinPublishingInterval;
            m_maxPublishingInterval      = configuration.ServerConfiguration.MaxPublishingInterval;
            m_publishingResolution       = configuration.ServerConfiguration.PublishingResolution;
            m_maxSubscriptionLifetime    = (uint)configuration.ServerConfiguration.MaxSubscriptionLifetime;
            m_minSubscriptionLifetime    = (uint)configuration.ServerConfiguration.MinSubscriptionLifetime;
            m_maxMessageCount            = (uint)configuration.ServerConfiguration.MaxMessageQueueSize;
            m_maxNotificationsPerPublish = (uint)configuration.ServerConfiguration.MaxNotificationsPerPublish;
            m_maxPublishRequestCount     = configuration.ServerConfiguration.MaxPublishRequestCount;
            m_maxSubscriptionCount       = configuration.ServerConfiguration.MaxSubscriptionCount;

            m_subscriptions           = new Dictionary<uint,Subscription>();
            m_publishQueues           = new Dictionary<NodeId,SessionPublishQueue>();
            m_statusMessages          = new Dictionary<NodeId, Queue<StatusMessage>>();
            
            // create a event to signal shutdown.
            m_shutdownEvent = new ManualResetEvent(true);
        }
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:29,代码来源:SubscriptionManager.cs

示例9: ComHdaClientNodeManager

        /// <summary>
        /// Initializes the node manager.
        /// </summary>
        public ComHdaClientNodeManager(IServerInternal server, string namespaceUri, ComHdaClientConfiguration configuration, bool ownsTypeModel)
        :
            base(server, namespaceUri, ownsTypeModel)
        {
            SystemContext.SystemHandle = m_system = new ComHdaClientManager();
            SystemContext.NodeIdFactory = this;

            // save the configuration for the node manager.
            m_configuration = configuration;

            // set the alias root.
            AliasRoot = m_configuration.ServerName;

            if (String.IsNullOrEmpty(AliasRoot))
            {
                AliasRoot = "HDA";
            }

            // set the default parser if none provided.
            if (configuration.ItemIdParser == null)
            {
                configuration.ItemIdParser = new ComItemIdParser();
            }

            // set default parameters.
            if (m_configuration.AttributeSamplingInterval == 0)
            {
                m_configuration.AttributeSamplingInterval = 1000;
            }

            // create the list of subscriptions.
            m_subscriptionManagers = new Dictionary<int, HdaSubscribeRequestManager>();
            m_subscriptionManagers[ComUtils.LOCALE_SYSTEM_DEFAULT] = new HdaSubscribeRequestManager(SystemContext, ComUtils.LOCALE_SYSTEM_DEFAULT, m_configuration);
            m_monitoredItems = new Dictionary<uint, HdaSubscribeRequestManager>();
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:38,代码来源:ComHdaClientNodeManager.cs

示例10: ObjectSource

 /// <summary>
 /// Adds the source to the type table.
 /// </summary>
 public ObjectSource(
     IServerInternal server,
     NodeSource      parent)
 : 
     base(server, parent)
 {
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:10,代码来源:ObjectSource.cs

示例11: RequestManager

        /// <summary>
        /// Initilizes the manager.
        /// </summary>
        /// <param name="server"></param>
        public RequestManager(IServerInternal server)
        {
            if (server == null) throw new ArgumentNullException("server");

            m_server       = server;
            m_requests     = new Dictionary<uint,OperationContext>();
            m_requestTimer = null;
        }
开发者ID:yuriik83,项目名称:UA-.UWP-Universal-Windows-Platform,代码行数:12,代码来源:RequestManager.cs

示例12: MethodSource

        /// <summary>
        /// Initializes the object with default values.
        /// </summary>
        public MethodSource(IServerInternal server, MethodArguments arguments) : base(server, null)
        {
            if (arguments == null) throw new ArgumentNullException("arguments");

            m_arguments = arguments;
            m_callbacks = new Dictionary<NodeId,CallbackParameters>();
            m_executable = m_userExecutable = true;
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:11,代码来源:MethodSource.cs

示例13: ServerSystemContext

 /// <summary>
 /// Initializes a new instance of the <see cref="SystemContext"/> class.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="context">The context.</param>
 public ServerSystemContext(IServerInternal server, OperationContext context)
 {
     OperationContext = context;
     NamespaceUris = server.NamespaceUris;
     ServerUris = server.ServerUris;
     TypeTable = server.TypeTree;
     EncodeableFactory = server.Factory;
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:13,代码来源:ServerSystemContext.cs

示例14: EventManager

        /// <summary>
        /// Creates a new instance of a sampling group.
        /// </summary>
        public EventManager(IServerInternal server, uint maxQueueSize)
        {
            if (server == null) throw new ArgumentNullException("server");

            m_server = server;
            m_monitoredItems = new Dictionary<uint,IEventMonitoredItem>();
            m_maxEventQueueSize = maxQueueSize;
        }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:11,代码来源:EventManager.cs

示例15: LoadTypes

 /// <summary>
 /// Fetches the event type information from the AE server.
 /// </summary>
 public void LoadTypes(Opc.Ua.Client.Session client, IServerInternal server, NamespaceMapper mapper)
 {
     TypeNodes = new NodeIdDictionary<ReferenceDescription>();
     LoadTypes(client, server, mapper, Opc.Ua.ObjectTypeIds.BaseObjectType);
     LoadTypes(client, server, mapper, Opc.Ua.VariableTypeIds.BaseVariableType);
     LoadTypes(client, server, mapper, Opc.Ua.DataTypeIds.BaseDataType);
     LoadTypes(client, server, mapper, Opc.Ua.ReferenceTypeIds.References);
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:11,代码来源:AggregatedTypeCache.cs


注:本文中的IServerInternal类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。