Opc.Ua.AcknowledgeableConditionState.UpdateStateAfterAcknowledge C# (CSharp) Method

UpdateStateAfterAcknowledge() protected method

Updates the condition state after enabling.
protected UpdateStateAfterAcknowledge ( ISystemContext context ) : void
context ISystemContext The system context.
return void
        protected virtual void UpdateStateAfterAcknowledge(ISystemContext context)
        {
            TranslationInfo state = new TranslationInfo(
                "ConditionStateAcknowledged",
                "en-US",
                ConditionStateNames.Acknowledged);

            this.AckedState.Value = new LocalizedText(state);
            this.AckedState.Id.Value = true;

            if (this.AckedState.TransitionTime != null)
            {
                this.AckedState.TransitionTime.Value = DateTime.UtcNow;
            }

            UpdateEffectiveState(context);
        }