diff options
author | Sebastian Stumpf <sebastian.stumpf87@googlemail.com> | 2017-02-28 16:36:36 +0100 |
---|---|---|
committer | Sebastian Stumpf <sebastian.stumpf87@googlemail.com> | 2017-02-28 16:36:36 +0100 |
commit | c961c340647e34e59d8cdadb6468e6ac0bde8a3d (patch) | |
tree | 4157ad7922f207021480a3bf9ae8228bd17413fe | |
parent | ba69eb9f36e8143c10bd62c81d13917783d72ff6 (diff) |
VIRT-PHY: Added test option for fast hyperframe repeat.
Frame number will restart at 0 after each superframe (approx. 6.1 sec)
if enabled. Can be enabled by preprocessor define.
-rw-r--r-- | src/osmo-bts-virtual/l1_if.c | 3 | ||||
-rw-r--r-- | src/osmo-bts-virtual/scheduler_virtbts.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index b3003ce0..bae0b2de 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -162,7 +162,7 @@ static void virt_um_rcv_cb(struct virt_um_inst *vui, struct msgb *msg) // ... or not uplink if(!(arfcn & GSMTAP_ARFCN_F_UPLINK)) { LOGP(LOGL_NOTICE, DL1P, - "Ignore incoming msg - no uplink flag."); + "Ignore incoming msg - no uplink flag.\n"); goto nomessage; } @@ -176,7 +176,6 @@ static void virt_um_rcv_cb(struct virt_um_inst *vui, struct msgb *msg) PRIM_OP_INDICATION, msg); l1sap.u.rach_ind.chan_nr = chan_nr; - // TODO: why is ra her 16bits long instead of 8 like in the reference 04.08 - 9.1.8 - Channel request? l1sap.u.rach_ind.ra = msgb_pull_u8(msg); // directly after gh hdr comes ra l1sap.u.rach_ind.acc_delay = 0; // probably not used in virt um l1sap.u.rach_ind.is_11bit = 0; // We dont use that 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); |