-
- All Implemented Interfaces:
public final class ScsiWrite10 extends CommandBlockWrapper
SCSI command to write to the mass storage device. The 10 means that the transfer length is two byte and the logical block address field is four byte. Thus the hole command takes 10 byte when serialized.
The actual data is transferred in the data phase.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classScsiWrite10.Companion
-
Field Summary
Fields Modifier and Type Field Description private IntegerdCbwTagprivate BytebmCbwFlagsprivate IntegerdCbwDataTransferLengthprivate final CommandBlockWrapper.Directiondirectionprivate final BytebCbwcbLengthprivate final BooleanbCbwDynamicSize
-
Constructor Summary
Constructors Constructor Description ScsiWrite10(Byte lun)Constructs a new write command without any information. ScsiWrite10(Integer blockAddress, Integer transferBytes, Integer blockSize)Constructs a new write command with the given information.
-
Method Summary
Modifier and Type Method Description final IntegergetDCbwTag()The tag which can be used to determine the corresponding CBW. final UnitsetDCbwTag(Integer dCbwTag)The tag which can be used to determine the corresponding CBW. final BytegetBmCbwFlags()final UnitsetBmCbwFlags(Byte bmCbwFlags)final IntegergetDCbwDataTransferLength()final UnitsetDCbwDataTransferLength(Integer dCbwDataTransferLength)final CommandBlockWrapper.DirectiongetDirection()Returns the direction in the data phase. final BytegetBCbwcbLength()The amount of bytes which should be transmitted in the data phase. final BooleangetBCbwDynamicSize()final Unitinit(Integer blockAddress, Integer transferBytes, Integer blockSize)Unitserialize(ByteBuffer buffer)Serializes the command block wrapper for transmission. StringtoString()-
-
Constructor Detail
-
ScsiWrite10
ScsiWrite10(Byte lun)
Constructs a new write command without any information.
-
ScsiWrite10
ScsiWrite10(Integer blockAddress, Integer transferBytes, Integer blockSize)
Constructs a new write command with the given information.- Parameters:
blockAddress- The logical block address the write should start.transferBytes- The bytes which should be transferred.blockSize- The block size of the mass storage device.
-
-
Method Detail
-
getDCbwTag
final Integer getDCbwTag()
The tag which can be used to determine the corresponding CBW.
-
setDCbwTag
final Unit setDCbwTag(Integer dCbwTag)
The tag which can be used to determine the corresponding CBW.
-
getBmCbwFlags
final Byte getBmCbwFlags()
-
setBmCbwFlags
final Unit setBmCbwFlags(Byte bmCbwFlags)
-
getDCbwDataTransferLength
final Integer getDCbwDataTransferLength()
-
setDCbwDataTransferLength
final Unit setDCbwDataTransferLength(Integer dCbwDataTransferLength)
-
getDirection
final CommandBlockWrapper.Direction getDirection()
Returns the direction in the data phase.
-
getBCbwcbLength
final Byte getBCbwcbLength()
The amount of bytes which should be transmitted in the data phase.
-
getBCbwDynamicSize
final Boolean getBCbwDynamicSize()
-
serialize
Unit serialize(ByteBuffer buffer)
Serializes the command block wrapper for transmission.
This method should be called in every subclass right before the specific SCSI command serializes itself to the buffer!
- Parameters:
buffer- The buffer were the serialized data should be copied to.
-
-
-
-