public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x0102 jT808_0X0102 = new JT808_0x0102(); if (reader.Version == JT808Version.JTT2019) { jT808_0X0102.CodeLength = reader.ReadByte(); writer.WriteNumber($"[{ jT808_0X0102.CodeLength.ReadNumber()}]鉴权码长度", jT808_0X0102.CodeLength); ReadOnlySpan <byte> codeSpan = reader.ReadVirtualArray(jT808_0X0102.CodeLength); jT808_0X0102.Code = reader.ReadString(jT808_0X0102.CodeLength); writer.WriteString($"[{codeSpan.ToArray().ToHexString()}]鉴权码", jT808_0X0102.Code); ReadOnlySpan <byte> imeiSpan = reader.ReadVirtualArray(15); jT808_0X0102.IMEI = reader.ReadString(15); writer.WriteString($"[{imeiSpan.ToArray().ToHexString()}]IMEI", jT808_0X0102.IMEI); ReadOnlySpan <byte> svSpan = reader.ReadVirtualArray(20); jT808_0X0102.SoftwareVersion = reader.ReadString(20); writer.WriteString($"[{svSpan.ToArray().ToHexString()}]软件版本号", jT808_0X0102.SoftwareVersion); } else { ReadOnlySpan <byte> codeSpan = reader.ReadVirtualArray(reader.ReadCurrentRemainContentLength()); jT808_0X0102.Code = reader.ReadRemainStringContent(); writer.WriteString($"[{codeSpan.ToArray().ToHexString()}]鉴权码", jT808_0X0102.Code); } }
public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x8108 value = new JT808_0x8108(); value.UpgradeType = (JT808UpgradeType)reader.ReadByte(); writer.WriteNumber($"[{ ((byte)value.UpgradeType).ReadNumber()}]升级类型-{value.UpgradeType.ToString()}", (byte)value.UpgradeType); if (reader.Version == JT808Version.JTT2019) { var makerIdBuffer = reader.ReadVirtualArray(11).ToArray(); value.MakerId = reader.ReadString(11); writer.WriteString($"[{makerIdBuffer.ToHexString()}]制造商ID", value.MakerId); } else { var makerIdBuffer = reader.ReadVirtualArray(5).ToArray(); value.MakerId = reader.ReadString(5); writer.WriteString($"[{makerIdBuffer.ToHexString()}]制造商ID", value.MakerId); } value.VersionNumLength = reader.ReadByte(); writer.WriteNumber($"[{value.VersionNumLength.ReadNumber()}]版本号长度", value.VersionNumLength); var versionNumBuffer = reader.ReadVirtualArray(value.VersionNumLength).ToArray(); value.VersionNum = reader.ReadString(value.VersionNumLength); writer.WriteString($"[{versionNumBuffer.ToHexString()}]版本号", value.VersionNum); value.UpgradePackageLength = reader.ReadInt32(); writer.WriteNumber($"[{value.UpgradePackageLength.ReadNumber()}]升级数据包长度", value.UpgradePackageLength); value.UpgradePackage = reader.ReadArray(value.UpgradePackageLength).ToArray(); writer.WriteString($"升级数据包", value.UpgradePackage.ToHexString()); }
public JT808_0x8302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8302 jT808_0X8302 = new JT808_0x8302(); jT808_0X8302.Flag = reader.ReadByte(); jT808_0X8302.IssueContentLength = reader.ReadByte(); jT808_0X8302.Issue = reader.ReadString(jT808_0X8302.IssueContentLength); jT808_0X8302.Answers = new List <JT808_0x8302.Answer>(); while (reader.ReadCurrentRemainContentLength() > 0) { try { JT808_0x8302.Answer answer = new JT808_0x8302.Answer(); answer.Id = reader.ReadByte(); answer.ContentLength = reader.ReadUInt16(); answer.Content = reader.ReadString(answer.ContentLength); jT808_0X8302.Answers.Add(answer); } catch (Exception ex) { break; } } return(jT808_0X8302); }
/// <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_0x8401 value = new JT808_0x8401(); value.SettingTelephoneBook = (JT808SettingTelephoneBook)reader.ReadByte(); writer.WriteNumber($"[{((byte)value.SettingTelephoneBook).ReadNumber()}]设置类型", (byte)value.SettingTelephoneBook); value.ContactCount = reader.ReadByte(); writer.WriteNumber($"[{value.ContactCount.ReadNumber()}]联系人总数", value.ContactCount); writer.WriteStartArray("联系人项"); for (var i = 0; i < value.ContactCount; i++) { writer.WriteStartObject(); JT808ContactProperty jT808ContactProperty = new JT808ContactProperty(); jT808ContactProperty.TelephoneBookContactType = (JT808TelephoneBookContactType)reader.ReadByte(); writer.WriteNumber($"[{((byte)jT808ContactProperty.TelephoneBookContactType).ReadNumber()}]{jT808ContactProperty.TelephoneBookContactType.ToString()}", (byte)jT808ContactProperty.TelephoneBookContactType); jT808ContactProperty.PhoneNumberLength = reader.ReadByte(); writer.WriteNumber($"[{jT808ContactProperty.PhoneNumberLength.ReadNumber()}]号码长度", jT808ContactProperty.PhoneNumberLength); var pnoBuffer = reader.ReadVirtualArray(jT808ContactProperty.PhoneNumberLength); jT808ContactProperty.PhoneNumber = reader.ReadString(jT808ContactProperty.PhoneNumberLength); writer.WriteString($"[{pnoBuffer.ToArray().ToHexString()}]电话号码", jT808ContactProperty.PhoneNumber); jT808ContactProperty.ContactLength = reader.ReadByte(); writer.WriteNumber($"[{jT808ContactProperty.ContactLength.ReadNumber()}]联系人长度", jT808ContactProperty.ContactLength); var contactBuffer = reader.ReadVirtualArray(jT808ContactProperty.ContactLength); jT808ContactProperty.Contact = reader.ReadString(jT808ContactProperty.ContactLength); writer.WriteString($"[{contactBuffer.ToArray().ToHexString()}]联系人", jT808ContactProperty.Contact); writer.WriteEndObject(); } writer.WriteEndArray(); }
public JT808_0x1210 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x1210 value = new JT808_0x1210(); value.MakerID = reader.ReadString(7); value.AlarmIdentification = new AlarmIdentificationProperty { TerminalID = reader.ReadString(7), Time = reader.ReadDateTime6(), SN = reader.ReadByte(), AttachCount = reader.ReadByte(), Retain = reader.ReadByte() }; value.AlarmId = reader.ReadString(32); value.InfoType = reader.ReadByte(); value.AttachCount = reader.ReadByte(); if (value.AttachCount > 0) { value.AttachInfos = new List <AttachProperty>(); for (int i = 0; i < value.AttachCount; i++) { AttachProperty attachProperty = new AttachProperty(); attachProperty.FileNameLength = reader.ReadByte(); attachProperty.FileName = reader.ReadString(attachProperty.FileNameLength); attachProperty.FileSize = reader.ReadUInt32(); value.AttachInfos.Add(attachProperty); } } return(value); }
public JT808_0x0702 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0702 value = new JT808_0x0702(); value.IC_Card_Status = (JT808ICCardStatus)reader.ReadByte(); value.IC_Card_PlugDateTime = reader.ReadDateTime6(); if (value.IC_Card_Status == JT808ICCardStatus.从业资格证IC卡插入_驾驶员上班) { value.IC_Card_ReadResult = (JT808ICCardReadResult)reader.ReadByte(); if (value.IC_Card_ReadResult == JT808ICCardReadResult.IC卡读卡成功) { value.DriverUserNameLength = reader.ReadByte(); value.DriverUserName = reader.ReadString(value.DriverUserNameLength); value.QualificationCode = reader.ReadString(20); value.LicenseIssuingLength = reader.ReadByte(); value.LicenseIssuing = reader.ReadString(value.LicenseIssuingLength); value.CertificateExpiresDate = reader.ReadDateTime4(); if (reader.Version == JT808Version.JTT2019) { value.DriverIdentityCard = reader.ReadString(20); } } } return(value); }
/// <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_0x8302 value = new JT808_0x8302(); value.Flag = reader.ReadByte(); writer.WriteNumber($"[{value.Flag.ReadNumber()}]标志", value.Flag); value.IssueContentLength = reader.ReadByte(); writer.WriteNumber($"[{value.IssueContentLength.ReadNumber()}]问题内容长度", value.IssueContentLength); var issueBuffer = reader.ReadVirtualArray(value.IssueContentLength).ToArray(); value.Issue = reader.ReadString(value.IssueContentLength); writer.WriteString($"[{issueBuffer.ToHexString()}]问题文本", value.Issue); writer.WriteStartArray("候选答案列表"); while (reader.ReadCurrentRemainContentLength() > 0) { writer.WriteStartObject(); JT808_0x8302.Answer answer = new JT808_0x8302.Answer(); answer.Id = reader.ReadByte(); writer.WriteNumber($"[{answer.Id.ReadNumber()}]答案ID", answer.Id); answer.ContentLength = reader.ReadUInt16(); writer.WriteNumber($"[{answer.ContentLength.ReadNumber()}]答案内容长度", answer.ContentLength); var answerBuffer = reader.ReadVirtualArray(answer.ContentLength).ToArray(); answer.Content = reader.ReadString(answer.ContentLength); writer.WriteString($"[{answerBuffer.ToHexString()}]答案内容", answer.Content); writer.WriteEndObject(); } writer.WriteEndArray(); }
/// <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_0x9208 value = new JT808_0x9208(); value.AttachmentServerIPLength = reader.ReadByte(); writer.WriteNumber($"[{value.AttachmentServerIPLength.ReadNumber()}]服务IP地址长度", value.AttachmentServerIPLength); string attachmentServerIPHex = reader.ReadVirtualArray(value.AttachmentServerIPLength).ToArray().ToHexString(); value.AttachmentServerIP = reader.ReadString(value.AttachmentServerIPLength); writer.WriteString($"[{AttachmentServerIP}]服务IP地址", value.AttachmentServerIP); value.AttachmentServerIPTcpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.AttachmentServerIPTcpPort.ReadNumber()}]TCP端口", value.AttachmentServerIPTcpPort); value.AttachmentServerIPUdpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.AttachmentServerIPUdpPort.ReadNumber()}]UDP端口", value.AttachmentServerIPUdpPort); value.AlarmIdentification = new AlarmIdentificationProperty(); string terminalIDHex = reader.ReadVirtualArray(7).ToArray().ToHexString(); value.AlarmIdentification.TerminalID = reader.ReadString(7); value.AlarmIdentification.Time = reader.ReadDateTime_yyMMddHHmmss(); value.AlarmIdentification.SN = reader.ReadByte(); value.AlarmIdentification.AttachCount = reader.ReadByte(); value.AlarmIdentification.Retain = reader.ReadByte(); writer.WriteString($"[{terminalIDHex}]终端ID", value.AlarmIdentification.TerminalID); writer.WriteString($"[{value.AlarmIdentification.Time.ToString("yyMMddHHmmss")}]日期时间", value.AlarmIdentification.Time.ToString("yyyy-MM-dd HH:mm:ss")); writer.WriteNumber($"[{value.AlarmIdentification.SN.ReadNumber()}]序号", value.AlarmIdentification.SN); writer.WriteNumber($"[{value.AlarmIdentification.AttachCount.ReadNumber()}]附件数量", value.AlarmIdentification.AttachCount); writer.WriteNumber($"[{value.AlarmIdentification.Retain.ReadNumber()}]预留", value.AlarmIdentification.Retain); string alarmIdHex = reader.ReadVirtualArray(32).ToArray().ToHexString(); value.AlarmId = reader.ReadString(32); writer.WriteString($"[{alarmIdHex}]平台给报警分配的唯一编号", value.AlarmId); string retainHex = reader.ReadVirtualArray(16).ToArray().ToHexString(); writer.WriteString($"预留", retainHex); }
public JT808_CarDVR_Up_0x05 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x05 value = new JT808_CarDVR_Up_0x05(); value.Vin = reader.ReadASCII(17); value.VehicleNo = reader.ReadString(12); value.VehicleType = reader.ReadString(10); return(value); }
/// <summary> /// /// </summary> /// <param name="reader"></param> /// <param name="config"></param> /// <returns></returns> public JT808_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0100 jT808_0X0100 = new JT808_0x0100(); jT808_0X0100.AreaID = reader.ReadUInt16(); jT808_0X0100.CityOrCountyId = reader.ReadUInt16(); if (reader.Version == JT808Version.JTT2019) { jT808_0X0100.MakerId = reader.ReadString(11); jT808_0X0100.TerminalModel = reader.ReadString(30); jT808_0X0100.TerminalId = reader.ReadString(30); } else if (reader.Version == JT808Version.JTT2013) { if (reader.ReadCurrentRemainContentLength() > 33) { jT808_0X0100.MakerId = reader.ReadString(5); jT808_0X0100.TerminalModel = reader.ReadString(20); jT808_0X0100.TerminalId = reader.ReadString(7); } else { jT808_0X0100.MakerId = reader.ReadString(5); jT808_0X0100.TerminalModel = reader.ReadString(8); jT808_0X0100.TerminalId = reader.ReadString(7); } } jT808_0X0100.PlateColor = reader.ReadByte(); jT808_0X0100.PlateNo = reader.ReadRemainStringContent(); return(jT808_0X0100); }
/// <summary> /// /// </summary> /// <param name="reader"></param> /// <param name="config"></param> /// <returns></returns> public JT808_CarDVR_Up_0x07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_CarDVR_Up_0x07 value = new JT808_CarDVR_Up_0x07(); value.ProductionPlantCCCCertificationCode = reader.ReadASCII(7); value.CertifiedProductModels = reader.ReadASCII(16); value.ProductionDate = reader.ReadDateTime3(); value.ProductProductionFlowNumber = reader.ReadString(4); value.Reversed = reader.ReadString(5); return(value); }
public JT808_0x8108 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8108 jT808_0X8108 = new JT808_0x8108(); jT808_0X8108.UpgradeType = (JT808UpgradeType)reader.ReadByte(); jT808_0X8108.MakerId = reader.ReadString(5); jT808_0X8108.VersionNumLength = reader.ReadByte(); jT808_0X8108.VersionNum = reader.ReadString(jT808_0X8108.VersionNumLength); jT808_0X8108.UpgradePackageLength = reader.ReadInt32(); jT808_0X8108.UpgradePackage = reader.ReadArray(jT808_0X8108.UpgradePackageLength).ToArray(); return(jT808_0X8108); }
public JT808_0x8302 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8302 jT808_0X8302 = new JT808_0x8302(); jT808_0X8302.Flag = reader.ReadByte(); jT808_0X8302.IssueContentLength = reader.ReadByte(); jT808_0X8302.Issue = reader.ReadString(jT808_0X8302.IssueContentLength); jT808_0X8302.AnswerId = reader.ReadByte(); jT808_0X8302.AnswerContentLength = reader.ReadUInt16(); jT808_0X8302.AnswerContent = reader.ReadString(jT808_0X8302.AnswerContentLength); return(jT808_0X8302); }
public JT808_0x0100 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0100 jT808_0X0100 = new JT808_0x0100(); jT808_0X0100.AreaID = reader.ReadUInt16(); jT808_0X0100.CityOrCountyId = reader.ReadUInt16(); jT808_0X0100.MakerId = reader.ReadString(5); jT808_0X0100.TerminalModel = reader.ReadString(20); jT808_0X0100.TerminalId = reader.ReadString(7); jT808_0X0100.PlateColor = reader.ReadByte(); jT808_0X0100.PlateNo = reader.ReadRemainStringContent(); return(jT808_0X0100); }
public JT808_0x9208 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x9208 jT808_0X9208 = new JT808_0x9208(); jT808_0X9208.AttachmentServerIPLength = reader.ReadByte(); jT808_0X9208.AttachmentServerIP = reader.ReadString(jT808_0X9208.AttachmentServerIPLength); jT808_0X9208.AttachmentServerIPTcpPort = reader.ReadUInt16(); jT808_0X9208.AttachmentServerIPUdpPort = reader.ReadUInt16(); jT808_0X9208.AlarmIdentification = JT808_AlarmIdentificationProperty_Formatter.Instance.Deserialize(ref reader, config); jT808_0X9208.AlarmId = reader.ReadString(32); jT808_0X9208.Retain = reader.ReadArray(16).ToArray(); return(jT808_0X9208); }
/// <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_CarDVR_Down_0x84 value = new JT808_CarDVR_Down_0x84(); value.RealTime = reader.ReadDateTime6(); writer.WriteString($"[{value.RealTime:yyMMddHHmmss}]实时时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss")); value.SignalOperate = reader.ReadByte(); writer.WriteNumber($"[{value.SignalOperate.ReadNumber()}]信号个数", value.SignalOperate); var display = reader.ReadVirtualArray(10); value.D0 = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]D0", value.D0); display = reader.ReadVirtualArray(10); value.D1 = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]D1", value.D1); display = reader.ReadVirtualArray(10); value.D2 = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]D2", value.D2); display = reader.ReadVirtualArray(10); value.NearLight = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]近光灯", value.NearLight); display = reader.ReadVirtualArray(10); value.FarLight = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]远光灯", value.FarLight); display = reader.ReadVirtualArray(10); value.RightTurn = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]右转向", value.RightTurn); display = reader.ReadVirtualArray(10); value.LeftTurn = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]左转向", value.LeftTurn); display = reader.ReadVirtualArray(10); value.Brake = reader.ReadString(10); writer.WriteString($"[{display.ToArray().ToHexString()}]制动", value.Brake); }
/// <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_CarDVR_Up_0x05 value = new JT808_CarDVR_Up_0x05(); var hex = reader.ReadVirtualArray(17); value.Vin = reader.ReadASCII(17); writer.WriteString($"[{hex.ToArray().ToHexString()}]车辆识别代号", value.Vin); hex = reader.ReadVirtualArray(12); value.VehicleNo = reader.ReadString(12); writer.WriteString($"[{hex.ToArray().ToHexString()}]机动车号牌号码", value.VehicleNo); hex = reader.ReadVirtualArray(12); value.VehicleType = reader.ReadString(12); writer.WriteString($"[{hex.ToArray().ToHexString()}]机动车号牌分类", value.VehicleType); }
/// <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_0x0100 jT808_0X0100 = new JT808_0x0100(); jT808_0X0100.AreaID = reader.ReadUInt16(); writer.WriteNumber($"[{jT808_0X0100.AreaID.ReadNumber()}]省域ID", jT808_0X0100.AreaID); jT808_0X0100.CityOrCountyId = reader.ReadUInt16(); writer.WriteNumber($"[{jT808_0X0100.CityOrCountyId.ReadNumber()}]市县域ID", jT808_0X0100.CityOrCountyId); if (reader.Version == JT808Version.JTT2019) { ReadOnlySpan <byte> midSpan = reader.ReadVirtualArray(11); jT808_0X0100.MakerId = reader.ReadString(11); writer.WriteString($"[{midSpan.ToArray().ToHexString()}]制造商ID(11)", jT808_0X0100.MakerId); ReadOnlySpan <byte> tmSpan = reader.ReadVirtualArray(30); jT808_0X0100.TerminalModel = reader.ReadString(30); writer.WriteString($"[{tmSpan.ToArray().ToHexString()}]终端型号(30)", jT808_0X0100.TerminalModel); ReadOnlySpan <byte> tidSpan = reader.ReadVirtualArray(30); jT808_0X0100.TerminalId = reader.ReadString(30); writer.WriteString($"[{tidSpan.ToArray().ToHexString()}]终端ID(30)", jT808_0X0100.TerminalId); } else if (reader.Version == JT808Version.JTT2013) { var length = reader.ReadCurrentRemainContentLength(); if (length > 33) { ReadOnlySpan <byte> midSpan = reader.ReadVirtualArray(5); jT808_0X0100.MakerId = reader.ReadString(5); writer.WriteString($"[{midSpan.ToArray().ToHexString()}]制造商ID(5)", jT808_0X0100.MakerId); ReadOnlySpan <byte> tmSpan = reader.ReadVirtualArray(20); jT808_0X0100.TerminalModel = reader.ReadString(20); writer.WriteString($"[{tmSpan.ToArray().ToHexString()}]终端型号(20)", jT808_0X0100.TerminalModel); ReadOnlySpan <byte> tidSpan = reader.ReadVirtualArray(7); jT808_0X0100.TerminalId = reader.ReadString(7); writer.WriteString($"[{tidSpan.ToArray().ToHexString()}]终端ID(7)", jT808_0X0100.TerminalId); } else { ReadOnlySpan <byte> midSpan = reader.ReadVirtualArray(5); jT808_0X0100.MakerId = reader.ReadString(5); writer.WriteString($"[{midSpan.ToArray().ToHexString()}]制造商ID(5)", jT808_0X0100.MakerId); ReadOnlySpan <byte> tmSpan = reader.ReadVirtualArray(8); jT808_0X0100.TerminalModel = reader.ReadString(8); writer.WriteString($"[{tmSpan.ToArray().ToHexString()}]终端型号(8)", jT808_0X0100.TerminalModel); ReadOnlySpan <byte> tidSpan = reader.ReadVirtualArray(7); jT808_0X0100.TerminalId = reader.ReadString(7); writer.WriteString($"[{tidSpan.ToArray().ToHexString()}]终端ID(7)", jT808_0X0100.TerminalId); } } jT808_0X0100.PlateColor = reader.ReadByte(); writer.WriteNumber($"[{jT808_0X0100.PlateColor.ReadNumber()}]车牌颜色", jT808_0X0100.PlateColor); ReadOnlySpan <byte> vnoSpan = reader.ReadVirtualArray(reader.ReadCurrentRemainContentLength()); jT808_0X0100.PlateNo = reader.ReadRemainStringContent(); writer.WriteString($"[{vnoSpan.ToArray().ToHexString()}]车牌号码", jT808_0X0100.PlateNo); }
/// <summary> /// /// </summary> /// <param name="reader"></param> /// <param name="config"></param> /// <returns></returns> public JT808_0x0107 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0107 jT808_0X0107 = new JT808_0x0107(); jT808_0X0107.TerminalType = reader.ReadUInt16(); if (reader.Version == JT808Version.JTT2019) { jT808_0X0107.MakerId = reader.ReadString(11); jT808_0X0107.TerminalModel = reader.ReadString(30); jT808_0X0107.TerminalId = reader.ReadString(30); } else { jT808_0X0107.MakerId = reader.ReadString(5); jT808_0X0107.TerminalModel = reader.ReadString(20); jT808_0X0107.TerminalId = reader.ReadString(7); } jT808_0X0107.Terminal_SIM_ICCID = reader.ReadBCD(20, config.Trim); jT808_0X0107.Terminal_Hardware_Version_Length = reader.ReadByte(); jT808_0X0107.Terminal_Hardware_Version_Num = reader.ReadString(jT808_0X0107.Terminal_Hardware_Version_Length); jT808_0X0107.Terminal_Firmware_Version_Length = reader.ReadByte(); jT808_0X0107.Terminal_Firmware_Version_Num = reader.ReadString(jT808_0X0107.Terminal_Firmware_Version_Length); jT808_0X0107.GNSSModule = reader.ReadByte(); jT808_0X0107.CommunicationModule = reader.ReadByte(); return(jT808_0X0107); }
/// <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_CarDVR_Up_0x06 value = new JT808_CarDVR_Up_0x06(); var hex = reader.ReadVirtualArray(6); value.RealTime = reader.ReadDateTime6(); writer.WriteString($"[{hex.ToArray().ToHexString()}]实时时间", value.RealTime); value.SignalOperate = reader.ReadByte(); writer.WriteNumber($"[{value.SignalOperate.ReadNumber()}]信号个数", value.SignalOperate); hex = reader.ReadVirtualArray(10); value.D0 = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]D0", value.D0); hex = reader.ReadVirtualArray(10); value.D1 = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]D1", value.D1); hex = reader.ReadVirtualArray(10); value.D2 = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]D2", value.D2); hex = reader.ReadVirtualArray(10); value.NearLight = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]近光灯", value.NearLight); hex = reader.ReadVirtualArray(10); value.FarLight = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]远光灯", value.FarLight); hex = reader.ReadVirtualArray(10); value.RightTurn = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]右转向", value.RightTurn); hex = reader.ReadVirtualArray(10); value.LeftTurn = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]左转向", value.LeftTurn); hex = reader.ReadVirtualArray(10); value.Brake = reader.ReadString(10); writer.WriteString($"[{hex.ToArray().ToHexString()}]制动", value.Brake); }
/// <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_0x1210 value = new JT808_0x1210(); string makerIdHex = reader.ReadVirtualArray(30).ToArray().ToHexString(); value.TerminalId = reader.ReadString(30); writer.WriteString($"[{makerIdHex}]终端ID", value.TerminalId); value.AlarmIdentification = new AlarmIdentificationProperty(); string terminalIdHex = reader.ReadVirtualArray(30).ToArray().ToHexString(); value.AlarmIdentification.TerminalId = reader.ReadString(30); value.AlarmIdentification.Time = reader.ReadDateTime_yyMMddHHmmss(); value.AlarmIdentification.SN = reader.ReadByte(); value.AlarmIdentification.AttachCount = reader.ReadByte(); value.AlarmIdentification.Retain1 = reader.ReadByte(); value.AlarmIdentification.Retain2 = reader.ReadByte(); writer.WriteString($"[{terminalIdHex}]终端ID", value.AlarmIdentification.TerminalId); writer.WriteString($"[{value.AlarmIdentification.Time.ToString("yyMMddHHmmss")}]日期时间", value.AlarmIdentification.Time.ToString("yyyy-MM-dd HH:mm:ss")); writer.WriteNumber($"[{value.AlarmIdentification.SN.ReadNumber()}]序号", value.AlarmIdentification.SN); writer.WriteNumber($"[{value.AlarmIdentification.AttachCount.ReadNumber()}]附件数量", value.AlarmIdentification.AttachCount); writer.WriteNumber($"[{value.AlarmIdentification.Retain1.ReadNumber()}]预留1", value.AlarmIdentification.Retain1); writer.WriteNumber($"[{value.AlarmIdentification.Retain2.ReadNumber()}]预留2", value.AlarmIdentification.Retain2); string alarmIdHex = reader.ReadVirtualArray(32).ToArray().ToHexString(); value.AlarmId = reader.ReadString(32); writer.WriteString($"[{alarmIdHex}]平台给报警分配的唯一编号", value.AlarmId); value.InfoType = reader.ReadByte(); writer.WriteNumber($"[{value.InfoType.ReadNumber()}]信息类型", value.InfoType); value.AttachCount = reader.ReadByte(); writer.WriteNumber($"[{value.AttachCount.ReadNumber()}]附件数量", value.AttachCount); if (value.AttachCount > 0) { writer.WriteStartArray("附件信息列表"); for (int i = 0; i < value.AttachCount; i++) { writer.WriteStartObject(); AttachProperty attachProperty = new AttachProperty(); attachProperty.FileNameLength = reader.ReadByte(); writer.WriteNumber($"[{attachProperty.FileNameLength.ReadNumber()}]文件名称长度", attachProperty.FileNameLength); string fileNameHex = reader.ReadVirtualArray(attachProperty.FileNameLength).ToArray().ToHexString(); attachProperty.FileName = reader.ReadString(attachProperty.FileNameLength); writer.WriteString($"[{fileNameHex}]文件名称", attachProperty.FileName); attachProperty.FileSize = reader.ReadUInt32(); writer.WriteNumber($"[{ attachProperty.FileSize.ReadNumber()}]文件大小", attachProperty.FileSize); writer.WriteEndObject(); } writer.WriteEndArray(); } }
/// <summary> /// /// </summary> /// <param name="reader"></param> /// <param name="config"></param> /// <returns></returns> public JT808_0x0702 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0702 value = new JT808_0x0702(); var firstByte = reader.ReadVirtualByte(); //因2011第一个字节代表姓名长度 所以该值长度只能为 2,3,4,整个数据长度 62+m+n if (firstByte == 0x01) { value.IC_Card_Status = (JT808ICCardStatus)reader.ReadByte(); value.IC_Card_PlugDateTime = reader.ReadDateTime_yyMMddHHmmss(); if (value.IC_Card_Status == JT808ICCardStatus.从业资格证IC卡插入_驾驶员上班) { value.IC_Card_ReadResult = (JT808ICCardReadResult)reader.ReadByte(); if (value.IC_Card_ReadResult == JT808ICCardReadResult.IC卡读卡成功) { value.DriverUserNameLength = reader.ReadByte(); value.DriverUserName = reader.ReadString(value.DriverUserNameLength); value.QualificationCode = reader.ReadString(20); value.LicenseIssuingLength = reader.ReadByte(); value.LicenseIssuing = reader.ReadString(value.LicenseIssuingLength); value.CertificateExpiresDate = reader.ReadDateTime_YYYYMMDD(); if (reader.Version == JT808Version.JTT2019) { value.DriverIdentityCard = reader.ReadString(20); //兼容808-2019 补充 if (reader.ReadCurrentRemainContentLength() > 0) { value.FaceMatchValue = reader.ReadByte(); value.UID = reader.ReadString(20); } } } } } else { if (firstByte == 0x02 && reader.ReadCurrentRemainContentLength() == 7) { //如果字节是0x02且长度只有7,那么该协议就是2013或者2019 value.IC_Card_Status = (JT808ICCardStatus)reader.ReadByte(); value.IC_Card_PlugDateTime = reader.ReadDateTime_yyMMddHHmmss(); } else { value.DriverUserNameLength = reader.ReadByte(); value.DriverUserName = reader.ReadString(value.DriverUserNameLength); value.DriverIdentityCard = reader.ReadString(20); value.QualificationCode = reader.ReadString(40); value.LicenseIssuingLength = reader.ReadByte(); value.LicenseIssuing = reader.ReadString(value.LicenseIssuingLength); } } return(value); }
/// <summary> /// 格式分析 /// </summary> /// <param name="reader"></param> /// <param name="writer"></param> /// <param name="config"></param> public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { var value = new JT808_0x9101(); value.ServerIpLength = reader.ReadByte(); writer.WriteNumber($"[{value.ServerIpLength.ReadNumber()}]服务器IP地址长度", value.ServerIpLength); string ipHex = reader.ReadVirtualArray(value.ServerIpLength).ToArray().ToHexString(); value.ServerIp = reader.ReadString(value.ServerIpLength); writer.WriteString($"[{ipHex}]服务器IP地址", value.ServerIp); value.TcpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.TcpPort.ReadNumber()}]服务器视频通道监听端口号(TCP)", value.TcpPort); value.UdpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.UdpPort.ReadNumber()}]服务器视频通道监听端口号(UDP)", value.UdpPort); value.ChannelNo = reader.ReadByte(); writer.WriteString($"[{value.ChannelNo.ReadNumber()}]逻辑通道号", LogicalChannelNoDisplay(value.ChannelNo)); value.DataType = reader.ReadByte(); writer.WriteString($"[{value.DataType.ReadNumber()}]数据类型", DataTypeDisplay(value.DataType)); value.StreamType = reader.ReadByte(); writer.WriteString($"[{value.StreamType.ReadNumber()}]码流类型", value.StreamType == 0?"主码流":"子码流"); string DataTypeDisplay(byte DataType) { return(DataType switch { 0 => "音视频", 1 => "视频", 2 => "双向对讲", 3 => "监听", 4 => "中心广播", 5 => "透传", _ => "未知", }); }
public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x9212 value = new JT808_0x9212(); value.FileNameLength = reader.ReadByte(); writer.WriteNumber($"[{value.FileNameLength.ReadNumber()}]文件名称长度", value.FileNameLength); string fileNameHex = reader.ReadVirtualArray(value.FileNameLength).ToArray().ToHexString(); value.FileName = reader.ReadString(value.FileNameLength); writer.WriteString($"[{fileNameHex}]文件名称", value.FileName); value.FileType = reader.ReadByte(); writer.WriteNumber($"[{value.FileType.ReadNumber()}]文件类型", value.FileType); value.UploadResult = reader.ReadByte(); writer.WriteNumber($"[{value.UploadResult.ReadNumber()}]上传结果", value.UploadResult); value.DataPackageCount = reader.ReadByte(); writer.WriteNumber($"[{value.DataPackageCount.ReadNumber()}]补传数据包数量", value.DataPackageCount); if (value.DataPackageCount > 0) { writer.WriteStartArray("补传数据包列表"); for (int i = 0; i < value.DataPackageCount; i++) { writer.WriteStartObject(); DataPackageProperty dataPackageProperty = new DataPackageProperty(); dataPackageProperty.Offset = reader.ReadUInt32(); writer.WriteNumber($"[{dataPackageProperty.Offset.ReadNumber()}]数据偏移量", dataPackageProperty.Offset); dataPackageProperty.Length = reader.ReadUInt32(); writer.WriteNumber($"[{dataPackageProperty.Length.ReadNumber()}]数据长度", dataPackageProperty.Length); writer.WriteEndObject(); } writer.WriteEndArray(); } }
public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x65 jT808_0X0200_0X65 = new JT808_0x0200_0x65(); jT808_0X0200_0X65.AttachInfoId = reader.ReadByte(); jT808_0X0200_0X65.AttachInfoLength = reader.ReadByte(); jT808_0X0200_0X65.AlarmId = reader.ReadUInt32(); jT808_0X0200_0X65.FlagState = reader.ReadByte(); jT808_0X0200_0X65.AlarmOrEventType = reader.ReadByte(); jT808_0X0200_0X65.AlarmLevel = reader.ReadByte(); jT808_0X0200_0X65.Fatigue = reader.ReadByte(); jT808_0X0200_0X65.Retain = reader.ReadArray(4).ToArray(); jT808_0X0200_0X65.Speed = reader.ReadByte(); jT808_0X0200_0X65.Altitude = reader.ReadUInt16(); jT808_0X0200_0X65.Latitude = (int)reader.ReadUInt32(); jT808_0X0200_0X65.Longitude = (int)reader.ReadUInt32(); jT808_0X0200_0X65.AlarmTime = reader.ReadDateTime6(); jT808_0X0200_0X65.VehicleState = reader.ReadUInt16(); jT808_0X0200_0X65.AlarmIdentification = new AlarmIdentificationProperty { TerminalID = reader.ReadString(7), Time = reader.ReadDateTime6(), SN = reader.ReadByte(), AttachCount = reader.ReadByte(), Retain = reader.ReadByte() }; return(jT808_0X0200_0X65); }
/// <summary> /// /// </summary> /// <param name="reader"></param> /// <param name="config"></param> /// <returns></returns> public JT808_0x0200_0x65 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x65 value = new JT808_0x0200_0x65(); value.AttachInfoId = reader.ReadByte(); value.AttachInfoLength = reader.ReadByte(); value.AlarmId = reader.ReadUInt32(); value.FlagState = reader.ReadByte(); value.AlarmOrEventType = reader.ReadByte(); value.AlarmLevel = reader.ReadByte(); value.Fatigue = reader.ReadByte(); value.Retain = reader.ReadArray(4).ToArray(); value.Speed = reader.ReadByte(); value.Altitude = reader.ReadUInt16(); value.Latitude = (int)reader.ReadUInt32(); value.Longitude = (int)reader.ReadUInt32(); value.AlarmTime = reader.ReadDateTime_yyMMddHHmmss(); value.VehicleState = reader.ReadUInt16(); value.AlarmIdentification = new AlarmIdentificationProperty { TerminalId = reader.ReadString(30), Time = reader.ReadDateTime_yyMMddHHmmss(), SN = reader.ReadByte(), AttachCount = reader.ReadByte(), Retain1 = reader.ReadByte(), Retain2 = reader.ReadByte() }; return(value); }
public JT808_0x0200_0x64 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0200_0x64 value = new JT808_0x0200_0x64(); value.AttachInfoId = reader.ReadByte(); value.AttachInfoLength = reader.ReadByte(); value.AlarmId = reader.ReadUInt32(); value.FlagState = reader.ReadByte(); value.AlarmOrEventType = reader.ReadByte(); value.AlarmLevel = reader.ReadByte(); value.VehicleSpeed = reader.ReadByte(); value.CarOrPedestrianDistanceAhead = reader.ReadByte(); value.DeviateType = reader.ReadByte(); value.RoadSignIdentificationType = reader.ReadByte(); value.RoadSignIdentificationData = reader.ReadByte(); value.Speed = reader.ReadByte(); value.Altitude = reader.ReadUInt16(); value.Latitude = (int)reader.ReadUInt32(); value.Longitude = (int)reader.ReadUInt32(); value.AlarmTime = reader.ReadDateTime6(); value.VehicleState = reader.ReadUInt16(); value.AlarmIdentification = new AlarmIdentificationProperty { TerminalID = reader.ReadString(7), Time = reader.ReadDateTime6(), SN = reader.ReadByte(), AttachCount = reader.ReadByte(), Retain = reader.ReadByte() }; return(value); }
/// <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_0x8103_0xF366 value = new JT808_0x8103_0xF366(); value.ParamId = reader.ReadUInt32(); value.ParamLength = reader.ReadByte(); writer.WriteNumber($"[{value.ParamId.ReadNumber()}]参数ID", value.ParamId); writer.WriteNumber($"[{value.ParamLength.ReadNumber()}]参数长度", value.ParamLength); string tyreSpecificationTypeHex = reader.ReadVirtualArray(12).ToArray().ToHexString(); value.TyreSpecificationType = reader.ReadString(12); writer.WriteString($"[{tyreSpecificationTypeHex}]轮胎规格型号", value.TyreSpecificationType); value.TyrePressureUnit = reader.ReadUInt16(); writer.WriteNumber($"[{value.TyrePressureUnit.ReadNumber()}]胎压单位", value.TyrePressureUnit); value.NormalFetalPressure = reader.ReadUInt16(); writer.WriteNumber($"[{value.NormalFetalPressure.ReadNumber()}]正常胎压值", value.NormalFetalPressure); value.ThresholdUnbalancedTirePressure = reader.ReadUInt16(); writer.WriteNumber($"[{value.ThresholdUnbalancedTirePressure.ReadNumber()}]胎压不平衡门限", value.ThresholdUnbalancedTirePressure); value.SlowLeakageThreshold = reader.ReadUInt16(); writer.WriteNumber($"[{value.SlowLeakageThreshold.ReadNumber()}]慢漏气门限", value.SlowLeakageThreshold); value.LowVoltageThreshold = reader.ReadUInt16(); writer.WriteNumber($"[{value.LowVoltageThreshold.ReadNumber()}]低压阈值", value.LowVoltageThreshold); value.HighVoltageThreshold = reader.ReadUInt16(); writer.WriteNumber($"[{value.HighVoltageThreshold.ReadNumber()}]高压阈值", value.HighVoltageThreshold); value.HighTemperatureThreshold = reader.ReadUInt16(); writer.WriteNumber($"[{value.HighTemperatureThreshold.ReadNumber()}]高温阈值", value.HighTemperatureThreshold); value.VoltageThreshold = reader.ReadUInt16(); writer.WriteNumber($"[{value.VoltageThreshold.ReadNumber()}]电压阈值", value.VoltageThreshold); value.TimedReportingInterval = reader.ReadUInt16(); writer.WriteNumber($"[{value.TimedReportingInterval.ReadNumber()}]定时上报时间间隔", value.TimedReportingInterval); value.Retain = reader.ReadArray(reader.ReadCurrentRemainContentLength()).ToArray(); writer.WriteString("保留项", value.Retain.ToHexString()); }
/// <summary> /// 格式分析 /// </summary> /// <param name="reader"></param> /// <param name="writer"></param> /// <param name="config"></param> public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { var value = new JT808_0x9201(); value.ServerIpLength = reader.ReadByte(); writer.WriteNumber($"[{value.ServerIpLength.ReadNumber()}]服务器IP地址长度", value.ServerIpLength); string ipHex = reader.ReadVirtualArray(value.ServerIpLength).ToArray().ToHexString(); value.ServerIp = reader.ReadString(value.ServerIpLength); writer.WriteString($"[{ipHex}]服务器IP地址", value.ServerIp); value.TcpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.TcpPort.ReadNumber()}]服务器视频通道监听端口号(TCP)", value.TcpPort); value.UdpPort = reader.ReadUInt16(); writer.WriteNumber($"[{value.UdpPort.ReadNumber()}]服务器视频通道监听端口号(UDP)", value.UdpPort); value.ChannelNo = reader.ReadByte(); writer.WriteString($"[{value.ChannelNo.ReadNumber()}]逻辑通道号", LogicalChannelNoDisplay(value.ChannelNo)); value.MediaType = reader.ReadByte(); writer.WriteString($"[{value.MediaType.ReadNumber()}]音视频类型", AVItemTypeDisplay(value.MediaType)); value.StreamType = reader.ReadByte(); writer.WriteString($"[{value.StreamType.ReadNumber()}]码流类型", StreamTypeDisplay(value.StreamType)); value.MemoryType = reader.ReadByte(); writer.WriteString($"[{value.MemoryType.ReadNumber()}]存储器类型", MemTypeDisplay(value.MemoryType)); value.PlaybackWay = reader.ReadByte(); writer.WriteString($"[{value.PlaybackWay.ReadNumber()}]回访方式", PlayBackWayDisplay(value.PlaybackWay)); value.PlaySpeed = reader.ReadByte(); writer.WriteString($"[{value.PlaySpeed.ReadNumber()}]快进或快退倍数", FastForwardOrFastRewindMultiplesDisplay(value.PlaySpeed)); value.BeginTime = reader.ReadDateTime_yyMMddHHmmss(); writer.WriteString($"[{value.BeginTime:yyMMddHHmmss}]起始时间", value.BeginTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime_yyMMddHHmmss(); writer.WriteString($"[{value.EndTime:yyMMddHHmmss}]结束时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss"));
/// <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_0x9206 value = new JT808_0x9206(); value.ServerIpLength = reader.ReadByte(); writer.WriteNumber($"[{value.ServerIpLength.ReadNumber()}]服务器IP地址长度", value.ServerIpLength); string ipHex = reader.ReadVirtualArray(value.ServerIpLength).ToArray().ToHexString(); value.ServerIp = reader.ReadString(value.ServerIpLength); writer.WriteString($"[{ipHex}]服务器IP地址", value.ServerIp); value.Port = reader.ReadUInt16(); writer.WriteNumber($"[{value.Port.ReadNumber()}]服务器端口", value.Port); value.UserNameLength = reader.ReadByte(); writer.WriteNumber($"[{value.UserNameLength.ReadNumber()}]用户名长度", value.UserNameLength); string userNameHex = reader.ReadVirtualArray(value.UserNameLength).ToArray().ToHexString(); value.UserName = reader.ReadString(value.UserNameLength); writer.WriteString($"[{userNameHex}]用户名", value.UserName); value.PasswordLength = reader.ReadByte(); writer.WriteNumber($"[{value.PasswordLength.ReadNumber()}]密码长度", value.PasswordLength); string passwordHex = reader.ReadVirtualArray(value.PasswordLength).ToArray().ToHexString(); value.Password = reader.ReadString(value.PasswordLength); writer.WriteString($"[{passwordHex}]密码", value.Password); value.FileUploadPathLength = reader.ReadByte(); writer.WriteNumber($"[{value.FileUploadPathLength.ReadNumber()}]文件上传路径长度", value.FileUploadPathLength); string fileUploadPathHex = reader.ReadVirtualArray(value.FileUploadPathLength).ToArray().ToHexString(); value.FileUploadPath = reader.ReadString(value.FileUploadPathLength); writer.WriteString($"[{fileUploadPathHex}]文件上传路径", value.FileUploadPath); value.ChannelNo = reader.ReadByte(); writer.WriteString($"[{value.ChannelNo.ReadNumber()}]逻辑通道号", LogicalChannelNoDisplay(value.ChannelNo)); value.BeginTime = reader.ReadDateTime_yyMMddHHmmss(); writer.WriteString($"[{value.BeginTime.ToString("yyMMddHHmmss")}]起始时间", value.BeginTime.ToString("yyyy-MM-dd HH:mm:ss")); value.EndTime = reader.ReadDateTime_yyMMddHHmmss(); writer.WriteString($"[{value.EndTime.ToString("yyMMddHHmmss")}]起始时间", value.EndTime.ToString("yyyy-MM-dd HH:mm:ss")); value.AlarmFlag = reader.ReadUInt64(); writer.WriteNumber($"[{value.AlarmFlag.ReadNumber()}]报警标志", value.AlarmFlag); value.MediaType = reader.ReadByte(); writer.WriteString($"[{value.MediaType.ReadNumber()}]音视频类型", AVResourceTypeDisplay(value.MediaType)); value.StreamType = reader.ReadByte(); writer.WriteString($"[{value.StreamType.ReadNumber()}]码流类型", StreamTypeDisplay(value.StreamType)); value.MemoryPositon = reader.ReadByte(); writer.WriteString($"[{value.MemoryPositon.ReadNumber()}]存储器类型", MemoryPositonDisplay(value.MemoryPositon)); value.TaskExcuteCondition = reader.ReadByte(); writer.WriteString($"[{value.TaskExcuteCondition.ReadNumber()}]任务执行条件", TaskExcuteConditionDisplay(value.TaskExcuteCondition));