diff --git a/src/JT809.Protocol/Enums/JT809SubBusinessType.cs b/src/JT809.Protocol/Enums/JT809SubBusinessType.cs index f541e0d..bf09830 100644 --- a/src/JT809.Protocol/Enums/JT809SubBusinessType.cs +++ b/src/JT809.Protocol/Enums/JT809SubBusinessType.cs @@ -447,6 +447,15 @@ namespace JT809.Protocol.Enums [JT809BodiesType(typeof(JT809_0x1600_0x1601))] [JT809SubBusinessTypeDescription("UP_BASE_MSG_VEHICLE_ADDED_ACK", "补报车辆静态信息应答", JT809BusinessType.主链路静态信息交换消息)] 补报车辆静态信息应答 = 0x1601, + /// + ///补报车辆行驶路线信息应答消息 + ///UP_BASE_MSG_DRVLINE_ADDED_REQ + /// + [Description("补报车辆行驶路线信息应答消息")] + [JT809BodiesType(typeof(JT809_0x1600_0x1602))] + [JT809SubBusinessTypeDescription("UP_BASE_MSG_DRVLINE_ADDED_REQ", "补报车辆行驶路线信息应答消息", JT809BusinessType.主链路静态信息交换消息)] + 补报车辆行驶路线信息应答消息 = 0x1602, + #endregion #region 从链路静态信息交换消息 DOWN_BASE_MSG diff --git a/src/JT809.Protocol/Metadata/JT809VehiclePositionProperties_2019.cs b/src/JT809.Protocol/Metadata/JT809VehiclePositionProperties_2019.cs new file mode 100644 index 0000000..f2ee1d7 --- /dev/null +++ b/src/JT809.Protocol/Metadata/JT809VehiclePositionProperties_2019.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace JT809.Protocol.Metadata +{ + public class JT809VehiclePositionProperties_2019 + { + /// + /// 是否使用国测局批准的地图保密插件进行加密 1 已加密 0未加密 + /// + public byte Encrypt { get; set; } + /// + /// 车辆定位信息数据长度 + /// + public uint DataLength { get; set; } + /// + /// 车辆定位信息内容,包括车辆位置基本信息和位置附加信息 + /// 其数据格式安装 808-2019中8.12要求 + /// + public byte[] GnssData { get; set; } + /// + /// 监控平台唯一编码,由平台所在地行政区域代码和平台编码组成 + /// + public byte[] PlatformId1 { get; set; } + /// + /// 报警状态,二进制标识 0 正常 1表示报警 + /// 具体定义按照808-2019中表18的规定 + /// + public uint Alarm1 { get; set; } + /// + /// 市级监控平台唯一编码,由平台所在地行政区域代码和平台编码组成 + /// 未填写时,全填0,无市级平台应由省级平台全填1 + /// + public byte[] PlatformId2 { get; set; } + /// + /// 报警状态,二进制标识 0 正常 1表示报警 + /// 具体定义按照808-2019中表18的规定 + /// + public uint Alarm2 { get; set; } + /// + /// 省级监控平台唯一编码,由平台所在地行政区域代码和平台编码组成 + /// 未填写时,全填0 + /// + public byte[] PlatformId3 { get; set; } + /// + /// 报警状态,二进制标识 0 正常 1表示报警 + /// 具体定义按照808-2019中表18的规定 + /// + public uint Alarm3 { get; set; } + } +} diff --git a/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo.cs b/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo.cs new file mode 100644 index 0000000..038359d --- /dev/null +++ b/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace JT809.Protocol.Metadata +{ + /// + /// 车辆静态信息数据体 + /// + public class JT809VehicleStaticInfo + { + /// + /// 车牌号 必填 + /// 车牌号码中不设分隔符号。所有字母数字连续保存 + /// + public string Vin { get; set; } + /// + /// 车牌颜色 必填 应该使用枚举 + /// + public string VehicleColor { get; set; } + /// + /// 车辆类型 必填 应该使用枚举 + /// + public string VehicleType { get; set; } + /// + /// 运输行业编码 必填 应该使用枚举 + /// + public string TransType { get; set; } + /// + /// 车籍地 必填 + /// + public string VehicleNationnality { get; set; } + /// + /// 业户ID 非必填 该业户ID为下级平台存储业户信息所采用的ID编号 + /// + public string OwersId { get; set; } + /// + /// 业户名称 必填 运输企业名称 + /// + public string OwersName { get; set; } + /// + /// 业户联系电话 非必填 运输企业名称 + /// + public string OwersTel { get; set; } + } +} diff --git a/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo_2019.cs b/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo_2019.cs new file mode 100644 index 0000000..489bf52 --- /dev/null +++ b/src/JT809.Protocol/Metadata/JT809VehicleStaticInfo_2019.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace JT809.Protocol.Metadata +{ + /// + /// 车辆静态信息数据体 + /// + public class JT809VehicleStaticInfo_2019 + { + /// + /// 车牌号 必填 + /// 车牌号码中不设分隔符号。所有字母数字连续保存 + /// + public string Vin { get; set; } + /// + /// 车牌颜色 必填 应该使用枚举 + /// + public string VehicleColor { get; set; } + /// + /// 车辆类型 必填 应该使用枚举 + /// + public string VehicleType { get; set; } + /// + /// 运输行业编码 必填 应该使用枚举 + /// + public string TransType { get; set; } + /// + /// 车籍地 必填 + /// + public string VehicleNationnality { get; set; } + /// + /// 经营范围代码 必填 应该使用枚举 + /// + public string BusinessCopeCode { get; set; } + /// + /// 业户ID 非必填 该业户ID为下级平台存储业户信息所采用的ID编号 + /// + public string OwersId { get; set; } + /// + /// 业户名称 必填 运输企业名称 + /// + public string OwersName { get; set; } + /// + /// 业户联系电话 非必填 运输企业名称 + /// + public string OwersTel { get; set; } + } +} diff --git a/src/JT809.Protocol/SubMessageBody/JT809_0x1600_0x1602.cs b/src/JT809.Protocol/SubMessageBody/JT809_0x1600_0x1602.cs new file mode 100644 index 0000000..f4852be --- /dev/null +++ b/src/JT809.Protocol/SubMessageBody/JT809_0x1600_0x1602.cs @@ -0,0 +1,35 @@ +using JT809.Protocol.Enums; +using JT809.Protocol.Formatters; +using JT809.Protocol.MessagePack; +using JT809.Protocol.Extensions; +using JT809.Protocol.Interfaces; + +namespace JT809.Protocol.SubMessageBody +{ + /// + /// 补报车辆行驶路线信息应答消息 + /// 子业务类型标识:UP_BASE_MSG_VEHICLE_ADDED_ACK + /// 描述:下级平台向上级平台补报车辆行驶路线信息 + /// + public class JT809_0x1600_0x1602:JT809SubBodies, IJT809MessagePackFormatter, IJT809_2019_Version + { + public override ushort SubMsgId => JT809SubBusinessType.补报车辆行驶路线信息应答消息.ToUInt16Value(); + + public override string Description => "补报车辆行驶路线信息应答消息"; + /// + /// 路线信息,808-2019中0x8606规定的报文格式 + /// + public byte[] DRVLine { get; set; } + public JT809_0x1600_0x1602 Deserialize(ref JT809MessagePackReader reader, IJT809Config config) + { + var value = new JT809_0x1600_0x1602(); + value.DRVLine = reader.ReadArray(reader.ReadCurrentRemainContentLength()).ToArray(); + return value; + } + + public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1600_0x1602 value, IJT809Config config) + { + writer.WriteArray(value.DRVLine); + } + } +}