Sfoglia il codice sorgente

添加协议 json解析,及0104部分测试

tags/v2.2.6
waterliu99 5 anni fa
parent
commit
6bf904224e
38 ha cambiato i file con 651 aggiunte e 70 eliminazioni
  1. +22
    -0
      src/JT808.Protocol.Test/MessageBody/JT808_0x0104Test.cs
  2. +28
    -2
      src/JT808.Protocol/MessageBody/JT808_0x0104.cs
  3. +16
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs
  4. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs
  5. +16
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs
  6. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs
  7. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs
  8. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs
  9. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs
  10. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs
  11. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs
  12. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs
  13. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs
  14. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs
  15. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs
  16. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs
  17. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs
  18. +15
    -1
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs
  19. +15
    -1
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs
  20. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs
  21. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs
  22. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs
  23. +18
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs
  24. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs
  25. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs
  26. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs
  27. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs
  28. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs
  29. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs
  30. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs
  31. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs
  32. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs
  33. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs
  34. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs
  35. +15
    -1
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs
  36. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs
  37. +17
    -2
      src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs
  38. +4
    -1
      src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs

+ 22
- 0
src/JT808.Protocol.Test/MessageBody/JT808_0x0104Test.cs Vedi File

@@ -85,11 +85,33 @@ namespace JT808.Protocol.Test.MessageBody
}
}
};
var hex0x0104 = JT808Serializer.Serialize(new JT808_0x0104
{
MsgNum = 20,
AnswerParamsCount = 2,
ParamList = new List<JT808_0x8103_BodyBase> {
new JT808_0x8103_0x0001() {
ParamId=0x0001,
ParamLength=4,
ParamValue=10
},
new JT808_0x8103_0x0013(){
ParamId=0x0013,
ParamValue="www.baidu.com"
}
}
}).ToHexString();
var hex = JT808Serializer.Serialize(jT808Package).ToHexString();
//7E0104001E000123456789000A00140200000001040000000A000000130F7777772E62616964752E636F6DF07E
//7E0104001E000123456789000A00140200000001040000000A000000130D7777772E62616964752E636F6DF27E
Assert.Equal("7E0104001E000123456789000A00140200000001040000000A000000130D7777772E62616964752E636F6DF27E", hex);
}
[Fact]
public void Test3()
{
byte[] bodys = "00140200000001040000000A000000130D7777772E62616964752E636F6D".ToHexBytes();
string json = JT808Serializer.Analyze<JT808_0x0104>(bodys);
}

[Fact]
public void Test2_1()


+ 28
- 2
src/JT808.Protocol/MessageBody/JT808_0x0104.cs Vedi File

@@ -1,15 +1,18 @@
using JT808.Protocol.Extensions;
using JT808.Protocol.Enums;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System;
using System.Collections.Generic;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{
/// <summary>
/// 查询终端参数应答
/// </summary>
public class JT808_0x0104 : JT808Bodies, IJT808MessagePackFormatter<JT808_0x0104>
public class JT808_0x0104 : JT808Bodies, IJT808MessagePackFormatter<JT808_0x0104>, IJT808Analyze
{
public override ushort MsgId { get; } = 0x0104;
public override string Description => "查询终端参数应答";
@@ -60,5 +63,28 @@ namespace JT808.Protocol.MessageBody
JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(obj, ref writer, item, config);
}
}

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x0104 jT808_0x0104 = new JT808_0x0104();
jT808_0x0104.MsgNum = reader.ReadUInt16();
jT808_0x0104.AnswerParamsCount = reader.ReadByte();
writer.WriteNumber($"[{jT808_0x0104.MsgNum.ReadNumber()}]应答流水号", jT808_0x0104.MsgNum);
writer.WriteNumber($"[{ jT808_0x0104.AnswerParamsCount.ReadNumber()}]应答参数个数", jT808_0x0104.AnswerParamsCount);
writer.WriteStartArray($"参数列表");
for (int i = 0; i < jT808_0x0104.AnswerParamsCount; i++)
{
writer.WriteStartObject();
var paramId = reader.ReadVirtualUInt32();//参数ID
if (config.JT808_0X8103_Factory.Map.TryGetValue(paramId, out object instance))
{
if (instance is IJT808Analyze analyze) {
analyze.Analyze(ref reader, writer, config);
}
}
writer.WriteEndObject();
}
writer.WriteEndArray();
}
}
}

