GPRS_Components: allow arbitrary number of GprsMS instances

Change-Id: Ia118d58fafa50547f109c68829aa869785e0dc9c
This commit is contained in:
Vadim Yanitskiy 2020-10-31 21:10:29 +07:00
parent d5321fbdea
commit fa6b882657
1 changed files with 9 additions and 5 deletions

View File

@ -162,17 +162,21 @@ type component MS_BTS_IFACE_CT {
/* Connection to the BTS component (one for now) */
port RAW_PCU_MSG_PT BTS;
/* Support only 8 ms for now */
var GprsMS g_ms[8];
/* Mobile station(s) involved in a testing scenario */
var GprsMSArray g_ms := { };
/* Value at which Countdown Procedure starts. Announced by network (GPRS Cell Options as per TS 04.60 Chapter 12.24) */
var uint4_t g_bs_cv_max := 4;
}
function f_init_gprs_ms(integer num_ms := 1, template (value) GprsMS ms_params := t_GprsMS_def) runs on MS_BTS_IFACE_CT
{
/* Generate a list of GprsMS 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 ) {
g_ms[i] := valueof(ms_params);
var GprsMS ms := valueof(t_ms);
/* Append to the global list */
g_ms := g_ms & { ms };
}
}