From 53c49e0f39998ad56efc357cf15f34d32911303c Mon Sep 17 00:00:00 2001 From: xjl <2595686544@qq.com> Date: Mon, 24 Jun 2024 18:43:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E6=9C=BA=E4=B8=BB=E5=8A=A8?= =?UTF-8?q?=E4=B8=8A=E9=80=81=E5=85=85=E7=94=B5=E8=AE=B0=E5=BD=95=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Charger/Handler/RecordChargeHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Service/Charger/Handler/RecordChargeHandler.cs b/Service/Charger/Handler/RecordChargeHandler.cs index 6fc15e6..d1e66d1 100644 --- a/Service/Charger/Handler/RecordChargeHandler.cs +++ b/Service/Charger/Handler/RecordChargeHandler.cs @@ -41,6 +41,7 @@ namespace Service.Charger.Handler if(ClientMgr.TryGetClient(ctx.Channel, out var sn, out var client)) { + float[] powersPeriods = new float[4] { 0, 0, 0, 0 }; //元素索引顺序代表值;1:尖;2:峰;3:平;4:谷 if (msg.FlagOfTime1 >= 1 && msg.FlagOfTime1 <= 4){powersPeriods[msg.FlagOfTime1 - 1] += msg.ChargingPowerOfTime1;} if (msg.FlagOfTime2 >= 1 && msg.FlagOfTime2 <= 4){powersPeriods[msg.FlagOfTime2 - 1] += msg.ChargingPowerOfTime2;} @@ -128,6 +129,8 @@ namespace Service.Charger.Handler } ctx.Channel.WriteAndFlushAsync(new RecordChargeRespData()); + + Log.Info($"receive {msg} from {sn}"); } }