Class AllocSegmentHead

All Implemented Interfaces:
Serializable, org.refcodes.mixin.BodyAccessor<AllocSegmentBody<?>>, org.refcodes.mixin.BodyAccessor.BodyMutator<AllocSegmentBody<?>>, org.refcodes.mixin.BodyAccessor.BodyProperty<AllocSegmentBody<?>>, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Schemable<SerialSchema>, org.refcodes.numerical.EndianessAccessor, AllocLengthAccessor, LengthWidthAccessor, Segment, Transmission, Transmission.TransmissionMixin

public class AllocSegmentHead extends AbstractReferenceeLengthSegment<AllocSegmentBody<?>> implements Segment, org.refcodes.mixin.BodyAccessor.BodyProperty<AllocSegmentBody<?>>
An AllocSegmentHead provides the allocation length for a AllocSegmentBody. Therefore the AllocSegmentHead references a AllocSegmentBody. The AllocSegmentHead manages the Sequence regarding the allocation length whereas the AllocSegmentBody manages the decorated Segment by harnessing the allocation length provided by the AllocSegmentHead.
See Also:
  • Constructor Details

    • AllocSegmentHead

      protected AllocSegmentHead(TransmissionMetrics aTransmissionMetrics)
    • AllocSegmentHead

      public AllocSegmentHead(AllocSegmentBody<?> aBody, TransmissionMetrics aTransmissionMetrics)
      Constructs the head with the given body. The configuration attributes are taken from the TransmissionMetrics configuration object, though only those attributes are supported which are also supported by the other constructors!
      Parameters:
      aBody - The body referenced by this head.
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • AllocSegmentHead

      protected AllocSegmentHead()
      Constructs an empty head with a width of TransmissionMetrics.DEFAULT_LENGTH_WIDTH bytes used to specify the body's length and a TransmissionMetrics.DEFAULT_ENDIANESS endian representation of the body's length.
    • AllocSegmentHead

      protected AllocSegmentHead(org.refcodes.numerical.Endianess aEndianess)
      Constructs an empty head with a width of TransmissionMetrics.DEFAULT_LENGTH_WIDTH bytes used to specify the body's length and the provided Endianess representation of the body's length.
      Parameters:
      aEndianess - The Endianess to be used for length values.
    • AllocSegmentHead

      protected AllocSegmentHead(int aLengthWidth, org.refcodes.numerical.Endianess aEndianess)
      Constructs an empty head with a width of TransmissionMetrics.DEFAULT_LENGTH_WIDTH bytes used to specify the body's length and the provided Endianess representation of the body's length.
      Parameters:
      aLengthWidth - The width (in bytes) to be used for length values.
      aEndianess - The Endianess to be used for length values.
    • AllocSegmentHead

      protected AllocSegmentHead(int aLengthWidth)
      Constructs an empty head with the given number of bytes used to specify the body's length and a TransmissionMetrics.DEFAULT_ENDIANESS endian representation of the body's length.
      Parameters:
      aLengthWidth - The width (in bytes) to be used for length values.
    • AllocSegmentHead

      public AllocSegmentHead(AllocSegmentBody<?> aBody, org.refcodes.numerical.Endianess aEndianess)
      Constructs the head with the given body and a width of TransmissionMetrics.DEFAULT_LENGTH_WIDTH bytes used to specify the body's length and the provided Endianess representation of the body's length.
      Parameters:
      aBody - The body referenced by this head.
      aEndianess - The Endianess to be used for length values.
    • AllocSegmentHead

      public AllocSegmentHead(AllocSegmentBody<?> aBody, int aLengthWidth, org.refcodes.numerical.Endianess aEndianess)
      Constructs the head with the given body and with the given number of bytes used to specify the body's length and the provided Endianess representation of the body's length.
      Parameters:
      aBody - The body referenced by this head.
      aLengthWidth - The width (in bytes) to be used for length values.
      aEndianess - The Endianess to be used for length values.
    • AllocSegmentHead

      public AllocSegmentHead(AllocSegmentBody<?> aBody, int aLengthWidth)
      Constructs the head with the given body and with the given number of bytes used to specify the body's length and a TransmissionMetrics.DEFAULT_ENDIANESS endian representation of the body's length.
      Parameters:
      aBody - The body referenced by this head.
      aLengthWidth - The width (in bytes) to be used for length values.
    • AllocSegmentHead

      public AllocSegmentHead(AllocSegmentBody<?> aBody)
      Constructs the head with the given body and a width of TransmissionMetrics.DEFAULT_LENGTH_WIDTH bytes used to specify the body's length a TransmissionMetrics.DEFAULT_ENDIANESS endian representation of the body's length.
      Parameters:
      aBody - The body referenced by this head.
  • Method Details