library/PCUIF_Types: clean up, drop remains of PCUIFv10
Change-Id: Ibfe8558cb9f335d8c29348063b0ff02b138dd4c7
Related: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8
Related: docker-playground.git If0b2209af645f391817f65b4227736b52ca59e2e
Related: docker-playground.git I70f0c30d6c514614095dcbbcac5d025001861fbc
Related: OS#6191
diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn
index b49c513..55d2ee7 100644
--- a/library/PCUIF_CodecPort.ttcn
+++ b/library/PCUIF_CodecPort.ttcn
@@ -38,7 +38,6 @@
/* HACK: fix padding in decoded message. Due to a bug in TITAN, we
* cannot just use its 'PADDING' attribute because it breaks decoding. */
if (ischosen(pout.data.u.data_req)) { fix_padding(pout.data.u.data_req); }
- if (ischosen(pout.data.u.data_cnf)) { fix_padding(pout.data.u.data_cnf); }
if (ischosen(pout.data.u.data_ind)) { fix_padding(pout.data.u.data_ind); }
} with { extension "prototype(fast)" };
@@ -141,27 +140,15 @@
function f_PCUIF_tx_imm_ass_pch(PCUIF_CODEC_PT pt, integer conn_id, octetstring imm_ass, hexstring imsi,
uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 msg_id := '01020304'O) {
- var PCUIF_send_data sd;
timer T := 3.0;
- if (mp_pcuif_version < 11) {
- /* append 3 last imsi digits so that the BTS is able to compute paging group */
- var hexstring last_digits := substr(imsi, lengthof(imsi)-3, 3);
- log("3 last imsi digits: ", last_digits);
- var octetstring prefix := ''O;
- for (var integer i := 0; i < 3; i := i+1) {
- prefix := prefix & int2oct(hex2int('30'H) + hex2int(last_digits[i]), 1);
- }
- pt.send(t_SD_PCUIF(conn_id,
- ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH, prefix & imm_ass)));
- } else {
- var PCUIF_pch pch;
- pch.msg_id := msg_id;
- pch.imsi := hex2str(imsi);
- pch.data := imm_ass;
- pch.confirm := true;
- pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch))));
- }
+ var PCUIF_pch pch := {
+ msg_id := msg_id,
+ imsi := hex2str(imsi),
+ data := imm_ass,
+ confirm := true
+ };
+ pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_PCH_2, enc_PCUIF_pch(pch))));
/* Exit early when the caller is not interested in the confirmation message */
if (wait_for_cnf == false) {
@@ -170,23 +157,8 @@
T.start;
alt {
- [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF(bts_nr, 0, 0, PCU_IF_SAPI_PCH))) -> value sd {
- if (mp_pcuif_version >= 11) {
- setverdict(fail, "expecting tr_PCUIF_DATA_CNF_2 in PCUIF v.11 or later");
- mtc.stop;
- } else {
- log("IMM.ASS was sent on PCH at fn ", sd.data.u.data_cnf.fn);
- return;
- }
- }
- [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_PCH_2))) -> value sd {
- if (mp_pcuif_version < 11) {
- setverdict(fail, "expecting tr_PCUIF_DATA_CNF in PCUIF v.10 or earlier");
- mtc.stop;
- } else {
- log("IMM.ASS was sent on PCH");
- return;
- }
+ [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_PCH_2))) {
+ log("IMM.ASS was sent on PCH");
}
[] pt.receive { repeat; }
[] T.timeout {
@@ -200,22 +172,14 @@
* blocks that contain actually a valid immediate assignment message. Otherweise no confirmation is sent back */
function f_PCUIF_tx_mac_block_agch(PCUIF_CODEC_PT pt, integer conn_id, octetstring mac_block, boolean confirm := true,
uint8_t bts_nr := 0, boolean wait_for_cnf := true, OCT4 msg_id := '01020304'O) {
- var PCUIF_send_data sd;
timer T := 3.0;
- if (mp_pcuif_version < 11) {
- if (wait_for_cnf == true) {
- setverdict(fail, "confirmation for AGCH not supported in PCUIF v.10 or earlier");
- }
- pt.send(t_SD_PCUIF(conn_id,
- ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH, mac_block)));
- } else {
- var PCUIF_agch agch;
- agch.msg_id := msg_id;
- agch.data := mac_block;
- agch.confirm := confirm;
- pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH_2, enc_PCUIF_agch(agch))));
- }
+ var PCUIF_agch agch := {
+ msg_id := msg_id,
+ data := mac_block,
+ confirm := confirm
+ };
+ pt.send(t_SD_PCUIF(conn_id, ts_PCUIF_DATA_REQ(bts_nr, 0, 0, 0, 0, PCU_IF_SAPI_AGCH_2, enc_PCUIF_agch(agch))));
/* Exit early when the caller is not interested in the confirmation message */
if (wait_for_cnf == false) {
@@ -224,14 +188,8 @@
T.start;
alt {
- [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_AGCH_2))) -> value sd {
- if (mp_pcuif_version < 11) {
- setverdict(fail, "got tr_PCUIF_DATA_CNF_DT, but AGCH confirmation is not supported in PCUIF v.10 or earlier");
- mtc.stop;
- } else {
- log("IMM.ASS was sent on AGCH");
- return;
- }
+ [] pt.receive(t_SD_PCUIF(conn_id, tr_PCUIF_DATA_CNF_2(bts_nr, PCU_IF_SAPI_AGCH_2))) {
+ log("IMM.ASS was sent on AGCH");
}
[] pt.receive { repeat; }
[] T.timeout {