Opc.Ua.ConditionState.UpdateStateAfterDisable C# (CSharp) Method

UpdateStateAfterDisable() protected method

Updates the condition state after disabling.
protected UpdateStateAfterDisable ( ISystemContext context ) : void
context ISystemContext The system context.
return void
        protected virtual void UpdateStateAfterDisable(ISystemContext context)
        {
            TranslationInfo state = new TranslationInfo(
                "ConditionStateDisabled",
                "en-US",
                ConditionStateNames.Disabled);

            this.Retain.Value = false;
            this.EnabledState.Value = new LocalizedText(state);
            this.EnabledState.Id.Value = false;

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

            UpdateEffectiveState(context);
        }
        #endregion