+ 16
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0001.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// 终端心跳发送间隔,单位为秒(s)
/// 0x8103_0x0001
/// </summary>
public class JT808_0x8103_0x0001 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0001>
public class JT808_0x8103_0x0001 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0001>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0001;
/// <summary>
@@ -20,6 +23,17 @@ namespace JT808.Protocol.MessageBody
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0001 jT808_0x8103_0x0001 = new JT808_0x8103_0x0001();
jT808_0x8103_0x0001.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0001.ParamLength = reader.ReadByte();
jT808_0x8103_0x0001.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0001.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0001.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0001.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0001.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0001.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0001.ParamValue);
}

public JT808_0x8103_0x0001 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0001 jT808_0x8103_0x0001 = new JT808_0x8103_0x0001();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0002.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// TCP 消息应答超时时间,单位为秒(s)
/// 0x8103_0x0002
/// </summary>
public class JT808_0x8103_0x0002 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0002>
public class JT808_0x8103_0x0002 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0002>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0002;
/// <summary>
@@ -19,6 +22,18 @@ namespace JT808.Protocol.MessageBody
/// TCP 消息应答超时时间,单位为秒(s)
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0002 jT808_0x8103_0x0002 = new JT808_0x8103_0x0002();
jT808_0x8103_0x0002.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0002.ParamLength = reader.ReadByte();
jT808_0x8103_0x0002.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0002.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0002.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0002.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0002.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0002.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0002.ParamValue);
}

public JT808_0x8103_0x0002 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0002 jT808_0x8103_0x0002 = new JT808_0x8103_0x0002();


+ 16
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0003.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// TCP 消息重传次数
/// 0x8103_0x0003
/// </summary>
public class JT808_0x8103_0x0003 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0003>
public class JT808_0x8103_0x0003 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0003>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0003;
/// <summary>
@@ -20,6 +23,17 @@ namespace JT808.Protocol.MessageBody
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0003 jT808_0x8103_0x0003 = new JT808_0x8103_0x0003();
jT808_0x8103_0x0003.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0003.ParamLength = reader.ReadByte();
jT808_0x8103_0x0003.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0003.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0003.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0003.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0003.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0003.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0003.ParamValue);
}

public JT808_0x8103_0x0003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0003 jT808_0x8103_0x0003 = new JT808_0x8103_0x0003();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0004.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// UDP 消息应答超时时间,单位为秒(s)
/// 0x8103_0x0004
/// </summary>
public class JT808_0x8103_0x0004 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0004>
public class JT808_0x8103_0x0004 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0004>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0004;
/// <summary>
@@ -19,6 +22,18 @@ namespace JT808.Protocol.MessageBody
/// UDP 消息应答超时时间,单位为秒(s)
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0004 jT808_0x8103_0x0004 = new JT808_0x8103_0x0004();
jT808_0x8103_0x0004.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0004.ParamLength = reader.ReadByte();
jT808_0x8103_0x0004.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0004.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0004.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0004.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0004.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0004.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0004.ParamValue);
}

public JT808_0x8103_0x0004 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0004 jT808_0x8103_0x0004 = new JT808_0x8103_0x0004();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0005.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// UDP 消息重传次数
/// 0x8103_0x0005
/// </summary>
public class JT808_0x8103_0x0005 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0005>
public class JT808_0x8103_0x0005 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0005>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0005;
/// <summary>
@@ -19,6 +22,18 @@ namespace JT808.Protocol.MessageBody
/// UDP 消息重传次数
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0005 jT808_0x8103_0x0005 = new JT808_0x8103_0x0005();
jT808_0x8103_0x0005.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0005.ParamLength = reader.ReadByte();
jT808_0x8103_0x0005.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0005.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0005.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0005.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0005.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0005.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0005.ParamValue);
}

public JT808_0x8103_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0005 jT808_0x8103_0x0005 = new JT808_0x8103_0x0005();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0006.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// SMS 消息应答超时时间,单位为秒(s)
/// 0x8103_0x0006
/// </summary>
public class JT808_0x8103_0x0006 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0006>
public class JT808_0x8103_0x0006 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0006>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0006;
/// <summary>
@@ -19,6 +22,18 @@ namespace JT808.Protocol.MessageBody
/// SMS 消息应答超时时间,单位为秒(s)
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0006 jT808_0x8103_0x0006 = new JT808_0x8103_0x0006();
jT808_0x8103_0x0006.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0006.ParamLength = reader.ReadByte();
jT808_0x8103_0x0006.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0006.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0006.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0006.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0006.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0006.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0006.ParamValue);
}

