using JT809.Protocol.Enums; using JT809.Protocol.Formatters; using JT809.Protocol.MessagePack; using JT809.Protocol.Extensions; namespace JT809.Protocol.SubMessageBody { /// /// 车辆拍照请求消息 /// 子业务类型标识:DOWN_CTRL_MSG_TAKE_PHOTO_REQ /// 描述:上级平台向下级平台下发对某指定车辆的拍照请求消息 /// public class JT809_0x9500_0x9502:JT809SubBodies, IJT809MessagePackFormatter { public override ushort SubMsgId => JT809SubBusinessType.车辆拍照请求消息.ToUInt16Value(); public override string Description => "车辆拍照请求消息"; /// /// 镜头ID /// public byte LensID { get; set; } /// /// 图片大小 /// Ox01:320x240: /// Ox02:640x480: /// Ox03;:800x600: /// Ox04:1024x768: /// Ox05:176x 144[QCIF]; /// 0x06:704x288[CIF]; /// 0x07:704x288[HALF D]; /// Ox08:704576[DI] /// public byte SizeType { get; set; } public JT809_0x9500_0x9502 Deserialize(ref JT809MessagePackReader reader, IJT809Config config) { JT809_0x9500_0x9502 jT809_0X9500_0X9502 = new JT809_0x9500_0x9502(); jT809_0X9500_0X9502.LensID = reader.ReadByte(); jT809_0X9500_0X9502.SizeType = reader.ReadByte(); return jT809_0X9500_0X9502; } public void Serialize(ref JT809MessagePackWriter writer, JT809_0x9500_0x9502 value, IJT809Config config) { writer.WriteByte(value.LensID); writer.WriteByte(value.SizeType); } } }