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.

48 line
1.7 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>子业务类型标识:DOWN_CTRL_MSG_TAKE_PHOTO_REQ</para>
  10. /// <para>描述:上级平台向下级平台下发对某指定车辆的拍照请求消息</para>
  11. /// </summary>
  12. public class JT809_0x9500_0x9502:JT809SubBodies, IJT809MessagePackFormatter<JT809_0x9500_0x9502>
  13. {
  14. public override ushort SubMsgId => JT809SubBusinessType.车辆拍照请求消息.ToUInt16Value();
  15. public override string Description => "车辆拍照请求消息";
  16. /// <summary>
  17. /// 镜头ID
  18. /// </summary>
  19. public byte LensID { get; set; }
  20. /// <summary>
  21. /// 图片大小
  22. /// Ox01:320x240:
  23. /// Ox02:640x480:
  24. /// Ox03;:800x600:
  25. /// Ox04:1024x768:
  26. /// Ox05:176x 144[QCIF];
  27. /// 0x06:704x288[CIF];
  28. /// 0x07:704x288[HALF D];
  29. /// Ox08:704576[DI]
  30. /// </summary>
  31. public byte SizeType { get; set; }
  32. public JT809_0x9500_0x9502 Deserialize(ref JT809MessagePackReader reader, IJT809Config config)
  33. {
  34. JT809_0x9500_0x9502 jT809_0X9500_0X9502 = new JT809_0x9500_0x9502();
  35. jT809_0X9500_0X9502.LensID = reader.ReadByte();
  36. jT809_0X9500_0X9502.SizeType = reader.ReadByte();
  37. return jT809_0X9500_0X9502;
  38. }
  39. public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9500_0x9502 value, IJT809Config config)
  40. {
  41. writer.WriteByte(value.LensID);
  42. writer.WriteByte(value.SizeType);
  43. }
  44. }
  45. }