Class FullDuplexPacketPortDecorator<PM extends PortMetrics>

java.lang.Object
org.refcodes.serial.AbstractPortDecorator<PM>
org.refcodes.serial.FullDuplexPacketPortDecorator<PM>
Type Parameters:
PM - The actual PortMetrics type to use.
All Implemented Interfaces:
Flushable, org.refcodes.component.Closable, org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.ClosedAccessor, org.refcodes.component.ConnectableComponent, org.refcodes.component.ConnectableComponent.ConnectableAutomaton, org.refcodes.component.ConnectionComponent<PM>, org.refcodes.component.ConnectionComponent.ConnectionAutomaton<PM>, org.refcodes.component.ConnectionOpenable<PM>, org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<PM>, org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.Flushable, org.refcodes.component.LinkComponent, org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.Openable, org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<Port<PM>>, org.refcodes.component.OpenedAccessor, org.refcodes.io.Availability, org.refcodes.io.ByteDestination, org.refcodes.io.ByteReceiver, org.refcodes.io.BytesDestination, org.refcodes.io.ByteSource, org.refcodes.io.BytesReceiver, org.refcodes.io.BytesSource, org.refcodes.io.BytesTransceiver, org.refcodes.io.BytesTransmitter, org.refcodes.io.ByteTransceiver, org.refcodes.io.ByteTransmitter, org.refcodes.io.Receivable, org.refcodes.io.Skippable, org.refcodes.io.TimeoutInputStreamAccessor, org.refcodes.io.Transmittable, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.InputStreamAccessor, org.refcodes.mixin.OutputStreamAccessor, org.refcodes.numerical.CrcAlgorithmAccessor, org.refcodes.numerical.CrcChecksumValidationModeAccessor, org.refcodes.numerical.EndianessAccessor, AcknowledgeMagicBytesAccessor, AcknowledgeRetryNumberAccessor, AcknowledgeTimeoutInMsAccessor, Port<PM>, PortMetricsAccessor<PM>, SegmentDestination, SegmentReceiver, SegmentSource, SegmentTransceiver, SegmentTransmitter, SequenceNumberAccessor, SequenceNumberInitValueAccessor, SequenceNumberWidthAccessor, SerialReceiver, SerialTransceiver, SerialTransmitter, TransmissionMagicBytesAccessor

public class FullDuplexPacketPortDecorator<PM extends PortMetrics>
extends AbstractPortDecorator<PM>
implements Port<PM>, AcknowledgeMagicBytesAccessor, AcknowledgeTimeoutInMsAccessor, AcknowledgeRetryNumberAccessor, TransmissionMagicBytesAccessor, SequenceNumberAccessor, SequenceNumberInitValueAccessor, SequenceNumberWidthAccessor, org.refcodes.numerical.CrcAlgorithmAccessor, org.refcodes.numerical.CrcChecksumValidationModeAccessor, org.refcodes.numerical.EndianessAccessor
A FullDuplexPacketPortDecorator decorates a Port for its usage in Full-Duplex mode by chunking a transmission of Segment messages (or any transmission finished off by calling AbstractPortDecorator.flush()) into small packets.
  • Constructor Details

    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort)
      Decorates the given Port with full duplex Segment multiplexer functionality.
      Parameters:
      aPort - The Port to be decorated.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, TransmissionMetrics aTransmissionMetrics)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, long aAcknowledgeTimeoutInMs, int aSequenceNumberWidth, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aAcknowledgeTimeoutInMs - The timeout in milliseconds to pend till the next retry.
      aSequenceNumberWidth - The width in bytes to be used for the binary sequence number representation.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, long aAcknowledgeTimeoutInMs, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aAcknowledgeTimeoutInMs - The timeout in milliseconds to pend till the next retry.
      aSequenceNumberInitValue - The initialization value for the sequence number counter.
      aSequenceNumberWidth - The width in bytes to be used for the binary sequence number representation.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality.
      Parameters:
      aPort - The Port to be decorated.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, TransmissionMetrics aTransmissionMetrics, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, long aAcknowledgeTimeoutInMs, int aSequenceNumberWidth, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aAcknowledgeTimeoutInMs - The timeout in milliseconds to pend till the next retry.
      aSequenceNumberWidth - The width in bytes to be used for the binary sequence number representation.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
    • FullDuplexPacketPortDecorator

      public FullDuplexPacketPortDecorator​(Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aAcknowledgeMagicBytes, int aAcknowledgeRetryNumber, long aAcknowledgeTimeoutInMs, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.ChecksumValidationMode aCrcChecksumValidationMode, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      Parameters:
      aPort - The Port to be decorated.
      aEndianess - The Endianess to use when calculating the CRC checksum.
      aTransmissionMagicBytes - The magic bytes identifying a regular transmission (as of transmitSegment(Segment) or the like).
      aAcknowledgeMagicBytes - The ACK character to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.
      aAcknowledgeRetryNumber - The number of retries waiting for an ACK from the return channel.
      aAcknowledgeTimeoutInMs - The timeout in milliseconds to pend till the next retry.
      aSequenceNumberInitValue - The initialization value for the sequence number counter.
      aSequenceNumberWidth - The width in bytes to be used for the binary sequence number representation.
      aCrcAlgorithm - The CrcAlgorithm to be used for CRC checksum calculation.
      aCrcChecksumValidationMode - The mode of operation when validating provided CRC checksums against calculated ones.
      aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
  • Method Details