aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2020-08-24 18:18:20 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2020-08-27 15:37:54 +0200
commitd899cf4b4e3314ec148cd4855c0d22fb74421cea (patch)
tree478887e454d17ceaea4e7a6f3fae974f59ec79ec /src/osmo_gsm_tester
parent58422c5e870ce8fe8c27be93d57f4401e4466dc2 (diff)
rfemu_amarisoft: handle exception and log event if WS is closed
the WS is closed if the eNB process dies. this patch will log an event but not stop the experiment. Change-Id: I0fafc7e38954400540375d51813e96500700f50c
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
index 17aa43a..585166a 100644
--- a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
+++ b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
@@ -53,11 +53,15 @@ class RFemulationAmarisoftCtrl(RFemulation):
def set_attenuation(self, db):
msg = { "message": "cell_gain", "cell_id": int(self.cell_id), "gain": -db }
msg_str = json.dumps(msg)
- self.dbg('sending CTRL msg: "%s"' % msg_str)
- self.ws.send(msg_str)
- self.dbg('waiting CTRL recv...')
- result = self.ws.recv()
- self.dbg('Received CTRL msg: "%s"' % result)
+ try:
+ self.dbg('sending CTRL msg: "%s"' % msg_str)
+ self.ws.send(msg_str)
+ self.dbg('waiting CTRL recv...')
+ result = self.ws.recv()
+ self.dbg('Received CTRL msg: "%s"' % result)
+ except Exception:
+ log.Error('Error sending CTLR msg to eNB. eNB still running?')
+ pass
def get_max_attenuation(self):
return 200 # maximum cell_gain value in Amarisoft