package net.northking.cctp.upperComputer.driver.ios.command.data;


import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class SwipeUiNodeData extends SearchUiNodeData {

    public byte direction;
    public double speed;

    public void setDirection(byte direction) {
        this.direction = direction;
    }

    public byte getDirection() {
        return direction;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public double getSpeed() {
        return speed;
    }

    @Override
    public void buildFromInput(DataInput dataInput) throws IOException {
        super.buildFromInput(dataInput);
        direction = dataInput.readByte();
        speed = dataInput.readDouble();
    }

    @Override
    public void encodeToOutput(DataOutput dataOutput) throws IOException {
        super.encodeToOutput(dataOutput);
        dataOutput.writeByte(direction);
        dataOutput.writeDouble(speed);
    }
}
