daemon: Use Emane.version directly instead of checking if EventService
exists.
This commit is contained in:
parent
026f54d658
commit
3a13b8c92d
5 changed files with 11 additions and 11 deletions
|
@ -18,7 +18,7 @@ except:
|
|||
pass
|
||||
from core.api import coreapi
|
||||
from core.constants import *
|
||||
from emane import EmaneModel
|
||||
from emane import Emane, EmaneModel
|
||||
|
||||
try:
|
||||
import emaneeventservice
|
||||
|
@ -53,7 +53,7 @@ class EmaneCommEffectModel(EmaneModel):
|
|||
("defaultconnectivitymode", coreapi.CONF_DATA_TYPE_BOOL, '0',
|
||||
'On,Off', 'defaultconnectivity'),
|
||||
]
|
||||
if 'EventService' in globals():
|
||||
if Emane.version >= Emane.EMANE091:
|
||||
_confmatrix_shim = _confmatrix_shim_base + _confmatrix_shim_091
|
||||
else:
|
||||
_confmatrix_shim = _confmatrix_shim_base + _confmatrix_shim_081
|
||||
|
|
|
@ -1363,7 +1363,7 @@ class EmaneGlobalModel(EmaneModel):
|
|||
'', 'starting NEM ID'),
|
||||
]
|
||||
|
||||
if 'EventService' in globals():
|
||||
if Emane.version >= Emane.EMANE091:
|
||||
_confmatrix_platform = _confmatrix_platform_base + \
|
||||
_confmatrix_platform_091
|
||||
if Emane.version >= Emane.EMANE092:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -18,7 +18,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 EmaneRfPipeModel(EmaneModel):
|
||||
|
@ -27,7 +27,7 @@ class EmaneRfPipeModel(EmaneModel):
|
|||
|
||||
# model name
|
||||
_name = "emane_rfpipe"
|
||||
if 'EventService' in globals():
|
||||
if Emane.version >= Emane.EMANE091:
|
||||
xml_path = '/usr/share/emane/xml/models/mac/rfpipe'
|
||||
else:
|
||||
xml_path = "/usr/share/emane/models/rfpipe/xml"
|
||||
|
@ -64,7 +64,7 @@ class EmaneRfPipeModel(EmaneModel):
|
|||
("delay", coreapi.CONF_DATA_TYPE_FLOAT, '0.0',
|
||||
'', 'transmission delay (sec)'),
|
||||
]
|
||||
if 'EventService' in globals():
|
||||
if Emane.version >= Emane.EMANE091:
|
||||
_confmatrix_mac = _confmatrix_mac_base + _confmatrix_mac_091
|
||||
else:
|
||||
_confmatrix_mac = _confmatrix_mac_base + _confmatrix_mac_081
|
||||
|
|
|
@ -18,7 +18,7 @@ except:
|
|||
pass
|
||||
from core.api import coreapi
|
||||
from core.constants import *
|
||||
from emane import EmaneModel
|
||||
from emane import Emane, EmaneModel
|
||||
|
||||
class EmaneUniversalModel(EmaneModel):
|
||||
''' This Univeral PHY model is meant to be imported by other models,
|
||||
|
@ -80,7 +80,7 @@ class EmaneUniversalModel(EmaneModel):
|
|||
("propagationmodel", coreapi.CONF_DATA_TYPE_STRING, '2ray',
|
||||
'precomputed,2ray,freespace','path loss mode'),
|
||||
]
|
||||
if 'EventService' in globals():
|
||||
if Emane.version >= Emane.EMANE091:
|
||||
_confmatrix = _confmatrix_base + _confmatrix_091
|
||||
else:
|
||||
_confmatrix = _confmatrix_base + _confmatrix_081
|
||||
|
|
Loading…
Reference in a new issue