Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

45 lignes
1.9 KiB

  1. using JT809.Protocol.Enums;
  2. using JT809.Protocol.Formatters;
  3. using JT809.Protocol.MessagePack;
  4. using JT809.Protocol.Extensions;
  5. using System;
  6. using JT809.Protocol.Interfaces;
  7. namespace JT809.Protocol.SubMessageBody
  8. {
  9. /// <summary>
  10. /// 下发平台间消息补传请求消息
  11. /// <para>子业务类型标识:DOWN_PLATFORM_MSG_RETRAN_REQ</para>
  12. /// <para>描述:上级平台接收方在接受消息时,如发现消息报文序列号不连接,则立即发送消息补传请求。下级平台收到消息补传请求后,根据请求的消息报文序列号。重传相应的消息</para>
  13. /// </summary>
  14. public class JT809_0x9300_0x9303:JT809SubBodies, IJT809MessagePackFormatter<JT809_0x9300_0x9303>, IJT809_2019_Version
  15. {
  16. public override ushort SubMsgId => JT809SubBusinessType.下发平台间消息补传请求消息.ToUInt16Value();
  17. public override string Description => "下发平台间消息补传请求消息";
  18. /// <summary>
  19. /// 需要重传消息的起始报文序列号和结束的报文序列号。如只请求重传一个消息,则起始消息报文序列号和结束消息报文序列号相同
  20. /// 8位
  21. /// </summary>
  22. public byte[] SerialList { get; set; }
  23. /// <summary>
  24. /// 重传起始系统utc时间
  25. /// 8位
  26. /// </summary>
  27. public DateTime Time { get; set; }
  28. public JT809_0x9300_0x9303 Deserialize(ref JT809MessagePackReader reader, IJT809Config config)
  29. {
  30. var value = new JT809_0x9300_0x9303();
  31. value.SerialList = reader.ReadArray(8).ToArray();
  32. value.Time = reader.ReadUTCDateTime();
  33. return value;
  34. }
  35. public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9300_0x9303 value, IJT809Config config)
  36. {
  37. writer.WriteArray(value.SerialList);
  38. writer.WriteUTCDateTime(value.Time);
  39. }
  40. }
  41. }