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.

41 lines
1.6 KiB

  1. using JT809.Protocol.Enums;
  2. using JT809.Protocol.Formatters;
  3. using JT809.Protocol.MessagePack;
  4. using JT809.Protocol.Extensions;
  5. namespace JT809.Protocol.SubMessageBody
  6. {
  7. /// <summary>
  8. /// 报警督办应答消息
  9. /// <para>子业务类型标识:UP_WARN_MSG_URGE_TODO_ACK</para>
  10. /// <para>描述:下级平台应答上级平台下发的报警督办请求消息,向上.级平台上报车辆的报瞥处理结果</para>
  11. /// </summary>
  12. public class JT809_0x1400_0x1401:JT809SubBodies, IJT809MessagePackFormatter<JT809_0x1400_0x1401>
  13. {
  14. public override ushort SubMsgId => JT809SubBusinessType.报警督办应答消息.ToUInt16Value();
  15. public override string Description => "报警督办应答消息";
  16. /// <summary>
  17. /// 报警督办 ID
  18. /// </summary>
  19. public uint SupervisionID { get; set; }
  20. /// <summary>
  21. /// 报警处理结果
  22. /// </summary>
  23. public JT809_0x1401_Result Result { get; set; }
  24. public JT809_0x1400_0x1401 Deserialize(ref JT809MessagePackReader reader, IJT809Config config)
  25. {
  26. JT809_0x1400_0x1401 jT809_0X1400_0X1401 = new JT809_0x1400_0x1401();
  27. jT809_0X1400_0X1401.SupervisionID = reader.ReadUInt32();
  28. jT809_0X1400_0X1401.Result = (JT809_0x1401_Result)reader.ReadByte();
  29. return jT809_0X1400_0X1401;
  30. }
  31. public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1400_0x1401 value, IJT809Config config)
  32. {
  33. writer.WriteUInt32(value.SupervisionID);
  34. writer.WriteByte((byte)value.Result);
  35. }
  36. }
  37. }