using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MECF.Framework.Common.Aitex.Core.RT.EMS
{
///
/// 观察者:对某一参数进行观察记录,观察到参数达到阈值时,进行一系列动作
///
public interface IObserver
{
#region Properties
///
/// 观察者名称(要保证唯一性)
///
string Name { get; set; }
///
/// 观察者模组
///
string Module { get; set; }
///
/// 观察者序号
///
int Index { get; set; }
///
/// 描述
///
string Description { get; set; }
///
/// 是否使能
///
bool Enable { get; set; }
///
/// 是否超时
///
bool IsTrigger { get; }
///
/// 是否计时中
///
bool IsProcessing { get; }
///
/// 开始观察时间
///
DateTime StartDate { get; }
///
/// 记录值
///
double Value { get; }
///
/// 阈值
///
double Threshold { get; }
///
/// 触发时间
///
DateTime? TrigDate { get; }
///
/// 超时时间
///
double TimeExceeded { get; }
///
/// 超时单位
///
TimeUnit TimeDisplayUnit { get; set; }
///
/// 超出阈值量
///
double ValueExceeded { get; }
#endregion
#region Methods
///
/// 复位观察者
///
/// 操作结果
bool Reset();
///
/// 复位条件
///
///
bool CanReset();
///
/// 监控运行
///
void Monitor();
///
/// 设置阈值
///
/// 操作结果
bool SetThreshold(double threshold);
///
/// 设置开始时间
///
/// 开始日期
/// 操作结果
bool SetStartDate(DateTime t);
bool SetMaintain(string parentname, string name, int itemid, DateTime date);
public Dictionary> GetAllMaintainerItemsDic();
public bool SetMaintainerItemEnable(string parentname, string name, int itemid, bool enable);
public void AddMaintainerItem(string parentname, MaintainerItem item);
public void RemoveMaintainerItem(string parentname, string itemname, int id);
#endregion
}
}