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

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

public class ForceTapXYData extends TapXYData {
    public double pressure;

    public double duration;

    public double getPressure() {
        return pressure;
    }

    public void setPressure(double pressure) {
        this.pressure = pressure;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

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

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