daemon: Use Emane.version directly instead of checking if EventService

exists.
This commit is contained in:
Tom Goff 2015-09-30 14:41:13 -04:00
parent 026f54d658
commit 3a13b8c92d
5 changed files with 11 additions and 11 deletions

View file

@ -17,7 +17,7 @@ except:
pass
from core.api import coreapi
from core.constants import *
from emane import EmaneModel
from emane import Emane, EmaneModel
from universal import EmaneUniversalModel
class EmaneIeee80211abgModel(EmaneModel):
@ -29,7 +29,7 @@ class EmaneIeee80211abgModel(EmaneModel):
_80211rates = '1 1 Mbps,2 2 Mbps,3 5.5 Mbps,4 11 Mbps,5 6 Mbps,' + \
'6 9 Mbps,7 12 Mbps,8 18 Mbps,9 24 Mbps,10 36 Mbps,11 48 Mbps,' + \
'12 54 Mbps'
if 'EventService' in globals():
if Emane.version >= Emane.EMANE091:
xml_path = '/usr/share/emane/xml/models/mac/ieee80211abg'
else:
xml_path = "/usr/share/emane/models/ieee80211abg/xml"
@ -120,7 +120,7 @@ class EmaneIeee80211abgModel(EmaneModel):
phynames = names[len(self._confmatrix_mac):]
# append all MAC options to macdoc
if 'EventService' in globals():
if Emane.version >= Emane.EMANE091:
for macname in macnames:
mac9xnvpairlist = self.get9xmacparamequivalent(macname, values)
for nvpair in mac9xnvpairlist: