daemon/core/emane/emane.py
def startdaemons(self):
        ''' Start the appropriate EMANE daemons. The transport daemon will
            bind to the TAP interfaces.
        '''
        if self.verbose:
            self.info("Emane.startdaemons()")
        path = self.session.sessiondir
        loglevel = str(self.DEFAULT_LOG_LEVEL)
        cfgloglevel = self.session.getcfgitemint("emane_log_level")
        realtime = self.session.getcfgitembool("emane_realtime", True)
        if cfgloglevel:
            self.info("setting user-defined EMANE log level: %d" % cfgloglevel)
            loglevel = str(cfgloglevel)
        emanecmd = ["emane", "-d", "--logl", loglevel, "-f", \
                                os.path.join(path, "emane.log")]
        if realtime:
            emanecmd += "-r",
        try:
            cmd = emanecmd + [os.path.join(path, "platform.xml")]
            if self.verbose:
                self.info("Emane.startdaemons() running %s" % str(cmd))
            subprocess.check_call(cmd, cwd=path)
        except Exception, e:
            errmsg = "error starting emane: %s" % e
            self.session.exception(coreapi.CORE_EXCP_LEVEL_FATAL, "emane",
                                       None, errmsg)
            self.info(errmsg)

        # start one transport daemon per transportdaemon*.xml file
        transcmd = ["emanetransportd", "-d", "--logl", loglevel, "-f", \
                    os.path.join(path, "emanetransportd.log")]
        if realtime:
            transcmd += "-r",
        files = os.listdir(path)
        for file in files:
            if file[-3:] == "xml" and file[:15] == "transportdaemon":
                cmd = transcmd + [os.path.join(path, file)]
                try:
                    if self.verbose:
                        self.info("Emane.startdaemons() running %s" % str(cmd))
                    subprocess.check_call(cmd, cwd=path)
                except Exception, e:
                    errmsg = "error starting emanetransportd: %s" % e
                    self.session.exception(coreapi.CORE_EXCP_LEVEL_FATAL, "emane",
                                       None, errmsg)
                    self.info(errmsg)
 Start the appropriate EMANE daemons. The transport daemon will
            bind to the TAP interfaces.
        
Start the appropriate EMANE daemons. The transport daemon will
bind to the TAP interfaces.
Start the appropriate EMANE daemons . The transport daemon will bind to the TAP interfaces .
def startdaemons(self):
        if self.verbose:
            self.info("Emane.startdaemons()")
        path = self.session.sessiondir
        loglevel = str(self.DEFAULT_LOG_LEVEL)
        cfgloglevel = self.session.getcfgitemint("emane_log_level")
        realtime = self.session.getcfgitembool("emane_realtime", True)
        if cfgloglevel:
            self.info("setting user-defined EMANE log level: %d" % cfgloglevel)
            loglevel = str(cfgloglevel)
        emanecmd = ["emane", "-d", "--logl", loglevel, "-f", \
                                os.path.join(path, "emane.log")]
        if realtime:
            emanecmd += "-r",
        try:
            cmd = emanecmd + [os.path.join(path, "platform.xml")]
            if self.verbose:
                self.info("Emane.startdaemons() running %s" % str(cmd))
            subprocess.check_call(cmd, cwd=path)
        except Exception, e:
            errmsg = "error starting emane: %s" % e
            self.session.exception(coreapi.CORE_EXCP_LEVEL_FATAL, "emane",
                                       None, errmsg)
            self.info(errmsg)
        transcmd = ["emanetransportd", "-d", "--logl", loglevel, "-f", \
                    os.path.join(path, "emanetransportd.log")]
        if realtime:
            transcmd += "-r",
        files = os.listdir(path)
        for file in files:
            if file[-3:] == "xml" and file[:15] == "transportdaemon":
                cmd = transcmd + [os.path.join(path, file)]
                try:
                    if self.verbose:
                        self.info("Emane.startdaemons() running %s" % str(cmd))
                    subprocess.check_call(cmd, cwd=path)
                except Exception, e:
                    errmsg = "error starting emanetransportd: %s" % e
                    self.session.exception(coreapi.CORE_EXCP_LEVEL_FATAL, "emane",
                                       None, errmsg)
                    self.info(errmsg)
def startdaemons ( self ) : if self . verbose : self . info ( "Emane.startdaemons()" ) path = self . session . sessiondir loglevel = str ( self . DEFAULT_LOG_LEVEL ) cfgloglevel = self . session . getcfgitemint ( "emane_log_level" ) realtime = self . session . getcfgitembool ( "emane_realtime" , True ) if cfgloglevel : self . info ( "setting user-defined EMANE log level: %d" % cfgloglevel ) loglevel = str ( cfgloglevel ) emanecmd = [ "emane" , "-d" , "--logl" , loglevel , "-f" , os . path . join ( path , "emane.log" ) ] if realtime : emanecmd += "-r" , try : cmd = emanecmd + [ os . path . join ( path , "platform.xml" ) ] if self . verbose : self . info ( "Emane.startdaemons() running %s" % str ( cmd ) ) subprocess . check_call ( cmd , cwd = path ) except Exception , e : errmsg = "error starting emane: %s" % e self . session . exception ( coreapi . CORE_EXCP_LEVEL_FATAL , "emane" , None , errmsg ) self . info ( errmsg ) transcmd = [ "emanetransportd" , "-d" , "--logl" , loglevel , "-f" , os . path . join ( path , "emanetransportd.log" ) ] if realtime : transcmd += "-r" , files = os . listdir ( path ) for file in files : if file [ - 3 : ] == "xml" and file [ : 15 ] == "transportdaemon" : cmd = transcmd + [ os . path . join ( path , file ) ] try : if self . verbose : self . info ( "Emane.startdaemons() running %s" % str ( cmd ) ) subprocess . check_call ( cmd , cwd = path ) except Exception , e : errmsg = "error starting emanetransportd: %s" % e self . session . exception ( coreapi . CORE_EXCP_LEVEL_FATAL , "emane" , None , errmsg ) self . info ( errmsg )
Start the appropriate EMANE daemons.
Start the appropriate EMANE daemons .
''' Start the appropriate EMANE daemons. The transport daemon will
            bind to the TAP interfaces.
        ''' # start one transport daemon per transportdaemon*.xml file
self