This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19323 )
Change subject: library/PCUIF_Types: version 10: add frequency hopping parameters
......................................................................
library/PCUIF_Types: version 10: add frequency hopping parameters
Change-Id: Idf11bc4ba3ff0b00b32f2beab8fd020c67119d05
Related: SYS#4868, OS#4547
---
M bts/BTS_Tests.ttcn
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.ttcn
3 files changed, 108 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/23/19323/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1c8127b..dfda043 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -5444,7 +5444,7 @@
var PCUIF_send_data sd;
[] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_INFO_IND(bts_nr, ?))) -> value sd {
- var bitstring pdch_mask := sd.data.u.info_ind.trx[trx_nr].pdch_mask;
+ var bitstring pdch_mask := f_PCUIF_ver_INFO_PDCHMask(sd.data.u.info_ind, trx_nr);
if (substr(pdch_mask, g_chan_nr.tn, 1) != exp) {
repeat;
}
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 089403c..2b1646b 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -16,11 +16,11 @@
modulepar {
/* PCUIF version supported by the IUT */
- PCUIF_Version mp_pcuif_version := 9;
+ PCUIF_Version mp_pcuif_version := 10;
};
const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts";
-type integer PCUIF_Version (9); /* supported versions */
+type integer PCUIF_Version (9..10); /* supported versions */
type enumerated PCUIF_MsgType {
PCU_IF_MSG_DATA_REQ ('00'O),
@@ -140,14 +140,39 @@
uint8_t ts_nr
} with { variant "" };
-type record PCUIF_InfoTrx {
+private type record PCUIF_InfoTrxTs {
+ uint8_t tsc,
+ uint8_t hopping,
+ uint8_t hsn,
+ uint8_t maio,
+ bitstring ma length(64)
+} with { variant (ma) "BITORDER(lsb)" };
+private type record length(8) of PCUIF_InfoTrxTs PCUIF_InfoTrxTsList;
+
+/* Version >= 10 specific coding */
+private type record PCUIF_InfoV10Trx {
+ uint16_t arfcn,
+ BIT8 pdch_mask,
+ OCT1 spare,
+ uint32_t hLayer1,
+ PCUIF_InfoTrxTsList ts
+} with { variant (pdch_mask) "BITORDER(msb)" };
+private type record length(8) of PCUIF_InfoV10Trx PCUIF_InfoV10TrxList;
+
+/* Version <= 9 specific coding */
+private type record PCUIF_InfoV09Trx {
uint16_t arfcn,
BIT8 pdch_mask,
OCT1 spare,
OCT8 tsc,
uint32_t hLayer1
} with { variant (pdch_mask) "BITORDER(msb)" };
-type record length(8) of PCUIF_InfoTrx PCUIF_InfoTrxs;
+private type record length(8) of PCUIF_InfoV09Trx PCUIF_InfoV09TrxList;
+
+type union PCUIF_InfoTrxs {
+ PCUIF_InfoV09TrxList v09,
+ PCUIF_InfoV10TrxList v10
+} with { variant "" };
type record PCUIF_info_ind {
uint32_t version,
@@ -187,7 +212,11 @@
record length(2) of uint16_t local_pprt,
record length(2) of uint16_t remote_port,
record length(2) of OCT4 remote_ip
-} with { variant "" }
+} with {
+ /* NOTE: TITAN is not smart enough to handle 'version < 10' and 'version > 9',
+ * so we cannot support more than two versions at the same time here. Sigh. */
+ variant (trx) "CROSSTAG(v09, version = 9; v10, version = 10)"
+};
type record PCUIF_act_req {
uint8_t is_activate,
@@ -676,9 +705,40 @@
spare2 := '000'B
};
-template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrx(template (value) uint16_t arfcn := 871,
- template (value) BIT8 pdch_mask := '00000001'B,
- OCT1 tsc := '07'O) := {
+template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH0(template (value) uint3_t tsc := 7) := {
+ tsc := tsc,
+ hopping := 0,
+ hsn := 0, maio := 0,
+ ma := '0000000000000000000000000000000000000000000000000000000000000000'B
+};
+
+template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH1(template (value) uint3_t tsc := 7,
+ template (value) uint6_t hsn := 0,
+ template (value) uint6_t maio := 0)
+modifies ts_PCUIF_InfoTrxTsH0 := {
+ hopping := 1,
+ hsn := hsn,
+ maio := maio
+};
+
+template (value) PCUIF_InfoV10Trx ts_PCUIF_InfoV10Trx(template (value) uint16_t arfcn := 871,
+ template (value) BIT8 pdch_mask := '00000001'B,
+ template (value) uint3_t tsc := 7) := {
+ arfcn := arfcn,
+ pdch_mask := pdch_mask,
+ spare := '00'O,
+ hLayer1 := 0,
+ ts := {
+ ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc),
+ ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc),
+ ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc),
+ ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc)
+ }
+};
+
+template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09Trx(template (value) uint16_t arfcn := 871,
+ template (value) BIT8 pdch_mask := '00000001'B,
+ OCT1 tsc := '07'O) := {
arfcn := arfcn,
pdch_mask := pdch_mask,
spare := '00'O,
@@ -686,11 +746,25 @@
hLayer1 := 0
}
-template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrxNULL := ts_PCUIF_InfoTrx(0, '00000000'B, '00'O);
+template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09TrxNULL := ts_PCUIF_InfoV09Trx(0, '00000000'B, '00'O);
-template (value) PCUIF_InfoTrxs ts_PCUIF_InfoTrxs_def := {
- ts_PCUIF_InfoTrx, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL,
- ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL };
+template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV09Trxs_def := {
+ v09 := {
+ ts_PCUIF_InfoV09Trx, ts_PCUIF_InfoV09TrxNULL,
+ ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL,
+ ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL,
+ ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL
+ }
+};
+
+template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV10Trxs_def := {
+ v10 := {
+ ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx,
+ ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx,
+ ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx,
+ ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx
+ }
+};
template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr,
template (value) PCUIF_info_ind info_ind) := {
@@ -830,4 +904,24 @@
}
+/* TODO: remove this as soon as we drop version 9 support */
+function f_PCUIF_ver_INFO_Trxs()
+return PCUIF_InfoTrxs {
+ if (PCUIF_Types.mp_pcuif_version >= 10) {
+ return valueof(ts_PCUIF_InfoV10Trxs_def);
+ } else {
+ return valueof(ts_PCUIF_InfoV09Trxs_def);
+ }
+}
+
+function f_PCUIF_ver_INFO_PDCHMask(in PCUIF_info_ind info, uint8_t trx_nr)
+return bitstring {
+ if (PCUIF_Types.mp_pcuif_version >= 10) {
+ return info.trx.v10[trx_nr].pdch_mask;
+ } else {
+ return info.trx.v09[trx_nr].pdch_mask;
+ }
+}
+
+
} with { encode "RAW" variant "BYTEORDER(first)" };
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 20e3582..9fc5ab6 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -62,7 +62,7 @@
friend template (value) PCUIF_info_ind ts_PCUIF_INFO_default := {
version := PCUIF_Types.mp_pcuif_version,
flags := c_PCUIF_Flags_default,
- trx := valueof(ts_PCUIF_InfoTrxs_def),
+ trx := f_PCUIF_ver_INFO_Trxs(),
bsic := 7,
mcc := 262,
mnc := 42,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19323
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idf11bc4ba3ff0b00b32f2beab8fd020c67119d05
Gerrit-Change-Number: 19323
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200719/282e2edd/attachment.htm>