def get_agt_anno(self, p): kwargs = Agent.get_agt_anno(self, p) if not isinstance(p, AGT): return kwargs if p.hasanno("dot11n-sinr"): kwargs["sinr"] = p.getanno("dot11n-sinr") return kwargs
def get_agt_anno(self, p): kwargs = Agent.get_agt_anno(self, p) if not isinstance(p, AGT): return kwargs if p.hasanno('dot11n-sinr'): kwargs['sinr'] = p.getanno('dot11n-sinr') return kwargs
def configure(self, datarate=None, **kwargs): self.datarate = datarate Agent.configure(self, **kwargs)
def __init__(self, *args, **kwargs): Agent.__init__(self, *args, **kwargs)
def configure(self, datarate=None, pausefirst=True, **kwargs): self.datarate = datarate Agent.configure(self, **kwargs) if pausefirst: self.txfsm.goto(self.PAUSE) # start in wait state
def recvdata(self, p): """Signal received data packet.""" self.rcvdata.signal() return Agent.recvdata(self, p)
def configure(self, pausefirst=True, **kwargs): Agent.configure(self, **kwargs)
def configure(self, **kwargs): Agent.configure(self, **kwargs)
def senddata(self, p): """Signal new data packet before sending.""" self.newdata.signal(self.dest) return Agent.senddata(self, p)
def __init__(self, *args, **kwargs): self.newdata = SimEvent() self.sndnext = SimEvent() self.rcvdata = SimEvent() Agent.__init__(self, *args, **kwargs)
def configure(self, datarate=None, **kwargs): self.datarate = datarate Agent.configure(self, **kwargs) self.txfsm.goto(self.PAUSE) # start in wait state
def senddata(self, p): """Get destination for next packet.""" if self.dest: self.nextdest() return Agent.senddata(self, p)
def configure(self, probe=False, **kwargs): self.probe = probe Agent.configure(self, **kwargs)
def __init__(self, *args, **kwargs): self.probe = None # probe routes? self.destinations = [] # possible destinations self.probed = [] # destinations probed Agent.__init__(self, *args, **kwargs)