using JT808.Protocol.Attributes; using JT808.Protocol.Formatters; using JT808.Protocol.MessagePack; namespace JT808.Protocol.MessageBody { /// /// TCP 消息应答超时时间,单位为秒(s) /// 0x8103_0x0002 /// public class JT808_0x8103_0x0002 : JT808_0x8103_BodyBase, IJT808MessagePackFormatter { public override uint ParamId { get; set; } = 0x0002; /// /// 数据 长度 /// public override byte ParamLength { get; set; } = 4; /// /// TCP 消息应答超时时间,单位为秒(s) /// public uint ParamValue { get; set; } public JT808_0x8103_0x0002 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) { JT808_0x8103_0x0002 jT808_0x8103_0x0002 = new JT808_0x8103_0x0002(); jT808_0x8103_0x0002.ParamId = reader.ReadUInt32(); jT808_0x8103_0x0002.ParamLength = reader.ReadByte(); jT808_0x8103_0x0002.ParamValue = reader.ReadUInt32(); return jT808_0x8103_0x0002; } public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0x0002 value, IJT808Config config) { writer.WriteUInt32(value.ParamId); writer.WriteByte(value.ParamLength); writer.WriteUInt32(value.ParamValue); } } }