Inheritance: BaseInstanceSource, IObject, IEventSource
Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        /// <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);
                    }
                }
            }
        }
Beispiel #3
0
 /// <summary cref="NodeSource.Clone(NodeSource)" />
 public override NodeSource Clone(NodeSource parent)
 {
     lock (DataLock)
     {
         ObjectSource clone = this;
         clone.Initialize(this);
         return(clone);
     }
 }
Beispiel #4
0
        /// <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;
            }
        }
Beispiel #5
0
 /// <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;
 }
Beispiel #6
0
        /// <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);
        }
Beispiel #7
0
 /// <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;
 }