GPRS_Components: ensure unique IMSI/TLLI in f_init_gprs_ms()
Change-Id: I4beeeac600515458c2aeaf9e0be1cf2546ff0584
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 4b4e2a0..2a8726f 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -169,12 +169,16 @@
var uint4_t g_bs_cv_max := 4;
}
-/* Generate a list of GprsMS of the given size */
+/* Generate a list of GprsMS (unique IMSI/TLLI) of the given size */
function f_init_gprs_ms(integer num_ms := 1, template (value) GprsMS t_ms := t_GprsMS_def)
runs on MS_BTS_IFACE_CT {
for (var integer i := 0; i < num_ms; i := i + 1 ) {
var GprsMS ms := valueof(t_ms);
+ /* We assume that num_ms is not a large number */
+ ms.imsi := f_gen_imsi(i + 1);
+ ms.tlli := int2oct(i + 1, 4);
+
/* Append to the global list */
g_ms := g_ms & { ms };
}