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

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

/**
 * @author linyun
 * @version V1.0
 * @Title: InspectionTimeData
 * @Description: 校时命令
 * @date 2022/11/15
 **/
@Data
public class InspectionTimeData extends RequestData {

    /*启停闪烁性质*/
    private int inspectionTime;

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

    /**
     * 子类解码
     *
     * @param byteBuf
     */
    @Override
    protected void decodeInternal(ByteBuf byteBuf)
    {
        setInspectionTime(byteBuf.readInt());
    }
}
