You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 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_0x0200_0x14_Formatter : IJT808MessagePackFormatter<JT808_0x0200_0x14>
  11. {
  12. public JT808_0x0200_0x14 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  13. {
  14. JT808_0x0200_0x14 jT808_0x0200_0x14 = new JT808_0x0200_0x14();
  15. jT808_0x0200_0x14.AttachInfoId = reader.ReadByte();
  16. jT808_0x0200_0x14.AttachInfoLength = reader.ReadByte();
  17. jT808_0x0200_0x14.VideoRelateAlarm = reader.ReadUInt32();
  18. return jT808_0x0200_0x14;
  19. }
  20. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x14 value, IJT808Config config)
  21. {
  22. writer.WriteByte(value.AttachInfoId);
  23. writer.WriteByte(value.AttachInfoLength);
  24. writer.WriteUInt32(value.VideoRelateAlarm);
  25. }
  26. }
  27. }