Run the router.
50 def runRouter(self, bwPacket):
51 r"""!Run the router
52
53 @param bwPacket: instance of Packet class
54 @return a instance of Packet class
55 """
56 self._runCount += 1
57 tmpTime = time.time()
58
59 logging.debug("[%s] started", self.name)
60
61 for routeObject in self.routeList:
62 logging.debug("[%s] -> run route: %s", self.name, routeObject.name)
63 bwPacket_tmp = routeObject.callback(copy.deepcopy(bwPacket))
64
65 if bwPacket_tmp is None:
66 continue
67
68 if bwPacket_tmp is False:
69 logging.debug("[%s] stopped", self.name)
70 break
71
72 bwPacket = bwPacket_tmp
73 logging.debug("[%s] bwPacket returned", self.name)
74 logging.debug("[%s] finished", self.name)
75
76 self._routerTime = time.time() - tmpTime
77 self._cumTime += self._routerTime
78
79 return bwPacket
80