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.

32 regels
1.3 KiB

  1. using JT808.Protocol.Attributes;
  2. using JT808.Protocol.Formatters;
  3. using JT808.Protocol.MessagePack;
  4. namespace JT808.Protocol.MessageBody
  5. {
  6. public class JT808_0x0200_0x30 : JT808_0x0200_BodyBase, IJT808MessagePackFormatter<JT808_0x0200_0x30>
  7. {
  8. /// <summary>
  9. /// 无线通信网络信号强度
  10. /// </summary>
  11. public byte WiFiSignalStrength { get; set; }
  12. public override byte AttachInfoId { get; set; } = 0x30;
  13. public override byte AttachInfoLength { get; set; } = 1;
  14. public JT808_0x0200_0x30 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  15. {
  16. JT808_0x0200_0x30 jT808LocationAttachImpl0x30 = new JT808_0x0200_0x30();
  17. jT808LocationAttachImpl0x30.AttachInfoId = reader.ReadByte();
  18. jT808LocationAttachImpl0x30.AttachInfoLength = reader.ReadByte();
  19. jT808LocationAttachImpl0x30.WiFiSignalStrength = reader.ReadByte();
  20. return jT808LocationAttachImpl0x30;
  21. }
  22. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x0200_0x30 value, IJT808Config config)
  23. {
  24. writer.WriteByte(value.AttachInfoId);
  25. writer.WriteByte(value.AttachInfoLength);
  26. writer.WriteByte(value.WiFiSignalStrength);
  27. }
  28. }
  29. }