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/pdch.h b/src/pdch.h
index 00f0b9d..9405606 100644
--- a/src/pdch.h
+++ b/src/pdch.h
@@ -78,6 +78,7 @@
void detach_tbf(gprs_rlcmac_tbf *tbf);
unsigned num_tbfs(enum gprs_rlcmac_tbf_direction dir) const;
+ void num_tbfs_update(gprs_rlcmac_tbf *tbf, bool is_attach);
void reserve(enum gprs_rlcmac_tbf_direction dir);
void unreserve(enum gprs_rlcmac_tbf_direction dir);
@@ -147,7 +148,8 @@
void free_resources();
#endif
- uint8_t m_num_tbfs[2];
+ uint8_t m_num_tbfs_gprs[2];
+ uint8_t m_num_tbfs_egprs[2];
uint8_t m_num_reserved[2];
uint8_t m_assigned_usf; /* bit set */
uint32_t m_assigned_tfi[2]; /* bit set */
@@ -158,7 +160,7 @@
inline unsigned gprs_rlcmac_pdch::num_tbfs(enum gprs_rlcmac_tbf_direction dir) const
{
- return m_num_tbfs[dir];
+ return m_num_tbfs_gprs[dir] + m_num_tbfs_egprs[dir];
}
inline unsigned gprs_rlcmac_pdch::num_reserved(