Sic.Framework-Nanjing-Baishi/MECF.Framework.Common/MECF/Framework/Common/MultiProcess/ProcessData/PMProcessData.cs

79 lines
2.2 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;
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
};
}
}
}