public JT808_0x8103_0x0006 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0006 jT808_0x8103_0x0006 = new JT808_0x8103_0x0006();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0007.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -8,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// SMS 消息重传次数
/// 0x8103_0x0007
/// </summary>
public class JT808_0x8103_0x0007 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0007>
public class JT808_0x8103_0x0007 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0007>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0007;
/// <summary>
@@ -19,6 +22,18 @@ namespace JT808.Protocol.MessageBody
/// SMS 消息重传次数
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0007 jT808_0x8103_0x0007 = new JT808_0x8103_0x0007();
jT808_0x8103_0x0007.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0007.ParamLength = reader.ReadByte();
jT808_0x8103_0x0007.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0007.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0007.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0007.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0007.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0007.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0007.ParamValue);
}

public JT808_0x8103_0x0007 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0007 jT808_0x8103_0x0007 = new JT808_0x8103_0x0007();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0010.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 主服务器 APN,无线通信拨号访问点。若网络制式为 CDMA,则该处为PPP 拨号号码
/// </summary>
public class JT808_0x8103_0x0010 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0010>
public class JT808_0x8103_0x0010 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0010>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0010;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 主服务器 APN,无线通信拨号访问点。若网络制式为 CDMA,则该处为PPP 拨号号码
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0010 jT808_0x8103_0x0010 = new JT808_0x8103_0x0010();
jT808_0x8103_0x0010.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0010.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0010.ParamLength);
jT808_0x8103_0x0010.ParamValue = reader.ReadString(jT808_0x8103_0x0010.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0010.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0010.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0010.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0010.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0010.ParamValue);
}

public JT808_0x8103_0x0010 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0010 jT808_0x8103_0x0010 = new JT808_0x8103_0x0010();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0011.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 主服务器无线通信拨号用户名
/// </summary>
public class JT808_0x8103_0x0011 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0011>
public class JT808_0x8103_0x0011 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0011>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0011;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 主服务器无线通信拨号用户名
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0011 jT808_0x8103_0x0011 = new JT808_0x8103_0x0011();
jT808_0x8103_0x0011.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0011.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0011.ParamLength);
jT808_0x8103_0x0011.ParamValue = reader.ReadString(jT808_0x8103_0x0011.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0011.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0011.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0011.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0011.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0011.ParamValue);
}

public JT808_0x8103_0x0011 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0011 jT808_0x8103_0x0011 = new JT808_0x8103_0x0011();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0012.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 主服务器无线通信拨号密码
/// </summary>
public class JT808_0x8103_0x0012 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0012>
public class JT808_0x8103_0x0012 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0012>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0012;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 主服务器无线通信拨号密码
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0012 jT808_0x8103_0x0012 = new JT808_0x8103_0x0012();
jT808_0x8103_0x0012.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0012.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0012.ParamLength);
jT808_0x8103_0x0012.ParamValue = reader.ReadString(jT808_0x8103_0x0012.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0012.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0012.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0012.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0012.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0012.ParamValue);
}

public JT808_0x8103_0x0012 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0012 jT808_0x8103_0x0012 = new JT808_0x8103_0x0012();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0013.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 主服务器地址,IP 或域名
/// </summary>
public class JT808_0x8103_0x0013 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0013>
public class JT808_0x8103_0x0013 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0013>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0013;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 主服务器地址,IP 或域名
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0013 jT808_0x8103_0x0013 = new JT808_0x8103_0x0013();
jT808_0x8103_0x0013.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0013.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0013.ParamLength);
jT808_0x8103_0x0013.ParamValue = reader.ReadString(jT808_0x8103_0x0013.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0013.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0013.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0013.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0013.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0013.ParamValue);
}

