parser.setDesiredDataTransferLength(desiredDataTransferLength);
return pdu;
}
public static final ProtocolDataUnit createSCSIResponsePdu (final boolean bidirectionalReadResidualOverflow, final boolean bidirectionalReadResidualUnderflow, final boolean residualOverflow, final boolean residualUnderflow, final SCSIResponseParser.ServiceResponse response, final SCSIStatus status, final int initiatorTaskTag, final int snackTag, final int expectedDataSequenceNumber, final int bidirectionalReadResidualCount, final int residualCount, final ScsiResponseDataSegment scsiResponseDataSegment) {
final ProtocolDataUnit pdu = factory.create(false, true, OperationCode.SCSI_RESPONSE, "None", "None");
final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
final SCSIResponseParser parser = (SCSIResponseParser) bhs.getParser();
parser.setBidirectionalReadResidualOverflow(bidirectionalReadResidualOverflow);
parser.setBidirectionalReadResidualUnderflow(bidirectionalReadResidualUnderflow);
parser.setResidualOverflow(residualOverflow);
parser.setResidualUnderflow(residualUnderflow);
parser.setResponse(response);
parser.setStatus(status);
bhs.setInitiatorTaskTag(initiatorTaskTag);
parser.setSNACKTag(snackTag);
parser.setExpectedDataSequenceNumber(expectedDataSequenceNumber);
parser.setBidirectionalReadResidualCount(bidirectionalReadResidualCount);
parser.setResidualCount(residualCount);
pdu.setDataSegment(scsiResponseDataSegment.serialize());
return pdu;
}