本文整理汇总了Python中mininet.net.Mininet.propagationModel方法的典型用法代码示例。如果您正苦于以下问题:Python Mininet.propagationModel方法的具体用法?Python Mininet.propagationModel怎么用?Python Mininet.propagationModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mininet.net.Mininet
的用法示例。
在下文中一共展示了Mininet.propagationModel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: topology
# 需要导入模块: from mininet.net import Mininet [as 别名]
# 或者: from mininet.net.Mininet import propagationModel [as 别名]
def topology():
"Create a network."
net = Mininet( controller=Controller, link=TCLink, switch=OVSKernelSwitch )
print "*** Creating nodes"
sta1 = net.addStation( 'sta1' )
sta2 = net.addStation( 'sta2' )
ap1 = net.addBaseStation( 'ap1', ssid= 'new-ssid', equipmentModel='DI524', mode='g', channel='1', position='50,50,0' )
c1 = net.addController( 'c1', controller=Controller )
print "*** Associating and Creating links"
net.addLink(ap1, sta1)
net.addLink(ap1, sta2)
print "*** Starting network"
net.build()
c1.start()
ap1.start( [c1] )
"""uncomment to plot graph"""
net.plotGraph(max_x=150, max_y=150)
"""Seed"""
net.seed(1)
"*** Available propagation models: friisPropagationLossModel, twoRayGroundPropagationLossModel, logDistancePropagationLossModel ***"
# net.propagationModel('youngModel')
net.propagationModel('friisPropagationLossModel', sL=2)
"*** Available mobility models: RandomWalk, TruncatedLevyWalk, RandomDirection, RandomWayPoint, GaussMarkov ***"
net.startMobility(startTime=0, model='RandomWayPoint', max_x=160, max_y=160, min_v=0.1, max_v=0.2)
print "*** Running CLI"
CLI( net )
print "*** Stopping network"
net.stop()