@@ -171,12 +171,28 @@ | |||
解析结果:电量百分比5F=95 电压:0507=1287 最终显示为12.87V 01:充电中 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.JT808_GPS51_Constants.GetCurrentAssembly"> | |||
<member name="F:JT808.Protocol.Extensions.GPS51.JT808_GPS51_Constants.JT808_0x8105_0x64"> | |||
<summary> | |||
锁车 | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="F:JT808.Protocol.Extensions.GPS51.JT808_GPS51_Constants.JT808_0x8105_0x65"> | |||
<summary> | |||
解锁车 恢复油电 | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="F:JT808.Protocol.Extensions.GPS51.JT808_GPS51_Constants.JT808_0x8105_0xA0"> | |||
<summary> | |||
设防 | |||
</summary> | |||
</member> | |||
<member name="F:JT808.Protocol.Extensions.GPS51.JT808_GPS51_Constants.JT808_0x8105_0xA1"> | |||
<summary> | |||
撤防 | |||
</summary> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x2B_Ext"> | |||
<summary> | |||
多路油耗模拟量 | |||
@@ -310,6 +326,487 @@ | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54"> | |||
<summary> | |||
1+7*N | |||
Wifi数据:第1个字节wifi个数,后面为n个wifi数据;WIFI数据:6字节 wifiMac 1字节 信号强度 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.Count"> | |||
<summary> | |||
wifi个数 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.WifiInfos"> | |||
<summary> | |||
wifi信息 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x54,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.WifiInfo.SingnalStrength"> | |||
<summary> | |||
信号轻度 | |||
</summary> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55"> | |||
<summary> | |||
8 | |||
1/10千克 8 字节 载重扩展 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x55,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58"> | |||
<summary> | |||
2*N | |||
湿度,精度0.1,0fff 代表无效数据,例子数据: 0012 表示:1.8% | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.Humiditys"> | |||
<summary> | |||
湿度 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x58,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61"> | |||
<summary> | |||
电压,单位0.01V,例子报文:61021d74,解析结果7540,最终电压75.40V | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.Volage"> | |||
<summary> | |||
电压 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0x61,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1"> | |||
<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> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.MCC"> | |||
<summary> | |||
国家编码 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.MNC"> | |||
<summary> | |||
网络编码 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe1,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.BaseStation.LAC"> | |||
<summary> | |||
地区编码 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.BaseStation.CI"> | |||
<summary> | |||
蜂窝 ID | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.BaseStation.Signal"> | |||
<summary> | |||
信号强度 | |||
</summary> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2"> | |||
<summary> | |||
N | |||
版本号,开机或者重连第一条上报,例子结果:GB201-GSM-21001-1.1.1 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.Version"> | |||
<summary> | |||
版本号 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xe2,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1"> | |||
<summary> | |||
20 | |||
iccid,一般开机或者重连第一条0200位置信息上报, | |||
例子报文:f1143839383630343032313032303930393737303032,解析结果为:89860402102090977002 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.ICCID"> | |||
<summary> | |||
ICCID | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf1,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<!-- Badly formed XML comment ignored for member "T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6" --> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.IMEI"> | |||
<summary> | |||
IMEI | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xf6,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa"> | |||
<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位:人为关机 fa0400000200 第10位:低电关机 fa0400000400 第11位:设防(状态) fa0400000800 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfa,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb"> | |||
<summary> | |||
4 | |||
电量百分比和外部电压,电压精度0.01V,充电状态0未充电 1充电中,没有的数据传00 | |||
例子:fb045F050701 解析结果:电量百分比5F=95 电压:0507=1287 最终显示为12.87V 01:充电中 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.AttachInfoId"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.AttachInfoLength"> | |||
<summary> | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.PowerPercent"> | |||
<summary> | |||
电量百分比 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.Power"> | |||
<summary> | |||
电压 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.Status"> | |||
<summary> | |||
状态 | |||
</summary> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.Analyze(JT808.Protocol.MessagePack.JT808MessagePackReader@,System.Text.Json.Utf8JsonWriter,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="writer"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.Deserialize(JT808.Protocol.MessagePack.JT808MessagePackReader@,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="reader"></param> | |||
<param name="config"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb.Serialize(JT808.Protocol.MessagePack.JT808MessagePackWriter@,JT808.Protocol.Extensions.GPS51.MessageBody.JT808_0x0200_0xfb,JT808.Protocol.IJT808Config)"> | |||
<summary> | |||
</summary> | |||
<param name="writer"></param> | |||
<param name="value"></param> | |||
<param name="config"></param> | |||
</member> | |||
<member name="T:JT808.Protocol.Extensions.GPS51.Metadata.AlarmIdentificationProperty"> | |||
<summary> | |||
报警标识号 | |||
@@ -43,19 +43,19 @@ namespace JT808.Protocol.Extensions.GPS51 | |||
/// 载重扩展 8 | |||
/// 1/10千克 8 字节 | |||
/// </summary> | |||
public const uint JT808_0x0200_0x55 = 0x55; | |||
public const byte JT808_0x0200_0x55 = 0x55; | |||
/// <summary> | |||
/// 湿度, | |||
/// 2*N | |||
/// 精度0.1,0fff 代表无效数据,例子数据: 0012 表示:1.8% | |||
/// </summary> | |||
public const uint JT808_0x0200_0x58 = 0x58; | |||
public const byte JT808_0x0200_0x58 = 0x58; | |||
/// <summary> | |||
/// 电压, | |||
/// 2 | |||
/// 单位0.01V,例子报文:61021d74,解析结果7540,最终电压75.40V | |||
/// </summary> | |||
public const uint JT808_0x0200_0x61 = 0x61; | |||
public const byte JT808_0x0200_0x61 = 0x61; | |||
/// <summary> | |||
/// 基站编码 | |||
/// 4+7*N | |||
@@ -65,7 +65,7 @@ namespace JT808.Protocol.Extensions.GPS51 | |||
/// 信号强度 1字节, | |||
/// 单基站可以不用信号强度 1cc-0-696a-863a8d0-0 | |||
/// </summary> | |||
public const uint JT808_0x0200_0xe1 = 0xe1; | |||
public const byte JT808_0x0200_0xe1 = 0xe1; | |||
/// <summary> | |||
/// 版本号, | |||
/// N | |||
@@ -110,9 +110,23 @@ namespace JT808.Protocol.Extensions.GPS51 | |||
/// </summary> | |||
public const byte JT808_0x0200_0xfb = 0xfb; | |||
/// <summary> | |||
/// | |||
/// 锁车 | |||
/// </summary> | |||
/// <returns></returns> | |||
public const byte JT808_0x8105_0x64 = 0x64; | |||
/// <summary> | |||
/// 解锁车 恢复油电 | |||
/// </summary> | |||
/// <returns></returns> | |||
public const byte JT808_0x8105_0x65= 0x65; | |||
/// <summary> | |||
/// 设防 | |||
/// </summary> | |||
public const byte JT808_0x8105_0xA0 = 0xA0; | |||
/// <summary> | |||
/// 撤防 | |||
/// </summary> | |||
public const byte JT808_0x8105_0xA1 = 0xA1; | |||
public static Assembly GetCurrentAssembly() | |||
{ | |||
return Assembly.GetExecutingAssembly(); | |||
@@ -0,0 +1,103 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Reflection.Emit; | |||
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> | |||
/// 1+7*N | |||
/// Wifi数据:第1个字节wifi个数,后面为n个wifi数据;WIFI数据:6字节 wifiMac 1字节 信号强度 | |||
/// </summary> | |||
public class JT808_0x0200_0x54 : JT808MessagePackFormatter<JT808_0x0200_0x54>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x54; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// wifi个数 | |||
/// </summary> | |||
public byte Count { get; set; } | |||
/// <summary> | |||
/// wifi信息 | |||
/// </summary> | |||
public List<WifiInfo> WifiInfos { 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_0x54 value = new JT808_0x0200_0x54(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
value.Count = reader.ReadByte(); | |||
for (int i = 0; i < value.Count; i++) | |||
{ | |||
// writer.WriteString($"[{value.Direction.ReadNumber()}]正反转", "未知"); | |||
} | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0x54 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0x54 value = new JT808_0x0200_0x54(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.Count = reader.ReadByte(); | |||
for (int i = 0; i < value.Count; i++) | |||
{ | |||
// | |||
} | |||
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_0x54 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.WriteByte(1); | |||
writer.WriteByte((byte)value.WifiInfos.Count); | |||
foreach (var wifi in value.WifiInfos) | |||
{ | |||
} | |||
} | |||
} | |||
public class WifiInfo { | |||
/// <summary> | |||
/// 信号轻度 | |||
/// </summary> | |||
public byte SingnalStrength { get; set; } | |||
} | |||
} |
@@ -0,0 +1,69 @@ | |||
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> | |||
/// 8 | |||
/// 1/10千克 8 字节 载重扩展 | |||
/// </summary> | |||
public class JT808_0x0200_0x55 : JT808MessagePackFormatter<JT808_0x0200_0x55>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x55; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { 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_0x55 value = new JT808_0x0200_0x55(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0x55 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0x55 value = new JT808_0x0200_0x55(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
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_0x55 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.WriteByte(1); | |||
} | |||
} | |||
} |
@@ -0,0 +1,92 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Runtime.ConstrainedExecution; | |||
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> | |||
/// 2*N | |||
/// 湿度,精度0.1,0fff 代表无效数据,例子数据: 0012 表示:1.8% | |||
/// </summary> | |||
public class JT808_0x0200_0x58 : JT808MessagePackFormatter<JT808_0x0200_0x58>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x58; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// 湿度 | |||
/// </summary> | |||
public List<ushort> Humiditys { 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_0x58 value = new JT808_0x0200_0x58(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
writer.WriteNumber($"[{reader.ReadContent(value.AttachInfoLength).ToArray().ToHexString()}]湿度列表", value.AttachInfoLength / 2); | |||
writer.WriteStartArray(); | |||
while (reader.ReadCurrentRemainContentLength() > 0) { | |||
writer.WriteNumber($"[{reader.ReadUInt16().ReadNumber()}]附加信息长度", reader.ReadUInt16()); | |||
} | |||
writer.WriteStartArray(); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0x58 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0x58 value = new JT808_0x0200_0x58(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.Humiditys = new List<ushort>(); | |||
while (reader.ReadCurrentRemainContentLength() > 0) | |||
{ | |||
value.Humiditys.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_0x58 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.Skip(1,out int position); | |||
foreach (var humidity in value.Humiditys) | |||
{ | |||
writer.WriteUInt16(humidity); | |||
} | |||
int length = writer.GetCurrentPosition() - position - 1; | |||
writer.WriteByteReturn((byte)length, position); | |||
} | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
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> | |||
/// 电压,单位0.01V,例子报文:61021d74,解析结果7540,最终电压75.40V | |||
/// </summary> | |||
public class JT808_0x0200_0x61 : JT808MessagePackFormatter<JT808_0x0200_0x61>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0x61; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// 电压 | |||
/// </summary> | |||
public ushort Volage { 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_0x61 value = new JT808_0x0200_0x61(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
value.Volage = reader.ReadUInt16(); | |||
writer.WriteNumber($"[{value.Volage.ReadNumber()}]电压", value.Volage); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0x61 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0x61 value = new JT808_0x0200_0x61(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.Volage = 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_0x61 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.WriteByte(1); | |||
writer.WriteUInt16(value.Volage); | |||
} | |||
} | |||
} |
@@ -0,0 +1,139 @@ | |||
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> | |||
/// 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 class JT808_0x0200_0xe1 : JT808MessagePackFormatter<JT808_0x0200_0xe1>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xe1; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// 国家编码 | |||
/// </summary> | |||
public ushort MCC { get; set; } | |||
/// <summary> | |||
/// 网络编码 | |||
/// </summary> | |||
public ushort MNC { get; set; } | |||
public List<BaseStation> BaseStations { 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_0xe1 value = new JT808_0x0200_0xe1(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
value.MCC = reader.ReadUInt16(); | |||
writer.WriteNumber($"[{value.MCC.ReadNumber()}]国家编码", value.MCC); | |||
value.MNC=reader.ReadUInt16(); | |||
writer.WriteNumber($"[{value.MNC.ReadNumber()}]网络编码", value.MNC); | |||
writer.WriteStartArray("地区编码列表"); | |||
while (reader.ReadCurrentRemainContentLength() > 0) | |||
{ | |||
var LAC = reader.ReadUInt16(); | |||
writer.WriteNumber($"[{LAC.ReadNumber()}]地区编码", LAC); | |||
var CI = reader.ReadUInt32(); | |||
writer.WriteNumber($"[{CI.ReadNumber()}]蜂窝 ID", CI); | |||
if (reader.ReadCurrentRemainContentLength() > 0) | |||
{ | |||
var Signal = reader.ReadByte(); | |||
writer.WriteNumber($"[{Signal.ReadNumber()}]信号强度", Signal); | |||
} | |||
} | |||
writer.WriteEndArray(); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xe1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xe1 value = new JT808_0x0200_0xe1(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
if (value.AttachInfoLength > 0) { | |||
value.MCC = reader.ReadUInt16(); | |||
value.MNC = reader.ReadUInt16(); | |||
value.BaseStations = new List<BaseStation>(); | |||
while (reader.ReadCurrentRemainContentLength()> 0) | |||
{ | |||
BaseStation baseStation = new BaseStation(); | |||
baseStation.LAC = reader.ReadUInt16(); | |||
baseStation.CI = reader.ReadUInt32(); | |||
if (reader.ReadCurrentRemainContentLength() > 0) { | |||
baseStation.Signal=reader.ReadByte(); | |||
} | |||
value.BaseStations.Add(baseStation); | |||
} | |||
} | |||
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_0xe1 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.Skip(1,out int position); | |||
writer.WriteUInt16(value.MCC); | |||
writer.WriteUInt16(value.MNC); | |||
foreach (var baseStation in value.BaseStations) | |||
{ | |||
writer.WriteUInt16(baseStation.LAC); | |||
writer.WriteUInt32(baseStation.CI); | |||
if (value.BaseStations.Count >1) { | |||
writer.WriteByte(baseStation.Signal); | |||
} | |||
} | |||
var length = writer.GetCurrentPosition() - position - 1; | |||
writer.WriteByteReturn((byte)length, position); | |||
} | |||
} | |||
public class BaseStation() { | |||
/// <summary> | |||
/// 地区编码 | |||
/// </summary> | |||
public ushort LAC { get; set; } | |||
/// <summary> | |||
/// 蜂窝 ID | |||
/// </summary> | |||
public uint CI { get; set; } | |||
/// <summary> | |||
/// 信号强度 | |||
/// </summary> | |||
public byte Signal { get; set; } | |||
} | |||
} |
@@ -0,0 +1,78 @@ | |||
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> | |||
/// N | |||
/// 版本号,开机或者重连第一条上报,例子结果:GB201-GSM-21001-1.1.1 | |||
/// </summary> | |||
public class JT808_0x0200_0xe2 : JT808MessagePackFormatter<JT808_0x0200_0xe2>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xe2; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// 版本号 | |||
/// </summary> | |||
public string Version { 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_0xe2 value = new JT808_0x0200_0xe2(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
var version = reader.ReadVirtualArray(value.AttachInfoLength); | |||
writer.WriteString($"[{version.ToArray().ToHexString()}]版本号", reader.ReadRemainStringContent()); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xe2 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xe2 value = new JT808_0x0200_0xe2(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.Version = reader.ReadRemainStringContent(); | |||
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_0xe2 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.Skip(1,out int position); | |||
writer.WriteString(value.Version); | |||
var length = writer.GetCurrentPosition() - position - 1; | |||
writer.WriteByteReturn((byte)length, position); | |||
} | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
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> | |||
/// 20 | |||
/// iccid,一般开机或者重连第一条0200位置信息上报, | |||
/// 例子报文:f1143839383630343032313032303930393737303032,解析结果为:89860402102090977002 | |||
/// </summary> | |||
public class JT808_0x0200_0xf1 : JT808MessagePackFormatter<JT808_0x0200_0xf1>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xf1; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// ICCID | |||
/// </summary> | |||
public string ICCID { 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_0xf1 value = new JT808_0x0200_0xf1(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
var iccid = reader.ReadVirtualArray(value.AttachInfoLength); | |||
writer.WriteString($"[{iccid.ToArray().ToHexString()}]ICCID", reader.ReadRemainStringContent()); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xf1 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xf1 value = new JT808_0x0200_0xf1(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.ICCID = reader.ReadRemainStringContent(); | |||
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_0xf1 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.Skip(1,out int position); | |||
writer.WriteString(value.ICCID); | |||
var length = writer.GetCurrentPosition() - position - 1; | |||
writer.WriteByteReturn((byte)length, position); | |||
} | |||
} | |||
} |
@@ -0,0 +1,78 @@ | |||
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> | |||
/// 8 | |||
//// IMEI数据:8字节,第1位为0,后面15位为imei的16进制数据 | |||
/// </summary> | |||
public class JT808_0x0200_0xf6 : JT808MessagePackFormatter<JT808_0x0200_0xf6>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xf6; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// IMEI | |||
/// </summary> | |||
public string IMEI { 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_0xf6 value = new JT808_0x0200_0xf6(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
var imei = reader.ReadVirtualArray(value.AttachInfoLength); | |||
writer.WriteString($"[{imei.ToArray().ToHexString()}]IMEI", reader.ReadRemainStringContent()); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xf6 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xf6 value = new JT808_0x0200_0xf6(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.IMEI = reader.ReadRemainStringContent(); | |||
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_0xf6 value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.Skip(1, out int position); | |||
writer.WriteString(value.IMEI); | |||
var length = writer.GetCurrentPosition() - position - 1; | |||
writer.WriteByteReturn((byte)length, position); | |||
} | |||
} | |||
} |
@@ -0,0 +1,94 @@ | |||
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> | |||
/// 4 | |||
/// 第0位:震动报警 | |||
/// 第1位:拆除报警 | |||
/// 例子:第0位:震动报警 fa0400000001 第1位:拆除报警 fa0400000002 第2位:进入深度休眠 fa0400000004 第3位:急加速 fa0400000008 | |||
/// 第4位:急减速 fa0400000010 第5位:急转弯 fa0400000020 第6位:acc开报警 fa0400000040 第7位:acc关报警 fa0400000080 | |||
/// 第8位:内部电池电量低fa0400000100 第9位:人为关机 fa0400000200 第10位:低电关机 fa0400000400 第11位:设防(状态) fa0400000800 | |||
/// </summary> | |||
public class JT808_0x0200_0xfa : JT808MessagePackFormatter<JT808_0x0200_0xfa>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xfa; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
public uint Alarm { 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_0xfa value = new JT808_0x0200_0xfa(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
value.Alarm = reader.ReadUInt32(); | |||
writer.WriteStartObject("报警信息"); | |||
var alarm = Convert.ToString(value.Alarm, 2).PadLeft(32, '0').AsSpan(); | |||
writer.WriteString("值", Convert.ToString(value.Alarm, 2).PadLeft(32, '0')); | |||
writer.WriteString("bit0-震动报警", (value.Alarm & 2^0) == 1 ? "有" : "无"); | |||
writer.WriteString("bit1-拆除报警", (value.Alarm & 2 ^ 1) == 1 ? "有" : "无"); | |||
writer.WriteString("bit2-进入深度休眠", (value.Alarm & 2 ^ 2) == 1 ? "有" : "无"); | |||
writer.WriteString("bit3-急加速", (value.Alarm & 2 ^ 3) == 1 ? "有" : "无"); | |||
writer.WriteString("bit4-急减速", (value.Alarm & 2 ^ 4) == 1 ? "有" : "无"); | |||
writer.WriteString("bit5-急转弯", (value.Alarm & 2 ^ 5) == 1 ? "有" : "无"); | |||
writer.WriteString("bit6-acc开报警", (value.Alarm & 2 ^ 6) == 1 ? "有" : "无"); | |||
writer.WriteString("bit7-acc关报警", (value.Alarm & 2 ^ 7) == 1 ? "有" : "无"); | |||
writer.WriteString("bit8-内部电池电量低", (value.Alarm & 2 ^ 8) == 1 ? "有" : "无"); | |||
writer.WriteString("bit9-人为关机", (value.Alarm & 2 ^ 8) == 1 ? "有" : "无"); | |||
writer.WriteString("bit10-低电关机", (value.Alarm & 2 ^ 10) == 1 ? "有" : "无"); | |||
writer.WriteString("bit11-设防(状态)", (value.Alarm & 2 ^ 11) == 1 ? "有" : "无"); | |||
writer.WriteString("bit12~31", "保留"); | |||
writer.WriteEndObject(); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xfa Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xfa value = new JT808_0x0200_0xfa(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.Alarm= reader.ReadUInt32(); | |||
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_0xfa value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.WriteByte(4); | |||
writer.WriteUInt32(value.Alarm); | |||
} | |||
} | |||
} |
@@ -0,0 +1,92 @@ | |||
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> | |||
/// 4 | |||
/// 电量百分比和外部电压,电压精度0.01V,充电状态0未充电 1充电中,没有的数据传00 | |||
/// 例子:fb045F050701 解析结果:电量百分比5F=95 电压:0507=1287 最终显示为12.87V 01:充电中 | |||
/// </summary> | |||
public class JT808_0x0200_0xfb : JT808MessagePackFormatter<JT808_0x0200_0xfb>, JT808_0x0200_CustomBodyBase, IJT808Analyze | |||
{ | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoId { get; set; } = JT808_GPS51_Constants.JT808_0x0200_0xfb; | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
public byte AttachInfoLength { get; set; } | |||
/// <summary> | |||
/// 电量百分比 | |||
/// </summary> | |||
public byte PowerPercent{ get; set; } | |||
/// <summary> | |||
/// 电压 | |||
/// </summary> | |||
public ushort Power { get; set; } | |||
/// <summary> | |||
/// 状态 | |||
/// </summary> | |||
public byte Status { 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_0xfb value = new JT808_0x0200_0xfb(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoId.ReadNumber()}]附加信息Id", value.AttachInfoId); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.AttachInfoLength.ReadNumber()}]附加信息长度", value.AttachInfoLength); | |||
value.PowerPercent = reader.ReadByte(); | |||
writer.WriteNumber($"[{value.PowerPercent.ReadNumber()}]电量百分比", value.PowerPercent); | |||
value.Power = reader.ReadUInt16(); | |||
writer.WriteNumber($"[{value.Power.ReadNumber()}]电压", value.Power); | |||
value.Status = reader.ReadByte(); | |||
writer.WriteString($"[{value.Status.ReadNumber()}]状态", value.Status==0?"未充电":"充电中"); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="reader"></param> | |||
/// <param name="config"></param> | |||
/// <returns></returns> | |||
public override JT808_0x0200_0xfb Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||
{ | |||
JT808_0x0200_0xfb value = new JT808_0x0200_0xfb(); | |||
value.AttachInfoId = reader.ReadByte(); | |||
value.AttachInfoLength = reader.ReadByte(); | |||
value.PowerPercent = reader.ReadByte(); | |||
value.Power = reader.ReadUInt16(); | |||
value.Status = reader.ReadByte(); | |||
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_0xfb value, IJT808Config config) | |||
{ | |||
writer.WriteByte(value.AttachInfoId); | |||
writer.WriteByte(4); | |||
writer.WriteByte(value.PowerPercent); | |||
writer.WriteUInt16(value.Power); | |||
writer.WriteByte(value.Status); | |||
} | |||
} | |||
} |