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

38 行
1.4 KiB

  1. using JT808.Protocol.Attributes;
  2. using JT808.Protocol.Formatters;
  3. using JT808.Protocol.MessagePack;
  4. namespace JT808.Protocol.MessageBody
  5. {
  6. /// <summary>
  7. /// 驾驶员未登录汇报时间间隔,单位为秒(s),>0
  8. /// </summary>
  9. public class JT808_0x8103_0x0022 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter<JT808_0x8103_0x0022>
  10. {
  11. public override uint ParamId { get; set; } = 0x0022;
  12. /// <summary>
  13. /// 数据 长度
  14. /// </summary>
  15. public override byte ParamLength { get; set; } = 4;
  16. /// <summary>
  17. /// 驾驶员未登录汇报时间间隔,单位为秒(s),>0
  18. /// </summary>
  19. public uint ParamValue { get; set; }
  20. public JT808_0x8103_0x0022 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  21. {
  22. JT808_0x8103_0x0022 jT808_0x8103_0x0022 = new JT808_0x8103_0x0022();
  23. jT808_0x8103_0x0022.ParamId = reader.ReadUInt32();
  24. jT808_0x8103_0x0022.ParamLength = reader.ReadByte();
  25. jT808_0x8103_0x0022.ParamValue = reader.ReadUInt32();
  26. return jT808_0x8103_0x0022;
  27. }
  28. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0022 value, IJT808Config config)
  29. {
  30. writer.WriteUInt32(value.ParamId);
  31. writer.WriteByte(value.ParamLength);
  32. writer.WriteUInt32(value.ParamValue);
  33. }
  34. }
  35. }