using System;
using GPSBusiness.Helper;
namespace GPSBusiness.BBGPSStandard
{
///
/// 终端注册应答
///
public class Data_8100
{
///
/// 应答流水号--对应的终端注册消息的流水号
///
public UInt16 Mdt_SerialNo;
///
/// 结果--0:成功;1:车辆已被注册;2:数据库中无该车辆;3:终端已被注册;4:数据库中无该终端
///
public byte Result;
///
/// 鉴权码--只有在成功后才有该字段
///
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;
}
}
}