Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

38 rader
1.2 KiB

  1. using JT808.Protocol.Formatters;
  2. using JT808.Protocol.MessagePack;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace JT808.Protocol.Extensions.JT1078.MessageBody
  7. {
  8. /// <summary>
  9. /// 红外补光控制
  10. /// </summary>
  11. public class JT808_0x9305 : JT808Bodies, IJT808MessagePackFormatter<JT808_0x9305>
  12. {
  13. public override ushort MsgId => 0x9305;
  14. /// <summary>
  15. /// 逻辑通道号
  16. /// </summary>
  17. public byte LogicChannelNo { get; set; }
  18. /// <summary>
  19. /// 启停标识
  20. /// </summary>
  21. public byte StartOrStop { get; set; }
  22. public JT808_0x9305 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  23. {
  24. JT808_0x9305 jT808_0x9305 = new JT808_0x9305();
  25. jT808_0x9305.LogicChannelNo = reader.ReadByte();
  26. jT808_0x9305.StartOrStop = reader.ReadByte();
  27. return jT808_0x9305;
  28. }
  29. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9305 value, IJT808Config config)
  30. {
  31. writer.WriteByte(value.LogicChannelNo);
  32. writer.WriteByte(value.StartOrStop);
  33. }
  34. }
  35. }