Class CrcSegmentPackager

java.lang.Object
org.refcodes.numerical.AbstractCrcMixin
org.refcodes.serial.CrcSegmentPackager
All Implemented Interfaces:
org.refcodes.factory.Packager<Segment,Segment,RuntimeException>, org.refcodes.numerical.ChecksumValidationModeAccessor, org.refcodes.numerical.CrcAlgorithmAccessor, org.refcodes.numerical.CrcChecksumConcatenateModeAccessor, org.refcodes.numerical.CrcMixin, org.refcodes.numerical.EndianessAccessor, SegmentPackager

public class CrcSegmentPackager extends org.refcodes.numerical.AbstractCrcMixin implements SegmentPackager
A CrcSegmentPackager enriches a Segment with a CRC checksum.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.numerical.ChecksumValidationModeAccessor

    org.refcodes.numerical.ChecksumValidationModeAccessor.ChecksumValidationModeBuilder<B extends org.refcodes.numerical.ChecksumValidationModeAccessor.ChecksumValidationModeBuilder<B>>, org.refcodes.numerical.ChecksumValidationModeAccessor.ChecksumValidationModeMutator, org.refcodes.numerical.ChecksumValidationModeAccessor.ChecksumValidationModeProperty

    Nested classes/interfaces inherited from interface org.refcodes.numerical.CrcAlgorithmAccessor

    org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmBuilder<B extends org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmBuilder<B>>, org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmMutator, org.refcodes.numerical.CrcAlgorithmAccessor.CrcAlgorithmProperty

    Nested classes/interfaces inherited from interface org.refcodes.numerical.CrcChecksumConcatenateModeAccessor

    org.refcodes.numerical.CrcChecksumConcatenateModeAccessor.CrcChecksumConcatenateModeBuilder<B extends org.refcodes.numerical.CrcChecksumConcatenateModeAccessor.CrcChecksumConcatenateModeBuilder<B>>, org.refcodes.numerical.CrcChecksumConcatenateModeAccessor.CrcChecksumConcatenateModeMutator, org.refcodes.numerical.CrcChecksumConcatenateModeAccessor.CrcChecksumConcatenateModeProperty

    Nested classes/interfaces inherited from interface org.refcodes.numerical.EndianessAccessor

    org.refcodes.numerical.EndianessAccessor.EndianessBuilder<B extends org.refcodes.numerical.EndianessAccessor.EndianessBuilder<B>>, org.refcodes.numerical.EndianessAccessor.EndianessMutator, org.refcodes.numerical.EndianessAccessor.EndianessProperty

    Nested classes/interfaces inherited from interface org.refcodes.factory.Packager

    org.refcodes.factory.Packager.Extractor<PACK extends Object,UNPACK extends Object,UNPACKEXC extends Exception>, org.refcodes.factory.Packager.PackageProcessor<UNPACK extends Object,PACK extends Object,UNPACKEXC extends Exception,PACKEXC extends Exception>

    Nested classes/interfaces inherited from interface org.refcodes.serial.SegmentPackager

    SegmentPackager.DummySegmentPackager
  • Field Summary

    Fields inherited from class org.refcodes.numerical.AbstractCrcMixin

    _checksumValidationMode, _crcAlgorithm, _crcChecksumConcatenateMode, _endianess
  • Constructor Summary

    Constructors
    Constructor
    Description
    CrcSegmentPackager(org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
    CrcSegmentPackager(org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
    CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess)
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
    Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
  • Method Summary

    Modifier and Type
    Method
    Description
    toPackaged(Segment aUnpacked)

    Methods inherited from class org.refcodes.numerical.AbstractCrcMixin

    equals, getChecksumValidationMode, getCrcAlgorithm, getCrcChecksumConcatenateMode, getEndianess, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CrcSegmentPackager

      public CrcSegmentPackager(TransmissionMetrics aTransmissionMetrics)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum. 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:
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aEndianess - The Endianess to use when calculating the CRC checksum.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aEndianess - The Endianess to use when calculating the CRC checksum.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
      Parameters:
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum (using TransmissionMetrics.DEFAULT_ENDIANESS by default).
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
      aChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
      Parameters:
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
      aEndianess - The Endianess to use when calculating the CRC checksum.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
      aEndianess - The Endianess to use when calculating the CRC checksum.
    • CrcSegmentPackager

      public CrcSegmentPackager(org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess)
      Constructs an according CrcSegmentPackager for packaging and extracting of packets with a CRC checksum.
      Parameters:
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumConcatenateMode - The mode of concatenation to use when concatenating the CRC checksum with the transmission's Sequence.
      aChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aEndianess - The Endianess to use when calculating the CRC checksum.
  • Method Details