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


Python NTRC.trace方法代码示例

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


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

示例1: starter4e

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def starter4e(env, event):
     NTRC.trace(3,"4e.starter4e: before callstart at %s." % env.now)
     event.start()
     NTRC.trace(3,"4e.starter4e: before yieldtimeout at %s." % env.now)
     yield env.timeout(3)
     NTRC.trace(3,"4e.starter4e: after yieldtimeout at %s." % env.now)
     event.reset()
     NTRC.trace(3,"4e.starter4e: after callreset at %s." % env.now)
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:10,代码来源:resettabletimer.py

示例2: starter4f

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def starter4f(env, event):
     NTRC.trace(3,"4f.starter4f: before callstart at %s." % env.now)
     event.start()
     NTRC.trace(3,"4f.starter4f: before yieldtimeout at %s." % env.now)
     yield env.timeout(5)
     NTRC.trace(3,"4f.starter4f: after yieldtimeout at %s." % env.now)
     event.stop()
     event.start()
     NTRC.trace(3,"4f.starter4f: after stop/start at %s." % env.now)
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:11,代码来源:resettabletimer.py

示例3: starter4g

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def starter4g(env, event):
     NTRC.trace(3,"4g.starter4g: before callstart at %s." % env.now)
     event.start()
     NTRC.trace(3,"4g.starter4g: before yieldtimeout at %s." % env.now)
     yield env.timeout(5)
     NTRC.trace(3,"4g.starter4g: after yieldtimeout at %s." % env.now)
     event.stop()
     event.stop()        # can you stop a stopped timer?  yes.
     event.setdelay(17).start()
     yield env.timeout(1)
     event.reset()
     yield env.timeout(1)
     event.reset()
     NTRC.trace(3,"4g.starter4g: after change delay and reset twice at %s." % env.now)
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:16,代码来源:resettabletimer.py

示例4: main

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
def main():
    g = CG()                # One instance of the global data.
    
    dCliDict = fndCliParse("")
    # Carefully insert any new CLI values into the Global object.
    fnMaybeOverride("sInstructionsFile",dCliDict,g)

    # Read the file of instructions.  
    sFilename = g.sInstructionsFile
    lCommands = fnlParseInput(sFilename)
    cCommand = CCommand()

    # Process the instructions one line at a time.
    for sFullCmd in lCommands:
        # Print something to let the user know there is progress.
        print('-----------------')
        NTRC.trace(0,sFullCmd.rstrip())
        print('-----------------')
        lResult = cCommand.doCmdLst(sFullCmd)
        for sResult in lResult:
            NTRC.trace(0,"stdout=|%s|" % (sResult))
        print '-----------------'
        stdout.flush()
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:25,代码来源:listactor.py

示例5: starter4h

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def starter4h(env, event):
     NTRC.trace(3,"4h.starter4h: before callstart at %s." % env.now)
     event.start()
     NTRC.trace(3,"4h.starter4h: before yieldtimeout at %s." % env.now)
     yield env.timeout(23)
     NTRC.trace(3,"4h.starter4h: after yieldtimeout at %s." % env.now)
     event.reset()
     NTRC.trace(3,"4h.starter4h: after reset at %s." % env.now)
     yield event.event
     NTRC.trace(3,"4h.starter4h: after yieldevent at %s." % env.now)
     NTRC.trace(0,"yieldevent %s completed at %s." % (event.context,env.now))
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:13,代码来源:resettabletimer.py

示例6: interrupt

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def interrupt(timerobj, context):
     NTRC.trace(0,"interrupt %s delay %s called from %s at %s." 
         % (context, timerobj.delay, timerobj, env.now))
     return (timerobj, context)
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:6,代码来源:resettabletimer.py

示例7: callback

# 需要导入模块: from NewTraceFac import NTRC [as 别名]
# 或者: from NewTraceFac.NTRC import trace [as 别名]
 def callback(timerobj, context):
     NTRC.trace(0,"callback %s delay %s called from %s at %s." 
         % (context, timerobj.delay, timerobj, env.now))
     timerobj.setevent()
     return (timerobj, context)
开发者ID:MIT-Informatics,项目名称:PreservationSimulation,代码行数:7,代码来源:resettabletimer.py


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