The current status of monitored item.
Beispiel #1
0
        /// <summary>
        /// Sets the private members to default values.
        /// </summary>
        private void Initialize()
        {
            m_startNodeId        = null;
            m_relativePath       = null;
            m_clientHandle       = 0;
            m_attributeId        = Attributes.Value;
            m_indexRange         = null;
            m_encoding           = null;
            m_monitoringMode     = MonitoringMode.Reporting;
            m_samplingInterval   = -1;
            m_filter             = null;
            m_queueSize          = 0;
            m_discardOldest      = true;
            m_attributesModified = true;
            m_status             = new MonitoredItemStatus();

            // this ensures the state is consistent with the node class.
            NodeClass = NodeClass.Variable;

            // assign a unique handle.
            m_clientHandle = Utils.IncrementIdentifier(ref s_GlobalClientHandle);
        }
        /// <summary>
        /// Sets the private members to default values.
        /// </summary>
        private void Initialize()
        {
            m_startNodeId          = null;
            m_relativePath         = null;
            m_clientHandle         = 0;
            m_attributeId          = Attributes.Value;
            m_indexRange           = null;
            m_encoding             = null; 
            m_monitoringMode       = MonitoringMode.Reporting;
            m_samplingInterval     = -1;
            m_filter               = null;
            m_queueSize            = 0;
            m_discardOldest        = true;
            m_attributesModified   = true;
            m_status               = new MonitoredItemStatus();

            // this ensures the state is consistent with the node class.
            NodeClass = NodeClass.Variable;

            // assign a unique handle.
            m_clientHandle = Utils.IncrementIdentifier(ref s_GlobalClientHandle);
        }
        /// <summary>
        /// Updates the row with the monitored item status.
        /// </summary>
        private void UpdateRow(DataRow row, MonitoredItemStatus status)
        {
            row[4] = status.SamplingInterval;

            if (ServiceResult.IsBad(status.Error))
            {
                row[6] = status.Error.StatusCode;
            }
            else
            {
                row[6] = (StatusCode)StatusCodes.Good;
            }
        }
        /// <summary>
        /// Updates the row with the monitored item status.
        /// </summary>
        private void UpdateRow(DataRow row, MonitoredItemStatus status)
        {
            row[5] = status.MonitoringMode;
            row[6] = status.SamplingInterval;
            row[7] = status.QueueSize;
            row[8] = status.DiscardOldest;
            row[9] = status.Filter;

            if (ServiceResult.IsBad(status.Error))
            {
                row[10] = new StatusCode(status.Error.Code);
            }
            else
            {
                row[10] = new StatusCode();
            }
        }