public static final ProtocolDataUnit createDataInPdu (boolean finalFlag, boolean acknowledgeFlag, boolean residualOverflowFlag, boolean residualUnderflowFlag, boolean statusFlag, SCSIStatus status, long logicalUnitNumber, int initiatorTaskTag, int targetTransferTag, int dataSequenceNumber,//
int bufferOffset, int residualCount, ByteBuffer dataSegment) {
final ProtocolDataUnit pdu = factory.create(false, finalFlag, OperationCode.SCSI_DATA_IN, "None", "None");
final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
final DataInParser parser = (DataInParser) bhs.getParser();
parser.setAcknowledgeFlag(acknowledgeFlag);
parser.setResidualOverflowFlag(residualOverflowFlag);
parser.setResidualUnderflowFlag(residualUnderflowFlag);
parser.setStatusFlag(statusFlag);
parser.setStatus(status);
parser.setLogicalUnitNumber(logicalUnitNumber);
bhs.setInitiatorTaskTag(initiatorTaskTag);
parser.setTargetTransferTag(targetTransferTag);
parser.setDataSequenceNumber(dataSequenceNumber);
parser.setBufferOffset(bufferOffset);
parser.setResidualCount(residualCount);
pdu.setDataSegment(dataSegment);
return pdu;
}