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

import com.pwt.netty.common.charger.RequestData;
import io.netty.buffer.ByteBuf;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 控制灯闪烁数据
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = true)
public class ControlLightFlashCommand extends RequestData {

    /*启停闪烁性质*/
    private byte startStoptWinkle;

    @Override
    public void encode(ByteBuf byteBuf)
    {
        byteBuf.writeByte(getStartStoptWinkle());
    }

    @Override
    public void decode(ByteBuf byteBuf)
    {
        setStartStoptWinkle(byteBuf.readByte());
    }

    @Override
    public int getProtocolLength() {
        return 0;
    }

    @Override
    public byte getEnd() {
        return 0;
    }
}
