osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556 )
Change subject: library/RSL_Types: RSL_SpeechAlgo: support CSD ...................................................................... library/RSL_Types: RSL_SpeechAlgo: support CSD Add data rates from 3GPP TS 48.058 ยง 9.3.6 octet 6 to the enum, and rename it from RSL_SpeechAlgo to RSL_SpeechAlgoDataRate so it's clear that it contains both. Rename RSL_CMOD_SP_GSM3 to RSL_CMOD_SP_GSM3_DT_NT1 and RSL_CMOD_SP_GSM4 to RSL_CMOD_SP_GSM4_DT_NT8 because their values are shared between a speech and a data entry. Related: OS#4393 Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d --- M bsc/BSC_Tests.ttcn M bts/BTS_Tests.ttcn M bts/BTS_Tests_VAMOS.ttcn M library/RSL_Types.ttcn 4 files changed, 70 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/31556/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b9182e3..965873e 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4273,12 +4273,12 @@ } } case (FR_AMR) { - if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3))) { + if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3_DT_NT1))) { return true; } } case (HR_AMR) { - if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3))) { + if (match(rsl_mode, tr_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3_DT_NT1))) { return true; } } @@ -4361,11 +4361,11 @@ } case (FR_AMR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_F; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3; + mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3_DT_NT1; } case (HR_AMR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_H; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3; + mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3_DT_NT1; } } return mode_ie; diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1859eed..54c27a2 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -871,7 +871,7 @@ ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := encr_info})) }; } - if (mode.coding_alg_rate == RSL_CMOD_SP_GSM3) { + if (mode.coding_alg_rate == RSL_CMOD_SP_GSM3_DT_NT1) { ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_MR_CONFIG, RSL_IE_Body:{multirate_cfg := g_pars.mr_conf})) }; } @@ -2546,7 +2546,7 @@ case (RSL_CMOD_NO_RESOURCE) { tch_mode := L1CTL_CHAN_MODE_SIGN; } case (RSL_CMOD_SP_GSM1) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V1; } case (RSL_CMOD_SP_GSM2) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V2; } - case (RSL_CMOD_SP_GSM3) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; + case (RSL_CMOD_SP_GSM3_DT_NT1) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; amr_codecs_bitmask := g_pars.mr_conf.codec_modes; } case else { @@ -2611,13 +2611,13 @@ { payload_len := 15; hdr := '00'O; } case (tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM2)) /* TCH/EFS */ { payload_len := 31; hdr := 'C0'O; } - case (tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3)) /* TCH/AFS */ + case (tr_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3_DT_NT1)) /* TCH/AFS */ { var integer amr_ft := get_start_amr_ft(); payload_len := f_amrft_payload_len(amr_ft) + 2; hdr := enc_RTP_AMR_Hdr(valueof(ts_RTP_AMR_Hdr(amr_ft, amr_ft, '1'B))); } - case (tr_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3)) /* TCH/AHS */ + case (tr_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3_DT_NT1)) /* TCH/AHS */ { var integer amr_ft := get_start_amr_ft(); payload_len := f_amrft_payload_len(amr_ft) + 2; @@ -8312,7 +8312,7 @@ vc_conn.done; /* TS1, TCH/F, V3 (AMR codec) */ - pars := valueof(t_Pars(ts_RslChanNr_Bm(1), ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3))); + pars := valueof(t_Pars(ts_RslChanNr_Bm(1), ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3_DT_NT1))); pars.mr_conf := valueof(ts_RSL_MultirateCfg); vc_conn := f_start_handler(refers(f_TC_speech_rtp), pars); vc_conn.done; @@ -8331,7 +8331,7 @@ vc_conn.done; /* TS1, TCH/H0, V3 (AMR codec) */ - pars := valueof(t_Pars(ts_RslChanNr_Lm(5, 0), ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3))); + pars := valueof(t_Pars(ts_RslChanNr_Lm(5, 0), ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3_DT_NT1))); pars.mr_conf := valueof(ts_RSL_MultirateCfg); vc_conn := f_start_handler(refers(f_TC_speech_rtp), pars); vc_conn.done; @@ -8431,7 +8431,7 @@ f_init(); /* TS5, TCH/H0, V3 (AMR codec) */ - pars := valueof(t_Pars(ts_RslChanNr_Bm(1), ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3))); + pars := valueof(t_Pars(ts_RslChanNr_Bm(1), ts_RSL_ChanMode(RSL_CHRT_TCH_F, RSL_CMOD_SP_GSM3_DT_NT1))); pars.mr_conf := valueof(ts_RSL_MultirateCfg); vc_conn := f_start_handler(refers(f_TC_speech_osmux), pars); vc_conn.done; @@ -8445,7 +8445,7 @@ f_init(); /* TS5, TCH/H0, V3 (AMR codec) */ - pars := valueof(t_Pars(ts_RslChanNr_Lm(5, 0), ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3))); + pars := valueof(t_Pars(ts_RslChanNr_Lm(5, 0), ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3_DT_NT1))); pars.mr_conf := valueof(ts_RSL_MultirateCfg); vc_conn := f_start_handler(refers(f_TC_speech_osmux), pars); vc_conn.done; diff --git a/bts/BTS_Tests_VAMOS.ttcn b/bts/BTS_Tests_VAMOS.ttcn index 2d03411..a71a047 100644 --- a/bts/BTS_Tests_VAMOS.ttcn +++ b/bts/BTS_Tests_VAMOS.ttcn @@ -57,13 +57,13 @@ { ts_RslChanNr_Bm(tn), /* V0(TCH/F), EFR codec */ ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM2) }, { ts_RslChanNr_Osmo_VAMOS_Bm(tn), /* V1(TCH/F), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } }, { { ts_RslChanNr_Bm(tn), /* V0(TCH/F), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Bm(tn), /* V1(TCH/F), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_F_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } } }; @@ -94,7 +94,7 @@ { ts_RslChanNr_Lm(tn, 0), /* V0(TCH/H0), HR codec */ ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM1) }, { ts_RslChanNr_Lm(tn, 1), /* V0(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 0), /* V1(TCH/H0), signalling */ ts_RSL_ChanMode_SIGN(RSL_CHRT_OSMO_TCH_H_VAMOS) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 1), /* V1(TCH/H1), signalling */ @@ -102,13 +102,13 @@ }, { { ts_RslChanNr_Lm(tn, 0), /* V0(TCH/H0), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Lm(tn, 1), /* V0(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 0), /* V1(TCH/H0), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 1), /* V1(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } } }; @@ -127,9 +127,9 @@ { ts_RslChanNr_Lm(tn, 0), /* TCH/H0, signalling */ ts_RSL_ChanMode_SIGN(RSL_CHRT_TCH_H) }, { ts_RslChanNr_Lm(tn, 1), /* V0(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 1), /* V1(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } }, { { ts_RslChanNr_Lm(tn, 0), /* TCH/H0, HR codec */ @@ -137,15 +137,15 @@ { ts_RslChanNr_Lm(tn, 1), /* V0(TCH/H1), HR codec */ ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 1), /* V1(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } }, { { ts_RslChanNr_Lm(tn, 0), /* TCH/H0, AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Lm(tn, 1), /* V0(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) }, + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) }, { ts_RslChanNr_Osmo_VAMOS_Lm(tn, 1), /* V1(TCH/H1), AMR codec */ - ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3) } + ts_RSL_ChanMode(RSL_CHRT_OSMO_TCH_H_VAMOS, RSL_CMOD_SP_GSM3_DT_NT1) } } }; @@ -174,7 +174,7 @@ for (var integer ch := 0; ch < lengthof(test[i]); ch := ch + 1) { pars[ch] := valueof(t_Pars(test[i][ch].chan_nr, test[i][ch].chan_mode)); - if (test[i][ch].chan_mode.coding_alg_rate == RSL_CMOD_SP_GSM3) { + if (test[i][ch].chan_mode.coding_alg_rate == RSL_CMOD_SP_GSM3_DT_NT1) { pars[ch].mr_conf := valueof(ts_RSL_MultirateCfg); } vc_conn[ch] := f_start_handler(handler, pars[ch], l1ctl := false); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index cad8a34..085784c 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -386,14 +386,30 @@ RSL_CHRT_OSMO_TCH_F_VAMOS ('10001000'B), RSL_CHRT_OSMO_TCH_H_VAMOS ('10001001'B) } with { variant "FIELDLENGTH(8)" }; - type enumerated RSL_SpeechAlgo { + type enumerated RSL_SpeechAlgoDataRate { RSL_CMOD_NO_RESOURCE ('00000000'B), RSL_CMOD_SP_GSM1 ('00000001'B), RSL_CMOD_SP_GSM2 ('00010001'B), - RSL_CMOD_SP_GSM3 ('00100001'B), - RSL_CMOD_SP_GSM4 ('00110001'B), + RSL_CMOD_SP_GSM3_DT_NT1 ('00100001'B), + RSL_CMOD_SP_GSM4_DT_NT8 ('00110001'B), RSL_CMOD_SP_GSM5 ('00001001'B), - RSL_CMOD_SP_GSM6 ('00001101'B) + RSL_CMOD_SP_GSM6 ('00001101'B), + RSL_CMOD_DT_NT2 ('00100010'B), + RSL_CMOD_DT_NT3 ('00100011'B), + RSL_CMOD_DT_NT4 ('00101001'B), + RSL_CMOD_DT_NT5 ('00101010'B), + RSL_CMOD_DT_NT6 ('00101011'B), + RSL_CMOD_DT_NT7 ('00110100'B), + RSL_CMOD_DT_NT9 ('00011000'B), + RSL_CMOD_DT_T1 ('01111000'B), + RSL_CMOD_DT_T2 ('01111001'B), + RSL_CMOD_DT_T3 ('01011000'B), + RSL_CMOD_DT_T4 ('01010000'B), + RSL_CMOD_DT_T5 ('01010001'B), + RSL_CMOD_DT_T6 ('01010010'B), + RSL_CMOD_DT_T7 ('01010011'B), + RSL_CMOD_DT_T8 ('01010100'B), + RSL_CMOD_DT_T9 ('01010101'B) } with { variant "FIELDLENGTH(8)" }; type record RSL_IE_ChannelMode { uint8_t len, @@ -402,7 +418,7 @@ boolean dtx_u, RSL_SpeechDataInd spd_ind, RSL_ChanRateType ch_rate_type, - RSL_SpeechAlgo coding_alg_rate + RSL_SpeechAlgoDataRate coding_alg_rate } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,coding_alg_rate)" } template (value) RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN(RSL_ChanRateType t := RSL_CHRT_SDCCH, @@ -416,7 +432,7 @@ coding_alg_rate := RSL_CMOD_NO_RESOURCE } - template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg, + template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgoDataRate alg_rate, boolean dtx_downlink := false) := { len := 0, /* overwritten */ reserved := '000000'B, @@ -424,17 +440,17 @@ dtx_u := false, spd_ind := RSL_SPDI_SPEECH, ch_rate_type := t, - coding_alg_rate := alg + coding_alg_rate := alg_rate } template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t, - template RSL_SpeechAlgo alg) := { + template RSL_SpeechAlgoDataRate alg_rate) := { len := ?, reserved := '000000'B, dtx_d := ?, dtx_u := ?, spd_ind := RSL_SPDI_SPEECH, ch_rate_type := t, - coding_alg_rate := alg + coding_alg_rate := alg_rate } /* 9.3.4 BS Power IE */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556 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: Ief2d95c7e9d71afb26fa74da755294226c8e158d Gerrit-Change-Number: 31556 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osm...@sysmocom.de> Gerrit-MessageType: newchange