Inheritance: BaseInstanceSource, IObject, IEventSource
コード例 #1
0
ファイル: ObjectSource.cs プロジェクト: fr830/OPCUA.NET
        /// <summary>
        /// Creates a new instance of the node.
        /// </summary>
        public static ObjectSource Construct(IServerInternal server)
        {
            ObjectSource instance = new ObjectSource(server, null);

            instance.Initialize(null, null, null, 0, ObjectTypes.BaseObjectType);
            return(instance);
        }
コード例 #2
0
ファイル: ObjectSource.cs プロジェクト: fr830/OPCUA.NET
        /// <summary>
        /// Reports an event produced by the object.
        /// </summary>
        public virtual void ReportEvent(BaseEvent e)
        {
            lock (DataLock)
            {
                if (m_reportEventsToParent)
                {
                    ObjectSource parent = Parent as ObjectSource;

                    if (parent != null)
                    {
                        parent.ReportEvent(e);
                    }
                }

                List <IEventMonitoredItem> monitoredItems = new List <IEventMonitoredItem>();

                if (MonitoredItems != null)
                {
                    foreach (IMonitoredItem monitoredItem in MonitoredItems)
                    {
                        IEventMonitoredItem eventItem = monitoredItem as IEventMonitoredItem;

                        if (eventItem != null)
                        {
                            monitoredItems.Add(eventItem);
                        }
                    }

                    if (monitoredItems.Count > 0)
                    {
                        EventManager.ReportEvent(e, monitoredItems);
                    }
                }
            }
        }
コード例 #3
0
ファイル: ObjectSource.cs プロジェクト: fr830/OPCUA.NET
 /// <summary cref="NodeSource.Clone(NodeSource)" />
 public override NodeSource Clone(NodeSource parent)
 {
     lock (DataLock)
     {
         ObjectSource clone = this;
         clone.Initialize(this);
         return(clone);
     }
 }
コード例 #4
0
ファイル: ObjectSource.cs プロジェクト: fr830/OPCUA.NET
        /// <summary cref="NodeSource.Initialize(NodeSource)" />
        public override void Initialize(NodeSource source)
        {
            lock (DataLock)
            {
                base.Initialize(source);

                ObjectSource instance = (ObjectSource)source;

                m_eventNotifier = instance.m_eventNotifier;
            }
        }
コード例 #5
0
ファイル: ObjectSource.cs プロジェクト: yuriik83/UA-.NET
 /// <summary>
 /// Creates a new instance of the node.
 /// </summary>
 public static ObjectSource Construct(
     IServerInternal server, 
     NodeSource      parent, 
     NodeId          referenceTypeId,
     NodeId          nodeId,
     QualifiedName   browseName,
     uint            numericId)
 {
     ObjectSource instance = new ObjectSource(server, parent);
     instance.Initialize(referenceTypeId, nodeId, browseName, numericId, ObjectTypes.BaseObjectType);
     return instance;
 }
コード例 #6
0
ファイル: ObjectSource.cs プロジェクト: fr830/OPCUA.NET
        /// <summary>
        /// Creates a new instance of the node.
        /// </summary>
        public static ObjectSource Construct(
            IServerInternal server,
            NodeSource parent,
            NodeId referenceTypeId,
            NodeId nodeId,
            QualifiedName browseName,
            uint numericId)
        {
            ObjectSource instance = new ObjectSource(server, parent);

            instance.Initialize(referenceTypeId, nodeId, browseName, numericId, ObjectTypes.BaseObjectType);
            return(instance);
        }
コード例 #7
0
ファイル: ObjectSource.cs プロジェクト: yuriik83/UA-.NET
 /// <summary>
 /// Creates a new instance of the node.
 /// </summary>
 public static ObjectSource Construct(IServerInternal server)
 {
     ObjectSource instance = new ObjectSource(server, null);
     instance.Initialize(null, null, null, 0, ObjectTypes.BaseObjectType);
     return instance;
 }