pcu: Rewrite GPRS_Components functions to use pre-decoded RLCMAC blocks coming from PCUIF

This is only a step towards a major set of changes.
This specific commit changes internal implementation of functions to stay
compatible with existing tests.
Later on, changes will be modified to use the new altsteps directly.

Related: OS#4927
Change-Id: Iecc33565fdc673e3499db12a0d4e0587290cfd45
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 4204139..3c3b570 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -264,7 +264,7 @@
 	connect(self:STATSD_PROC, vc_STATSD:STATSD_PROC);
 
 	vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path));
-	vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind)));
+	vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind), true));
 
 	/* Wait until the BTS is ready (SI13 negotiated) */
 	BTS.receive(tr_RAW_PCU_EV(BTS_EV_SI13_NEGO));
@@ -509,8 +509,7 @@
 /* Verify that the PCU generates valid PTCCH/D messages
  * while neither Uplink nor Downlink TBF is established. */
 testcase TC_ta_ptcch_idle() runs on RAW_PCU_Test_CT {
-	var PTCCHDownlinkMsg ptcch_msg;
-	var PCUIF_Message pcu_msg;
+	var BTS_PTCCH_Block pcu_msg;
 	timer T;
 
 	/* Initialize the PCU interface abstraction */
@@ -520,28 +519,20 @@
 	BTS.send(ts_PCUIF_RTS_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
 				  sapi := PCU_IF_SAPI_PTCCH, fn := 0,
 				  arfcn := 871, block_nr := 0));
+
 	T.start(5.0);
 	alt {
-	[] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7,
-					 sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg {
-		log("Rx DATA.req message: ", pcu_msg);
-		setverdict(pass);
-		}
+	/* Make sure the message is encoded correctly
+	 * TODO: do we expect all TA values to be equal '1111111'B? */
+	[] as_rx_ptcch(pcu_msg, tr_PTCCHDownlinkMsg);
+
 	[] BTS.receive(PCUIF_Message:?) { repeat; }
 	[] T.timeout {
 		setverdict(fail, "Timeout waiting for a PTCCH/D block");
 		f_shutdown(__BFILE__, __LINE__);
 		}
 	}
-
-	ptcch_msg := dec_PTCCHDownlinkMsg(pcu_msg.u.data_req.data);
-	log("Decoded PTCCH/D message: ", ptcch_msg);
-
-	/* Make sure the message is encoded correctly
-	 * TODO: do we expect all TA values to be equal '1111111'B? */
-	if (not match(ptcch_msg, tr_PTCCHDownlinkMsg)) {
-		setverdict(fail, "Malformed PTCCH/D message");
-	}
+	log("Decoded PTCCH/D message: ", pcu_msg.dl_block);
 
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
@@ -3212,7 +3203,7 @@
 /* Check if the IUT handles subsequent INFO.ind messages */
 testcase TC_pcuif_info_ind_subsequent() runs on RAW_PCU_Test_CT {
 	var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default;
-	var PCUIF_Message pcu_msg;
+	var BTS_PDTCH_Block data_msg;
 
 	/* Initialize the PCU interface abstraction */
 	f_init_raw(testcasename(), info_ind);
@@ -3220,7 +3211,7 @@
 	/* Send 16 conseqtive INFO.ind messages and check that the IUT stays alive */
 	for (var integer i := 0; i < 16; i := i + 1) {
 		BTS.send(ts_PCUIF_INFO_IND(0, info_ind));
-		f_pcuif_rx_data_req(pcu_msg);
+		f_pcuif_rx_data_req_pdtch(data_msg);
 	}
 
 	f_shutdown(__BFILE__, __LINE__, final := true);