public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1400_0x1402 value, IJT809Config config) { if (config.Version == JT809Version.JTT2011) { writer.WriteByte((byte)value.WarnSrc); } else { writer.WriteStringPadRight(value.SourcePlatformId, 11); } writer.WriteUInt16((ushort)value.WarnType); writer.WriteUTCDateTime(value.WarnTime); if (config.Version == JT809Version.JTT2011) { writer.WriteUInt32(value.InfoID); } else { writer.WriteUTCDateTime(value.StartTime); writer.WriteUTCDateTime(value.EndTime); writer.WriteStringPadRight(value.VehicleNo, 21); writer.WriteByte((byte)value.VehicleColor); writer.WriteStringPadRight(value.DestinationPlatformId, 11); writer.WriteUInt32(value.DRVLineId); } // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.InfoContent); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1500_0x1504 value, IJT809Config config) { writer.WriteByte((byte)value.CommandType); // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.TraveldataInfo); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9200_0x920D value, IJT809Config config) { writer.WriteUInt32(value.DRVLineID); writer.WriteByte(value.Result); writer.Skip(2, out int position); writer.WriteString(value.Reason); writer.WriteUInt16Return((ushort)(writer.GetCurrentPosition() - position - 2), position); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1600_0x1601 value, IJT809Config config) { if (config.Version == JT809Version.JTT2019) { writer.WriteUInt16(value.SourceDataType); writer.WriteUInt32(value.SourceMsgSn); } writer.WriteString(value.CarInfo); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9500_0x9503 value, IJT809Config config) { writer.WriteUInt32(value.MsgSequence); writer.WriteByte(value.MsgPriority); // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.MsgContent); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9400_0x9403 value, IJT809Config config) { writer.WriteByte((byte)value.WarnSrc); writer.WriteUInt16((ushort)value.WarnType); writer.WriteUTCDateTime(value.WarnTime); // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.WarnContent); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1300_0x1301 value, IJT809Config config) { writer.WriteByte((byte)value.ObjectType); writer.WriteStringPadRight(value.ObjectID, 12); writer.WriteUInt32(value.InfoID); // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.InfoContent); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1200_0x120B value, IJT809Config config) { if (config.Version == JT809Version.JTT2019) { writer.WriteUInt16(value.SourceDataType); writer.WriteUInt32(value.SourceMsgSn); } writer.WriteUInt32((uint)value.EwaybillInfo.Length); writer.WriteString(value.EwaybillInfo); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1500_0x1504 value, IJT809Config config) { if (config.Version == JT809Version.JTT2019) { writer.WriteUInt16(value.SourceDataType); writer.WriteUInt32(value.SourceMsgSn); } writer.WriteByte((byte)value.CommandType); // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.TraveldataInfo); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1300_0x1301 value, IJT809Config config) { writer.WriteByte((byte)value.ObjectType); if (config.Version == JT809Version.JTT2011) { writer.WriteStringPadRight(value.ObjectID, 12); writer.WriteUInt32(value.InfoID); } else { writer.WriteStringPadRight(value.Responder, 16); writer.WriteStringPadRight(value.ResponderTel, 20); writer.WriteStringPadRight(value.ObjectID, 20); writer.WriteUInt16(value.SourceDataType); writer.WriteUInt32(value.SourceMsgSn); } // 先计算内容长度(汉字为两个字节) writer.Skip(4, out int lengthPosition); writer.WriteString(value.InfoContent); writer.WriteInt32Return(writer.GetCurrentPosition() - lengthPosition - 4, lengthPosition); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1200_0x120D value, IJT809Config config) { writer.WriteUInt32((uint)value.EwaybillInfo.Length); writer.WriteString(value.EwaybillInfo); }
public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1600_0x1601 value, IJT809Config config) { writer.WriteString(value.CarInfo); }