唐山轨道机控制端TCP服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

using EGFramework;
using Newtonsoft.Json;
namespace Emergency_platform{
public class ResponseNumericalValue : IResponse
{
public string action { set; get; }
public string taskid { set; get; }
public string halmet { set; get; }
public string cabinetid { set; get; }
public string targetname { set; get; }
public bool TrySetData(string protocolData, byte[] protocolBytes)
{
try
{
ResponseNumericalValue data = JsonConvert.DeserializeObject<ResponseNumericalValue>(protocolData);
if(data.action == "numericalValue"){
this.action = data.action;
this.taskid = data.taskid;
this.halmet = data.halmet;
this.targetname = data.targetname;
this.cabinetid = data.cabinetid;
return true;
}
return false;
}
catch (System.Exception)
{
return false;
throw;
}
}
}
}