Module org.refcodes.serial
Package org.refcodes.serial
Class AbstractStopAndWaitTransmissionDecorator<DECORATEE extends Transmission>
java.lang.Object
org.refcodes.serial.AbstractErrorCorrectionTransmissionDecorator<DECORATEE>
org.refcodes.serial.AbstractStopAndWaitTransmissionDecorator<DECORATEE>
- Type Parameters:
DECORATEE
- The decoratee type describing the according subclass to be enriched.
- All Implemented Interfaces:
Serializable
,org.refcodes.mixin.DecorateeAccessor<DECORATEE>
,org.refcodes.mixin.LengthAccessor
,org.refcodes.mixin.Schemable
,org.refcodes.numerical.EndianessAccessor
,AcknowledgeMagicBytesAccessor
,AcknowledgeRetryNumberAccessor
,AcknowledgeSegmentPackagerAccessor
,AcknowledgeTimeoutMillisAccessor
,ErrorCorrectionTransmission
,SequenceNumberAccessor
,StopAndWaitTransmission
,Transmission
,Transmission.TransmissionMixin
- Direct Known Subclasses:
StopAndWaitSectionDecorator
,StopAndWaitSegmentDecorator
public abstract class AbstractStopAndWaitTransmissionDecorator<DECORATEE extends Transmission>
extends AbstractErrorCorrectionTransmissionDecorator<DECORATEE>
implements StopAndWaitTransmission, org.refcodes.numerical.EndianessAccessor, SequenceNumberAccessor
The
AbstractStopAndWaitTransmissionDecorator
class implements a
decorator providing StopAndWaitTransmission
functionality for a
Transmission
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.serial.AcknowledgeMagicBytesAccessor
AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder<B extends AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesBuilder<B>>, AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesMutator, AcknowledgeMagicBytesAccessor.AcknowledgeMagicBytesProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.AcknowledgeRetryNumberAccessor
AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberBuilder<B extends AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberBuilder<B>>, AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberMutator, AcknowledgeRetryNumberAccessor.AcknowledgeRetryNumberProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.AcknowledgeSegmentPackagerAccessor
AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerBuilder<B extends AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerBuilder<B>>, AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerMutator, AcknowledgeSegmentPackagerAccessor.AcknowledgeSegmentPackagerProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.AcknowledgeTimeoutMillisAccessor
AcknowledgeTimeoutMillisAccessor.AcknowledgeTimeoutMillisBuilder<B extends AcknowledgeTimeoutMillisAccessor.AcknowledgeTimeoutMillisBuilder<B>>, AcknowledgeTimeoutMillisAccessor.AcknowledgeTimeoutMillisMutator, AcknowledgeTimeoutMillisAccessor.AcknowledgeTimeoutMillisProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.DecorateeAccessor
org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE extends Object,
B extends org.refcodes.mixin.DecorateeAccessor.DecorateeBuilder<DECORATEE, B>>, org.refcodes.mixin.DecorateeAccessor.DecorateeMutator<DECORATEE extends Object>, org.refcodes.mixin.DecorateeAccessor.DecorateeProperty<DECORATEE extends Object> Nested classes/interfaces inherited from interface org.refcodes.numerical.EndianessAccessor
org.refcodes.numerical.EndianessAccessor.EndianessBuilder<B extends org.refcodes.numerical.EndianessAccessor.EndianessBuilder<B>>, org.refcodes.numerical.EndianessAccessor.EndianessMutator, org.refcodes.numerical.EndianessAccessor.EndianessProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.SequenceNumberAccessor
SequenceNumberAccessor.SequenceNumberBuilder<B extends SequenceNumberAccessor.SequenceNumberBuilder<B>>, SequenceNumberAccessor.SequenceNumberMutator, SequenceNumberAccessor.SequenceNumberProperty
Nested classes/interfaces inherited from interface org.refcodes.serial.Transmission
Transmission.TransmissionMixin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
protected MagicBytesSegment
protected Segment
protected SegmentPackager
protected NumberSegment
protected org.refcodes.numerical.Endianess
protected int
protected org.refcodes.mixin.ConcatenateMode
protected int
protected int
static final String
Fields inherited from class org.refcodes.serial.AbstractErrorCorrectionTransmissionDecorator
_acknowledgeRetryNumber, _acknowledgeTimeoutInMs, _decoratee, ACK_RETRY_NUMBER, ACK_TIMEOUT_IN_MS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Instantiates a new abstract stop and wait transmission decorator.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, SegmentPackager aAckSegmentPackager) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.AbstractStopAndWaitTransmissionDecorator
(DECORATEE aDecoratee, TransmissionMetrics aTransmissionMetrics) Constructs an according stop-and-wait decorator instance wrapping the given decoratee. -
Method Summary
Modifier and TypeMethodDescriptionboolean
byte[]
Returns the ACK bytes to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.int
Retrieves the number of retries from the acknowledge retry number.Retrieves theSegmentPackager
ACK property.long
The acknowledge timeout attribute in milliseconds.org.refcodes.numerical.Endianess
int
Determines the overall length of thisTransmission
.int
Retrieves the sequence number from the sequence number property.int
hashCode()
protected long
readSequenceNumber
(InputStream aInputStream) Reads a sequence number from theInputStream
.toSchema()
Provides theSequence
representation of thisTransmission
.org.refcodes.struct.SimpleTypeMap
Returns theSimpleTypeMap
representation of thisTransmission
.toString()
void
transmitTo
(OutputStream aOutputStream, InputStream aReturnStream) Transmits theSequence
representing the implementing type's instance to the givenOutputStream
.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.serial.Transmission
transmitTo, transmitTo
-
Field Details
-
ACK_MAGIC_BYTES
- See Also:
-
_acknowledgeMagicBytes
protected byte[] _acknowledgeMagicBytes -
_sequenceNumber
protected int _sequenceNumber -
_sequenceNumberWidth
protected int _sequenceNumberWidth -
_sequenceNumberInitValue
protected int _sequenceNumberInitValue -
_sequenceNumberConcatenateMode
protected org.refcodes.mixin.ConcatenateMode _sequenceNumberConcatenateMode -
_endianess
protected org.refcodes.numerical.Endianess _endianess -
_acknowledgeSegmentPackager
-
_acknowledgeSegment
-
_acknowledgeSequenceNumberSegment
-
_acknowledgeMagicBytesSegment
-
-
Constructor Details
-
AbstractStopAndWaitTransmissionDecorator
protected AbstractStopAndWaitTransmissionDecorator()Instantiates a new abstract stop and wait transmission decorator. -
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, TransmissionMetrics aTransmissionMetrics) Constructs an according stop-and-wait decorator instance wrapping the given decoratee. The configuration attributes are taken from theTransmissionMetrics
configuration object, though only those attributes are supported which are also supported by the other constructors!- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aTransmissionMetrics
- TheTransmissionMetrics
to be used for configuring this instance.
-
AbstractStopAndWaitTransmissionDecorator
Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, SegmentPackager aAckSegmentPackager) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAckSegmentPackager
- The ACKSegmentPackager
for packaging ACK responses.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aAckSegmentPackager
- The ACKSegmentPackager
for packaging ACK responses.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aAckSegmentPackager
- The ACKSegmentPackager
for packaging ACK responses.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aChecksumValidationMode
- The mode of operation when validating provided CRC checksums against calculated ones.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aChecksumValidationMode
- The mode of operation when validating provided CRC checksums against calculated ones.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aChecksumValidationMode
- The mode of operation when validating provided CRC checksums against calculated ones.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, org.refcodes.numerical.CrcAlgorithm aCrcAlgorithm, org.refcodes.mixin.ConcatenateMode aCrcChecksumConcatenateMode, org.refcodes.numerical.ChecksumValidationMode aChecksumValidationMode, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aCrcAlgorithm
- TheCrcAlgorithm
to be used for CRC checksum calculation.aCrcChecksumConcatenateMode
- The mode of concatenation to use when concatenating the CRC checksum with the transmission'sSequence
.aChecksumValidationMode
- The mode of operation when validating provided CRC checksums against calculated ones.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
AbstractStopAndWaitTransmissionDecorator
public AbstractStopAndWaitTransmissionDecorator(DECORATEE aDecoratee, int aSequenceNumberInitValue, int aSequenceNumberWidth, org.refcodes.mixin.ConcatenateMode aSequenceNumberConcatenateMode, byte[] aAcknowledgeMagicBytes, int aAckRetryNumber, long aAckTimeoutInMs, SegmentPackager aAckSegmentPackager, org.refcodes.numerical.Endianess aEndianess) Constructs an according stop-and-wait decorator instance wrapping the given decoratee.- Parameters:
aDecoratee
- The decoratee to be wrapped by the stop-and-wait decorator.aSequenceNumberInitValue
- The initial sequence number from where to start counting the blocks.aSequenceNumberWidth
- The width (in bytes) to be used for sequence number values.aSequenceNumberConcatenateMode
- The mode of concatenation to use when creating aSequence
from thisTransmission
and the decoratedTransmission
.aAcknowledgeMagicBytes
- The ACK character(s) to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.aAckRetryNumber
- The number of retries waiting for an ACK from the return channel.aAckTimeoutInMs
- The timeout in milliseconds to pend till the next retry.aAckSegmentPackager
- The ACKSegmentPackager
for packaging ACK responses.aEndianess
- TheEndianess
to use for integer (double) numbers and the like.
-
-
Method Details
-
transmitTo
Transmits theSequence
representing the implementing type's instance to the givenOutputStream
. Implementations providing error correction methods use the provided feedbackInputStream
to do some sort of "stop-and-wait ARQ" or apply similar methods to ensure correctness of the transmitted data.- Specified by:
transmitTo
in interfaceTransmission
- Specified by:
transmitTo
in interfaceTransmission.TransmissionMixin
- Parameters:
aOutputStream
- TheOutputStream
where to write this instance'sSequence
to.aReturnStream
- AnInputStream
being the return channel to handle "stop-and-wait ARQ" or the like in case of a bidirectional connection. Can be null in case we have a unidirectional connection.- Throws:
IOException
- thrown in case writing data to theOutputStream
caused problems.
-
toSchema
- Specified by:
toSchema
in interfaceorg.refcodes.mixin.Schemable
- Specified by:
toSchema
in interfaceTransmission
- Overrides:
toSchema
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
-
getSequenceNumber
public int getSequenceNumber()Retrieves the sequence number from the sequence number property.- Specified by:
getSequenceNumber
in interfaceSequenceNumberAccessor
- Returns:
- The sequence number stored by the sequence number property.
-
getAcknowledgeRetryNumber
public int getAcknowledgeRetryNumber()Retrieves the number of retries from the acknowledge retry number. A acknowledge retry number is the overall number of retries to use when counting retries.- Specified by:
getAcknowledgeRetryNumber
in interfaceAcknowledgeRetryNumberAccessor
- Overrides:
getAcknowledgeRetryNumber
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
- Returns:
- The number of retries stored by the acknowledge retry number.
-
getAcknowledgeTimeoutMillis
public long getAcknowledgeTimeoutMillis()The acknowledge timeout attribute in milliseconds.- Specified by:
getAcknowledgeTimeoutMillis
in interfaceAcknowledgeTimeoutMillisAccessor
- Overrides:
getAcknowledgeTimeoutMillis
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
- Returns:
- An long integer with the timeout in milliseconds.
-
getAcknowledgeMagicBytes
public byte[] getAcknowledgeMagicBytes()Returns the ACK bytes to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.- Specified by:
getAcknowledgeMagicBytes
in interfaceAcknowledgeMagicBytesAccessor
- Specified by:
getAcknowledgeMagicBytes
in interfaceStopAndWaitTransmission
- Returns:
- The ACK character.
-
getAcknowledgeSegmentPackager
Retrieves theSegmentPackager
ACK property.- Specified by:
getAcknowledgeSegmentPackager
in interfaceAcknowledgeSegmentPackagerAccessor
- Returns:
- The
SegmentPackager
stored by the ACKSegmentPackager
property.
-
getLength
public int getLength()Determines the overall length of thisTransmission
. In case of nestedTransmission
instances, all length values from all sub-segments are accumulated to the result as well.- Specified by:
getLength
in interfaceorg.refcodes.mixin.LengthAccessor
- Specified by:
getLength
in interfaceTransmission
- Overrides:
getLength
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
- Returns:
- The (overall) length of the
Transmission
(including any sub-segments).
-
toSequence
Provides theSequence
representation of thisTransmission
. In case of nestedTransmission
instances, allSequence
representations from all sub-segments are accumulated to the result as well. Caution, the Transmission (or its nestedTransmission
instances) may be backed by the returnedSequence
.- Specified by:
toSequence
in interfaceTransmission
- Overrides:
toSequence
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
- Returns:
- The according instance's
Sequence
.
-
getDecoratee
- Specified by:
getDecoratee
in interfaceorg.refcodes.mixin.DecorateeAccessor<DECORATEE extends Transmission>
- Overrides:
getDecoratee
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
-
getEndianess
public org.refcodes.numerical.Endianess getEndianess()- Specified by:
getEndianess
in interfaceorg.refcodes.numerical.EndianessAccessor
-
toString
- Overrides:
toString
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
-
equals
- Overrides:
equals
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
-
toSimpleTypeMap
public org.refcodes.struct.SimpleTypeMap toSimpleTypeMap()Returns theSimpleTypeMap
representation of thisTransmission
. In case this Transmission hasTransmission
children, then the children are queried as well and contained in the resultingSimpleTypeMap
. The aliases of the accordingTransmission
instances represent the resulting path to aTransmission
's final simple type.- Specified by:
toSimpleTypeMap
in interfaceTransmission
- Overrides:
toSimpleTypeMap
in classAbstractErrorCorrectionTransmissionDecorator<DECORATEE extends Transmission>
- Returns:
- The
SimpleTypeMap
representing thisTransmission
and (if any) its children, with the according aliases forming the paths to theTransmission
's values.
-
readSequenceNumber
Reads a sequence number from theInputStream
.- Parameters:
aInputStream
- TheInputStream
from which to read the sequence number.- Returns:
- The accordingly read sequence number.
- Throws:
IOException
- thrown in case of I/O problems.
-