script fix
This commit is contained in:
parent
458d1d64e6
commit
baa9afc20f
4 changed files with 43 additions and 10 deletions
|
@ -49,7 +49,7 @@ def main():
|
|||
session.master = True
|
||||
session.location.setrefgeo(47.57917,-122.13232,2.00000)
|
||||
session.location.refscale = 150.0
|
||||
session.cfg['emane_models'] = "RfPipe, Ieee80211abg, Bypass, AtdlOmni"
|
||||
session.cfg['emane_models'] = "RfPipe, Ieee80211abg, Bypass"
|
||||
session.emane.loadmodels()
|
||||
if 'server' in globals():
|
||||
server.addsession(session)
|
||||
|
|
|
@ -246,7 +246,7 @@ class ManetExperiment(object):
|
|||
self.net = self.session.addobj(cls = pycore.nodes.WlanNode)
|
||||
for i in xrange(1, numnodes + 1):
|
||||
addr = "%s/%s" % (prefix.addr(i), 32)
|
||||
tmp = self.session.addobj(cls = ManetNode, ipaddr = addr, name = "n%d" % i)
|
||||
tmp = self.session.addobj(cls = ManetNode, ipaddr = addr, objid= "%d" % i, name = "n%d" % i)
|
||||
tmp.newnetif(self.net, [addr])
|
||||
self.nodes.append(tmp)
|
||||
# connect nodes with probability linkprob
|
||||
|
|
|
@ -727,7 +727,21 @@ def main():
|
|||
exp.info("setting up bridged tests 2/2 with netem")
|
||||
exp.setneteffects(bw=54000000, delay=0)
|
||||
exp.info("waiting %s sec (queue bring-up)" % opt.delay)
|
||||
results['1 netem'] = exp.runalltests("netem")
|
||||
results['1.0 netem'] = exp.runalltests("netem")
|
||||
exp.info("shutting down bridged session")
|
||||
|
||||
# bridged with netem (1 Mbps,200ms)
|
||||
exp.info("setting up bridged tests 3/2 with netem")
|
||||
exp.setneteffects(bw=1000000, delay=20000)
|
||||
exp.info("waiting %s sec (queue bring-up)" % opt.delay)
|
||||
results['1.2 netem_1M'] = exp.runalltests("netem_1M")
|
||||
exp.info("shutting down bridged session")
|
||||
|
||||
# bridged with netem (54 kbps,500ms)
|
||||
exp.info("setting up bridged tests 3/2 with netem")
|
||||
exp.setneteffects(bw=54000, delay=100000)
|
||||
exp.info("waiting %s sec (queue bring-up)" % opt.delay)
|
||||
results['1.4 netem_54K'] = exp.runalltests("netem_54K")
|
||||
exp.info("shutting down bridged session")
|
||||
exp.reset()
|
||||
|
||||
|
@ -738,7 +752,7 @@ def main():
|
|||
exp.setnodes()
|
||||
exp.info("waiting %s sec (node/route bring-up)" % opt.delay)
|
||||
time.sleep(opt.delay)
|
||||
results['2 bypass'] = exp.runalltests("bypass")
|
||||
results['2.0 bypass'] = exp.runalltests("bypass")
|
||||
exp.info("shutting down bypass session")
|
||||
exp.reset()
|
||||
|
||||
|
@ -760,7 +774,7 @@ def main():
|
|||
exp.setnodes()
|
||||
exp.info("waiting %s sec (node/route bring-up)" % opt.delay)
|
||||
time.sleep(opt.delay)
|
||||
results['3 rfpipe'] = exp.runalltests("rfpipe")
|
||||
results['3.0 rfpipe'] = exp.runalltests("rfpipe")
|
||||
exp.info("shutting down RF-PIPE session")
|
||||
exp.reset()
|
||||
|
||||
|
@ -768,7 +782,7 @@ def main():
|
|||
exp.info("setting up EMANE tests 3/4 with RF-PIPE model 54M")
|
||||
rfpipevals = list(EmaneRfPipeModel.getdefaultvalues())
|
||||
rfpnames = EmaneRfPipeModel.getnames()
|
||||
rfpipevals[ rfpnames.index('datarate') ] = '54000'
|
||||
rfpipevals[ rfpnames.index('datarate') ] = '54000000'
|
||||
# TX delay != propagation delay
|
||||
#rfpipevals[ rfpnames.index('delay') ] = '5000'
|
||||
if emanever < Emane.EMANE091:
|
||||
|
@ -781,11 +795,11 @@ def main():
|
|||
exp.setnodes()
|
||||
exp.info("waiting %s sec (node/route bring-up)" % opt.delay)
|
||||
time.sleep(opt.delay)
|
||||
results['4 rfpipe54m'] = exp.runalltests("rfpipe54m")
|
||||
results['4.0 rfpipe54m'] = exp.runalltests("rfpipe54m")
|
||||
exp.info("shutting down RF-PIPE session")
|
||||
exp.reset()
|
||||
|
||||
# EMANE RF-PIPE model
|
||||
# EMANE RF-PIPE model: 54K datarate
|
||||
exp.info("setting up EMANE tests 4/4 with RF-PIPE model pathloss")
|
||||
rfpipevals = list(EmaneRfPipeModel.getdefaultvalues())
|
||||
rfpnames = EmaneRfPipeModel.getnames()
|
||||
|
@ -802,7 +816,26 @@ def main():
|
|||
time.sleep(opt.delay)
|
||||
exp.info("sending pathloss events to govern connectivity")
|
||||
exp.setpathloss(opt.numnodes)
|
||||
results['5 pathloss'] = exp.runalltests("pathloss")
|
||||
results['5.0 pathloss'] = exp.runalltests("pathloss")
|
||||
exp.info("shutting down RF-PIPE session")
|
||||
exp.reset()
|
||||
|
||||
# EMANE RF-PIPE model (512K, 200ms)
|
||||
exp.info("setting up EMANE tests 4/4 with RF-PIPE model pathloss")
|
||||
rfpipevals = list(EmaneRfPipeModel.getdefaultvalues())
|
||||
rfpnames = EmaneRfPipeModel.getnames()
|
||||
rfpipevals[ rfpnames.index('datarate') ] = '512000'
|
||||
rfpipevals[ rfpnames.index('delay') ] = '200'
|
||||
rfpipevals[ rfpnames.index('pathlossmode') ] = 'pathloss'
|
||||
rfpipevals[ rfpnames.index('defaultconnectivitymode') ] = '0'
|
||||
exp.createemanesession(numnodes=opt.numnodes, verbose=opt.verbose,
|
||||
cls=EmaneRfPipeModel, values=rfpipevals)
|
||||
exp.setnodes()
|
||||
exp.info("waiting %s sec (node/route bring-up)" % opt.delay)
|
||||
time.sleep(opt.delay)
|
||||
exp.info("sending pathloss events to govern connectivity")
|
||||
exp.setpathloss(opt.numnodes)
|
||||
results['5.1 pathloss'] = exp.runalltests("pathloss")
|
||||
exp.info("shutting down RF-PIPE session")
|
||||
exp.reset()
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ def test(numnodes, testsec):
|
|||
# emulated network
|
||||
net = session.addobj(cls = pycore.nodes.WlanNode)
|
||||
for i in xrange(1, numnodes + 1):
|
||||
tmp = session.addobj(cls = pycore.nodes.LxcNode, name = "n%d" % i)
|
||||
tmp = session.addobj(cls = pycore.nodes.LxcNode, objid= "%d" % i, name = "n%d" % i)
|
||||
tmp.newnetif(net, ["%s/%s" % (prefix.addr(i), prefix.prefixlen)])
|
||||
n.append(tmp)
|
||||
net.link(n[0].netif(0), n[-1].netif(0))
|
||||
|
|
Loading…
Reference in a new issue