library/GSM_RR_Types.ttcn: introduce generic tr_IMM_TBF_ASS
Both 't_IMM_ASS_TBF_DL' and 't_RR_IMM_ASS_TBF_DL' templates were
introduced for a specific task - matching Packet Immediate
Assignment (Downlink TBF) by TLLI.
In the upcoming changes we will also need to match Uplink TBF
assignment, and more generic fields such as Timing Advance.
Let's add a generic template for Packet Immediate Assignment
and allow passing IaRestOctets as a parameter.
Change-Id: I492cf990820ba153ea71469b8b623e56e031e549
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 4ef71fa..838b6e1 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -591,6 +591,8 @@
}
function f_wait_tbf_dl(TbfNr tbf_nr, GprsTlli tlli) runs on dummy_CT return ImmediateAssignment {
+ var template PacketDlAssign dl_ass := tr_PacketDlAssign(tlli);
+ var template IaRestOctets rest := tr_IaRestOctets_DLAss(dl_ass);
var LAPDm_ph_data ph_data;
var GsmRrMessage rr;
timer T := 10.0;
@@ -599,7 +601,7 @@
[] L1.receive(LAPDm_ph_data:{sacch:=?,sapi:=0,lapdm:={bbis:=?}}) -> value ph_data {
rr := dec_GsmRrMessage(ph_data.lapdm.bbis.payload);
log("PCH/AGCH DL RR: ", rr);
- if (match(rr, t_RR_IMM_ASS_TBF_DL(tlli))) {
+ if (match(rr, tr_IMM_TBF_ASS(dl := true, rest := rest))) {
var TbfPars tbf_pars := valueof(t_TbfParsInit);
log("Received IMM.ASS for our TLLI!");
tbf_pars.tfi[rr.payload.imm_ass.pkt_chan_desc.tn] :=