|
|
|
@ -188,7 +188,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="asdu"></param>
|
|
|
|
|
public void ReceiveMsgHandle(ASDU asdu)
|
|
|
|
@ -411,7 +411,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 3.4.7 监控平台下发掉线停止充电
|
|
|
|
|
/// 3.4.7 监控平台下发掉线停止充电
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="enabled"> 0:不使能 1:使能</param>
|
|
|
|
|
public Result<bool> SendOfflineStopCharging(byte enabled)
|
|
|
|
@ -445,7 +445,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Result<bool> SendQueryBattery()
|
|
|
|
|
{
|
|
|
|
@ -467,7 +467,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
#region 启动充电
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Result<bool> StartCharge()
|
|
|
|
|
{
|
|
|
|
@ -503,7 +503,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
string? lockKey = redisHelper.GetStrValue($"chargeNo{BinNo}Start");
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(lockKey))
|
|
|
|
|
{
|
|
|
|
|
return Result<bool>.Success($"charger-{BinNo} is starting");
|
|
|
|
|
return Result<bool>.Success(true, $"charger-{BinNo} is starting");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
redisHelper.SetKeyValueStr($"chargeNo{BinNo}Start", DateTime.Now.ToString("f"), TimeSpan.FromMinutes(1));
|
|
|
|
@ -533,7 +533,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool Connect()
|
|
|
|
@ -548,7 +548,7 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sn"></param>
|
|
|
|
|
/// <param name="destAddr"></param>
|
|
|
|
@ -559,4 +559,4 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
ChannelUtils.AddAttr(Channel, ChargerConst.EqmCode, sn);
|
|
|
|
|
ChannelUtils.AddAttr(Channel, ChargerConst.DestAddr, destAddr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|