def startService(self):
        self._litemq = get_service_named("litemq")
        self._litemq.declare_exchange("network")

        ControlService("network.control").setServiceParent(self)
        TransportService("network.transport").setServiceParent(self)

        devices = get_service_named("device").get_devices()
        for devid, devobj in devices.iteritems():
            netopts = devobj.options.get("network", {})
            rconn = netopts.get("router", None)
            if not rconn:
                continue

            _options = {"connection": ConnectionInfo(rconn),
                        "deviceids": [devid]}
            RouterService("network.router.%d" % devid,
                          _options).setServiceParent(self)

        SAMultiService.startService(self)
dataset/ETHPy150Open smartanthill/smartanthill1_0/smartanthill/network/service.py/NetworkService.startService/original