Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
    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
Ejemplo n.º 3
0
        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
Ejemplo n.º 4
0
        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