当前位置: 首页>>代码示例>>Python>>正文


Python Logger.add_to_print_list方法代码示例

本文整理汇总了Python中utils.Logger.add_to_print_list方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.add_to_print_list方法的具体用法?Python Logger.add_to_print_list怎么用?Python Logger.add_to_print_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utils.Logger的用法示例。


在下文中一共展示了Logger.add_to_print_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add_print_list

# 需要导入模块: from utils import Logger [as 别名]
# 或者: from utils.Logger import add_to_print_list [as 别名]
 def add_print_list():
     """
     Adds to the print list (method of the Logger class)
     """
     print "\n******************************************************************\n"
     print "\nPrinting the energy\n"
     Logger.add_to_print_list("energy_decision", "energy")
     print "\n******************************************************************\n"
开发者ID:ComputerNetworks-UFRGS,项目名称:OpERA,代码行数:10,代码来源:simpleSS.py

示例2: build_us_block

# 需要导入模块: from utils import Logger [as 别名]
# 或者: from utils.Logger import add_to_print_list [as 别名]
def build_us_block(options):
    """
    Builds the US top block.
    The RX path performs the ED sensing
    The TX path transmits a BER
    @param options
    """

    # TOP BLOCK
    tb = OpERAFlow(name='US')

    # RX PATH
    if not options.tx_only:
        uhd_source = UHDSource(device_addr=options.args)
        uhd_source.samp_rate = 195512

        the_source = uhd_source
        the_sink = blocks.probe_signal_f()

        rx_path = EnergySSArch(fft_size=512,
                               mavg_size=5,
                               algorithm=EnergyDecision(th=0.000005)
                               )


        device_source = RadioDevice()
        device_source.add_arch(source=the_source, arch=rx_path, sink=the_sink, uhd_device=None, name="source")

        ###tb.add_arch( abstract_arch = rx_path, radio_device = device_source, name_of_arch = 'rx')
        tb.ad_radio(device_source, 'rx')

    # TX PATH
    tx_path = PacketGMSKTx(name='a')
    Logger.add_to_print_list("a_bit_rate", 'bps')

    uhd_sink = UHDSink(device_addr = options.args)
    uhd_sink.samp_rate = options.samp_rate

    the_source = None
    the_sink = uhd_sink
    uhd_device = uhd_sink
    radio_sink = RadioDevice()
    #::TODO:: conferir se arch é mesmo  tx_path, e fazer essa verificacao do tx_path e rx_path para todos os outros arquivos
    radio_sink.add_arch(source=the_source, arch=tx_path, sink=the_sink, uhd_device=uhd_device, name="sink")

    ###tb.add_arch( tx_path, radio_sink, 'tx', connection_type = OpERAFlow.CONN_SINK)
    tb.add_radio(radio_sink, 'tx')

    return tb
开发者ID:ComputerNetworks-UFRGS,项目名称:OpERA,代码行数:51,代码来源:ss_rank_tx.py


注:本文中的utils.Logger.add_to_print_list方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。