public abstract class ReadOrWriteCdb extends CommandDescriptorBlock
READ and WRITE SCSI
commands. This grouping makes sense, since, apart from the different values of the OPERATION CODE field, Read and
Write CDBs are identical.| Constructor and Description |
|---|
ReadOrWriteCdb(ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIllegalFieldPointerForLogicalBlockAddress()
This method is used for signaling an illegal value of the
logicalBlockAddress variable. |
void |
addIllegalFieldPointerForTransferLength()
This method is used for signaling an illegal value of the
transferLength variable. |
protected abstract long |
deserializeLogicalBlockAddress(ByteBuffer buffer)
Deserializes the value of the
logicalBlockAddress field. |
protected abstract int |
deserializeTransferLength(ByteBuffer buffer)
Deserializes the value of the
transferLength field. |
long |
getLogicalBlockAddress()
Returns the value of
logicalBlockAddress. |
protected abstract int |
getLogicalBlockAddressFieldIndex()
Returns the index position of the first byte used for encoding the
logicalBlockAddress field. |
int |
getTransferLength()
Returns the value of
transferLength. |
protected abstract int |
getTransferLengthFieldIndex()
Returns the index position of the first byte used for encoding the
transferLength field. |
addIllegalFieldPointer, addIllegalFieldPointer, getIllegalFieldPointers, getScsiOperationCode, isNormalACApublic ReadOrWriteCdb(ByteBuffer buffer)
protected abstract long deserializeLogicalBlockAddress(ByteBuffer buffer)
logicalBlockAddress field.buffer - the ByteBuffer containing the CDBlogicalBlockAddress fieldprotected abstract int deserializeTransferLength(ByteBuffer buffer)
transferLength field.buffer - the ByteBuffer containing the CDBtransferLength fieldpublic final long getLogicalBlockAddress()
logicalBlockAddress.logicalBlockAddresspublic final int getTransferLength()
transferLength.transferLengthprotected abstract int getLogicalBlockAddressFieldIndex()
logicalBlockAddress field.logicalBlockAddress fieldprotected abstract int getTransferLengthFieldIndex()
transferLength field.transferLength fieldpublic final void addIllegalFieldPointerForLogicalBlockAddress()
logicalBlockAddress variable.
This method must be called if the logicalBlockAddress lies outside the bounds of the used medium.
public final void addIllegalFieldPointerForTransferLength()
transferLength variable.
This method must be called if the transferLength field value would result in accessing of out-of-bounds
blocks of the storage medium.
Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.