using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.DataDockingApi
|
{
|
/// <summary>
|
/// 生成调试信息辅助类
|
/// </summary>
|
internal class DebugHelper
|
{
|
private const string _logName = "API_YS";
|
|
/// <summary>
|
/// 调试
|
/// </summary>
|
public static void Debug(List<Record> record_list)
|
{
|
var debug_list = new List<Model.MonitorDataDockingDebugRecord>();
|
foreach (var debug_record in record_list)
|
{
|
var debug_recordContent = JsonHelper.Json2Object<RecordContent>(debug_record.vals);
|
if (debug_recordContent != null)
|
{
|
var debug_item = new Model.MonitorDataDockingDebugRecord();
|
debug_item.SignId = debug_record.key;
|
debug_item.RecordType = Model.eMonitorType.General;
|
debug_item.SrcTime = debug_recordContent.time;
|
debug_item.SrcValue = debug_recordContent.value;
|
debug_list.Add(debug_item);
|
}
|
}
|
if (debug_list != null && debug_list.Count > 0)
|
{
|
var json = JsonHelper.Object2Json(debug_list);
|
LogHelper.Custom(_logName,json);
|
}
|
}
|
|
}
|
}
|