Interface SerialTransmitter
- All Superinterfaces:
ByteSource, BytesSource, BytesTransmitter, ByteTransmitter, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionStatusAccessor, Flushable, Flushable, LinkComponent, LinkComponent.LinkAutomaton, Openable, Openable.OpenAutomaton, OpenedAccessor, OutputStreamAccessor, SegmentSource, SegmentTransmitter, Transmittable
- All Known Subinterfaces:
Port<PM>, SerialTransceiver
- All Known Implementing Classes:
AbstractPort, AbstractPortDecorator, CrossoverLoopbackPort, LoopbackPort
public interface SerialTransmitter
extends BytesTransmitter, SegmentTransmitter, LinkComponent.LinkAutomaton
A
SerialTransmitter is used to write data to a serial port or the
like.-
Nested Class Summary
Nested 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 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.OutputStreamProperty -
Method Summary
Modifier and TypeMethodDescriptiondefault voidflush()default voidtransmitBytes(byte[] aBytes) default voidtransmitBytes(byte[] aBytes, int aOffset, int aLength) default <SEGMENT extends Segment>
voidtransmitSegment(SEGMENT aSegment) Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.voidtransmitSequence(Sequence aSequence) Transmits aSequence(and blocks this thread) till all it's data has been sent.default voidtransmitSequence(Sequence aSequence, int aOffset, int aLength) Transmits aSequence.Methods inherited from interface BytesSource
transmitByteMethods inherited from interface BytesTransmitter
getOutputStreamMethods inherited from interface Closable
close, 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
open, openUncheckedMethods inherited from interface Openable.OpenAutomaton
isOpenableMethods inherited from interface SegmentTransmitter
doTransmitSegment, doTransmitSegment
-
Method Details
-
transmitBytes
- Specified by:
transmitBytesin interfaceBytesSource- Throws:
IOException
-
transmitBytes
- Specified by:
transmitBytesin interfaceBytesSource- Specified by:
transmitBytesin interfaceBytesTransmitter- Throws:
IOException
-
transmitSequence
Transmits aSequence.- Parameters:
aSequence- TheSequencecontaining the data to be send.aOffset- The offset from where to take the chunk data.aLength- The number of bytes to take, beginning at the provided offset.- Throws:
IOException- thrown in case of I/O issues (e.g. a timeout) while sending
-
transmitSequence
Transmits aSequence(and blocks this thread) till all it's data has been sent.- Parameters:
aSequence- TheSequencecontaining the data to be send.- Throws:
IOException- thrown in case of I/O issues (e.g. a timeout) while sending
-
transmitSegment
Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.- Specified by:
transmitSegmentin interfaceSegmentSource- 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.
-
flush
- Specified by:
flushin interfaceByteTransmitter- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceSegmentTransmitter- Throws:
IOException
-