def __init__(self, log, agent): AbstractResFiApp.__init__(self, log, 'de.berlin.tu.tkn.distchan', agent) # channel change interval self.jitter = 10 self.min_load = 0 self.start_ts = long(time.time() * 1000000) self.Hc = {} self.Mc = {} self.Sc = {} self.nbMap = {} self.ch_lst = self.getAvailableChannels(True) self.log.info("%.2f: (%s): plugin:: dist-chan available channels = %s " % (self.getRelativeTs(), self.agent.getNodeID(), str(self.ch_lst))) self.my_rf_channel = self.getChannel() self.log.info("%.2f: (%s): plugin:: dist-chan curr ch=%d" % (self.getRelativeTs(), self.agent.getNodeID(), self.my_rf_channel))
def __init__(self, log, agent): AbstractResFiApp.__init__(self, log, "de.berlin.tu.tkn.cran", agent) self.hostname = self.getHostname('eth0') self.ifaceMon = InterfaceMonitor(iface='eth0', interval=1, window=10) self.ifaceMon.setDaemon(True) self.homeAP_hostapd_proc = None self.p4_switch_proc = None self.vapManager = VapManager(self) self.p4SwitchManager = None self.started = False self.startTime = None self.rts_algo = ReadinessToServe(self) if not hasattr(self, 'msgQueue'): self.msgQueue = []
def __init__(self, log, agent): AbstractResFiApp.__init__(self, log, 'de.berlin.tu.tkn.distclust', agent) self.log = log # my own ID self.v = self.agent.getNodeID() # my own weight self.w = self.getNetworkLoad() # variable in which every node records the (ID of the) clusterhead that it joins. self.clusterHead = -1 self.clusterHeadW = -1 # the set of nodes in vs cluster. It is initialized to null , and it is updated only if v is a clusterhead self.cluster = [] # boolean variables self.ch = {self.v: False} self.join = {self.v: False} # save weights self.warr = {self.v: self.w} # testing self.jitter = 10
def __init__(self, log, agent): AbstractResFiApp.__init__(self, log, "de.berlin.tu.tkn.hello-world", agent)
def __init__(self, log, agent): Thread.__init__(self) AbstractResFiApp.__init__(self, log, 'de.berlin.tu.tkn.unicastsender', agent)
def __init__(self, log, agent): AbstractResFiApp.__init__(self, log, "de.berlin.tu.tkn.spectral", agent)