public final class DataOutParser extends InitiatorMessageParser
commandSequenceNumber, expectedStatusSequenceNumberlogicalUnitNumber, protocolDataUnit| Constructor and Description |
|---|
DataOutParser(ProtocolDataUnit initProtocolDataUnit)
Default constructor, creates a new, empty
DataOutParser object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIntegrity()
This method checks, if all parsed fields are valid.
|
void |
clear()
This method sets all settings to their initial values.
|
protected void |
deserializeBytes1to3(int line)
Parse the bytes
1 till 3 in the Basic Header
Segment. |
protected void |
deserializeBytes20to23(int line)
Parse the bytes
20 till 23 in the Basic Header
Segment. |
protected void |
deserializeBytes36to39(int line)
Parse the bytes
36 till 39 in the Basic Header
Segment. |
protected void |
deserializeBytes40to43(int line)
Parse the bytes
40 till 43 in the Basic Header
Segment. |
int |
getBufferOffset()
The Buffer Offset field contains the offset of this PDU payload data
within the complete data transfer.
|
DataSegmentFactory.DataSegmentFormat |
getDataSegmentFormat()
If this method returns
true, hen it indicates that the data
segment data is interpreted as binary data. |
int |
getDataSequenceNumber()
For input (read) or bidirectional Data-In PDUs, the DataSN is the input
PDU number within the data transfer for the command identified by the
Initiator Task Tag.
|
String |
getShortInfo()
Returns the short version of the used sequence numbers of this parser
instance.
|
int |
getTargetTransferTag()
On outgoing data, the Target Transfer Tag is provided to the target if
the transfer is honoring an R2T.
|
boolean |
incrementSequenceNumber()
This
AbstractMessageParser instance affects the
incrementation of the Command Sequence Number. |
protected int |
serializeBytes20to23()
Serializes the bytes
20 till 23 in the Basic
Header Segment. |
protected int |
serializeBytes24to27()
Serializes the bytes
24 till 27 in the Basic
Header Segment. |
protected int |
serializeBytes36to39()
Serializes the bytes
36 till 39 in the Basic
Header Segment. |
protected int |
serializeBytes40to43()
Serializes the bytes
40 till 43 in the Basic
Header Segment. |
void |
setBufferOffset(int newBufferOffset)
Sets the Buffer Offset to a new one.
|
void |
setCommandSequenceNumber(int newCommandSequenceNumber)
Returns the Command Sequence Number of this
InitiatorMessageParser object. |
void |
setDataSequenceNumber(int newDataSequenceNumber)
Sets the Data Sequence Number to a new one.
|
void |
setTargetTransferTag(int newTargetTransferTag)
Sets the Target Transfer Tag to a new one.
|
String |
toString()
This method concatenate all the fields of a derived parser to allow an
easy generation of debug informations.
|
deserializeBytes24to27, deserializeBytes28to31, deserializeBytes32to35, deserializeBytes44to47, getCommandSequenceNumber, getExpectedStatusSequenceNumber, serializeBytes1to3, serializeBytes28to31, serializeBytes32to35, serializeBytes44to47, setExpectedStatusSequenceNumbercanContainAdditionalHeaderSegments, canHaveDigests, deserializeBytes12to15, deserializeBytes8to11, getLogicalUnitNumber, serializeBytes12to15, serializeBytes8to11, setLogicalUnitNumberpublic DataOutParser(ProtocolDataUnit initProtocolDataUnit)
DataOutParser object.initProtocolDataUnit - The reference ProtocolDataUnit instance, which
contains this DataOutParser subclass object.public final void setCommandSequenceNumber(int newCommandSequenceNumber)
InitiatorMessageParser object.
This field does not have a Command Sequence Number unequal 0.setCommandSequenceNumber in class InitiatorMessageParsernewCommandSequenceNumber - This number is ignored.public final int getBufferOffset()
public final int getDataSequenceNumber()
R2T and Data-In PDUs, in the context of bidirectional commands, share the numbering sequence (see Section 3.2.2.3 Data Sequencing).
For output (write) data PDUs, the DataSN is the Data-Out PDU number within the current output sequence. The current output sequence is either identified by the Initiator Task Tag (for unsolicited data) or is a data sequence generated for one R2T (for data solicited through R2T).
public final int getTargetTransferTag()
On incoming data, the Target Transfer Tag and LUN MUST be provided by the target if the A bit is set to
1; otherwise they are reserved. The Target Transfer Tag and LUN are copied by the initiator into the
SNACK of type DataACK that it issues as a result of receiving a SCSI Data-In PDU with the A bit set to
1.
The Target Transfer Tag values are not specified by this protocol except that the value
0xffffffff is reserved and means that the Target Transfer Tag is not supplied. If the
Target Transfer Tag is provided, then the LUN field MUST hold a valid value and be consistent with
whatever was specified with the command; otherwise, the LUN field is reserved.
public final void setBufferOffset(int newBufferOffset)
newBufferOffset - The new Buffer Offset.getBufferOffset()public final void setDataSequenceNumber(int newDataSequenceNumber)
newDataSequenceNumber - The new Data Sequence Number.getDataSequenceNumber()()public final void setTargetTransferTag(int newTargetTransferTag)
newTargetTransferTag - The new Target Transfer Tag.getTargetTransferTag()public String getShortInfo()
getShortInfo in class InitiatorMessageParserpublic final String toString()
toString in class InitiatorMessageParserpublic final DataSegmentFactory.DataSegmentFormat getDataSegmentFormat()
true, hen it indicates that the data
segment data is interpreted as binary data. Else the data segment data
must be interpreted as Text Format.getDataSegmentFormat in class AbstractMessageParserDataSegmentFactory.DataSegmentFormatpublic final void clear()
clear in class InitiatorMessageParserpublic boolean incrementSequenceNumber()
AbstractMessageParser instance affects the
incrementation of the Command Sequence Number.incrementSequenceNumber in class InitiatorMessageParsertrue, if the counter has to be incremented. Else false.protected final void deserializeBytes1to3(int line)
throws InternetSCSIException
1 till 3 in the Basic Header
Segment.deserializeBytes1to3 in class InitiatorMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes20to23(int line)
throws InternetSCSIException
20 till 23 in the Basic Header
Segment.deserializeBytes20to23 in class InitiatorMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes36to39(int line)
throws InternetSCSIException
36 till 39 in the Basic Header
Segment.deserializeBytes36to39 in class InitiatorMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void deserializeBytes40to43(int line)
throws InternetSCSIException
40 till 43 in the Basic Header
Segment.deserializeBytes40to43 in class InitiatorMessageParserline - The actual lineInternetSCSIException - If any violation of the iSCSI-Standard emerge.protected final void checkIntegrity()
throws InternetSCSIException
checkIntegrity in class AbstractMessageParserInternetSCSIException - If the integrity is violated.protected final int serializeBytes20to23()
20 till 23 in the Basic
Header Segment.serializeBytes20to23 in class InitiatorMessageParserprotected final int serializeBytes24to27()
24 till 27 in the Basic
Header Segment.serializeBytes24to27 in class InitiatorMessageParserprotected final int serializeBytes36to39()
36 till 39 in the Basic
Header Segment.serializeBytes36to39 in class InitiatorMessageParserprotected final int serializeBytes40to43()
40 till 43 in the Basic
Header Segment.serializeBytes40to43 in class InitiatorMessageParserCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.