Skip to content

Commit

Permalink
enable mobility model without plotgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonfontes committed Nov 30, 2017
1 parent f0e42dc commit 891fa00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions mininet/wifiMobility.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def startMobilityModelNoGraph(cls, mob, nodes):
if propagationModel.model == 'logNormalShadowing':
sleep(0.0001)
node.getRange(intf=node.params['wlan'][0])
sleep(0.0001)
sleep(0.5)
while cls.pause_simulation:
pass

Expand All @@ -581,7 +581,6 @@ def parameters_(cls, node=None):
for node_ in cls.aps:
if 'link' in node_.params and node_.params['link'] == 'mesh':
nodes.append(node_)

cls.configureLinks(nodes)

@classmethod
Expand Down
8 changes: 8 additions & 0 deletions mininet/wifiNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,15 +996,23 @@ def setMobilityParams(cls, stations, aps, stationaryNodes=None, **kwargs):

if 'model' in kwargs or cls.isVanet:
if 'min_x' in kwargs:
if not cls.DRAW:
cls.MIN_X = int(kwargs['min_x'])
for sta in stations:
sta.min_x = int(kwargs['min_x'])
if 'min_y' in kwargs:
if not cls.DRAW:
cls.MIN_Y = int(kwargs['min_y'])
for sta in stations:
sta.min_y = int(kwargs['min_y'])
if 'max_x' in kwargs:
if not cls.DRAW:
cls.MAX_X = int(kwargs['max_x'])
for sta in stations:
sta.max_x = int(kwargs['max_x'])
if 'max_y' in kwargs:
if not cls.DRAW:
cls.MAX_Y = int(kwargs['max_y'])
for sta in stations:
sta.max_y = int(kwargs['max_y'])
if 'min_v' in kwargs:
Expand Down

0 comments on commit 891fa00

Please sign in to comment.