aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/bts.h b/src/bts.h
index 2932154..f022e5b 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -44,6 +44,7 @@ extern "C" {
#define LLC_CODEL_USE_DEFAULT (-1)
#define MAX_GPRS_CS 9
+#define MAX_LOAD_PROBABILITY 0xffffffff
struct BTS;
struct GprsMs;
@@ -136,7 +137,8 @@ struct gprs_rlcmac_trx {
/* back pointers */
struct BTS *bts;
uint8_t trx_no;
-
+ uint8_t current_load;
+ uint8_t num_pdch;
#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);
@@ -345,6 +347,9 @@ public:
gprs_rlcmac_ul_tbf *ul_tbf_by_tfi(uint8_t tfi, uint8_t trx, uint8_t ts);
int tfi_find_free(enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx);
+ int get_possible_trxs(enum gprs_rlcmac_tbf_direction dir,
+ bool *_trx, int8_t use_trx);
+ int get_suitable_trx(bool *suitable_trx);
int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn);
uint8_t is_single_block(uint16_t ra, enum ph_burst_type burst_type,
@@ -451,6 +456,10 @@ public:
void ms_present(int32_t n);
int32_t ms_present_get();
+ void increment_num_pdch();
+ void decrement_num_pdch();
+ uint8_t get_num_pdch() const;
+ int get_possible_trxs_sba(bool *_trx);
/*
* Below for C interface for the VTY
@@ -476,6 +485,8 @@ private:
/* list of downlink TBFs */
LListHead<gprs_rlcmac_tbf> m_dl_tbfs;
+ /* The summation of all the PDCH across all TRX for this BTS*/
+ uint8_t m_total_pdch;
private:
/* disable copying to avoid slicing */
BTS(const BTS&);
@@ -487,6 +498,21 @@ inline int BTS::current_frame_number() const
return m_cur_fn;
}
+inline void BTS::increment_num_pdch()
+{
+ m_total_pdch++;
+}
+
+inline void BTS::decrement_num_pdch()
+{
+ m_total_pdch--;
+}
+
+inline uint8_t BTS::get_num_pdch() const
+{
+ return m_total_pdch;
+}
+
inline SBAController *BTS::sba()
{
return &m_sba;