Opc.Ua.Server.AggregateCalculator.IsGood C# (CSharp) Method

IsGood() protected method

Checks if the value is good according to the configuration rules.
protected IsGood ( DataValue value ) : bool
value DataValue The value to test.
return bool
        protected bool IsGood(DataValue value)
        {
            if (value == null)
            {
                return false;
            }

            if (Configuration.TreatUncertainAsBad)
            {
                if (StatusCode.IsNotGood(value.StatusCode))
                {
                    return false;
                }
            }
            else
            {
                if (StatusCode.IsBad(value.StatusCode))
                {
                    return false;
                }
            }

            return true;
        }