def moveStationTo(self, sta, ap, dist, ang): x = dist * cos(ang) + int(ap.params['position'][0]) y = dist * sin(ang) + int(ap.params['position'][1]) sta.params['position'] = x, y, 0 mobility.getAPsInRange(sta) if mobility.DRAW: try: plot.graphUpdate(sta) except: pass
def confirmInfraAssociation(self, node1, node2, wlan): associated = '' if self.printCon: print "Associating %s to %s" % (node1, node2) while(associated == '' or len(associated[0]) == 15): associated = self.isAssociated(node1, wlan) iface = str(node1)+'-wlan%s' % wlan wifiParameters.getWiFiParameters(node1, wlan, iface) mobility.numberOfAssociatedStations(node2) node1.associatedAp[wlan] = node2 mobility.getAPsInRange(node1)