SetShelvingState() public method

Sets the shelving state of the condition.
public SetShelvingState ( ISystemContext context, bool shelved, bool oneShot, double shelvingTime ) : void
context ISystemContext The shelving context.
shelved bool if set to true shelved.
oneShot bool if set to true for a one shot shelve..
shelvingTime double The duration of a timed shelve.
return void
コード例 #1
0
ファイル: SourceState.cs プロジェクト: OPCFoundation/UA-.NET
        /// <summary>
        /// Called when the alarm is shelved.
        /// </summary>
        private ServiceResult OnTimedUnshelve(
            ISystemContext context,
            AlarmConditionState alarm)
        {
            // update the alarm state and produce and event.
            alarm.SetShelvingState(context, false, false, 0);
            alarm.Message.Value = "The timed shelving period expired.";

            UpdateAlarm(alarm, null);
            ReportChanges(alarm);

            return ServiceResult.Good;
        }
コード例 #2
0
ファイル: SourceState.cs プロジェクト: OPCFoundation/UA-.NET
        /// <summary>
        /// Called when the alarm is shelved.
        /// </summary>
        private ServiceResult OnShelve(
            ISystemContext context,
            AlarmConditionState alarm,
            bool shelving,
            bool oneShot,
            double shelvingTime)
        {
            alarm.SetShelvingState(context, shelving, oneShot, shelvingTime);
            alarm.Message.Value = "The alarm shelved.";

            UpdateAlarm(alarm, null);
            ReportChanges(alarm);

            return ServiceResult.Good;
        }