def getNode(self, i): n = self._nodes[i] if not n: n = GenericNode() extendMote(n, txmap=self.model.txmap) n.id = lambda: i # give it an ID self._nodes[i] = n return n
def getNode(self, i, **kws): n = self._nodes[i] if not n: n = BASE.getNode(self, i) self._nodes[i] = n options = {"onchange": lambda x: self.moteOnChange(x), "monitor": self, "radio": self.radio(), "txmap": lambda x: x} options.update(kws) extendMote(n, **options) return n
def getNode(self, i, **kws): n = self._nodes[i] if not n: n = BASE.getNode(self, i) self._nodes[i] = n options = { "onchange": lambda x: self.moteOnChange(x), "monitor": self, "radio": self.radio(), "txmap": lambda x: x } options.update(kws) extendMote(n, **options) return n