package com.pwt.netty.common.vehicle2old.client;

import com.pwt.netty.common.vehicle2old.RequestData;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author linyun
 * @version V1.0
 * @Title: UnLockData
 * @Description: 解锁
 * @date 2022/11/15
 **/
@Data
@EqualsAndHashCode
public class UnLockData extends RequestData {

    private byte unLock = 0X55;

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

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