⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multirun.py

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 PY
字号:
# This script is in the public domain and has no copyright## This script is just a syntax example for scripting multiple runs of# a simulation. It doesn't do anything real.from simcore import *import simtimedef run(duration):    try:        sim.exec("apps/CntToRfm/build/pc/main.exe", 2, "-b=0")    except:        print "\n\nError running apps/CntToRfm/build/pc/main.exe, most likely"        print "because you're not in the right directory or it's not built yet."        sim.exit()    comm.waitFor(duration * simtime.onesec)    sim.pause()    count0 = motes[0].getInt("Counter$state")    count1 = motes[1].getInt("Counter$state")    print "\n\n Count Run Complete"    print "mote 0 count %d" % count0    print "mote 1 count %d" % count1    print "\n"        print "Resetting Simulation..."    sim.stop()    sim.reset()run(10)run(20)run(30)sim.exit()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -