|
|
|
@ -7,6 +7,7 @@ using HybirdFrameworkCore.Redis;
|
|
|
|
|
using HybirdFrameworkCore.Utils;
|
|
|
|
|
using HybirdFrameworkDriver.Session;
|
|
|
|
|
using HybirdFrameworkDriver.TcpClient;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using Service.Charger.Codec;
|
|
|
|
@ -27,6 +28,8 @@ namespace Service.Charger.Client;
|
|
|
|
|
[Scope("InstancePerDependency")]
|
|
|
|
|
public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
private static readonly ILog Log = LogManager.GetLogger(typeof(ChargerClient));
|
|
|
|
|
#region 属性
|
|
|
|
|
|
|
|
|
|
public ushort AuthTimes { get; set; } = 0;
|
|
|
|
@ -239,6 +242,8 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
|
|
|
|
|
chargeOrderNo = ChargerUtils.GenChargeOrderSn();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Log.Info($"SendRemoteStartCharging soc={socLimit}, changePower={changePower}, changePowerCmdType={changePowerCmdType}, chargeOrderNo={chargeOrderNo}");
|
|
|
|
|
var remoteStartCharging = new RemoteStartCharging(socLimit, changePowerCmdType, changePower, chargeOrderNo);
|
|
|
|
|
CurrentCmd = JsonConvert.SerializeObject(remoteStartCharging, Formatting.Indented) + "\r\n" +
|
|
|
|
|
BitUtls.BytesToHexStr(remoteStartCharging.ToBytes());
|
|
|
|
|