aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-30 08:52:54 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-03 15:37:16 +0200
commit23f93a15ca759b55b4713148f06d9a2d152278ab (patch)
treeb3a3d73b9985ad109c66c39a5392f3df91d5f9b5 /src/bts.h
parentec478756ccc8e8df264811741bfc9c362cb9233d (diff)
ms: Add support for slot reservation
In contrast to the slots currently used by existing TBFs, the reserved slots refer to the time slots that can be used for newly allocated TBFs without causing conflicts (given that the first common TS does not change). They correspond to the potential use of the PDCHs and can be used to achieve a more uniform slot allocation. This commit adds bit set based methods to GprsMs and gprs_rlcmac_trx and a counter to gprs_rlcmac_pdch. The current TRX will also be stored in the MS object. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bts.h b/src/bts.h
index f6cc88fa..093a8e3e 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -71,6 +71,10 @@ struct gprs_rlcmac_pdch {
void detach_tbf(gprs_rlcmac_tbf *tbf);
unsigned num_tbfs(enum gprs_rlcmac_tbf_direction dir) const;
+
+ void reserve(enum gprs_rlcmac_tbf_direction dir);
+ void unreserve(enum gprs_rlcmac_tbf_direction dir);
+ unsigned num_reserved(enum gprs_rlcmac_tbf_direction dir) const;
#endif
uint8_t m_is_enabled; /* TS is enabled */
@@ -100,6 +104,7 @@ private:
#endif
uint8_t m_num_tbfs[2];
+ uint8_t m_num_reserved[2];
};
struct gprs_rlcmac_trx {
@@ -112,6 +117,11 @@ struct gprs_rlcmac_trx {
/* back pointers */
struct BTS *bts;
uint8_t trx_no;
+
+#ifdef __cplusplus
+ void reserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots);
+ void unreserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots);
+#endif
};
/**
@@ -311,6 +321,12 @@ inline unsigned gprs_rlcmac_pdch::num_tbfs(enum gprs_rlcmac_tbf_direction dir) c
return m_num_tbfs[dir];
}
+inline unsigned gprs_rlcmac_pdch::num_reserved(
+ enum gprs_rlcmac_tbf_direction dir) const
+{
+ return gprs_rlcmac_pdch::m_num_reserved[dir];
+}
+
inline struct rate_ctr_group *BTS::rate_counters() const
{
return m_ratectrs;