- java.lang.Object
-
- org.refcodes.io.AbstractBytesDestination
-
- org.refcodes.io.AbstractBytesReceiver
-
- org.refcodes.codec.ModemDecoderImpl
-
- All Implemented Interfaces:
Decoder,DemodulatorStatusAccessor,ModemDecoder,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.OpenedAccessor,org.refcodes.io.Availability,org.refcodes.io.ByteDestination,org.refcodes.io.ByteReceiver,org.refcodes.io.BytesDestination,org.refcodes.io.BytesReceiver,org.refcodes.io.Receivable,org.refcodes.io.Skippable,org.refcodes.io.TimeoutInputStreamAccessor,org.refcodes.mixin.InputStreamAccessor,org.refcodes.mixin.Loggable
- Direct Known Subclasses:
ModemDecoderImpl.ModemByteDecoderProviderImpl,ModemDecoderImpl.ModemShortDecoderProviderImpl
public class ModemDecoderImpl extends org.refcodes.io.AbstractBytesReceiver implements ModemDecoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModemDecoderImpl.ModemByteDecoderProviderImplVanilla plain implementation of theModemDecoder.ModemByteDecoderProviderinterface to be used withBytesDestination(BytesReceiver) instances.static classModemDecoderImpl.ModemShortDecoderProviderImplVanilla plain implementation of theModemDecoder.ModemByteDecoderProviderinterface to be used withBytesDestination(BytesReceiver) instances.-
Nested classes/interfaces inherited from class org.refcodes.io.AbstractBytesReceiver
org.refcodes.io.AbstractBytesReceiver.ConnectableAutomaton
-
Nested classes/interfaces inherited from interface org.refcodes.io.BytesReceiver
org.refcodes.io.BytesReceiver.ReceiverInputStream
-
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.codec.DemodulatorStatusAccessor
DemodulatorStatusAccessor.DemodulatorStatusBuilder<B extends DemodulatorStatusAccessor.DemodulatorStatusBuilder<B>>, DemodulatorStatusAccessor.DemodulatorStatusMutator, DemodulatorStatusAccessor.DemodulatorStatusProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.InputStreamAccessor
org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<B extends org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<?>>, org.refcodes.mixin.InputStreamAccessor.InputStreamMutator, org.refcodes.mixin.InputStreamAccessor.InputStreamProperty
-
Nested classes/interfaces inherited from interface org.refcodes.codec.ModemDecoder
ModemDecoder.ModemByteDecoderProvider, ModemDecoder.ModemShortDecoderProvider
-
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.io.TimeoutInputStreamAccessor
org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B extends org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<?>>, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamMutator, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected org.refcodes.io.BytesReceiver_byteReceiverprotected LinkedBlockingQueue<Byte>_datagramQueueprotected ModemMetrics_modemMetricsprotected org.refcodes.io.ShortsReceiver_shortReceiver
-
Constructor Summary
Constructors Modifier Constructor Description protectedModemDecoderImpl(ModemMetrics aModemMetrics)ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesDestination aByteProvider)Instantiates a new modem decoder impl.ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesReceiver aByteReceiver)Instantiates a new modem decoder impl.ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsDestination aShortProvider)Instantiates a new modem decoder impl.ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsReceiver aShortReceiver)Instantiates a new modem decoder impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()DemodulatorStatusgetDemodulatorStatus()Retrieves the Demodulator-Status from the Demodulator-Status property.byte[]receiveAllBytes()bytereceiveByte()byte[]receiveBytes(int aMaxLength)-
Methods inherited from class org.refcodes.io.AbstractBytesReceiver
close, getConnectionStatus, isClosable, isClosed, isOpenable, isOpened, open, setConnectionStatus
-
Methods inherited from class org.refcodes.io.AbstractBytesDestination
pushDatagram, pushDatagrams, pushDatagrams
-
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.BytesReceiver
getInputStream, getInputStream, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skip
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
-
-
-
-
Field Detail
-
_modemMetrics
protected ModemMetrics _modemMetrics
-
_datagramQueue
protected LinkedBlockingQueue<Byte> _datagramQueue
-
_byteReceiver
protected org.refcodes.io.BytesReceiver _byteReceiver
-
_shortReceiver
protected org.refcodes.io.ShortsReceiver _shortReceiver
-
-
Constructor Detail
-
ModemDecoderImpl
public ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesDestination aByteProvider)
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics- the modem metricsaByteProvider- the byte provider
-
ModemDecoderImpl
public ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsDestination aShortProvider)
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics- the modem metricsaShortProvider- the short provider
-
ModemDecoderImpl
public ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.ShortsReceiver aShortReceiver)
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics- the modem metricsaShortReceiver- the short receiver
-
ModemDecoderImpl
public ModemDecoderImpl(ModemMetrics aModemMetrics, org.refcodes.io.BytesReceiver aByteReceiver)
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics- the modem metricsaByteReceiver- the byte receiver
-
ModemDecoderImpl
protected ModemDecoderImpl(ModemMetrics aModemMetrics)
-
-
Method Detail
-
receiveAllBytes
public byte[] receiveAllBytes()
- Specified by:
receiveAllBytesin interfaceorg.refcodes.io.BytesDestination- Specified by:
receiveAllBytesin interfaceorg.refcodes.io.BytesReceiver- Overrides:
receiveAllBytesin classorg.refcodes.io.AbstractBytesReceiver
-
available
public int available()
- Specified by:
availablein interfaceorg.refcodes.io.Availability- Specified by:
availablein interfaceorg.refcodes.io.Skippable- Overrides:
availablein classorg.refcodes.io.AbstractBytesReceiver
-
receiveBytes
public byte[] receiveBytes(int aMaxLength)
- Specified by:
receiveBytesin interfaceorg.refcodes.io.BytesDestination- Specified by:
receiveBytesin interfaceorg.refcodes.io.BytesReceiver- Overrides:
receiveBytesin classorg.refcodes.io.AbstractBytesReceiver
-
receiveByte
public byte receiveByte() throws IOException- Specified by:
receiveBytein interfaceorg.refcodes.io.ByteDestination- Specified by:
receiveBytein interfaceorg.refcodes.io.BytesDestination- Overrides:
receiveBytein classorg.refcodes.io.AbstractBytesReceiver- Throws:
IOException
-
getDemodulatorStatus
public DemodulatorStatus getDemodulatorStatus()
Retrieves the Demodulator-Status from the Demodulator-Status property.- Specified by:
getDemodulatorStatusin interfaceDemodulatorStatusAccessor- Returns:
- The Demodulator-Status stored by the Demodulator-Status property.
-
-