pcu/GPRS_Components: return GsmRrMessage from f_pcuif_rx_imm_ass()
Change-Id: Ide6a00348b81a637309644be82a523c99f9fd30a
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index c0630a6..9db13b4 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -508,10 +508,10 @@
// OLD APIs
////////////////////////
-function f_pcuif_rx_imm_ass(out GsmRrMessage rr_imm_ass,
- template PCUIF_Sapi sapi := PCU_IF_SAPI_AGCH,
+function f_pcuif_rx_imm_ass(template PCUIF_Sapi sapi := PCU_IF_SAPI_AGCH,
template GsmRrMessage t_imm_ass := ?)
-runs on MS_BTS_IFACE_CT return boolean {
+runs on MS_BTS_IFACE_CT return GsmRrMessage {
+ var GsmRrMessage rr_imm_ass;
var PCUIF_Message pcu_msg;
var octetstring data;
timer T;
@@ -542,7 +542,6 @@
}
setverdict(pass);
- return true;
}
[] BTS.receive { repeat; }
[] T.timeout {
@@ -551,19 +550,18 @@
}
}
- return false;
+ return rr_imm_ass;
}
/* One phase packet access (see 3GPP TS 44.018, table 9.1.8.1) */
const BIT8 chan_req_def := '01111000'B;
/* Establish an Uplink TBF by sending RACH.ind towards the PCU */
-function f_establish_tbf(out GsmRrMessage rr_imm_ass,
- uint16_t ra := bit2int(chan_req_def),
+function f_establish_tbf(uint16_t ra := bit2int(chan_req_def),
uint8_t is_11bit := 0,
PCUIF_BurstType burst_type := BURST_TYPE_0,
TimingAdvance ta := 0)
-runs on MS_BTS_IFACE_CT return boolean {
+runs on MS_BTS_IFACE_CT return GsmRrMessage {
var uint32_t fn;
/* FIXME: ask the BTS component to give us the current TDMA fn */
@@ -583,8 +581,7 @@
if (is_11bit != 0) { ra := 127; }
/* Expect Immediate (TBF) Assignment on TS0/AGCH */
- return f_pcuif_rx_imm_ass(rr_imm_ass, PCU_IF_SAPI_AGCH,
- tr_IMM_TBF_ASS(false, ra, fn));
+ return f_pcuif_rx_imm_ass(PCU_IF_SAPI_AGCH, tr_IMM_TBF_ASS(false, ra, fn));
}
/* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index ca37431..ff5da82 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1635,7 +1635,6 @@
runs on RAW_PCU_Test_CT {
var template ReqRefWaitInd tr_ref;
var GsmRrMessage rr_msg;
- var boolean ok;
/* Send RACH.ind with malformed EGPRS Packet Channel Request */
BTS.send(ts_PCUIF_RACH_IND(bts_nr := 0, trx_nr := 0, ts_nr := 0,
@@ -1644,11 +1643,7 @@
arfcn := 871));
/* Abuse f_pcuif_rx_imm_ass(): wait for Immediate Assignment Reject */
- ok := f_pcuif_rx_imm_ass(rr_msg, t_imm_ass := tr_IMM_ASS_REJ);
- if (not ok) {
- setverdict(fail, "Failed to match Immediate Assignment Reject");
- f_shutdown(__BFILE__, __LINE__);
- }
+ rr_msg := f_pcuif_rx_imm_ass(t_imm_ass := tr_IMM_ASS_REJ);
/* Just to have a short-name reference to the actual message */
var ImmediateAssignmentReject iar := rr_msg.payload.imm_ass_rej;