package com.github.mjdev.libaums.driver.scsi.commands;

import android.util.Log;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/* JADX INFO: loaded from: classes.dex */
public class CommandStatusWrapper {
    public static final int COMMAND_FAILED = 1;
    public static final int COMMAND_PASSED = 0;
    private static final int D_CSW_SIGNATURE = 1396855637;
    public static final int PHASE_ERROR = 2;
    public static final int SIZE = 13;
    private static final String TAG = "CommandStatusWrapper";
    private byte bCswStatus;
    private int dCswDataResidue;
    private int dCswSignature;
    private int dCswTag;

    public void read(ByteBuffer byteBuffer) {
        byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
        int i = byteBuffer.getInt();
        this.dCswSignature = i;
        if (i != D_CSW_SIGNATURE) {
            Log.e(TAG, "unexpected dCSWSignature " + this.dCswSignature);
        }
        this.dCswTag = byteBuffer.getInt();
        this.dCswDataResidue = byteBuffer.getInt();
        this.bCswStatus = byteBuffer.get();
    }

    public int getdCswTag() {
        return this.dCswTag;
    }

    public int getdCswDataResidue() {
        return this.dCswDataResidue;
    }

    public byte getbCswStatus() {
        return this.bCswStatus;
    }
}
