Opc.Ua.Server.DiagnosticsNodeManager.OnBeforeReadDiagnostics C# (CSharp) Method

OnBeforeReadDiagnostics() private method

Does a scan before the diagnostics are read.
private OnBeforeReadDiagnostics ( ISystemContext context, BaseVariableValue variable, NodeState component ) : void
context ISystemContext
variable BaseVariableValue
component NodeState
return void
        private void OnBeforeReadDiagnostics(
            ISystemContext context,
            BaseVariableValue variable,
            NodeState component)
        {
            lock (Lock)
            {
                if (!m_diagnosticsEnabled)
                {
                    return;
                }

                if (DateTime.UtcNow < m_lastDiagnosticsScanTime.AddSeconds(1))
                {
                    return;
                }

                DoScan(true);
            }
        }