daemon/core/emane/emane.py
def buildeventservicexml(self):
        ''' Build the libemaneeventservice.xml file if event service options
            were changed in the global config.
        '''
        defaults = self.emane_config.getdefaultvalues()
        values = self.getconfig(None, "emane",
                                self.emane_config.getdefaultvalues())[1]
        need_xml = False
        keys = ('eventservicegroup', 'eventservicedevice')
        for k in keys:
            a = self.emane_config.valueof(k, defaults)
            b = self.emane_config.valueof(k, values)
            if a != b:
                need_xml = True

        if not need_xml:
            # reset to using default config
            self.initeventservice()
            return

        try:
            group, port = self.emane_config.valueof('eventservicegroup',
                                                        values).split(':')
        except ValueError:
            self.warn("invalid eventservicegroup in EMANE config")
            return
        dev = self.emane_config.valueof('eventservicedevice', values)

        doc = self.xmldoc("emaneeventmsgsvc")
        es = doc.getElementsByTagName("emaneeventmsgsvc").pop()
        kvs = ( ('group', group), ('port', port), ('device', dev),
                ('mcloop', '1'),  ('ttl', '32') )
        addtextelementsfromtuples(doc, es, kvs)
        filename = 'libemaneeventservice.xml'
        self.xmlwrite(doc, filename)
        pathname = os.path.join(self.session.sessiondir, filename)
        self.initeventservice(filename=pathname)
 Build the libemaneeventservice.xml file if event service options
            were changed in the global config.
        
Build the libemaneeventservice.xml file if event service options
were changed in the global config.
Build the libemaneeventservice . xml file if event service options were changed in the global config .
def buildeventservicexml(self):
        defaults = self.emane_config.getdefaultvalues()
        values = self.getconfig(None, "emane",
                                self.emane_config.getdefaultvalues())[1]
        need_xml = False
        keys = ('eventservicegroup', 'eventservicedevice')
        for k in keys:
            a = self.emane_config.valueof(k, defaults)
            b = self.emane_config.valueof(k, values)
            if a != b:
                need_xml = True
        if not need_xml:
            self.initeventservice()
            return
        try:
            group, port = self.emane_config.valueof('eventservicegroup',
                                                        values).split(':')
        except ValueError:
            self.warn("invalid eventservicegroup in EMANE config")
            return
        dev = self.emane_config.valueof('eventservicedevice', values)
        doc = self.xmldoc("emaneeventmsgsvc")
        es = doc.getElementsByTagName("emaneeventmsgsvc").pop()
        kvs = ( ('group', group), ('port', port), ('device', dev),
                ('mcloop', '1'),  ('ttl', '32') )
        addtextelementsfromtuples(doc, es, kvs)
        filename = 'libemaneeventservice.xml'
        self.xmlwrite(doc, filename)
        pathname = os.path.join(self.session.sessiondir, filename)
        self.initeventservice(filename=pathname)
def buildeventservicexml ( self ) : defaults = self . emane_config . getdefaultvalues ( ) values = self . getconfig ( None , "emane" , self . emane_config . getdefaultvalues ( ) ) [ 1 ] need_xml = False keys = ( 'eventservicegroup' , 'eventservicedevice' ) for k in keys : a = self . emane_config . valueof ( k , defaults ) b = self . emane_config . valueof ( k , values ) if a != b : need_xml = True if not need_xml : self . initeventservice ( ) return try : group , port = self . emane_config . valueof ( 'eventservicegroup' , values ) . split ( ':' ) except ValueError : self . warn ( "invalid eventservicegroup in EMANE config" ) return dev = self . emane_config . valueof ( 'eventservicedevice' , values ) doc = self . xmldoc ( "emaneeventmsgsvc" ) es = doc . getElementsByTagName ( "emaneeventmsgsvc" ) . pop ( ) kvs = ( ( 'group' , group ) , ( 'port' , port ) , ( 'device' , dev ) , ( 'mcloop' , '1' ) , ( 'ttl' , '32' ) ) addtextelementsfromtuples ( doc , es , kvs ) filename = 'libemaneeventservice.xml' self . xmlwrite ( doc , filename ) pathname = os . path . join ( self . session . sessiondir , filename ) self . initeventservice ( filename = pathname )
Build the libemaneeventservice.xml file if event service options
were changed in the global config.
Build the libemaneeventservice . xml file if event service options were changed in the global config .
''' Build the libemaneeventservice.xml file if event service options
            were changed in the global config.
        ''' # reset to using default config
self