pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29268 )
Change subject: BSC: Implement RSL_IE_MultirateCfg and use it in BSC_Tests ......................................................................
BSC: Implement RSL_IE_MultirateCfg and use it in BSC_Tests
Change-Id: I0a5ddce570c0fd70f096d897b0b609d20b552ff7 --- M bsc/BSC_Tests.ttcn M library/RSL_Types.ttcn 2 files changed, 33 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/68/29268/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 09cd717..fae31e2 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -111,6 +111,19 @@ /* BTS3 */ { trx_num := 1, tsc := 4 } }
+private const RSL_IE_Body mr_conf_amr_5_90 := { + multirate_cfg := { + len := 2, + mr_speech_ver := 1, + nscb := false, + icmi := true, + spare := '0'B, + start_mode := 0, + amr_codec_modes := '00000100'B, /* 5,90k */ + parameters := ''O + } +}; + /* per-BTS state which we keep */ type record BTS_State { /* component reference to the IPA_Client component used for RSL */ @@ -4504,17 +4517,10 @@ /* Note: This setups the codec configuration. The parameter payload in * mr_conf must be consistant with the parameter codecElements in pars * and also must match the amr-config in osmo-bsc.cfg! */ - var RSL_IE_Body mr_conf := { - other := { - len := 2, - payload := '2804'O - } - }; - pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_F})); pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ pars.ass_codec_list.codecElements[0].s8_15 := '01010111'B; - pars.expect_mr_conf_ie := mr_conf; + pars.expect_mr_conf_ie := mr_conf_amr_5_90;
f_init(1, true); f_sleep(1.0); @@ -4539,17 +4545,10 @@ var MSC_ConnHdlr vc_conn;
/* See note above */ - var RSL_IE_Body mr_conf := { - other := { - len := 2, - payload := '2804'O - } - }; - pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_H})); pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ pars.ass_codec_list.codecElements[0].s8_15 := '00000111'B; - pars.expect_mr_conf_ie := mr_conf; + pars.expect_mr_conf_ie := mr_conf_amr_5_90;
f_init(1, true); f_sleep(1.0); @@ -4596,19 +4595,12 @@ /* 'amr start-mode auto' should not keep the (unused) 'smod' bits from previous configuration */ testcase TC_assignment_codec_amr_startmode_cruft() runs on test_CT { var TestHdlrParams pars := f_gen_test_hdlr_pars(); - var MSC_ConnHdlr vc_conn; - - var RSL_IE_Body mr_conf := { - other := { - len := 2, - payload := '2004'O /* <- expect ICMI=0, smod=00 */ - } - }; + var MSC_ConnHdlr vc_conn
pars.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecAMR_F})); pars.ass_codec_list.codecElements[0].s0_7 := '00000100'B; /* 5,90k */ pars.ass_codec_list.codecElements[0].s8_15 := '01010111'B; - pars.expect_mr_conf_ie := mr_conf; + pars.expect_mr_conf_ie := mr_conf_amr_5_90;
f_init(1, true); f_sleep(1.0); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 6f8846f..c606dc3 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -814,6 +814,20 @@ slot_count := slot_count }
+ /* 9.3.52, 3GPP TS 44.018 10.5.2.21aa */ + type record RSL_IE_MultirateCfg { + uint8_t len, + uint3_t mr_speech_ver, + boolean nscb, + boolean icmi, + BIT1 spare, + uint2_t start_mode, + BIT8 amr_codec_modes, + octetstring parameters + } with { + variant (len) "LENGTHTO(mr_speech_ver,nscb,icmi,spare,start_mode,parameters)" + }; + /* 9.3.53 */ type record RSL_IE_MultirateCtrl { uint3_t spare, @@ -952,6 +966,7 @@ RSL_IE_MS_Power ms_power, RSL_IE_MS_Power_Parameters ms_power_params, uint8_t timing_adv, + RSL_IE_MultirateCfg multirate_cfg, RSL_IE_MultirateCtrl multirate_ctrl, uint8_t msg_id, RSL_IE_FrameNumber frame_nr, @@ -1014,6 +1029,7 @@ ms_power, iei = RSL_IE_MS_POWER; ms_power_params, iei = RSL_IE_MS_POWER_PARAM; timing_adv, iei = RSL_IE_TIMING_ADVANCE; + multirate_cfg, iei = RSL_IE_MR_CONFIG; multirate_ctrl, iei = RSL_IE_MR_CONTROL; msg_id, iei = RSL_IE_MSG_ID;