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}"); } }