diff --git a/BatCharging.Model/客户端发送/CMD5.cs b/BatCharging.Model/客户端发送/CMD5.cs
index b218ed9..af098ad 100644
--- a/BatCharging.Model/客户端发送/CMD5.cs
+++ b/BatCharging.Model/客户端发送/CMD5.cs
@@ -22,6 +22,32 @@ namespace BatCharging.Model
public byte value3 { get; set; }
///
/// 起始命令地址
+ /// 1-----预留
+ /// 2-----停止充电
+ /// 3-----预留
+ /// 4-----充电控制方式
+ /// 5-----预留
+ /// 6-----预留
+ /// 7-----电阻模式输出电压
+ /// 8-----电阻模式输出电流
+ /// 9-----充电模式
+ /// 10----取消预约充电
+ /// 11----设备重启
+ /// 12----进入升级模式
+ /// 13----进入正常应用模式
+ /// 14----立即上报一次签到106 报文
+ /// 15----立即上报一次桩状态信息 104 报文
+ /// 16----扫描支付成功
+ /// 17----实时充电(限制)最大充电功率
+ /// 18----负载类型
+ /// 19----绝缘检测
+ /// 20----模块类型
+ /// 21----本地计费
+ /// 22----刷卡密码输入流程
+ /// 23----充电暂停服务
+ /// 24----输出电压较准
+ /// 25----离线时默认限功率
+ /// 26----充电机限电流
///
public UInt32 value4 { get; set; }
///
diff --git a/BatCharging.Service/发送方法/ChargerSendCMD.cs b/BatCharging.Service/发送方法/ChargerSendCMD.cs
index aa5a410..1ccf832 100644
--- a/BatCharging.Service/发送方法/ChargerSendCMD.cs
+++ b/BatCharging.Service/发送方法/ChargerSendCMD.cs
@@ -47,21 +47,16 @@ namespace BatCharging.Service
{
List lstContent = new List();
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD1.value1));
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD1.value2));
+ lstContent.AddRange(BitConverter.GetBytes(CMD1.value1));
+ lstContent.AddRange(BitConverter.GetBytes(CMD1.value2));
lstContent.Add(CMD1.value3);
- lstContent.AddRange(ByteUtils.Int32ToByteArray((int)CMD1.value4));
-
+ lstContent.AddRange(BitConverter.GetBytes(CMD1.value4));
+ lstContent.Add(CMD1.value5);
+ lstContent.AddRange(BitConverter.GetBytes(CMD1.value6));
if (CMD1.value3 == 1)
{
- lstContent.Add(CMD1.value5);
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD1.value6));
lstContent.AddRange(CMD1.value7);
}
- else
- {
-
- }
results = lstContent.ToArray();
}
@@ -104,18 +99,14 @@ namespace BatCharging.Service
{
List lstContent = new List();
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD.value1));
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD.value2));
+ lstContent.AddRange(BitConverter.GetBytes(CMD.value1));
+ lstContent.AddRange(BitConverter.GetBytes(CMD.value2));
lstContent.Add(CMD.value3);
- lstContent.AddRange(ByteUtils.Int32ToByteArray((int)CMD.value4));
+ lstContent.AddRange(BitConverter.GetBytes(CMD.value4));
+ lstContent.AddRange(BitConverter.GetBytes(CMD.value5));
if (CMD.value3 == 1)
{
- lstContent.AddRange(ByteUtils.Int16ToByteArray((short)CMD.value5));
lstContent.AddRange(CMD.value6);
- }
- else
- {
-
}
results = lstContent.ToArray();
}
@@ -133,8 +124,6 @@ namespace BatCharging.Service
model.CMD = 5;
model.checksumDomain = 0x01;
-
-
model.dataDomain = GetRCMD5DataInfo(cMD5); //数据域
model.LengthDomain = Convert.ToUInt16(9 + model.dataDomain.Length); //报文长度
@@ -163,11 +152,8 @@ namespace BatCharging.Service
lstContent.Add(CMD.value3);
lstContent.AddRange(BitConverter.GetBytes(CMD.value4));
lstContent.Add(CMD.value5);
- if (CMD.value3 == 1)
- {
- lstContent.AddRange(BitConverter.GetBytes(CMD.value4));
- lstContent.AddRange(CMD.value7);
- }
+ lstContent.AddRange(BitConverter.GetBytes(CMD.value6));
+ lstContent.AddRange(CMD.value7);
results = lstContent.ToArray();
}
return results;
diff --git a/Monitor.ChargeTest/FrmChargeResult.cs b/Monitor.ChargeTest/FrmChargeResult.cs
index d3e5f93..911994b 100644
--- a/Monitor.ChargeTest/FrmChargeResult.cs
+++ b/Monitor.ChargeTest/FrmChargeResult.cs
@@ -245,7 +245,7 @@ namespace Monitor.ChargeTest
///
private void button15_Click(object sender, EventArgs e)
{
- byte type = 0;//0-查询 1-设置
+ byte type = 1;//0-查询 1-设置
uint startAddress = 1;//设置/查询参数启始地址
byte[] setData = new byte[8];//设置数据
setData[0] = 0;