package com.njzscloud.common.localizer.jt808.message;

import io.netty.buffer.ByteBuf;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

@Getter
@Setter
@ToString
@Accessors(chain = true)
public class SearchLocationResponseMessage {
    // 消息流水号 (2字节)
    private int flowId;
    private LocationReportMessage locationReportMessage;

    public SearchLocationResponseMessage(ByteBuf body) {
        this.flowId = body.readUnsignedShort();
        ByteBuf locationReportMsgBody = body.slice(body.readerIndex(), body.readableBytes());
        this.locationReportMessage = new LocationReportMessage(locationReportMsgBody);
    }
}
