(subparsers)
return p
Parser for sdr command
Parser for sdr command
Parser for sdr command
def subparser(subparsers):
    """Parser for sdr command"""
    p = subparsers.add_parser('sat-ip',
                              description="Launch a Sat-IP receiver",
                              help='Launch a Sat-IP receiver',
                              formatter_class=ArgumentDefaultsHelpFormatter)
    p.add_argument('-a', '--addr', help='Sat-IP antenna IP address')
    p.add_argument('-m',
                   '--modcod',
                   choices=defs.modcods.keys(),
                   default='qpsk3/5',
                   metavar='',
                   help="DVB-S2 modulation and coding (MODCOD) scheme. "
                   "Choose from: " + ", ".join(defs.modcods.keys()))
    p.add_argument('-u',
                   '--username',
                   default=DEFAULT_USERNAME,
                   help='Sat-IP client username')
    p.add_argument('-p',
                   '--password',
                   default=DEFAULT_PASSWORD,
                   help='Sat-IP client password')
    p.add_argument('--ssdp-src-port',
                   type=int,
                   help="Source port set on SSDP packets used to discover the "
                   "Sat-IP server(s) in the network")
    p.add_argument(
        '--ssdp-net-if',
        help="Network interface over which to send SSDP packets to discover "
        "the Sat-IP server(s) in the network")
    p.add_argument('--no-fe-monitoring',
                   default=True,
                   action='store_false',
                   dest='fe_monitoring',
                   help="Do not monitor the Sat-IP server's physical frontend "
                   "(DVB-S2 demodulator and tuner). Use this option when the "
                   "server does not provide a login page or to avoid "
                   "authentication conflicts between concurrent clients.")
    p.add_argument(
        '--ignore-http-errors',
        default=False,
        action='store_true',
        help="Immediately retry the connection if an HTTP error occurs while "
        "reading the MPEG transport stream from the Sat-IP server")
    tsp.add_to_parser(p)
    monitoring.add_to_parser(p)
    p.set_defaults(func=launch)
    return p
def subparser ( subparsers ) : p = subparsers . add_parser ( 'sat-ip' , description = "Launch a Sat-IP receiver" , help = 'Launch a Sat-IP receiver' , formatter_class = ArgumentDefaultsHelpFormatter ) p . add_argument ( '-a' , '--addr' , help = 'Sat-IP antenna IP address' ) p . add_argument ( '-m' , '--modcod' , choices = defs . modcods . keys ( ) , default = 'qpsk3/5' , metavar = '' , help = "DVB-S2 modulation and coding (MODCOD) scheme. " "Choose from: " + ", " . join ( defs . modcods . keys ( ) ) ) p . add_argument ( '-u' , '--username' , default = DEFAULT_USERNAME , help = 'Sat-IP client username' ) p . add_argument ( '-p' , '--password' , default = DEFAULT_PASSWORD , help = 'Sat-IP client password' ) p . add_argument ( '--ssdp-src-port' , type = int , help = "Source port set on SSDP packets used to discover the " "Sat-IP server(s) in the network" ) p . add_argument ( '--ssdp-net-if' , help = "Network interface over which to send SSDP packets to discover " "the Sat-IP server(s) in the network" ) p . add_argument ( '--no-fe-monitoring' , default = True , action = 'store_false' , dest = 'fe_monitoring' , help = "Do not monitor the Sat-IP server's physical frontend " "(DVB-S2 demodulator and tuner). Use this option when the " "server does not provide a login page or to avoid " "authentication conflicts between concurrent clients." ) p . add_argument ( '--ignore-http-errors' , default = False , action = 'store_true' , help = "Immediately retry the connection if an HTTP error occurs while " "reading the MPEG transport stream from the Sat-IP server" ) tsp . add_to_parser ( p ) monitoring . add_to_parser ( p ) p . set_defaults ( func = launch ) return p