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

SetEffectiveSubState() public method

Called when one or more sub-states change state.
public SetEffectiveSubState ( ISystemContext context, Opc.Ua.LocalizedText displayName, System.DateTime transitionTime ) : void
context ISystemContext The context.
displayName Opc.Ua.LocalizedText The display name for the effective state.
transitionTime System.DateTime The transition time.
return void
        public virtual void SetEffectiveSubState(ISystemContext context, LocalizedText displayName, DateTime transitionTime)
        {
            if (this.EnabledState.EffectiveDisplayName != null)
            {
                this.EnabledState.EffectiveDisplayName.Value = displayName;
            }

            if (this.EnabledState.EffectiveTransitionTime != null)
            {
                if (transitionTime != DateTime.MinValue)
                {
                    this.EnabledState.EffectiveTransitionTime.Value = transitionTime;
                }
                else
                {
                    this.EnabledState.EffectiveTransitionTime.Value = DateTime.UtcNow;
                }
            }
        }