You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Monitor.LogService;
using DataBase.Real.Redis;
namespace Module.HMeter.ModBusTcp
{
/// <summary>
/// 参数值发送到Redis
/// </summary>
internal class HumiMeterValueToRedis
{
/// <summary>
/// Redis类实例化
/// </summary>
private RedisBaseHelper _redis = new RedisBaseHelper(6);
/// <summary>
/// 存储温湿度参数信息
/// </summary>
internal void StoredHumiParamValue(string eqmNo, MHumiParamResult value)
{
try
{
//保存到Redis
//Task<bool> result = _redis.SetStrValueAsync(eqmNo+"HumiParamValue", value, TimeSpan.FromSeconds(300));
//Task<bool> result = _redis.SetStrValueAsync(eqmNo + "HumiParamValue", value);
}
catch (Exception ex)
{
ex.ToString();
return;
}
}
}
}