pcu: Introduce TC_mt_ping_pong_with_dl_racap
Allows checking how pcu parses MS RA Capabilities coming from SGSN.
Change-Id: Iedd8ab278547471b72252743d93a0f9e11d7e787
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 3149e77..518ca80 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -1091,6 +1091,58 @@
}
}
+ private function f_presece_bit_MultislotCap_GPRS_BSSGP(template (omit) MultislotCap_GPRS_BSSGP mscap_gprs) return BIT1 {
+ if (istemplatekind(mscap_gprs, "omit")) {
+ return '0'B;
+ }
+ return '1'B;
+ }
+ private function f_presece_bit_MultislotCap_EGPRS_BSSGP(template (omit) MultislotCap_EGPRS_BSSGP mscap_egprs) return BIT1 {
+ if (istemplatekind(mscap_egprs, "omit")) {
+ return '0'B;
+ }
+ return '1'B;
+ }
+ template (value) MSRACapabilityValuesRecord_BSSGP ts_RaCapRec_BSSGP(BIT4 att := '0001'B /* E-GSM */, template (omit) MultislotCap_GPRS_BSSGP mscap_gprs := omit, template (omit) MultislotCap_EGPRS_BSSGP mscap_egprs := omit) := {
+ mSRACapabilityValues := {
+ mSRACapabilityValuesExclude1111 := {
+ accessTechnType := att, /* E-GSM */
+ accessCapabilities := {
+ lengthIndicator := 0, /* overwritten */
+ accessCapabilities := {
+ rfPowerCapability := '001'B, /* FIXME */
+ presenceBitA5 := '0'B,
+ a5bits := omit,
+ esind := '1'B,
+ psbit := '0'B,
+ vgcs := '0'B,
+ vbs := '0'B,
+ presenceBitMultislot := '1'B,
+ multislotcap := {
+ presenceBitHscsd := '0'B,
+ hscsdmultislotclass := omit,
+ presenceBitGprs := f_presece_bit_MultislotCap_GPRS_BSSGP(mscap_gprs),
+ gprsmultislot := mscap_gprs,
+ presenceBitSms := '0'B,
+ multislotCap_SMS := omit,
+ multislotCapAdditionsAfterRel97 := {
+ presenceBitEcsdmulti := '0'B,
+ ecsdmultislotclass := omit,
+ presenceBitEgprsmulti := f_presece_bit_MultislotCap_EGPRS_BSSGP(mscap_egprs),
+ multislotCap_EGPRS := mscap_egprs,
+ presenceBitDtmGprsmulti := '0'B,
+ multislotCapdtmgprsmultislotsubclass := omit
+ }
+ },
+ accessCapAdditionsAfterRel97 := omit
+ },
+ spare_bits := omit
+ }
+ }
+ },
+ presenceBitMSRACap := '0'B
+ };
+
template QoS_Profile_V t_defaultQos := {
peak_Bit_Rate := int2oct(80, 2),
precedence := '000'B,
@@ -1133,13 +1185,30 @@
cnSpecificDRXCycleLength := '0000'B
}
- template PDU_BSSGP ts_BSSGP_DL_UD(GprsTlli tlli, octetstring pdu) := {
+ function ts_BSSGP_IE_MSRAcap_omit(template (omit) MSRadioAccessCapabilityV_BSSGP racap) return template (omit) MS_Radio_Access_Capability {
+ var template (omit) MS_Radio_Access_Capability ret;
+ if (istemplatekind(racap, "omit")) {
+ return omit;
+ } else {
+ ret := {
+ iEI := '00'O,
+ ext := '1'B,
+ lengthIndicator := {
+ length1 := 1
+ },
+ mSRadioAccessCapabilityV_BSSGP := racap
+ }
+ return ret;
+ }
+ }
+
+ template PDU_BSSGP ts_BSSGP_DL_UD(GprsTlli tlli, octetstring pdu, template (omit) MSRadioAccessCapabilityV_BSSGP racap := omit) := {
pDU_BSSGP_DL_UNITDATA := {
bssgpPduType := '00'O,
tLLI_current := tlli,
qoS_Profile := t_defaultQos,
pDU_Lifetime := t_DefaultLifetime(65535),
- mS_Radio_Access_Capability := omit,
+ mS_Radio_Access_Capability := ts_BSSGP_IE_MSRAcap_omit(racap),
priority := omit,
dRX_Parameters := omit,
iMSI := omit,
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index a9f60cd..ad89c69 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -1202,7 +1202,7 @@
/* Test scenario where SGSN wants to send some data against MS and it is
* answered by the MS on PDCH, so TBFs for downlink and later for uplink are created.
*/
-testcase TC_mt_ping_pong() runs on RAW_PCU_Test_CT {
+private function f_TC_mt_ping_pong(template (omit) MSRadioAccessCapabilityV_BSSGP ms_racap := omit) runs on RAW_PCU_Test_CT {
var GsmRrMessage rr_imm_ass;
var PacketUlAssign ul_tbf_ass;
var PacketDlAssign dl_tbf_ass;
@@ -1225,7 +1225,7 @@
f_bssgp_client_llgmm_assign('FFFFFFFF'O, tlli);
/* SGSN sends some DL data, PCU will page on CCCH (PCH) */
- BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data));
+ BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data, ms_racap));
f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass);
ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass);
@@ -1264,6 +1264,21 @@
BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id));
}
+testcase TC_mt_ping_pong() runs on RAW_PCU_Test_CT {
+ f_TC_mt_ping_pong(omit);
+}
+
+/* TC_mt_ping_pong, but DL-UNITDATA contains RA Access capability with (M)CS
+/* information about the MS */
+testcase TC_mt_ping_pong_with_dl_racap() runs on RAW_PCU_Test_CT {
+ var MultislotCap_GPRS_BSSGP mscap_gprs := {
+ gprsmultislotclass := '00011'B,
+ gprsextendeddynalloccap := '0'B
+ } ;
+ var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, omit)) };
+ f_TC_mt_ping_pong(ms_racap);
+}
+
/* Verify that if PCU doesn't get an ACK for first DL block after IMM ASS, it
* will retry by retransmitting both the IMM ASS + DL block after poll (ack)
* timeout occurs (specified by sent RRBP on DL block). */
@@ -1503,6 +1518,7 @@
execute( TC_t3193() );
execute( TC_mo_ping_pong() );
execute( TC_mt_ping_pong() );
+ execute( TC_mt_ping_pong_with_dl_racap() );
execute( TC_imm_ass_dl_block_retrans() );
execute( TC_paging_cs_from_bts() );
execute (TC_paging_cs_from_sgsn_sign() );