diff --git a/README.md b/README.md index bb56e4b..e236714 100644 --- a/README.md +++ b/README.md @@ -461,11 +461,11 @@ Platform=AnyCpu Server=True |序号|消息ID|完成情况|测试情况|消息体名称| |:------:|:------:|:------:|:------:|:------:| | 1 | 0x1600 | √ | √ | 主链路静态信息交换消息 | -| 2 | 0x1601 | √ | x | 补报车辆静态信息应答 | +| 2 | 0x1601 | √ | √ | 补报车辆静态信息应答 | #### 从链路静态信息交换消息 |序号|消息ID|完成情况|测试情况|消息体名称| |:------:|:------:|:------:|:------:|:------:| | 1 | 0x9600 | √ | √ | 从链路静态信息交换消息 | -| 2 | 0x9601 | √ | x | 补报车辆静态信息应答 | +| 2 | 0x9601 | √ | 数据体为空 | 补报车辆静态信息应答 | diff --git a/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x1600_0x1601Test.cs b/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x1600_0x1601Test.cs new file mode 100644 index 0000000..1a6f19b --- /dev/null +++ b/src/JT809.Protocol.Test/JT809SubMessageBody/JT809_0x1600_0x1601Test.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Xunit; +using JT809.Protocol; +using JT809.Protocol.JT809Extensions; +using JT809.Protocol.JT809MessageBody; +using JT809.Protocol.JT809Exceptions; +using JT809.Protocol.JT809SubMessageBody; +using JT809.Protocol.JT809Enums; + +namespace JT809.Protocol.Test.JT809SubMessageBody +{ + public class JT809_0x1600_0x1601Test + { + [Fact] + public void Test1() + { + JT809_0x1600_0x1601 jT809_0x1600_0x1601 = new JT809_0x1600_0x1601 + { + CarInfo = "smallchi", + }; + var hex = JT809Serializer.Serialize(jT809_0x1600_0x1601).ToHexString(); + Assert.Equal("736D616C6C636869", hex); + } + + [Fact] + public void Test2() + { + var bytes = "736D616C6C636869".ToHexBytes(); + JT809_0x1600_0x1601 jT809_0x1600_0x1601 = JT809Serializer.Deserialize(bytes); + Assert.Equal("smallchi", jT809_0x1600_0x1601.CarInfo); + } + } +}