- All Superinterfaces:
org.refcodes.io.ByteSource,org.refcodes.io.BytesSource,org.refcodes.io.BytesTransmitter,org.refcodes.io.ByteTransmitter,org.refcodes.component.Closable,org.refcodes.component.Closable.CloseAutomaton,org.refcodes.component.ClosedAccessor,org.refcodes.component.ConnectableComponent,org.refcodes.component.ConnectableComponent.ConnectableAutomaton,org.refcodes.component.ConnectionStatusAccessor,Flushable,org.refcodes.component.Flushable,org.refcodes.component.LinkComponent,org.refcodes.component.LinkComponent.LinkAutomaton,org.refcodes.component.Openable,org.refcodes.component.Openable.OpenAutomaton,org.refcodes.component.OpenedAccessor,org.refcodes.mixin.OutputStreamAccessor,SegmentSource,SegmentTransmitter,org.refcodes.io.Transmittable
- All Known Subinterfaces:
Port<PM>,SerialTransceiver
- All Known Implementing Classes:
AbstractPort,AbstractPortDecorator,CrossoverLoopbackPort,LoopbackPort
public interface SerialTransmitter
extends org.refcodes.io.BytesTransmitter, SegmentTransmitter, org.refcodes.component.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 org.refcodes.io.BytesTransmitter
org.refcodes.io.BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface org.refcodes.component.Flushable
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.OutputStreamAccessor
org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<B extends org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<?>>, org.refcodes.mixin.OutputStreamAccessor.OutputStreamMutator, org.refcodes.mixin.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 org.refcodes.io.BytesSource
transmitByteMethods inherited from interface org.refcodes.io.BytesTransmitter
getOutputStreamMethods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUncheckedMethods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosableMethods inherited from interface org.refcodes.component.ClosedAccessor
isClosedMethods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface org.refcodes.component.Flushable
flushUnchecked, isFlushableMethods inherited from interface org.refcodes.component.Openable
open, openUncheckedMethods inherited from interface org.refcodes.component.Openable.OpenAutomaton
isOpenableMethods inherited from interface org.refcodes.serial.SegmentTransmitter
doTransmitSegment, doTransmitSegment
-
Method Details
-
transmitBytes
- Specified by:
transmitBytesin interfaceorg.refcodes.io.BytesSource- Throws:
IOException
-
transmitBytes
- Specified by:
transmitBytesin interfaceorg.refcodes.io.BytesSource- Specified by:
transmitBytesin interfaceorg.refcodes.io.BytesTransmitter- 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 interfaceorg.refcodes.io.ByteTransmitter- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceorg.refcodes.component.Flushable- Specified by:
flushin interfaceSegmentTransmitter- Throws:
IOException
-