java.lang.Object
org.refcodes.component.AbstractConnectableAutomaton
org.refcodes.codec.ModemEncoderImpl
- All Implemented Interfaces:
Flushable
,Encoder
,ModemEncoder
,ModulatorStatusAccessor
,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
,org.refcodes.component.Flushable
,org.refcodes.component.OpenedAccessor
,org.refcodes.io.ByteSource
,org.refcodes.io.BytesSource
,org.refcodes.io.BytesTransmitter
,org.refcodes.io.ByteTransmitter
,org.refcodes.io.Transmittable
,org.refcodes.mixin.OutputStreamAccessor
public class ModemEncoderImpl extends org.refcodes.component.AbstractConnectableAutomaton implements ModemEncoder
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.io.BytesTransmitter
org.refcodes.io.BytesTransmitter.TransmitterOutputStream
Nested 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.ClosedProperty
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
Nested 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.codec.ModemEncoder
ModemEncoder.ModemEncoderConsumer
Nested classes/interfaces inherited from interface org.refcodes.codec.ModulatorStatusAccessor
ModulatorStatusAccessor.ModulatorStatusBuilder<B extends ModulatorStatusAccessor.ModulatorStatusBuilder<B>>, ModulatorStatusAccessor.ModulatorStatusMutator, ModulatorStatusAccessor.ModulatorStatusProperty
Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
Nested 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
-
Field Summary
Fields Modifier and Type Field Description ModulatorStatus
_modulatorStatus
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModemEncoderImpl(ModemMetrics aModemMetrics)
ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesSource aByteConsumer)
ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesTransmitter aByteSender)
ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsSource aShortConsumer)
ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsTransmitter aShortSender)
-
Method Summary
Modifier and Type Method Description void
close()
void
flush()
ModulatorStatus
getModulatorStatus()
Retrieves the Modulator-Status from the Modulator-Status property.void
open()
protected void
open(org.refcodes.io.BytesSource aConnection)
protected void
open(org.refcodes.io.ShortsSource aConnection)
protected void
purge()
void
transmitBytes(byte[] aBytes, int aOffset, int aLength)
Methods inherited from class org.refcodes.component.AbstractConnectableAutomaton
getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, setConnectionStatus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.io.BytesSource
transmitAllBytes, transmitByte
Methods inherited from interface org.refcodes.io.BytesTransmitter
getOutputStream
Methods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUnchecked
Methods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosable
Methods inherited from interface org.refcodes.component.ClosedAccessor
isClosed
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
Methods inherited from interface org.refcodes.component.Flushable
flushUnchecked, isFlushable
-
Field Details
-
_modulatorStatus
-
-
Constructor Details
-
ModemEncoderImpl
-
ModemEncoderImpl
-
ModemEncoderImpl
public ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesTransmitter aByteSender) throws IOException- Throws:
IOException
-
ModemEncoderImpl
public ModemEncoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsTransmitter aShortSender) throws IOException- Throws:
IOException
-
ModemEncoderImpl
-
-
Method Details
-
transmitBytes
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesSource
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesTransmitter
- Throws:
IOException
-
getModulatorStatus
Description copied from interface:ModulatorStatusAccessor
Retrieves the Modulator-Status from the Modulator-Status property.- Specified by:
getModulatorStatus
in interfaceModulatorStatusAccessor
- Returns:
- The Modulator-Status stored by the Modulator-Status property.
-
flush
- Specified by:
flush
in interfaceorg.refcodes.io.ByteTransmitter
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Throws:
IOException
-
open
- Overrides:
open
in classorg.refcodes.component.AbstractConnectableAutomaton
- Throws:
IOException
-
close
- Specified by:
close
in interfaceorg.refcodes.component.Closable
- Overrides:
close
in classorg.refcodes.component.AbstractConnectableAutomaton
- Throws:
IOException
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
purge
protected void purge()
-