public QueueValue ( DataValue value, ServiceResult error ) : void | ||
value | DataValue | |
error | ServiceResult | |
Результат | void |
/// <summary> /// Handles change events raised by the node. /// </summary> /// <param name="context">The system context.</param> /// <param name="state">The node that raised the event.</param> /// <param name="masks">What caused the event to be raised</param> public void OnNodeChange(ISystemContext context, NodeState state, NodeStateChangeMasks masks) { if (m_monitoredItems != null) { for (int ii = 0; ii < m_monitoredItems.Count; ii++) { DataChangeMonitoredItem monitoredItem = m_monitoredItems[ii]; // check if the node has been deleted. if ((masks & NodeStateChangeMasks.Deleted) != 0) { monitoredItem.QueueValue(null, StatusCodes.BadNodeIdUnknown); continue; } if (monitoredItem.AttributeId == Attributes.Value) { if ((masks & NodeStateChangeMasks.Value) != 0) { monitoredItem.ValueChanged(context); } } else { if ((masks & NodeStateChangeMasks.NonValue) != 0) { monitoredItem.ValueChanged(context); } } } } }