Opc.Ua.ExclusiveLimitAlarmState.SetActiveState C# (CSharp) Method

SetActiveState() public method

Sets the active state of the condition.
public SetActiveState ( ISystemContext context, bool active ) : void
context ISystemContext The system context.
active bool if set to true the condition is active.
return void
        public override void SetActiveState(
            ISystemContext context,
            bool active)
        {
            // set it inactive.
            if (!active)
            {
                SetLimitState(context, LimitAlarmStates.Inactive);
                return;
            }

            // check if the level state machine needs an initial state.
            if (this.LimitState.CurrentState.Id.Value != null)
            {
                base.SetActiveState(context, true);
                return;
            }

            // assume a high if the high limit is specified.
            if (this.HighLimit != null)
            {
                SetLimitState(context, LimitAlarmStates.High);
            }
            else
            {
                SetLimitState(context, LimitAlarmStates.Low);
            }
        }
ExclusiveLimitAlarmState