Uses of Package
org.refcodes.serial
-
Classes in org.refcodes.serial used by org.refcodes.serialClassDescriptionAn
AbstractArrayTransmission
is aTransmission
consisting ofTransmission
elements (an array of elements).An abstract implementation of bijective and inverse functions applied to the decoratee's transmitting and receiving methods.AAbstractCrcTransmissionDecorator
wraps aTransmission
instance and enriches theTransmission
with a CRC checksum.TheAbstractErrorCorrectionTransmissionDecorator
class implements a decorator providing base functionality for an error correctionTransmission
.An abstract implementation of bijective and inverse functions applied to the decoratee's transmitting and receiving methods.TheAbstractLengthDecoratorSegment
decorates a decoratee with a length prefix.Magic bytes are usually found (somewhere) at the beginning of a file or a stream.Magic bytes are usually found (somewhere) at the beginning of a file or a stream.TheAbstractMagicBytesTransmissionMultiplexer
dispatches a transmission to one of the aggregatedTransmission
instances depending on the magic number provided by the transmission.An abstract implementation of aSection
with payload.An abstract implementation of aSegment
with payload.AAbstractPort
is a basePort
implementation.TheAbstractReadyToReceiveTransmissionDecorator
class implements a decorator providingReadyToReceiveTransmission
functionality for aTransmission
.TheAbstractReadyToSendTransmissionDecorator
class implements a decorator providingReadyToSendTransmission
functionality for aTransmission
.TheAbstractReferenceeLengthSegment
represents a allocated length value as of the referencedTransmission
element's length.AAbstractStopAndWaitPacketStreamTransmissionDecorator
wraps aTransmission
instance and enriches theTransmission
with packet-stream functionality.TheAbstractStopAndWaitTransmissionDecorator
class implements a decorator providingStopAndWaitTransmission
functionality for aTransmission
.AAbstractTransmissionComposite
is aTransmission
consisting ofTransmission
elements with each element.An abstract implementation of aTransmission
decorating anotherTransmission
.Provides an accessor for a acknowledge magic bytes property.Provides a builder method for a acknowledge magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a acknowledge magic bytes property.Provides an accessor for a acknowledge retry number.Provides a builder method for a acknowledge retry number returning the builder for applying multiple build operations.Provides a mutator for a acknowledge retry number.Provides an accessor for aSegmentPackager
ACK property.Provides a builder method for aSegmentPackager
ACK property returning the builder for applying multiple build operations.Provides a mutator for aSegmentPackager
ACK property.Provides an accessor for a acknowledge timeout in milliseconds property.Provides a builder method for the acknowledge timeout property returning the builder for applying multiple build operations.Provides a mutator for a acknowledge timeout in milliseconds property.Provides an accessor for a allocation length property.Provides a builder method for a allocation length property returning the builder for applying multiple build operations.Provides a mutator for a allocation length property.Provides a allocation length property.AnAllocSectionDecoratorSegment
enriches anSection
with an allocation declaration being prefixed to the enrichedSection
.AnAllocSegmentBody
provides anSegment
with an allocation length.AnAllocSegmentHead
provides the allocation length for aAllocSegmentBody
.TheAsciizSegment
is an implementation of aSegment
carrying an ASCII encodedString
as payload, terminated by a 0 ("zero") indicating its end.TheAssertMagicBytesSectionDecorator
extends theMagicBytesSectionDecorator
and enforces the configured magic bytes to match the received magic bytes (as ofAssertMagicBytesSectionDecorator.fromTransmission(Sequence, int, int)
andAssertMagicBytesSectionDecorator.receiveFrom(java.io.InputStream, int, java.io.OutputStream)
or the like).TheAssertMagicBytesSegment
extends theMagicBytesSegment
and enforces the configured magic bytes to match the received magic bytes (as ofSegment.fromTransmission(Sequence)
andSegment.SegmentMixin.receiveFrom(java.io.InputStream, java.io.OutputStream)
or the like).TheAssertMagicBytesSegmentDecorator
extends theMagicBytesSegmentDecorator
and enforces the configured magic bytes to match the received magic bytes (as ofSegment.fromTransmission(Sequence)
andAssertMagicBytesSegmentDecorator.receiveFrom(java.io.InputStream, java.io.OutputStream)
or the like).Thrown in case a transmission's CRC checksum did not match the according calculated CRC checksum.Thrown in case aSequence
CRC checksum did not match the according calculated CRC checksum.ABadMagicBytesException
denotes bad (unexpected) magic bytes encountered while processing a transmission.ABadMagicBytesSequenceException
denotes bad (unexpected) magic bytes encountered while processing a transmissionSequence
.TheBooleanArraySection
is an implementation of aSection
carrying a boolean array as payload.TheBooleanSegment
is an implementation of aSegment
carrying in boolean value as value.TheBoundedSequenceDecorator
decorates aSequence
whilst bounding its size to a given maximum size (to be set viaBoundedSequenceDecorator.setLength(int)
) .TheBreakerSectionDecorator
is aDecoratorSection
build to test error detection and error correctionTransmission
implementations such as theCrcSectionDecorator
or theStopAndWaitSectionDecorator
.TheBreakerSegmentDecorator
is aDecoratorSegment
build to test error detection and error correctionTransmission
implementations such as theCrcSegmentDecorator
or theStopAndWaitSegmentDecorator
.TheByteArraySection
is an implementation of aSection
carrying a byte array as payload.AByteArraySequence
implements theSequence
interface by using chunks of byte arrays, therewith reducing array copy operations when working with byte fields.TheByteSegment
is an implementation of aSegment
carrying in byte value as payload.TheCharArraySection
is an implementation of aPayloadSection
carrying a char array as payload.TheCharSection
is an implementation of aSection
carrying a char value as payload.ACipherSectionDecorator
is a transmission applying anInvertible
on outgoing bytes (as ofTransmission.transmitTo(java.io.OutputStream)
or the like) and the inverse function on any incoming bytes.ACipherSegmentDecorator
is a transmission applying anInvertible
on outgoing bytes (as ofTransmission.transmitTo(java.io.OutputStream)
or the like) and the inverse function on any incoming bytes.Provides an accessor for a CTS ("clear-to-send") magic bytes property.Provides a builder method for a CTS ("clear-to-send") magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a CTS ("clear-to-send") magic bytes property.Provides an accessor for a CTS ("clear-to-send") retry number.Provides a builder method for a CTS ("clear-to-send") retry number returning the builder for applying multiple build operations.Provides a mutator for a CTS ("clear-to-send") retry number.Provides an accessor for aSegmentPackager
CTS ("clear-to-send") property.Provides a builder method for aSegmentPackager
CTS ("clear-to-send") property returning the builder for applying multiple build operations.Provides a mutator for aSegmentPackager
CTS ("clear-to-send") property.Provides an accessor for a CTS ("clear-to-send") timeout in milliseconds property.Provides a builder method for a the CTS ("clear-to-send") timeout property returning the builder for applying multiple build operations.Provides a mutator for a CTS ("clear-to-send") timeout in milliseconds property.AComplexTypeSegment
takes a POJO (a data structure) and creates from its content aSegment
representing the POJO's structure.ACrcSegmentPackager
enriches aSegment
with a CRC checksum.TheDecoratorSection
interface provided means to access a decoratedTransmission
with the means of aSection
.TheDecoratorSegment
interface provided means to access a decoratedTransmission
with the means of aSegment
.TheDoubleArraySection
is an implementation of aSection
carrying a double array as payload.TheDoubleSegment
is an implementation of aSegment
carrying in double value as payload.TheDynamicTypeSection
represents aSection
which's internal raw data is created from provided types at runtime and which's internal raw data is used to create provided types at runtime.TheDynamicTypeSegment
represents aSegment
which's internal raw data is created from provided types at runtime and which's internal raw data is used to create provided types at runtime.heDynamicTypeTransmission
represents aTransmission
which's internal raw data is created from provided types at runtime and which's internal raw data is used to create provided types at runtime.Provides an accessor for a end of string byte property.Provides a builder method for a end of string byte property returning the builder for applying multiple build operations.Provides a mutator for a end of string byte property.Provides an accessor for a ENQ ("enquiry") timeout in milliseconds property.Provides a builder method for a the ENQ ("enquiry") timeout property returning the builder for applying multiple build operations.Provides a mutator for a ENQ ("enquiry") timeout in milliseconds property.TheEnumSegment
is an implementation of aSegment
carrying an enumeration value as payload.TheErrorCorrectionTransmission
represents the base error correction transmission definition.AFileSection
represents aFile
on the file system and can be used to receive or to transmit aFile
.TheFixedLengthSequenceSegment
is aSegment
representing aSequence
of a fixed length (as of the arguments passed to one of its constructors).AFixedSegmentArraySection
is aSection
consisting ofSegment
elements with each element of the same (uniform) length (in contrast to theSegmentArraySection
).TheFloatArraySection
is an implementation of aSection
carrying a float array as payload.TheFloatSegment
is an implementation of aSegment
carrying in float value as payload.Thrown in case a flow control failed.Thrown in case a flow control failed due t a timeout.Defines the type of flow control.Provides an accessor for a handshake magic bytes property.Provides a builder method for a handshake magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a handshake magic bytes property.Enumeration with the various protocol settings when receiving a transmission.Provides an accessor for an input return stream property.Provides a mutator for an input return stream property.Provides a mutator for an input return stream property.TheIntArraySection
is an implementation of aSection
carrying an integer array as payload.TheIntSegment
is an implementation of aSegment
carrying an integer value as payload.AInvertibleSectionDecorator
is a transmission applying anInvertible
on outgoing bytes (as ofTransmission.transmitTo(java.io.OutputStream)
or the like) and the inverse function on any incoming bytes.AInvertibleSegmentDecorator
is a transmission applying anInvertible
on outgoing bytes (as ofTransmission.transmitTo(java.io.OutputStream)
or the like) and the inverse function on any incoming bytes.Provides an accessor for a IO heuristics TTL (time to live) in milliseconds property.Provides a builder method for the IO heuristics TTL (time to live) property returning the builder for applying multiple build operations.Provides a mutator for a IO heuristics TTL (time to live) in milliseconds property.AnLengthSegment
enriches aSegment
with an allocation declaration computed from the referencedTransmission
.AnLengthSegmentDecoratorSegment
enriches aSegment
with an allocation declaration being prefixed to the enrichedSegment
.Provides an accessor for a length width (in bytes) property.Provides a builder method for a length width (in bytes) property returning the builder for applying multiple build operations.Provides a mutator for a length width (in bytes) property.TheLongArraySection
is an implementation of aSection
carrying a long array as payload.TheLongSegment
is an implementation of aSegment
carrying in long value as payload.TheLoopbackPort
is an in-memory implementation of aPort
which loops its output directly back to its input.TheLoopbackPortHub
is a plain implementation of aPortHub
serving an infinite number ofLoopbackPort
instances: When callingLoopbackPortHub.toPort(String)
and the such port is unknown, then it is created (and from then on known).TheMagicBytes
enumeration provides various predefined magic bytes for common use cases.Provides an accessor for a magic byte array property.Provides a builder method for a magic byte array property returning the builder for applying multiple build operations.Provides a mutator for a magic byte array property.Provides a magic byte array property.Provides an accessor for a magic bytes length property.Provides a builder method for a magic bytes length property returning the builder for applying multiple build operations.Provides a mutator for a magic bytes length property.Magic bytes are usually found (somewhere) at the beginning of a file or a stream.THeMagicBytesSectionMultiplexer
dispatches a transmission to one of the aggregatedSection
instances depending on the magic number provided by the transmission.Magic bytes are usually found (somewhere) at the beginning of a file or a stream.Magic bytes are usually found (somewhere) at the beginning of a file or a stream.THeMagicBytesSegmentMultiplexer
dispatches a transmission to one of the aggregatedSegment
instances depending on the magic number provided by the transmission.Thrown in case there is no such port found.TheNumberSegment
is an implementation of aSegment
carrying in long an integer value with a configurable width (in bytes) as payload.Provides an accessor for an output return stream property.Provides a mutator for an output return stream property.Provides a mutator for an output return stream property.ThePacketInputStream
wraps anInputStream
and chunks any data to be written into packets with a sequence number and a block of data.Builder to buildPacketInputStream
instances.Provides an accessor for a packet length width (in bytes) property.Provides a builder method for a packet length width (in bytes) property returning the builder for applying multiple build operations.Provides a mutator for a packet length width (in bytes) property.Provides an accessor for a packet magic bytes property.Provides a builder method for a packet magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a packet magic bytes property.ThePacketOutputStream
wraps anOutputStream
and chunks any data to be written into packets with a sequence number, a block of data and a CRC checksum.Builder to buildStopAndWaitPacketInputStream
instances.Provides an accessor for a packetSegmentPackager
property.Provides a builder method for a packetSegmentPackager
property returning the builder for applying multiple build operations.Provides a mutator for a packetSegmentPackager
property.ThePayloadSection
interfaces defines aSection
with a payload.ThePayloadSegment
interfaces defines aSegment
with a payload.APayloadTransmission
represents aTransmission
carrying a payload (value).Provides an accessor for a ping magic bytes property.Provides a builder method for a ping magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a ping magic bytes property.Provides an accessor for a ping retry number.Provides a builder method for a ping retry number returning the builder for applying multiple build operations.Provides a mutator for a ping retry number.Provides an accessor for a ping timeout in milliseconds property.Provides a builder method for the ping timeout property returning the builder for applying multiple build operations.Provides a mutator for a ping timeout in milliseconds property.Provides an accessor for a pong magic bytes property.Provides a builder method for a pong magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a pong magic bytes property.APort
enriches aSerialTransceiver
withPortMetrics
describing theSerialTransceiver
's physical properties.ThePortMetrics
describe aPort
's properties.Provides an accessor for aPortMetrics
property.Provides a builder method for aPortMetrics
property returning the builder for applying multiple build operations.Provides a mutator for aPortMetrics
property.Provides an accessor for a RTR ("ready-to-receive") magic bytes property.Provides a builder method for a RTR ("ready-to-receive") magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a RTR ("ready-to-receive") magic bytes property.Provides an accessor for a RTR ("ready-to-receive") retry number.Provides a builder method for a RTR ("ready-to-receive") retry number returning the builder for applying multiple build operations.Provides a mutator for a RTR ("ready-to-receive") retry number.TheReadyToReceiveSectionDecorator
class implements a decorator providingReadyToReceiveTransmission
functionality for aSegment
.Builder to buildReadyToReceiveSectionDecorator
instances.TheReadyToReceiveSegmentDecorator
class implements a decorator providingReadyToReceiveTransmission
functionality for aSegment
.Builder to buildReadyToReceiveSegmentDecorator
instances .Provides an accessor for aSegmentPackager
RTR ("ready-to-receive") property.Provides a builder method for aSegmentPackager
RTR ("ready-to-receive") property returning the builder for applying multiple build operations.Provides a mutator for aSegmentPackager
RTR ("ready-to-receive") property.Provides an accessor for a RTR ("ready-to-receive") timeout in milliseconds property.Provides a builder method for a the RTR ("ready-to-receive") timeout property returning the builder for applying multiple build operations.Provides a mutator for a RTR ("ready-to-receive") timeout in milliseconds property.TheReadyToReceiveTransmission
interface defines functionality for achieving a RTR "software" handshake between a receiver having the active RTR ("ready-to-receive") role and a transmitter being CTS ("clear-to-send") where the transmitter waits for a RTR signal from the receiver (the receiver signals to be ready for receiving data by issuing an RTR signal to the transmitter):TRANSMITTER RECEIVER | | Wait till enquiry-timeout | | Send RTR magic-bytes for RTR magic-bytes |←-----RTR------| Try RTR retry-number of times | | Wait till RTR retry-timeout/retry Send payload upon RTR | | magic-bytes or break-out |----PAYLOAD---→| Receive payload upon enquiry-timeout | |
Handshake specific signals are only transmitted through the return channel, the data channel is only used indirectly for handshaking by transporting the payload data in response to the return channel signals.Provides an accessor for a RTS ("ready-to-send") magic bytes property.Provides a builder method for a RTS ("ready-to-send") magic bytes property returning the builder for applying multiple build operations.Provides a mutator for a RTS ("ready-to-send") magic bytes property.Provides an accessor for a RTS ("ready-to-send") retry number.Provides a builder method for a RTS ("ready-to-send") retry number returning the builder for applying multiple build operations.Provides a mutator for a RTS ("ready-to-send") retry number.TheReadyToSendSectionDecorator
class implements a decorator providingReadyToSendTransmission
functionality for aSegment
.Builder to buildReadyToSendSectionDecorator
instances.TheReadyToSendSegmentDecorator
class implements a decorator providingReadyToSendTransmission
functionality for aSegment
.Builder to buildReadyToSendSegmentDecorator
instances.Provides an accessor for aSegmentPackager
RTS ("ready-to-send") property.Provides a builder method for aSegmentPackager
RTS ("ready-to-send") property returning the builder for applying multiple build operations.Provides a mutator for aSegmentPackager
RTS ("ready-to-send") property.Provides an accessor for a RTS ("ready-to-send") timeout in milliseconds property.Provides a builder method for a the RTS ("ready-to-send") timeout property returning the builder for applying multiple build operations.Provides a mutator for a RTS ("ready-to-send") timeout in milliseconds property.TheReadyToSendTransmission
interface defines functionality for achieving an RTS "software" handshake between a transmitter having the active RTS ("ready-to-send") role and a receiver confirming being CTS ("clear-to-send") where the receiver waits for a RTS signal from the transmitter (the transmitter signals to be ready for sending data by issuing an RTS signal to the receiver).TheSection
interface enables an implementing type to provide aSequence
representation of itself or to transmit itsSequence
representation through anOutputStream
(with an optional feedbackInputStream
) as ofTransmission.transmitTo(OutputStream, InputStream)
and to initialize with aSequence
representation for itself or to receive aSequence
representation for itself through anInputStream
(with an optional feedbackOutputStream
) as ofSection.receiveFrom(InputStream, int, OutputStream)
.Default implementation of theSection
interface providing an implementation of theSection.SectionMixin.receiveFrom(InputStream, int, OutputStream)
method using theSection.fromTransmission(Sequence, int)
method or theSection.fromTransmission(Sequence, int, int)
method..TheSegment
interface enables an implementing type to provide aSequence
representation of itself or to transmit itsSequence
representation through anOutputStream
(with an optional feedbackInputStream
) as ofTransmission.transmitTo(OutputStream, InputStream)
and to initialize with aSequence
representation for itself or to receive aSequence
representation for itself through anInputStream
(with an optional feedbackOutputStream
) as ofSegment.receiveFrom(InputStream, OutputStream)
.Default implementation of theSegment
interface providing an implementation of theSegment.SegmentMixin.receiveFrom(InputStream, OutputStream)
method using theSegment.fromTransmission(Sequence)
method or theSegment.fromTransmission(Sequence, int)
method.ASegmentArraySection
is aSegment
consisting ofSegment
elements with each element of presumably different lengths ( in contrast to theFixedSegmentArraySection
).ASegmentConsumer
consumes aSegment
and is used to create lambda expressions used for asynchronous callback.TheSegmentDestination
is used to receiveSegment
instances in a unified way.TheSegmentPackager
interface defines methods to package (wrap) aSegment
e.g. with aCrcSegmentDecorator
.Dummy implementation of aSegmentPackager
just passing through providedSegment
instances.TheSegmentReceiver
is used to receiveSegment
instances in a unified way.ASegmentResult
instance is issued by theSerialReceiver
to receive aTransmission
's data asynchronously.TheSegmentSource
is used to sendSegment
instances in a unified way.Combines theSegmentTransmitter
andSegmentReceiver
functionality in a single interface to be implemented by a single class so thatSegmentTransmitter
andSegmentReceiver
functionality can be provided by a single instance.TheSegmentTransmitter
is used to transmitSegment
instances in a unified way.ASequence
abstracts a byte field providing means to applying complex operations on that byte field.Provides an accessor for aSequence
property.Provides a builder method for a segment property returning the builder for applying multiple build operations.Provides a mutator for a segment property.Provides an accessor for a sequence number property.Provides a builder method for a sequence number property returning the builder for applying multiple build operations.Provides a mutator for a sequence number property.Provides an accessor for aConcatenateMode
property.Provides a builder method for a sequence numberConcatenateMode
property returning the builder for applying multiple build operations.Provides a mutator for a sequence numberConcatenateMode
property.Provides an accessor for a sequence number initial value property.Provides a builder method for a sequence number initial value property returning the builder for applying multiple build operations.Provides a mutator for a sequence number initial value property.Convenience class for theNumberSegment
usingTransmissionMetrics
sequence number related properties to configure theSequenceNumberSegment
(being an accordingly configuredNumberSegment
).Provides an accessor for a sequence number width (in bytes) property.Provides a builder method for a sequence number width (in bytes) property returning the builder for applying multiple build operations.Provides a mutator for a sequence number width (in bytes) property.Base exception for this package.ASerialReceiver
is used to read data from a serial port or the like.The purpose of aSerialSchema
is to automatically outline and generate documentation of serial data (structures).ASerialTransmitter
is used to write data to a serial port or the like.TheShortArraySection
is an implementation of aSection
carrying a short array as payload.TheShortSegment
is an implementation of aSegment
carrying in short value as payload.TheStopAndWaitPacketInputStream
wraps anInputStream
and chunks any data to be written into packets with a sequence number and a block of data.Builder to buildStopAndWaitPacketInputStream
instances.TheStopAndWaitPacketOutputStream
wraps anOutputStream
and chunks any data to be written into packets with a sequence number, a block of data and a CRC checksum.Builder to buildStopAndWaitPacketInputStream
instances.AStopAndWaitPacketStreamSectionDecorator
chunks any outgoing stream (OutputStream
) into blocks of definite length and reassembles any incoming streams (InputStream
) from blocks of definite size into a contiguous stream.Builder to buildStopAndWaitSegmentDecorator
instances.AStopAndWaitPacketStreamSegmentDecorator
chunks any outgoing stream (OutputStream
) into blocks of definite length and reassembles any incoming streams (InputStream
) from blocks of definite size into a contiguous stream.Builder to buildStopAndWaitSegmentDecorator
instances.TheStopAndWaitPacketStreamTransmission
interface defines the base functionality required by aTransmission
instance for providing block stream functionality.TheStopAndWaitSectionDecorator
class implements a decorator providingStopAndWaitTransmission
functionality for aSection
.Builder to buildStopAndWaitSegmentDecorator
instances.TheStopAndWaitSegmentDecorator
class implements a decorator providingStopAndWaitTransmission
functionality for aSegment
.Builder to buildStopAndWaitSegmentDecorator
instances.TheStopAndWaitTransmission
is the most simple implementation of the ARQ (Automatic repeat request) protocol.Builder to buildStringSegment
instances.TheTransmission
interface enables an implementing type to provide aSequence
representation of itself or to transmit itsSequence
representation through anOutputStream
(with an optional feedbackInputStream
) as ofTransmission.transmitTo(OutputStream, InputStream)
.Default implementation of theTransmission
interface providing an implementation of theTransmission.TransmissionMixin.transmitTo(OutputStream, InputStream)
method using theTransmission.toSequence()
method.Provides an accessor for aTransmission
property (as of the decorator pattern).Provides a builder method for aTransmission
property returning the builder for applying multiple build operations.Provides a mutator for aTransmission
property.Thrown in case a givenTransmission
cannot be processed.TheTransmissionMetrics
interface represents common parameters required when configuring a transmission.Builder to buildTransmissionMetrics
.Provides an accessor for aTransmissionMetrics
property.Provides a builder method for aTransmissionMetrics
property returning the builder for applying multiple build operations.Provides a mutator for aTransmissionMetrics
property.Provides an accessor for a transmission retry number.Provides a builder method for a transmission retry number returning the builder for applying multiple build operations.Provides a mutator for a transmission retry number.Thrown in case a givenSequence
cannot be processed.Provides an accessor for a transmission timeout in milliseconds property.Provides a builder method for the transmission timeout property returning the builder for applying multiple build operations.Provides a mutator for a transmission timeout in milliseconds property.