コード例 #1
0
        /// <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);
                }
            }
        }
コード例 #2
0
ファイル: Class1.cs プロジェクト: hkiaipc/C3
 /// <summary>
 /// 
 /// </summary>
 /// <param name="deviceID"></param>
 /// <param name="data"></param>
 public void InsertCrlgdData(int deviceID, CrlgdData data)
 {
     base.InsertHeatData(deviceID, data);
 }
コード例 #3
0
ファイル: Class1.cs プロジェクト: hkiaipc/C3
        /// <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);
                }
            }
        }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="deviceID"></param>
 /// <param name="data"></param>
 public void InsertCrlgdData(int deviceID, CrlgdData data)
 {
     base.InsertHeatData(deviceID, data);
 }