Beispiel #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"))
                {
                    Data7203Data data = new Data7203Data();
                    data.InstantFlux = Convert.ToDouble(pr.Results["if"]);
                    data.Sum         = Convert.ToDouble(pr.Results["sum"]);

                    task.Device.DeviceDataManager.Last = data;

                    int id = GuidHelper.ConvertToInt32(task.Device.Guid);
                    DBI.Instance.InsertData7203Data(id, data);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="deviceID"></param>
 /// <param name="data"></param>
 public void InsertData7203Data(int deviceID, Data7203Data data)
 {
     InsertFlowmeterData(deviceID, data);
 }