public JT808_0x8103_0x0013 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0013 jT808_0x8103_0x0013 = new JT808_0x8103_0x0013();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0014.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 备份服务器 APN,无线通信拨号访问点
/// </summary>
public class JT808_0x8103_0x0014 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0014>
public class JT808_0x8103_0x0014 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0014>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0014;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 备份服务器 APN,无线通信拨号访问点
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0014 jT808_0x8103_0x0014 = new JT808_0x8103_0x0014();
jT808_0x8103_0x0014.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0014.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0014.ParamLength);
jT808_0x8103_0x0014.ParamValue = reader.ReadString(jT808_0x8103_0x0014.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0014.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0014.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0014.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0014.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0014.ParamValue);
}

public JT808_0x8103_0x0014 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0014 jT808_0x8103_0x0014 = new JT808_0x8103_0x0014();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0015.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 备份服务器无线通信拨号用户名
/// </summary>
public class JT808_0x8103_0x0015 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0015>
public class JT808_0x8103_0x0015 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0015>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0015;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 备份服务器无线通信拨号用户名
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0015 jT808_0x8103_0x0015 = new JT808_0x8103_0x0015();
jT808_0x8103_0x0015.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0015.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0015.ParamLength);
jT808_0x8103_0x0015.ParamValue = reader.ReadString(jT808_0x8103_0x0015.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0015.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0015.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0015.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0015.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0015.ParamValue);
}

public JT808_0x8103_0x0015 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0015 jT808_0x8103_0x0015 = new JT808_0x8103_0x0015();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0016.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 备份服务器无线通信拨号密码
/// </summary>
public class JT808_0x8103_0x0016 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0016>
public class JT808_0x8103_0x0016 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0016>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0016;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 备份服务器无线通信拨号密码
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0016 jT808_0x8103_0x0016 = new JT808_0x8103_0x0016();
jT808_0x8103_0x0016.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0016.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0016.ParamLength);
jT808_0x8103_0x0016.ParamValue = reader.ReadString(jT808_0x8103_0x0016.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0016.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0016.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0016.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0016.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0016.ParamValue);
}

public JT808_0x8103_0x0016 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0016 jT808_0x8103_0x0016 = new JT808_0x8103_0x0016();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0017.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 备份服务器地址,IP 或域名
/// </summary>
public class JT808_0x8103_0x0017 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0017>
public class JT808_0x8103_0x0017 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0017>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0017;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 备份服务器地址,IP 或域名
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0017 jT808_0x8103_0x0017 = new JT808_0x8103_0x0017();
jT808_0x8103_0x0017.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0017.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0017.ParamLength);
jT808_0x8103_0x0017.ParamValue = reader.ReadString(jT808_0x8103_0x0017.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0017.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0017.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0017.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0017.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0017.ParamValue);
}

public JT808_0x8103_0x0017 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0017 jT808_0x8103_0x0017 = new JT808_0x8103_0x0017();


+ 15
- 1
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0018.cs Vedi File

@@ -1,8 +1,10 @@
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{
@@ -10,7 +12,7 @@ namespace JT808.Protocol.MessageBody
/// 服务器 TCP 端口
/// </summary>
[Obsolete("2019版本已作为保留")]
public class JT808_0x8103_0x0018 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0018>, IJT808_2019_Version
public class JT808_0x8103_0x0018 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0018>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0018;
/// <summary>
@@ -21,6 +23,18 @@ namespace JT808.Protocol.MessageBody
///服务器 TCP 端口
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0018 value = new JT808_0x8103_0x0018();
value.ParamId = reader.ReadUInt32();
value.ParamLength = reader.ReadByte();
value.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ value.ParamId.ReadNumber()}]参数ID", value.ParamId);
writer.WriteNumber($"[{value.ParamLength.ReadNumber()}]参数长度", value.ParamLength);
writer.WriteNumber($"[{ value.ParamValue.ReadNumber()}]参数值", value.ParamValue);
}

public JT808_0x8103_0x0018 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0018 value = new JT808_0x8103_0x0018();


+ 15
- 1
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0019.cs Vedi File

@@ -1,8 +1,10 @@
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{
@@ -10,7 +12,7 @@ namespace JT808.Protocol.MessageBody
/// 服务器 UDP 端口
/// </summary>
[Obsolete("2019版本已作为保留")]
public class JT808_0x8103_0x0019 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0019>, IJT808_2019_Version
public class JT808_0x8103_0x0019 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0019>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0019;
/// <summary>
@@ -21,6 +23,18 @@ namespace JT808.Protocol.MessageBody
///服务器 TCP 端口
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0019 value = new JT808_0x8103_0x0019();
value.ParamId = reader.ReadUInt32();
value.ParamLength = reader.ReadByte();
value.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ value.ParamId.ReadNumber()}]参数ID", value.ParamId);
writer.WriteNumber($"[{value.ParamLength.ReadNumber()}]参数长度", value.ParamLength);
writer.WriteNumber($"[{ value.ParamValue.ReadNumber()}]参数值", value.ParamValue);
}

