79 lines
2.2 KiB
C#
79 lines
2.2 KiB
C#
using System;
|
||
|
||
namespace MECF.Framework.Common.MultiProcess.ProcessCenter
|
||
{
|
||
//使用加热基数作为逻辑判断条件,S栋目前最多支持4个加热基数, 一个ProcessIdle是一个加热基数,Run是两个加热基数
|
||
public class PMProcessData : ICloneable
|
||
{
|
||
/// <summary>
|
||
/// 设备名
|
||
/// </summary>
|
||
public string SicMachineName { get; set; }
|
||
|
||
public bool IsOnline { get; set; } = true;
|
||
|
||
/// <summary>
|
||
/// PM名称
|
||
/// </summary>
|
||
public string PmName { get; set; }
|
||
|
||
private string pmState;
|
||
|
||
/// <summary>
|
||
/// PM腔体当前状态,记录客户端发送来的状态,目前与加热基数相同
|
||
/// </summary>
|
||
public string PmState
|
||
{
|
||
get => pmState;
|
||
set
|
||
{
|
||
pmState = value;
|
||
if (pmState== "1")//根据设备状态,计算加热基数
|
||
{
|
||
Heat = 2;
|
||
}
|
||
else if (pmState == "2")
|
||
{
|
||
Heat = 1;
|
||
}
|
||
else
|
||
{
|
||
Heat = 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// Process当前状态转换
|
||
/// </summary>
|
||
public string ProcessState { get; set; }
|
||
|
||
/// <summary>
|
||
/// 保温状态,0, 1, 2
|
||
/// </summary>
|
||
public int Heat { get; set; }
|
||
|
||
public string SicMachineID { get; set; }
|
||
|
||
public string StateChangeTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||
|
||
public DateTime HeartBeatTime { get; set; } = DateTime.Now;
|
||
|
||
public object Clone()
|
||
{
|
||
return new PMProcessData()
|
||
{
|
||
SicMachineName = SicMachineName,
|
||
IsOnline = IsOnline,
|
||
PmName = PmName,
|
||
PmState = PmState,
|
||
Heat = Heat,
|
||
ProcessState=ProcessState,
|
||
SicMachineID = SicMachineID,
|
||
StateChangeTime = StateChangeTime,
|
||
HeartBeatTime = HeartBeatTime
|
||
};
|
||
}
|
||
}
|
||
}
|