|
|
|
@ -993,8 +993,13 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD2 != null)
|
|
|
|
|
{
|
|
|
|
|
byte type = 0;
|
|
|
|
|
uint startAddress = 0;
|
|
|
|
|
byte num = 0;
|
|
|
|
|
byte[] setData = null;
|
|
|
|
|
|
|
|
|
|
//(CMD=1)后台服务器下发充电桩整形工作参数
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send1();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send1(type, startAddress, num, setData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1008,8 +1013,12 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD4 != null)
|
|
|
|
|
{
|
|
|
|
|
byte type = 0;
|
|
|
|
|
uint startAddress = 0;
|
|
|
|
|
byte[] setData = null;
|
|
|
|
|
|
|
|
|
|
//(CMD=3)后台服务器下发充电桩字符型参数
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send3();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send3(type, startAddress, setData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1023,8 +1032,13 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD6 != null)
|
|
|
|
|
{
|
|
|
|
|
byte type = 0;
|
|
|
|
|
uint startAddress = 0;
|
|
|
|
|
byte num = 0;
|
|
|
|
|
byte[] setData = null;
|
|
|
|
|
|
|
|
|
|
//(CMD=5)后台服务器下发充电桩控制命令
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send5();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send5(type, startAddress, num, setData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1038,8 +1052,10 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD8 != null)
|
|
|
|
|
{
|
|
|
|
|
CMD7 CMD = new CMD7();
|
|
|
|
|
|
|
|
|
|
//(CMD=1)后台服务器下发充电桩整形工作参数
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send7();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send7(CMD);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1053,8 +1069,12 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD10 != null)
|
|
|
|
|
{
|
|
|
|
|
byte chargeMuzzle = 0;
|
|
|
|
|
uint executeResult = 0;
|
|
|
|
|
uint address = 0;
|
|
|
|
|
byte[] setData = null;
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send9();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send9(chargeMuzzle, executeResult, address, setData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1072,8 +1092,9 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD102 != null)
|
|
|
|
|
{
|
|
|
|
|
ushort heartbeatNum = 0;
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send101();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send101(heartbeatNum);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1087,8 +1108,13 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD104 != null)
|
|
|
|
|
{
|
|
|
|
|
byte chargeMuzzle = 0;
|
|
|
|
|
uint executeResult = 0;
|
|
|
|
|
uint address = 0;
|
|
|
|
|
byte[] setData = null;
|
|
|
|
|
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send103();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send103(chargeMuzzle, executeResult, address, setData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1102,8 +1128,9 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD106 != null)
|
|
|
|
|
{
|
|
|
|
|
CMD105 CMD = new CMD105();
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send105();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send105(CMD);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1147,8 +1174,9 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD112 != null)
|
|
|
|
|
{
|
|
|
|
|
byte messageType = 0;
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send111();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send111(messageType);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1162,8 +1190,11 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
if (CMD114 != null)
|
|
|
|
|
{
|
|
|
|
|
byte chargeNum = 0;
|
|
|
|
|
byte sign = 0;
|
|
|
|
|
|
|
|
|
|
//(CMD=9)后台服务器应答桩上传命令请求(预留)
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send113();
|
|
|
|
|
CmnChargerParam._CHR00TCPCLIENT.Send113(chargeNum, sign);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3228,13 +3259,13 @@ namespace BatCharging.Service
|
|
|
|
|
/// <param name="num">设置/查询个数</param>
|
|
|
|
|
/// <param name="vs">设置数据</param>
|
|
|
|
|
|
|
|
|
|
public void Send1(byte type,uint startAddress,byte num,byte[] setData)
|
|
|
|
|
public void Send1(byte type, uint startAddress, byte num, byte[] setData)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send1(_chr_client,type,startAddress,num, setData);
|
|
|
|
|
new ChargerSendMsgUtils().Send1(_chr_client, type, startAddress, num, setData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3250,7 +3281,7 @@ namespace BatCharging.Service
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send3(_chr_client,type,startAddress,setData);
|
|
|
|
|
new ChargerSendMsgUtils().Send3(_chr_client, type, startAddress, setData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3261,65 +3292,65 @@ namespace BatCharging.Service
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send5(_chr_client,type, startAddress, num, setData);
|
|
|
|
|
new ChargerSendMsgUtils().Send5(_chr_client, type, startAddress, num, setData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void Send7()
|
|
|
|
|
public void Send7(CMD7 CMD)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send7(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send7(_chr_client, CMD);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void Send9()
|
|
|
|
|
public void Send9(byte chargeMuzzle, uint executeResult, uint address, byte[] setData)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send9(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send9(_chr_client, chargeMuzzle, executeResult, address, setData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion 协议格式
|
|
|
|
|
|
|
|
|
|
#region 充电桩主动上传数据
|
|
|
|
|
public void Send101()
|
|
|
|
|
public void Send101(ushort heartbeatNum)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send101(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send101(_chr_client, heartbeatNum);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void Send103()
|
|
|
|
|
public void Send103(byte chargeMuzzle, uint executeResult, uint address, byte[] setData)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send9(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send9(_chr_client, chargeMuzzle, executeResult, address, setData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Send105()
|
|
|
|
|
public void Send105(CMD105 CMD)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send105(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send105(_chr_client, CMD);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3343,23 +3374,23 @@ namespace BatCharging.Service
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void Send111()
|
|
|
|
|
public void Send111(byte messageType)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send111(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send111(_chr_client, messageType);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void Send113()
|
|
|
|
|
public void Send113(byte chargeNum, byte sign)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client != null)
|
|
|
|
|
{
|
|
|
|
|
if (_chr_client.Connected)
|
|
|
|
|
{
|
|
|
|
|
new ChargerSendMsgUtils().Send113(_chr_client);
|
|
|
|
|
new ChargerSendMsgUtils().Send113(_chr_client, chargeNum, sign);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|