diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 5b69b5df5..0ee3cd4b7 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -497,7 +497,7 @@ runs on ConnHdlr { var RSL_Message rx := f_rsl_transceive_ret(tx, exp_rx, id, ignore_other); } -function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false) +function f_rsl_chan_act(RSL_IE_ChannelMode mode, boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var RSL_Message ch_act := valueof(ts_RSL_CHAN_ACT(g_chan_nr, mode)); if (encr_enable) { @@ -507,6 +507,7 @@ runs on ConnHdlr { ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := encr_info})) }; } + ch_act.ies := ch_act.ies & more_ies; f_rsl_transceive(ch_act, tr_RSL_CHAN_ACT_ACK(g_chan_nr), "RSL CHAN ACT"); } @@ -960,7 +961,52 @@ testcase TC_sacch_multi_chg() runs on test_CT { Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } -/* TODO: Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */ +/* Test for SACCH information present in RSL CHAN ACT (overrides FILLING) */ +private function f_TC_sacch_chan_act(charstring id) runs on ConnHdlr { + var octetstring si5 := f_rnd_octstring(19); + var octetstring si6 := f_rnd_octstring(19); + var octetstring si5_specific := f_rnd_octstring(19); + var octetstring si6_specific := f_rnd_octstring(19); + + /* First, configure both SI5 and SI6 to be transmitted */ + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_5, si5)); + RSL.send(ts_RSL_SACCH_FILL(RSL_SYSTEM_INFO_6, si6)); + + f_l1_tune(L1CTL); + RSL.clear; + + /* activate channel with different SACCH filling */ + var RSL_SacchInfo sacch_info := valueof(ts_RSL_SacchInfo({ + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_5, si5_specific), + ts_RSL_SacchInfoElem(RSL_SYSTEM_INFO_6, si6_specific) + })); + var RSL_IE_List addl_ies := { valueof(t_RSL_IE(RSL_IE_SACCH_INFO, + RSL_IE_Body:{sacch_info := sacch_info})) }; + f_est_dchan(more_ies := addl_ies); + + /* check that SACCH actually are received as expected */ + f_sacch_present(si5_specific); + f_sacch_present(si6_specific); + + /* release the channel */ + f_rsl_chan_deact(); + f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr); +} +testcase TC_sacch_chan_act() runs on test_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars; + f_init(); + + for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) { + pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN)); + log(testcasename(), ": Starting for ", g_AllChannels[i]); + vc_conn := f_start_handler(refers(f_TC_sacch_chan_act), pars); + vc_conn.done; + } + /* TODO: do the above in parallel, rather than sequentially? */ + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /* TODO: Test for SACCH transmission rules in the context of special CHAN ACT (HO) */ @@ -1386,7 +1432,7 @@ private function f_rach_req_wait_chan_rqd(integer ra) runs on ConnHdlr return Gs } /* Establish dedicated channel: L1CTL + RSL side */ -private function f_est_dchan(boolean encr_enable := false) runs on ConnHdlr { +private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies := {}) runs on ConnHdlr { var GsmFrameNumber fn; var ImmediateAssignment imm_ass; var integer ra := 23; @@ -1395,7 +1441,7 @@ private function f_est_dchan(boolean encr_enable := false) runs on ConnHdlr { fn := f_rach_req_wait_chan_rqd(ra); /* Activate channel on BTS side */ - f_rsl_chan_act(g_pars.chan_mode, encr_enable); + f_rsl_chan_act(g_pars.chan_mode, encr_enable, more_ies); /* Send IMM.ASS via CCHAN */ var ChannelDescription ch_desc := { @@ -4418,6 +4464,7 @@ control { execute( TC_sacch_info_mod() ); execute( TC_sacch_multi() ); execute( TC_sacch_multi_chg() ); + execute( TC_sacch_chan_act() ); execute( TC_rach_content() ); execute( TC_rach_count() ); execute( TC_rach_max_ta() ); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index 39ba3d319..0d772b320 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -565,6 +565,35 @@ module RSL_Types { cause_ext := omit } + /* 9.3.29 */ + type record RSL_SacchInfo { + uint8_t len, + uint8_t num_msgs, + RSL_SacchInfoElements elems + } with { + variant (len) "LENGTHTO(num_msgs,elems)"; + variant (num_msgs) "LENGTHTO(elems)"; + variant (num_msgs) "UNIT(elements)" + }; + type record RSL_SacchInfoElement { + RSL_IE_SysinfoType si_type, + uint8_t len, + octetstring msg + } with { + variant (len) "LENGTHTO(msg)"; + }; + type record of RSL_SacchInfoElement RSL_SacchInfoElements; + template (value) RSL_SacchInfo ts_RSL_SacchInfo(template (value) RSL_SacchInfoElements elems) := { + len := 0, /* overwritten */ + num_msgs := 0, /* overwritten */ + elems := elems + } + template (value) RSL_SacchInfoElement ts_RSL_SacchInfoElem(RSL_IE_SysinfoType tp, octetstring msg) := { + si_type := tp, + len := lengthof(msg), + msg := msg + } + /* 9.3.40 */ type enumerated RSL_ChanNeeded { RSL_CHANNEED_ANY ('00'B), @@ -703,6 +732,7 @@ module RSL_Types { RSL_IE_ChanNeeded chan_needed, RSL_IE_CbCommandType cb_cmd_type, RSL_LV smscb_message, + RSL_SacchInfo sacch_info, RSL_IE_StartingTime starting_time, RSL_IE_EncryptionInfo encr_info, @@ -755,6 +785,7 @@ module RSL_Types { chan_needed, iei = RSL_IE_CHAN_NEEDED; cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; smscb_message, iei = RSL_IE_SMSCB_MSG; + sacch_info, iei = RSL_IE_SACCH_INFO; starting_time, iei = RSL_IE_STARTNG_TIME; encr_info, iei = RSL_IE_ENCR_INFO;