support multiple frequencies of interest with the EMANE 0.9.1 Universal Phy
(Boeing r1850)
This commit is contained in:
parent
7905a26e4d
commit
e6ff3b4cce
3 changed files with 47 additions and 1 deletions
|
@ -113,6 +113,26 @@ def addtextparamtoparent(dom, parent, name, value):
|
|||
txt = dom.createTextNode(value)
|
||||
p.appendChild(txt)
|
||||
return p
|
||||
|
||||
def addparamlisttoparent(dom, parent, name, values):
|
||||
''' XML helper to return a parameter list and optionally add it to the
|
||||
parent element:
|
||||
<paramlist name="name">
|
||||
<item value="123">
|
||||
<item value="456">
|
||||
</paramlist>
|
||||
'''
|
||||
if values is None:
|
||||
return None
|
||||
p = dom.createElement("paramlist")
|
||||
if parent:
|
||||
parent.appendChild(p)
|
||||
p.setAttribute("name", name)
|
||||
for v in values:
|
||||
item = dom.createElement("item")
|
||||
item.setAttribute("value", str(v))
|
||||
p.appendChild(item)
|
||||
return p
|
||||
|
||||
def getoneelement(dom, name):
|
||||
e = dom.getElementsByTagName(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue