You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DotNetty.Buffers;
using HybirdFrameworkServices.ChargerManage.Msg;
/**
* (CMD=206)充电桩上传用户密码验证报文(预留)
*/
namespace HybirdFrameworkServices
{
public class CMD206 : BaseMsg
{
public CMD206()
{
}
//调用父类的构造函数
public CMD206(IByteBuffer byteBuffer,string clientIp) : base(byteBuffer,clientIp)
{
}
public override void ParseBody()
{
this.Reserved1=this.ByteBuffer.GetUnsignedShortLE(BaseMsg.StartBodyIndex);
this.Reserved2=this.ByteBuffer.GetUnsignedShortLE(BaseMsg.StartBodyIndex+2);
ByteBuffer.SetReaderIndex(12);
// 读取接下来的32字节
byte[] no = new byte[32];
ByteBuffer.ReadBytes(no);
this.ASCIINum = Encoding.ASCII.GetString(no);
no = new byte[32];
ByteBuffer.ReadBytes(no);
this.ChargID = Encoding.ASCII.GetString(no);
no = new byte[32];
ByteBuffer.ReadBytes(no);
this.ChargPassword = Encoding.ASCII.GetString(no);
no = new byte[48];
ByteBuffer.ReadBytes(no);
this.RandomData = Encoding.ASCII.GetString(no);
}
/// <summary>
/// 预留
/// </summary>
public ushort Reserved1 { get; set; }
/// <summary>
/// 预留
/// </summary>
public ushort Reserved2 { get; set; }
/// <summary>
/// 充电桩编码
/// </summary>
public string ASCIINum { get; set; }
/// <summary>
/// 充电卡号
/// </summary>
public string ChargID { get; set; }
/// <summary>
/// 用户充电密码
/// </summary>
public string ChargPassword { get; set; }
/// <summary>
/// 卡扇区数据随机数
/// </summary>
public string RandomData { get; set; }
}
}