Exemplo n.º 1
0
    def __init__(self,
                 constellation_points=_def_constellation_points,
                 gray_coded=_def_gray_coded,
                 differential=True,
                 *args,
                 **kwargs):
        """
	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.

        See generic_mod block for list of parameters.
	"""

        constellation_points = _def_constellation_points
        constellation = digital_swig.constellation_dqpsk()
        if constellation_points != 4:
            raise ValueError(
                'Number of constellation points must be 4 for DQPSK.')
        super(dqpsk_mod, self).__init__(constellation=constellation,
                                        gray_coded=gray_coded,
                                        differential=True,
                                        *args,
                                        **kwargs)
Exemplo n.º 2
0
    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, pre_diff_code=pre_diff_code, *args, **kwargs)
Exemplo n.º 3
0
 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,
                                    pre_diff_code=pre_diff_code,
                                    *args, **kwargs)
Exemplo n.º 4
0
    def __init__(self, constellation_points=_def_constellation_points,
                 differential=True, *args, **kwargs):

        """
	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.

        See generic_demod block for list of parameters.
        """
        constellation_points = _def_constellation_points
        constellation = digital_swig.constellation_dqpsk()
        if constellation_points != 4:
            raise ValueError('Number of constellation points must be 4 for DQPSK.')
        super(dqpsk_demod, self).__init__(constellation=constellation,
                                          differential=True,
                                          *args, **kwargs)
Exemplo n.º 5
0
def dqpsk_constellation(m=_def_constellation_points):
    if m != _def_constellation_points:
        raise ValueError("DQPSK can only have 4 constellation points.")
    return digital_swig.constellation_dqpsk()
Exemplo n.º 6
0
def dbpsk_constellation(m=_def_constellation_points):
    if m != _def_constellation_points:
        raise ValueError("DBPSK can only have 2 constellation points.")
  
    print "eftaseeeeeee \n"
    return digital_swig.constellation_dqpsk()
Exemplo n.º 7
0
def dqpsk_constellation(mod_code=_def_mod_code):
    if mod_code != mod_codes.GRAY_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()
Exemplo n.º 8
0
def dqpsk_constellation(mod_code=_def_mod_code):
    if mod_code != mod_codes.GRAY_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()
Exemplo n.º 9
0
def dqpsk_constellation(m=_def_constellation_points):
    if m != _def_constellation_points:
        raise ValueError("DQPSK can only have 4 constellation points.")
    return digital_swig.constellation_dqpsk()