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.ChannelSelectorPropertyNested classes/interfaces inherited from interface org.refcodes.codec.FrequencyThresholdAccessor
FrequencyThresholdAccessor.FrequencyThresholdBuilder<B extends FrequencyThresholdAccessor.FrequencyThresholdBuilder<B>>, FrequencyThresholdAccessor.FrequencyThresholdMutator, FrequencyThresholdAccessor.FrequencyThresholdPropertyNested classes/interfaces inherited from interface org.refcodes.codec.ModemModeAccessor
ModemModeAccessor.ModemModeBuilder<B extends ModemModeAccessor.ModemModeBuilder<B>>, ModemModeAccessor.ModemModeMutator, ModemModeAccessor.ModemModePropertyNested classes/interfaces inherited from interface org.refcodes.codec.ModulationFormatAccessor
ModulationFormatAccessor.ModulationFormatBuilder<B extends ModulationFormatAccessor.ModulationFormatBuilder<B>>, ModulationFormatAccessor.ModulationFormatMutator, ModulationFormatAccessor.ModulationFormatPropertyNested classes/interfaces inherited from interface org.refcodes.codec.SampleRateAccessor
SampleRateAccessor.SampleRateBuilder<B extends SampleRateAccessor.SampleRateBuilder<B>>, SampleRateAccessor.SampleRateMutator, SampleRateAccessor.SampleRateProperty -
Constructor Summary
ConstructorsConstructorDescriptionModemMetricsImpl(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.intCalculates the upper threshold for the higher frequency.intCalculates the upper threshold for the lower frequency.intCalculates 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:
getSampleRatein 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:
getModulationFormatin 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:
getChannelSelectorin interfaceChannelSelectorAccessor- Returns:
- The channel selector stored by the channel selector property.
-
getModemMode
Retrieves the Modem-Mode from the Modem-Mode property.- Specified by:
getModemModein interfaceModemModeAccessor- Returns:
- The Modem-Mode stored by the Modem-Mode property.
-
getFrequencyThreshold
Retrieves the frequency threshold from the frequency threshold property.- Specified by:
getFrequencyThresholdin 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:
toHigherFrequencyUpperThresholdin interfaceModemMetrics- Returns:
- The according threshold.
-
toLowerFrequencyUpperThreshold
public int toLowerFrequencyUpperThreshold()Calculates the upper threshold for the lower frequency.- Specified by:
toLowerFrequencyUpperThresholdin interfaceModemMetrics- Returns:
- The according threshold.
-
toSamplesPerBit
public int toSamplesPerBit()Calculates the samples per bit.- Specified by:
toSamplesPerBitin interfaceModemMetrics- Returns:
- The according number of samples.
-