Add stats: pcu.bts.N.pdch.occupied.gprs/egprs
Add stats needed for performance measurements in
3GPP TS 52.402 ยง B.2.1.54-55.
Split m_num_tbfs to count GPRS and EGPRS TBFs separately. Move the code
that updates m_num_tbfs and sets the PDCH_OCCUPIED stats to a separate
function, as it's mostly the same in the TBF attach and detach.
Related: SYS#4878
Change-Id: I0c0a1121b4ae5f031782e7e63a0c28eb0b6c8b42
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 4154d50..31dec72 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -763,6 +763,24 @@
return ts == control_ts;
}
+void gprs_rlcmac_tbf::enable_egprs()
+{
+ /* Decrease GPRS TBF count of attached PDCHs */
+ for (size_t ts = 0; ts < ARRAY_SIZE(pdch); ts++) {
+ if (pdch[ts])
+ pdch[ts]->num_tbfs_update(this, false);
+ }
+
+ m_egprs_enabled = true;
+ window()->set_sns(RLC_EGPRS_SNS);
+
+ /* Increase EGPRS TBF count of attached PDCHs */
+ for (size_t ts = 0; ts < ARRAY_SIZE(pdch); ts++) {
+ if (pdch[ts])
+ pdch[ts]->num_tbfs_update(this, true);
+ }
+}
+
/* C API */
enum tbf_fsm_states tbf_state(const struct gprs_rlcmac_tbf *tbf)
{