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.

39 line
1.2 KiB

  1. using JT808.Protocol.Formatters;
  2. using JT808.Protocol.Interfaces;
  3. using JT808.Protocol.MessagePack;
  4. using System;
  5. namespace JT808.Protocol.MessageBody
  6. {
  7. /// <summary>
  8. /// 信息点播/取消
  9. /// 0x0303
  10. /// </summary>
  11. [Obsolete("2019版本已作删除")]
  12. public class JT808_0x0303 : JT808Bodies, IJT808MessagePackFormatter<JT808_0x0303>, IJT808_2019_Version
  13. {
  14. public override ushort MsgId { get; } = 0x0303;
  15. /// <summary>
  16. /// 信息类型
  17. /// </summary>
  18. public byte InformationType { get; set; }
  19. /// <summary>
  20. /// 点播/取消标志
  21. /// </summary>
  22. public byte Flag { get; set; }
  23. public JT808_0x0303 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  24. {
  25. JT808_0x0303 jT808_0X0303 = new JT808_0x0303();
  26. jT808_0X0303.InformationType = reader.ReadByte();
  27. jT808_0X0303.Flag = reader.ReadByte();
  28. return jT808_0X0303;
  29. }
  30. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0303 value, IJT808Config config)
  31. {
  32. writer.WriteByte(value.InformationType);
  33. writer.WriteByte(value.Flag);
  34. }
  35. }
  36. }