/// <summary> /// /// </summary> /// <param name="task"></param> /// <param name="parseResult"></param> public override void OnProcess(ITask task, IParseResult pr) { if (pr.IsSuccess) { string opera = task.Opera.Name; if (StringHelper.Equal(opera, "read")) { CrlgdData data = new CrlgdData(); data.InstantFlux = Convert.ToDouble(pr.Results["if"]); data.Sum = Convert.ToDouble(pr.Results["sum"]); data.InstantHeat = Convert.ToDouble(pr.Results["ih"]); data.SumHeat = Convert.ToDouble(pr.Results["sh"]); data.GT = Convert.ToDouble(pr.Results["gt"]); data.BT = Convert.ToDouble(pr.Results["bt"]); task.Device.DeviceDataManager.Last = data; int id = GuidHelper.ConvertToInt32(task.Device.Guid); DBI.Instance.InsertCrlgdData(id, data); } } }
/// <summary> /// /// </summary> /// <param name="deviceID"></param> /// <param name="data"></param> public void InsertCrlgdData(int deviceID, CrlgdData data) { base.InsertHeatData(deviceID, data); }
/// <summary> /// /// </summary> /// <param name="task"></param> /// <param name="pr"></param> public override void OnProcess(ITask task, IParseResult pr) { if (pr.IsSuccess) { string opera = task.Opera.Name; if (StringHelper.Equal(opera, "read")) { CrlgdData data = new CrlgdData(); data.InstantFlux = Convert.ToDouble(pr.Results["if"]); data.Sum = Convert.ToDouble(pr.Results["sum"]); data.InstantHeat = Convert.ToDouble(pr.Results["ih"]); data.SumHeat = Convert.ToDouble(pr.Results["sh"]); data.GT = Convert.ToDouble(pr.Results["gt"]); data.BT = Convert.ToDouble(pr.Results["bt"]); task.Device.DeviceDataManager.Last = data; int id = GuidHelper.ConvertToInt32(task.Device.Guid); DBI.Instance.InsertCrlgdData(id, data); } } }