java.lang.Object
org.refcodes.codec.ModemMetricsImpl
- All Implemented Interfaces:
ChannelSelectorAccessor
,FrequencyThresholdAccessor
,ModemMetrics
,ModemModeAccessor
,ModulationFormatAccessor
,SampleRateAccessor
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
ConstructorDescriptionModemMetricsImpl
(SampleRate aSampleRate, ModulationFormat aModulationFormat, ChannelSelector aChannelSelector, ModemMode aModemModem, FrequencyThreshold aFrequencyThreshold) Instantiates a new modem metrics impl. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the channel selector from the channel selector property.Retrieves the frequency threshold from the frequency threshold property.Retrieves the Modem-Mode from the Modem-Mode property.Retrieves the modulation format from the pulse-code modulation format property.Retrieves the sample rate from the sample rate property.int
Calculates the upper threshold for the higher frequency.int
Calculates the upper threshold for the lower frequency.int
Calculates the samples per bit.
-
Constructor Details
-
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 Details
-
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
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
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
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
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.
-