|
|
|
@ -301,7 +301,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "后台服务器下发充电桩整形工作参数-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1后台服务器下发充电桩整形工作参数-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
@ -330,7 +330,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "后台服务器下发充电桩字符型参数-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "3后台服务器下发充电桩字符型参数-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
@ -362,7 +362,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "后台服务器下发充电桩控制命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "5后台服务器下发充电桩控制命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -384,7 +384,7 @@ namespace BatCharging.Service
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string result = "后台服务器下发充电桩开启充电控制命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "7后台服务器下发充电桩开启充电控制命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -393,14 +393,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="chargeMuzzle">充电枪号</param>
|
|
|
|
|
/// <param name="executeResult">执行结果</param>
|
|
|
|
|
/// <param name="address">命令地址</param>
|
|
|
|
|
/// <param name="setData">数据</param>
|
|
|
|
|
|
|
|
|
|
internal void Send9(TcpClientChargerTool tcp_client, byte chargeMuzzle, uint executeResult, uint address, byte[] setData)
|
|
|
|
|
{
|
|
|
|
|
APDUModel APDUModel;
|
|
|
|
@ -417,7 +410,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "后台服务器应答桩上传命令请求(预留)-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "9后台服务器应答桩上传命令请求(预留)-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -445,7 +438,7 @@ namespace BatCharging.Service
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string result = "服务器应答心跳包信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "101服务器应答心跳包信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -471,7 +464,7 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD103(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器应答充电桩状态信息包-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "103服务器应答充电桩状态信息包-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -490,7 +483,7 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD105(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器应答充电桩签到命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "105服务器应答充电桩签到命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -510,7 +503,7 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD107(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器应答充电桩告警信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "107服务器应答充电桩告警信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -533,18 +526,13 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD109(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器应答充电桩告警信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "109服务器应答充电桩启动完成命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 服务器应答充电桩上报模块信息(预留)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="messageType">报文类型</param>
|
|
|
|
|
internal void Send111(TcpClientChargerTool tcp_client, byte messageType)
|
|
|
|
|
{
|
|
|
|
|
APDUModel APDUModel;
|
|
|
|
@ -558,7 +546,7 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD111(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器应答充电桩上报模块信息(预留)-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "111服务器应答充电桩上报模块信息(预留)-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -584,7 +572,7 @@ namespace BatCharging.Service
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD113(out APDUModel, CMD);
|
|
|
|
|
if (APDUModel != null)
|
|
|
|
|
{
|
|
|
|
|
string result = "服务器查询最近一次充电各时段信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "113服务器查询最近一次充电各时段信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -605,19 +593,14 @@ namespace BatCharging.Service
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD201(out APDUModel APDUModel, CMD, func);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "201服务器应答充电桩上报充电信息报文-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send203(TcpClientChargerTool tcp_client, CMD204 CMD204, uint value03, uint value04, ushort value05, ushort value06, byte value07, byte value08, byte value09, byte value10, string value11, string value12)
|
|
|
|
|
{
|
|
|
|
|
CMD203 CMD = new CMD203();
|
|
|
|
@ -636,19 +619,14 @@ namespace BatCharging.Service
|
|
|
|
|
CMD.value13 = CMD204.value11;
|
|
|
|
|
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD203(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "203服务器应答账户查询信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send205(TcpClientChargerTool tcp_client, uint value03, uint value04)
|
|
|
|
|
{
|
|
|
|
|
CMD205 CMD = new CMD205();
|
|
|
|
@ -665,19 +643,14 @@ namespace BatCharging.Service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD205(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "205服务器应答充电密码验证报文(预留)-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send207(TcpClientChargerTool tcp_client, CMD208 CMD208, string value06, string value07, byte value08, byte value09, uint value10, ulong value11)
|
|
|
|
|
{
|
|
|
|
|
CMD207 CMD = new CMD207();
|
|
|
|
@ -693,19 +666,14 @@ namespace BatCharging.Service
|
|
|
|
|
CMD.value10 = value10;
|
|
|
|
|
CMD.value11 = value11;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD207(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "207平台回复“即插即充”请求充电结果-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send209(TcpClientChargerTool tcp_client, CMD210 CMD210, string value05)
|
|
|
|
|
{
|
|
|
|
|
CMD209 CMD = new CMD209();
|
|
|
|
@ -715,17 +683,12 @@ namespace BatCharging.Service
|
|
|
|
|
CMD.value04 = CMD210.value04;
|
|
|
|
|
CMD.value05 = value05;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD209(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "209平台回复“即插即充”启动充电结果-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send221(TcpClientChargerTool tcp_client, CMD221 CMD221, uint value05)
|
|
|
|
|
{
|
|
|
|
|
CMD221 CMD = new CMD221();
|
|
|
|
@ -745,37 +708,27 @@ namespace BatCharging.Service
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 直流充电桩 BMS 信息数据(预留)
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send301(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
CMD301 CMD = new CMD301();
|
|
|
|
|
CMD.reserved1 = 0;
|
|
|
|
|
CMD.reserved2 = 0;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD301(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "301服务器应答充电桩上报BMS信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send303(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
CMD303 CMD = new CMD303();
|
|
|
|
|
CMD.reserved1 = 0;
|
|
|
|
|
CMD.reserved2 = 0;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD303(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "303服务器应答充电桩上报BMS信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -783,12 +736,7 @@ namespace BatCharging.Service
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 历史记录
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send401(TcpClientChargerTool tcp_client, string chargingSerialNum, uint startIndex)
|
|
|
|
|
{
|
|
|
|
|
CMD401 CMD = new CMD401();
|
|
|
|
@ -797,7 +745,7 @@ namespace BatCharging.Service
|
|
|
|
|
CMD.startingIndexOfQueryRecord = startIndex;
|
|
|
|
|
CMD.chargingSerialNumber = chargingSerialNum;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD401(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "401/421服务器查询充电桩历史充电记录-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -805,115 +753,80 @@ namespace BatCharging.Service
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 升级命令
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1001(TcpClientChargerTool tcp_client, int instruct)
|
|
|
|
|
{
|
|
|
|
|
CMD1001 CMD = new CMD1001();
|
|
|
|
|
CMD.eraseOrQueryInstructions = instruct;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1001(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1001服务器下发擦除指令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1003(TcpClientChargerTool tcp_client, string fileName)
|
|
|
|
|
{
|
|
|
|
|
CMD1003 CMD = new CMD1003();
|
|
|
|
|
CMD.fileName = fileName;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1003(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1003服务器下发升级文件名指令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1005(TcpClientChargerTool tcp_client, uint fileLength)
|
|
|
|
|
{
|
|
|
|
|
CMD1005 CMD = new CMD1005();
|
|
|
|
|
CMD.fileLength = fileLength;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1005(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1005服务器下发升级文件大小-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1007(TcpClientChargerTool tcp_client, string updata)
|
|
|
|
|
{
|
|
|
|
|
CMD1007 CMD = new CMD1007();
|
|
|
|
|
CMD.upgradeFileData = updata;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1007(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1007服务器下发升级文件数据-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1009(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
CMD1009 CMD = new CMD1009();
|
|
|
|
|
CMD.Value01 = 0;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1009(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1009服务器下发升级文件数据结束指令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1011(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
CMD1011 CMD = new CMD1011();
|
|
|
|
|
CMD.reserved1 = 0;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1011(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1011服务器下发重启指令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1021(TcpClientChargerTool tcp_client, uint results, string description)
|
|
|
|
|
{
|
|
|
|
|
CMD1021 CMD = new CMD1021();
|
|
|
|
|
CMD.responseResults = results;
|
|
|
|
|
CMD.responseDescription = description;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1021(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1021服务器回复充电桩主动请求升级命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -922,58 +835,38 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
#region 与计费策略相关的指令
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1101(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1101(out APDUModel APDUModel);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1101后台服务器查询24时电费计价策略信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1103(TcpClientChargerTool tcp_client, CMD1103 CMD)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1103(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1103后台服务器设置24时段电费计价策略信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1105(TcpClientChargerTool tcp_client, CMD1105 CMD)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1105(out APDUModel APDUModel,CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1105后台服务器设置分时段计价策略信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1107(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1107(out APDUModel APDUModel);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1107后台服务器查询分时电费计价策略信息-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -982,16 +875,11 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
#region 白名单报文
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1301(TcpClientChargerTool tcp_client, CMD1301 CMD)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1301(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1301服务器下发白名单操作日志数据包-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -1000,45 +888,20 @@ namespace BatCharging.Service
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region FTP 远程升级和 FTP 方式日志上传
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="UpgradeSoftwareFileVersionNum"></param>
|
|
|
|
|
/// <param name="ftpServerIPaddress"></param>
|
|
|
|
|
/// <param name="ftpUserName"></param>
|
|
|
|
|
/// <param name="ftpPassWord"></param>
|
|
|
|
|
/// <param name="ftpDownloadPath"></param>
|
|
|
|
|
/// <param name="executeWay"></param>
|
|
|
|
|
/// <param name="nowUpgradeDeviceType"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1401(TcpClientChargerTool tcp_client, CMD1401 CMD)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1401(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1401服务器下发FTP远程升级命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
|
|
|
|
|
internal void Send1406(TcpClientChargerTool tcp_client, CMD1406 CMD)
|
|
|
|
|
{
|
|
|
|
|
//CMD1406 CMD = new CMD1406();
|
|
|
|
|
//CMD.reserved1 = 0;
|
|
|
|
|
//CMD.reserved2 = 0;
|
|
|
|
|
//CMD.getLogType = 0;
|
|
|
|
|
//CMD.ftpServerIPaddress = null;
|
|
|
|
|
//CMD.ftpUserName = null;
|
|
|
|
|
//CMD.ftpPassWord = null;
|
|
|
|
|
//CMD.ftpSavePath = null;
|
|
|
|
|
//CMD.executeWay = 0;
|
|
|
|
|
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1406(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1406服务器下发获取充电桩日志信息命令-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
@ -1046,32 +909,20 @@ namespace BatCharging.Service
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 协议方式日志上传
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client"></param>
|
|
|
|
|
/// <param name="dest_addr"></param>
|
|
|
|
|
/// <param name="respResult"></param>
|
|
|
|
|
internal void Send1502(TcpClientChargerTool tcp_client,ushort responseCode)
|
|
|
|
|
|
|
|
|
|
internal void Send1502(TcpClientChargerTool tcp_client,uint responseCode)
|
|
|
|
|
{
|
|
|
|
|
CMD1502 CMD = new CMD1502();
|
|
|
|
|
CMD.reserved1 = 0;
|
|
|
|
|
CMD.reserved2 = 0;
|
|
|
|
|
|
|
|
|
|
CMD.responseCode = responseCode;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1502(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "cmd1502 服务器允许上传-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client">TCP</param>
|
|
|
|
|
/// <param name="logo">标识</param>
|
|
|
|
|
/// <param name="successReservedMessageNum">已成功接收的报文编号
|
|
|
|
|
/// 这个要与最后一次收到的 1503 报文中的字段 4 一样。</param>
|
|
|
|
|
internal void Send1504(TcpClientChargerTool tcp_client, uint logo,uint successReservedMessageNum)
|
|
|
|
|
|
|
|
|
|
internal void Send1504(TcpClientChargerTool tcp_client, uint logo, uint successReservedMessageNum)
|
|
|
|
|
{
|
|
|
|
|
CMD1504 CMD = new CMD1504();
|
|
|
|
|
CMD.reserved1 = 0;
|
|
|
|
@ -1079,25 +930,19 @@ namespace BatCharging.Service
|
|
|
|
|
CMD.logo = logo;
|
|
|
|
|
CMD.successReservedMessageNum = successReservedMessageNum;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1504(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1504服务器应答上传日志-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// (CMD=5)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tcp_client">TCP</param>
|
|
|
|
|
/// <param name="logo">标识</param>
|
|
|
|
|
/// <param name="successReservedMessageNum">已成功接收的报文编号
|
|
|
|
|
/// 这个要与最后一次收到的 1503 报文中的字段 4 一样。</param>
|
|
|
|
|
|
|
|
|
|
internal void Send1506(TcpClientChargerTool tcp_client)
|
|
|
|
|
{
|
|
|
|
|
CMD1506 CMD = new CMD1506();
|
|
|
|
|
CMD.value01 = 0;
|
|
|
|
|
CMD.value01 = 0;
|
|
|
|
|
byte[] bytes = new ChargerSendCMD().SendRCMD1506(out APDUModel APDUModel, CMD);
|
|
|
|
|
string result = "站控响应充放电机上报模块状态-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
string result = "1506当前文件接收完成-发送字节内容:" + ByteUtils.BytesToHexStr(bytes) + ";";
|
|
|
|
|
|
|
|
|
|
Log.LogInstance.WriteLog(result, LogType.Information, "SendLog");
|
|
|
|
|
tcp_client.Write(bytes);
|
|
|
|
|