library/L1CTL_PortType.ttcn: use templates from GSM_RR_Types
Get rid of template t_IMM_ASS, which is a part of L1CTL_Types.ttcn.
Prepare generic (for both CS and PS) template on top of tr_IMM_ASS,
and use it in f_L1CTL_WAIT_IMM_ASS().
Change-Id: I3a410ec3c41e3eefd23071bfb0d80feda82177a5
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 3c83c3d..c595b03 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -127,15 +127,23 @@
}
function f_L1CTL_WAIT_IMM_ASS(L1CTL_PT pt, uint8_t ra, GsmFrameNumber rach_fn) return ImmediateAssignment {
+ var template GsmRrMessage rr_imm_ass;
var L1ctlDlMessage dl;
var GsmRrMessage rr;
timer T := 10.0;
+
+ /* Prepare generic template (for both CS and PS) */
+ rr_imm_ass := tr_IMM_ASS(ra, rach_fn);
+ rr_imm_ass.payload.imm_ass.ded_or_tbf := ?;
+ rr_imm_ass.payload.imm_ass.pkt_chan_desc := *;
+ rr_imm_ass.payload.imm_ass.chan_desc := *;
+
T.start;
alt {
[] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl {
rr := dec_GsmRrMessage(dl.payload.data_ind.payload);
log("PCH/AGCH DL RR: ", rr);
- if (match(rr, t_RR_IMM_ASS(ra, rach_fn))) {
+ if (match(rr, rr_imm_ass)) {
log("Received IMM.ASS for our RACH!");
} else {
repeat;
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 77c1f6a..e939f72 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -780,24 +780,6 @@
}
};
- template ImmediateAssignment t_IMM_ASS(uint8_t ra, GsmFrameNumber fn) := {
- ded_or_tbf := ?,
- page_mode := ?,
- chan_desc := *,
- pkt_chan_desc := *,
- req_ref := f_compute_ReqRef(ra, fn),
- timing_advance := ?,
- mobile_allocation := ?,
- rest_octets:= ?
- };
-
- template GsmRrMessage t_RR_IMM_ASS(uint8_t ra, GsmFrameNumber fn) := {
- header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?),
- payload := {
- imm_ass := t_IMM_ASS(ra, fn)
- }
- };
-
const octetstring c_DummyUI := '0303012B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B2B'O;
/* We use "BYTEORDER(last)" so we get little-endian integers. Unfortuantely, this also