Change in osmo-bts[master]: oc2g: generate failure event report in case of bad calibration

dexter gerrit-no-reply at lists.osmocom.org
Fri Mar 15 09:58:55 UTC 2019


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13265


Change subject: oc2g: generate failure event report in case of bad calibration
......................................................................

oc2g: generate failure event report in case of bad calibration

When the TX/RX calibration files can not be loaded a failure event
report should be sent to the BSC. Lets send a failure event report when
calbration data is either bad or can not be loaded (see also remvoed TODOs).

Related OS#3823

Change-Id: I3318470518b34807a443f7cb78c7091b4a3d4481
---
M src/osmo-bts-oc2g/calib_file.c
1 file changed, 7 insertions(+), 30 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/65/13265/1

diff --git a/src/osmo-bts-oc2g/calib_file.c b/src/osmo-bts-oc2g/calib_file.c
index 4976848..5beb895 100644
--- a/src/osmo-bts-oc2g/calib_file.c
+++ b/src/osmo-bts-oc2g/calib_file.c
@@ -34,6 +34,7 @@
 
 #include <osmo-bts/gsm_data.h>
 #include <osmo-bts/logging.h>
+#include <osmo-bts/bts.h>
 
 #include <nrw/oc2g/oc2g.h>
 #include <nrw/oc2g/gsml1const.h>
@@ -133,16 +134,8 @@
 	st->fp = fopen(fname, "rb");
 	if (!st->fp) {
 		LOGP(DL1C, LOGL_NOTICE, "Failed to open '%s' for calibration data.\n", fname);
-
-		/* TODO (oramadan): Fix OML alarms
-		   if( fl1h->phy_inst->trx ){
-			fl1h->phy_inst->trx->mo.obj_inst.trx_nr = fl1h->phy_inst->trx->nr;
-
-			alarm_sig_data.mo = &fl1h->phy_inst->trx->mo;
-			alarm_sig_data.add_text = (char*)&fname[0];
-			osmo_signal_dispatch(SS_NM, S_NM_OML_BTS_FAIL_OPEN_CALIB_ALARM, &alarm_sig_data);
-		}
-		*/
+		oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN,
+					 "Failed to open '%s' for calibration data.", fname);
 		return -1;
 	}
 	return 0;
@@ -228,17 +221,8 @@
 	rc = calib_verify(fl1h, desc);
 	if (rc < 0) {
 		LOGP(DL1C, LOGL_NOTICE,"Verify L1 calibration table %s -> failed (%d)\n", desc->fname, rc);
-
-		/* TODO (oramadan): Fix OML alarms
-		if (fl1h->phy_inst->trx) {
-			fl1h->phy_inst->trx->mo.obj_inst.trx_nr = fl1h->phy_inst->trx->nr;
-
-			alarm_sig_data.mo = &fl1h->phy_inst->trx->mo;
-			alarm_sig_data.add_text = (char*)&desc->fname[0];
-			memcpy(alarm_sig_data.spare, &rc, sizeof(int));
-			osmo_signal_dispatch(SS_NM, S_NM_OML_BTS_FAIL_VERIFY_CALIB_ALARM, &alarm_sig_data);
-		}
-		*/
+		oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN,
+					 "Verify L1 calibration table %s -> failed (%d)", desc->fname, rc);
 
 		st->last_file_idx = get_next_calib_file_idx(fl1h, st->last_file_idx);
 
@@ -294,15 +278,8 @@
 
 	if (!calib_path) {
 		LOGP(DL1C, LOGL_NOTICE, "Calibration file path not specified\n");
-
-		/* TODO (oramadan): Fix OML alarms
-		if( fl1h->phy_inst->trx ){
-			fl1h->phy_inst->trx->mo.obj_inst.trx_nr = fl1h->phy_inst->trx->nr;
-
-			alarm_sig_data.mo = &fl1h->phy_inst->trx->mo;
-			osmo_signal_dispatch(SS_NM, S_NM_OML_BTS_NO_CALIB_PATH_ALARM, &alarm_sig_data);
-		}
-		*/
+		oml_tx_failure_event_rep(&fl1h->phy_inst->trx->mo, OSMO_EVT_WARN_SW_WARN,
+					 "Calibration file path not specified");
 		return -1;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/13265
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3318470518b34807a443f7cb78c7091b4a3d4481
Gerrit-Change-Number: 13265
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190315/7288bcfe/attachment.html>


More information about the gerrit-log mailing list