aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-07 09:35:37 -0400
committerMinh-Quang Nguyen <minh-quang.nguyen@nutaq.com>2016-09-07 09:50:28 -0400
commit66a1786fcd9d252e8af975b35ad2f9fca91fec5a (patch)
treec77c22fb3a07128657db5c344aa1e98ca4212c74
parent17c1f04e855188c8329686283fd353d490549179 (diff)
Implementation of no PDCH available alarm.
The alarm cause ID is defined by NuRAN Wireless. Change-Id: I382c14b57a062ec7eb4c8421767896df581de634
-rw-r--r--src/pcu_l1_if.cpp7
-rw-r--r--src/pcuif_proto.h9
-rw-r--r--src/tbf.cpp2
3 files changed, 17 insertions, 1 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index e4aece0..10c41e1 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -661,6 +661,13 @@ static int handle_pcu_fail_evt_rep_sig(unsigned int subsys, unsigned int signal,
sig_data->add_text);
break;
#endif
+ case S_PCU_NM_NO_PDCH_ALARM:
+ rc = pcu_tx_nm_fail_evt(NM_EVT_PROC_FAIL,
+ NM_SEVER_WARNING,
+ NM_PCAUSE_T_MANUF,
+ PCU_NM_EVT_CAUSE_WARN_NO_PDCH_AVAIL,
+ "PCU no PDCH available\n");
+ break;
default:
break;
}
diff --git a/src/pcuif_proto.h b/src/pcuif_proto.h
index b297ff7..3640b59 100644
--- a/src/pcuif_proto.h
+++ b/src/pcuif_proto.h
@@ -2,8 +2,15 @@
#define _PCUIF_PROTO_H
#include <osmocom/gsm/l1sap.h>
-#include <osmocom/core/signal.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#include <osmocom/gsm/protocol/gsm_12_21.h>
+#include <osmocom/core/signal.h>
+#ifdef __cplusplus
+}
+#endif
#define PCU_IF_VERSION 0x07
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 1fc1aef..791b042 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -29,6 +29,7 @@
#include <gprs_ms.h>
#include <decoding.h>
#include <pcu_utils.h>
+#include <pcuif_proto.h>
extern "C" {
#include <osmocom/core/msgb.h>
@@ -282,6 +283,7 @@ gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts,
if (!tbf) {
LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n");
/* FIXME: send reject */
+ osmo_signal_dispatch(SS_L_GLOBAL, S_PCU_NM_NO_PDCH_ALARM, &alarm_sig_data);
return NULL;
}
tbf->m_contention_resolution_done = 1;