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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Vanilla plain implementation of theModemDecoder.ModemByteDecoderProvider
interface to be used withBytesDestination
(BytesReceiver
) instances.static class
Vanilla plain implementation of theModemDecoder.ModemByteDecoderProvider
interface 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
Modifier and TypeFieldDescriptionprotected org.refcodes.io.BytesReceiver
protected LinkedBlockingQueue<Byte>
protected ModemMetrics
protected org.refcodes.io.ShortsReceiver
Fields inherited from class org.refcodes.io.AbstractBytesReceiver
_automaton
Fields inherited from class org.refcodes.io.AbstractBytesDestination
DATAGRAM_QUEUE_SIZE
Fields inherited from interface org.refcodes.mixin.Loggable
RUNTIME_LOGGER_CLASS, RUNTIME_LOGGER_FACTORY_CLASS, RUNTIME_LOGGER_FACTORY_METHOD
-
Constructor Summary
ModifierConstructorDescriptionprotected
ModemDecoderImpl
(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
Modifier and TypeMethodDescriptionint
Retrieves the Demodulator-Status from the Demodulator-Status property.byte[]
byte
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.Availability
hasAvailable
Methods inherited from interface org.refcodes.io.BytesDestination
receiveBytes
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.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.mixin.Loggable
alert, alert, critical, critical, debug, error, info, notice, panic, trace, warn, warn
Methods inherited from interface org.refcodes.io.Skippable
skipAvailable, skipAvailableExcept, skipAvailableTill, skipAvailableTillSilenceFor, skipAvailableTillSilenceFor, skipAvailableWithin, skipAvailableWithin, skipAvailableWithin
-
Field Details
-
_modemMetrics
-
_datagramQueue
-
_byteReceiver
protected org.refcodes.io.BytesReceiver _byteReceiver -
_shortReceiver
protected org.refcodes.io.ShortsReceiver _shortReceiver
-
-
Constructor Details
-
ModemDecoderImpl
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
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics
- the modem metricsaShortReceiver
- the short receiver
-
ModemDecoderImpl
Instantiates a new modem decoder impl.- Parameters:
aModemMetrics
- the modem metricsaByteReceiver
- the byte receiver
-
ModemDecoderImpl
-
-
Method Details
-
receiveAllBytes
public byte[] receiveAllBytes()- Specified by:
receiveAllBytes
in interfaceorg.refcodes.io.BytesDestination
- Specified by:
receiveAllBytes
in interfaceorg.refcodes.io.BytesReceiver
- Overrides:
receiveAllBytes
in classorg.refcodes.io.AbstractBytesReceiver
-
available
public int available()- Specified by:
available
in interfaceorg.refcodes.io.Availability
- Specified by:
available
in interfaceorg.refcodes.io.Skippable
- Overrides:
available
in classorg.refcodes.io.AbstractBytesReceiver
-
receiveBytes
public byte[] receiveBytes(int aMaxLength) - Specified by:
receiveBytes
in interfaceorg.refcodes.io.BytesDestination
- Specified by:
receiveBytes
in interfaceorg.refcodes.io.BytesReceiver
- Overrides:
receiveBytes
in classorg.refcodes.io.AbstractBytesReceiver
-
receiveByte
- Specified by:
receiveByte
in interfaceorg.refcodes.io.ByteDestination
- Specified by:
receiveByte
in interfaceorg.refcodes.io.BytesDestination
- Overrides:
receiveByte
in classorg.refcodes.io.AbstractBytesReceiver
- Throws:
IOException
-
getDemodulatorStatus
Retrieves the Demodulator-Status from the Demodulator-Status property.- Specified by:
getDemodulatorStatus
in interfaceDemodulatorStatusAccessor
- Returns:
- The Demodulator-Status stored by the Demodulator-Status property.
-