- All Superinterfaces:
AcknowledgeMagicBytesAccessor
,AcknowledgeRetryNumberAccessor
,AcknowledgeSegmentPackagerAccessor
,AcknowledgeTimeoutMillisAccessor
,ErrorCorrectionTransmission
,org.refcodes.mixin.LengthAccessor
,org.refcodes.mixin.Schemable<SerialSchema>
,Serializable
,Transmission
- All Known Implementing Classes:
AbstractStopAndWaitTransmissionDecorator
,StopAndWaitSectionDecorator
,StopAndWaitSegmentDecorator
public interface StopAndWaitTransmission
extends ErrorCorrectionTransmission, AcknowledgeMagicBytesAccessor, AcknowledgeSegmentPackagerAccessor
The
StopAndWaitTransmission
is the most simple implementation of the
ARQ (Automatic repeat request) protocol. Taken from the book "Serial
Programming": "... The sender sends a packet, then waits a little for an ACK.
As soon as it gets the ACK, it immediately sends the next packet. If the
sender doesn't hear the ACK in time, it starts over from the beginning,
sending the same packet again, until it does get an ACK ..." See
"https://en.wikibooks.org/wiki/Serial_Programming".-
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.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.Transmission
Transmission.TransmissionMixin
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the ACK bytes to be used by the return channel to transmit an ACK (acknowledge) response after successful receiving a transmission.Methods inherited from interface org.refcodes.serial.AcknowledgeRetryNumberAccessor
getAcknowledgeRetryNumber
Methods inherited from interface org.refcodes.serial.AcknowledgeSegmentPackagerAccessor
getAcknowledgeSegmentPackager
Methods inherited from interface org.refcodes.serial.AcknowledgeTimeoutMillisAccessor
getAcknowledgeTimeoutMillis
Methods inherited from interface org.refcodes.serial.Transmission
getLength, toSchema, toSequence, toSimpleTypeMap, transmitTo, transmitTo, transmitTo
-
Method Details
-
getAcknowledgeMagicBytes
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
- Returns:
- The ACK character.
-