public JT808_0x8103_0x0019 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0019 value = new JT808_0x8103_0x0019();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x001A.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 道路运输证 IC 卡认证主服务器 IP 地址或域名
/// </summary>
public class JT808_0x8103_0x001A : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001A>
public class JT808_0x8103_0x001A : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001A>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x001A;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 道路运输证 IC 卡认证主服务器 IP 地址或域名
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x001A jT808_0x8103_0x001A = new JT808_0x8103_0x001A();
jT808_0x8103_0x001A.ParamId = reader.ReadUInt32();
jT808_0x8103_0x001A.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x001A.ParamLength);
jT808_0x8103_0x001A.ParamValue = reader.ReadString(jT808_0x8103_0x001A.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x001A.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x001A.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x001A.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x001A.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x001A.ParamValue);
}

public JT808_0x8103_0x001A Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x001A jT808_0x8103_0x001A = new JT808_0x8103_0x001A();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x001B.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 道路运输证 IC 卡认证主服务器 TCP 端口
/// </summary>
public class JT808_0x8103_0x001B : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001B>
public class JT808_0x8103_0x001B : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001B>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x001B;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
///道路运输证 IC 卡认证主服务器 TCP 端口
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x001B jT808_0x8103_0x001B = new JT808_0x8103_0x001B();
jT808_0x8103_0x001B.ParamId = reader.ReadUInt32();
jT808_0x8103_0x001B.ParamLength = reader.ReadByte();
jT808_0x8103_0x001B.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x001B.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x001B.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x001B.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x001B.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x001B.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x001B.ParamValue);
}

public JT808_0x8103_0x001B Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x001B jT808_0x8103_0x001B = new JT808_0x8103_0x001B();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x001C.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 道路运输证 IC 卡认证主服务器 UDP 端口
/// </summary>
public class JT808_0x8103_0x001C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001C>
public class JT808_0x8103_0x001C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001C>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x001C;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
///道路运输证 IC 卡认证主服务器 UDP 端口
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x001C jT808_0x8103_0x001C = new JT808_0x8103_0x001C();
jT808_0x8103_0x001C.ParamId = reader.ReadUInt32();
jT808_0x8103_0x001C.ParamLength = reader.ReadByte();
jT808_0x8103_0x001C.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x001C.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x001C.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x001C.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x001C.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x001C.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x001C.ParamValue);
}

public JT808_0x8103_0x001C Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x001C jT808_0x8103_0x001C = new JT808_0x8103_0x001C();


+ 18
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x001D.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 道路运输证 IC 卡认证备份服务器 IP 地址或域名,端口同主服务器
/// </summary>
public class JT808_0x8103_0x001D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001D>
public class JT808_0x8103_0x001D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x001D>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x001D;
/// <summary>
@@ -18,6 +21,19 @@ namespace JT808.Protocol.MessageBody
/// 道路运输证 IC 卡认证备份服务器 IP 地址或域名,端口同主服务器
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x001D jT808_0x8103_0x001D = new JT808_0x8103_0x001D();
jT808_0x8103_0x001D.ParamId = reader.ReadUInt32();
jT808_0x8103_0x001D.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x001D.ParamLength);
jT808_0x8103_0x001D.ParamValue = reader.ReadString(jT808_0x8103_0x001D.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x001D.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x001D.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x001D.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x001D.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x001D.ParamValue);
}

public JT808_0x8103_0x001D Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x001D jT808_0x8103_0x001D = new JT808_0x8103_0x001D();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0020.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 位置汇报策略,0:定时汇报;1:定距汇报;2:定时和定距汇报
/// </summary>
public class JT808_0x8103_0x0020 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0020>
public class JT808_0x8103_0x0020 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0020>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0020;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 位置汇报策略,0:定时汇报;1:定距汇报;2:定时和定距汇报
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0020 jT808_0x8103_0x0020 = new JT808_0x8103_0x0020();
jT808_0x8103_0x0020.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0020.ParamLength = reader.ReadByte();
jT808_0x8103_0x0020.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0020.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0020.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0020.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0020.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0020.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0020.ParamValue);
}

