enb: add abstract method stop()
implement as noop for Amarisoft eNB, srsENB will send q+Enter to stdin, which is implemented in class srslte_common() Change-Id: Ide606e1a6b523997215aa2fa39d4d56ae1f49181
This commit is contained in:
parent
29263b7389
commit
215bec2f3c
|
@ -326,6 +326,10 @@ class eNodeB(log.Origin, metaclass=ABCMeta):
|
|||
'Starts ENB, it will connect to "epc"'
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def stop(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def ue_add(self, ue):
|
||||
pass
|
||||
|
|
|
@ -130,6 +130,10 @@ class AmarisoftENB(enb.eNodeB):
|
|||
self.testenv.remember_to_stop(self.process)
|
||||
self.process.launch()
|
||||
|
||||
def stop(self):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def gen_conf_file(self, path, filename, values):
|
||||
self.dbg('AmarisoftENB ' + filename + ':\n' + pprint.pformat(values))
|
||||
with open(path, 'w') as f:
|
||||
|
|
|
@ -119,6 +119,10 @@ class srsENB(enb.eNodeB, srslte_common):
|
|||
self.dbg('Enabling console trace')
|
||||
self.process.stdin_write('t\n')
|
||||
|
||||
def stop(self):
|
||||
# Implemented in srslte_common.py
|
||||
srslte_common.stop(self)
|
||||
|
||||
def start_remotely(self):
|
||||
remote_env = { 'LD_LIBRARY_PATH': self.remote_inst.child('lib') }
|
||||
remote_binary = self.remote_inst.child('bin', srsENB.BINFILE)
|
||||
|
|
|
@ -36,6 +36,8 @@ class srslte_common(): # don't inherit from log.Origin here but instead use .nam
|
|||
self.stop_sleep_time = 0
|
||||
|
||||
def stop(self):
|
||||
# Send q+Enter to stdin to self-terminate application
|
||||
self.process.stdin_write('q\n')
|
||||
self.testenv.stop_process(self.process)
|
||||
self.sleep_after_stop()
|
||||
|
||||
|
|
Loading…
Reference in New Issue