diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-08-17 20:48:35 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-23 22:47:38 +0200 |
commit | 9fa00984d8e5d04bf911f8d6d1ca818ca8e9fd1f (patch) | |
tree | d2e38f7ea428b4e06e1daf16fa0b1c933fb40dda /gr-digital/python/digital/qpsk.py | |
parent | b219a8d183e339b6fec2d81284a988037a2d0180 (diff) |
Delete deprecated (q)d/qpsk and qam python hier blocks.
Fixes #1081.
These blocks were just overly specific wrappers for RRC + constellation
decoders/encoders.
With the nice constellation objects, no need to keep these around.
Note that they are still in use as *possible* constellations
(runtime-detected) in examples like narrowband/tunnel.py, but reducing
these in functionality is inavoidable at this point. Progress of
updating them is tracked in #1956.
Diffstat (limited to 'gr-digital/python/digital/qpsk.py')
-rw-r--r-- | gr-digital/python/digital/qpsk.py | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/gr-digital/python/digital/qpsk.py b/gr-digital/python/digital/qpsk.py index 8303883992..b8ad4cbd90 100644 --- a/gr-digital/python/digital/qpsk.py +++ b/gr-digital/python/digital/qpsk.py @@ -50,83 +50,6 @@ def qpsk_constellation(mod_code=_def_mod_code): return digital.constellation_qpsk() # ///////////////////////////////////////////////////////////////////////////// -# QPSK modulator -# ///////////////////////////////////////////////////////////////////////////// - -class qpsk_mod(generic_mod): - """ - Hierarchical block for RRC-filtered QPSK modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - differential: Whether to use differential encoding (boolean). - """ - # See generic_mod for additional arguments - __doc__ += shared_mod_args - - def __init__(self, mod_code=_def_mod_code, differential=False, *args, **kwargs): - pre_diff_code = True - if not differential: - constellation = digital.constellation_qpsk() - if mod_code != mod_codes.GRAY_CODE: - raise ValueError("This QPSK mod/demod works only for gray-coded constellations.") - else: - constellation = digital.constellation_dqpsk() - if mod_code not in set([mod_codes.GRAY_CODE, mod_codes.NO_CODE]): - raise ValueError("That mod_code is not supported for DQPSK mod/demod.") - if mod_code == mod_codes.NO_CODE: - pre_diff_code = False - - super(qpsk_mod, self).__init__(constellation=constellation, - differential=differential, - pre_diff_code=pre_diff_code, - *args, **kwargs) - - -# ///////////////////////////////////////////////////////////////////////////// -# QPSK demodulator -# -# ///////////////////////////////////////////////////////////////////////////// - -class qpsk_demod(generic_demod): - """ - Hierarchical block for RRC-filtered QPSK demodulation. - - The input is the complex modulated signal at baseband and the - output is a stream of bits packed 1 bit per byte (LSB) - - Args: - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - differential: Whether to use differential encoding (boolean). - """ - # See generic_mod for additional arguments - __doc__ += shared_demod_args - - def __init__(self, mod_code=_def_mod_code, differential=False, - *args, **kwargs): - pre_diff_code = True - if not differential: - constellation = digital.constellation_qpsk() - if mod_code != mod_codes.GRAY_CODE: - raise ValueError("This QPSK mod/demod works only for gray-coded constellations.") - else: - constellation = digital.constellation_dqpsk() - if mod_code not in set([mod_codes.GRAY_CODE, mod_codes.NO_CODE]): - raise ValueError("That mod_code is not supported for DQPSK mod/demod.") - if mod_code == mod_codes.NO_CODE: - pre_diff_code = False - - super(qpsk_demod, self).__init__(constellation=constellation, - differential=differential, - pre_diff_code=pre_diff_code, - *args, **kwargs) - - - -# ///////////////////////////////////////////////////////////////////////////// # DQPSK constellation # ///////////////////////////////////////////////////////////////////////////// @@ -135,57 +58,8 @@ def dqpsk_constellation(mod_code=_def_mod_code): raise ValueError("The DQPSK constellation is only generated for gray_coding. But it can be used for non-grayed coded modulation if one doesn't use the pre-differential code.") return digital.constellation_dqpsk() -# ///////////////////////////////////////////////////////////////////////////// -# DQPSK modulator -# ///////////////////////////////////////////////////////////////////////////// - -class dqpsk_mod(qpsk_mod): - """ - Hierarchical block for RRC-filtered DQPSK modulation. - - The input is a byte stream (unsigned char) and the - output is the complex modulated signal at baseband. - - Args: - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - """ - # See generic_mod for additional arguments - __doc__ += shared_mod_args - - def __init__(self, mod_code=_def_mod_code, *args, **kwargs): - super(dqpsk_mod, self).__init__(mod_code=mod_code, - differential=True, - *args, **kwargs) - -# ///////////////////////////////////////////////////////////////////////////// -# DQPSK demodulator -# -# ///////////////////////////////////////////////////////////////////////////// - -class dqpsk_demod(qpsk_demod): - """ - Hierarchical block for RRC-filtered DQPSK demodulation. - - The input is the complex modulated signal at baseband and the - output is a stream of bits packed 1 bit per byte (LSB) - - Args: - mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE). - """ - # See generic_mod for additional arguments - __doc__ += shared_demod_args - - def __init__(self, mod_code=_def_mod_code, *args, **kwargs): - super(dqpsk_demod, self).__init__(mod_code=mod_code, - differential=True, - *args, **kwargs) - # # Add these to the mod/demod registry # -modulation_utils.add_type_1_mod('qpsk', qpsk_mod) -modulation_utils.add_type_1_demod('qpsk', qpsk_demod) modulation_utils.add_type_1_constellation('qpsk', qpsk_constellation) -modulation_utils.add_type_1_mod('dqpsk', dqpsk_mod) -modulation_utils.add_type_1_demod('dqpsk', dqpsk_demod) modulation_utils.add_type_1_constellation('dqpsk', dqpsk_constellation) |