package com.pwt.netty.common.vehicle2.server;

import com.pwt.netty.common.vehicle2.ResponseData;
import io.netty.buffer.ByteBuf;

/**
 * @author linyun
 * @version V1.0
 * @Title: SetParametersResponseData
 * @Description: 设置参数响应
 * @date 2022/11/15
 **/
public class SetParametersResponseData extends ResponseData {

    /**状态 0:成功 1:失败*/
    private int status;

    /***
     * 子类编码
     * @param byteBuf
     */
    @Override
    protected void encodeInternal(ByteBuf byteBuf)
    {
        byteBuf.writeByte(status);
    }

    /**
     * 子类解码
     *
     * @param byteBuf
     */
    @Override
    protected void decodeInternal(ByteBuf byteBuf)
    {
        this.status = byteBuf.readUnsignedByte();
    }
}
