Sic.Framework-Nanjing-Baishi/MECF.Framework.Common/Aitex/Core/RT/Device/IDevice.cs

67 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}
}