initial XML changes for EMANE 0.9.2

for version detection, use 'emane --version' output instead of other tricks
(Boeing r1880)
This commit is contained in:
ahrenholz 2014-09-18 15:50:09 +00:00
parent 3ca4cecd0b
commit 24263d77bd
5 changed files with 62 additions and 47 deletions

View file

@ -102,13 +102,13 @@ class EmaneUniversalModel(EmaneModel):
"antennaprofilemanifesturi",
"frequencyofinterestfilterenable")
@classmethod
def getphydoc(cls, e, mac, values, phynames):
phydoc = e.xmldoc("phy")
phy = phydoc.getElementsByTagName("phy").pop()
phy.setAttribute("name", cls._xmlname)
if e.version != e.EMANE091:
if e.version < e.EMANE091:
phy.setAttribute("library", cls._xmllibrary)
# EMANE 0.7.4 suppport - to be removed when 0.7.4 support is deprecated
if e.version == e.EMANE074:
@ -128,14 +128,14 @@ class EmaneUniversalModel(EmaneModel):
phy.appendChild(e.xmlparam(phydoc, old[0], old[2]))
frequencies = None
if e.version == e.EMANE091:
if e.version >= e.EMANE091:
name = "frequencyofinterest"
value = mac.valueof(name, values)
frequencies = cls.valuestrtoparamlist(phydoc, name, value)
if frequencies:
phynames = list(phynames)
phynames.remove("frequencyofinterest")
# append all PHY options to phydoc
map( lambda n: phy.appendChild(e.xmlparam(phydoc, n, \
mac.valueof(n, values))), phynames)