67 lines
1.5 KiB
C#
67 lines
1.5 KiB
C#
using System;
|
||
using MECF.Framework.Common.Event;
|
||
|
||
namespace Aitex.Core.RT.Device
|
||
{
|
||
public interface IDevice
|
||
{
|
||
#region Properties
|
||
|
||
/// <summary>
|
||
/// 当设备报警状态发生变化时,调用此事件。
|
||
/// </summary>
|
||
event Action<string, AlarmEventItem> OnDeviceAlarmStateChanged;
|
||
|
||
/// <summary>
|
||
/// 设置或返回当前设备所属模组的名称。
|
||
/// </summary>
|
||
string Module { get; set; }
|
||
|
||
/// <summary>
|
||
/// 设置或返回当前设备的名称。
|
||
/// </summary>
|
||
string Name { get; set; }
|
||
|
||
/// <summary>
|
||
/// 设置或返回当前设备是否被使能。
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// 默认情况下,当设备被创建时自动使能;但如果设备对应的Module被配置为UnInstalled,则该设备
|
||
/// 会被其所属Module禁用,以提高RT性能,及避免产生不必要的报警信息。
|
||
/// </remarks>
|
||
bool IsEnabled { get; set; }
|
||
|
||
/// <summary>
|
||
/// 设置或返回设备是否产生报警。
|
||
/// </summary>
|
||
bool HasAlarm { get; }
|
||
|
||
#endregion
|
||
|
||
#region Methods
|
||
|
||
/// <summary>
|
||
/// 初始化当前设备。
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
bool Initialize();
|
||
|
||
/// <summary>
|
||
/// 执行当前设备的周期性扫描任务。
|
||
/// </summary>
|
||
void Monitor();
|
||
|
||
/// <summary>
|
||
/// 终止当前设备。
|
||
/// </summary>
|
||
void Terminate();
|
||
|
||
/// <summary>
|
||
/// 复位当前设备。
|
||
/// </summary>
|
||
void Reset();
|
||
|
||
#endregion
|
||
}
|
||
}
|