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.
36 lines
1.1 KiB
36 lines
1.1 KiB
using System;
|
|
using GPSBusiness.Helper;
|
|
namespace GPSBusiness.BBGPSStandard
|
|
{
|
|
/// <summary>
|
|
/// 终端注册应答
|
|
/// </summary>
|
|
public class Data_8100
|
|
{
|
|
/// <summary>
|
|
/// 应答流水号--对应的终端注册消息的流水号
|
|
/// </summary>
|
|
public UInt16 Mdt_SerialNo;
|
|
/// <summary>
|
|
/// 结果--0:成功;1:车辆已被注册;2:数据库中无该车辆;3:终端已被注册;4:数据库中无该终端
|
|
/// </summary>
|
|
public byte Result;
|
|
/// <summary>
|
|
/// 鉴权码--只有在成功后才有该字段
|
|
/// </summary>
|
|
public string AuthorizationCode;
|
|
public byte[] GetBytes(DataHead model)
|
|
{
|
|
ByteBuilder bb = new ByteBuilder();
|
|
bb.Append(ByteConvert.ToBytes(this.Mdt_SerialNo));
|
|
bb.Append(this.Result);
|
|
if (this.Result == 0x00)
|
|
{
|
|
bb.Append(ByteConvert.ToBytes(this.AuthorizationCode));
|
|
}
|
|
model.DataContent = bb.GetBytes();
|
|
byte[] bModel = ByteConvert.Zy(model.GetBytes());
|
|
return bModel;
|
|
}
|
|
}
|
|
}
|
|
|