using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Monitor.LogService; using DataBase.Real.Redis; using Monitor.Models; namespace Module.EMeter.ModbusTcp { /// /// 电表值发送到Redis /// public class ElecMeterValToRedis { /// /// Redis类实例化 /// private RedisBaseHelper _redis = new RedisBaseHelper(6); /// /// 存储电表参数信息 /// internal void StoredMeterParamResult(string key, MEMeterParamResult value) { try { //保存到Redis //Task result = _redis.SetStrValueAsync(key+"ParamResult", value, TimeSpan.FromSeconds(300)); //Task result = _redis.SetStrValueAsync(key + "ParamResult", value); } catch (Exception ex) { ex.ToString(); return; } } } }