This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 ) Change subject: pcu: Add VTY support and use it to set (M)CS lqual thresholds ...................................................................... pcu: Add VTY support and use it to set (M)CS lqual thresholds Requires osmo-pcu.git I3430abb5fc622dec293457466e760de95fa3a05c, before that commit OsmoPCU cmd prompt contained a dash which resulted in TTCN3 being unable to match it. Change-Id: I221675721b65b3ab44179e9657da70ba4004d7de --- M pcu/PCU_Tests.default M pcu/PCU_Tests_RAW.ttcn M pcu/gen_links.sh M pcu/regen_makefile.sh 4 files changed, 91 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default index 2a87345..537744f 100644 --- a/pcu/PCU_Tests.default +++ b/pcu/PCU_Tests.default @@ -21,10 +21,20 @@ }, sgsn_role := true } +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU"; [TESTPORT_PARAMETERS] *.*.udpReuseAddress := "yes"; *.PCU.socket_type := "SEQPACKET" +*.PCUVTY.CTRL_MODE := "client" +*.PCUVTY.CTRL_HOSTNAME := "127.0.0.1" +*.PCUVTY.CTRL_PORTNUM := "4240" +*.PCUVTY.CTRL_LOGIN_SKIPPED := "yes" +*.PCUVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.PCUVTY.CTRL_READMODE := "buffered" +*.PCUVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.PCUVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.PCUVTY.PROMPT1 := "OsmoPCU> " [MAIN_CONTROLLER] diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 6129831..5bb5fa7 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -21,6 +21,9 @@ import from GSM_Types all; import from GSM_RR_Types all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + import from RLCMAC_CSN1_Types all; import from RLCMAC_Types all; @@ -456,11 +459,42 @@ setverdict(pass); } +type record lqual_range { + /* component reference to the IPA_Client component used for RSL */ + uint8_t low, + uint8_t high +} + type component RAW_PCU_Test_CT extends bssgp_CT { /* Connection to the BTS component (one for now) */ port RAW_PCU_MSG_PT BTS; /* Connection to the PCUIF component */ port RAW_PCU_MSG_PT PCUIF; + /* VTY connection to the PCU */ + port TELNETasp_PT PCUVTY; + + /* Uplink CS/MCS thresholds, default from pcu_main.c: */ + var lqual_range g_cs_lqual_ranges[4] := {{low := 0, high := 6}, + {low := 5, high := 8}, + {low := 7, high := 13}, + {low := 12,high := 35}}; + var lqual_range g_mcs_lqual_ranges[9] := {{low := 0, high := 6}, + {low := 5, high := 8}, + {low := 7, high := 13}, + {low := 12,high := 15}, + {low := 14, high := 17}, + {low := 16, high := 18}, + {low := 17,high := 20}, + {low := 19, high := 24}, + {low := 23,high := 35}}; + var uint8_t g_cs_initial_dl := 1; + var uint8_t g_cs_initial_ul := 1; + var uint8_t g_mcs_initial_dl := 1; + var uint8_t g_mcs_initial_ul := 1; + var uint8_t g_cs_max_dl := 4; + var uint8_t g_cs_max_ul := 4; + var uint8_t g_mcs_max_dl := 9; + var uint8_t g_mcs_max_ul := 9; /* Guard timeout */ timer g_T_guard := 60.0; @@ -473,6 +507,43 @@ } } +private function f_pcuvty_set_allowed_cs_mcs() runs on RAW_PCU_Test_CT { + f_vty_config2(PCUVTY, {"pcu"}, "cs " & int2str(g_cs_initial_dl) & " " & int2str(g_cs_initial_ul)); + f_vty_config2(PCUVTY, {"pcu"}, "cs max " & int2str(g_cs_max_dl) & " " & int2str(g_cs_max_ul)); + + f_vty_config2(PCUVTY, {"pcu"}, "mcs " & int2str(g_mcs_initial_dl) & " " & int2str(g_mcs_initial_ul)); + f_vty_config2(PCUVTY, {"pcu"}, "mcs max " & int2str(g_mcs_max_dl) & " " & int2str(g_mcs_max_ul)); +} + +private function f_pcuvty_set_link_quality_ranges() runs on RAW_PCU_Test_CT { + var charstring cmd; + + cmd := "cs link-quality-ranges" & + " cs1 " & int2str(g_cs_lqual_ranges[0].high) & + " cs2 " & int2str(g_cs_lqual_ranges[1].low) & " " & int2str(g_cs_lqual_ranges[1].high) & + " cs3 " & int2str(g_cs_lqual_ranges[2].low) & " " & int2str(g_cs_lqual_ranges[2].high) & + " cs4 " & int2str(g_cs_lqual_ranges[3].low); + f_vty_config2(PCUVTY, {"pcu"}, cmd); + + cmd := "mcs link-quality-ranges" & + " mcs1 " & int2str(g_mcs_lqual_ranges[0].high) & + " mcs2 " & int2str(g_mcs_lqual_ranges[1].low) & " " & int2str(g_mcs_lqual_ranges[1].high) & + " mcs3 " & int2str(g_mcs_lqual_ranges[2].low) & " " & int2str(g_mcs_lqual_ranges[2].high) & + " mcs4 " & int2str(g_mcs_lqual_ranges[3].low) & " " & int2str(g_mcs_lqual_ranges[3].high) & + " mcs5 " & int2str(g_mcs_lqual_ranges[4].low) & " " & int2str(g_mcs_lqual_ranges[4].high) & + " mcs6 " & int2str(g_mcs_lqual_ranges[5].low) & " " & int2str(g_mcs_lqual_ranges[5].high) & + " mcs7 " & int2str(g_mcs_lqual_ranges[6].low) & " " & int2str(g_mcs_lqual_ranges[6].high) & + " mcs8 " & int2str(g_mcs_lqual_ranges[7].low) & " " & int2str(g_mcs_lqual_ranges[7].high) & + " mcs9 " & int2str(g_mcs_lqual_ranges[8].low); + f_vty_config2(PCUVTY, {"pcu"}, cmd); +} + +private function f_init_vty(charstring id) runs on RAW_PCU_Test_CT { + map(self:PCUVTY, system:PCUVTY); + f_vty_set_prompts(PCUVTY); + f_vty_transceive(PCUVTY, "enable"); +} + private function f_init_raw(charstring id, template (value) PCUIF_info_ind info_ind := ts_PCUIF_INFO_default) runs on RAW_PCU_Test_CT { var RAW_PCUIF_CT vc_PCUIF; @@ -492,6 +563,8 @@ connect(vc_BTS:PCUIF, vc_PCUIF:BTS); connect(vc_BTS:TC, self:BTS); + f_init_vty(id); + vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path)); vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind))); @@ -967,6 +1040,9 @@ /* Initialize the PCU interface abstraction */ f_init_raw(testcasename()); + f_pcuvty_set_allowed_cs_mcs(); + f_pcuvty_set_link_quality_ranges(); + /* Establish an Uplink TBF */ ok := f_establish_tbf(rr_imm_ass); if (not ok) { diff --git a/pcu/gen_links.sh b/pcu/gen_links.sh index f9f6dd5..9ad318c 100755 --- a/pcu/gen_links.sh +++ b/pcu/gen_links.sh @@ -44,9 +44,12 @@ FILES="SNDCP_Types.ttcn" gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn L1CTL_PortType_CtrlFunct.ttcn L1CTL_PortType_CtrlFunctDef.cc LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn " FILES+="NS_Emulation.ttcn NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " FILES+="BSSGP_Emulation.ttcn Osmocom_Gb_Types.ttcn " FILES+="LLC_Templates.ttcn L3_Templates.ttcn L3_Common.ttcn " diff --git a/pcu/regen_makefile.sh b/pcu/regen_makefile.sh index ff712dc..c2f636d 100755 --- a/pcu/regen_makefile.sh +++ b/pcu/regen_makefile.sh @@ -1,5 +1,5 @@ #!/bin/sh -FILES="*.ttcn BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc L1CTL_PortType_CtrlFunctDef.cc Native_FunctionDefs.cc" +FILES="*.ttcn BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc UD_PT.cc RLCMAC_EncDec.cc LLC_EncDec.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc" ../regen-makefile.sh PCU_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16327 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: I221675721b65b3ab44179e9657da70ba4004d7de Gerrit-Change-Number: 16327 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191202/b4cd4f82/attachment.htm>