public JT808_0x8103_0x0020 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0020 jT808_0x8103_0x0020 = new JT808_0x8103_0x0020();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0021.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 位置汇报方案,0:根据 ACC 状态; 1:根据登录状态和 ACC 状态,先判断登录状态,若登录再根据 ACC 状态
/// </summary>
public class JT808_0x8103_0x0021 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0021>
public class JT808_0x8103_0x0021 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0021>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0021;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 位置汇报方案,0:根据 ACC 状态; 1:根据登录状态和 ACC 状态,先判断登录状态,若登录再根据 ACC 状态
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0021 jT808_0x8103_0x0021 = new JT808_0x8103_0x0021();
jT808_0x8103_0x0021.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0021.ParamLength = reader.ReadByte();
jT808_0x8103_0x0021.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0021.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0021.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0021.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0021.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0021.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0021.ParamValue);
}

public JT808_0x8103_0x0021 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0021 jT808_0x8103_0x0021 = new JT808_0x8103_0x0021();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0022.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 驾驶员未登录汇报时间间隔,单位为秒(s),>0
/// </summary>
public class JT808_0x8103_0x0022 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0022>
public class JT808_0x8103_0x0022 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0022>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0022;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 驾驶员未登录汇报时间间隔,单位为秒(s),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0022 jT808_0x8103_0x0022 = new JT808_0x8103_0x0022();
jT808_0x8103_0x0022.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0022.ParamLength = reader.ReadByte();
jT808_0x8103_0x0022.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0022.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0022.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0022.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0022.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0022.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0022.ParamValue);
}

public JT808_0x8103_0x0022 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0022 jT808_0x8103_0x0022 = new JT808_0x8103_0x0022();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0023.cs Vedi File

@@ -1,4 +1,6 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
@@ -9,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// 从服务器APN。该值为空时,终端应使用主服务器相同配置
/// 2019版本
/// </summary>
public class JT808_0x8103_0x0023 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0023>, IJT808_2019_Version
public class JT808_0x8103_0x0023 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0023>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0023;
/// <summary>
@@ -20,6 +22,19 @@ namespace JT808.Protocol.MessageBody
///
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0023 value = new JT808_0x8103_0x0023();
value.ParamId = reader.ReadUInt32();
value.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(value.ParamLength);
value.ParamValue = reader.ReadString(value.ParamLength);
writer.WriteNumber($"[{ value.ParamId.ReadNumber()}]参数ID", value.ParamId);
writer.WriteNumber($"[{value.ParamLength.ReadNumber()}]参数长度", value.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", value.ParamValue);
}

public JT808_0x8103_0x0023 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0023 value = new JT808_0x8103_0x0023();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0024.cs Vedi File

@@ -1,4 +1,6 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
@@ -9,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// 从服务器无线通信拨号用户名。该值为空时,终端应使用主服务器相同配置
/// 2019版本
/// </summary>
public class JT808_0x8103_0x0024 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0024>, IJT808_2019_Version
public class JT808_0x8103_0x0024 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0024>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0024;
/// <summary>
@@ -20,6 +22,19 @@ namespace JT808.Protocol.MessageBody
///
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0024 jT808_0x8103_0x0024 = new JT808_0x8103_0x0024();
jT808_0x8103_0x0024.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0024.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0024.ParamLength);
jT808_0x8103_0x0024.ParamValue = reader.ReadString(jT808_0x8103_0x0024.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0024.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0024.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0024.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0024.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0024.ParamValue);
}

public JT808_0x8103_0x0024 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0024 jT808_0x8103_0x0024 = new JT808_0x8103_0x0024();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0025.cs Vedi File

@@ -1,4 +1,6 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
@@ -9,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// 从服务器无线通信拨号密码。该值为空,终端应使用主服务器相同配置
/// 2019版本
/// </summary>
public class JT808_0x8103_0x0025 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0025>, IJT808_2019_Version
public class JT808_0x8103_0x0025 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0025>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0025;
/// <summary>
@@ -20,6 +22,19 @@ namespace JT808.Protocol.MessageBody
///
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0025 jT808_0x8103_0x0025 = new JT808_0x8103_0x0025();
jT808_0x8103_0x0025.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0025.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(jT808_0x8103_0x0025.ParamLength);
jT808_0x8103_0x0025.ParamValue = reader.ReadString(jT808_0x8103_0x0025.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0025.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0025.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0025.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0025.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", jT808_0x8103_0x0025.ParamValue);
}

