From c155930c220e08da32903e2e27b6d420cbb140b4 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 19 Jul 2020 16:39:12 +0700 Subject: [PATCH] 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 --- library/PCUIF_Types.ttcn | 9 +++++++-- pcu/PCU_Tests.ttcn | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 8ce41c498..089403c73 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -14,8 +14,13 @@ module PCUIF_Types { 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 (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr } 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 09d91a07f..20e35823b 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -60,7 +60,7 @@ modulepar { /* 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,