Change the calculation of UE group A random access preamble selection to choose a random number from [0 nof_groupA_preambles) rather than incrementing on the preambleTransmissionCounter. (#200)

master
Eric Schreiber 7 years ago committed by Andre Puschmann
parent dfce3ea155
commit 470953bf9c

@ -237,7 +237,8 @@ void ra_proc::step_resource_selection() {
} }
if (sel_group == RA_GROUP_A) { if (sel_group == RA_GROUP_A) {
if (nof_groupA_preambles) { if (nof_groupA_preambles) {
sel_preamble = preambleTransmissionCounter%nof_groupA_preambles; // randomly choose preamble from [0 nof_groupA_preambles)
sel_preamble = rand() % nof_groupA_preambles;
} else { } else {
rError("Selected group preamble A but nof_groupA_preambles=0\n"); rError("Selected group preamble A but nof_groupA_preambles=0\n");
state = RA_PROBLEM; state = RA_PROBLEM;
@ -245,6 +246,7 @@ void ra_proc::step_resource_selection() {
} }
} else { } else {
if (nof_groupB_preambles) { if (nof_groupB_preambles) {
// randomly choose preamble from [nof_groupA_preambles nof_groupB_preambles)
sel_preamble = nof_groupA_preambles + rand() % nof_groupB_preambles; sel_preamble = nof_groupA_preambles + rand() % nof_groupB_preambles;
} else { } else {
rError("Selected group preamble B but nof_groupA_preambles=0\n"); rError("Selected group preamble B but nof_groupA_preambles=0\n");

Loading…
Cancel
Save