public JT808_0x8103_0x0025 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0025 jT808_0x8103_0x0025 = new JT808_0x8103_0x0025();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0026.cs Vedi File

@@ -1,4 +1,6 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
@@ -9,7 +11,7 @@ namespace JT808.Protocol.MessageBody
/// 从服务器无线通信拨号密码。该值为空,终端应使用主服务器相同配置
/// 2019版本
/// </summary>
public class JT808_0x8103_0x0026 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0026>, IJT808_2019_Version
public class JT808_0x8103_0x0026 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0026>, IJT808_2019_Version, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0026;
/// <summary>
@@ -20,6 +22,19 @@ namespace JT808.Protocol.MessageBody
///
/// </summary>
public string ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0026 value = new JT808_0x8103_0x0026();
value.ParamId = reader.ReadUInt32();
value.ParamLength = reader.ReadByte();
var paramValue = reader.ReadVirtualArray(value.ParamLength);
value.ParamValue = reader.ReadString(value.ParamLength);
writer.WriteNumber($"[{ value.ParamId.ReadNumber()}]参数ID", value.ParamId);
writer.WriteNumber($"[{value.ParamLength.ReadNumber()}]参数长度", value.ParamLength);
writer.WriteString($"[{paramValue.ToArray().ToHexString()}]参数值", value.ParamValue);
}

public JT808_0x8103_0x0026 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0026 value = new JT808_0x8103_0x0026();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0027.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 休眠时汇报时间间隔,单位为秒(s),>0
/// </summary>
public class JT808_0x8103_0x0027 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0027>
public class JT808_0x8103_0x0027 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0027>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0027;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 休眠时汇报时间间隔,单位为秒(s),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0027 jT808_0x8103_0x0027 = new JT808_0x8103_0x0027();
jT808_0x8103_0x0027.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0027.ParamLength = reader.ReadByte();
jT808_0x8103_0x0027.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0027.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0027.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0027.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0027.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0027.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0027.ParamValue);
}

public JT808_0x8103_0x0027 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0027 jT808_0x8103_0x0027 = new JT808_0x8103_0x0027();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0028.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 紧急报警时汇报时间间隔,单位为秒(s),>0
/// </summary>
public class JT808_0x8103_0x0028 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0028>
public class JT808_0x8103_0x0028 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0028>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0028;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 紧急报警时汇报时间间隔,单位为秒(s),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0028 jT808_0x8103_0x0028 = new JT808_0x8103_0x0028();
jT808_0x8103_0x0028.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0028.ParamLength = reader.ReadByte();
jT808_0x8103_0x0028.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0028.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0028.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0028.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0028.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0028.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0028.ParamValue);
}

public JT808_0x8103_0x0028 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0028 jT808_0x8103_0x0028 = new JT808_0x8103_0x0028();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x0029.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 缺省时间汇报间隔,单位为秒(s),>0
/// </summary>
public class JT808_0x8103_0x0029 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0029>
public class JT808_0x8103_0x0029 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0029>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x0029;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 缺省时间汇报间隔,单位为秒(s),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x0029 jT808_0x8103_0x0029 = new JT808_0x8103_0x0029();
jT808_0x8103_0x0029.ParamId = reader.ReadUInt32();
jT808_0x8103_0x0029.ParamLength = reader.ReadByte();
jT808_0x8103_0x0029.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x0029.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x0029.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x0029.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x0029.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x0029.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x0029.ParamValue);
}

public JT808_0x8103_0x0029 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x0029 jT808_0x8103_0x0029 = new JT808_0x8103_0x0029();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x002C.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 缺省距离汇报间隔,单位为米(m),>0
/// </summary>
public class JT808_0x8103_0x002C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002C>
public class JT808_0x8103_0x002C : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002C>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x002C;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 缺省距离汇报间隔,单位为米(m),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x002C jT808_0x8103_0x002C = new JT808_0x8103_0x002C();
jT808_0x8103_0x002C.ParamId = reader.ReadUInt32();
jT808_0x8103_0x002C.ParamLength = reader.ReadByte();
jT808_0x8103_0x002C.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x002C.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x002C.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x002C.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x002C.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x002C.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x002C.ParamValue);
}

