|
|
@ -50,9 +50,9 @@ namespace BatCharging.Service
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value1));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value1));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value2));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value2));
|
|
|
|
lstContent.Add(CMD1.value3);
|
|
|
|
lstContent.Add(CMD1.value3);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value4));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value4));//起始地址
|
|
|
|
lstContent.Add(CMD1.value5);
|
|
|
|
lstContent.Add(CMD1.value5);//查询个数
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value6));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD1.value6));//参数字节数
|
|
|
|
if (CMD1.value3 == 1)
|
|
|
|
if (CMD1.value3 == 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lstContent.AddRange(CMD1.value7);
|
|
|
|
lstContent.AddRange(CMD1.value7);
|
|
|
@ -199,19 +199,20 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value03));
|
|
|
|
lstContent.Add(CMD.value03);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value04));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value04));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value05));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value05));
|
|
|
|
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value06));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value07));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value07));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value08));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value08));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value09));
|
|
|
|
lstContent.Add(CMD.value09);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value10));
|
|
|
|
lstContent.AddRange(ByteUtils.ToByteByHexStr32(CMD.value10, 32));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value11));
|
|
|
|
lstContent.Add(CMD.value11);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value12));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value12));
|
|
|
|
lstContent.AddRange(ByteUtils.ToByteByHexStr32(CMD.value13, 32));
|
|
|
|
lstContent.AddRange(ByteUtils.ToByteByHexStr32(CMD.value13, 32));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value14));
|
|
|
|
lstContent.Add(CMD.value14);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value15));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value15));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value16));
|
|
|
|
lstContent.Add(CMD.value16);
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return results;
|
|
|
|
return results;
|
|
|
@ -356,8 +357,8 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value03));
|
|
|
|
lstContent.Add(CMD.value03);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value04));
|
|
|
|
lstContent.Add(Convert.ToByte(CMD.value04));
|
|
|
|
|
|
|
|
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -571,8 +572,6 @@ namespace BatCharging.Service
|
|
|
|
model.CMD = 113;
|
|
|
|
model.CMD = 113;
|
|
|
|
model.checksumDomain = 0x01;
|
|
|
|
model.checksumDomain = 0x01;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.dataDomain = GetRCMD113DataInfo(CMD); //数据域
|
|
|
|
model.dataDomain = GetRCMD113DataInfo(CMD); //数据域
|
|
|
|
model.LengthDomain = Convert.ToUInt16(9 + model.dataDomain.Length); //报文长度
|
|
|
|
model.LengthDomain = Convert.ToUInt16(9 + model.dataDomain.Length); //报文长度
|
|
|
|
|
|
|
|
|
|
|
@ -598,8 +597,8 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value01));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value02));
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value03));
|
|
|
|
lstContent.Add(CMD.value03);
|
|
|
|
lstContent.AddRange(BitConverter.GetBytes(CMD.value04));
|
|
|
|
lstContent.Add(Convert.ToByte(CMD.value04));
|
|
|
|
|
|
|
|
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
results = lstContent.ToArray();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1436,7 +1435,7 @@ namespace BatCharging.Service
|
|
|
|
|
|
|
|
|
|
|
|
public byte[] SendRCMD1103(out APDUModel APDUModel, CMD1103 CMD)
|
|
|
|
public byte[] SendRCMD1103(out APDUModel APDUModel, CMD1103 CMD)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] result = null;
|
|
|
|
byte[] result;
|
|
|
|
|
|
|
|
|
|
|
|
APDUModel model = new APDUModel();
|
|
|
|
APDUModel model = new APDUModel();
|
|
|
|
model.OriginDomain1 = 0xAA;
|
|
|
|
model.OriginDomain1 = 0xAA;
|
|
|
|