Package org.refcodes.codec
Class ModemMetricsImpl
- java.lang.Object
-
- org.refcodes.codec.ModemMetricsImpl
-
- All Implemented Interfaces:
ChannelSelectorAccessor
,FrequencyThresholdAccessor
,ModemMetrics
,ModemModeAccessor
,ModulationFormatAccessor
,SampleRateAccessor
public class ModemMetricsImpl extends java.lang.Object implements ModemMetrics
The Class ModemMetricsImpl.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.codec.ChannelSelectorAccessor
ChannelSelectorAccessor.ChannelSelectorBuilder<B extends ChannelSelectorAccessor.ChannelSelectorBuilder<B>>, ChannelSelectorAccessor.ChannelSelectorMutator, ChannelSelectorAccessor.ChannelSelectorProperty
-
Nested classes/interfaces inherited from interface org.refcodes.codec.FrequencyThresholdAccessor
FrequencyThresholdAccessor.FrequencyThresholdBuilder<B extends FrequencyThresholdAccessor.FrequencyThresholdBuilder<B>>, FrequencyThresholdAccessor.FrequencyThresholdMutator, FrequencyThresholdAccessor.FrequencyThresholdProperty
-
Nested classes/interfaces inherited from interface org.refcodes.codec.ModemModeAccessor
ModemModeAccessor.ModemModeBuilder<B extends ModemModeAccessor.ModemModeBuilder<B>>, ModemModeAccessor.ModemModeMutator, ModemModeAccessor.ModemModeProperty
-
Nested classes/interfaces inherited from interface org.refcodes.codec.ModulationFormatAccessor
ModulationFormatAccessor.ModulationFormatBuilder<B extends ModulationFormatAccessor.ModulationFormatBuilder<B>>, ModulationFormatAccessor.ModulationFormatMutator, ModulationFormatAccessor.ModulationFormatProperty
-
Nested classes/interfaces inherited from interface org.refcodes.codec.SampleRateAccessor
SampleRateAccessor.SampleRateBuilder<B extends SampleRateAccessor.SampleRateBuilder<B>>, SampleRateAccessor.SampleRateMutator, SampleRateAccessor.SampleRateProperty
-
-
Constructor Summary
Constructors Constructor Description ModemMetricsImpl(SampleRate aSampleRate, ModulationFormat aModulationFormat, ChannelSelector aChannelSelector, ModemMode aModemModem, FrequencyThreshold aFrequencyThreshold)
Instantiates a new modem metrics impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelSelector
getChannelSelector()
Retrieves the channel selector from the channel selector property.FrequencyThreshold
getFrequencyThreshold()
Retrieves the frequency threshold from the frequency threshold property.ModemMode
getModemMode()
Retrieves the Modem-Mode from the Modem-Mode property.ModulationFormat
getModulationFormat()
Retrieves the modulation format from the pulse-code modulation format property.SampleRate
getSampleRate()
Retrieves the sample rate from the sample rate property.int
toHigherFrequencyUpperThreshold()
Calculates the upper threshold for the higher frequency.int
toLowerFrequencyUpperThreshold()
Calculates the upper threshold for the lower frequency.int
toSamplesPerBit()
Calculates the samples per bit.
-
-
-
Constructor Detail
-
ModemMetricsImpl
public ModemMetricsImpl(SampleRate aSampleRate, ModulationFormat aModulationFormat, ChannelSelector aChannelSelector, ModemMode aModemModem, FrequencyThreshold aFrequencyThreshold)
Instantiates a new modem metrics impl.- Parameters:
aSampleRate
- the sample rateaModulationFormat
- the modulation formataChannelSelector
- the channel selectoraModemModem
- the modem modemaFrequencyThreshold
- the frequency threshold
-
-
Method Detail
-
getSampleRate
public SampleRate getSampleRate()
Retrieves the sample rate from the sample rate property.- Specified by:
getSampleRate
in interfaceSampleRateAccessor
- Returns:
- The sample rate stored by the sample rate property.
-
getModulationFormat
public ModulationFormat getModulationFormat()
Retrieves the modulation format from the pulse-code modulation format property.- Specified by:
getModulationFormat
in interfaceModulationFormatAccessor
- Returns:
- The modulation format stored by the pulse-code modulation format property.
-
getChannelSelector
public ChannelSelector getChannelSelector()
Retrieves the channel selector from the channel selector property.- Specified by:
getChannelSelector
in interfaceChannelSelectorAccessor
- Returns:
- The channel selector stored by the channel selector property.
-
getModemMode
public ModemMode getModemMode()
Retrieves the Modem-Mode from the Modem-Mode property.- Specified by:
getModemMode
in interfaceModemModeAccessor
- Returns:
- The Modem-Mode stored by the Modem-Mode property.
-
getFrequencyThreshold
public FrequencyThreshold getFrequencyThreshold()
Retrieves the frequency threshold from the frequency threshold property.- Specified by:
getFrequencyThreshold
in interfaceFrequencyThresholdAccessor
- Returns:
- The frequency threshold stored by the frequency threshold property.
-
toHigherFrequencyUpperThreshold
public int toHigherFrequencyUpperThreshold()
Calculates the upper threshold for the higher frequency.- Specified by:
toHigherFrequencyUpperThreshold
in interfaceModemMetrics
- Returns:
- The according threshold.
-
toLowerFrequencyUpperThreshold
public int toLowerFrequencyUpperThreshold()
Calculates the upper threshold for the lower frequency.- Specified by:
toLowerFrequencyUpperThreshold
in interfaceModemMetrics
- Returns:
- The according threshold.
-
toSamplesPerBit
public int toSamplesPerBit()
Calculates the samples per bit.- Specified by:
toSamplesPerBit
in interfaceModemMetrics
- Returns:
- The according number of samples.
-
-