| module BTS_Tests { |
| |
| import from General_Types all; |
| import from GSM_Types all; |
| import from GSM_RR_Types all; |
| import from Osmocom_Types all; |
| import from GSM_Types all; |
| import from GSM_RR_Types all; |
| import from L1CTL_PortType all; |
| import from L1CTL_Types all; |
| import from LAPDm_Types all; |
| import from Osmocom_CTRL_Adapter all; |
| |
| import from RSL_Types all; |
| import from IPA_Types all; |
| import from IPA_Emulation all; |
| import from RSL_Emulation all; |
| |
| import from IPL4asp_Types all; |
| import from TRXC_Types all; |
| import from TRXC_CodecPort all; |
| import from TRXC_CodecPort_CtrlFunct all; |
| |
| import from MobileL3_CommonIE_Types all; |
| import from MobileL3_RRM_Types all; |
| import from MobileL3_Types all; |
| import from L3_Templates all; |
| |
| /* The tests assume a BTS with the following timeslot configuration: |
| * TS0 : Combined CCCH + SDCCH/4 |
| * TS1 .. TS 4: TCH/F |
| * TS5 : TCH/H |
| * TS6 : SDCCH/8 |
| * TS7 : PDCH |
| */ |
| |
| modulepar { |
| charstring mp_rsl_ip := "127.0.0.2"; |
| integer mp_rsl_port := 3003; |
| integer mp_trx0_arfcn := 871; |
| integer mp_bb_trxc_port := 5704; |
| } |
| |
| type component test_CT extends CTRL_Adapter_CT { |
| /* IPA Emulation component underneath RSL */ |
| var IPA_Emulation_CT vc_IPA; |
| /* RSL Emulation component (for ConnHdlr tests) */ |
| var RSL_Emulation_CT vc_RSL; |
| /* Direct RSL_CCHAN_PT */ |
| port RSL_CCHAN_PT RSL_CCHAN; |
| |
| /* L1CTL port (for classic tests) */ |
| port L1CTL_PT L1CTL; |
| } |
| |
| /* an individual call / channel */ |
| type component ConnHdlr extends RSL_DchanHdlr { |
| port L1CTL_PT L1CTL; |
| |
| port TRXC_CODEC_PT BB_TRXC; |
| var integer g_bb_trxc_conn_id; |
| |
| timer g_Tguard; |
| timer g_Tmeas_exp := 2.0; /* >= 103 SACCH multiframe ~ 500ms */ |
| |
| var ConnHdlrPars g_pars; |
| var uint8_t g_next_meas_res_nr := 0; |
| } |
| |
| function f_init_rsl(charstring id) runs on test_CT { |
| vc_IPA := IPA_Emulation_CT.create(id & "-RSL-IPA"); |
| vc_RSL := RSL_Emulation_CT.create(id & "-RSL"); |
| |
| map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT); |
| connect(vc_IPA:IPA_RSL_PORT, vc_RSL:IPA_PT); |
| connect(self:RSL_CCHAN, vc_RSL:CCHAN_PT); |
| |
| vc_IPA.start(IPA_Emulation.main_server(mp_rsl_ip, mp_rsl_port)); |
| vc_RSL.start(RSL_Emulation.main(false)); |
| } |
| |
| type record ConnHdlrPars { |
| RslChannelNr chan_nr, |
| RSL_IE_ChannelMode chan_mode, |
| float t_guard, |
| ConnL1Pars l1_pars |
| } |
| |
| /* Default SYSTEM INFORMATION 3 */ |
| template (value) GsmRrMessage ts_SI3_default := { |
| header := t_RrHeader(SYSTEM_INFORMATION_TYPE_3, 0), |
| payload := { |
| si3 := { |
| cell_id := 23, |
| lai := { |
| mcc_mnc := '262F42'H, |
| lac := 42 |
| }, |
| ctrl_chan_desc := { |
| msc_r99 := true, |
| att := true, |
| bs_ag_blks_res := 1, |
| ccch_conf := CCHAN_DESC_1CCCH_COMBINED, |
| si22_ind := false, |
| cbq3 := CBQ3_IU_MODE_NOT_SUPPORTED, |
| spare := '00'B, |
| bs_pa_mfrms := 0, /* 2 multiframes */ |
| t3212 := 1 /* 6 minutes */ |
| }, |
| cell_opts := { |
| dn_ind := false, |
| pwrc := false, |
| dtx := MS_MAY_USE_UL_DTX, |
| radio_link_tout_div4 := 4/4 |
| }, |
| cell_sel_pars := { |
| cell_resel_hyst_2dB := 0, |
| ms_txpwr_max_cch := 0, |
| acs := '0'B, |
| neci := true, |
| rxlev_access_min := 0 |
| }, |
| rach_ctrl_pars := { |
| max_retrans := RACH_MAX_RETRANS_1, |
| tx_integer := '0000'B, /* 3 slots */ |
| cell_bar_access := false, |
| re_not_allowed := true, |
| acc := '1111111111111111'B |
| }, |
| rest_octets := ''O |
| } |
| } |
| } |
| |
| /* global init function */ |
| function f_init(charstring id := "BTS-Test") runs on test_CT { |
| f_init_rsl(id); |
| RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); |
| f_sleep(0.5); /* workaround for OS#3000 */ |
| |
| /* Send SI3 to the BTS, it is needed for various computations */ |
| var GsmRrMessage si3 := valueof(ts_SI3_default); |
| log("Sending SI3 ", si3); |
| var octetstring si3_enc := enc_GsmRrMessage(si3); |
| RSL_CCHAN.send(ts_RSL_UD(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_3, si3_enc))); |
| } |
| |
| /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */ |
| function f_init_l1ctl() runs on test_CT { |
| map(self:L1CTL, system:L1CTL); |
| f_connect_reset(L1CTL); |
| } |
| |
| type function void_fn(charstring id) runs on ConnHdlr; |
| |
| /* create a new test component */ |
| function f_start_handler(void_fn fn, ConnHdlrPars pars) |
| runs on test_CT return ConnHdlr { |
| var charstring id := testcasename(); |
| var ConnHdlr vc_conn; |
| |
| vc_conn := ConnHdlr.create(id); |
| /* connect to RSL Emulation main component */ |
| connect(vc_conn:RSL, vc_RSL:CLIENT_PT); |
| connect(vc_conn:RSL_PROC, vc_RSL:RSL_PROC); |
| |
| vc_conn.start(f_handler_init(fn, id, pars)); |
| return vc_conn; |
| } |
| |
| template ASP_RSL_Unitdata ts_RSL_UD(template RSL_Message rsl, IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := { |
| streamId := sid, |
| rsl := rsl |
| } |
| |
| template ASP_RSL_Unitdata tr_RSL_UD(template RSL_Message rsl, |
| template IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := { |
| streamId := sid, |
| rsl := rsl |
| } |
| |
| private altstep as_Tguard() runs on ConnHdlr { |
| [] g_Tguard.timeout { |
| setverdict(fail, "Tguard timeout"); |
| self.stop; |
| } |
| } |
| |
| private function f_l1_tune(L1CTL_PT L1CTL) { |
| f_L1CTL_FBSB(L1CTL, { false, mp_trx0_arfcn }, CCCH_MODE_COMBINED); |
| } |
| |
| private function f_trxc_connect() runs on ConnHdlr { |
| map(self:BB_TRXC, system:BB_TRXC); |
| var Result res; |
| res := TRXC_CodecPort_CtrlFunct.f_IPL4_connect(BB_TRXC, "127.0.0.1", mp_bb_trxc_port, |
| "127.0.0.1", 0, -1, {udp:={}}, {}); |
| g_bb_trxc_conn_id := res.connId; |
| } |
| |
| private function f_trxc_fake_rssi(uint8_t rssi) runs on ConnHdlr { |
| BB_TRXC.send(ts_TRXC_Send(g_bb_trxc_conn_id, ts_TRXC_FAKE_RSSI(rssi))); |
| } |
| |
| private function f_trx_fake_toffs256(int16_t toffs256) runs on ConnHdlr { |
| BB_TRXC.send(ts_TRXC_Send(g_bb_trxc_conn_id, ts_TRXC_FAKE_TIMING(toffs256))); |
| } |
| |
| /* first function started in ConnHdlr component */ |
| private function f_handler_init(void_fn fn, charstring id, ConnHdlrPars pars) |
| runs on ConnHdlr { |
| g_pars := pars; |
| g_chan_nr := pars.chan_nr; |
| |
| map(self:L1CTL, system:L1CTL); |
| f_connect_reset(L1CTL); |
| |
| f_trxc_connect(); |
| |
| g_Tguard.start(pars.t_guard); |
| activate(as_Tguard()); |
| |
| f_rslem_register(0, pars.chan_nr); |
| |
| /* call the user-supplied test case function */ |
| fn.apply(id); |
| } |
| |
| function f_rsl_transceive(template RSL_Message tx, template RSL_Message exp_rx, charstring id) |
| runs on ConnHdlr { |
| timer T := 3.0; |
| RSL.send(tx); |
| T.start; |
| alt { |
| [] RSL.receive(exp_rx) { |
| T.stop; |
| setverdict(pass); |
| } |
| [] T.timeout { |
| setverdict(fail, "Timeout expecting " & id); |
| self.stop; |
| } |
| [] RSL.receive { |
| setverdict(fail, "Unexpected RSL message received"); |
| } |
| } |
| } |
| |
| function f_rsl_chan_act(RSL_IE_ChannelMode mode) runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_CHAN_ACT(g_chan_nr, mode), tr_RSL_CHAN_ACT_ACK(g_chan_nr), |
| "RSL CHAN ACT"); |
| } |
| |
| function f_rsl_chan_deact() runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_RF_CHAN_REL(g_chan_nr), tr_RSL_RF_CHAN_REL_ACK(g_chan_nr), |
| "RF CHAN REL"); |
| } |
| |
| private template ConnHdlrPars t_Pars(template RslChannelNr chan_nr, |
| template RSL_IE_ChannelMode chan_mode, |
| float t_guard := 20.0) := { |
| chan_nr := valueof(chan_nr), |
| chan_mode := valueof(chan_mode), |
| t_guard := t_guard, |
| l1_pars := { |
| dtx_enabled := false, |
| meas_ul := { |
| full := { |
| rxlev := dbm2rxlev(-53), |
| rxqual := 0 |
| }, |
| sub := { |
| rxlev := dbm2rxlev(-53), |
| rxqual := 0 |
| } |
| }, |
| timing_offset_256syms := 0, |
| bs_power_level := 0, |
| ms_power_level := 0, |
| ms_actual_ta := 0 |
| } |
| } |
| |
| /* Stress test: Do 500 channel activations/deactivations in rapid succession */ |
| function f_TC_chan_act_stress(charstring id) runs on ConnHdlr { |
| for (var integer i := 0; i < 500; i := i+1) { |
| f_rsl_chan_act(g_pars.chan_mode); |
| f_rsl_chan_deact(); |
| } |
| setverdict(pass); |
| } |
| testcase TC_chan_act_stress() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| vc_conn := f_start_handler(refers(f_TC_chan_act_stress), pars); |
| vc_conn.done; |
| } |
| |
| /* Test if re-activation of an already active channel fails as expected */ |
| function f_TC_chan_act_react(charstring id) runs on ConnHdlr { |
| f_rsl_chan_act(g_pars.chan_mode); |
| /* attempt to activate the same lchan again -> expect reject */ |
| RSL.send(ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode)); |
| alt { |
| [] RSL.receive(tr_RSL_CHAN_ACT_ACK(g_chan_nr)) { |
| setverdict(fail, "Unexpected CHAN ACT ACK on double activation"); |
| } |
| [] RSL.receive(tr_RSL_CHAN_ACT_NACK(g_chan_nr)) { |
| setverdict(pass); |
| } |
| } |
| f_rsl_chan_deact(); |
| } |
| testcase TC_chan_act_react() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| vc_conn := f_start_handler(refers(f_TC_chan_act_react), pars); |
| vc_conn.done; |
| } |
| |
| /* Attempt to de-activate a channel that's not active */ |
| function f_TC_chan_deact_not_active(charstring id) runs on ConnHdlr { |
| timer T := 3.0; |
| RSL.send(ts_RSL_RF_CHAN_REL(g_chan_nr)); |
| T.start; |
| alt { |
| [] RSL.receive(tr_RSL_RF_CHAN_REL_ACK(g_chan_nr)) { |
| setverdict(pass); |
| } |
| [] T.timeout { |
| setverdict(fail, "Timeout expecting RF_CHAN_REL_ACK"); |
| } |
| } |
| } |
| testcase TC_chan_deact_not_active() runs on test_CT { |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| var ConnHdlr vc_conn := f_start_handler(refers(f_TC_chan_deact_not_active), pars); |
| vc_conn.done; |
| } |
| |
| /* attempt to activate channel with wrong RSL Channel Nr IE; expect NACK */ |
| function f_TC_chan_act_wrong_nr(charstring id) runs on ConnHdlr { |
| RSL.send(ts_RSL_CHAN_ACT(g_chan_nr, g_pars.chan_mode)); |
| alt { |
| [] RSL.receive(tr_RSL_CHAN_ACT_ACK(g_chan_nr)) { |
| setverdict(fail, "Unexpected CHAN ACT ACK"); |
| } |
| [] RSL.receive(tr_RSL_CHAN_ACT_NACK(g_chan_nr)) { |
| setverdict(pass); |
| } |
| } |
| } |
| private type record WrongChanNrCase { |
| RslChannelNr chan_nr, |
| charstring description |
| } |
| private type record of WrongChanNrCase WrongChanNrCases; |
| private template WrongChanNrCase t_WCN(template RslChannelNr chan_nr, charstring desc) := { |
| chan_nr := chan_nr, |
| description := desc |
| } |
| |
| testcase TC_chan_act_wrong_nr() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| |
| f_init(testcasename()); |
| |
| var WrongChanNrCases wrong := { |
| valueof(t_WCN(t_RslChanNr_RACH(0), "RACH is not a dedicated channel")), |
| valueof(t_WCN(t_RslChanNr_RACH(1), "RACH doesn't exist on timeslot")), |
| valueof(t_WCN(t_RslChanNr_BCCH(0), "BCCH is not a dedicated channel")), |
| valueof(t_WCN(t_RslChanNr_PCH_AGCH(0), "PCH/AGCH is not a dedicated channel")), |
| valueof(t_WCN(t_RslChanNr_Bm(0), "TS0 cannot be TCH/F")), |
| valueof(t_WCN(t_RslChanNr_Lm(0, 0), "TS0 cannot be TCH/H")), |
| valueof(t_WCN(t_RslChanNr_Lm(0, 1), "TS0 cannot be TCH/H")), |
| valueof(t_WCN(t_RslChanNr_PDCH(0), "TS0 cannot be PDCH")), |
| valueof(t_WCN(t_RslChanNr_SDCCH8(0, 0), "TS0 cannot be SDCCH/8")), |
| valueof(t_WCN(t_RslChanNr_SDCCH8(0, 7), "TS0 cannot be SDCCH/8")), |
| valueof(t_WCN(t_RslChanNr_SDCCH4(7, 0), "TS7 cannot be SDCCH/4")), |
| valueof(t_WCN(t_RslChanNr_SDCCH4(7, 3), "TS7 cannot be SDCCH/4")), |
| valueof(t_WCN(t_RslChanNr_Lm(1, 0), "TS1 cannot be TCH/H")) |
| }; |
| |
| for (var integer i := 0; i < sizeof(wrong); i := i+1) { |
| pars := valueof(t_Pars(wrong[i].chan_nr, ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_chan_act_wrong_nr), pars); |
| vc_conn.done; |
| } |
| } |
| |
| function f_TC_chan_req(charstring id) runs on ConnHdlr { |
| f_l1_tune(L1CTL); |
| |
| RSL.clear; |
| //L1.send(DCCH_establish_req:{ra := 23}); |
| /* This arrives on CCHAN, so we cannot test here */ |
| //RSL.receive(tr_RSL_CHAN_RQD(int2oct(23,1))); |
| } |
| testcase TC_chan_req() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| vc_conn := f_start_handler(refers(f_TC_chan_req), pars); |
| vc_conn.done; |
| } |
| |
| template LapdmAddressField ts_LapdmAddr(LapdmSapi sapi, boolean c_r) := { |
| spare := '0'B, |
| lpd := 0, |
| sapi := sapi, |
| c_r := c_r, |
| ea := true |
| } |
| |
| template LapdmFrameB ts_LAPDm_B(LapdmSapi sapi, boolean c_r, boolean p, octetstring pl) := { |
| addr := ts_LapdmAddr(sapi, c_r), |
| ctrl := t_LapdmCtrlUI(p), |
| len := 0, /* overwritten */ |
| m := false, |
| el := 1, |
| payload := pl |
| } |
| |
| /* handle incoming downlink SACCH and respond with uplink SACCH (meas res) */ |
| altstep as_l1_sacch() runs on ConnHdlr { |
| var L1ctlDlMessage l1_dl; |
| [] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) -> value l1_dl { |
| log("SACCH received: ", l1_dl.payload.data_ind.payload); |
| var GsmRrL3Message meas_rep := valueof(ts_MEAS_REP(true, 23, 23, 0, 0, omit)); |
| var LapdmFrameB lb := valueof(ts_LAPDm_B(0, false, false, enc_GsmRrL3Message(meas_rep))); |
| log("LAPDm: ", lb); |
| var octetstring pl := '0000'O & enc_LapdmFrameB(lb); |
| L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_SACCH(0), pl)); |
| repeat; |
| } |
| } |
| |
| altstep as_l1_dcch() runs on ConnHdlr { |
| var L1ctlDlMessage l1_dl; |
| [] L1CTL.receive(t_L1CTL_DATA_IND(g_chan_nr, tr_RslLinkID_DCCH(?))) -> value l1_dl { |
| log("DCCH received: ", l1_dl.payload.data_ind.payload); |
| var octetstring pl := '010301'O; |
| L1CTL.send(t_L1CTL_DATA_REQ(g_chan_nr, ts_RslLinkID_DCCH(0), pl)); |
| repeat; |
| } |
| } |
| |
| type record MeasElem { |
| uint6_t rxlev, |
| uint3_t rxqual |
| } |
| |
| type record MeasElemFS { |
| MeasElem full, |
| MeasElem sub |
| } |
| |
| type record ConnL1Pars { |
| boolean dtx_enabled, |
| MeasElemFS meas_ul, |
| int16_t timing_offset_256syms, |
| uint5_t bs_power_level, |
| uint5_t ms_power_level, |
| uint8_t ms_actual_ta |
| } |
| |
| /* Convert tiing offset from 1/256th symbol to RSL Timing Offset */ |
| private function toffs256s_to_rsl(int16_t toffs256s) return uint8_t { |
| return 63 + (toffs256s/256); |
| } |
| |
| /* build a template for matching measurement results against */ |
| private function f_build_meas_res_tmpl() runs on ConnHdlr return template RSL_Message { |
| var ConnL1Pars l1p := g_pars.l1_pars; |
| var template RSL_IE_UplinkMeas ul_meas := { |
| len := 3, |
| rfu := '0'B, |
| dtx_d := l1p.dtx_enabled, |
| rxlev_f_u := l1p.meas_ul.full.rxlev, |
| reserved1 := '00'B, |
| rxlev_s_u := l1p.meas_ul.sub.rxlev, |
| reserved2 := '00'B, |
| rxq_f_u := l1p.meas_ul.full.rxqual, |
| rxq_s_u := l1p.meas_ul.sub.rxqual, |
| supp_meas_info := omit |
| }; |
| /* HACK HACK HACK FIXME HACK HACK HACK see https://osmocom.org/issues/2988 */ |
| ul_meas.rxlev_f_u := ?; |
| ul_meas.rxlev_s_u := ?; |
| ul_meas.rxq_f_u := ?; |
| ul_meas.rxq_s_u := ?; |
| var template RSL_IE_BS_Power bs_power := { |
| reserved := 0, |
| epc := false, |
| fpc := false, |
| power_level := l1p.bs_power_level |
| }; |
| var template RSL_IE_L1Info l1_info := { |
| ms_power_lvl := l1p.ms_power_level, |
| fpc := false, |
| reserved := 0, |
| actual_ta := l1p.ms_actual_ta |
| }; |
| var uint8_t offs := toffs256s_to_rsl(l1p.timing_offset_256syms); |
| var template uint8_t t_toffs := (offs-1 .. offs+1); /* some tolerance */ |
| return tr_RSL_MEAS_RES_OSMO(g_chan_nr, g_next_meas_res_nr, ul_meas, bs_power, l1_info, |
| ?, t_toffs); |
| } |
| |
| /* verify we regularly receive measurement reports with incrementing numbers */ |
| altstep as_meas_res() runs on ConnHdlr { |
| var RSL_Message rsl; |
| [] RSL.receive(f_build_meas_res_tmpl()) -> value rsl { |
| /* increment counter of next to-be-expected meas rep */ |
| g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256; |
| /* Re-start the timer expecting the next MEAS RES */ |
| g_Tmeas_exp.start; |
| repeat; |
| } |
| [] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl { |
| setverdict(fail, "Received unspecific MEAS RES ", rsl); |
| self.stop; |
| } |
| [] RSL.receive(tr_RSL_MEAS_RES(?)) -> value rsl { |
| setverdict(fail, "Received unexpected MEAS RES ", rsl); |
| self.stop; |
| } |
| [] g_Tmeas_exp.timeout { |
| setverdict(fail, "Didn't receive expected measurement result") |
| self.stop; |
| } |
| } |
| |
| /* Establish dedicated channel: L1CTL + RSL side */ |
| private function f_est_dchan() runs on ConnHdlr { |
| var GsmFrameNumber fn; |
| var ImmediateAssignment imm_ass; |
| var integer ra := 23; |
| |
| fn := f_L1CTL_RACH(L1CTL, ra); |
| /* This arrives on CCHAN, so we cannot test for receiving CHAN RQDhere */ |
| //RSL.receive(tr_RSL_CHAN_RQD(int2oct(23,1))); |
| |
| /* Activate channel on BTS side */ |
| f_rsl_chan_act(g_pars.chan_mode); |
| |
| /* Send IMM.ASS via CCHAN */ |
| var ChannelDescription ch_desc := { |
| chan_nr := g_pars.chan_nr, |
| tsc := 7, |
| h := false, |
| arfcn := mp_trx0_arfcn, |
| maio_hsn := omit |
| }; |
| var MobileAllocation ma := { |
| len := 0, |
| ma := ''B |
| }; |
| var GsmRrMessage rr_msg := valueof(ts_IMM_ASS(ra, fn, 0, ch_desc, ma)); |
| RSL.send(ts_RSL_IMM_ASSIGN(enc_GsmRrMessage(rr_msg))); |
| |
| /* receive IMM.ASS on MS side */ |
| var ImmediateAssignment ia_um; |
| ia_um := f_L1CTL_WAIT_IMM_ASS(L1CTL, ra, fn); |
| /* enable dedicated mode */ |
| f_L1CTL_DM_EST_REQ_IA(L1CTL, ia_um); |
| } |
| |
| /* establish DChan, verify existance + contents of measurement reports */ |
| function f_TC_meas_res_periodic(charstring id) runs on ConnHdlr { |
| f_l1_tune(L1CTL); |
| RSL.clear; |
| |
| g_pars.l1_pars.meas_ul.full.rxlev := dbm2rxlev(-100); |
| g_pars.l1_pars.meas_ul.sub.rxlev := g_pars.l1_pars.meas_ul.full.rxlev; |
| f_trxc_fake_rssi(100); |
| |
| g_pars.l1_pars.timing_offset_256syms := 512; /* 2 symbols */ |
| f_trx_fake_toffs256(g_pars.l1_pars.timing_offset_256syms); |
| |
| f_est_dchan(); |
| |
| /* run for a number of seconds, send SACCH + FACCH from MS side and verify |
| * RSL measurement reports on Abis side */ |
| timer T := 8.0; |
| T.start; |
| alt { |
| [] as_l1_sacch(); |
| [] as_meas_res(); |
| [] as_l1_dcch(); |
| [] L1CTL.receive { repeat; } |
| [g_Tmeas_exp.running] T.timeout { |
| /* as_meas_res() would have done setverdict(fail) / self.stop in case |
| * of any earlier errors, so if we reach this timeout, we're good */ |
| setverdict(pass); |
| } |
| [] T.timeout { |
| setverdict(fail, "No MEAS RES received at all"); |
| } |
| } |
| f_rsl_chan_deact(); |
| } |
| testcase TC_meas_res_sign_tchf() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| f_init(testcasename()); |
| for (var integer tn := 1; tn <= 4; tn := tn+1) { |
| pars := valueof(t_Pars(t_RslChanNr_Bm(tn), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); |
| vc_conn.done; |
| } |
| } |
| testcase TC_meas_res_sign_tchh() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| f_init(testcasename()); |
| for (var integer ss := 0; ss <= 1; ss := ss+1) { |
| pars := valueof(t_Pars(t_RslChanNr_Lm(5, ss), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); |
| vc_conn.done; |
| } |
| } |
| testcase TC_meas_res_sign_sdcch4() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| f_init(testcasename()); |
| for (var integer ss := 0; ss <= 3; ss := ss+1) { |
| pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0, ss), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); |
| vc_conn.done; |
| } |
| } |
| testcase TC_meas_res_sign_sdcch8() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| f_init(testcasename()); |
| for (var integer ss := 0; ss <= 7; ss := ss+1) { |
| pars := valueof(t_Pars(t_RslChanNr_SDCCH8(6, ss), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_meas_res_periodic), pars); |
| vc_conn.done; |
| } |
| } |
| |
| /* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND */ |
| private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr { |
| f_l1_tune(L1CTL); |
| RSL.clear; |
| |
| f_est_dchan(); |
| f_sleep(2.0); |
| L1CTL.send(t_L1CTL_DM_REL_REQ(g_chan_nr)); |
| |
| timer T := 40.0; |
| T.start; |
| alt { |
| [] RSL.receive(tr_RSL_CONN_FAIL_IND(g_chan_nr, ?)) { |
| setverdict(pass) |
| } |
| [] RSL.receive { repeat }; |
| [] T.timeout { |
| setverdict(fail, "No CONN FAIL IND received"); |
| } |
| } |
| f_rsl_chan_deact(); |
| } |
| testcase TC_conn_fail_crit() runs on test_CT { |
| var ConnHdlr vc_conn; |
| var ConnHdlrPars pars; |
| f_init(testcasename()); |
| pars := valueof(t_Pars(t_RslChanNr_SDCCH8(6, 3), ts_RSL_ChanMode_SIGN)); |
| pars.t_guard := 60.0; |
| vc_conn := f_start_handler(refers(f_TC_conn_fail_crit), pars); |
| vc_conn.done; |
| } |
| |
| function tmsi_is_dummy(TMSIP_TMSI_V tmsi) return boolean { |
| if (tmsi == 'FFFFFFFF'O) { |
| return true; |
| } else { |
| return false; |
| } |
| } |
| |
| |
| altstep as_l1_count_paging(inout integer num_paging_rcv_msgs, inout integer num_paging_rcv_ids) |
| runs on test_CT { |
| var L1ctlDlMessage dl; |
| [] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0), ?, c_DummyUI)) { |
| repeat; |
| } |
| [] L1CTL.receive(t_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl { |
| var octetstring without_plen := |
| substr(dl.payload.data_ind.payload, 1, lengthof(dl.payload.data_ind.payload)-1); |
| var PDU_ML3_NW_MS rr := dec_PDU_ML3_NW_MS(without_plen); |
| if (match(rr, tr_PAGING_REQ1)) { |
| num_paging_rcv_msgs := num_paging_rcv_msgs + 1; |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| if (isvalue(rr.msgs.rrm.pagingReq_Type1.mobileIdentity2)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| } else if (match(rr, tr_PAGING_REQ2)) { |
| num_paging_rcv_msgs := num_paging_rcv_msgs + 1; |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type2.mobileIdentity1)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type2.mobileIdentity2)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| if (isvalue(rr.msgs.rrm.pagingReq_Type2.mobileIdentity3)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| } else if (match(rr, tr_PAGING_REQ3)) { |
| num_paging_rcv_msgs := num_paging_rcv_msgs + 1; |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type3.mobileIdentity1)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type3.mobileIdentity2)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type3.mobileIdentity3)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| if (not tmsi_is_dummy(rr.msgs.rrm.pagingReq_Type3.mobileIdentity4)) { |
| num_paging_rcv_ids := num_paging_rcv_ids + 1; |
| } |
| } |
| repeat; |
| } |
| } |
| |
| type record PagingTestCfg { |
| boolean combined_ccch, |
| integer bs_ag_blks_res, |
| float load_factor, |
| boolean exp_load_ind, |
| boolean exp_overload, |
| boolean use_tmsi |
| } |
| |
| type record PagingTestState { |
| integer num_paging_sent, |
| integer num_paging_rcv_msgs, |
| integer num_paging_rcv_ids, |
| integer num_overload |
| } |
| |
| /* receive + ignore RSL RF RES IND */ |
| altstep as_rsl_res_ind() runs on test_CT { |
| [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_RF_RES_IND)) { |
| repeat; |
| } |
| } |
| |
| /* Helper function for paging related testing */ |
| private function f_TC_paging(PagingTestCfg cfg) runs on test_CT return PagingTestState { |
| f_init(testcasename()); |
| f_init_l1ctl(); |
| f_l1_tune(L1CTL); |
| |
| var PagingTestState st := { |
| num_paging_sent := 0, |
| num_paging_rcv_msgs := 0, |
| num_paging_rcv_ids := 0, |
| num_overload := 0 |
| }; |
| |
| var float max_pch_blocks_per_sec := f_pch_block_rate_est(cfg.combined_ccch, cfg.bs_ag_blks_res); |
| var float max_pch_imsi_per_sec; |
| if (cfg.use_tmsi) { |
| max_pch_imsi_per_sec := max_pch_blocks_per_sec * 4.0; /* Type 3 */ |
| } else { |
| max_pch_imsi_per_sec := max_pch_blocks_per_sec * 2.0; /* Type 1 */ |
| } |
| var float pch_blocks_per_sec := max_pch_imsi_per_sec * cfg.load_factor; |
| var float interval := 1.0 / pch_blocks_per_sec; |
| log("pch_blocks_per_sec=", pch_blocks_per_sec, " interval=", interval); |
| |
| for (var integer i := 0; i < float2int(20.0/interval); i := i+1) { |
| /* build mobile Identity */ |
| var MobileL3_CommonIE_Types.MobileIdentityLV mi; |
| if (cfg.use_tmsi) { |
| mi := valueof(ts_MI_TMSI_LV(f_rnd_octstring(4))); |
| } else { |
| mi := valueof(ts_MI_IMSI_LV(f_gen_imsi(i))); |
| } |
| var octetstring mi_enc_lv := enc_MobileIdentityLV(mi); |
| var octetstring mi_enc := substr(mi_enc_lv, 1, lengthof(mi_enc_lv)-1); |
| |
| /* Send RSL PAGING COMMAND */ |
| RSL_CCHAN.send(ts_RSL_UD(ts_RSL_PAGING_CMD(mi_enc, i mod 4))); |
| st.num_paging_sent := st.num_paging_sent + 1; |
| |
| /* Wait for interval to next PAGING COMMAND */ |
| timer T_itv := interval; |
| T_itv.start; |
| alt { |
| /* check for presence of CCCH LOAD IND (paging load) */ |
| [cfg.exp_overload] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND(0))) { |
| st.num_overload := st.num_overload + 1; |
| repeat; |
| } |
| [not cfg.exp_overload] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND(0))) { |
| setverdict(fail, "Unexpected PCH Overload"); |
| } |
| [cfg.exp_load_ind] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND)) { |
| log("Rx LOAD_IND"); |
| /* FIXME: analyze/verify interval + contents */ |
| repeat; |
| } |
| /* check if paging requests arrive on Um side */ |
| [] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids); |
| [] L1CTL.receive { repeat; } |
| [] T_itv.timeout { } |
| [] as_rsl_res_ind(); |
| } |
| } |
| |
| /* wait for max 18s for paging queue to drain (size: 200, ~ 13 per s -> 15s) */ |
| timer T_wait := 18.0; |
| T_wait.start; |
| alt { |
| [] as_l1_count_paging(st.num_paging_rcv_msgs, st.num_paging_rcv_ids); |
| [] L1CTL.receive { repeat; } |
| /* 65535 == empty paging queue, we can terminate*/ |
| [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND(65535))) { } |
| [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_PAGING_LOAD_IND)) { repeat; } |
| [] T_wait.timeout { |
| setverdict(fail, "Waiting for empty paging queue"); |
| } |
| [] as_rsl_res_ind(); |
| } |
| |
| log("num_paging_sent=", st.num_paging_sent, " rcvd_msgs=", st.num_paging_rcv_msgs, |
| " rcvd_ids=", st.num_paging_rcv_ids); |
| return st; |
| } |
| |
| /* Create ~ 80% paging load (IMSI only) sustained for about 20s, verifying that |
| * - the number of Mobile Identities on Um PCH match the number of pages on RSL |
| * - that CCCH LOAD IND (PCH) are being generated |
| * - that CCCH LOAD IND (PCH) [no load] is received after paging flood is over */ |
| testcase TC_paging_imsi_80percent() runs on test_CT { |
| var PagingTestCfg cfg := { |
| combined_ccch := true, |
| bs_ag_blks_res := 1, |
| load_factor := 0.8, |
| exp_load_ind := true, |
| exp_overload := false, |
| use_tmsi := false |
| }; |
| var PagingTestState st := f_TC_paging(cfg); |
| if (st.num_paging_sent != st.num_paging_rcv_ids) { |
| setverdict(fail, "Expected ", st.num_paging_sent, " pagings but have ", |
| st.num_paging_rcv_ids); |
| } else { |
| setverdict(pass); |
| } |
| } |
| |
| /* Create ~ 80% paging load (TMSI only) sustained for about 20s, verifying that |
| * - the number of Mobile Identities on Um PCH match the number of pages on RSL |
| * - that CCCH LOAD IND (PCH) are being generated |
| * - that CCCH LOAD IND (PCH) [no load] is received after paging flood is over */ |
| testcase TC_paging_tmsi_80percent() runs on test_CT { |
| var PagingTestCfg cfg := { |
| combined_ccch := true, |
| bs_ag_blks_res := 1, |
| load_factor := 0.8, |
| exp_load_ind := true, |
| exp_overload := false, |
| use_tmsi := true |
| }; |
| var PagingTestState st := f_TC_paging(cfg); |
| if (st.num_paging_sent != st.num_paging_rcv_ids) { |
| setverdict(fail, "Expected ", st.num_paging_sent, " pagings but have ", |
| st.num_paging_rcv_ids); |
| } else { |
| setverdict(pass); |
| } |
| } |
| |
| /* Create ~ 200% paging load (IMSI only) sustained for about 20s, verifying that |
| * - the number of Mobile Identities on Um PCH are ~ 82% of the number of pages on RSL |
| * - that CCCH LOAD IND (PCH) are being generated and reach 0 at some point |
| * - that CCCH LOAD IND (PCH) [no load] is received after paging flood is over */ |
| testcase TC_paging_imsi_200percent() runs on test_CT { |
| var PagingTestCfg cfg := { |
| combined_ccch := true, |
| bs_ag_blks_res := 1, |
| load_factor := 2.0, |
| exp_load_ind := true, |
| exp_overload := true, |
| use_tmsi := false |
| }; |
| var PagingTestState st := f_TC_paging(cfg); |
| /* We expect about 80-85% to pass, given that we can fill the paging buffer of 200 |
| * slots and will fully drain that buffer before returning */ |
| var template integer tpl := (st.num_paging_sent*80/100 .. st.num_paging_sent *85/100); |
| if (not match(st.num_paging_rcv_ids, tpl)) { |
| setverdict(fail, "Expected ", tpl, " pagings but have ", st.num_paging_rcv_ids); |
| } else { |
| setverdict(pass); |
| } |
| } |
| |
| /* Create ~ 200% paging load (TMSI only) sustained for about 20s, verifying that |
| * - the number of Mobile Identities on Um PCH are ~ 82% of the number of pages on RSL |
| * - that CCCH LOAD IND (PCH) are being generated and reach 0 at some point |
| * - that CCCH LOAD IND (PCH) [no load] is received after paging flood is over */ |
| testcase TC_paging_tmsi_200percent() runs on test_CT { |
| var PagingTestCfg cfg := { |
| combined_ccch := true, |
| bs_ag_blks_res := 1, |
| load_factor := 2.0, |
| exp_load_ind := true, |
| exp_overload := true, |
| use_tmsi := true |
| }; |
| var PagingTestState st := f_TC_paging(cfg); |
| /* We expect about 70% to pass, given that we can fill the paging buffer of 200 |
| * slots and will fully drain that buffer before returning */ |
| var template integer tpl := (st.num_paging_sent*68/100 .. st.num_paging_sent *72/100); |
| if (not match(st.num_paging_rcv_ids, tpl)) { |
| setverdict(fail, "Expected ", tpl, " pagings but have ", st.num_paging_rcv_ids); |
| } else { |
| setverdict(pass); |
| } |
| } |
| |
| |
| testcase TC_imm_ass() runs on test_CT { |
| f_init(testcasename()); |
| for (var integer i := 0; i < 1000; i := i+1) { |
| var octetstring ia_enc := f_rnd_octstring(8); |
| RSL_CCHAN.send(ts_RSL_UD(ts_RSL_IMM_ASSIGN(ia_enc, 0))); |
| f_sleep(0.02); |
| } |
| /* FIXME: check if imm.ass arrive on Um side */ |
| /* FIXME: check for DELETE INDICATION */ |
| f_sleep(100.0); |
| } |
| |
| testcase TC_bcch_info() runs on test_CT { |
| f_init(testcasename()); |
| /* FIXME: enable / disable individual BCCH info */ |
| //ts_RSL_BCCH_INFO(si_type, info); |
| /* expect no ERROR REPORT after either of them * |
| /* negative test: ensure ERROR REPORT on unsupported types */ |
| } |
| |
| private function f_exp_err_rep(template RSL_Cause cause) runs on test_CT { |
| timer T := 5.0; |
| T.start; |
| alt { |
| [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_ERROR_REPORT(cause))) { |
| setverdict(pass); |
| } |
| [] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_ERROR_REPORT(?))) { |
| setverdict(fail, "Wrong cause in RSL ERR REP"); |
| } |
| [] RSL_CCHAN.receive { |
| repeat; |
| } |
| [] T.timeout { |
| setverdict(fail, "Timeout waiting for RSL ERR REP"); |
| } |
| } |
| } |
| |
| /* Provoke a protocol error (message too short) and match on ERROR REPORT */ |
| testcase TC_rsl_protocol_error() runs on test_CT { |
| f_init(testcasename()); |
| var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, ''O)); |
| rsl.ies := omit; |
| RSL_CCHAN.send(ts_RSL_UD(rsl)); |
| |
| f_exp_err_rep(RSL_ERR_PROTO); |
| } |
| |
| /* Provoke a mandatory IE error and match on ERROR REPORT */ |
| testcase TC_rsl_mand_ie_error() runs on test_CT { |
| f_init(testcasename()); |
| |
| var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, ''O)); |
| rsl.ies := { rsl.ies[0] }; |
| RSL_CCHAN.send(ts_RSL_UD(rsl)); |
| |
| f_exp_err_rep(RSL_ERR_MAND_IE_ERROR); |
| } |
| |
| /* Provoke an IE content error and match on ERROR REPORT */ |
| testcase TC_rsl_ie_content_error() runs on test_CT { |
| f_init(testcasename()); |
| var RSL_Message rsl := valueof(ts_RSL_BCCH_INFO(RSL_SYSTEM_INFO_1, ''O)); |
| rsl.ies[1].body.sysinfo_type := RSL_SYSTEM_INFO_5; |
| RSL_CCHAN.send(ts_RSL_UD(rsl)); |
| |
| f_exp_err_rep(RSL_ERR_IE_CONTENT); |
| } |
| |
| /* Send IPA DLCX to inactive lchan */ |
| function f_TC_ipa_dlcx_not_active(charstring id) runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, 0), tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?), |
| "IPA DLCX ACK"); |
| } |
| testcase TC_ipa_dlcx_not_active() runs on test_CT { |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_dlcx_not_active), pars); |
| vc_conn.done; |
| } |
| |
| /* Send IPA CRCX twice to inactive lchan */ |
| function f_TC_ipa_crcx_twice_not_active(charstring id) runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?), |
| "IPA CRCX ACK"); |
| f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_NACK(g_chan_nr, RSL_ERR_RES_UNAVAIL), |
| "IPA CRCX NACK"); |
| } |
| testcase TC_ipa_crcx_twice_not_active() runs on test_CT { |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_crcx_twice_not_active), pars); |
| vc_conn.done; |
| } |
| |
| /* Regular sequence of CRCX/MDCX/DLCX */ |
| function f_TC_ipa_crcx_mdcx_dlcx_not_active(charstring id) runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?), |
| "IPA CRCX ACK"); |
| var uint32_t remote_ip := f_rnd_int(c_UINT32_MAX); |
| var uint16_t remote_port := f_rnd_int(c_UINT16_MAX); |
| var uint7_t rtp_pt2 := f_rnd_int(127); |
| var uint16_t fake_conn_id := 23; /* we're too lazy to read it out from the CRCX ACK above */ |
| f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, remote_port, rtp_pt2), |
| tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2), |
| "IPA MDCX ACK"); |
| f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, fake_conn_id), tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?), |
| "IPA DLCX ACK"); |
| } |
| testcase TC_ipa_crcx_mdcx_dlcx_not_active() runs on test_CT { |
| var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN)); |
| f_init(testcasename()); |
| var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_crcx_mdcx_dlcx_not_active), pars); |
| vc_conn.done; |
| } |
| |
| /* IPA CRCX on SDCCH/4 and SDCCH/8 (doesn't make sense) */ |
| function f_TC_ipa_crcx_sdcch_not_active(charstring id) runs on ConnHdlr { |
| f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_NACK(g_chan_nr, ?), |
| "IPA CRCX NACK"); |
| } |
| testcase TC_ipa_crcx_sdcch_not_active() runs on test_CT { |
| var ConnHdlrPars pars; |
| var ConnHdlr vc_conn; |
| f_init(testcasename()); |
| |
| pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,1), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), pars); |
| vc_conn.done; |
| |
| pars := valueof(t_Pars(t_RslChanNr_SDCCH8(6,5), ts_RSL_ChanMode_SIGN)); |
| vc_conn := f_start_handler(refers(f_TC_ipa_crcx_sdcch_not_active), pars); |
| vc_conn.done; |
| } |
| |
| |
| /* TODO Areas: |
| |
| * channel activation |
| ** with BS_Power / MS_Power, bypassing power control loop |
| ** on primary vs. secondary TRX |
| ** with encryption from initial activation on |
| ** with timing advance from initial activation on |
| * mode modify |
| ** encryption |
| ** multirate |
| * check DEACTIVATE SACCH |
| * encryption command / intricate logic about tx-only/tx+rx/... |
| ** unsupported algorithm |
| * handover detection |
| * MS Power Control |
| * BS Power Control |
| * Physical Context |
| * SACCH info modify |
| * BCCH INFO (SI Broadcasting) |
| * CCCH Load Indication for PCH and RACH |
| * Delete Indication on AGCH overflow |
| * SMS Broadcast Req / Cmd / CBCH LOad Ind |
| * RF resource ind |
| * IPA/speech related commands |
| * error handling |
| * discriminator error |
| ** type error |
| ** sequence error |
| ** IE duplicated? |
| |
| */ |
| |
| control { |
| execute( TC_chan_act_stress() ); |
| execute( TC_chan_act_react() ); |
| execute( TC_chan_deact_not_active() ); |
| execute( TC_chan_act_wrong_nr() ); |
| execute( TC_chan_req() ); |
| execute( TC_meas_res_sign_tchf() ); |
| execute( TC_meas_res_sign_tchh() ); |
| execute( TC_meas_res_sign_sdcch4() ); |
| execute( TC_meas_res_sign_sdcch8() ); |
| execute( TC_conn_fail_crit() ); |
| execute( TC_paging_imsi_80percent() ); |
| execute( TC_paging_tmsi_80percent() ); |
| execute( TC_paging_imsi_200percent() ); |
| execute( TC_paging_tmsi_200percent() ); |
| execute( TC_rsl_protocol_error() ); |
| execute( TC_rsl_mand_ie_error() ); |
| execute( TC_rsl_ie_content_error() ); |
| execute( TC_ipa_dlcx_not_active() ); |
| execute( TC_ipa_crcx_twice_not_active() ); |
| execute( TC_ipa_crcx_mdcx_dlcx_not_active() ); |
| execute( TC_ipa_crcx_sdcch_not_active() ); |
| } |
| |
| |
| } |