選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

38 行
1.4 KiB

  1. using JT808.Protocol.Extensions.JT1078.MessageBody;
  2. using JT808.Protocol.Formatters;
  3. using JT808.Protocol.Interfaces;
  4. using JT808.Protocol.MessagePack;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Text;
  8. namespace JT808.Protocol.Extensions.JT1078.Formatters
  9. {
  10. public class JT808_0x9205_Formatter : IJT808MessagePackFormatter<JT808_0x9205>
  11. {
  12. public JT808_0x9205 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  13. {
  14. JT808_0x9205 jT808_0x9205 = new JT808_0x9205();
  15. jT808_0x9205.LogicChannelNo = reader.ReadByte();
  16. jT808_0x9205.BeginTime = reader.ReadDateTime6();
  17. jT808_0x9205.EndTime = reader.ReadDateTime6();
  18. jT808_0x9205.AlarmFlag = reader.ReadUInt32();
  19. jT808_0x9205.AVResourceType = reader.ReadByte();
  20. jT808_0x9205.StreamType = reader.ReadByte();
  21. jT808_0x9205.MemoryType = reader.ReadByte();
  22. return jT808_0x9205;
  23. }
  24. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9205 value, IJT808Config config)
  25. {
  26. writer.WriteByte(value.LogicChannelNo);
  27. writer.WriteDateTime6(value.BeginTime);
  28. writer.WriteDateTime6(value.EndTime);
  29. writer.WriteUInt32(value.AlarmFlag);
  30. writer.WriteByte(value.AVResourceType);
  31. writer.WriteByte(value.StreamType);
  32. writer.WriteByte(value.MemoryType);
  33. }
  34. }
  35. }