aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-virtual/scheduler_virtbts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-virtual/scheduler_virtbts.c')
-rw-r--r--src/osmo-bts-virtual/scheduler_virtbts.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index 6bfcb7cd..9573732a 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -43,10 +43,11 @@
#include <osmo-bts/scheduler_backend.h>
#include <virtphy/virtual_um.h>
+#define MODULO_HYPERFRAME 0
+
/**
* Send a message over the virtual um interface.
* This will at first wrap the msg with a gsmtap header and then write it to the declared multicast socket.
- * TODO: we might want to remove unused argument uint8_t tn
*/
static void tx_to_virt_um(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
enum trx_chan_type chan, struct msgb *msg)
@@ -74,6 +75,11 @@ static void tx_to_virt_um(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
chdesc->link_id); // the logical channel type
}
+ #if MODULO_HYPERFRAME
+ // Restart fn after every superframe (26 * 51 frames) to simulate hyperframe overflow each 6 seconds.
+ fn %= 26 * 51;
+ #endif
+
outmsg = gsmtap_makemsg(l1t->trx->arfcn, timeslot, gsmtap_chantype,
subslot, fn, signal_dbm, snr, data, data_len);