daemon: Wait longer for EMANE network interfaces to exist.

When EMANE is still running.
This commit is contained in:
Tom Goff 2016-10-12 17:37:27 +00:00
parent 6d1b5d28a1
commit b1beff1eba
2 changed files with 29 additions and 1 deletions

View file

@ -1153,6 +1153,22 @@ class Emane(ConfigurableManager):
self.session.sdt.updatenodegeo(node.objid, lat, long, alt)
return True
def emanerunning(self, node):
'''\
Return True if an EMANE process associated with the given node
is running, False otherwise.
'''
status = -1
cmd = ['pkill', '-0', '-x', 'emane']
try:
if self.version < self.EMANE092:
status = subprocess.call(cmd)
else:
status = node.cmd(cmd, wait=True)
except:
pass
return status == 0
def emane_version():
'Return the locally installed EMANE version identifier and string.'
cmd = ('emane', '--version')