@@ -0,0 +1,22 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFramework>net8.0</TargetFramework> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" /> | |||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | |||||
<PackageReference Include="xunit" Version="2.6.1" /> | |||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3"> | |||||
<PrivateAssets>all</PrivateAssets> | |||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | |||||
</PackageReference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\JT808.Protocol.Extensions.GPS51\JT808.Protocol.Extensions.GPS51.csproj" /> | |||||
</ItemGroup> | |||||
</Project> |
@@ -0,0 +1,60 @@ | |||||
using JT808.Protocol.Extensions.GPS51.MessageBody; | |||||
using JT808.Protocol.MessageBody; | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using Xunit; | |||||
namespace JT808.Protocol.Extensions.GPS51.Test | |||||
{ | |||||
public class JT808_0x0200_0x2B_Ext_Test | |||||
{ | |||||
JT808Serializer JT808Serializer; | |||||
public JT808_0x0200_0x2B_Ext_Test() | |||||
{ | |||||
ServiceCollection serviceDescriptors = new ServiceCollection(); | |||||
serviceDescriptors.AddJT808Configure() | |||||
.AddGPS51Configure(); | |||||
IJT808Config jT808Config = serviceDescriptors.BuildServiceProvider().GetRequiredService<IJT808Config>(); | |||||
JT808Serializer = new JT808Serializer(jT808Config); | |||||
} | |||||
[Fact] | |||||
public void Serializer() | |||||
{ | |||||
JT808_0x0200 jT808UploadLocationRequest = new JT808_0x0200 | |||||
{ | |||||
AlarmFlag = 1, | |||||
Altitude = 40, | |||||
GPSTime = DateTime.Parse("2018-07-15 10:10:10"), | |||||
Lat = 12222222, | |||||
Lng = 132444444, | |||||
Speed = 60, | |||||
Direction = 0, | |||||
StatusFlag = 2, | |||||
CustomLocationAttachData = new Dictionary<byte, JT808_0x0200_CustomBodyBase>() | |||||
}; | |||||
jT808UploadLocationRequest.CustomLocationAttachData.Add(JT808_GPS51_Constants.JT808_0x0200_0x2B, new JT808_0x0200_0x2B_Ext | |||||
{ | |||||
AttachInfoId = 0x2b, | |||||
AttachInfoLength = 4, | |||||
Oils = new List<ushort> { | |||||
12,34 | |||||
} | |||||
}); | |||||
var hex = JT808Serializer.Serialize(jT808UploadLocationRequest).ToHexString(); | |||||
Assert.Equal("000000010000000200BA7F0E07E4F11C0028003C00001807151010102B04000C0022", hex); | |||||
} | |||||
[Fact] | |||||
public void Deserialize() | |||||
{ | |||||
var jT808UploadLocationRequest = JT808Serializer.Deserialize<JT808Package>("7e020000470412106280030233000000000000200201d365df072f15d500280000002d21091719155801040002a10f2a0200042b049203a46f520103eb06000100ce0a5730011b31010951080000000000000000ca7e".ToHexBytes()); | |||||
var body0200 = jT808UploadLocationRequest.Bodies as JT808_0x0200; | |||||
body0200.CustomLocationAttachData.TryGetValue(JT808_GPS51_Constants.JT808_0x0200_0x2B, out var value); | |||||
var jt808_0x0200_0x2b = value as JT808_0x0200_0x2B_Ext; | |||||
//2b049203a46f | |||||
Assert.Equal(0x9203, jt808_0x0200_0x2b.Oils[0]); | |||||
Assert.Equal(0xa46f, jt808_0x0200_0x2b.Oils[1]); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,63 @@ | |||||
using JT808.Protocol.Extensions.GPS51.MessageBody; | |||||
using JT808.Protocol.MessageBody; | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using Xunit; | |||||
namespace JT808.Protocol.Extensions.GPS51.Test | |||||
{ | |||||
public class JT808_0x0200_0x51_Test | |||||
{ | |||||
JT808Serializer JT808Serializer; | |||||
public JT808_0x0200_0x51_Test() | |||||
{ | |||||
ServiceCollection serviceDescriptors = new ServiceCollection(); | |||||
serviceDescriptors.AddJT808Configure() | |||||
.AddGPS51Configure(); | |||||
IJT808Config jT808Config = serviceDescriptors.BuildServiceProvider().GetRequiredService<IJT808Config>(); | |||||
JT808Serializer = new JT808Serializer(jT808Config); | |||||
} | |||||
[Fact] | |||||
public void Serializer() | |||||
{ | |||||
JT808_0x0200 jT808UploadLocationRequest = new JT808_0x0200 | |||||
{ | |||||
AlarmFlag = 1, | |||||
Altitude = 40, | |||||
GPSTime = DateTime.Parse("2018-07-15 10:10:10"), | |||||
Lat = 12222222, | |||||
Lng = 132444444, | |||||
Speed = 60, | |||||
Direction = 0, | |||||
StatusFlag = 2, | |||||
CustomLocationAttachData = new Dictionary<byte, JT808_0x0200_CustomBodyBase>() | |||||
}; | |||||
jT808UploadLocationRequest.CustomLocationAttachData.Add(JT808_GPS51_Constants.JT808_0x0200_0x51, new JT808_0x0200_0x51 | |||||
{ | |||||
AttachInfoId = 0x2b, | |||||
AttachInfoLength = 4, | |||||
Temperatures = new List<short> { | |||||
12,-34 | |||||
} | |||||
}); | |||||
var hex = JT808Serializer.Serialize(jT808UploadLocationRequest).ToHexString(); | |||||
Assert.Equal("000000010000000200BA7F0E07E4F11C0028003C00001807151010102B04000C0022", hex); | |||||
} | |||||
[Fact] | |||||
public void Deserialize() | |||||
{ | |||||
var jT808UploadLocationRequest = JT808Serializer.Deserialize<JT808Package>("7e020000470158666660580571000000000000000201d59c1c06a36599006e0000000021091719313901040000eb8830011d3101192a0200005201002b040000000051080134011a04f604f6eb06000400ce04f8847e".ToHexBytes()); | |||||
var body0200 = jT808UploadLocationRequest.Bodies as JT808_0x0200; | |||||
body0200.CustomLocationAttachData.TryGetValue(JT808_GPS51_Constants.JT808_0x0200_0x51, out var value); | |||||
var jt808_0x0200_0x51 = value as JT808_0x0200_0x51; | |||||
//2b049203a46f | |||||
Assert.Equal(0x0134, jt808_0x0200_0x51.Temperatures[0]); | |||||
Assert.Equal(0x011A, jt808_0x0200_0x51.Temperatures[1]); | |||||
Assert.Equal(0x04F6, jt808_0x0200_0x51.Temperatures[2]); | |||||
Assert.Equal(0x04F6, jt808_0x0200_0x51.Temperatures[3]); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,30 @@ | |||||
using JT808.Protocol.Extensions.GPS51.Enums; | |||||
using JT808.Protocol.Extensions.GPS51.MessageBody; | |||||
using JT808.Protocol.Interfaces; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Reflection; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.GPS51 | |||||
{ | |||||
/// <summary> | |||||
/// GPS51 extension JT/T808 | |||||
/// </summary> | |||||
public static class DependencyInjectionExtensions | |||||
{ | |||||
/// <summary> | |||||
/// 注册GPS51扩展JT/T808 | |||||
/// Register GPS51 extension JT/T808 | |||||
/// </summary> | |||||
/// <param name="jT808Builder"></param> | |||||
/// <returns></returns> | |||||
public static IJT808Builder AddGPS51Configure(this IJT808Builder jT808Builder) | |||||
{ | |||||
jT808Builder.Config.JT808_0X0200_Factory.Map.Remove(JT808_GPS51_Constants.JT808_0x0200_0x2B); | |||||
jT808Builder.Config.Register(Assembly.GetExecutingAssembly()); | |||||
return jT808Builder; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,39 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.GPS51.Enums | |||||
{ | |||||
/// <summary> | |||||
/// 主动拍照策略 | |||||
/// Active photo taking strategy | |||||
/// </summary> | |||||
public enum ActivePhotographyStrategyType:byte | |||||
{ | |||||
/// <summary> | |||||
/// 不开启 | |||||
/// Is not enabled | |||||
/// </summary> | |||||
not_enabled = 0x00, | |||||
/// <summary> | |||||
/// 定时拍照 | |||||
/// Camera Timer | |||||
/// </summary> | |||||
camera_timer = 0x01, | |||||
/// <summary> | |||||
/// 定距拍照 | |||||
/// Distance take photos | |||||
/// </summary> | |||||
distance_take_photos = 0x02, | |||||
/// <summary> | |||||
/// 保留 | |||||
/// reserve | |||||
/// </summary> | |||||
reserve = 0x03, | |||||
/// <summary> | |||||
/// 不修改参数 | |||||
/// Do not Modify parameters | |||||
/// </summary> | |||||
not_modify_parameters = 0xFF | |||||
} | |||||
} |
@@ -0,0 +1,11 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFramework>netstandard2.0</TargetFramework> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\..\JT808.Protocol\JT808.Protocol.csproj" /> | |||||
</ItemGroup> | |||||
</Project> |
@@ -0,0 +1,121 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Reflection; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.GPS51 | |||||
{ | |||||
/// <summary> | |||||
/// 主动安全常量 | |||||
/// </summary> | |||||
public static class JT808_GPS51_Constants | |||||
{ | |||||
/// <summary> | |||||
/// 附加信息ID 多路油耗模拟量, | |||||
/// 2*N | |||||
/// 例子报文:2b049203a46f | |||||
/// 解析结果为:2路 模拟量分别为37379 42095 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0x2B = 0x2b; | |||||
/// <summary> | |||||
/// 附加信息ID 2个字节一组温度 0.1度 ffff 代表无效, | |||||
/// 2*N | |||||
/// 04F6代表未接或者传感器掉电, | |||||
/// 第16位代表正负温度 51080134011A04F604F6 | |||||
/// 308=30.8度 282=28.2度 8050=-80=-8度 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0x51 = 0x51; | |||||
/// <summary> | |||||
/// 附加信息ID | |||||
/// 1 | |||||
/// 正反转 0:未知;1:正转(空车)2:反转(重车);3:停转 | |||||
/// 例子解析为:03 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0x52 = 0x52; | |||||
/// <summary> | |||||
/// 附加信息ID | |||||
/// 1+7*N | |||||
/// Wifi数据:第1个字节wifi个数,后面为n个wifi数据; | |||||
/// WIFI数据:6字节 wifiMac 1字节 信号强度 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0x54 = 0x54; | |||||
/// <summary> | |||||
/// 载重扩展 8 | |||||
/// 1/10千克 8 字节 | |||||
/// </summary> | |||||
public const uint JT808_0x0200_0x55 = 0x55; | |||||
/// <summary> | |||||
/// 湿度, | |||||
/// 2*N | |||||
/// 精度0.1,0fff 代表无效数据,例子数据: 0012 表示:1.8% | |||||
/// </summary> | |||||
public const uint JT808_0x0200_0x58 = 0x58; | |||||
/// <summary> | |||||
/// 电压, | |||||
/// 2 | |||||
/// 单位0.01V,例子报文:61021d74,解析结果7540,最终电压75.40V | |||||
/// </summary> | |||||
public const uint JT808_0x0200_0x61 = 0x61; | |||||
/// <summary> | |||||
/// 基站编码 | |||||
/// 4+7*N | |||||
/// 的格式为 MCC MNC LAC CI Signal 2-2-2-4-1-2-4-1, | |||||
/// 其中MCC 2个字节国家编码,MNC 为 2个字节网络编码,LAC为 2个字节地区编码, | |||||
/// CI 为 4个字节蜂窝 ID , | |||||
/// 信号强度 1字节, | |||||
/// 单基站可以不用信号强度 1cc-0-696a-863a8d0-0 | |||||
/// </summary> | |||||
public const uint JT808_0x0200_0xe1 = 0xe1; | |||||
/// <summary> | |||||
/// 版本号, | |||||
/// N | |||||
/// 开机或者重连第一条上报,例子结果:GB201-GSM-21001-1.1.1 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0xe2 = 0xe2; | |||||
/// <summary> | |||||
/// iccid, | |||||
/// 20 | |||||
/// 一般开机或者重连第一条0200位置信息上报, | |||||
/// 例子报文:f1143839383630343032313032303930393737303032, | |||||
/// 解析结果为:89860402102090977002 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0xf1 = 0xf1; | |||||
/// <summary> | |||||
/// IMEI数据: | |||||
/// 8字节, | |||||
/// 第1位为0,后面15位为imei的16进制数据 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0xf6 = 0xf6; | |||||
/// <summary> | |||||
/// 4 | |||||
/// 第0位:震动报警 | |||||
/// 第1位:拆除报警 例子:第0位:震动报警 fa0400000001 第1位:拆除报警 fa0400000002 | |||||
/// 第2位:进入深度休眠 fa0400000004 | |||||
/// 第3位:急加速 fa0400000008 | |||||
/// 第4位:急减速 fa0400000010 | |||||
/// 第5位:急转弯 fa0400000020 | |||||
/// 第6位:acc开报警 fa0400000040 | |||||
/// 第7位:acc关报警 fa0400000080 | |||||
/// 第8位:内部电池电量低fa0400000100 | |||||
/// 第9位:人为关机 | |||||
/// 第10位:低电关机 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0xfa = 0xfa; | |||||
/// <summary> | |||||
/// 4 | |||||
/// 电量百分比和外部电压, | |||||
/// 电压精度0.01V,充电状态0未充电 1充电中,没有的数据传00 | |||||
/// 例子:fb045F050701 | |||||
/// 解析结果:电量百分比5F=95 电压:0507=1287 最终显示为12.87V 01:充电中 | |||||
/// </summary> | |||||
public const byte JT808_0x0200_0xfb = 0xfb; | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public static Assembly GetCurrentAssembly() | |||||
{ | |||||
return Assembly.GetExecutingAssembly(); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,84 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Text.Json; | |||||
using JT808.Protocol.Extensions.GPS51.Metadata; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.Interfaces; | |||||
using JT808.Protocol.MessageBody; | |||||
using JT808.Protocol.MessagePack; | |||||
namespace JT808.Protocol.Extensions.GPS51.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 多路油耗模拟量 | |||||
/// </summary> | |||||
public class JT808_0x0200_0x2B_Ext : JT808MessagePackFormatter<JT808_0x0200_0x2B_Ext>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||||
{ | |||||
/// <summary> | |||||
/// 多路油耗模拟量,Id | |||||
/// </summary> | |||||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x2B; | |||||
/// <summary> | |||||
/// 多路油耗模拟量信息附加长度 | |||||
/// </summary> | |||||
public byte AttachInfoLength { get; set; } | |||||
/// <summary> | |||||
/// 油量数据 | |||||
/// </summary> | |||||
public List<ushort> Oils { get; set; } | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="reader"></param> | |||||
/// <param name="writer"></param> | |||||
/// <param name="config"></param> | |||||
public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) | |||||
{ | |||||
JT808_0x0200_0x2B_Ext value = new JT808_0x0200_0x2B_Ext(); | |||||
value.AttachInfoId = reader.ReadByte(); | |||||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||||
value.AttachInfoLength = reader.ReadByte(); | |||||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||||
value.Oils = new List<ushort>(); | |||||
for (ushort i = 0; i < value.AttachInfoLength/2; i++) { | |||||
value.Oils.Add(reader.ReadUInt16()); | |||||
} | |||||
writer.WriteString($"[油量值:{string.Join("", value.Oils.Select(m=>m.ReadNumber()))}]",string.Join(",", value.Oils)); | |||||
} | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="reader"></param> | |||||
/// <param name="config"></param> | |||||
/// <returns></returns> | |||||
public override JT808_0x0200_0x2B_Ext Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x0200_0x2B_Ext value = new JT808_0x0200_0x2B_Ext(); | |||||
value.AttachInfoId = reader.ReadByte(); | |||||
value.AttachInfoLength = reader.ReadByte(); | |||||
value.Oils = new List<ushort>(); | |||||
for (int i = 0; i < value.AttachInfoLength/2; i++) { | |||||
value.Oils.Add(reader.ReadUInt16()); | |||||
} | |||||
return value; | |||||
} | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="writer"></param> | |||||
/// <param name="value"></param> | |||||
/// <param name="config"></param> | |||||
public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x2B_Ext value, IJT808Config config) | |||||
{ | |||||
writer.WriteByte(value.AttachInfoId); | |||||
writer.WriteByte((byte)(value.Oils.Count*2)); | |||||
foreach (var item in value.Oils) | |||||
{ | |||||
writer.WriteUInt16(item); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,84 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Text.Json; | |||||
using JT808.Protocol.Extensions.GPS51.Metadata; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.Interfaces; | |||||
using JT808.Protocol.MessageBody; | |||||
using JT808.Protocol.MessagePack; | |||||
namespace JT808.Protocol.Extensions.GPS51.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 温度 | |||||
/// </summary> | |||||
public class JT808_0x0200_0x51 : JT808MessagePackFormatter<JT808_0x0200_0x51>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||||
{ | |||||
/// <summary> | |||||
/// 温度,Id | |||||
/// </summary> | |||||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x51; | |||||
/// <summary> | |||||
/// 温度信息附加长度 | |||||
/// </summary> | |||||
public byte AttachInfoLength { get; set; } | |||||
/// <summary> | |||||
/// 温度数据 | |||||
/// </summary> | |||||
public List<short> Temperatures { get; set; } | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="reader"></param> | |||||
/// <param name="writer"></param> | |||||
/// <param name="config"></param> | |||||
public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) | |||||
{ | |||||
JT808_0x0200_0x51 value = new JT808_0x0200_0x51(); | |||||
value.AttachInfoId = reader.ReadByte(); | |||||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||||
value.AttachInfoLength = reader.ReadByte(); | |||||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||||
value.Temperatures = new List<short>(); | |||||
for (ushort i = 0; i < value.AttachInfoLength/2; i++) { | |||||
value.Temperatures.Add(reader.ReadInt16()); | |||||
} | |||||
writer.WriteString($"[温度值:{string.Join("", value.Temperatures.Select(m=>m.ReadNumber()))}]",string.Join(",", value.Temperatures)); | |||||
} | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="reader"></param> | |||||
/// <param name="config"></param> | |||||
/// <returns></returns> | |||||
public override JT808_0x0200_0x51 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x0200_0x51 value = new JT808_0x0200_0x51(); | |||||
value.AttachInfoId = reader.ReadByte(); | |||||
value.AttachInfoLength = reader.ReadByte(); | |||||
value.Temperatures = new List<short>(); | |||||
for (int i = 0; i < value.AttachInfoLength / 2; i++) { | |||||
value.Temperatures.Add(reader.ReadInt16()); | |||||
} | |||||
return value; | |||||
} | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="writer"></param> | |||||
/// <param name="value"></param> | |||||
/// <param name="config"></param> | |||||
public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x51 value, IJT808Config config) | |||||
{ | |||||
writer.WriteByte(value.AttachInfoId); | |||||
writer.WriteByte((byte)(value.Temperatures.Count*2)); | |||||
foreach (var item in value.Temperatures) | |||||
{ | |||||
writer.WriteInt16(item); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,34 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.GPS51.Metadata | |||||
{ | |||||
/// <summary> | |||||
/// 报警标识号 | |||||
/// </summary> | |||||
public class AlarmIdentificationProperty | |||||
{ | |||||
/// <summary> | |||||
/// 终端ID | |||||
/// </summary> | |||||
public string TerminalID { get; set; } | |||||
/// <summary> | |||||
/// YY-MM-DD-hh-mm-ss | |||||
/// BCD[6] | |||||
/// </summary> | |||||
public DateTime Time { get; set; } | |||||
/// <summary> | |||||
/// 序号 | |||||
/// </summary> | |||||
public byte SN { get; set; } | |||||
/// <summary> | |||||
/// 附件数量 | |||||
/// </summary> | |||||
public byte AttachCount { get; set; } | |||||
/// <summary> | |||||
/// 预留 | |||||
/// </summary> | |||||
public byte Retain { get; set; } | |||||
} | |||||
} |
@@ -123,7 +123,7 @@ namespace JT808.Protocol.Extensions.JT1078.MessageBody | |||||
value.MemoryType = reader.ReadByte(); | value.MemoryType = reader.ReadByte(); | ||||
writer.WriteString($"[{value.MemoryType.ReadNumber()}]存储器类型", MemTypeDisplay(value.MemoryType)); | writer.WriteString($"[{value.MemoryType.ReadNumber()}]存储器类型", MemTypeDisplay(value.MemoryType)); | ||||
value.PlaybackWay = reader.ReadByte(); | value.PlaybackWay = reader.ReadByte(); | ||||
writer.WriteString($"[{value.PlaybackWay.ReadNumber()}]回访方式", PlayBackWayDisplay(value.PlaybackWay)); | |||||
writer.WriteString($"[{value.PlaybackWay.ReadNumber()}]回放方式", PlayBackWayDisplay(value.PlaybackWay)); | |||||
value.PlaySpeed = reader.ReadByte(); | value.PlaySpeed = reader.ReadByte(); | ||||
writer.WriteString($"[{value.PlaySpeed.ReadNumber()}]快进或快退倍数", FastForwardOrFastRewindMultiplesDisplay(value.PlaySpeed)); | writer.WriteString($"[{value.PlaySpeed.ReadNumber()}]快进或快退倍数", FastForwardOrFastRewindMultiplesDisplay(value.PlaySpeed)); | ||||
value.BeginTime = reader.ReadDateTime_yyMMddHHmmss(); | value.BeginTime = reader.ReadDateTime_yyMMddHHmmss(); | ||||
@@ -33,6 +33,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Extensions.S | |||||
EndProject | EndProject | ||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Extensions.SuBiao.Test", "JT808.Protocol.Extensions\JT808.Protocol.Extensions.SuBiao.Test\JT808.Protocol.Extensions.SuBiao.Test.csproj", "{BEE2E12D-C123-4682-AB7E-210C2BF564B3}" | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Extensions.SuBiao.Test", "JT808.Protocol.Extensions\JT808.Protocol.Extensions.SuBiao.Test\JT808.Protocol.Extensions.SuBiao.Test.csproj", "{BEE2E12D-C123-4682-AB7E-210C2BF564B3}" | ||||
EndProject | EndProject | ||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Extensions.GPS51", "JT808.Protocol.Extensions\JT808.Protocol.Extensions.GPS51\JT808.Protocol.Extensions.GPS51.csproj", "{913959F7-95D1-40FD-B67C-E4906531A828}" | |||||
EndProject | |||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol.Extensions.GPS51.Test", "JT808.Protocol.Extensions\JT808.Protocol.Extensions.GPS51.Test\JT808.Protocol.Extensions.GPS51.Test.csproj", "{AFB9EA79-566C-4861-A08E-AFB46879CFE3}" | |||||
EndProject | |||||
Global | Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|Any CPU = Debug|Any CPU | Debug|Any CPU = Debug|Any CPU | ||||
@@ -75,6 +79,14 @@ Global | |||||
{BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Debug|Any CPU.Build.0 = Debug|Any CPU | {BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||
{BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Release|Any CPU.ActiveCfg = Release|Any CPU | {BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
{BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Release|Any CPU.Build.0 = Release|Any CPU | {BEE2E12D-C123-4682-AB7E-210C2BF564B3}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
{913959F7-95D1-40FD-B67C-E4906531A828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{913959F7-95D1-40FD-B67C-E4906531A828}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{913959F7-95D1-40FD-B67C-E4906531A828}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{913959F7-95D1-40FD-B67C-E4906531A828}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{AFB9EA79-566C-4861-A08E-AFB46879CFE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{AFB9EA79-566C-4861-A08E-AFB46879CFE3}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{AFB9EA79-566C-4861-A08E-AFB46879CFE3}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{AFB9EA79-566C-4861-A08E-AFB46879CFE3}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(SolutionProperties) = preSolution | GlobalSection(SolutionProperties) = preSolution | ||||
HideSolutionNode = FALSE | HideSolutionNode = FALSE | ||||
@@ -86,6 +98,8 @@ Global | |||||
{4984E375-4B55-4188-A94E-844B694BBA5C} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | {4984E375-4B55-4188-A94E-844B694BBA5C} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | ||||
{001ECBA0-CF17-40B0-B983-B7AE824B8050} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | {001ECBA0-CF17-40B0-B983-B7AE824B8050} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | ||||
{BEE2E12D-C123-4682-AB7E-210C2BF564B3} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | {BEE2E12D-C123-4682-AB7E-210C2BF564B3} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | ||||
{913959F7-95D1-40FD-B67C-E4906531A828} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | |||||
{AFB9EA79-566C-4861-A08E-AFB46879CFE3} = {3A0EEA9A-9667-4386-BB46-4A9CB319CE30} | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(ExtensibilityGlobals) = postSolution | GlobalSection(ExtensibilityGlobals) = postSolution | ||||
SolutionGuid = {D58CCAA8-ED94-4048-A6DE-55A84814DF17} | SolutionGuid = {D58CCAA8-ED94-4048-A6DE-55A84814DF17} | ||||