示例#1
0
 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))
示例#2
0
文件: cran.py 项目: nxwlan/nxwlan
    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 = []
示例#3
0
文件: distclust.py 项目: resfi/resfi
    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
示例#4
0
 def __init__(self, log, agent):
     AbstractResFiApp.__init__(self, log, "de.berlin.tu.tkn.hello-world", agent)
示例#5
0
 def __init__(self, log, agent):
     Thread.__init__(self)
     AbstractResFiApp.__init__(self, log, 'de.berlin.tu.tkn.unicastsender', agent)
示例#6
0
 def __init__(self, log, agent):
     AbstractResFiApp.__init__(self, log, "de.berlin.tu.tkn.spectral", agent)
示例#7
0
 def __init__(self, log, agent):
     Thread.__init__(self)
     AbstractResFiApp.__init__(self, log, 'de.berlin.tu.tkn.unicastsender', agent)