library/PCUIF_Types: make PCUIF version configurable
When changing the PCUIF, we have to maintain backwards compatibility
with the release versions of both osmo-pcu and osmo-bts, not only
with the recent master. In order to achieve that, let's introduce
'mp_pcuif_version', so the PCUIF version can be adjusted.
Change-Id: I3cf7f908e606b91dd2cbddc168827dd074aed052
Related: SYS#4868, OS#4547
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 8ce41c4..089403c 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -14,8 +14,13 @@
import from General_Types all;
import from Osmocom_Types all;
+modulepar {
+ /* PCUIF version supported by the IUT */
+ PCUIF_Version mp_pcuif_version := 9;
+};
+
const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts";
-const uint32_t PCU_IF_VERSION := 9;
+type integer PCUIF_Version (9); /* supported versions */
type enumerated PCUIF_MsgType {
PCU_IF_MSG_DATA_REQ ('00'O),
@@ -698,7 +703,7 @@
}
template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?,
template PCUIF_Flags flags := ?,
- template uint32_t version := PCU_IF_VERSION) := {
+ template uint32_t version := mp_pcuif_version) := {
msg_type := PCU_IF_MSG_INFO_IND,
bts_nr := bts_nr,
spare := ?,
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 09d91a0..20e3582 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -60,7 +60,7 @@
/* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */
friend template (value) PCUIF_info_ind ts_PCUIF_INFO_default := {
- version := PCU_IF_VERSION,
+ version := PCUIF_Types.mp_pcuif_version,
flags := c_PCUIF_Flags_default,
trx := valueof(ts_PCUIF_InfoTrxs_def),
bsic := 7,