Interface SerialTransceiver
- All Superinterfaces:
Availability, ByteDestination, ByteReceiver, BytesDestination, ByteSource, BytesReceiver, BytesSource, BytesTransceiver, BytesTransmitter, ByteTransceiver, ByteTransmitter, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionStatusAccessor, Flushable, Flushable, InputStreamAccessor, LinkComponent, LinkComponent.LinkAutomaton, Openable, Openable.OpenAutomaton, OpenedAccessor, OutputStreamAccessor, Receivable, SegmentDestination, SegmentReceiver, SegmentSource, SegmentTransceiver, SegmentTransmitter, SerialReceiver, SerialTransmitter, Skippable, TimeoutInputStreamAccessor, Transmittable
- All Known Subinterfaces:
Port<PM>
- All Known Implementing Classes:
AbstractPort, AbstractPortDecorator, CrossoverLoopbackPort, LoopbackPort
public interface SerialTransceiver
extends BytesTransceiver, SegmentTransceiver, SerialTransmitter, SerialReceiver
-
Nested Class Summary
Nested classes/interfaces inherited from interface BytesReceiver
BytesReceiver.ReceiverInputStreamNested classes/interfaces inherited from interface BytesTransmitter
BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface Closable
Closable.CloseAutomaton, Closable.CloseBuilder<B>Nested classes/interfaces inherited from interface ClosedAccessor
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface ConnectableComponent
ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface ConnectionStatusAccessor
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface Flushable
Flushable.FlushBuilder<B>Nested classes/interfaces inherited from interface InputStreamAccessor
InputStreamAccessor.InputStreamBuilder<B>, InputStreamAccessor.InputStreamMutator, InputStreamAccessor.InputStreamPropertyNested classes/interfaces inherited from interface LinkComponent
LinkComponent.LinkAutomaton, LinkComponent.LinkComponentBuilder<B>Nested classes/interfaces inherited from interface Openable
Openable.OpenAutomaton, Openable.OpenBuilder<B>Nested classes/interfaces inherited from interface OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface OutputStreamAccessor
OutputStreamAccessor.OutputStreamBuilder<B>, OutputStreamAccessor.OutputStreamMutator, OutputStreamAccessor.OutputStreamPropertyNested classes/interfaces inherited from interface TimeoutInputStreamAccessor
TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B>, TimeoutInputStreamAccessor.TimeoutInputStreamMutator, TimeoutInputStreamAccessor.TimeoutInputStreamProperty -
Method Summary
Modifier and TypeMethodDescriptiondefault <SEGMENT extends Segment>
voidreceiveSegment(SEGMENT aSegment) Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence).default <SEGMENT extends Segment>
voidtransmitSegment(SEGMENT aSegment) Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.Methods inherited from interface Availability
hasAvailableMethods inherited from interface BytesDestination
receiveBytesMethods inherited from interface BytesReceiver
getInputStream, getInputStream, receiveAllBytes, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skipMethods inherited from interface BytesSource
transmitByteMethods inherited from interface BytesTransmitter
getOutputStreamMethods inherited from interface Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface Closable.CloseAutomaton
isClosableMethods inherited from interface ClosedAccessor
isClosedMethods inherited from interface ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface Flushable
flushUnchecked, isFlushableMethods inherited from interface Openable
openUncheckedMethods inherited from interface Openable.OpenAutomaton
isOpenableMethods inherited from interface SegmentReceiver
onReceiveSegment, onReceiveSegmentMethods inherited from interface SegmentTransmitter
doTransmitSegment, doTransmitSegment, flushMethods inherited from interface SerialReceiver
available, close, open, receiveByte, receiveBytes, receiveSegmentWithin, receiveSequence, receiveSequenceWithinMethods inherited from interface SerialTransmitter
flush, transmitBytes, transmitBytes, transmitSequence, transmitSequenceMethods inherited from interface Skippable
available, skipAvailable, skipAvailableExcept, skipAvailableTill, skipAvailableTillSilenceFor, skipAvailableTillSilenceFor, skipAvailableWithin, skipAvailableWithin, skipAvailableWithin
-
Method Details
-
receiveSegment
Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence). This method blocks till all bytes are read.- Specified by:
receiveSegmentin interfaceSegmentDestination- Specified by:
receiveSegmentin interfaceSerialReceiver- Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass of implementingSegmenttypes.- Parameters:
aSegment- TheSegmentto be (re-)initialized with the received data.- Throws:
IOException- thrown in case of I/O issues (e.g. a timeout) while receiving.
-
transmitSegment
Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.- Specified by:
transmitSegmentin interfaceSegmentSource- Specified by:
transmitSegmentin interfaceSerialTransmitter- Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass used.- Parameters:
aSegment- TheSegment's data to be sent.- Throws:
IOException- thrown in case of I/O issues (e.g. a timeout) while sending.
-