public JT808_0x8103_0x002C Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x002C jT808_0x8103_0x002C = new JT808_0x8103_0x002C();


+ 15
- 1
src/JT808.Protocol/MessageBody/JT808_0x8103_0x002D.cs Vedi File

@@ -1,13 +1,16 @@
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{
/// <summary>
/// 驾驶员未登录汇报距离间隔,单位为米(m),>0
/// </summary>
public class JT808_0x8103_0x002D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002D>
public class JT808_0x8103_0x002D : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002D>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x002D;
/// <summary>
@@ -18,6 +21,17 @@ namespace JT808.Protocol.MessageBody
/// 驾驶员未登录汇报距离间隔,单位为米(m),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x002D jT808_0x8103_0x002D = new JT808_0x8103_0x002D();
jT808_0x8103_0x002D.ParamId = reader.ReadUInt32();
jT808_0x8103_0x002D.ParamLength = reader.ReadByte();
jT808_0x8103_0x002D.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x002D.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x002D.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x002D.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x002D.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x002D.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x002D.ParamValue);
}
public JT808_0x8103_0x002D Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x002D jT808_0x8103_0x002D = new JT808_0x8103_0x002D();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x002E.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 休眠时汇报距离间隔,单位为米(m),>0
/// </summary>
public class JT808_0x8103_0x002E : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002E>
public class JT808_0x8103_0x002E : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002E>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x002E;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 休眠时汇报距离间隔,单位为米(m),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x002E jT808_0x8103_0x002E = new JT808_0x8103_0x002E();
jT808_0x8103_0x002E.ParamId = reader.ReadUInt32();
jT808_0x8103_0x002E.ParamLength = reader.ReadByte();
jT808_0x8103_0x002E.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x002E.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x002E.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x002E.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x002E.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x002E.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x002E.ParamValue);
}

public JT808_0x8103_0x002E Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x002E jT808_0x8103_0x002E = new JT808_0x8103_0x002E();


+ 17
- 2
src/JT808.Protocol/MessageBody/JT808_0x8103_0x002F.cs Vedi File

@@ -1,5 +1,8 @@
using JT808.Protocol.Attributes;
using System.Text.Json;
using JT808.Protocol.Attributes;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;

namespace JT808.Protocol.MessageBody
@@ -7,7 +10,7 @@ namespace JT808.Protocol.MessageBody
/// <summary>
/// 紧急报警时汇报距离间隔,单位为米(m),>0
/// </summary>
public class JT808_0x8103_0x002F : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002F>
public class JT808_0x8103_0x002F : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x002F>, IJT808Analyze
{
public override uint ParamId { get; set; } = 0x002F;
/// <summary>
@@ -18,6 +21,18 @@ namespace JT808.Protocol.MessageBody
/// 紧急报警时汇报距离间隔,单位为米(m),>0
/// </summary>
public uint ParamValue { get; set; }

public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
{
JT808_0x8103_0x002F jT808_0x8103_0x002F = new JT808_0x8103_0x002F();
jT808_0x8103_0x002F.ParamId = reader.ReadUInt32();
jT808_0x8103_0x002F.ParamLength = reader.ReadByte();
jT808_0x8103_0x002F.ParamValue = reader.ReadUInt32();
writer.WriteNumber($"[{ jT808_0x8103_0x002F.ParamId.ReadNumber()}]参数ID", jT808_0x8103_0x002F.ParamId);
writer.WriteNumber($"[{jT808_0x8103_0x002F.ParamLength.ReadNumber()}]参数长度", jT808_0x8103_0x002F.ParamLength);
writer.WriteNumber($"[{ jT808_0x8103_0x002F.ParamValue.ReadNumber()}]参数值", jT808_0x8103_0x002F.ParamValue);
}

public JT808_0x8103_0x002F Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8103_0x002F jT808_0x8103_0x002F = new JT808_0x8103_0x002F();


+ 4
- 1
src/JT808.Protocol/MessageBody/JT808_0x8103_BodyBase.cs Vedi File

@@ -1,5 +1,8 @@
using System;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System;
using System.Collections.Generic;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{


Caricamento…
Annulla
Salva