(args)
Demo satellite receiver
Demo satellite receiver
Demo satellite receiver
def demo_rx(args):
    """Demo satellite receiver"""

    # Override some options based on the mutual exclusive --gossip and
    # --btc-src arguments, if present
    if (args.gossip):
        server_addr = server_map['gossip']
        channel = ApiChannel.GOSSIP.value
    elif (args.btc_src):
        server_addr = server_map['btc-src']
        channel = ApiChannel.BTC_SRC.value
    else:
        server_addr = _get_server_addr(args.net, args.server)
        channel = args.channel

    # Argument validation and special cases
    _warn_common_overrides(args)  # warn args overridden by --gossip/--btc-src

    # Open one socket for each interface:
    socks = list()
    for interface in args.interface:
        sock = net.UdpSock(args.dest, interface, mcast_rx=False)
        sock.set_mcast_tx_opts(args.ttl, args.dscp)
        socks.append(sock)

    rx = DemoRx(server_addr, socks, args.bitrate, args.event, channel,
                args.regions, args.tls_cert, args.tls_key)
    rx.run()
def demo_rx ( args ) : # Override some options based on the mutual exclusive --gossip and # --btc-src arguments, if present if ( args . gossip ) : server_addr = server_map [ 'gossip' ] channel = ApiChannel . GOSSIP . value elif ( args . btc_src ) : server_addr = server_map [ 'btc-src' ] channel = ApiChannel . BTC_SRC . value else : server_addr = _get_server_addr ( args . net , args . server ) channel = args . channel # Argument validation and special cases _warn_common_overrides ( args ) # warn args overridden by --gossip/--btc-src # Open one socket for each interface: socks = list ( ) for interface in args . interface : sock = net . UdpSock ( args . dest , interface , mcast_rx = False ) sock . set_mcast_tx_opts ( args . ttl , args . dscp ) socks . append ( sock ) rx = DemoRx ( server_addr , socks , args . bitrate , args . event , channel , args . regions , args . tls_cert , args . tls_key ) rx . run ( )