添加项目文件。

This commit is contained in:
2025-02-28 22:23:13 +08:00
parent d4ad2fe2de
commit 547a1b3bf6
416 changed files with 72830 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
using OrpaonEMS.Core.EventHandMsg;
using OrpaonEMS.Core.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrpaonEMS.App.Models
{
/// <summary>
/// PCS故障单元
/// </summary>
public class PcsAlarmCell
{
public PcsAlarmCell()
{
CurTimeInfo = new AlarmTimeInfo();
}
/// <summary>
/// 发布报警信息
/// </summary>
public event EventHandler<PcsAlarmCellEventHandMsg> PubPcsAlarmEventHandler;
/// <summary>
/// 报警内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// Bit位置
/// </summary>
public ushort BitIndex { get; set; }
private bool _State;
/// <summary>
/// 报警状态
/// </summary>
public bool State
{
get { return _State; }
set
{
if (_State != value && value == true)//报警发生
{
_State = value;
CurTimeInfo.StartTime = DateTime.Now;
//发布报警
PubPcsAlarmEventHandler(this, new PcsAlarmCellEventHandMsg() { State = true, Content = Content, Level = 3, CurTimeInfo = CurTimeInfo });
}
else if (_State != value && value == false)//报警消失
{
_State = value;
CurTimeInfo.EndTime = DateTime.Now;
//发布报警
PubPcsAlarmEventHandler(this, new PcsAlarmCellEventHandMsg() { State = false, Content = Content, Level = 3, CurTimeInfo = CurTimeInfo });
}
}
}
/// <summary>
/// 报警时间信息
/// </summary>
public AlarmTimeInfo CurTimeInfo { get; set; }
///// <summary>
///// 报警状态
///// </summary>
//public bool State { get; set; }
}
}