public JT808_0x0B07 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x0B07 value = new JT808_0x0B07(); value.WorkDate = reader.ReadDateTime3(); var length = reader.ReadCurrentRemainContentLength(); value.WorkerId = reader.ReadString(length); return(value); }
/// <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 void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config) { JT808_0x0B07 value = new JT808_0x0B07(); value.WorkDate = reader.ReadDateTime3(); writer.WriteString($"[{value.WorkDate:yyMMdd}]营运日期", value.WorkDate.ToString("yy-MM-dd")); var length = reader.ReadCurrentRemainContentLength(); var virtualHex = reader.ReadVirtualArray(length); value.WorkerId = reader.ReadString(length); writer.WriteString($"[{virtualHex.ToArray().ToHexString()}]员工编号", value.WorkerId); }
/// <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_0x07 value = new JT808_CarDVR_Up_0x07(); var hex = reader.ReadVirtualArray(7); value.ProductionPlantCCCCertificationCode = reader.ReadASCII(7); writer.WriteString($"[{hex.ToArray().ToHexString()}]生产厂 CCC 认证代码", value.ProductionPlantCCCCertificationCode); hex = reader.ReadVirtualArray(16); value.CertifiedProductModels = reader.ReadASCII(16); writer.WriteString($"[{hex.ToArray().ToHexString()}]认证产品型号", value.CertifiedProductModels); hex = reader.ReadVirtualArray(3); value.ProductionDate = reader.ReadDateTime3(); writer.WriteString($"[{hex.ToArray().ToHexString()}]生产日期", value.ProductionDate); hex = reader.ReadVirtualArray(4); value.ProductProductionFlowNumber = reader.ReadString(4); writer.WriteString($"[{hex.ToArray().ToHexString()}]产品生产流水号", value.ProductProductionFlowNumber); hex = reader.ReadVirtualArray(5); value.Reversed = reader.ReadString(5); writer.WriteString($"[{hex.ToArray().ToHexString()}]备用", value.Reversed); }