public abstract class SenseKeySpecificData extends Object implements ISerializable
The definition of the SENSE KEY SPECIFIC field is determined by the value of the enclosing sense data's
SenseData.senseKey
field.
Sense Key | Sense Key Specific Field Definition |
---|---|
SenseKey.ILLEGAL_REQUEST |
Field Pointer (see FieldPointerSenseKeySpecificData ) |
SenseKey.HARDWARE_ERROR ,SenseKey.MEDIUM_ERROR , orSenseKey.RECOVERED_ERROR |
Actual Retry Count (see ActualRetryCountSenseKeySpecificData ) |
SenseKey.NO_SENSE orSenseKey.NOT_READY |
Progress Indication (see ProgressIndicationSenseKeySpecificData ) |
SenseKey.COPY_ABORTED |
Segment Pointer (see SegmentPointerSenseKeySpecificData ) |
All other Sense Keys | The sense key specific sense data descriptor shall not appear in the descriptor format sense data and the SKSV (Sense Key Specific Field Valid) bit shall be set to zero in the fixed format sense data. |
Modifier and Type | Field and Description |
---|---|
protected boolean |
senseKeySpecificDataValid
true if and only if the information fields of this data object are valid. |
static int |
SIZE
The serialized length in bytes of SENSE-KEY-SPECIFIC DATA.
|
Constructor and Description |
---|
SenseKeySpecificData(boolean senseKeySpecificDataValid)
The absctract constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
serialize(ByteBuffer byteBuffer,
int index)
Inserts a serialized representation of the object into the specified
ByteBuffer . |
protected abstract void |
serializeSpecificFields(ByteBuffer byteBuffer,
int index)
Serializes all fields which are not common to all sense-key-specific data, which means those that are
sub-type-specific.
|
int |
size()
Returns the size in bytes of the object's serialized representation.
|
public static final int SIZE
protected final boolean senseKeySpecificDataValid
true
if and only if the information fields of this data object are valid.public SenseKeySpecificData(boolean senseKeySpecificDataValid)
senseKeySpecificDataValid
- true
if and only if the information fields of this data object are
validprotected abstract void serializeSpecificFields(ByteBuffer byteBuffer, int index)
byteBuffer
- where the serialized fields will be storedindex
- the position of the first byte of the sense data descriptor in the ByteBuffer
public void serialize(ByteBuffer byteBuffer, int index)
ISerializable
ByteBuffer
. The serialized object
will occupy the byte positions from index to index + ISerializable.size()
- 1.serialize
in interface ISerializable
byteBuffer
- where to insert the serialized object representationindex
- the position of the first byte of the serialized object in the ByteBuffer
public int size()
ISerializable
size
in interface ISerializable
Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.