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.

27 line
931 B

  1. using JT808.Protocol.Extensions.JT1078.MessageBody;
  2. using JT808.Protocol.Formatters;
  3. using JT808.Protocol.Interfaces;
  4. using JT808.Protocol.MessagePack;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Text;
  8. namespace JT808.Protocol.Extensions.JT1078.Formatters
  9. {
  10. public class JT808_0x9304_Formatter : IJT808MessagePackFormatter<JT808_0x9304>
  11. {
  12. public JT808_0x9304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
  13. {
  14. JT808_0x9304 jT808_0x9304 = new JT808_0x9304();
  15. jT808_0x9304.LogicChannelNo = reader.ReadByte();
  16. jT808_0x9304.StartOrStop = reader.ReadByte();
  17. return jT808_0x9304;
  18. }
  19. public void Serialize(ref JT808MessagePackWriter writer, JT808_0x9304 value, IJT808Config config)
  20. {
  21. writer.WriteByte(value.LogicChannelNo);
  22. writer.WriteByte(value.StartOrStop);
  23. }
  24. }
  25. }