(modcod)
Convert a given modcod into a dict with modulation type and code rate
Convert a given modcod into a dict with modulation type and code rate
Convert a given modcod into a dict with modulation type and code rate
def _parse_modcod(modcod):
    """Convert a given modcod into a dict with modulation type and code rate"""
    mtypes = ['qpsk', '8psk', '16apsk', '32apsk']
    for mtype in mtypes:
        if mtype in modcod:
            fec = modcod.replace(mtype, '')
            return {'mtype': mtype, 'fec': fec}
    raise ValueError("Unsupported MODCOD {}".format(modcod))
def _parse_modcod ( modcod ) : mtypes = [ 'qpsk' , '8psk' , '16apsk' , '32apsk' ] for mtype in mtypes : if mtype in modcod : fec = modcod . replace ( mtype , '' ) return { 'mtype' : mtype , 'fec' : fec } raise ValueError ( "Unsupported MODCOD {}" . format ( modcod ) )