aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Stumpf <sebastian.stumpf87@googlemail.com>2017-02-28 16:36:36 +0100
committerHarald Welte <laforge@gnumonks.org>2017-07-12 21:31:53 +0200
commit959758402f6dbf394f10559fadf3442e43ce5086 (patch)
treedfd554a8eb6877c55b95a1a53783a717fb3d5cd2
parentc1eb2cf8eb3dca22e0aad09f3f6f9154f2b2ebdb (diff)
VIRT-PHY: Added test option for fast hyperframe repeat.laforge/virt-new
Frame number will restart at 0 after each superframe (approx. 6.1 sec) if enabled. Can be enabled by preprocessor define. Change-Id: If3adf14df5fcd8daf53363c27b3772c42d7122e9
-rw-r--r--src/osmo-bts-virtual/scheduler_virtbts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index c92c07d..1ef3fcf 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -44,6 +44,8 @@
#include <osmo-bts/scheduler_backend.h>
#include <virtphy/virtual_um.h>
+#define MODULO_HYPERFRAME 0
+
static const char *gsmtap_hdr_stringify(const struct gsmtap_hdr *gh)
{
static char buf[256];
@@ -82,6 +84,11 @@ static void tx_to_virt_um(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
else
gsmtap_chantype = chantype_rsl2gsmtap(rsl_chantype, 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);
if (outmsg) {