Class SerialHandshakeSugar


  • public class SerialHandshakeSugar
    extends Object
    Declarative syntactic sugar which may be statically imported in order to allow declarative definitions for the construction of various serial types such as Segment or Section type instances (and the like).
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SerialHandshakeSugar()
      Instantiates a new serial sugar.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort)
      Decorates the given Port with full duplex Segment multiplexer functionality.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, byte[] aAcknowledgeMagicBytes, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.numerical.Endianess aEndianess, byte[] aTransmissionMagicBytes, byte[] aNoAcknowledgeMagicBytes, byte[] aRequestForAcknowledgeMagicBytes, 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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.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.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.serial.TransmissionMetrics aTransmissionMetrics)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController<PM>
      handshakePortController​(org.refcodes.serial.Port<PM> aPort, org.refcodes.serial.TransmissionMetrics aTransmissionMetrics, ExecutorService aExecutorService)
      Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
      static <PM extends org.refcodes.serial.PortMetrics>
      HandshakePortController.Builder<PM>
      handshakePortControllerBuilder()
      Constructs a builder to build an according HandshakePortController instance.
    • Constructor Detail

      • SerialHandshakeSugar

        protected SerialHandshakeSugar()
        Instantiates a new serial sugar.
    • Method Detail

      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort)
        Decorates the given Port with full duplex Segment multiplexer functionality.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        Parameters:
        aPort - The Port to be decorated.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       byte[] aAcknowledgeMagicBytes,
                                                                                                                       org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm)
        Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       byte[] aAcknowledgeMagicBytes,
                                                                                                                       org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm,
                                                                                                                       ExecutorService aExecutorService)
        Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - the generic type
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - the generic type
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.numerical.Endianess aEndianess,
                                                                                                                       byte[] aTransmissionMagicBytes,
                                                                                                                       byte[] aNoAcknowledgeMagicBytes,
                                                                                                                       byte[] aRequestForAcknowledgeMagicBytes,
                                                                                                                       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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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 HandshakePortController.transmitSegment(Segment) or the like).
        aNoAcknowledgeMagicBytes - the No-Acknowledge magic bytes
        aRequestForAcknowledgeMagicBytes - the Request-for-Acknowledge magic bytes
        aAcknowledgeMagicBytes - The ACK character(s) 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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.serial.TransmissionMetrics aTransmissionMetrics)
        Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        Parameters:
        aPort - The Port to be decorated.
        aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       org.refcodes.serial.TransmissionMetrics aTransmissionMetrics,
                                                                                                                       ExecutorService aExecutorService)
        Decorates the given Port with full duplex Segment multiplexer functionality as of the given arguments.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.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.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        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.
        Returns:
        The accordingly created HandshakePortController.
      • handshakePortController

        public static <PM extends org.refcodes.serial.PortMetrics> HandshakePortController<PM> handshakePortController​(org.refcodes.serial.Port<PM> aPort,
                                                                                                                       ExecutorService aExecutorService)
        Decorates the given Port with full duplex Segment multiplexer functionality.
        Type Parameters:
        PM - The actual PortMetrics type to use.
        Parameters:
        aPort - The Port to be decorated.
        aExecutorService - The ExecutorService to be used when creating Thread instances for handling input and output data simultaneously.
        Returns:
        The accordingly created HandshakePortController.