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

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

public class PressAndDragXYData extends DragXYData {
    public double speed;

    public double dragDuration;

    public double getSpeed() {
        return speed;
    }

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

    public double getDragDuration() {
        return dragDuration;
    }

    public void setDragDuration(double dragDuration) {
        this.dragDuration = dragDuration;
    }

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

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