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.
49 lines
1.3 KiB
49 lines
1.3 KiB
using System;
|
|
using GPSBusiness.Helper;
|
|
namespace GPSBusiness.BBGPSStandard
|
|
{
|
|
/// <summary>
|
|
/// 终端注册
|
|
/// </summary>
|
|
public class Data_0100
|
|
{
|
|
/// <summary>
|
|
/// 省域ID
|
|
/// </summary>
|
|
public UInt16 ProvinceID;
|
|
/// <summary>
|
|
/// 市县域ID
|
|
/// </summary>
|
|
public UInt16 CityID;
|
|
/// <summary>
|
|
/// 制造商ID
|
|
/// </summary>
|
|
public byte[] Factory;
|
|
/// <summary>
|
|
/// 终端型号
|
|
/// </summary>
|
|
public byte[] MdtType;
|
|
/// <summary>
|
|
/// 终端ID
|
|
/// </summary>
|
|
public byte[] MdtID;
|
|
/// <summary>
|
|
/// 车牌颜色
|
|
/// </summary>
|
|
public byte NumberColor;
|
|
/// <summary>
|
|
/// 车牌
|
|
/// </summary>
|
|
public string Number;
|
|
public void FromBytes(Data_0100 model, byte[] buffer)
|
|
{
|
|
model.ProvinceID = ByteConvert.ToUInt16(buffer, 0);
|
|
model.CityID = ByteConvert.ToUInt16(buffer, 2);
|
|
model.Factory = ByteConvert.ToBytes(buffer, 4, 5);
|
|
model.MdtType = ByteConvert.ToBytes(buffer, 9, 8);
|
|
model.MdtID = ByteConvert.ToBytes(buffer, 17, 7);
|
|
model.NumberColor = buffer[24];
|
|
model.Number = ByteConvert.ToString(buffer, 25, buffer.Length - 25);
|
|
}
|
|
}
|
|
}
|
|
|