aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/scheduler.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-23 13:37:45 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-26 15:01:08 +0100
commit6381900677001088b8f2a74905cd3ac1994f33ba (patch)
treeaadc85989b60b63fa5baf1622f9dd0ee14dbdfd1 /include/osmo-bts/scheduler.h
parentbcc20a871c61c9ab6188d6abe183dbced7ac241f (diff)
split scheduler_mframe.c from scheduler.c
There are use cases for the multiframe scheduler tables outside the context of the entire scheduler. Let's prepare for that. Related: OS#2978 Change-Id: I6a501e66c47809ae3cdc55bef2cb6390ee0096b1
Diffstat (limited to 'include/osmo-bts/scheduler.h')
-rw-r--r--include/osmo-bts/scheduler.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index 11a30fd4..4d34315f 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -188,7 +188,37 @@ int trx_sched_set_cipher(struct l1sched_trx *l1t, uint8_t chan_nr, int downlink,
/* \brief close all logical channels and reset timeslots */
void trx_sched_reset(struct l1sched_trx *l1t);
+
+/* frame structures */
+struct trx_sched_frame {
+ /*! \brief downlink TRX channel type */
+ enum trx_chan_type dl_chan;
+ /*! \brief downlink block ID */
+ uint8_t dl_bid;
+ /*! \brief uplink TRX channel type */
+ enum trx_chan_type ul_chan;
+ /*! \brief uplink block ID */
+ uint8_t ul_bid;
+};
+
+/* multiframe structure */
+struct trx_sched_multiframe {
+ /*! \brief physical channel config (channel combination) */
+ enum gsm_phys_chan_config pchan;
+ /*! \brief applies to which timeslots? */
+ uint8_t slotmask;
+ /*! \brief repeats how many frames */
+ uint8_t period;
+ /*! \brief pointer to scheduling structure */
+ const struct trx_sched_frame *frames;
+ /*! \brief human-readable name */
+ const char *name;
+};
+
+int find_sched_mframe_idx(enum gsm_phys_chan_config pchan, uint8_t tn);
+
/*! Determine if given frame number contains SACCH (true) or other (false) burst */
bool trx_sched_is_sacch_fn(struct gsm_bts_trx_ts *ts, uint32_t fn, bool uplink);
+extern const struct trx_sched_multiframe trx_sched_multiframes[];
#endif /* TRX_SCHEDULER_H */