// This C++ source file was generated by the TTCN-3 compiler
// of the TTCN-3 Test Executor version 9.0.0
// The generation of user and time information were disabled by the -D flag.

// Copyright (c) 2000-2023 Ericsson Telecom AB

// Do not edit this file unless you know what you are doing.

/* Including header files */

#include "GBProxy_Tests.hh"

namespace GBProxy__Tests {

/* Literal string constants */

const unsigned char bs_0_bits[] = { 1 };
extern const BITSTRING bs_0(1, bs_0_bits);
const unsigned char hs_2_nibbles[] = { 0, 1, 1, 33, 67, 101, 135, 9 },
hs_0_nibbles[] = { 98, 242, 36 },
hs_1_nibbles[] = { 101, 247, 153 };
extern const HEXSTRING hs_2(15, hs_2_nibbles),
hs_0(6, hs_0_nibbles),
hs_1(6, hs_1_nibbles);
const unsigned char os_0_octets[] = { 0 },
os_2_octets[] = { 1 },
os_5_octets[] = { 18 },
os_8_octets[] = { 18, 52, 86, 120 },
os_6_octets[] = { 18, 52, 86, 120, 18, 52, 86 },
os_3_octets[] = { 35 },
os_7_octets[] = { 35, 66 },
os_1_octets[] = { 66 },
os_9_octets[] = { 66, 35 },
os_4_octets[] = { 67, 33 };
extern const OCTETSTRING os_0(1, os_0_octets),
os_2(1, os_2_octets),
os_5(1, os_5_octets),
os_8(4, os_8_octets),
os_6(7, os_6_octets),
os_3(1, os_3_octets),
os_7(2, os_7_octets),
os_1(1, os_1_octets),
os_9(2, os_9_octets),
os_4(2, os_4_octets);
extern const CHARSTRING cs_17(19, " force-unconfigured"),
cs_19(9, " only-bvc"),
cs_9(11, "-BSSGP(PCU["),
cs_11(12, "-BSSGP(SGSN["),
cs_14(4, "-BVC"),
cs_7(8, "-NS(PCU["),
cs_10(9, "-NS(SGSN["),
cs_21(132, "/home/osmocom-build/jenkins/workspace/ttcn3-gbproxy-test-io_uring/_cache/podman/titan-9.0.0-debian-trixie/gbproxy/GBProxy_Tests.ttcn"),
cs_0(9, "127.0.0.1"),
cs_1(10, "127.0.0.10"),
cs_2(10, "127.0.0.11"),
cs_4(9, "127.0.0.2"),
cs_3(9, "127.0.1.1"),
cs_5(9, "127.0.2.1"),
cs_6(9, "127.0.3.1"),
cs_15(9, "BSSGP-BVC"),
cs_26(9, "Connected"),
cs_25(18, "GBProxy_Tests.ttcn"),
cs_20(12, "GbProxy_Test"),
cs_13(3, "NSE"),
cs_23(39, "Received unexpected message on PCU_MGMT"),
cs_22(40, "Received unexpected message on SGSN_MGMT"),
cs_38(16, "Rx unexpected NS"),
cs_28(14, "TC_BVC_bringup"),
cs_29(26, "TC_BVC_bringup_conflicting"),
cs_32(14, "TC_dl_unitdata"),
cs_49(22, "TC_dummy_paging_ps_ptp"),
cs_60(22, "TC_dummy_paging_ps_sig"),
cs_78(8, "TC_fc_ms"),
cs_75(20, "TC_flush_ll_bvci_new"),
cs_76(23, "TC_flush_ll_no_bvci_new"),
cs_77(16, "TC_llc_discarded"),
cs_79(13, "TC_ms_reg_enq"),
cs_61(20, "TC_paging_cs_ptp_bss"),
cs_66(21, "TC_paging_cs_ptp_bvci"),
cs_67(29, "TC_paging_cs_ptp_bvci_unknown"),
cs_62(20, "TC_paging_cs_ptp_lac"),
cs_63(28, "TC_paging_cs_ptp_lac_unknown"),
cs_64(20, "TC_paging_cs_ptp_rac"),
cs_65(28, "TC_paging_cs_ptp_rac_unknown"),
cs_68(20, "TC_paging_cs_sig_bss"),
cs_73(21, "TC_paging_cs_sig_bvci"),
cs_74(29, "TC_paging_cs_sig_bvci_unknown"),
cs_69(20, "TC_paging_cs_sig_lac"),
cs_70(28, "TC_paging_cs_sig_lac_unknown"),
cs_71(20, "TC_paging_cs_sig_rac"),
cs_72(28, "TC_paging_cs_sig_rac_unknown"),
cs_39(20, "TC_paging_ps_ptp_bss"),
cs_44(21, "TC_paging_ps_ptp_bvci"),
cs_45(26, "TC_paging_ps_ptp_bvci_imsi"),
cs_48(29, "TC_paging_ps_ptp_bvci_unknown"),
cs_40(20, "TC_paging_ps_ptp_lac"),
cs_41(28, "TC_paging_ps_ptp_lac_unknown"),
cs_42(20, "TC_paging_ps_ptp_rac"),
cs_43(28, "TC_paging_ps_ptp_rac_unknown"),
cs_46(28, "TC_paging_ps_reject_ptp_bvci"),
cs_47(33, "TC_paging_ps_reject_ptp_bvci_imsi"),
cs_57(28, "TC_paging_ps_reject_sig_bvci"),
cs_58(33, "TC_paging_ps_reject_sig_bvci_imsi"),
cs_50(20, "TC_paging_ps_sig_bss"),
cs_55(21, "TC_paging_ps_sig_bvci"),
cs_56(26, "TC_paging_ps_sig_bvci_imsi"),
cs_59(29, "TC_paging_ps_sig_bvci_unknown"),
cs_51(20, "TC_paging_ps_sig_lac"),
cs_52(28, "TC_paging_ps_sig_lac_unknown"),
cs_53(20, "TC_paging_ps_sig_rac"),
cs_54(28, "TC_paging_ps_sig_rac_unknown"),
cs_33(16, "TC_ra_capability"),
cs_34(20, "TC_ra_capability_upd"),
cs_35(15, "TC_radio_status"),
cs_37(20, "TC_radio_status_imsi"),
cs_36(20, "TC_radio_status_tmsi"),
cs_30(14, "TC_ul_unitdata"),
cs_31(27, "TC_ul_unitdata_pool_failure"),
cs_27(14, "Tguard timeout"),
cs_24(9, "UNBLOCKED"),
cs_8(2, "])"),
cs_18(20, "delete-gbproxy-peer "),
cs_12(6, "enable"),
cs_16(10, "nsvc nsei ");
const unsigned char module_checksum[] = { 0x5a, 0x43, 0xb4, 0xd5, 0x86, 0x47, 0x34, 0xa0, 0xbb, 0x2d, 0x8d, 0x85, 0x2a, 0x78, 0x60, 0xdd };

/* Global variable definitions */

HEXSTRING const_c__mcc__mnc;
const HEXSTRING& c__mcc__mnc = const_c__mcc__mnc;
INTEGER const_max__fr__info__size;
const INTEGER& max__fr__info__size = const_max__fr__info__size;
CHARSTRING modulepar_mp__gbproxy__ip;
const CHARSTRING& mp__gbproxy__ip = modulepar_mp__gbproxy__ip;
INTEGER modulepar_mp__gbproxy__ctrl__port;
const INTEGER& mp__gbproxy__ctrl__port = modulepar_mp__gbproxy__ctrl__port;
INTEGER modulepar_mp__nri__bitlength;
const INTEGER& mp__nri__bitlength = modulepar_mp__nri__bitlength;
Osmocom__Types::roro__integer modulepar_mp__sgsn__nri;
const Osmocom__Types::roro__integer& mp__sgsn__nri = modulepar_mp__sgsn__nri;
BOOLEAN modulepar_mp__enable__bss__load__sharing;
const BOOLEAN& mp__enable__bss__load__sharing = modulepar_mp__enable__bss__load__sharing;
// No XER for NSConfigurations
const TTCN_Typedescriptor_t NSConfigurations_descr_ = { "@GBProxy_Tests.NSConfigurations", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &NS__Emulation::NSConfiguration_descr_, TTCN_Typedescriptor_t::DONTCARE };
NSConfigurations modulepar_mp__nsconfig__sgsn;
const NSConfigurations& mp__nsconfig__sgsn = modulepar_mp__nsconfig__sgsn;
NSConfigurations modulepar_mp__nsconfig__pcu;
const NSConfigurations& mp__nsconfig__pcu = modulepar_mp__nsconfig__pcu;
// No XER for BssgpConfigs
const TTCN_Typedescriptor_t BssgpConfigs_descr_ = { "@GBProxy_Tests.BssgpConfigs", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &BSSGP__Emulation::BssgpConfig_descr_, TTCN_Typedescriptor_t::DONTCARE };
BssgpConfigs modulepar_mp__gbconfigs;
const BssgpConfigs& mp__gbconfigs = modulepar_mp__gbconfigs;
// No XER for BSSGP__BVC__CTs
const TTCN_Typedescriptor_t BSSGP__BVC__CTs_descr_ = { "@GBProxy_Tests.BSSGP_BVC_CTs", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &COMPONENT_descr_, TTCN_Typedescriptor_t::DONTCARE };
// No XER for GbInstance
const TTCN_Typedescriptor_t GbInstance_descr_ = { "@GBProxy_Tests.GbInstance", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
INTEGER const_NUM__PCU;
const INTEGER& NUM__PCU = const_NUM__PCU;
// No XER for GbInstances
const TTCN_Typedescriptor_t GbInstances_descr_ = { "@GBProxy_Tests.GbInstances", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &GbInstance_descr_, TTCN_Typedescriptor_t::DONTCARE };
// No XER for BssgpCellIds
const TTCN_Typedescriptor_t BssgpCellIds_descr_ = { "@GBProxy_Tests.BssgpCellIds", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &Osmocom__Gb__Types::BssgpCellId_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BssgpCellIds_0_default_coding("RAW");
INTEGER const_NUM__SGSN;
const INTEGER& NUM__SGSN = const_NUM__SGSN;
const TTCN_Typedescriptor_t& test__CT_descr_ = COMPONENT_descr_;
GbInstances test__CT_component_g__pcu;
GbInstances test__CT_component_g__sgsn;
NS__Emulation::NS__CTRL__PT test__CT_component_NS__CTRL("NS_CTRL");
BSSGP__Emulation::BSSGP__CT__PROC__PT test__CT_component_PROC("PROC");
BSSGP__Emulation::BSSGP__BVC__MGMT__PT test__CT_component_SGSN__MGMT("SGSN_MGMT");
BSSGP__Emulation::BSSGP__BVC__MGMT__PT test__CT_component_PCU__MGMT("PCU_MGMT");
TELNETasp__PortType::TELNETasp__PT test__CT_component_GBPVTY("GBPVTY");
BOOLEAN test__CT_component_g__initialized;
BOOLEAN test__CT_component_g__use__echo;
Osmocom__Types::ro__integer test__CT_component_g__roi;
Osmocom__Types::roro__integer test__CT_component_g__roroi;
TIMER test__CT_component_g__Tguard("g_Tguard");
const TTCN_Typedescriptor_t& BSSGP__ConnHdlr_descr_ = COMPONENT_descr_;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 3, 0> BSSGP__ConnHdlr_component_PCU__PTP;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 3, 0> BSSGP__ConnHdlr_component_PCU__SIG;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PROC__PT, 3, 0> BSSGP__ConnHdlr_component_PCU__PROC;
VALUE_ARRAY<COMPONENT, 3, 0> BSSGP__ConnHdlr_component_pcu__ct;
VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0> BSSGP__ConnHdlr_component_pcu__bvc__cfg;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 2, 0> BSSGP__ConnHdlr_component_SGSN__PTP;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 2, 0> BSSGP__ConnHdlr_component_SGSN__SIG;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PROC__PT, 2, 0> BSSGP__ConnHdlr_component_SGSN__PROC;
VALUE_ARRAY<COMPONENT, 3, 0> BSSGP__ConnHdlr_component_sgsn__ct;
const XERdescriptor_t       BSSGP__ConnHdlrPars_imei_xer_ = { {"imei>\n", "imei>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_imei_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.imei", NULL, &HEXSTRING_raw_, NULL, &BSSGP__ConnHdlrPars_imei_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BSSGP__ConnHdlrPars_imsi_xer_ = { {"imsi>\n", "imsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_imsi_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.imsi", NULL, &HEXSTRING_raw_, NULL, &BSSGP__ConnHdlrPars_imsi_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BSSGP__ConnHdlrPars_msisdn_xer_ = { {"msisdn>\n", "msisdn>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_msisdn_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.msisdn", NULL, &HEXSTRING_raw_, NULL, &BSSGP__ConnHdlrPars_msisdn_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BSSGP__ConnHdlrPars_tlli_xer_ = { {"tlli>\n", "tlli>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BSSGP__ConnHdlrPars_tlli_oer_ext_arr_[0] = {};
const int BSSGP__ConnHdlrPars_tlli_oer_p_[0] = {};
const TTCN_OERdescriptor_t BSSGP__ConnHdlrPars_tlli_oer_ = { -1, TRUE, 4, FALSE, 0, 0, BSSGP__ConnHdlrPars_tlli_oer_ext_arr_, 0, BSSGP__ConnHdlrPars_tlli_oer_p_};
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_tlli_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.tlli", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &BSSGP__ConnHdlrPars_tlli_xer_, &OCTETSTRING_json_, &BSSGP__ConnHdlrPars_tlli_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BSSGP__ConnHdlrPars_tlli_default_coding("RAW");
const XERdescriptor_t       BSSGP__ConnHdlrPars_sgsn__idx_xer_ = { {"sgsn_idx>\n", "sgsn_idx>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_sgsn__idx_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.sgsn_idx", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &BSSGP__ConnHdlrPars_sgsn__idx_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BSSGP__ConnHdlrPars_t__guard_xer_ = { {"t_guard>\n", "t_guard>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BSSGP__ConnHdlrPars_t__guard_oer_ext_arr_[0] = {};
const int BSSGP__ConnHdlrPars_t__guard_oer_p_[0] = {};
const TTCN_OERdescriptor_t BSSGP__ConnHdlrPars_t__guard_oer_ = { -1, TRUE, -1, FALSE, 0, 0, BSSGP__ConnHdlrPars_t__guard_oer_ext_arr_, 0, BSSGP__ConnHdlrPars_t__guard_oer_p_};
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_t__guard_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.t_guard", &FLOAT_ber_, &FLOAT_raw_, NULL, &BSSGP__ConnHdlrPars_t__guard_xer_, &FLOAT_json_, &BSSGP__ConnHdlrPars_t__guard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for BSSGP__ConnHdlrPars
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BSSGP__ConnHdlrPars_p__tmsi_xer_ = { {"p_tmsi>\n", "p_tmsi>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BSSGP__ConnHdlrPars_p__tmsi_oer_ext_arr_[0] = {};
const int BSSGP__ConnHdlrPars_p__tmsi_oer_p_[0] = {};
const TTCN_OERdescriptor_t BSSGP__ConnHdlrPars_p__tmsi_oer_ = { -1, TRUE, 4, FALSE, 0, 0, BSSGP__ConnHdlrPars_p__tmsi_oer_ext_arr_, 0, BSSGP__ConnHdlrPars_p__tmsi_oer_p_};
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_p__tmsi_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.p_tmsi", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &BSSGP__ConnHdlrPars_p__tmsi_xer_, &OCTETSTRING_json_, &BSSGP__ConnHdlrPars_p__tmsi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BSSGP__ConnHdlrPars_p__tmsi_default_coding("RAW");
const XERdescriptor_t       BSSGP__ConnHdlrPars_p__tmsi__sig_xer_ = { {"p_tmsi_sig>\n", "p_tmsi_sig>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BSSGP__ConnHdlrPars_p__tmsi__sig_oer_ext_arr_[0] = {};
const int BSSGP__ConnHdlrPars_p__tmsi__sig_oer_p_[0] = {};
const TTCN_OERdescriptor_t BSSGP__ConnHdlrPars_p__tmsi__sig_oer_ = { -1, TRUE, 3, FALSE, 0, 0, BSSGP__ConnHdlrPars_p__tmsi__sig_oer_ext_arr_, 0, BSSGP__ConnHdlrPars_p__tmsi__sig_oer_p_};
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_p__tmsi__sig_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.p_tmsi_sig", &OCTETSTRING_ber_, &General__Types::OCT3_raw_, &OCTETSTRING_text_, &BSSGP__ConnHdlrPars_p__tmsi__sig_xer_, &OCTETSTRING_json_, &BSSGP__ConnHdlrPars_p__tmsi__sig_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BSSGP__ConnHdlrPars_p__tmsi__sig_default_coding("RAW");
const XERdescriptor_t       BSSGP__ConnHdlrPars_tlli__old_xer_ = { {"tlli_old>\n", "tlli_old>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BSSGP__ConnHdlrPars_tlli__old_oer_ext_arr_[0] = {};
const int BSSGP__ConnHdlrPars_tlli__old_oer_p_[0] = {};
const TTCN_OERdescriptor_t BSSGP__ConnHdlrPars_tlli__old_oer_ = { -1, TRUE, 4, FALSE, 0, 0, BSSGP__ConnHdlrPars_tlli__old_oer_ext_arr_, 0, BSSGP__ConnHdlrPars_tlli__old_oer_p_};
const TTCN_Typedescriptor_t BSSGP__ConnHdlrPars_tlli__old_descr_ = { "@GBProxy_Tests.BSSGP_ConnHdlrPars.tlli_old", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &BSSGP__ConnHdlrPars_tlli__old_xer_, &OCTETSTRING_json_, &BSSGP__ConnHdlrPars_tlli__old_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BSSGP__ConnHdlrPars_tlli__old_default_coding("RAW");
UNIVERSAL_CHARSTRING BSSGP__ConnHdlrPars_ra_default_coding("RAW");
BSSGP__ConnHdlrPars BSSGP__ConnHdlr_component_g__pars;
TIMER BSSGP__ConnHdlr_component_g__Tguard("g_Tguard");
BSSGP__Emulation::LLC__Entities BSSGP__ConnHdlr_component_llc;
Osmocom__Types::ro__integer BSSGP__ConnHdlr_component_g__roi;
const XERdescriptor_t       SGSN__ConnHdlrNetworkPars_expect__ptmsi_xer_ = { {"expect_ptmsi>\n", "expect_ptmsi>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_ext_arr_[0] = {};
const int SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_p_[0] = {};
const TTCN_OERdescriptor_t SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_ext_arr_, 0, SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_p_};
const TTCN_Typedescriptor_t SGSN__ConnHdlrNetworkPars_expect__ptmsi_descr_ = { "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars.expect_ptmsi", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SGSN__ConnHdlrNetworkPars_expect__ptmsi_xer_, &BOOLEAN_json_, &SGSN__ConnHdlrNetworkPars_expect__ptmsi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SGSN__ConnHdlrNetworkPars_expect__auth_xer_ = { {"expect_auth>\n", "expect_auth>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SGSN__ConnHdlrNetworkPars_expect__auth_oer_ext_arr_[0] = {};
const int SGSN__ConnHdlrNetworkPars_expect__auth_oer_p_[0] = {};
const TTCN_OERdescriptor_t SGSN__ConnHdlrNetworkPars_expect__auth_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SGSN__ConnHdlrNetworkPars_expect__auth_oer_ext_arr_, 0, SGSN__ConnHdlrNetworkPars_expect__auth_oer_p_};
const TTCN_Typedescriptor_t SGSN__ConnHdlrNetworkPars_expect__auth_descr_ = { "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars.expect_auth", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SGSN__ConnHdlrNetworkPars_expect__auth_xer_, &BOOLEAN_json_, &SGSN__ConnHdlrNetworkPars_expect__auth_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SGSN__ConnHdlrNetworkPars_expect__ciph_xer_ = { {"expect_ciph>\n", "expect_ciph>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SGSN__ConnHdlrNetworkPars_expect__ciph_oer_ext_arr_[0] = {};
const int SGSN__ConnHdlrNetworkPars_expect__ciph_oer_p_[0] = {};
const TTCN_OERdescriptor_t SGSN__ConnHdlrNetworkPars_expect__ciph_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SGSN__ConnHdlrNetworkPars_expect__ciph_oer_ext_arr_, 0, SGSN__ConnHdlrNetworkPars_expect__ciph_oer_p_};
const TTCN_Typedescriptor_t SGSN__ConnHdlrNetworkPars_expect__ciph_descr_ = { "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars.expect_ciph", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SGSN__ConnHdlrNetworkPars_expect__ciph_xer_, &BOOLEAN_json_, &SGSN__ConnHdlrNetworkPars_expect__ciph_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SGSN__ConnHdlrNetworkPars
const TTCN_Typedescriptor_t SGSN__ConnHdlrNetworkPars_descr_ = { "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
FLOAT const_f__init_t__guard_defval;
const FLOAT& f__init_t__guard_defval = const_f__init_t__guard_defval;
// No XER for void__fn
const TTCN_Typedescriptor_t void__fn_descr_ = { "@GBProxy_Tests.void_fn", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
FLOAT const_f__start__handler_t__guard_defval;
const FLOAT& f__start__handler_t__guard_defval = const_f__start__handler_t__guard_defval;
INTEGER const_f__start__handler_sgsn__idx_defval;
const INTEGER& f__start__handler_sgsn__idx_defval = const_f__start__handler_sgsn__idx_defval;
INTEGER const_f__start__handler_nri__idx_defval;
const INTEGER& f__start__handler_nri__idx_defval = const_f__start__handler_nri__idx_defval;
BOOLEAN const_f__start__handler_have__ptmsi_defval;
const BOOLEAN& f__start__handler_have__ptmsi_defval = const_f__start__handler_have__ptmsi_defval;
FLOAT const_f__start__handlers_t__guard_defval;
const FLOAT& f__start__handlers_t__guard_defval = const_f__start__handlers_t__guard_defval;
BOOLEAN const_f__start__handlers_have__ptmsi_defval;
const BOOLEAN& f__start__handlers_have__ptmsi_defval = const_f__start__handlers_have__ptmsi_defval;
INTEGER const_f__pcu2sgsn_pcu__idx_defval;
const INTEGER& f__pcu2sgsn_pcu__idx_defval = const_f__pcu2sgsn_pcu__idx_defval;
BOOLEAN const_f__pcu2sgsn_use__sig_defval;
const BOOLEAN& f__pcu2sgsn_use__sig_defval = const_f__pcu2sgsn_use__sig_defval;
INTEGER const_f__pcu2any__sgsn_pcu__idx_defval;
const INTEGER& f__pcu2any__sgsn_pcu__idx_defval = const_f__pcu2any__sgsn_pcu__idx_defval;
BOOLEAN const_f__pcu2any__sgsn_use__sig_defval;
const BOOLEAN& f__pcu2any__sgsn_use__sig_defval = const_f__pcu2any__sgsn_use__sig_defval;
INTEGER const_f__sgsn2pcu_pcu__idx_defval;
const INTEGER& f__sgsn2pcu_pcu__idx_defval = const_f__sgsn2pcu_pcu__idx_defval;
BOOLEAN const_f__sgsn2pcu_use__sig_defval;
const BOOLEAN& f__sgsn2pcu_use__sig_defval = const_f__sgsn2pcu_use__sig_defval;
const TTCN_Typedescriptor_t& GlobalTest__CT_descr_ = COMPONENT_descr_;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 3, 0> GlobalTest__CT_component_G__PCU;
VALUE_ARRAY<INTEGER, 3, 0> GlobalTest__CT_component_g__pcu__idx;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 2, 0> GlobalTest__CT_component_G__SGSN;
VALUE_ARRAY<INTEGER, 2, 0> GlobalTest__CT_component_g__sgsn__idx;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 3, 0> GlobalTest__CT_component_RIM__PCU;
PORT_ARRAY<BSSGP__Emulation::BSSGP__PT, 2, 0> GlobalTest__CT_component_RIM__SGSN;
INTEGER const_f__global__pcu2sgsn_pcu__idx_defval;
const INTEGER& f__global__pcu2sgsn_pcu__idx_defval = const_f__global__pcu2sgsn_pcu__idx_defval;
INTEGER const_f__global__pcu2sgsn_sgsn__idx_defval;
const INTEGER& f__global__pcu2sgsn_sgsn__idx_defval = const_f__global__pcu2sgsn_sgsn__idx_defval;
INTEGER const_f__global__sgsn2pcu_sgsn__idx_defval;
const INTEGER& f__global__sgsn2pcu_sgsn__idx_defval = const_f__global__sgsn2pcu_sgsn__idx_defval;
INTEGER const_f__global__sgsn2pcu_pcu__idx_defval;
const INTEGER& f__global__sgsn2pcu_pcu__idx_defval = const_f__global__sgsn2pcu_pcu__idx_defval;
INTEGER const_f__bssgp__suspend_ran__idx_defval;
const INTEGER& f__bssgp__suspend_ran__idx_defval = const_f__bssgp__suspend_ran__idx_defval;
INTEGER const_f__bssgp__resume_ran__idx_defval;
const INTEGER& f__bssgp__resume_ran__idx_defval = const_f__bssgp__resume_ran__idx_defval;
const TTCN_Typedescriptor_t& test__CT__NS_descr_ = COMPONENT_descr_;
NS__Emulation::NS__PT test__CT__NS_component_NS("NS");
INTEGER const_f__send__paging__ps_sgsn__idx_defval;
const INTEGER& f__send__paging__ps_sgsn__idx_defval = const_f__send__paging__ps_sgsn__idx_defval;
BOOLEAN const_f__send__paging__ps_use__sig_defval;
const BOOLEAN& f__send__paging__ps_use__sig_defval = const_f__send__paging__ps_use__sig_defval;
INTEGER const_f__send__paging__ps__exp__one__bss_sgsn__idx_defval;
const INTEGER& f__send__paging__ps__exp__one__bss_sgsn__idx_defval = const_f__send__paging__ps__exp__one__bss_sgsn__idx_defval;
BOOLEAN const_f__send__paging__ps__exp__one__bss_use__sig_defval;
const BOOLEAN& f__send__paging__ps__exp__one__bss_use__sig_defval = const_f__send__paging__ps__exp__one__bss_use__sig_defval;
INTEGER const_f__send__paging__ps__exp__one__bss_pcu__idx_defval;
const INTEGER& f__send__paging__ps__exp__one__bss_pcu__idx_defval = const_f__send__paging__ps__exp__one__bss_pcu__idx_defval;
INTEGER const_f__send__paging__ps__exp__no__bss_sgsn__idx_defval;
const INTEGER& f__send__paging__ps__exp__no__bss_sgsn__idx_defval = const_f__send__paging__ps__exp__no__bss_sgsn__idx_defval;
BOOLEAN const_f__send__paging__ps__exp__no__bss_use__sig_defval;
const BOOLEAN& f__send__paging__ps__exp__no__bss_use__sig_defval = const_f__send__paging__ps__exp__no__bss_use__sig_defval;
// No XER for ro__default
const TTCN_Typedescriptor_t ro__default_descr_ = { "@GBProxy_Tests.ro_default", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &DEFAULT_descr_, TTCN_Typedescriptor_t::DONTCARE };
INTEGER const_f__send__paging__ps__exp__multi_sgsn__idx_defval;
const INTEGER& f__send__paging__ps__exp__multi_sgsn__idx_defval = const_f__send__paging__ps__exp__multi_sgsn__idx_defval;
BOOLEAN const_f__send__paging__ps__rej_use__sig_defval;
const BOOLEAN& f__send__paging__ps__rej_use__sig_defval = const_f__send__paging__ps__rej_use__sig_defval;
INTEGER const_f__send__paging__ps__rej_pcu__idx_defval;
const INTEGER& f__send__paging__ps__rej_pcu__idx_defval = const_f__send__paging__ps__rej_pcu__idx_defval;
INTEGER const_f__send__paging__cs_sgsn__idx_defval;
const INTEGER& f__send__paging__cs_sgsn__idx_defval = const_f__send__paging__cs_sgsn__idx_defval;
BOOLEAN const_f__send__paging__cs_use__sig_defval;
const BOOLEAN& f__send__paging__cs_use__sig_defval = const_f__send__paging__cs_use__sig_defval;
INTEGER const_f__send__paging__cs__exp__one__bss_sgsn__idx_defval;
const INTEGER& f__send__paging__cs__exp__one__bss_sgsn__idx_defval = const_f__send__paging__cs__exp__one__bss_sgsn__idx_defval;
BOOLEAN const_f__send__paging__cs__exp__one__bss_use__sig_defval;
const BOOLEAN& f__send__paging__cs__exp__one__bss_use__sig_defval = const_f__send__paging__cs__exp__one__bss_use__sig_defval;
INTEGER const_f__send__paging__cs__exp__one__bss_pcu__idx_defval;
const INTEGER& f__send__paging__cs__exp__one__bss_pcu__idx_defval = const_f__send__paging__cs__exp__one__bss_pcu__idx_defval;
INTEGER const_f__send__paging__cs__exp__no__bss_sgsn__idx_defval;
const INTEGER& f__send__paging__cs__exp__no__bss_sgsn__idx_defval = const_f__send__paging__cs__exp__no__bss_sgsn__idx_defval;
BOOLEAN const_f__send__paging__cs__exp__no__bss_use__sig_defval;
const BOOLEAN& f__send__paging__cs__exp__no__bss_use__sig_defval = const_f__send__paging__cs__exp__no__bss_use__sig_defval;
INTEGER const_f__send__paging__cs__exp__multi_sgsn__idx_defval;
const INTEGER& f__send__paging__cs__exp__multi_sgsn__idx_defval = const_f__send__paging__cs__exp__multi_sgsn__idx_defval;
Osmocom__Gb__Types::BssgpCellId const_cell__id__sgsn;
const Osmocom__Gb__Types::BssgpCellId& cell__id__sgsn = const_cell__id__sgsn;
INTEGER const_f__rim__pcu2sgsn_pcu__idx_defval;
const INTEGER& f__rim__pcu2sgsn_pcu__idx_defval = const_f__rim__pcu2sgsn_pcu__idx_defval;
INTEGER const_f__rim__sgsn2pcu_sgsn__idx_defval;
const INTEGER& f__rim__sgsn2pcu_sgsn__idx_defval = const_f__rim__sgsn2pcu_sgsn__idx_defval;
INTEGER const_f__rim__sgsn2pcu_pcu__idx_defval;
const INTEGER& f__rim__sgsn2pcu_pcu__idx_defval = const_f__rim__sgsn2pcu_pcu__idx_defval;
// No XER for rim__fn
const TTCN_Typedescriptor_t rim__fn_descr_ = { "@GBProxy_Tests.rim_fn", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
INTEGER const_f__TC__rim__info__req_bvc__idx_defval;
const INTEGER& f__TC__rim__info__req_bvc__idx_defval = const_f__TC__rim__info__req_bvc__idx_defval;
INTEGER const_f__TC__rim__info_bvc__idx_defval;
const INTEGER& f__TC__rim__info_bvc__idx_defval = const_f__TC__rim__info_bvc__idx_defval;
INTEGER const_f__TC__rim__info__ack_bvc__idx_defval;
const INTEGER& f__TC__rim__info__ack_bvc__idx_defval = const_f__TC__rim__info__ack_bvc__idx_defval;
INTEGER const_f__TC__rim__info__error_bvc__idx_defval;
const INTEGER& f__TC__rim__info__error_bvc__idx_defval = const_f__TC__rim__info__error_bvc__idx_defval;
INTEGER const_f__TC__rim__info__app__error_bvc__idx_defval;
const INTEGER& f__TC__rim__info__app__error_bvc__idx_defval = const_f__TC__rim__info__app__error_bvc__idx_defval;
INTEGER const_f__TC__rim__from__eutran_bvc__idx_defval;
const INTEGER& f__TC__rim__from__eutran_bvc__idx_defval = const_f__TC__rim__from__eutran_bvc__idx_defval;
TTCN_Module module_object("GBProxy_Tests", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, set_module_param, NULL, log_module_param, init_comp_type, init_system_port, start_ptc_function, module_control_part);

const RuntimeVersionChecker ver_checker(  current_runtime_version.requires_major_version_9,
  current_runtime_version.requires_minor_version_0,
  current_runtime_version.requires_patch_level_0,  current_runtime_version.requires_runtime_1);

/* Member functions of C++ classes */


const NS__Emulation::NSConfiguration NSConfigurations::UNBOUND_ELEM;
NSConfigurations::NSConfigurations()
{
val_ptr = NULL;
}

NSConfigurations::NSConfigurations(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

NSConfigurations::NSConfigurations(const NSConfigurations& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.NSConfigurations.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

NSConfigurations::~NSConfigurations()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void NSConfigurations::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

NSConfigurations& NSConfigurations::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

NSConfigurations& NSConfigurations::operator=(const NSConfigurations& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean NSConfigurations::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.NSConfigurations.");
return val_ptr->n_elements == 0 ;
}

boolean NSConfigurations::operator==(const NSConfigurations& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

NS__Emulation::NSConfiguration& NSConfigurations::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.NSConfigurations using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (NS__Emulation::NSConfiguration**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new NS__Emulation::NSConfiguration(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new NS__Emulation::NSConfiguration;
}
return *val_ptr->value_elements[index_value];
}

NS__Emulation::NSConfiguration& NSConfigurations::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.NSConfigurations.");
return (*this)[(int)index_value];
}

const NS__Emulation::NSConfiguration& NSConfigurations::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.NSConfigurations using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.NSConfigurations: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const NS__Emulation::NSConfiguration& NSConfigurations::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.NSConfigurations.");
return (*this)[(int)index_value];
}

NSConfigurations NSConfigurations::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

NSConfigurations NSConfigurations::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

NSConfigurations NSConfigurations::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

NSConfigurations NSConfigurations::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
NSConfigurations ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new NS__Emulation::NSConfiguration(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

NSConfigurations NSConfigurations::operator+(const NSConfigurations& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.NSConfigurations concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
NSConfigurations ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new NS__Emulation::NSConfiguration(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new NS__Emulation::NSConfiguration(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

NSConfigurations NSConfigurations::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.NSConfigurations.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.NSConfigurations","element");
NSConfigurations ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new NS__Emulation::NSConfiguration(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

NSConfigurations NSConfigurations::replace(int index, int len, const NSConfigurations& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.NSConfigurations.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.NSConfigurations.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.NSConfigurations","element");
NSConfigurations ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new NS__Emulation::NSConfiguration(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new NS__Emulation::NSConfiguration(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new NS__Emulation::NSConfiguration(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

NSConfigurations NSConfigurations::replace(int index, int len, const NSConfigurations_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void NSConfigurations::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.NSConfigurations.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (NS__Emulation::NSConfiguration**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new NS__Emulation::NSConfiguration(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (NS__Emulation::NSConfiguration**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.NSConfigurations: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (NS__Emulation::NSConfiguration**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean NSConfigurations::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int NSConfigurations::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.NSConfigurations.");
return val_ptr->n_elements;
}

int NSConfigurations::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.NSConfigurations.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void NSConfigurations::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void NSConfigurations::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void NSConfigurations::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.NSConfigurations");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.NSConfigurations");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void NSConfigurations::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.NSConfigurations.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void NSConfigurations::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.NSConfigurations.");
val_ptr->value_elements = (NS__Emulation::NSConfiguration**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new NS__Emulation::NSConfiguration;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void NSConfigurations_template::copy_value(const NSConfigurations& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.NSConfigurations with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (NS__Emulation::NSConfiguration_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void NSConfigurations_template::copy_template(const NSConfigurations_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (NS__Emulation::NSConfiguration_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new NSConfigurations_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new NSConfigurations_template(*other_value.implication_.precondition);
implication_.implied_template = new NSConfigurations_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.NSConfigurations.");
break;
}
set_selection(other_value);
}

boolean NSConfigurations_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const NSConfigurations_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const NSConfigurations*)value_ptr)[value_index], legacy);
else return ((const NSConfigurations_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

NSConfigurations_template::NSConfigurations_template()
{
}

NSConfigurations_template::NSConfigurations_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

NSConfigurations_template::NSConfigurations_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

NSConfigurations_template::NSConfigurations_template(const NSConfigurations& other_value)
{
copy_value(other_value);
}

NSConfigurations_template::NSConfigurations_template(const OPTIONAL<NSConfigurations>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const NSConfigurations&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.NSConfigurations from an unbound optional field.");
}
}

NSConfigurations_template::NSConfigurations_template(NSConfigurations_template* p_precondition, NSConfigurations_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

NSConfigurations_template::NSConfigurations_template(Dynamic_Match_Interface<NSConfigurations>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<NSConfigurations>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

NSConfigurations_template::NSConfigurations_template(const NSConfigurations_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

NSConfigurations_template::~NSConfigurations_template()
{
clean_up();
}

void NSConfigurations_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

NSConfigurations_template& NSConfigurations_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

NSConfigurations_template& NSConfigurations_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

NSConfigurations_template& NSConfigurations_template::operator=(const NSConfigurations& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

NSConfigurations_template& NSConfigurations_template::operator=(const OPTIONAL<NSConfigurations>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const NSConfigurations&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.NSConfigurations.");
}
return *this;
}

NSConfigurations_template& NSConfigurations_template::operator=(const NSConfigurations_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

NS__Emulation::NSConfiguration_template& NSConfigurations_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.NSConfigurations using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.NSConfigurations.");
    break;
}
return *single_value.value_elements[index_value];
}

NS__Emulation::NSConfiguration_template& NSConfigurations_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.NSConfigurations.");
return (*this)[(int)index_value];
}

const NS__Emulation::NSConfiguration_template& NSConfigurations_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.NSConfigurations using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.NSConfigurations.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.NSConfigurations: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const NS__Emulation::NSConfiguration_template& NSConfigurations_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.NSConfigurations.");
return (*this)[(int)index_value];
}

void NSConfigurations_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.NSConfigurations.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (NS__Emulation::NSConfiguration_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (NS__Emulation::NSConfiguration_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int NSConfigurations_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int NSConfigurations_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.NSConfigurations containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.NSConfigurations.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.NSConfigurations");
}

boolean NSConfigurations_template::match(const NSConfigurations& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.NSConfigurations.");
}
return FALSE;
}

boolean NSConfigurations_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

NSConfigurations NSConfigurations_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.NSConfigurations.");
NSConfigurations ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

NSConfigurations NSConfigurations_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

NSConfigurations NSConfigurations_template::replace(int index, int len, const NSConfigurations_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

NSConfigurations NSConfigurations_template::replace(int index, int len, const NSConfigurations& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void NSConfigurations_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new NSConfigurations_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.NSConfigurations.");
}
set_selection(template_type);
}

NSConfigurations_template& NSConfigurations_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.NSConfigurations.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.NSConfigurations.");
return value_list.list_value[list_index];
}

void NSConfigurations_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void NSConfigurations_template::log_match(const NSConfigurations& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void NSConfigurations_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.NSConfigurations.");
}
}

void NSConfigurations_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.NSConfigurations.");
single_value.value_elements = (NS__Emulation::NSConfiguration_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new NS__Emulation::NSConfiguration_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new NSConfigurations_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.NSConfigurations.");
}
}

boolean NSConfigurations_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean NSConfigurations_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void NSConfigurations_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    NSConfigurations_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    NSConfigurations_template* precondition = new NSConfigurations_template;
    precondition->set_param(*param.get_elem(0));
    NSConfigurations_template* implied_template = new NSConfigurations_template;
    implied_template->set_param(*param.get_elem(1));
    *this = NSConfigurations_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.NSConfigurations");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void NSConfigurations_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.NSConfigurations");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.NSConfigurations");
}

boolean NSConfigurations_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}

const BSSGP__Emulation::BssgpConfig BssgpConfigs::UNBOUND_ELEM;
BssgpConfigs::BssgpConfigs()
{
val_ptr = NULL;
}

BssgpConfigs::BssgpConfigs(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

BssgpConfigs::BssgpConfigs(const BssgpConfigs& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.BssgpConfigs.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

BssgpConfigs::~BssgpConfigs()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void BssgpConfigs::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

BssgpConfigs& BssgpConfigs::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

BssgpConfigs& BssgpConfigs::operator=(const BssgpConfigs& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean BssgpConfigs::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
return val_ptr->n_elements == 0 ;
}

boolean BssgpConfigs::operator==(const BssgpConfigs& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

BSSGP__Emulation::BssgpConfig& BssgpConfigs::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BssgpConfigs using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (BSSGP__Emulation::BssgpConfig**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new BSSGP__Emulation::BssgpConfig;
}
return *val_ptr->value_elements[index_value];
}

BSSGP__Emulation::BssgpConfig& BssgpConfigs::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BssgpConfigs.");
return (*this)[(int)index_value];
}

const BSSGP__Emulation::BssgpConfig& BssgpConfigs::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BssgpConfigs using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.BssgpConfigs: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const BSSGP__Emulation::BssgpConfig& BssgpConfigs::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BssgpConfigs.");
return (*this)[(int)index_value];
}

BssgpConfigs BssgpConfigs::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

BssgpConfigs BssgpConfigs::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

BssgpConfigs BssgpConfigs::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

BssgpConfigs BssgpConfigs::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
BssgpConfigs ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new BSSGP__Emulation::BssgpConfig(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

BssgpConfigs BssgpConfigs::operator+(const BssgpConfigs& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.BssgpConfigs concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
BssgpConfigs ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new BSSGP__Emulation::BssgpConfig(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new BSSGP__Emulation::BssgpConfig(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

BssgpConfigs BssgpConfigs::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.BssgpConfigs","element");
BssgpConfigs ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new BSSGP__Emulation::BssgpConfig(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

BssgpConfigs BssgpConfigs::replace(int index, int len, const BssgpConfigs& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.BssgpConfigs","element");
BssgpConfigs ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new BSSGP__Emulation::BssgpConfig(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new BSSGP__Emulation::BssgpConfig(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new BSSGP__Emulation::BssgpConfig(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

BssgpConfigs BssgpConfigs::replace(int index, int len, const BssgpConfigs_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void BssgpConfigs::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.BssgpConfigs.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (BSSGP__Emulation::BssgpConfig**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (BSSGP__Emulation::BssgpConfig**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.BssgpConfigs: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (BSSGP__Emulation::BssgpConfig**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean BssgpConfigs::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int BssgpConfigs::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.BssgpConfigs.");
return val_ptr->n_elements;
}

int BssgpConfigs::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.BssgpConfigs.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void BssgpConfigs::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void BssgpConfigs::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void BssgpConfigs::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BssgpConfigs");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BssgpConfigs");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void BssgpConfigs::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.BssgpConfigs.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void BssgpConfigs::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.BssgpConfigs.");
val_ptr->value_elements = (BSSGP__Emulation::BssgpConfig**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void BssgpConfigs_template::copy_value(const BssgpConfigs& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.BssgpConfigs with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (BSSGP__Emulation::BssgpConfig_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void BssgpConfigs_template::copy_template(const BssgpConfigs_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (BSSGP__Emulation::BssgpConfig_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new BssgpConfigs_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new BssgpConfigs_template(*other_value.implication_.precondition);
implication_.implied_template = new BssgpConfigs_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.BssgpConfigs.");
break;
}
set_selection(other_value);
}

boolean BssgpConfigs_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const BssgpConfigs_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const BssgpConfigs*)value_ptr)[value_index], legacy);
else return ((const BssgpConfigs_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

BssgpConfigs_template::BssgpConfigs_template()
{
}

BssgpConfigs_template::BssgpConfigs_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

BssgpConfigs_template::BssgpConfigs_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

BssgpConfigs_template::BssgpConfigs_template(const BssgpConfigs& other_value)
{
copy_value(other_value);
}

BssgpConfigs_template::BssgpConfigs_template(const OPTIONAL<BssgpConfigs>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BssgpConfigs&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.BssgpConfigs from an unbound optional field.");
}
}

BssgpConfigs_template::BssgpConfigs_template(BssgpConfigs_template* p_precondition, BssgpConfigs_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

BssgpConfigs_template::BssgpConfigs_template(Dynamic_Match_Interface<BssgpConfigs>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<BssgpConfigs>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

BssgpConfigs_template::BssgpConfigs_template(const BssgpConfigs_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

BssgpConfigs_template::~BssgpConfigs_template()
{
clean_up();
}

void BssgpConfigs_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

BssgpConfigs_template& BssgpConfigs_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

BssgpConfigs_template& BssgpConfigs_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

BssgpConfigs_template& BssgpConfigs_template::operator=(const BssgpConfigs& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

BssgpConfigs_template& BssgpConfigs_template::operator=(const OPTIONAL<BssgpConfigs>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BssgpConfigs&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.BssgpConfigs.");
}
return *this;
}

BssgpConfigs_template& BssgpConfigs_template::operator=(const BssgpConfigs_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

BSSGP__Emulation::BssgpConfig_template& BssgpConfigs_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BssgpConfigs using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BssgpConfigs.");
    break;
}
return *single_value.value_elements[index_value];
}

BSSGP__Emulation::BssgpConfig_template& BssgpConfigs_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BssgpConfigs.");
return (*this)[(int)index_value];
}

const BSSGP__Emulation::BssgpConfig_template& BssgpConfigs_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BssgpConfigs using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BssgpConfigs.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.BssgpConfigs: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const BSSGP__Emulation::BssgpConfig_template& BssgpConfigs_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BssgpConfigs.");
return (*this)[(int)index_value];
}

void BssgpConfigs_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.BssgpConfigs.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (BSSGP__Emulation::BssgpConfig_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (BSSGP__Emulation::BssgpConfig_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int BssgpConfigs_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int BssgpConfigs_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpConfigs containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.BssgpConfigs.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.BssgpConfigs");
}

boolean BssgpConfigs_template::match(const BssgpConfigs& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.BssgpConfigs.");
}
return FALSE;
}

boolean BssgpConfigs_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

BssgpConfigs BssgpConfigs_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.BssgpConfigs.");
BssgpConfigs ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

BssgpConfigs BssgpConfigs_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

BssgpConfigs BssgpConfigs_template::replace(int index, int len, const BssgpConfigs_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

BssgpConfigs BssgpConfigs_template::replace(int index, int len, const BssgpConfigs& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void BssgpConfigs_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new BssgpConfigs_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.BssgpConfigs.");
}
set_selection(template_type);
}

BssgpConfigs_template& BssgpConfigs_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.BssgpConfigs.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.BssgpConfigs.");
return value_list.list_value[list_index];
}

void BssgpConfigs_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void BssgpConfigs_template::log_match(const BssgpConfigs& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void BssgpConfigs_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.BssgpConfigs.");
}
}

void BssgpConfigs_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.BssgpConfigs.");
single_value.value_elements = (BSSGP__Emulation::BssgpConfig_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new BSSGP__Emulation::BssgpConfig_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new BssgpConfigs_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.BssgpConfigs.");
}
}

boolean BssgpConfigs_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean BssgpConfigs_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void BssgpConfigs_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    BssgpConfigs_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BssgpConfigs_template* precondition = new BssgpConfigs_template;
    precondition->set_param(*param.get_elem(0));
    BssgpConfigs_template* implied_template = new BssgpConfigs_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BssgpConfigs_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.BssgpConfigs");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void BssgpConfigs_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BssgpConfigs");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.BssgpConfigs");
}

boolean BssgpConfigs_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}

const COMPONENT BSSGP__BVC__CTs::UNBOUND_ELEM;
BSSGP__BVC__CTs::BSSGP__BVC__CTs()
{
val_ptr = NULL;
}

BSSGP__BVC__CTs::BSSGP__BVC__CTs(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

BSSGP__BVC__CTs::BSSGP__BVC__CTs(const BSSGP__BVC__CTs& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

BSSGP__BVC__CTs::~BSSGP__BVC__CTs()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void BSSGP__BVC__CTs::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

BSSGP__BVC__CTs& BSSGP__BVC__CTs::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

BSSGP__BVC__CTs& BSSGP__BVC__CTs::operator=(const BSSGP__BVC__CTs& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean BSSGP__BVC__CTs::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return val_ptr->n_elements == 0 ;
}

boolean BSSGP__BVC__CTs::operator==(const BSSGP__BVC__CTs& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

COMPONENT& BSSGP__BVC__CTs::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BSSGP_BVC_CTs using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new COMPONENT;
}
return *val_ptr->value_elements[index_value];
}

COMPONENT& BSSGP__BVC__CTs::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return (*this)[(int)index_value];
}

const COMPONENT& BSSGP__BVC__CTs::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BSSGP_BVC_CTs using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.BSSGP_BVC_CTs: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const COMPONENT& BSSGP__BVC__CTs::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return (*this)[(int)index_value];
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
BSSGP__BVC__CTs ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new COMPONENT(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::operator+(const BSSGP__BVC__CTs& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.BSSGP_BVC_CTs concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
BSSGP__BVC__CTs ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new COMPONENT(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.BSSGP_BVC_CTs","element");
BSSGP__BVC__CTs ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::replace(int index, int len, const BSSGP__BVC__CTs& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.BSSGP_BVC_CTs","element");
BSSGP__BVC__CTs ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new COMPONENT(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new COMPONENT(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new COMPONENT(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs::replace(int index, int len, const BSSGP__BVC__CTs_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void BSSGP__BVC__CTs::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (COMPONENT**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new COMPONENT(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.BSSGP_BVC_CTs: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (COMPONENT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean BSSGP__BVC__CTs::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int BSSGP__BVC__CTs::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return val_ptr->n_elements;
}

int BSSGP__BVC__CTs::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void BSSGP__BVC__CTs::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void BSSGP__BVC__CTs::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void BSSGP__BVC__CTs::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BSSGP_BVC_CTs");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BSSGP_BVC_CTs");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void BSSGP__BVC__CTs::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void BSSGP__BVC__CTs::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
val_ptr->value_elements = (COMPONENT**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new COMPONENT;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void BSSGP__BVC__CTs_template::copy_value(const BSSGP__BVC__CTs& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.BSSGP_BVC_CTs with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new COMPONENT_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new COMPONENT_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void BSSGP__BVC__CTs_template::copy_template(const BSSGP__BVC__CTs_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new COMPONENT_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new COMPONENT_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new BSSGP__BVC__CTs_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new BSSGP__BVC__CTs_template(*other_value.implication_.precondition);
implication_.implied_template = new BSSGP__BVC__CTs_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
break;
}
set_selection(other_value);
}

boolean BSSGP__BVC__CTs_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const BSSGP__BVC__CTs_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const BSSGP__BVC__CTs*)value_ptr)[value_index], legacy);
else return ((const BSSGP__BVC__CTs_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template()
{
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(const BSSGP__BVC__CTs& other_value)
{
copy_value(other_value);
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(const OPTIONAL<BSSGP__BVC__CTs>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BSSGP__BVC__CTs&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.BSSGP_BVC_CTs from an unbound optional field.");
}
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(BSSGP__BVC__CTs_template* p_precondition, BSSGP__BVC__CTs_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(Dynamic_Match_Interface<BSSGP__BVC__CTs>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<BSSGP__BVC__CTs>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

BSSGP__BVC__CTs_template::BSSGP__BVC__CTs_template(const BSSGP__BVC__CTs_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

BSSGP__BVC__CTs_template::~BSSGP__BVC__CTs_template()
{
clean_up();
}

void BSSGP__BVC__CTs_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::operator=(const BSSGP__BVC__CTs& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::operator=(const OPTIONAL<BSSGP__BVC__CTs>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BSSGP__BVC__CTs&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
}
return *this;
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::operator=(const BSSGP__BVC__CTs_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

COMPONENT_template& BSSGP__BVC__CTs_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BSSGP_BVC_CTs using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BSSGP_BVC_CTs.");
    break;
}
return *single_value.value_elements[index_value];
}

COMPONENT_template& BSSGP__BVC__CTs_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return (*this)[(int)index_value];
}

const COMPONENT_template& BSSGP__BVC__CTs_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BSSGP_BVC_CTs using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.BSSGP_BVC_CTs: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const COMPONENT_template& BSSGP__BVC__CTs_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return (*this)[(int)index_value];
}

void BSSGP__BVC__CTs_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new COMPONENT_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new COMPONENT_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (COMPONENT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int BSSGP__BVC__CTs_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int BSSGP__BVC__CTs_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BSSGP_BVC_CTs containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_BVC_CTs.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.BSSGP_BVC_CTs");
}

boolean BSSGP__BVC__CTs_template::match(const BSSGP__BVC__CTs& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
}
return FALSE;
}

boolean BSSGP__BVC__CTs_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
BSSGP__BVC__CTs ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

BSSGP__BVC__CTs BSSGP__BVC__CTs_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

BSSGP__BVC__CTs BSSGP__BVC__CTs_template::replace(int index, int len, const BSSGP__BVC__CTs_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

BSSGP__BVC__CTs BSSGP__BVC__CTs_template::replace(int index, int len, const BSSGP__BVC__CTs& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void BSSGP__BVC__CTs_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new BSSGP__BVC__CTs_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
}
set_selection(template_type);
}

BSSGP__BVC__CTs_template& BSSGP__BVC__CTs_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return value_list.list_value[list_index];
}

void BSSGP__BVC__CTs_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void BSSGP__BVC__CTs_template::log_match(const BSSGP__BVC__CTs& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void BSSGP__BVC__CTs_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
}
}

void BSSGP__BVC__CTs_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
single_value.value_elements = (COMPONENT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new COMPONENT_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new BSSGP__BVC__CTs_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.BSSGP_BVC_CTs.");
}
}

boolean BSSGP__BVC__CTs_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean BSSGP__BVC__CTs_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void BSSGP__BVC__CTs_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    BSSGP__BVC__CTs_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BSSGP__BVC__CTs_template* precondition = new BSSGP__BVC__CTs_template;
    precondition->set_param(*param.get_elem(0));
    BSSGP__BVC__CTs_template* implied_template = new BSSGP__BVC__CTs_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BSSGP__BVC__CTs_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.BSSGP_BVC_CTs");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void BSSGP__BVC__CTs_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_BVC_CTs");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.BSSGP_BVC_CTs");
}

boolean BSSGP__BVC__CTs_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}
GbInstance::GbInstance()
{
}

GbInstance::GbInstance(const COMPONENT& par_vc__NS,
    const COMPONENT& par_vc__BSSGP,
    const BSSGP__BVC__CTs& par_vc__BSSGP__BVC,
    const BSSGP__Emulation::BssgpConfig& par_cfg)
  :   field_vc__NS(par_vc__NS),
  field_vc__BSSGP(par_vc__BSSGP),
  field_vc__BSSGP__BVC(par_vc__BSSGP__BVC),
  field_cfg(par_cfg)
{
}

GbInstance::GbInstance(const GbInstance& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.GbInstance.");
if (other_value.vc__NS().is_bound()) field_vc__NS = other_value.vc__NS();
else field_vc__NS.clean_up();
if (other_value.vc__BSSGP().is_bound()) field_vc__BSSGP = other_value.vc__BSSGP();
else field_vc__BSSGP.clean_up();
if (other_value.vc__BSSGP__BVC().is_bound()) field_vc__BSSGP__BVC = other_value.vc__BSSGP__BVC();
else field_vc__BSSGP__BVC.clean_up();
if (other_value.cfg().is_bound()) field_cfg = other_value.cfg();
else field_cfg.clean_up();
}

void GbInstance::clean_up()
{
field_vc__NS.clean_up();
field_vc__BSSGP.clean_up();
field_vc__BSSGP__BVC.clean_up();
field_cfg.clean_up();
}

const TTCN_Typedescriptor_t* GbInstance::get_descriptor() const { return &GbInstance_descr_; }
GbInstance& GbInstance::operator=(const GbInstance& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @GBProxy_Tests.GbInstance.");
  if (other_value.vc__NS().is_bound()) field_vc__NS = other_value.vc__NS();
  else field_vc__NS.clean_up();
  if (other_value.vc__BSSGP().is_bound()) field_vc__BSSGP = other_value.vc__BSSGP();
  else field_vc__BSSGP.clean_up();
  if (other_value.vc__BSSGP__BVC().is_bound()) field_vc__BSSGP__BVC = other_value.vc__BSSGP__BVC();
  else field_vc__BSSGP__BVC.clean_up();
  if (other_value.cfg().is_bound()) field_cfg = other_value.cfg();
  else field_cfg.clean_up();
}
return *this;
}

boolean GbInstance::operator==(const GbInstance& other_value) const
{
return field_vc__NS==other_value.field_vc__NS
  && field_vc__BSSGP==other_value.field_vc__BSSGP
  && field_vc__BSSGP__BVC==other_value.field_vc__BSSGP__BVC
  && field_cfg==other_value.field_cfg;
}

boolean GbInstance::is_bound() const
{
return (field_vc__NS.is_bound())
  || (field_vc__BSSGP.is_bound())
  || (field_vc__BSSGP__BVC.is_bound())
  || (field_cfg.is_bound());
}
boolean GbInstance::is_value() const
{
return field_vc__NS.is_value()
  && field_vc__BSSGP.is_value()
  && field_vc__BSSGP__BVC.is_value()
  && field_cfg.is_value();
}
void GbInstance::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ vc_NS := ");
field_vc__NS.log();
TTCN_Logger::log_event_str(", vc_BSSGP := ");
field_vc__BSSGP.log();
TTCN_Logger::log_event_str(", vc_BSSGP_BVC := ");
field_vc__BSSGP__BVC.log();
TTCN_Logger::log_event_str(", cfg := ");
field_cfg.log();
TTCN_Logger::log_event_str(" }");
}

void GbInstance::set_implicit_omit()
{
if (vc__NS().is_bound()) vc__NS().set_implicit_omit();
if (vc__BSSGP().is_bound()) vc__BSSGP().set_implicit_omit();
if (vc__BSSGP__BVC().is_bound()) vc__BSSGP__BVC().set_implicit_omit();
if (cfg().is_bound()) cfg().set_implicit_omit();
}

void GbInstance::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @GBProxy_Tests.GbInstance has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) vc__NS().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) vc__BSSGP().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) vc__BSSGP__BVC().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) cfg().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_NS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__NS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_BSSGP")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__BSSGP().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_BSSGP_BVC")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__BSSGP__BVC().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cfg")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cfg().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.GbInstance: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@GBProxy_Tests.GbInstance");
  }
}

void GbInstance::encode_text(Text_Buf& text_buf) const
{
field_vc__NS.encode_text(text_buf);
field_vc__BSSGP.encode_text(text_buf);
field_vc__BSSGP__BVC.encode_text(text_buf);
field_cfg.encode_text(text_buf);
}

void GbInstance::decode_text(Text_Buf& text_buf)
{
field_vc__NS.decode_text(text_buf);
field_vc__BSSGP.decode_text(text_buf);
field_vc__BSSGP__BVC.decode_text(text_buf);
field_cfg.decode_text(text_buf);
}

struct GbInstance_template::single_value_struct {
COMPONENT_template field_vc__NS;
COMPONENT_template field_vc__BSSGP;
BSSGP__BVC__CTs_template field_vc__BSSGP__BVC;
BSSGP__Emulation::BssgpConfig_template field_cfg;
};

void GbInstance_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_vc__NS = ANY_VALUE;
single_value->field_vc__BSSGP = ANY_VALUE;
single_value->field_vc__BSSGP__BVC = ANY_VALUE;
single_value->field_cfg = ANY_VALUE;
}
}
}

void GbInstance_template::copy_value(const GbInstance& other_value)
{
single_value = new single_value_struct;
if (other_value.vc__NS().is_bound()) {
  single_value->field_vc__NS = other_value.vc__NS();
} else {
  single_value->field_vc__NS.clean_up();
}
if (other_value.vc__BSSGP().is_bound()) {
  single_value->field_vc__BSSGP = other_value.vc__BSSGP();
} else {
  single_value->field_vc__BSSGP.clean_up();
}
if (other_value.vc__BSSGP__BVC().is_bound()) {
  single_value->field_vc__BSSGP__BVC = other_value.vc__BSSGP__BVC();
} else {
  single_value->field_vc__BSSGP__BVC.clean_up();
}
if (other_value.cfg().is_bound()) {
  single_value->field_cfg = other_value.cfg();
} else {
  single_value->field_cfg.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void GbInstance_template::copy_template(const GbInstance_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.vc__NS().get_selection()) {
single_value->field_vc__NS = other_value.vc__NS();
} else {
single_value->field_vc__NS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.vc__BSSGP().get_selection()) {
single_value->field_vc__BSSGP = other_value.vc__BSSGP();
} else {
single_value->field_vc__BSSGP.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.vc__BSSGP__BVC().get_selection()) {
single_value->field_vc__BSSGP__BVC = other_value.vc__BSSGP__BVC();
} else {
single_value->field_vc__BSSGP__BVC.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cfg().get_selection()) {
single_value->field_cfg = other_value.cfg();
} else {
single_value->field_cfg.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new GbInstance_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new GbInstance_template(*other_value.implication_.precondition);
implication_.implied_template = new GbInstance_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.GbInstance.");
break;
}
set_selection(other_value);
}

GbInstance_template::GbInstance_template()
{
}

GbInstance_template::GbInstance_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

GbInstance_template::GbInstance_template(const GbInstance& other_value)
{
copy_value(other_value);
}

GbInstance_template::GbInstance_template(const OPTIONAL<GbInstance>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const GbInstance&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.GbInstance from an unbound optional field.");
}
}

GbInstance_template::GbInstance_template(GbInstance_template* p_precondition, GbInstance_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

GbInstance_template::GbInstance_template(Dynamic_Match_Interface<GbInstance>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<GbInstance>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

GbInstance_template::GbInstance_template(const GbInstance_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

GbInstance_template::~GbInstance_template()
{
clean_up();
}

GbInstance_template& GbInstance_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

GbInstance_template& GbInstance_template::operator=(const GbInstance& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

GbInstance_template& GbInstance_template::operator=(const OPTIONAL<GbInstance>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const GbInstance&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.GbInstance.");
}
return *this;
}

GbInstance_template& GbInstance_template::operator=(const GbInstance_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean GbInstance_template::match(const GbInstance& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.vc__NS().is_bound()) return FALSE;
if(!single_value->field_vc__NS.match(other_value.vc__NS(), legacy))return FALSE;
if(!other_value.vc__BSSGP().is_bound()) return FALSE;
if(!single_value->field_vc__BSSGP.match(other_value.vc__BSSGP(), legacy))return FALSE;
if(!other_value.vc__BSSGP__BVC().is_bound()) return FALSE;
if(!single_value->field_vc__BSSGP__BVC.match(other_value.vc__BSSGP__BVC(), legacy))return FALSE;
if(!other_value.cfg().is_bound()) return FALSE;
if(!single_value->field_cfg.match(other_value.cfg(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @GBProxy_Tests.GbInstance.");
}
return FALSE;
}

boolean GbInstance_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_vc__NS.is_bound()
 || single_value->field_vc__BSSGP.is_bound()
 || single_value->field_vc__BSSGP__BVC.is_bound()
 || single_value->field_cfg.is_bound();
}

boolean GbInstance_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_vc__NS.is_value()
 && single_value->field_vc__BSSGP.is_value()
 && single_value->field_vc__BSSGP__BVC.is_value()
 && single_value->field_cfg.is_value();
}

void GbInstance_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

GbInstance GbInstance_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.GbInstance.");
GbInstance ret_val;
if (single_value->field_vc__NS.is_bound()) {
ret_val.vc__NS() = single_value->field_vc__NS.valueof();
}
if (single_value->field_vc__BSSGP.is_bound()) {
ret_val.vc__BSSGP() = single_value->field_vc__BSSGP.valueof();
}
if (single_value->field_vc__BSSGP__BVC.is_bound()) {
ret_val.vc__BSSGP__BVC() = single_value->field_vc__BSSGP__BVC.valueof();
}
if (single_value->field_cfg.is_bound()) {
ret_val.cfg() = single_value->field_cfg.valueof();
}
return ret_val;
}

void GbInstance_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @GBProxy_Tests.GbInstance.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new GbInstance_template[list_length];
}

GbInstance_template& GbInstance_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @GBProxy_Tests.GbInstance.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @GBProxy_Tests.GbInstance.");
return value_list.list_value[list_index];
}

COMPONENT_template& GbInstance_template::vc__NS()
{
set_specific();
return single_value->field_vc__NS;
}

const COMPONENT_template& GbInstance_template::vc__NS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field vc_NS of a non-specific template of type @GBProxy_Tests.GbInstance.");
return single_value->field_vc__NS;
}

COMPONENT_template& GbInstance_template::vc__BSSGP()
{
set_specific();
return single_value->field_vc__BSSGP;
}

const COMPONENT_template& GbInstance_template::vc__BSSGP() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field vc_BSSGP of a non-specific template of type @GBProxy_Tests.GbInstance.");
return single_value->field_vc__BSSGP;
}

BSSGP__BVC__CTs_template& GbInstance_template::vc__BSSGP__BVC()
{
set_specific();
return single_value->field_vc__BSSGP__BVC;
}

const BSSGP__BVC__CTs_template& GbInstance_template::vc__BSSGP__BVC() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field vc_BSSGP_BVC of a non-specific template of type @GBProxy_Tests.GbInstance.");
return single_value->field_vc__BSSGP__BVC;
}

BSSGP__Emulation::BssgpConfig_template& GbInstance_template::cfg()
{
set_specific();
return single_value->field_cfg;
}

const BSSGP__Emulation::BssgpConfig_template& GbInstance_template::cfg() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cfg of a non-specific template of type @GBProxy_Tests.GbInstance.");
return single_value->field_cfg;
}

int GbInstance_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
    return 4;
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.GbInstance containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.GbInstance.");
  }
  return 0;
}

void GbInstance_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ vc_NS := ");
single_value->field_vc__NS.log();
TTCN_Logger::log_event_str(", vc_BSSGP := ");
single_value->field_vc__BSSGP.log();
TTCN_Logger::log_event_str(", vc_BSSGP_BVC := ");
single_value->field_vc__BSSGP__BVC.log();
TTCN_Logger::log_event_str(", cfg := ");
single_value->field_cfg.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void GbInstance_template::log_match(const GbInstance& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_vc__NS.match(match_value.vc__NS(), legacy)){
TTCN_Logger::log_logmatch_info(".vc_NS");
single_value->field_vc__NS.log_match(match_value.vc__NS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_vc__BSSGP.match(match_value.vc__BSSGP(), legacy)){
TTCN_Logger::log_logmatch_info(".vc_BSSGP");
single_value->field_vc__BSSGP.log_match(match_value.vc__BSSGP(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_vc__BSSGP__BVC.match(match_value.vc__BSSGP__BVC(), legacy)){
TTCN_Logger::log_logmatch_info(".vc_BSSGP_BVC");
single_value->field_vc__BSSGP__BVC.log_match(match_value.vc__BSSGP__BVC(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cfg.match(match_value.cfg(), legacy)){
TTCN_Logger::log_logmatch_info(".cfg");
single_value->field_cfg.log_match(match_value.cfg(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ vc_NS := ");
single_value->field_vc__NS.log_match(match_value.vc__NS(), legacy);
TTCN_Logger::log_event_str(", vc_BSSGP := ");
single_value->field_vc__BSSGP.log_match(match_value.vc__BSSGP(), legacy);
TTCN_Logger::log_event_str(", vc_BSSGP_BVC := ");
single_value->field_vc__BSSGP__BVC.log_match(match_value.vc__BSSGP__BVC(), legacy);
TTCN_Logger::log_event_str(", cfg := ");
single_value->field_cfg.log_match(match_value.cfg(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void GbInstance_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_vc__NS.encode_text(text_buf);
single_value->field_vc__BSSGP.encode_text(text_buf);
single_value->field_vc__BSSGP__BVC.encode_text(text_buf);
single_value->field_cfg.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.GbInstance.");
}
}

void GbInstance_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_vc__NS.decode_text(text_buf);
single_value->field_vc__BSSGP.decode_text(text_buf);
single_value->field_vc__BSSGP__BVC.decode_text(text_buf);
single_value->field_cfg.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new GbInstance_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @GBProxy_Tests.GbInstance.");
}
}

void GbInstance_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    GbInstance_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record template of type @GBProxy_Tests.GbInstance has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) vc__NS().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) vc__BSSGP().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) vc__BSSGP__BVC().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) cfg().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_NS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__NS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_BSSGP")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__BSSGP().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "vc_BSSGP_BVC")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          vc__BSSGP__BVC().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cfg")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cfg().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.GbInstance: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    GbInstance_template* precondition = new GbInstance_template;
    precondition->set_param(*param.get_elem(0));
    GbInstance_template* implied_template = new GbInstance_template;
    implied_template->set_param(*param.get_elem(1));
    *this = GbInstance_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@GBProxy_Tests.GbInstance");
  }
  is_ifpresent = param.get_ifpresent();
}

void GbInstance_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_vc__NS.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.GbInstance");
single_value->field_vc__BSSGP.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.GbInstance");
single_value->field_vc__BSSGP__BVC.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.GbInstance");
single_value->field_cfg.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.GbInstance");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.GbInstance");
}

boolean GbInstance_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean GbInstance_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}


const GbInstance GbInstances::UNBOUND_ELEM;
GbInstances::GbInstances()
{
val_ptr = NULL;
}

GbInstances::GbInstances(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

GbInstances::GbInstances(const GbInstances& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.GbInstances.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

GbInstances::~GbInstances()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void GbInstances::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

GbInstances& GbInstances::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

GbInstances& GbInstances::operator=(const GbInstances& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.GbInstances.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean GbInstances::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.GbInstances.");
return val_ptr->n_elements == 0 ;
}

boolean GbInstances::operator==(const GbInstances& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.GbInstances.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.GbInstances.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

GbInstance& GbInstances::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.GbInstances using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (GbInstance**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new GbInstance(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new GbInstance;
}
return *val_ptr->value_elements[index_value];
}

GbInstance& GbInstances::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.GbInstances.");
return (*this)[(int)index_value];
}

const GbInstance& GbInstances::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.GbInstances.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.GbInstances using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.GbInstances: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const GbInstance& GbInstances::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.GbInstances.");
return (*this)[(int)index_value];
}

GbInstances GbInstances::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

GbInstances GbInstances::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

GbInstances GbInstances::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

GbInstances GbInstances::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.GbInstances.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
GbInstances ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new GbInstance(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

GbInstances GbInstances::operator+(const GbInstances& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.GbInstances concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
GbInstances ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new GbInstance(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new GbInstance(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

GbInstances GbInstances::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.GbInstances.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.GbInstances","element");
GbInstances ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new GbInstance(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

GbInstances GbInstances::replace(int index, int len, const GbInstances& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.GbInstances.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.GbInstances.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.GbInstances","element");
GbInstances ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new GbInstance(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new GbInstance(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new GbInstance(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

GbInstances GbInstances::replace(int index, int len, const GbInstances_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void GbInstances::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.GbInstances.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (GbInstance**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new GbInstance(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (GbInstance**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.GbInstances: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (GbInstance**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean GbInstances::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int GbInstances::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.GbInstances.");
return val_ptr->n_elements;
}

int GbInstances::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.GbInstances.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void GbInstances::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void GbInstances::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void GbInstances::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.GbInstances");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.GbInstances");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void GbInstances::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.GbInstances.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void GbInstances::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.GbInstances.");
val_ptr->value_elements = (GbInstance**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new GbInstance;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void GbInstances_template::copy_value(const GbInstances& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.GbInstances with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (GbInstance_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new GbInstance_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new GbInstance_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void GbInstances_template::copy_template(const GbInstances_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (GbInstance_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new GbInstance_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new GbInstance_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new GbInstances_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new GbInstances_template(*other_value.implication_.precondition);
implication_.implied_template = new GbInstances_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.GbInstances.");
break;
}
set_selection(other_value);
}

boolean GbInstances_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const GbInstances_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const GbInstances*)value_ptr)[value_index], legacy);
else return ((const GbInstances_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

GbInstances_template::GbInstances_template()
{
}

GbInstances_template::GbInstances_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

GbInstances_template::GbInstances_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

GbInstances_template::GbInstances_template(const GbInstances& other_value)
{
copy_value(other_value);
}

GbInstances_template::GbInstances_template(const OPTIONAL<GbInstances>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const GbInstances&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.GbInstances from an unbound optional field.");
}
}

GbInstances_template::GbInstances_template(GbInstances_template* p_precondition, GbInstances_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

GbInstances_template::GbInstances_template(Dynamic_Match_Interface<GbInstances>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<GbInstances>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

GbInstances_template::GbInstances_template(const GbInstances_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

GbInstances_template::~GbInstances_template()
{
clean_up();
}

void GbInstances_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

GbInstances_template& GbInstances_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

GbInstances_template& GbInstances_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

GbInstances_template& GbInstances_template::operator=(const GbInstances& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

GbInstances_template& GbInstances_template::operator=(const OPTIONAL<GbInstances>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const GbInstances&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.GbInstances.");
}
return *this;
}

GbInstances_template& GbInstances_template::operator=(const GbInstances_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

GbInstance_template& GbInstances_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.GbInstances using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.GbInstances.");
    break;
}
return *single_value.value_elements[index_value];
}

GbInstance_template& GbInstances_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.GbInstances.");
return (*this)[(int)index_value];
}

const GbInstance_template& GbInstances_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.GbInstances using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.GbInstances.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.GbInstances: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const GbInstance_template& GbInstances_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.GbInstances.");
return (*this)[(int)index_value];
}

void GbInstances_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.GbInstances.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (GbInstance_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new GbInstance_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new GbInstance_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (GbInstance_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int GbInstances_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int GbInstances_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.GbInstances containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.GbInstances.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.GbInstances");
}

boolean GbInstances_template::match(const GbInstances& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.GbInstances.");
}
return FALSE;
}

boolean GbInstances_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

GbInstances GbInstances_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.GbInstances.");
GbInstances ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

GbInstances GbInstances_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

GbInstances GbInstances_template::replace(int index, int len, const GbInstances_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

GbInstances GbInstances_template::replace(int index, int len, const GbInstances& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void GbInstances_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new GbInstances_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.GbInstances.");
}
set_selection(template_type);
}

GbInstances_template& GbInstances_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.GbInstances.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.GbInstances.");
return value_list.list_value[list_index];
}

void GbInstances_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void GbInstances_template::log_match(const GbInstances& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void GbInstances_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.GbInstances.");
}
}

void GbInstances_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.GbInstances.");
single_value.value_elements = (GbInstance_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new GbInstance_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new GbInstances_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.GbInstances.");
}
}

boolean GbInstances_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean GbInstances_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void GbInstances_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    GbInstances_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    GbInstances_template* precondition = new GbInstances_template;
    precondition->set_param(*param.get_elem(0));
    GbInstances_template* implied_template = new GbInstances_template;
    implied_template->set_param(*param.get_elem(1));
    *this = GbInstances_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.GbInstances");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void GbInstances_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.GbInstances");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.GbInstances");
}

boolean GbInstances_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}

const Osmocom__Gb__Types::BssgpCellId BssgpCellIds::UNBOUND_ELEM;
BssgpCellIds::BssgpCellIds()
{
val_ptr = NULL;
}

BssgpCellIds::BssgpCellIds(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

BssgpCellIds::BssgpCellIds(const BssgpCellIds& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.BssgpCellIds.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

BssgpCellIds::~BssgpCellIds()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void BssgpCellIds::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

BssgpCellIds& BssgpCellIds::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

BssgpCellIds& BssgpCellIds::operator=(const BssgpCellIds& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean BssgpCellIds::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
return val_ptr->n_elements == 0 ;
}

boolean BssgpCellIds::operator==(const BssgpCellIds& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

Osmocom__Gb__Types::BssgpCellId& BssgpCellIds::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BssgpCellIds using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (Osmocom__Gb__Types::BssgpCellId**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new Osmocom__Gb__Types::BssgpCellId;
}
return *val_ptr->value_elements[index_value];
}

Osmocom__Gb__Types::BssgpCellId& BssgpCellIds::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BssgpCellIds.");
return (*this)[(int)index_value];
}

const Osmocom__Gb__Types::BssgpCellId& BssgpCellIds::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.BssgpCellIds using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.BssgpCellIds: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const Osmocom__Gb__Types::BssgpCellId& BssgpCellIds::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.BssgpCellIds.");
return (*this)[(int)index_value];
}

BssgpCellIds BssgpCellIds::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

BssgpCellIds BssgpCellIds::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

BssgpCellIds BssgpCellIds::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

BssgpCellIds BssgpCellIds::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
BssgpCellIds ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new Osmocom__Gb__Types::BssgpCellId(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

BssgpCellIds BssgpCellIds::operator+(const BssgpCellIds& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.BssgpCellIds concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
BssgpCellIds ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new Osmocom__Gb__Types::BssgpCellId(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new Osmocom__Gb__Types::BssgpCellId(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

BssgpCellIds BssgpCellIds::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.BssgpCellIds","element");
BssgpCellIds ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new Osmocom__Gb__Types::BssgpCellId(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

BssgpCellIds BssgpCellIds::replace(int index, int len, const BssgpCellIds& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.BssgpCellIds","element");
BssgpCellIds ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new Osmocom__Gb__Types::BssgpCellId(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new Osmocom__Gb__Types::BssgpCellId(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new Osmocom__Gb__Types::BssgpCellId(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

BssgpCellIds BssgpCellIds::replace(int index, int len, const BssgpCellIds_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void BssgpCellIds::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.BssgpCellIds.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (Osmocom__Gb__Types::BssgpCellId**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (Osmocom__Gb__Types::BssgpCellId**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.BssgpCellIds: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (Osmocom__Gb__Types::BssgpCellId**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean BssgpCellIds::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int BssgpCellIds::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.BssgpCellIds.");
return val_ptr->n_elements;
}

int BssgpCellIds::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.BssgpCellIds.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void BssgpCellIds::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void BssgpCellIds::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void BssgpCellIds::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BssgpCellIds");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.BssgpCellIds");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void BssgpCellIds::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.BssgpCellIds.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void BssgpCellIds::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.BssgpCellIds.");
val_ptr->value_elements = (Osmocom__Gb__Types::BssgpCellId**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void BssgpCellIds_template::copy_value(const BssgpCellIds& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.BssgpCellIds with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (Osmocom__Gb__Types::BssgpCellId_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void BssgpCellIds_template::copy_template(const BssgpCellIds_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (Osmocom__Gb__Types::BssgpCellId_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new BssgpCellIds_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new BssgpCellIds_template(*other_value.implication_.precondition);
implication_.implied_template = new BssgpCellIds_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.BssgpCellIds.");
break;
}
set_selection(other_value);
}

boolean BssgpCellIds_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const BssgpCellIds_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const BssgpCellIds*)value_ptr)[value_index], legacy);
else return ((const BssgpCellIds_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

BssgpCellIds_template::BssgpCellIds_template()
{
}

BssgpCellIds_template::BssgpCellIds_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

BssgpCellIds_template::BssgpCellIds_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

BssgpCellIds_template::BssgpCellIds_template(const BssgpCellIds& other_value)
{
copy_value(other_value);
}

BssgpCellIds_template::BssgpCellIds_template(const OPTIONAL<BssgpCellIds>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BssgpCellIds&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.BssgpCellIds from an unbound optional field.");
}
}

BssgpCellIds_template::BssgpCellIds_template(BssgpCellIds_template* p_precondition, BssgpCellIds_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

BssgpCellIds_template::BssgpCellIds_template(Dynamic_Match_Interface<BssgpCellIds>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<BssgpCellIds>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

BssgpCellIds_template::BssgpCellIds_template(const BssgpCellIds_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

BssgpCellIds_template::~BssgpCellIds_template()
{
clean_up();
}

void BssgpCellIds_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

BssgpCellIds_template& BssgpCellIds_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

BssgpCellIds_template& BssgpCellIds_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

BssgpCellIds_template& BssgpCellIds_template::operator=(const BssgpCellIds& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

BssgpCellIds_template& BssgpCellIds_template::operator=(const OPTIONAL<BssgpCellIds>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BssgpCellIds&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.BssgpCellIds.");
}
return *this;
}

BssgpCellIds_template& BssgpCellIds_template::operator=(const BssgpCellIds_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

Osmocom__Gb__Types::BssgpCellId_template& BssgpCellIds_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BssgpCellIds using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BssgpCellIds.");
    break;
}
return *single_value.value_elements[index_value];
}

Osmocom__Gb__Types::BssgpCellId_template& BssgpCellIds_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BssgpCellIds.");
return (*this)[(int)index_value];
}

const Osmocom__Gb__Types::BssgpCellId_template& BssgpCellIds_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.BssgpCellIds using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.BssgpCellIds.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.BssgpCellIds: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const Osmocom__Gb__Types::BssgpCellId_template& BssgpCellIds_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.BssgpCellIds.");
return (*this)[(int)index_value];
}

void BssgpCellIds_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.BssgpCellIds.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (Osmocom__Gb__Types::BssgpCellId_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (Osmocom__Gb__Types::BssgpCellId_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int BssgpCellIds_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int BssgpCellIds_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.BssgpCellIds containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.BssgpCellIds.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.BssgpCellIds");
}

boolean BssgpCellIds_template::match(const BssgpCellIds& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.BssgpCellIds.");
}
return FALSE;
}

boolean BssgpCellIds_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

BssgpCellIds BssgpCellIds_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.BssgpCellIds.");
BssgpCellIds ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

BssgpCellIds BssgpCellIds_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

BssgpCellIds BssgpCellIds_template::replace(int index, int len, const BssgpCellIds_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

BssgpCellIds BssgpCellIds_template::replace(int index, int len, const BssgpCellIds& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void BssgpCellIds_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new BssgpCellIds_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.BssgpCellIds.");
}
set_selection(template_type);
}

BssgpCellIds_template& BssgpCellIds_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.BssgpCellIds.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.BssgpCellIds.");
return value_list.list_value[list_index];
}

void BssgpCellIds_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void BssgpCellIds_template::log_match(const BssgpCellIds& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void BssgpCellIds_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.BssgpCellIds.");
}
}

void BssgpCellIds_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.BssgpCellIds.");
single_value.value_elements = (Osmocom__Gb__Types::BssgpCellId_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new Osmocom__Gb__Types::BssgpCellId_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new BssgpCellIds_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.BssgpCellIds.");
}
}

boolean BssgpCellIds_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean BssgpCellIds_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void BssgpCellIds_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    BssgpCellIds_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BssgpCellIds_template* precondition = new BssgpCellIds_template;
    precondition->set_param(*param.get_elem(0));
    BssgpCellIds_template* implied_template = new BssgpCellIds_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BssgpCellIds_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.BssgpCellIds");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void BssgpCellIds_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BssgpCellIds");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.BssgpCellIds");
}

boolean BssgpCellIds_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}
BSSGP__ConnHdlrPars::BSSGP__ConnHdlrPars()
{
}

BSSGP__ConnHdlrPars::BSSGP__ConnHdlrPars(const HEXSTRING& par_imei,
    const HEXSTRING& par_imsi,
    const HEXSTRING& par_msisdn,
    const OPTIONAL< OCTETSTRING >& par_p__tmsi,
    const OPTIONAL< OCTETSTRING >& par_p__tmsi__sig,
    const OCTETSTRING& par_tlli,
    const OPTIONAL< OCTETSTRING >& par_tlli__old,
    const OPTIONAL< MobileL3__GMM__SM__Types::RoutingAreaIdentificationV >& par_ra,
    const GbInstances& par_pcu,
    const GbInstances& par_sgsn,
    const INTEGER& par_sgsn__idx,
    const FLOAT& par_t__guard)
  :   field_imei(par_imei),
  field_imsi(par_imsi),
  field_msisdn(par_msisdn),
  field_p__tmsi(par_p__tmsi),
  field_p__tmsi__sig(par_p__tmsi__sig),
  field_tlli(par_tlli),
  field_tlli__old(par_tlli__old),
  field_ra(par_ra),
  field_pcu(par_pcu),
  field_sgsn(par_sgsn),
  field_sgsn__idx(par_sgsn__idx),
  field_t__guard(par_t__guard)
{
}

BSSGP__ConnHdlrPars::BSSGP__ConnHdlrPars(const BSSGP__ConnHdlrPars& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
if (other_value.imei().is_bound()) field_imei = other_value.imei();
else field_imei.clean_up();
if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
else field_imsi.clean_up();
if (other_value.msisdn().is_bound()) field_msisdn = other_value.msisdn();
else field_msisdn.clean_up();
if (other_value.p__tmsi().is_bound()) field_p__tmsi = other_value.p__tmsi();
else field_p__tmsi.clean_up();
if (other_value.p__tmsi__sig().is_bound()) field_p__tmsi__sig = other_value.p__tmsi__sig();
else field_p__tmsi__sig.clean_up();
if (other_value.tlli().is_bound()) field_tlli = other_value.tlli();
else field_tlli.clean_up();
if (other_value.tlli__old().is_bound()) field_tlli__old = other_value.tlli__old();
else field_tlli__old.clean_up();
if (other_value.ra().is_bound()) field_ra = other_value.ra();
else field_ra.clean_up();
if (other_value.pcu().is_bound()) field_pcu = other_value.pcu();
else field_pcu.clean_up();
if (other_value.sgsn().is_bound()) field_sgsn = other_value.sgsn();
else field_sgsn.clean_up();
if (other_value.sgsn__idx().is_bound()) field_sgsn__idx = other_value.sgsn__idx();
else field_sgsn__idx.clean_up();
if (other_value.t__guard().is_bound()) field_t__guard = other_value.t__guard();
else field_t__guard.clean_up();
}

void BSSGP__ConnHdlrPars::clean_up()
{
field_imei.clean_up();
field_imsi.clean_up();
field_msisdn.clean_up();
field_p__tmsi.clean_up();
field_p__tmsi__sig.clean_up();
field_tlli.clean_up();
field_tlli__old.clean_up();
field_ra.clean_up();
field_pcu.clean_up();
field_sgsn.clean_up();
field_sgsn__idx.clean_up();
field_t__guard.clean_up();
}

const TTCN_Typedescriptor_t* BSSGP__ConnHdlrPars::get_descriptor() const { return &BSSGP__ConnHdlrPars_descr_; }
BSSGP__ConnHdlrPars& BSSGP__ConnHdlrPars::operator=(const BSSGP__ConnHdlrPars& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
  if (other_value.imei().is_bound()) field_imei = other_value.imei();
  else field_imei.clean_up();
  if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
  else field_imsi.clean_up();
  if (other_value.msisdn().is_bound()) field_msisdn = other_value.msisdn();
  else field_msisdn.clean_up();
  if (other_value.p__tmsi().is_bound()) field_p__tmsi = other_value.p__tmsi();
  else field_p__tmsi.clean_up();
  if (other_value.p__tmsi__sig().is_bound()) field_p__tmsi__sig = other_value.p__tmsi__sig();
  else field_p__tmsi__sig.clean_up();
  if (other_value.tlli().is_bound()) field_tlli = other_value.tlli();
  else field_tlli.clean_up();
  if (other_value.tlli__old().is_bound()) field_tlli__old = other_value.tlli__old();
  else field_tlli__old.clean_up();
  if (other_value.ra().is_bound()) field_ra = other_value.ra();
  else field_ra.clean_up();
  if (other_value.pcu().is_bound()) field_pcu = other_value.pcu();
  else field_pcu.clean_up();
  if (other_value.sgsn().is_bound()) field_sgsn = other_value.sgsn();
  else field_sgsn.clean_up();
  if (other_value.sgsn__idx().is_bound()) field_sgsn__idx = other_value.sgsn__idx();
  else field_sgsn__idx.clean_up();
  if (other_value.t__guard().is_bound()) field_t__guard = other_value.t__guard();
  else field_t__guard.clean_up();
}
return *this;
}

boolean BSSGP__ConnHdlrPars::operator==(const BSSGP__ConnHdlrPars& other_value) const
{
return field_imei==other_value.field_imei
  && field_imsi==other_value.field_imsi
  && field_msisdn==other_value.field_msisdn
  && field_p__tmsi==other_value.field_p__tmsi
  && field_p__tmsi__sig==other_value.field_p__tmsi__sig
  && field_tlli==other_value.field_tlli
  && field_tlli__old==other_value.field_tlli__old
  && field_ra==other_value.field_ra
  && field_pcu==other_value.field_pcu
  && field_sgsn==other_value.field_sgsn
  && field_sgsn__idx==other_value.field_sgsn__idx
  && field_t__guard==other_value.field_t__guard;
}

boolean BSSGP__ConnHdlrPars::is_bound() const
{
return (field_imei.is_bound())
  || (field_imsi.is_bound())
  || (field_msisdn.is_bound())
  || (OPTIONAL_OMIT == field_p__tmsi.get_selection() || field_p__tmsi.is_bound())
  || (OPTIONAL_OMIT == field_p__tmsi__sig.get_selection() || field_p__tmsi__sig.is_bound())
  || (field_tlli.is_bound())
  || (OPTIONAL_OMIT == field_tlli__old.get_selection() || field_tlli__old.is_bound())
  || (OPTIONAL_OMIT == field_ra.get_selection() || field_ra.is_bound())
  || (field_pcu.is_bound())
  || (field_sgsn.is_bound())
  || (field_sgsn__idx.is_bound())
  || (field_t__guard.is_bound());
}
boolean BSSGP__ConnHdlrPars::is_value() const
{
return field_imei.is_value()
  && field_imsi.is_value()
  && field_msisdn.is_value()
  && (OPTIONAL_OMIT == field_p__tmsi.get_selection() || field_p__tmsi.is_value())
  && (OPTIONAL_OMIT == field_p__tmsi__sig.get_selection() || field_p__tmsi__sig.is_value())
  && field_tlli.is_value()
  && (OPTIONAL_OMIT == field_tlli__old.get_selection() || field_tlli__old.is_value())
  && (OPTIONAL_OMIT == field_ra.get_selection() || field_ra.is_value())
  && field_pcu.is_value()
  && field_sgsn.is_value()
  && field_sgsn__idx.is_value()
  && field_t__guard.is_value();
}
int BSSGP__ConnHdlrPars::size_of() const
{
  int ret_val = 8;
  if (field_p__tmsi.ispresent()) ret_val++;
  if (field_p__tmsi__sig.ispresent()) ret_val++;
  if (field_tlli__old.ispresent()) ret_val++;
  if (field_ra.ispresent()) ret_val++;
  return ret_val;
}

void BSSGP__ConnHdlrPars::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ imei := ");
field_imei.log();
TTCN_Logger::log_event_str(", imsi := ");
field_imsi.log();
TTCN_Logger::log_event_str(", msisdn := ");
field_msisdn.log();
TTCN_Logger::log_event_str(", p_tmsi := ");
field_p__tmsi.log();
TTCN_Logger::log_event_str(", p_tmsi_sig := ");
field_p__tmsi__sig.log();
TTCN_Logger::log_event_str(", tlli := ");
field_tlli.log();
TTCN_Logger::log_event_str(", tlli_old := ");
field_tlli__old.log();
TTCN_Logger::log_event_str(", ra := ");
field_ra.log();
TTCN_Logger::log_event_str(", pcu := ");
field_pcu.log();
TTCN_Logger::log_event_str(", sgsn := ");
field_sgsn.log();
TTCN_Logger::log_event_str(", sgsn_idx := ");
field_sgsn__idx.log();
TTCN_Logger::log_event_str(", t_guard := ");
field_t__guard.log();
TTCN_Logger::log_event_str(" }");
}

void BSSGP__ConnHdlrPars::set_implicit_omit()
{
if (imei().is_bound()) imei().set_implicit_omit();
if (imsi().is_bound()) imsi().set_implicit_omit();
if (msisdn().is_bound()) msisdn().set_implicit_omit();
if (!p__tmsi().is_bound()) p__tmsi() = OMIT_VALUE;
else p__tmsi().set_implicit_omit();
if (!p__tmsi__sig().is_bound()) p__tmsi__sig() = OMIT_VALUE;
else p__tmsi__sig().set_implicit_omit();
if (tlli().is_bound()) tlli().set_implicit_omit();
if (!tlli__old().is_bound()) tlli__old() = OMIT_VALUE;
else tlli__old().set_implicit_omit();
if (!ra().is_bound()) ra() = OMIT_VALUE;
else ra().set_implicit_omit();
if (pcu().is_bound()) pcu().set_implicit_omit();
if (sgsn().is_bound()) sgsn().set_implicit_omit();
if (sgsn__idx().is_bound()) sgsn__idx().set_implicit_omit();
if (t__guard().is_bound()) t__guard().set_implicit_omit();
}

void BSSGP__ConnHdlrPars::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (12<param.get_size()) {
      param.error("record value of type @GBProxy_Tests.BSSGP_ConnHdlrPars has 12 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) imei().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) imsi().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) msisdn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) p__tmsi().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) p__tmsi__sig().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) tlli().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) tlli__old().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ra().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) pcu().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) sgsn().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) sgsn__idx().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) t__guard().set_param(*param.get_elem(11));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "imei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          imei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "imsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          imsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "msisdn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msisdn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p_tmsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p__tmsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p_tmsi_sig")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p__tmsi__sig().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tlli")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tlli().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tlli_old")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tlli__old().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ra")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ra().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pcu")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pcu().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sgsn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sgsn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sgsn_idx")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sgsn__idx().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t_guard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__guard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.BSSGP_ConnHdlrPars: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@GBProxy_Tests.BSSGP_ConnHdlrPars");
  }
}

void BSSGP__ConnHdlrPars::encode_text(Text_Buf& text_buf) const
{
field_imei.encode_text(text_buf);
field_imsi.encode_text(text_buf);
field_msisdn.encode_text(text_buf);
field_p__tmsi.encode_text(text_buf);
field_p__tmsi__sig.encode_text(text_buf);
field_tlli.encode_text(text_buf);
field_tlli__old.encode_text(text_buf);
field_ra.encode_text(text_buf);
field_pcu.encode_text(text_buf);
field_sgsn.encode_text(text_buf);
field_sgsn__idx.encode_text(text_buf);
field_t__guard.encode_text(text_buf);
}

void BSSGP__ConnHdlrPars::decode_text(Text_Buf& text_buf)
{
field_imei.decode_text(text_buf);
field_imsi.decode_text(text_buf);
field_msisdn.decode_text(text_buf);
field_p__tmsi.decode_text(text_buf);
field_p__tmsi__sig.decode_text(text_buf);
field_tlli.decode_text(text_buf);
field_tlli__old.decode_text(text_buf);
field_ra.decode_text(text_buf);
field_pcu.decode_text(text_buf);
field_sgsn.decode_text(text_buf);
field_sgsn__idx.decode_text(text_buf);
field_t__guard.decode_text(text_buf);
}

struct BSSGP__ConnHdlrPars_template::single_value_struct {
HEXSTRING_template field_imei;
HEXSTRING_template field_imsi;
HEXSTRING_template field_msisdn;
OCTETSTRING_template field_p__tmsi;
OCTETSTRING_template field_p__tmsi__sig;
OCTETSTRING_template field_tlli;
OCTETSTRING_template field_tlli__old;
MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template field_ra;
GbInstances_template field_pcu;
GbInstances_template field_sgsn;
INTEGER_template field_sgsn__idx;
FLOAT_template field_t__guard;
};

void BSSGP__ConnHdlrPars_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_imei = ANY_VALUE;
single_value->field_imsi = ANY_VALUE;
single_value->field_msisdn = ANY_VALUE;
single_value->field_p__tmsi = ANY_OR_OMIT;
single_value->field_p__tmsi__sig = ANY_OR_OMIT;
single_value->field_tlli = ANY_VALUE;
single_value->field_tlli__old = ANY_OR_OMIT;
single_value->field_ra = ANY_OR_OMIT;
single_value->field_pcu = ANY_VALUE;
single_value->field_sgsn = ANY_VALUE;
single_value->field_sgsn__idx = ANY_VALUE;
single_value->field_t__guard = ANY_VALUE;
}
}
}

void BSSGP__ConnHdlrPars_template::copy_value(const BSSGP__ConnHdlrPars& other_value)
{
single_value = new single_value_struct;
if (other_value.imei().is_bound()) {
  single_value->field_imei = other_value.imei();
} else {
  single_value->field_imei.clean_up();
}
if (other_value.imsi().is_bound()) {
  single_value->field_imsi = other_value.imsi();
} else {
  single_value->field_imsi.clean_up();
}
if (other_value.msisdn().is_bound()) {
  single_value->field_msisdn = other_value.msisdn();
} else {
  single_value->field_msisdn.clean_up();
}
if (other_value.p__tmsi().is_bound()) {
  if (other_value.p__tmsi().ispresent()) single_value->field_p__tmsi = other_value.p__tmsi()();
  else single_value->field_p__tmsi = OMIT_VALUE;
} else {
  single_value->field_p__tmsi.clean_up();
}
if (other_value.p__tmsi__sig().is_bound()) {
  if (other_value.p__tmsi__sig().ispresent()) single_value->field_p__tmsi__sig = other_value.p__tmsi__sig()();
  else single_value->field_p__tmsi__sig = OMIT_VALUE;
} else {
  single_value->field_p__tmsi__sig.clean_up();
}
if (other_value.tlli().is_bound()) {
  single_value->field_tlli = other_value.tlli();
} else {
  single_value->field_tlli.clean_up();
}
if (other_value.tlli__old().is_bound()) {
  if (other_value.tlli__old().ispresent()) single_value->field_tlli__old = other_value.tlli__old()();
  else single_value->field_tlli__old = OMIT_VALUE;
} else {
  single_value->field_tlli__old.clean_up();
}
if (other_value.ra().is_bound()) {
  if (other_value.ra().ispresent()) single_value->field_ra = other_value.ra()();
  else single_value->field_ra = OMIT_VALUE;
} else {
  single_value->field_ra.clean_up();
}
if (other_value.pcu().is_bound()) {
  single_value->field_pcu = other_value.pcu();
} else {
  single_value->field_pcu.clean_up();
}
if (other_value.sgsn().is_bound()) {
  single_value->field_sgsn = other_value.sgsn();
} else {
  single_value->field_sgsn.clean_up();
}
if (other_value.sgsn__idx().is_bound()) {
  single_value->field_sgsn__idx = other_value.sgsn__idx();
} else {
  single_value->field_sgsn__idx.clean_up();
}
if (other_value.t__guard().is_bound()) {
  single_value->field_t__guard = other_value.t__guard();
} else {
  single_value->field_t__guard.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BSSGP__ConnHdlrPars_template::copy_template(const BSSGP__ConnHdlrPars_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.imei().get_selection()) {
single_value->field_imei = other_value.imei();
} else {
single_value->field_imei.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.imsi().get_selection()) {
single_value->field_imsi = other_value.imsi();
} else {
single_value->field_imsi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.msisdn().get_selection()) {
single_value->field_msisdn = other_value.msisdn();
} else {
single_value->field_msisdn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p__tmsi().get_selection()) {
single_value->field_p__tmsi = other_value.p__tmsi();
} else {
single_value->field_p__tmsi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p__tmsi__sig().get_selection()) {
single_value->field_p__tmsi__sig = other_value.p__tmsi__sig();
} else {
single_value->field_p__tmsi__sig.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tlli().get_selection()) {
single_value->field_tlli = other_value.tlli();
} else {
single_value->field_tlli.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tlli__old().get_selection()) {
single_value->field_tlli__old = other_value.tlli__old();
} else {
single_value->field_tlli__old.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ra().get_selection()) {
single_value->field_ra = other_value.ra();
} else {
single_value->field_ra.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pcu().get_selection()) {
single_value->field_pcu = other_value.pcu();
} else {
single_value->field_pcu.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sgsn().get_selection()) {
single_value->field_sgsn = other_value.sgsn();
} else {
single_value->field_sgsn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sgsn__idx().get_selection()) {
single_value->field_sgsn__idx = other_value.sgsn__idx();
} else {
single_value->field_sgsn__idx.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t__guard().get_selection()) {
single_value->field_t__guard = other_value.t__guard();
} else {
single_value->field_t__guard.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new BSSGP__ConnHdlrPars_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new BSSGP__ConnHdlrPars_template(*other_value.implication_.precondition);
implication_.implied_template = new BSSGP__ConnHdlrPars_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
break;
}
set_selection(other_value);
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template()
{
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(const BSSGP__ConnHdlrPars& other_value)
{
copy_value(other_value);
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(const OPTIONAL<BSSGP__ConnHdlrPars>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BSSGP__ConnHdlrPars&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars from an unbound optional field.");
}
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(BSSGP__ConnHdlrPars_template* p_precondition, BSSGP__ConnHdlrPars_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(Dynamic_Match_Interface<BSSGP__ConnHdlrPars>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<BSSGP__ConnHdlrPars>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

BSSGP__ConnHdlrPars_template::BSSGP__ConnHdlrPars_template(const BSSGP__ConnHdlrPars_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

BSSGP__ConnHdlrPars_template::~BSSGP__ConnHdlrPars_template()
{
clean_up();
}

BSSGP__ConnHdlrPars_template& BSSGP__ConnHdlrPars_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

BSSGP__ConnHdlrPars_template& BSSGP__ConnHdlrPars_template::operator=(const BSSGP__ConnHdlrPars& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

BSSGP__ConnHdlrPars_template& BSSGP__ConnHdlrPars_template::operator=(const OPTIONAL<BSSGP__ConnHdlrPars>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const BSSGP__ConnHdlrPars&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
}
return *this;
}

BSSGP__ConnHdlrPars_template& BSSGP__ConnHdlrPars_template::operator=(const BSSGP__ConnHdlrPars_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean BSSGP__ConnHdlrPars_template::match(const BSSGP__ConnHdlrPars& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.imei().is_bound()) return FALSE;
if(!single_value->field_imei.match(other_value.imei(), legacy))return FALSE;
if(!other_value.imsi().is_bound()) return FALSE;
if(!single_value->field_imsi.match(other_value.imsi(), legacy))return FALSE;
if(!other_value.msisdn().is_bound()) return FALSE;
if(!single_value->field_msisdn.match(other_value.msisdn(), legacy))return FALSE;
if(!other_value.p__tmsi().is_bound()) return FALSE;
if((other_value.p__tmsi().ispresent() ? !single_value->field_p__tmsi.match((const OCTETSTRING&)other_value.p__tmsi(), legacy) : !single_value->field_p__tmsi.match_omit(legacy)))return FALSE;
if(!other_value.p__tmsi__sig().is_bound()) return FALSE;
if((other_value.p__tmsi__sig().ispresent() ? !single_value->field_p__tmsi__sig.match((const OCTETSTRING&)other_value.p__tmsi__sig(), legacy) : !single_value->field_p__tmsi__sig.match_omit(legacy)))return FALSE;
if(!other_value.tlli().is_bound()) return FALSE;
if(!single_value->field_tlli.match(other_value.tlli(), legacy))return FALSE;
if(!other_value.tlli__old().is_bound()) return FALSE;
if((other_value.tlli__old().ispresent() ? !single_value->field_tlli__old.match((const OCTETSTRING&)other_value.tlli__old(), legacy) : !single_value->field_tlli__old.match_omit(legacy)))return FALSE;
if(!other_value.ra().is_bound()) return FALSE;
if((other_value.ra().ispresent() ? !single_value->field_ra.match((const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV&)other_value.ra(), legacy) : !single_value->field_ra.match_omit(legacy)))return FALSE;
if(!other_value.pcu().is_bound()) return FALSE;
if(!single_value->field_pcu.match(other_value.pcu(), legacy))return FALSE;
if(!other_value.sgsn().is_bound()) return FALSE;
if(!single_value->field_sgsn.match(other_value.sgsn(), legacy))return FALSE;
if(!other_value.sgsn__idx().is_bound()) return FALSE;
if(!single_value->field_sgsn__idx.match(other_value.sgsn__idx(), legacy))return FALSE;
if(!other_value.t__guard().is_bound()) return FALSE;
if(!single_value->field_t__guard.match(other_value.t__guard(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
}
return FALSE;
}

boolean BSSGP__ConnHdlrPars_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_imei.is_bound()
 || single_value->field_imsi.is_bound()
 || single_value->field_msisdn.is_bound()
 || (single_value->field_p__tmsi.is_omit() || single_value->field_p__tmsi.is_bound())
 || (single_value->field_p__tmsi__sig.is_omit() || single_value->field_p__tmsi__sig.is_bound())
 || single_value->field_tlli.is_bound()
 || (single_value->field_tlli__old.is_omit() || single_value->field_tlli__old.is_bound())
 || (single_value->field_ra.is_omit() || single_value->field_ra.is_bound())
 || single_value->field_pcu.is_bound()
 || single_value->field_sgsn.is_bound()
 || single_value->field_sgsn__idx.is_bound()
 || single_value->field_t__guard.is_bound();
}

boolean BSSGP__ConnHdlrPars_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_imei.is_value()
 && single_value->field_imsi.is_value()
 && single_value->field_msisdn.is_value()
 && (single_value->field_p__tmsi.is_omit() || single_value->field_p__tmsi.is_value())
 && (single_value->field_p__tmsi__sig.is_omit() || single_value->field_p__tmsi__sig.is_value())
 && single_value->field_tlli.is_value()
 && (single_value->field_tlli__old.is_omit() || single_value->field_tlli__old.is_value())
 && (single_value->field_ra.is_omit() || single_value->field_ra.is_value())
 && single_value->field_pcu.is_value()
 && single_value->field_sgsn.is_value()
 && single_value->field_sgsn__idx.is_value()
 && single_value->field_t__guard.is_value();
}

void BSSGP__ConnHdlrPars_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

BSSGP__ConnHdlrPars BSSGP__ConnHdlrPars_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
BSSGP__ConnHdlrPars ret_val;
if (single_value->field_imei.is_bound()) {
ret_val.imei() = single_value->field_imei.valueof();
}
if (single_value->field_imsi.is_bound()) {
ret_val.imsi() = single_value->field_imsi.valueof();
}
if (single_value->field_msisdn.is_bound()) {
ret_val.msisdn() = single_value->field_msisdn.valueof();
}
if (single_value->field_p__tmsi.is_omit()) ret_val.p__tmsi() = OMIT_VALUE;
else if (single_value->field_p__tmsi.is_bound()) {
ret_val.p__tmsi() = single_value->field_p__tmsi.valueof();
}
if (single_value->field_p__tmsi__sig.is_omit()) ret_val.p__tmsi__sig() = OMIT_VALUE;
else if (single_value->field_p__tmsi__sig.is_bound()) {
ret_val.p__tmsi__sig() = single_value->field_p__tmsi__sig.valueof();
}
if (single_value->field_tlli.is_bound()) {
ret_val.tlli() = single_value->field_tlli.valueof();
}
if (single_value->field_tlli__old.is_omit()) ret_val.tlli__old() = OMIT_VALUE;
else if (single_value->field_tlli__old.is_bound()) {
ret_val.tlli__old() = single_value->field_tlli__old.valueof();
}
if (single_value->field_ra.is_omit()) ret_val.ra() = OMIT_VALUE;
else if (single_value->field_ra.is_bound()) {
ret_val.ra() = single_value->field_ra.valueof();
}
if (single_value->field_pcu.is_bound()) {
ret_val.pcu() = single_value->field_pcu.valueof();
}
if (single_value->field_sgsn.is_bound()) {
ret_val.sgsn() = single_value->field_sgsn.valueof();
}
if (single_value->field_sgsn__idx.is_bound()) {
ret_val.sgsn__idx() = single_value->field_sgsn__idx.valueof();
}
if (single_value->field_t__guard.is_bound()) {
ret_val.t__guard() = single_value->field_t__guard.valueof();
}
return ret_val;
}

void BSSGP__ConnHdlrPars_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BSSGP__ConnHdlrPars_template[list_length];
}

BSSGP__ConnHdlrPars_template& BSSGP__ConnHdlrPars_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return value_list.list_value[list_index];
}

HEXSTRING_template& BSSGP__ConnHdlrPars_template::imei()
{
set_specific();
return single_value->field_imei;
}

const HEXSTRING_template& BSSGP__ConnHdlrPars_template::imei() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field imei of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_imei;
}

HEXSTRING_template& BSSGP__ConnHdlrPars_template::imsi()
{
set_specific();
return single_value->field_imsi;
}

const HEXSTRING_template& BSSGP__ConnHdlrPars_template::imsi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field imsi of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_imsi;
}

HEXSTRING_template& BSSGP__ConnHdlrPars_template::msisdn()
{
set_specific();
return single_value->field_msisdn;
}

const HEXSTRING_template& BSSGP__ConnHdlrPars_template::msisdn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field msisdn of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_msisdn;
}

OCTETSTRING_template& BSSGP__ConnHdlrPars_template::p__tmsi()
{
set_specific();
return single_value->field_p__tmsi;
}

const OCTETSTRING_template& BSSGP__ConnHdlrPars_template::p__tmsi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p_tmsi of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_p__tmsi;
}

OCTETSTRING_template& BSSGP__ConnHdlrPars_template::p__tmsi__sig()
{
set_specific();
return single_value->field_p__tmsi__sig;
}

const OCTETSTRING_template& BSSGP__ConnHdlrPars_template::p__tmsi__sig() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p_tmsi_sig of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_p__tmsi__sig;
}

OCTETSTRING_template& BSSGP__ConnHdlrPars_template::tlli()
{
set_specific();
return single_value->field_tlli;
}

const OCTETSTRING_template& BSSGP__ConnHdlrPars_template::tlli() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tlli of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_tlli;
}

OCTETSTRING_template& BSSGP__ConnHdlrPars_template::tlli__old()
{
set_specific();
return single_value->field_tlli__old;
}

const OCTETSTRING_template& BSSGP__ConnHdlrPars_template::tlli__old() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tlli_old of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_tlli__old;
}

MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& BSSGP__ConnHdlrPars_template::ra()
{
set_specific();
return single_value->field_ra;
}

const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& BSSGP__ConnHdlrPars_template::ra() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ra of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_ra;
}

GbInstances_template& BSSGP__ConnHdlrPars_template::pcu()
{
set_specific();
return single_value->field_pcu;
}

const GbInstances_template& BSSGP__ConnHdlrPars_template::pcu() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pcu of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_pcu;
}

GbInstances_template& BSSGP__ConnHdlrPars_template::sgsn()
{
set_specific();
return single_value->field_sgsn;
}

const GbInstances_template& BSSGP__ConnHdlrPars_template::sgsn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sgsn of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_sgsn;
}

INTEGER_template& BSSGP__ConnHdlrPars_template::sgsn__idx()
{
set_specific();
return single_value->field_sgsn__idx;
}

const INTEGER_template& BSSGP__ConnHdlrPars_template::sgsn__idx() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sgsn_idx of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_sgsn__idx;
}

FLOAT_template& BSSGP__ConnHdlrPars_template::t__guard()
{
set_specific();
return single_value->field_t__guard;
}

const FLOAT_template& BSSGP__ConnHdlrPars_template::t__guard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t_guard of a non-specific template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
return single_value->field_t__guard;
}

int BSSGP__ConnHdlrPars_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 8;
      if (single_value->field_p__tmsi.is_present()) ret_val++;
      if (single_value->field_p__tmsi__sig.is_present()) ret_val++;
      if (single_value->field_tlli__old.is_present()) ret_val++;
      if (single_value->field_ra.is_present()) ret_val++;
      return ret_val;
    }
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
  }
  return 0;
}

void BSSGP__ConnHdlrPars_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ imei := ");
single_value->field_imei.log();
TTCN_Logger::log_event_str(", imsi := ");
single_value->field_imsi.log();
TTCN_Logger::log_event_str(", msisdn := ");
single_value->field_msisdn.log();
TTCN_Logger::log_event_str(", p_tmsi := ");
single_value->field_p__tmsi.log();
TTCN_Logger::log_event_str(", p_tmsi_sig := ");
single_value->field_p__tmsi__sig.log();
TTCN_Logger::log_event_str(", tlli := ");
single_value->field_tlli.log();
TTCN_Logger::log_event_str(", tlli_old := ");
single_value->field_tlli__old.log();
TTCN_Logger::log_event_str(", ra := ");
single_value->field_ra.log();
TTCN_Logger::log_event_str(", pcu := ");
single_value->field_pcu.log();
TTCN_Logger::log_event_str(", sgsn := ");
single_value->field_sgsn.log();
TTCN_Logger::log_event_str(", sgsn_idx := ");
single_value->field_sgsn__idx.log();
TTCN_Logger::log_event_str(", t_guard := ");
single_value->field_t__guard.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void BSSGP__ConnHdlrPars_template::log_match(const BSSGP__ConnHdlrPars& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_imei.match(match_value.imei(), legacy)){
TTCN_Logger::log_logmatch_info(".imei");
single_value->field_imei.log_match(match_value.imei(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_imsi.match(match_value.imsi(), legacy)){
TTCN_Logger::log_logmatch_info(".imsi");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_msisdn.match(match_value.msisdn(), legacy)){
TTCN_Logger::log_logmatch_info(".msisdn");
single_value->field_msisdn.log_match(match_value.msisdn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.p__tmsi().ispresent()){
if(!single_value->field_p__tmsi.match(match_value.p__tmsi(), legacy)){
TTCN_Logger::log_logmatch_info(".p_tmsi");
single_value->field_p__tmsi.log_match(match_value.p__tmsi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_p__tmsi.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".p_tmsi := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_p__tmsi.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.p__tmsi__sig().ispresent()){
if(!single_value->field_p__tmsi__sig.match(match_value.p__tmsi__sig(), legacy)){
TTCN_Logger::log_logmatch_info(".p_tmsi_sig");
single_value->field_p__tmsi__sig.log_match(match_value.p__tmsi__sig(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_p__tmsi__sig.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".p_tmsi_sig := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_p__tmsi__sig.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_tlli.match(match_value.tlli(), legacy)){
TTCN_Logger::log_logmatch_info(".tlli");
single_value->field_tlli.log_match(match_value.tlli(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.tlli__old().ispresent()){
if(!single_value->field_tlli__old.match(match_value.tlli__old(), legacy)){
TTCN_Logger::log_logmatch_info(".tlli_old");
single_value->field_tlli__old.log_match(match_value.tlli__old(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_tlli__old.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".tlli_old := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_tlli__old.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ra().ispresent()){
if(!single_value->field_ra.match(match_value.ra(), legacy)){
TTCN_Logger::log_logmatch_info(".ra");
single_value->field_ra.log_match(match_value.ra(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ra.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ra := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ra.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_pcu.match(match_value.pcu(), legacy)){
TTCN_Logger::log_logmatch_info(".pcu");
single_value->field_pcu.log_match(match_value.pcu(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sgsn.match(match_value.sgsn(), legacy)){
TTCN_Logger::log_logmatch_info(".sgsn");
single_value->field_sgsn.log_match(match_value.sgsn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sgsn__idx.match(match_value.sgsn__idx(), legacy)){
TTCN_Logger::log_logmatch_info(".sgsn_idx");
single_value->field_sgsn__idx.log_match(match_value.sgsn__idx(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t__guard.match(match_value.t__guard(), legacy)){
TTCN_Logger::log_logmatch_info(".t_guard");
single_value->field_t__guard.log_match(match_value.t__guard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ imei := ");
single_value->field_imei.log_match(match_value.imei(), legacy);
TTCN_Logger::log_event_str(", imsi := ");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::log_event_str(", msisdn := ");
single_value->field_msisdn.log_match(match_value.msisdn(), legacy);
TTCN_Logger::log_event_str(", p_tmsi := ");
if (match_value.p__tmsi().ispresent()) {
single_value->field_p__tmsi.log_match(match_value.p__tmsi(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_p__tmsi.log();
if (single_value->field_p__tmsi.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", p_tmsi_sig := ");
if (match_value.p__tmsi__sig().ispresent()) {
single_value->field_p__tmsi__sig.log_match(match_value.p__tmsi__sig(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_p__tmsi__sig.log();
if (single_value->field_p__tmsi__sig.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", tlli := ");
single_value->field_tlli.log_match(match_value.tlli(), legacy);
TTCN_Logger::log_event_str(", tlli_old := ");
if (match_value.tlli__old().ispresent()) {
single_value->field_tlli__old.log_match(match_value.tlli__old(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_tlli__old.log();
if (single_value->field_tlli__old.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ra := ");
if (match_value.ra().ispresent()) {
single_value->field_ra.log_match(match_value.ra(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ra.log();
if (single_value->field_ra.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", pcu := ");
single_value->field_pcu.log_match(match_value.pcu(), legacy);
TTCN_Logger::log_event_str(", sgsn := ");
single_value->field_sgsn.log_match(match_value.sgsn(), legacy);
TTCN_Logger::log_event_str(", sgsn_idx := ");
single_value->field_sgsn__idx.log_match(match_value.sgsn__idx(), legacy);
TTCN_Logger::log_event_str(", t_guard := ");
single_value->field_t__guard.log_match(match_value.t__guard(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void BSSGP__ConnHdlrPars_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_imei.encode_text(text_buf);
single_value->field_imsi.encode_text(text_buf);
single_value->field_msisdn.encode_text(text_buf);
single_value->field_p__tmsi.encode_text(text_buf);
single_value->field_p__tmsi__sig.encode_text(text_buf);
single_value->field_tlli.encode_text(text_buf);
single_value->field_tlli__old.encode_text(text_buf);
single_value->field_ra.encode_text(text_buf);
single_value->field_pcu.encode_text(text_buf);
single_value->field_sgsn.encode_text(text_buf);
single_value->field_sgsn__idx.encode_text(text_buf);
single_value->field_t__guard.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
}
}

void BSSGP__ConnHdlrPars_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_imei.decode_text(text_buf);
single_value->field_imsi.decode_text(text_buf);
single_value->field_msisdn.decode_text(text_buf);
single_value->field_p__tmsi.decode_text(text_buf);
single_value->field_p__tmsi__sig.decode_text(text_buf);
single_value->field_tlli.decode_text(text_buf);
single_value->field_tlli__old.decode_text(text_buf);
single_value->field_ra.decode_text(text_buf);
single_value->field_pcu.decode_text(text_buf);
single_value->field_sgsn.decode_text(text_buf);
single_value->field_sgsn__idx.decode_text(text_buf);
single_value->field_t__guard.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new BSSGP__ConnHdlrPars_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @GBProxy_Tests.BSSGP_ConnHdlrPars.");
}
}

void BSSGP__ConnHdlrPars_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    BSSGP__ConnHdlrPars_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (12<param.get_size()) {
      param.error("record template of type @GBProxy_Tests.BSSGP_ConnHdlrPars has 12 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) imei().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) imsi().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) msisdn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) p__tmsi().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) p__tmsi__sig().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) tlli().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) tlli__old().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ra().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) pcu().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) sgsn().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) sgsn__idx().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) t__guard().set_param(*param.get_elem(11));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "imei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          imei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "imsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          imsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "msisdn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msisdn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p_tmsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p__tmsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p_tmsi_sig")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p__tmsi__sig().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tlli")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tlli().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tlli_old")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tlli__old().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ra")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ra().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pcu")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pcu().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sgsn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sgsn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sgsn_idx")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sgsn__idx().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t_guard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__guard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.BSSGP_ConnHdlrPars: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BSSGP__ConnHdlrPars_template* precondition = new BSSGP__ConnHdlrPars_template;
    precondition->set_param(*param.get_elem(0));
    BSSGP__ConnHdlrPars_template* implied_template = new BSSGP__ConnHdlrPars_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BSSGP__ConnHdlrPars_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@GBProxy_Tests.BSSGP_ConnHdlrPars");
  }
  is_ifpresent = param.get_ifpresent();
}

void BSSGP__ConnHdlrPars_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_imei.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_imsi.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_msisdn.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_p__tmsi.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_p__tmsi__sig.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_tlli.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_tlli__old.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_ra.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_pcu.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_sgsn.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_sgsn__idx.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
single_value->field_t__guard.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.BSSGP_ConnHdlrPars");
}

boolean BSSGP__ConnHdlrPars_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean BSSGP__ConnHdlrPars_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

SGSN__ConnHdlrNetworkPars::SGSN__ConnHdlrNetworkPars()
{
}

SGSN__ConnHdlrNetworkPars::SGSN__ConnHdlrNetworkPars(const BOOLEAN& par_expect__ptmsi,
    const BOOLEAN& par_expect__auth,
    const BOOLEAN& par_expect__ciph)
  :   field_expect__ptmsi(par_expect__ptmsi),
  field_expect__auth(par_expect__auth),
  field_expect__ciph(par_expect__ciph)
{
}

SGSN__ConnHdlrNetworkPars::SGSN__ConnHdlrNetworkPars(const SGSN__ConnHdlrNetworkPars& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
if (other_value.expect__ptmsi().is_bound()) field_expect__ptmsi = other_value.expect__ptmsi();
else field_expect__ptmsi.clean_up();
if (other_value.expect__auth().is_bound()) field_expect__auth = other_value.expect__auth();
else field_expect__auth.clean_up();
if (other_value.expect__ciph().is_bound()) field_expect__ciph = other_value.expect__ciph();
else field_expect__ciph.clean_up();
}

void SGSN__ConnHdlrNetworkPars::clean_up()
{
field_expect__ptmsi.clean_up();
field_expect__auth.clean_up();
field_expect__ciph.clean_up();
}

const TTCN_Typedescriptor_t* SGSN__ConnHdlrNetworkPars::get_descriptor() const { return &SGSN__ConnHdlrNetworkPars_descr_; }
SGSN__ConnHdlrNetworkPars& SGSN__ConnHdlrNetworkPars::operator=(const SGSN__ConnHdlrNetworkPars& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
  if (other_value.expect__ptmsi().is_bound()) field_expect__ptmsi = other_value.expect__ptmsi();
  else field_expect__ptmsi.clean_up();
  if (other_value.expect__auth().is_bound()) field_expect__auth = other_value.expect__auth();
  else field_expect__auth.clean_up();
  if (other_value.expect__ciph().is_bound()) field_expect__ciph = other_value.expect__ciph();
  else field_expect__ciph.clean_up();
}
return *this;
}

boolean SGSN__ConnHdlrNetworkPars::operator==(const SGSN__ConnHdlrNetworkPars& other_value) const
{
return field_expect__ptmsi==other_value.field_expect__ptmsi
  && field_expect__auth==other_value.field_expect__auth
  && field_expect__ciph==other_value.field_expect__ciph;
}

boolean SGSN__ConnHdlrNetworkPars::is_bound() const
{
return (field_expect__ptmsi.is_bound())
  || (field_expect__auth.is_bound())
  || (field_expect__ciph.is_bound());
}
boolean SGSN__ConnHdlrNetworkPars::is_value() const
{
return field_expect__ptmsi.is_value()
  && field_expect__auth.is_value()
  && field_expect__ciph.is_value();
}
void SGSN__ConnHdlrNetworkPars::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ expect_ptmsi := ");
field_expect__ptmsi.log();
TTCN_Logger::log_event_str(", expect_auth := ");
field_expect__auth.log();
TTCN_Logger::log_event_str(", expect_ciph := ");
field_expect__ciph.log();
TTCN_Logger::log_event_str(" }");
}

void SGSN__ConnHdlrNetworkPars::set_implicit_omit()
{
if (expect__ptmsi().is_bound()) expect__ptmsi().set_implicit_omit();
if (expect__auth().is_bound()) expect__auth().set_implicit_omit();
if (expect__ciph().is_bound()) expect__ciph().set_implicit_omit();
}

void SGSN__ConnHdlrNetworkPars::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (3<param.get_size()) {
      param.error("record value of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars has 3 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) expect__ptmsi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) expect__auth().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) expect__ciph().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_ptmsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__ptmsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_auth")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__auth().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_ciph")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__ciph().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
  }
}

void SGSN__ConnHdlrNetworkPars::encode_text(Text_Buf& text_buf) const
{
field_expect__ptmsi.encode_text(text_buf);
field_expect__auth.encode_text(text_buf);
field_expect__ciph.encode_text(text_buf);
}

void SGSN__ConnHdlrNetworkPars::decode_text(Text_Buf& text_buf)
{
field_expect__ptmsi.decode_text(text_buf);
field_expect__auth.decode_text(text_buf);
field_expect__ciph.decode_text(text_buf);
}

struct SGSN__ConnHdlrNetworkPars_template::single_value_struct {
BOOLEAN_template field_expect__ptmsi;
BOOLEAN_template field_expect__auth;
BOOLEAN_template field_expect__ciph;
};

void SGSN__ConnHdlrNetworkPars_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_expect__ptmsi = ANY_VALUE;
single_value->field_expect__auth = ANY_VALUE;
single_value->field_expect__ciph = ANY_VALUE;
}
}
}

void SGSN__ConnHdlrNetworkPars_template::copy_value(const SGSN__ConnHdlrNetworkPars& other_value)
{
single_value = new single_value_struct;
if (other_value.expect__ptmsi().is_bound()) {
  single_value->field_expect__ptmsi = other_value.expect__ptmsi();
} else {
  single_value->field_expect__ptmsi.clean_up();
}
if (other_value.expect__auth().is_bound()) {
  single_value->field_expect__auth = other_value.expect__auth();
} else {
  single_value->field_expect__auth.clean_up();
}
if (other_value.expect__ciph().is_bound()) {
  single_value->field_expect__ciph = other_value.expect__ciph();
} else {
  single_value->field_expect__ciph.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SGSN__ConnHdlrNetworkPars_template::copy_template(const SGSN__ConnHdlrNetworkPars_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.expect__ptmsi().get_selection()) {
single_value->field_expect__ptmsi = other_value.expect__ptmsi();
} else {
single_value->field_expect__ptmsi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.expect__auth().get_selection()) {
single_value->field_expect__auth = other_value.expect__auth();
} else {
single_value->field_expect__auth.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.expect__ciph().get_selection()) {
single_value->field_expect__ciph = other_value.expect__ciph();
} else {
single_value->field_expect__ciph.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SGSN__ConnHdlrNetworkPars_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new SGSN__ConnHdlrNetworkPars_template(*other_value.implication_.precondition);
implication_.implied_template = new SGSN__ConnHdlrNetworkPars_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
break;
}
set_selection(other_value);
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template()
{
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(const SGSN__ConnHdlrNetworkPars& other_value)
{
copy_value(other_value);
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(const OPTIONAL<SGSN__ConnHdlrNetworkPars>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const SGSN__ConnHdlrNetworkPars&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars from an unbound optional field.");
}
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(SGSN__ConnHdlrNetworkPars_template* p_precondition, SGSN__ConnHdlrNetworkPars_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(Dynamic_Match_Interface<SGSN__ConnHdlrNetworkPars>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<SGSN__ConnHdlrNetworkPars>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

SGSN__ConnHdlrNetworkPars_template::SGSN__ConnHdlrNetworkPars_template(const SGSN__ConnHdlrNetworkPars_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

SGSN__ConnHdlrNetworkPars_template::~SGSN__ConnHdlrNetworkPars_template()
{
clean_up();
}

SGSN__ConnHdlrNetworkPars_template& SGSN__ConnHdlrNetworkPars_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

SGSN__ConnHdlrNetworkPars_template& SGSN__ConnHdlrNetworkPars_template::operator=(const SGSN__ConnHdlrNetworkPars& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

SGSN__ConnHdlrNetworkPars_template& SGSN__ConnHdlrNetworkPars_template::operator=(const OPTIONAL<SGSN__ConnHdlrNetworkPars>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const SGSN__ConnHdlrNetworkPars&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
}
return *this;
}

SGSN__ConnHdlrNetworkPars_template& SGSN__ConnHdlrNetworkPars_template::operator=(const SGSN__ConnHdlrNetworkPars_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean SGSN__ConnHdlrNetworkPars_template::match(const SGSN__ConnHdlrNetworkPars& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.expect__ptmsi().is_bound()) return FALSE;
if(!single_value->field_expect__ptmsi.match(other_value.expect__ptmsi(), legacy))return FALSE;
if(!other_value.expect__auth().is_bound()) return FALSE;
if(!single_value->field_expect__auth.match(other_value.expect__auth(), legacy))return FALSE;
if(!other_value.expect__ciph().is_bound()) return FALSE;
if(!single_value->field_expect__ciph.match(other_value.expect__ciph(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
}
return FALSE;
}

boolean SGSN__ConnHdlrNetworkPars_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_expect__ptmsi.is_bound()
 || single_value->field_expect__auth.is_bound()
 || single_value->field_expect__ciph.is_bound();
}

boolean SGSN__ConnHdlrNetworkPars_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_expect__ptmsi.is_value()
 && single_value->field_expect__auth.is_value()
 && single_value->field_expect__ciph.is_value();
}

void SGSN__ConnHdlrNetworkPars_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
delete single_value;
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

SGSN__ConnHdlrNetworkPars SGSN__ConnHdlrNetworkPars_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
SGSN__ConnHdlrNetworkPars ret_val;
if (single_value->field_expect__ptmsi.is_bound()) {
ret_val.expect__ptmsi() = single_value->field_expect__ptmsi.valueof();
}
if (single_value->field_expect__auth.is_bound()) {
ret_val.expect__auth() = single_value->field_expect__auth.valueof();
}
if (single_value->field_expect__ciph.is_bound()) {
ret_val.expect__ciph() = single_value->field_expect__ciph.valueof();
}
return ret_val;
}

void SGSN__ConnHdlrNetworkPars_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new SGSN__ConnHdlrNetworkPars_template[list_length];
}

SGSN__ConnHdlrNetworkPars_template& SGSN__ConnHdlrNetworkPars_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH)
TTCN_error("Accessing a list element of a non-list template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
return value_list.list_value[list_index];
}

BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__ptmsi()
{
set_specific();
return single_value->field_expect__ptmsi;
}

const BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__ptmsi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field expect_ptmsi of a non-specific template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
return single_value->field_expect__ptmsi;
}

BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__auth()
{
set_specific();
return single_value->field_expect__auth;
}

const BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__auth() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field expect_auth of a non-specific template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
return single_value->field_expect__auth;
}

BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__ciph()
{
set_specific();
return single_value->field_expect__ciph;
}

const BOOLEAN_template& SGSN__ConnHdlrNetworkPars_template::expect__ciph() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field expect_ciph of a non-specific template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
return single_value->field_expect__ciph;
}

int SGSN__ConnHdlrNetworkPars_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
    return 3;
  case VALUE_LIST:
   {
     if (value_list.n_values<1)
       TTCN_error("Internal error: Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing an empty list.");
      int item_size = value_list.list_value[0].size_of();
      for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++)
      {
        if (value_list.list_value[l_idx].size_of()!=item_size)
          TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
  }
  return 0;
}

void SGSN__ConnHdlrNetworkPars_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ expect_ptmsi := ");
single_value->field_expect__ptmsi.log();
TTCN_Logger::log_event_str(", expect_auth := ");
single_value->field_expect__auth.log();
TTCN_Logger::log_event_str(", expect_ciph := ");
single_value->field_expect__ciph.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SGSN__ConnHdlrNetworkPars_template::log_match(const SGSN__ConnHdlrNetworkPars& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_expect__ptmsi.match(match_value.expect__ptmsi(), legacy)){
TTCN_Logger::log_logmatch_info(".expect_ptmsi");
single_value->field_expect__ptmsi.log_match(match_value.expect__ptmsi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_expect__auth.match(match_value.expect__auth(), legacy)){
TTCN_Logger::log_logmatch_info(".expect_auth");
single_value->field_expect__auth.log_match(match_value.expect__auth(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_expect__ciph.match(match_value.expect__ciph(), legacy)){
TTCN_Logger::log_logmatch_info(".expect_ciph");
single_value->field_expect__ciph.log_match(match_value.expect__ciph(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ expect_ptmsi := ");
single_value->field_expect__ptmsi.log_match(match_value.expect__ptmsi(), legacy);
TTCN_Logger::log_event_str(", expect_auth := ");
single_value->field_expect__auth.log_match(match_value.expect__auth(), legacy);
TTCN_Logger::log_event_str(", expect_ciph := ");
single_value->field_expect__ciph.log_match(match_value.expect__ciph(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void SGSN__ConnHdlrNetworkPars_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_expect__ptmsi.encode_text(text_buf);
single_value->field_expect__auth.encode_text(text_buf);
single_value->field_expect__ciph.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
}
}

void SGSN__ConnHdlrNetworkPars_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_expect__ptmsi.decode_text(text_buf);
single_value->field_expect__auth.decode_text(text_buf);
single_value->field_expect__ciph.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new SGSN__ConnHdlrNetworkPars_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars.");
}
}

void SGSN__ConnHdlrNetworkPars_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    SGSN__ConnHdlrNetworkPars_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (3<param.get_size()) {
      param.error("record template of type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars has 3 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) expect__ptmsi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) expect__auth().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) expect__ciph().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_ptmsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__ptmsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_auth")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__auth().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expect_ciph")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expect__ciph().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @GBProxy_Tests.SGSN_ConnHdlrNetworkPars: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    SGSN__ConnHdlrNetworkPars_template* precondition = new SGSN__ConnHdlrNetworkPars_template;
    precondition->set_param(*param.get_elem(0));
    SGSN__ConnHdlrNetworkPars_template* implied_template = new SGSN__ConnHdlrNetworkPars_template;
    implied_template->set_param(*param.get_elem(1));
    *this = SGSN__ConnHdlrNetworkPars_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
  }
  is_ifpresent = param.get_ifpresent();
}

void SGSN__ConnHdlrNetworkPars_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_expect__ptmsi.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
single_value->field_expect__auth.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
single_value->field_expect__ciph.check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.SGSN_ConnHdlrNetworkPars");
}

boolean SGSN__ConnHdlrNetworkPars_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean SGSN__ConnHdlrNetworkPars_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

as__count__unblocked4nse_Default::as__count__unblocked4nse_Default(const INTEGER& sgsn__idx, Osmocom__Types::roro__integer& bvci__unblocked)
 : Default_Base("as_count_unblocked4nse"), par_sgsn__idx(sgsn__idx), par_bvci__unblocked(bvci__unblocked)
{
}

alt_status as__count__unblocked4nse_Default::call_altstep()
{
return as__count__unblocked4nse_instance(par_sgsn__idx, par_bvci__unblocked);
}

void__fn::void__fn()
{
referred_function = NULL;
}

void__fn::void__fn(function_pointer other_value)
{
referred_function = other_value;
}

void__fn::void__fn(const void__fn& other_value)
: Base_Type(){
other_value.must_bound("Copying an unbound @GBProxy_Tests.void_fn value.");
referred_function = other_value.referred_function;
}

void__fn& void__fn::operator=(function_pointer other_value)
{
referred_function = other_value;
return *this;
}

void__fn& void__fn::operator=(const void__fn& other_value)
{
other_value.must_bound("Assignment of an unbound value.");
referred_function = other_value.referred_function;
return *this;
}

boolean void__fn::operator==(function_pointer other_value) const
{
must_bound("Unbound left operand of @GBProxy_Tests.void_fn comparison.");
return referred_function == other_value;
}

boolean void__fn::operator==(const void__fn& other_value) const
{
must_bound("Unbound left operand of @GBProxy_Tests.void_fn comparison.");
other_value.must_bound("Unbound right operand of @GBProxy_Tests.void_fn comparison.");
return referred_function == other_value.referred_function;
}

void void__fn::invoke(const CHARSTRING& id) const
{
must_bound("Call of unbound function.");
if(referred_function == (void__fn::function_pointer)Module_List::get_fat_null())
TTCN_error("null reference cannot be invoked.");
referred_function(id);
}

void void__fn::start(const COMPONENT& component_reference, const CHARSTRING& id) const
{
((void__fn::start_pointer)Module_List::lookup_start_by_function_address((genericfunc_t)referred_function))(component_reference, id);
}

void void__fn::log() const
{
Module_List::log_function((genericfunc_t)referred_function);
}

void void__fn::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

void void__fn::encode_text(Text_Buf& text_buf) const
{
Module_List::encode_function(text_buf,(genericfunc_t)referred_function);
}

void void__fn::decode_text(Text_Buf& text_buf)
{
Module_List::decode_function(text_buf,(genericfunc_t*)&referred_function);
}

boolean operator==(void__fn::function_pointer value, const void__fn& other_value)
{
other_value.must_bound("Unbound right operand of @GBProxy_Tests.void_fn comparison.");
return value == other_value.referred_function;
}

void void__fn_template::copy_template(const void__fn_template& other_value)
{
switch(other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new void__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i] = other_value.value_list.list_value[i];
break;
default:
TTCN_error("Copying an unitialized/unsupported @GBProxy_Tests.void_fn template.");
}
set_selection(other_value);
}

void__fn_template::void__fn_template()
{
}

void__fn_template::void__fn_template(template_sel other_value)
  : Base_Template(other_value)
{
check_single_selection(other_value);
}

void__fn_template::void__fn_template(void__fn::function_pointer other_value)
  : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

void__fn_template::void__fn_template(const void__fn& other_value)
  :Base_Template(SPECIFIC_VALUE)
{
other_value.must_bound("Creating a template from an unbound @GBProxy_Tests.void_fn value.");
single_value = other_value.referred_function;
}

void__fn_template::void__fn_template(const OPTIONAL<void__fn>& other_value)
{
if(other_value.ispresent()) {
set_selection(SPECIFIC_VALUE);
single_value = ((const void__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
}

void__fn_template::void__fn_template(const void__fn_template& other_value)
  :Base_Template()
{
copy_template(other_value);
}

void__fn_template::~void__fn_template()
{
  clean_up();
}

void void__fn_template::clean_up(){
if(template_selection == VALUE_LIST ||
template_selection == COMPLEMENTED_LIST)
delete[] value_list.list_value;
template_selection = UNINITIALIZED_TEMPLATE;
}

void__fn_template& void__fn_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

void__fn_template& void__fn_template::operator=(void__fn::function_pointer other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;}

void__fn_template& void__fn_template::operator=(const void__fn& other_value)
{
other_value.must_bound("Assignment of an unbound @GBProxy_Tests.void_fn value to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.referred_function;
return *this;
}

void__fn_template& void__fn_template::operator=(const OPTIONAL<void__fn>& other_value)
{
clean_up();
if(other_value.ispresent()) { 
set_selection(SPECIFIC_VALUE);
single_value = ((const void__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
return *this;}

void__fn_template& void__fn_template::operator=(const void__fn_template& other_value)
{
if(&other_value != this) {
clean_up();copy_template(other_value);
}
return *this;
}

boolean void__fn_template::match(void__fn::function_pointer other_value, boolean) const
{
switch(template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for(unsigned int i = 0; i < value_list.n_values; i++)
if(value_list.list_value[i].match(other_value))
return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
default:
TTCN_error("Matching with an unitialized/unsupported @GBProxy_Tests.void_fn template.");
};
return FALSE;
}

boolean void__fn_template::match(const void__fn& other_value, boolean) const
{
  if (!other_value.is_bound()) return FALSE;
return match(other_value.referred_function);
}

void__fn void__fn_template::valueof() const
{
if(template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific @GBProxy_Tests.void_fn template.");
return single_value;
}

void void__fn_template::set_type(template_sel template_type, unsigned int list_length)
{
if(template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
TTCN_error("Setting an invalid type for an @GBProxy_Tests.void_fn template.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new void__fn_template[list_length];
}

void__fn_template& void__fn_template::list_item(unsigned int list_index) const
{
if(template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
TTCN_error("Accessing a list element of a non-list template of type @GBProxy_Tests.void_fn");
if(list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @GBProxy_Tests.void_fn.");
return value_list.list_value[list_index];
}

void void__fn_template::log() const
{
switch(template_selection) {
case SPECIFIC_VALUE:
Module_List::log_function((genericfunc_t)single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case VALUE_LIST:
TTCN_Logger::log_char('(');
for(unsigned int i = 0; i < value_list.n_values; i++) {
if(i > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[i].log();
}
TTCN_Logger::log_char(')');
break;
default:
log_generic();
}
log_ifpresent();
}

void void__fn_template::log_match(const void__fn& match_value, boolean legacy) const
{
log();
TTCN_Logger::log_event_str(" with ");
match_value.log();
if(match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void void__fn_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch(template_selection) {
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case SPECIFIC_VALUE:
Module_List::encode_function(text_buf, (genericfunc_t)single_value);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.void_fn.");
}
}

void void__fn_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch(template_selection) {
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case SPECIFIC_VALUE:
Module_List::decode_function(text_buf,(genericfunc_t*)&single_value);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new void__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i].decode_text(text_buf);
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @GBProxy_Tests.void_fn.");
}
}

boolean void__fn_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean void__fn_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void void__fn_template::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

void void__fn_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.void_fn");
}

as__gTguard_Default::as__gTguard_Default(TIMER& Tguard)
 : Default_Base("as_gTguard"), par_Tguard(Tguard)
{
}

alt_status as__gTguard_Default::call_altstep()
{
return as__gTguard_instance(par_Tguard);
}

as__NsUdiCount_Default::as__NsUdiCount_Default(const INTEGER& nsvc__idx, Osmocom__Types::ro__integer& roi)
 : Default_Base("as_NsUdiCount"), par_nsvc__idx(nsvc__idx), par_roi(roi)
{
}

alt_status as__NsUdiCount_Default::call_altstep()
{
return as__NsUdiCount_instance(par_nsvc__idx, par_roi);
}

as__paging__sig__pcu_Default::as__paging__sig__pcu_Default(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
 : Default_Base("as_paging_sig_pcu"), par_pcu__idx(pcu__idx), par_exp__rx(exp__rx), par_roi(roi)
{
}

alt_status as__paging__sig__pcu_Default::call_altstep()
{
return as__paging__sig__pcu_instance(par_pcu__idx, par_exp__rx, par_roi);
}


const DEFAULT ro__default::UNBOUND_ELEM;
ro__default::ro__default()
{
val_ptr = NULL;
}

ro__default::ro__default(null_type)
{
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
}

ro__default::ro__default(const ro__default& other_value)
{
if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @GBProxy_Tests.ro_default.");
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}

ro__default::~ro__default()
{
clean_up();
if (val_ptr != NULL) val_ptr = NULL;
}

void ro__default::clean_up()
{
if (val_ptr != NULL) {
if (val_ptr->ref_count > 1) {
val_ptr->ref_count--;
val_ptr = NULL;
}
else if (val_ptr->ref_count == 1) {
for (int elem_count = 0; elem_count < val_ptr->n_elements;
elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)
delete val_ptr->value_elements[elem_count];
free_pointers((void**)val_ptr->value_elements);
delete val_ptr;
val_ptr = NULL;
}
else
TTCN_error("Internal error: Invalid reference counter in a record of/set of value.");
}
}

ro__default& ro__default::operator=(null_type)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
return *this;
}

ro__default& ro__default::operator=(const ro__default& other_value)
{
if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @GBProxy_Tests.ro_default.");
if (this != &other_value) {
clean_up();
val_ptr = other_value.val_ptr;
val_ptr->ref_count++;
}
return *this;
}

boolean ro__default::operator==(null_type) const
{
if (val_ptr == NULL)
TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.ro_default.");
return val_ptr->n_elements == 0 ;
}

boolean ro__default::operator==(const ro__default& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @GBProxy_Tests.ro_default.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.ro_default.");
if (val_ptr == other_value.val_ptr) return TRUE;
if (val_ptr->n_elements != (other_value.val_ptr)->n_elements)
return FALSE;
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
if ((other_value.val_ptr)->value_elements[elem_count] != NULL){
  if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE;
} else return FALSE;
} else {
if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE;
}
}
return TRUE;
}

DEFAULT& ro__default::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.ro_default using a negative index: %d.", index_value);
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements;
new_val_ptr->value_elements = (DEFAULT**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new DEFAULT(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (index_value >= val_ptr->n_elements) set_size(index_value + 1);
if (val_ptr->value_elements[index_value] == NULL) {
val_ptr->value_elements[index_value] = new DEFAULT;
}
return *val_ptr->value_elements[index_value];
}

DEFAULT& ro__default::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.ro_default.");
return (*this)[(int)index_value];
}

const DEFAULT& ro__default::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @GBProxy_Tests.ro_default.");
if (index_value < 0) TTCN_error("Accessing an element of type @GBProxy_Tests.ro_default using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @GBProxy_Tests.ro_default: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements);
return (val_ptr->value_elements[index_value] == NULL) ?
UNBOUND_ELEM : *val_ptr->value_elements[index_value];
}

const DEFAULT& ro__default::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @GBProxy_Tests.ro_default.");
return (*this)[(int)index_value];
}

ro__default ro__default::operator<<=(int rotate_count) const
{
return *this >>= (-rotate_count);
}

ro__default ro__default::operator<<=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate left operator.");
return *this >>= (int)(-rotate_count);
}

ro__default ro__default::operator>>=(const INTEGER& rotate_count) const
{
rotate_count.must_bound("Unbound integer operand of rotate right operator.");
return *this >>= (int)rotate_count;
}

ro__default ro__default::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @GBProxy_Tests.ro_default.");
if (val_ptr->n_elements == 0) return *this;
int rc;
if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements;
else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements);
if (rc == 0) return *this;
ro__default ret_val;
ret_val.set_size(val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new DEFAULT(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

ro__default ro__default::operator+(const ro__default& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @GBProxy_Tests.ro_default concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
ro__default ret_val;
ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements);
for (int i=0; i<val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new DEFAULT(*val_ptr->value_elements[i]);
}
}
for (int i=0; i<other_value.val_ptr->n_elements; i++) {
if (other_value.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new DEFAULT(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

ro__default ro__default::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @GBProxy_Tests.ro_default.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@GBProxy_Tests.ro_default","element");
ro__default ret_val;
ret_val.set_size(returncount);
for (int i=0; i<returncount; i++) {
if (val_ptr->value_elements[i+index] != NULL) {
ret_val.val_ptr->value_elements[i] = new DEFAULT(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

ro__default ro__default::replace(int index, int len, const ro__default& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @GBProxy_Tests.ro_default.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @GBProxy_Tests.ro_default.");
check_replace_arguments(val_ptr->n_elements, index, len, "@GBProxy_Tests.ro_default","element");
ro__default ret_val;
ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len);
for (int i = 0; i < index; i++) {
if (val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i] = new DEFAULT(*val_ptr->value_elements[i]);
}
}
for (int i = 0; i < repl.val_ptr->n_elements; i++) {
if (repl.val_ptr->value_elements[i] != NULL) {
ret_val.val_ptr->value_elements[i+index] = new DEFAULT(*repl.val_ptr->value_elements[i]);
}
}
for (int i = 0; i < val_ptr->n_elements - index - len; i++) {
if (val_ptr->value_elements[index+i+len] != NULL) {
ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new DEFAULT(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

ro__default ro__default::replace(int index, int len, const ro__default_template& repl) const
{
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return replace(index, len, repl.valueof());
}

void ro__default::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @GBProxy_Tests.ro_default.");
if (val_ptr == NULL) {
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = 0;
val_ptr->value_elements = NULL;
} else if (val_ptr->ref_count > 1) {
struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct;
new_val_ptr->ref_count = 1;
new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements;
new_val_ptr->value_elements = (DEFAULT**)allocate_pointers(new_val_ptr->n_elements);
for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) {
if (val_ptr->value_elements[elem_count] != NULL){
new_val_ptr->value_elements[elem_count] = new DEFAULT(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (DEFAULT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
#ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF
if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @GBProxy_Tests.ro_default: %d",new_size);
#endif
val_ptr->n_elements = new_size;
} else if (new_size < val_ptr->n_elements) {
for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++)
if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count];
val_ptr->value_elements = (DEFAULT**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean ro__default::is_value() const
{
if (val_ptr == NULL) return FALSE;
for(int i = 0; i < val_ptr->n_elements; ++i) {
if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE;
}
return TRUE;
}

int ro__default::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @GBProxy_Tests.ro_default.");
return val_ptr->n_elements;
}

int ro__default::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @GBProxy_Tests.ro_default.");
for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length;
return 0;
}

void ro__default::log() const
{
if (val_ptr == NULL) {;
TTCN_Logger::log_event_unbound();
return;
}
switch (val_ptr->n_elements) {
case 0:
TTCN_Logger::log_event_str("{ }");
break;
default:
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
(*this)[elem_count].log();
}
TTCN_Logger::log_event_str(" }");
}
}

void ro__default::set_implicit_omit()
{
if (val_ptr == NULL) return;
for (int i = 0; i < val_ptr->n_elements; i++) {
if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit();
}
}

void ro__default::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.ro_default");
    }
    break;
  case Module_Param::OT_CONCAT:
    switch (param.get_type()) {
    case Module_Param::MP_Value_List: {
      if (!is_bound()) *this = NULL_VALUE;
      int start_idx = lengthof();
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if ((curr->get_type()!=Module_Param::MP_NotUsed)) {
          (*this)[start_idx+(int)i].set_param(*curr);
        }
      }
    } break;
    case Module_Param::MP_Indexed_List:
      param.error("Cannot concatenate an indexed value list");
      break;
    default:
      param.type_error("record of value", "@GBProxy_Tests.ro_default");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void ro__default::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @GBProxy_Tests.ro_default.");
text_buf.push_int(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++)
(*this)[elem_count].encode_text(text_buf);
}

void ro__default::decode_text(Text_Buf& text_buf)
{
clean_up();
val_ptr = new recordof_setof_struct;
val_ptr->ref_count = 1;
val_ptr->n_elements = text_buf.pull_int().get_val();
if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @GBProxy_Tests.ro_default.");
val_ptr->value_elements = (DEFAULT**)allocate_pointers(val_ptr->n_elements);
for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) {
val_ptr->value_elements[elem_count] = new DEFAULT;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void ro__default_template::copy_value(const ro__default& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @GBProxy_Tests.ro_default with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (DEFAULT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (other_value[elem_count].is_bound()) {
single_value.value_elements[elem_count] = new DEFAULT_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new DEFAULT_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void ro__default_template::copy_template(const ro__default_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (DEFAULT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new DEFAULT_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new DEFAULT_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ro__default_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ro__default_template(*other_value.implication_.precondition);
implication_.implied_template = new ro__default_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @GBProxy_Tests.ro_default.");
break;
}
set_selection(other_value);
}

boolean ro__default_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy)
{
if (value_index >= 0) return ((const ro__default_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const ro__default*)value_ptr)[value_index], legacy);
else return ((const ro__default_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

ro__default_template::ro__default_template()
{
}

ro__default_template::ro__default_template(template_sel other_value)
 : Base_Record_Of_Template(other_value)
{
check_single_selection(other_value);
}

ro__default_template::ro__default_template(null_type)
 : Base_Record_Of_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

ro__default_template::ro__default_template(const ro__default& other_value)
{
copy_value(other_value);
}

ro__default_template::ro__default_template(const OPTIONAL<ro__default>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ro__default&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @GBProxy_Tests.ro_default from an unbound optional field.");
}
}

ro__default_template::ro__default_template(ro__default_template* p_precondition, ro__default_template* p_implied_template)
 : Base_Record_Of_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

ro__default_template::ro__default_template(Dynamic_Match_Interface<ro__default>* p_dyn_match)
 : Base_Record_Of_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<ro__default>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

ro__default_template::ro__default_template(const ro__default_template& other_value)
 : Base_Record_Of_Template()
{
copy_template(other_value);
}

ro__default_template::~ro__default_template()
{
clean_up();
}

void ro__default_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
free_pointers((void**)single_value.value_elements);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

ro__default_template& ro__default_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

ro__default_template& ro__default_template::operator=(null_type)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
return *this;
}

ro__default_template& ro__default_template::operator=(const ro__default& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

ro__default_template& ro__default_template::operator=(const OPTIONAL<ro__default>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const ro__default&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @GBProxy_Tests.ro_default.");
}
return *this;
}

ro__default_template& ro__default_template::operator=(const ro__default_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

DEFAULT_template& ro__default_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.ro_default using a negative index: %d.", index_value);
switch (template_selection)
{
  case SPECIFIC_VALUE:
    if(index_value < single_value.n_elements) break;
    // no break
  case OMIT_VALUE:
  case ANY_VALUE:
  case ANY_OR_OMIT:
  case UNINITIALIZED_TEMPLATE:
    set_size(index_value + 1);
    break;
  default:
    TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.ro_default.");
    break;
}
return *single_value.value_elements[index_value];
}

DEFAULT_template& ro__default_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.ro_default.");
return (*this)[(int)index_value];
}

const DEFAULT_template& ro__default_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @GBProxy_Tests.ro_default using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @GBProxy_Tests.ro_default.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @GBProxy_Tests.ro_default: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements);
return *single_value.value_elements[index_value];
}

const DEFAULT_template& ro__default_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @GBProxy_Tests.ro_default.");
return (*this)[(int)index_value];
}

void ro__default_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @GBProxy_Tests.ro_default.");
template_sel old_selection = template_selection;
if (old_selection != SPECIFIC_VALUE) {
clean_up();
set_selection(SPECIFIC_VALUE);
single_value.n_elements = 0;
single_value.value_elements = NULL;
}
if (new_size > single_value.n_elements) {
single_value.value_elements = (DEFAULT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new DEFAULT_template(ANY_VALUE);
} else {
for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++)
single_value.value_elements[elem_count] = new DEFAULT_template;
}
single_value.n_elements = new_size;
} else if (new_size < single_value.n_elements) {
for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++)
delete single_value.value_elements[elem_count];
single_value.value_elements = (DEFAULT_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int ro__default_template::n_elem() const
{
  switch (template_selection) {
  case SPECIFIC_VALUE:
    return single_value.n_elements;
    break;
  case VALUE_LIST:
    return value_list.n_values;
    break;
  default:
    TTCN_error("Performing n_elem");
  }
}

int ro__default_template::size_of(boolean is_size) const
{
const char* op_name = is_size ? "size" : "length";
int min_size;
boolean has_any_or_none;
if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default which has an ifpresent attribute.", op_name);
switch (template_selection)
{
case SPECIFIC_VALUE: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = single_value.n_elements;
  if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (single_value.value_elements[i]->get_selection()) {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default containing omit value.", op_name);
case ANY_VALUE:
case ANY_OR_OMIT:
  min_size = 0;
  has_any_or_none = TRUE;
  break;
case VALUE_LIST:
{
  if (value_list.n_values<1)
    TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default containing an empty list.", op_name);
  int item_size = value_list.list_value[0].size_of(is_size);
  for (unsigned int i = 1; i < value_list.n_values; i++) {
    if (value_list.list_value[i].size_of(is_size)!=item_size)
      TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default containing a value list with different sizes.", op_name);
  }
  min_size = item_size;
  has_any_or_none = FALSE;
  break;
}
case COMPLEMENTED_LIST:
  TTCN_error("Performing %sof() operation on a template of type @GBProxy_Tests.ro_default containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @GBProxy_Tests.ro_default.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @GBProxy_Tests.ro_default");
}

boolean ro__default_template::match(const ro__default& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
int value_length = other_value.size_of();
if (!match_length(value_length)) return FALSE;
switch (template_selection) {
case SPECIFIC_VALUE:
return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @GBProxy_Tests.ro_default.");
}
return FALSE;
}

boolean ro__default_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (!single_value.value_elements[elem_count]->is_value()) return FALSE;
return TRUE;
}

ro__default ro__default_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @GBProxy_Tests.ro_default.");
ro__default ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

ro__default ro__default_template::substr(int index, int returncount) const
{
if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value.");
return valueof().substr(index, returncount);
}

ro__default ro__default_template::replace(int index, int len, const ro__default_template& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl.valueof());
}

ro__default ro__default_template::replace(int index, int len, const ro__default& repl) const
{
if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value.");
return valueof().replace(index, len, repl);
}

void ro__default_template::set_type(template_sel template_type, unsigned int list_length)
{
clean_up();
switch (template_type) {
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = list_length;
value_list.list_value = new ro__default_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @GBProxy_Tests.ro_default.");
}
set_selection(template_type);
}

ro__default_template& ro__default_template::list_item(unsigned int list_index)
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @GBProxy_Tests.ro_default.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @GBProxy_Tests.ro_default.");
return value_list.list_value[list_index];
}

void ro__default_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.n_elements > 0) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation(");
single_value.value_elements[elem_count]->log();
if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')');
}
TTCN_Logger::log_event_str(" }");
} else TTCN_Logger::log_event_str("{ }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_restricted();
log_ifpresent();
}

void ro__default_template::log_match(const ro__default& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
}else{
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){
TTCN_Logger::log_logmatch_info("[%d]", elem_count);
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
log_match_length(single_value.n_elements);
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) {
TTCN_Logger::log_event_str("{ ");
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (elem_count > 0) TTCN_Logger::log_event_str(", ");
single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy);
}
TTCN_Logger::log_event_str(" }");
log_match_length(single_value.n_elements);
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ro__default_template::encode_text(Text_Buf& text_buf) const
{
encode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
single_value.value_elements[elem_count]->encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.ro_default.");
}
}

void ro__default_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @GBProxy_Tests.ro_default.");
single_value.value_elements = (DEFAULT_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
single_value.value_elements[elem_count] = new DEFAULT_template;
single_value.value_elements[elem_count]->decode_text(text_buf);
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new ro__default_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @GBProxy_Tests.ro_default.");
}
}

boolean ro__default_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean ro__default_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void ro__default_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    ro__default_template temp;
    temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = temp;
    break; }
  case Module_Param::MP_Indexed_List:
    if (template_selection!=SPECIFIC_VALUE) set_size(0);
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      (*this)[(int)(param.get_elem(p_i)->get_id()->get_index())].set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Value_List: {
    set_size(param.get_size());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ro__default_template* precondition = new ro__default_template;
    precondition->set_param(*param.get_elem(0));
    ro__default_template* implied_template = new ro__default_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ro__default_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@GBProxy_Tests.ro_default");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void ro__default_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@GBProxy_Tests.ro_default");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.ro_default");
}

boolean ro__default_template::get_istemplate_kind(const char* type) const {
if (!strcmp(type, "AnyElement")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_VALUE) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "AnyElementsOrNone")) {
  if (template_selection != SPECIFIC_VALUE) {
    return FALSE;
  }
  for (int i = 0; i < single_value.n_elements; i++) {
    if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) {
      return TRUE;
    }
  }
  return FALSE;
} else if (!strcmp(type, "permutation")) {
  return number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}
as__bssgp__g__pcu__count_Default::as__bssgp__g__pcu__count_Default(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
 : Default_Base("as_bssgp_g_pcu_count"), par_pcu__idx(pcu__idx), par_exp__rx(exp__rx), par_roi(roi)
{
}

alt_status as__bssgp__g__pcu__count_Default::call_altstep()
{
return as__bssgp__g__pcu__count_instance(par_pcu__idx, par_exp__rx, par_roi);
}

as__count__bvc__reset_Default::as__count__bvc__reset_Default(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
 : Default_Base("as_count_bvc_reset"), par_sgsn__idx(sgsn__idx), par_bvci(bvci), par_roroi(roroi)
{
}

alt_status as__count__bvc__reset_Default::call_altstep()
{
return as__count__bvc__reset_instance(par_sgsn__idx, par_bvci, par_roroi);
}

as__ignore__status_Default::as__ignore__status_Default(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
 : Default_Base("as_ignore_status"), par_pt(pt)
{
}

alt_status as__ignore__status_Default::call_altstep()
{
return as__ignore__status_instance(par_pt);
}

as__count__bvc__sts_Default::as__count__bvc__sts_Default(const INTEGER& sgsn__idx, const INTEGER& bvci, const BSSGP__Emulation::BvcState_template& exp__bvc__state, Osmocom__Types::roro__integer& roroi)
 : Default_Base("as_count_bvc_sts"), par_sgsn__idx(sgsn__idx), par_bvci(bvci), par_exp__bvc__state(exp__bvc__state), par_roroi(roroi)
{
}

alt_status as__count__bvc__sts_Default::call_altstep()
{
return as__count__bvc__sts_instance(par_sgsn__idx, par_bvci, par_exp__bvc__state, par_roroi);
}

as__count__bvc__block_Default::as__count__bvc__block_Default(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
 : Default_Base("as_count_bvc_block"), par_sgsn__idx(sgsn__idx), par_bvci(bvci), par_roroi(roroi)
{
}

alt_status as__count__bvc__block_Default::call_altstep()
{
return as__count__bvc__block_instance(par_sgsn__idx, par_bvci, par_roroi);
}

as__count__bvc__unblock_Default::as__count__bvc__unblock_Default(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
 : Default_Base("as_count_bvc_unblock"), par_sgsn__idx(sgsn__idx), par_bvci(bvci), par_roroi(roroi)
{
}

alt_status as__count__bvc__unblock_Default::call_altstep()
{
return as__count__bvc__unblock_instance(par_sgsn__idx, par_bvci, par_roroi);
}

as__ignore__mgmt_Default::as__ignore__mgmt_Default(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
 : Default_Base("as_ignore_mgmt"), par_pt(pt)
{
}

alt_status as__ignore__mgmt_Default::call_altstep()
{
return as__ignore__mgmt_instance(par_pt);
}

as__count__bvc0__block_Default::as__count__bvc0__block_Default(const INTEGER& pcu__idx, const INTEGER& nsei, Osmocom__Types::ro__integer& roi)
 : Default_Base("as_count_bvc0_block"), par_pcu__idx(pcu__idx), par_nsei(nsei), par_roi(roi)
{
}

alt_status as__count__bvc0__block_Default::call_altstep()
{
return as__count__bvc0__block_instance(par_pcu__idx, par_nsei, par_roi);
}

as__g__count__sgsn_Default::as__g__count__sgsn_Default(const INTEGER& sgsn__idx, Osmocom__Types::ro__integer& roi, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const BSSGP__Types::PDU__BSSGP_template& tx__reply)
 : Default_Base("as_g_count_sgsn"), par_sgsn__idx(sgsn__idx), par_roi(roi), par_exp__rx(exp__rx), par_tx__reply(tx__reply)
{
}

alt_status as__g__count__sgsn_Default::call_altstep()
{
return as__g__count__sgsn_instance(par_sgsn__idx, par_roi, par_exp__rx, par_tx__reply);
}

rim__fn::rim__fn()
{
referred_function = NULL;
}

rim__fn::rim__fn(function_pointer other_value)
{
referred_function = other_value;
}

rim__fn::rim__fn(const rim__fn& other_value)
: Base_Type(){
other_value.must_bound("Copying an unbound @GBProxy_Tests.rim_fn value.");
referred_function = other_value.referred_function;
}

rim__fn& rim__fn::operator=(function_pointer other_value)
{
referred_function = other_value;
return *this;
}

rim__fn& rim__fn::operator=(const rim__fn& other_value)
{
other_value.must_bound("Assignment of an unbound value.");
referred_function = other_value.referred_function;
return *this;
}

boolean rim__fn::operator==(function_pointer other_value) const
{
must_bound("Unbound left operand of @GBProxy_Tests.rim_fn comparison.");
return referred_function == other_value;
}

boolean rim__fn::operator==(const rim__fn& other_value) const
{
must_bound("Unbound left operand of @GBProxy_Tests.rim_fn comparison.");
other_value.must_bound("Unbound right operand of @GBProxy_Tests.rim_fn comparison.");
return referred_function == other_value.referred_function;
}

void rim__fn::invoke(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx) const
{
must_bound("Call of unbound function.");
if(referred_function == (rim__fn::function_pointer)Module_List::get_fat_null())
TTCN_error("null reference cannot be invoked.");
referred_function(sgsn__idx, pcu__idx, bvc__idx);
}

void rim__fn::start(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx) const
{
((rim__fn::start_pointer)Module_List::lookup_start_by_function_address((genericfunc_t)referred_function))(component_reference, sgsn__idx, pcu__idx, bvc__idx);
}

void rim__fn::log() const
{
Module_List::log_function((genericfunc_t)referred_function);
}

void rim__fn::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

void rim__fn::encode_text(Text_Buf& text_buf) const
{
Module_List::encode_function(text_buf,(genericfunc_t)referred_function);
}

void rim__fn::decode_text(Text_Buf& text_buf)
{
Module_List::decode_function(text_buf,(genericfunc_t*)&referred_function);
}

boolean operator==(rim__fn::function_pointer value, const rim__fn& other_value)
{
other_value.must_bound("Unbound right operand of @GBProxy_Tests.rim_fn comparison.");
return value == other_value.referred_function;
}

void rim__fn_template::copy_template(const rim__fn_template& other_value)
{
switch(other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new rim__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i] = other_value.value_list.list_value[i];
break;
default:
TTCN_error("Copying an unitialized/unsupported @GBProxy_Tests.rim_fn template.");
}
set_selection(other_value);
}

rim__fn_template::rim__fn_template()
{
}

rim__fn_template::rim__fn_template(template_sel other_value)
  : Base_Template(other_value)
{
check_single_selection(other_value);
}

rim__fn_template::rim__fn_template(rim__fn::function_pointer other_value)
  : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

rim__fn_template::rim__fn_template(const rim__fn& other_value)
  :Base_Template(SPECIFIC_VALUE)
{
other_value.must_bound("Creating a template from an unbound @GBProxy_Tests.rim_fn value.");
single_value = other_value.referred_function;
}

rim__fn_template::rim__fn_template(const OPTIONAL<rim__fn>& other_value)
{
if(other_value.ispresent()) {
set_selection(SPECIFIC_VALUE);
single_value = ((const rim__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
}

rim__fn_template::rim__fn_template(const rim__fn_template& other_value)
  :Base_Template()
{
copy_template(other_value);
}

rim__fn_template::~rim__fn_template()
{
  clean_up();
}

void rim__fn_template::clean_up(){
if(template_selection == VALUE_LIST ||
template_selection == COMPLEMENTED_LIST)
delete[] value_list.list_value;
template_selection = UNINITIALIZED_TEMPLATE;
}

rim__fn_template& rim__fn_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

rim__fn_template& rim__fn_template::operator=(rim__fn::function_pointer other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;}

rim__fn_template& rim__fn_template::operator=(const rim__fn& other_value)
{
other_value.must_bound("Assignment of an unbound @GBProxy_Tests.rim_fn value to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.referred_function;
return *this;
}

rim__fn_template& rim__fn_template::operator=(const OPTIONAL<rim__fn>& other_value)
{
clean_up();
if(other_value.ispresent()) { 
set_selection(SPECIFIC_VALUE);
single_value = ((const rim__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
return *this;}

rim__fn_template& rim__fn_template::operator=(const rim__fn_template& other_value)
{
if(&other_value != this) {
clean_up();copy_template(other_value);
}
return *this;
}

boolean rim__fn_template::match(rim__fn::function_pointer other_value, boolean) const
{
switch(template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for(unsigned int i = 0; i < value_list.n_values; i++)
if(value_list.list_value[i].match(other_value))
return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
default:
TTCN_error("Matching with an unitialized/unsupported @GBProxy_Tests.rim_fn template.");
};
return FALSE;
}

boolean rim__fn_template::match(const rim__fn& other_value, boolean) const
{
  if (!other_value.is_bound()) return FALSE;
return match(other_value.referred_function);
}

rim__fn rim__fn_template::valueof() const
{
if(template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific @GBProxy_Tests.rim_fn template.");
return single_value;
}

void rim__fn_template::set_type(template_sel template_type, unsigned int list_length)
{
if(template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
TTCN_error("Setting an invalid type for an @GBProxy_Tests.rim_fn template.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new rim__fn_template[list_length];
}

rim__fn_template& rim__fn_template::list_item(unsigned int list_index) const
{
if(template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST)
TTCN_error("Accessing a list element of a non-list template of type @GBProxy_Tests.rim_fn");
if(list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @GBProxy_Tests.rim_fn.");
return value_list.list_value[list_index];
}

void rim__fn_template::log() const
{
switch(template_selection) {
case SPECIFIC_VALUE:
Module_List::log_function((genericfunc_t)single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case VALUE_LIST:
TTCN_Logger::log_char('(');
for(unsigned int i = 0; i < value_list.n_values; i++) {
if(i > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[i].log();
}
TTCN_Logger::log_char(')');
break;
default:
log_generic();
}
log_ifpresent();
}

void rim__fn_template::log_match(const rim__fn& match_value, boolean legacy) const
{
log();
TTCN_Logger::log_event_str(" with ");
match_value.log();
if(match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

void rim__fn_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch(template_selection) {
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case SPECIFIC_VALUE:
Module_List::encode_function(text_buf, (genericfunc_t)single_value);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @GBProxy_Tests.rim_fn.");
}
}

void rim__fn_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch(template_selection) {
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case SPECIFIC_VALUE:
Module_List::decode_function(text_buf,(genericfunc_t*)&single_value);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new rim__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i].decode_text(text_buf);
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @GBProxy_Tests.rim_fn.");
}
}

boolean rim__fn_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean rim__fn_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int i=0; i<value_list.n_values; i++)
if (value_list.list_value[i].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void rim__fn_template::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

void rim__fn_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_VALUE:
if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return;
break;
case TR_OMIT:
if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return;
break;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@GBProxy_Tests.rim_fn");
}


/* Bodies of functions, altsteps and testcases */

boolean operator==(null_type, const NSConfigurations& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.NSConfigurations.");
return other_value.val_ptr->n_elements == 0;
}

boolean operator==(null_type, const BssgpConfigs& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BssgpConfigs.");
return other_value.val_ptr->n_elements == 0;
}

boolean operator==(null_type, const BSSGP__BVC__CTs& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BSSGP_BVC_CTs.");
return other_value.val_ptr->n_elements == 0;
}

boolean operator==(null_type, const GbInstances& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.GbInstances.");
return other_value.val_ptr->n_elements == 0;
}

boolean operator==(null_type, const BssgpCellIds& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.BssgpCellIds.");
return other_value.val_ptr->n_elements == 0;
}

INTEGER get__bvc__idx__for__bvci(const GbInstance& gbi, const INTEGER& bvci)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 406, TTCN_Location::LOCATION_FUNCTION, "get_bvc_idx_for_bvci");
current_location.update_lineno(408);
/* GBProxy_Tests.ttcn, line 408 */
INTEGER i;
current_location.update_lineno(410);
/* GBProxy_Tests.ttcn, line 410 */
i = 0;
current_location.update_lineno(410);
/* GBProxy_Tests.ttcn, line 410 */
for ( ; ; ) {
current_location.update_lineno(410);
/* GBProxy_Tests.ttcn, line 410 */
if (!(i < const_cast< const GbInstance&>(gbi).cfg().bvc().lengthof())) break;
current_location.update_lineno(411);
/* GBProxy_Tests.ttcn, line 411 */
if ((const_cast< const GbInstance&>(gbi).cfg().bvc()[i].bvci() == bvci)) {
current_location.update_lineno(412);
/* GBProxy_Tests.ttcn, line 412 */
return i;
}
current_location.update_lineno(410);
/* GBProxy_Tests.ttcn, line 410 */
{
INTEGER tmp_57;
++i;
}
}
current_location.update_lineno(415);
/* GBProxy_Tests.ttcn, line 415 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Could not find BVC Index for BVCI "),bvci.log(),TTCN_Logger::end_event_log2str()));
current_location.update_lineno(416);
/* GBProxy_Tests.ttcn, line 416 */
return -1;
}

MobileL3__GMM__SM__Types::RoutingAreaIdentificationV f__cellid__to__RAI(const Osmocom__Gb__Types::BssgpCellId& cell__id)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 419, TTCN_Location::LOCATION_FUNCTION, "f_cellid_to_RAI");
current_location.update_lineno(421);
/* GBProxy_Tests.ttcn, line 421 */
HEXSTRING mcc__mnc(const_cast< const Osmocom__Gb__Types::BssgpCellId&>(cell__id).ra__id().lai().mcc__mnc());
current_location.update_lineno(423);
/* GBProxy_Tests.ttcn, line 423 */
MobileL3__GMM__SM__Types::RoutingAreaIdentificationV ret;
ret.mccDigit1() = const_cast< const HEXSTRING&>(mcc__mnc)[0];
ret.mccDigit2() = const_cast< const HEXSTRING&>(mcc__mnc)[1];
ret.mccDigit3() = const_cast< const HEXSTRING&>(mcc__mnc)[2];
ret.mncDigit3() = const_cast< const HEXSTRING&>(mcc__mnc)[3];
ret.mncDigit1() = const_cast< const HEXSTRING&>(mcc__mnc)[4];
ret.mncDigit2() = const_cast< const HEXSTRING&>(mcc__mnc)[5];
ret.lac() = int2oct(const_cast< const Osmocom__Gb__Types::BssgpCellId&>(cell__id).ra__id().lai().lac(), 16);
ret.rac() = int2oct(const_cast< const Osmocom__Gb__Types::BssgpCellId&>(cell__id).ra__id().rac(), 8);
current_location.update_lineno(433);
/* GBProxy_Tests.ttcn, line 433 */
return ret;
}

void f__fix__create__cb(BSSGP__Emulation::BssgpConfig& cfg)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 436, TTCN_Location::LOCATION_FUNCTION, "f_fix_create_cb");
{
current_location.update_lineno(438);
/* GBProxy_Tests.ttcn, line 438 */
INTEGER i(0);
current_location.update_lineno(438);
/* GBProxy_Tests.ttcn, line 438 */
for ( ; ; ) {
current_location.update_lineno(438);
/* GBProxy_Tests.ttcn, line 438 */
if (!(i < const_cast< const BSSGP__Emulation::BssgpConfig&>(cfg).bvc().lengthof())) break;
current_location.update_lineno(439);
/* GBProxy_Tests.ttcn, line 439 */
{
boolean tmp_65;
{
boolean tmp_58 = cfg.is_bound();
if(tmp_58) {
const BSSGP__Emulation::BssgpConfig& tmp_59 = cfg;
const BSSGP__Emulation::BssgpBvcConfigs& tmp_60 = tmp_59.bvc();
tmp_58 = tmp_60.is_bound();
if(tmp_58) {
const int tmp_61 = i;
tmp_58 = (tmp_61 >= 0) && (tmp_60.size_of() > tmp_61);
if(tmp_58) {
const BSSGP__Emulation::BssgpBvcConfig& tmp_62 = tmp_60[tmp_61];
tmp_58 = tmp_62.is_bound();
if(tmp_58) {
const BSSGP__Emulation::BssgpBvcConfig& tmp_63 = tmp_62;
const BSSGP__Emulation::BssgpCreateCallback& tmp_64 = tmp_63.create__cb();
tmp_58 = tmp_64.is_bound();
}
}
}
}
tmp_65 = (!(tmp_58));
}
if (tmp_65) {
current_location.update_lineno(440);
/* GBProxy_Tests.ttcn, line 440 */
cfg.bvc()[i].create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
}
current_location.update_lineno(438);
/* GBProxy_Tests.ttcn, line 438 */
{
INTEGER tmp_67;
++i;
}
}
}
}

void f__init__gb__pcu(GbInstance& gb, const CHARSTRING& id, const INTEGER& offset)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 445, TTCN_Location::LOCATION_FUNCTION, "f_init_gb_pcu");
current_location.update_lineno(446);
/* GBProxy_Tests.ttcn, line 446 */
CHARSTRING ns__id((((id + cs_7) + int2str(offset)) + cs_8));
current_location.update_lineno(447);
/* GBProxy_Tests.ttcn, line 447 */
CHARSTRING bssgp__id((((id + cs_9) + int2str(offset)) + cs_8));
current_location.update_lineno(448);
/* GBProxy_Tests.ttcn, line 448 */
gb.vc__NS() = TTCN_Runtime::create_component("NS_Emulation", "NS_CT", ns__id, NULL, TRUE);
current_location.update_lineno(449);
/* GBProxy_Tests.ttcn, line 449 */
gb.vc__BSSGP() = TTCN_Runtime::create_component("BSSGP_Emulation", "BSSGP_CT", bssgp__id, NULL, TRUE);
current_location.update_lineno(451);
/* GBProxy_Tests.ttcn, line 451 */
TTCN_Runtime::connect_port(const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_BSCP.get_name(), const_cast< const GbInstance&>(gb).vc__NS(), NS__Emulation::NS__CT_component_NS__SP.get_name());
current_location.update_lineno(453);
/* GBProxy_Tests.ttcn, line 453 */
NS__Emulation::start_NSStart(const_cast< const GbInstance&>(gb).vc__NS(), const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[offset], ns__id);
current_location.update_lineno(454);
/* GBProxy_Tests.ttcn, line 454 */
BSSGP__Emulation::start_BssgpStart(const_cast< const GbInstance&>(gb).vc__BSSGP(), const_cast< const GbInstance&>(gb).cfg(), bssgp__id);
{
current_location.update_lineno(456);
/* GBProxy_Tests.ttcn, line 456 */
INTEGER i(0);
current_location.update_lineno(456);
/* GBProxy_Tests.ttcn, line 456 */
for ( ; ; ) {
current_location.update_lineno(456);
/* GBProxy_Tests.ttcn, line 456 */
if (!(i < const_cast< const GbInstance&>(gb).cfg().bvc().lengthof())) break;
current_location.update_lineno(458);
/* GBProxy_Tests.ttcn, line 458 */
TTCN_Runtime::connect_port(self, test__CT_component_PROC.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_PROC.get_name());
current_location.update_lineno(459);
/* GBProxy_Tests.ttcn, line 459 */
gb.vc__BSSGP__BVC()[i] = BSSGP__Emulation::f__bssgp__get__bvci__ct(const_cast< const GbInstance&>(gb).cfg().bvc()[i].bvci(), test__CT_component_PROC);
current_location.update_lineno(460);
/* GBProxy_Tests.ttcn, line 460 */
TTCN_Runtime::disconnect_port(self, test__CT_component_PROC.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_PROC.get_name());
current_location.update_lineno(462);
/* GBProxy_Tests.ttcn, line 462 */
TTCN_Runtime::connect_port(self, test__CT_component_PCU__MGMT.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP__BVC()[i], BSSGP__Emulation::BSSGP__BVC__CT_component_MGMT.get_name());
current_location.update_lineno(456);
/* GBProxy_Tests.ttcn, line 456 */
{
INTEGER tmp_71;
++i;
}
}
}
current_location.update_lineno(465);
/* GBProxy_Tests.ttcn, line 465 */
TTCN_Runtime::connect_port(self, test__CT_component_PCU__MGMT.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_MGMT.get_name());
}

void start_f__init__gb__pcu(const COMPONENT& component_reference, GbInstance& gb, const CHARSTRING& id, const INTEGER& offset)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_gb_pcu(");
gb.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
offset.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_init_gb_pcu", text_buf);
gb.encode_text(text_buf);
id.encode_text(text_buf);
offset.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__init__gb__sgsn(GbInstance& gb, const CHARSTRING& id, const INTEGER& offset)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 468, TTCN_Location::LOCATION_FUNCTION, "f_init_gb_sgsn");
current_location.update_lineno(469);
/* GBProxy_Tests.ttcn, line 469 */
CHARSTRING ns__id((((id + cs_10) + int2str(offset)) + cs_8));
current_location.update_lineno(470);
/* GBProxy_Tests.ttcn, line 470 */
CHARSTRING bssgp__id((((id + cs_11) + int2str(offset)) + cs_8));
current_location.update_lineno(471);
/* GBProxy_Tests.ttcn, line 471 */
gb.vc__NS() = TTCN_Runtime::create_component("NS_Emulation", "NS_CT", ns__id, NULL, TRUE);
current_location.update_lineno(472);
/* GBProxy_Tests.ttcn, line 472 */
gb.vc__BSSGP() = TTCN_Runtime::create_component("BSSGP_Emulation", "BSSGP_CT", bssgp__id, NULL, TRUE);
current_location.update_lineno(474);
/* GBProxy_Tests.ttcn, line 474 */
TTCN_Runtime::connect_port(const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_BSCP.get_name(), const_cast< const GbInstance&>(gb).vc__NS(), NS__Emulation::NS__CT_component_NS__SP.get_name());
current_location.update_lineno(476);
/* GBProxy_Tests.ttcn, line 476 */
NS__Emulation::start_NSStart(const_cast< const GbInstance&>(gb).vc__NS(), const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[offset], ns__id);
current_location.update_lineno(477);
/* GBProxy_Tests.ttcn, line 477 */
BSSGP__Emulation::start_BssgpStart(const_cast< const GbInstance&>(gb).vc__BSSGP(), const_cast< const GbInstance&>(gb).cfg(), bssgp__id);
{
current_location.update_lineno(479);
/* GBProxy_Tests.ttcn, line 479 */
INTEGER i(0);
current_location.update_lineno(479);
/* GBProxy_Tests.ttcn, line 479 */
for ( ; ; ) {
current_location.update_lineno(479);
/* GBProxy_Tests.ttcn, line 479 */
if (!(i < const_cast< const GbInstance&>(gb).cfg().bvc().lengthof())) break;
current_location.update_lineno(481);
/* GBProxy_Tests.ttcn, line 481 */
TTCN_Runtime::connect_port(self, test__CT_component_PROC.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_PROC.get_name());
current_location.update_lineno(482);
/* GBProxy_Tests.ttcn, line 482 */
gb.vc__BSSGP__BVC()[i] = BSSGP__Emulation::f__bssgp__get__bvci__ct(const_cast< const GbInstance&>(gb).cfg().bvc()[i].bvci(), test__CT_component_PROC);
current_location.update_lineno(483);
/* GBProxy_Tests.ttcn, line 483 */
TTCN_Runtime::disconnect_port(self, test__CT_component_PROC.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_PROC.get_name());
current_location.update_lineno(485);
/* GBProxy_Tests.ttcn, line 485 */
TTCN_Runtime::connect_port(self, test__CT_component_SGSN__MGMT.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP__BVC()[i], BSSGP__Emulation::BSSGP__BVC__CT_component_MGMT.get_name());
current_location.update_lineno(479);
/* GBProxy_Tests.ttcn, line 479 */
{
INTEGER tmp_75;
++i;
}
}
}
current_location.update_lineno(488);
/* GBProxy_Tests.ttcn, line 488 */
TTCN_Runtime::connect_port(self, test__CT_component_SGSN__MGMT.get_name(), const_cast< const GbInstance&>(gb).vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_MGMT.get_name());
}

void start_f__init__gb__sgsn(const COMPONENT& component_reference, GbInstance& gb, const CHARSTRING& id, const INTEGER& offset)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_gb_sgsn(");
gb.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
offset.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_init_gb_sgsn", text_buf);
gb.encode_text(text_buf);
id.encode_text(text_buf);
offset.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__destroy__gb(GbInstance& gb)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 492, TTCN_Location::LOCATION_FUNCTION, "f_destroy_gb");
current_location.update_lineno(493);
/* GBProxy_Tests.ttcn, line 493 */
const_cast< const GbInstance&>(gb).vc__NS().stop();
current_location.update_lineno(494);
/* GBProxy_Tests.ttcn, line 494 */
const_cast< const GbInstance&>(gb).vc__BSSGP().stop();
{
current_location.update_lineno(496);
/* GBProxy_Tests.ttcn, line 496 */
INTEGER i(0);
current_location.update_lineno(496);
/* GBProxy_Tests.ttcn, line 496 */
for ( ; ; ) {
current_location.update_lineno(496);
/* GBProxy_Tests.ttcn, line 496 */
if (!(i < const_cast< const GbInstance&>(gb).cfg().bvc().lengthof())) break;
current_location.update_lineno(497);
/* GBProxy_Tests.ttcn, line 497 */
const_cast< const GbInstance&>(gb).vc__BSSGP__BVC()[i].stop();
current_location.update_lineno(496);
/* GBProxy_Tests.ttcn, line 496 */
{
INTEGER tmp_76;
++i;
}
}
}
}

void start_f__destroy__gb(const COMPONENT& component_reference, GbInstance& gb)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_destroy_gb(");
gb.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_destroy_gb", text_buf);
gb.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__init__vty()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 501, TTCN_Location::LOCATION_FUNCTION, "f_init_vty");
current_location.update_lineno(502);
/* GBProxy_Tests.ttcn, line 502 */
{
Map_Params tmp_77(0);
TTCN_Runtime::map_port(self, test__CT_component_GBPVTY.get_name(), SYSTEM_COMPREF, "GBPVTY", tmp_77);
}
current_location.update_lineno(503);
/* GBProxy_Tests.ttcn, line 503 */
Osmocom__VTY__Functions::f__vty__set__prompts(test__CT_component_GBPVTY, Osmocom__VTY__Functions::f__vty__set__prompts_prompt__prefix_defval);
current_location.update_lineno(504);
/* GBProxy_Tests.ttcn, line 504 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, cs_12, Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
}

void start_f__init__vty(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_vty(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_init_vty", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

alt_status as__count__unblocked4nse_instance(const INTEGER& sgsn__idx, Osmocom__Types::roro__integer& bvci__unblocked)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 508, TTCN_Location::LOCATION_ALTSTEP, "as_count_unblocked4nse");
current_location.update_lineno(510);
/* GBProxy_Tests.ttcn, line 510 */
BSSGP__Emulation::BssgpStatusIndication bsi;
alt_status ret_val = ALT_NO;
current_location.update_lineno(511);
/* GBProxy_Tests.ttcn, line 511 */
{
alt_status tmp_79;
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_78;
tmp_78.nsei() = const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].cfg().nsei();
tmp_78.bvci() = ANY_VALUE;
tmp_78.state() = BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED;
tmp_79 = test__CT_component_SGSN__MGMT.receive(tmp_78, &(bsi), any_compref, NULL, NULL, NULL);
}
switch (tmp_79) {
case ALT_YES:
{
current_location.update_lineno(512);
/* GBProxy_Tests.ttcn, line 512 */
{
Osmocom__Types::ro__integer tmp_80;
{
Osmocom__Types::ro__integer tmp_82;
tmp_82.set_size(1);
tmp_82[0] = const_cast< const BSSGP__Emulation::BssgpStatusIndication&>(bsi).bvci();
tmp_80 = (const_cast< const Osmocom__Types::roro__integer&>(bvci__unblocked)[sgsn__idx] + tmp_82);
}
{
Osmocom__Types::ro__integer& tmp_81 = bvci__unblocked[sgsn__idx]; /* 7388 */
tmp_81 = tmp_80;
}
}
{
current_location.update_lineno(514);
/* GBProxy_Tests.ttcn, line 514 */
INTEGER i(0);
current_location.update_lineno(514);
/* GBProxy_Tests.ttcn, line 514 */
for ( ; ; ) {
current_location.update_lineno(514);
/* GBProxy_Tests.ttcn, line 514 */
if (!(i < bvci__unblocked.lengthof())) break;
current_location.update_lineno(515);
/* GBProxy_Tests.ttcn, line 515 */
if ((const_cast< const Osmocom__Types::roro__integer&>(bvci__unblocked)[i].lengthof() < const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc().lengthof())) {
current_location.update_lineno(516);
/* GBProxy_Tests.ttcn, line 516 */
return ALT_REPEAT;
}
current_location.update_lineno(514);
/* GBProxy_Tests.ttcn, line 514 */
{
INTEGER tmp_83;
++i;
}
}
}
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__count__unblocked4nse(const INTEGER& sgsn__idx, Osmocom__Types::roro__integer& bvci__unblocked)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__unblocked4nse_instance(sgsn__idx, bvci__unblocked);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_unblocked4nse.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__unblocked4nse(const INTEGER& sgsn__idx, Osmocom__Types::roro__integer& bvci__unblocked)
{
return new as__count__unblocked4nse_Default(sgsn__idx, bvci__unblocked);
}

CHARSTRING_template ts__pcu__bvc__fsm__id(const INTEGER& nsei, const INTEGER& bvci)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 522, TTCN_Location::LOCATION_TEMPLATE, "ts_pcu_bvc_fsm_id");
CHARSTRING_template ret_val;
ret_val = (((cs_13 + Osmocom__Types::f__int2str(nsei, 5)) + cs_14) + Osmocom__Types::f__int2str(bvci, 5));
return ret_val;
}

void f__bvc__fsm__ensure__state(const INTEGER& nsei, const INTEGER& bvci, const CHARSTRING_template& exp)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 525, TTCN_Location::LOCATION_FUNCTION, "f_bvc_fsm_ensure_state");
current_location.update_lineno(527);
/* GBProxy_Tests.ttcn, line 527 */
Osmocom__CTRL__Adapter::f__ctrl__get__exp__inst__state(Osmocom__CTRL__Adapter::CTRL__Adapter__CT_component_IPA__CTRL, cs_15, ts__pcu__bvc__fsm__id(nsei, bvci), exp);
}

void start_f__bvc__fsm__ensure__state(const COMPONENT& component_reference, const INTEGER& nsei, const INTEGER& bvci, const CHARSTRING_template& exp)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bvc_fsm_ensure_state(");
nsei.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(", ");
exp.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_bvc_fsm_ensure_state", text_buf);
nsei.encode_text(text_buf);
bvci.encode_text(text_buf);
exp.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__init(const FLOAT& t__guard)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 530, TTCN_Location::LOCATION_FUNCTION, "f_init");
current_location.update_lineno(531);
/* GBProxy_Tests.ttcn, line 531 */
Osmocom__Types::roro__integer bvci__unblocked;
current_location.update_lineno(532);
/* GBProxy_Tests.ttcn, line 532 */
BSSGP__Emulation::BssgpStatusIndication bsi;
current_location.update_lineno(533);
/* GBProxy_Tests.ttcn, line 533 */
INTEGER i;
current_location.update_lineno(535);
/* GBProxy_Tests.ttcn, line 535 */
if ((test__CT_component_g__initialized == TRUE)) {
current_location.update_lineno(536);
/* GBProxy_Tests.ttcn, line 536 */
return;
}
current_location.update_lineno(538);
/* GBProxy_Tests.ttcn, line 538 */
test__CT_component_g__initialized = TRUE;
current_location.update_lineno(540);
/* GBProxy_Tests.ttcn, line 540 */
test__CT_component_g__Tguard.start(t__guard);
current_location.update_lineno(541);
/* GBProxy_Tests.ttcn, line 541 */
activate_as__gTguard(test__CT_component_g__Tguard);
current_location.update_lineno(543);
/* GBProxy_Tests.ttcn, line 543 */
Osmocom__CTRL__Adapter::f__ipa__ctrl__start__client(mp__gbproxy__ip, mp__gbproxy__ctrl__port);
current_location.update_lineno(545);
/* GBProxy_Tests.ttcn, line 545 */
BSSGP__Emulation::BssgpBvcConfigs bvcs(NULL_VALUE);
current_location.update_lineno(546);
/* GBProxy_Tests.ttcn, line 546 */
i = 0;
current_location.update_lineno(546);
/* GBProxy_Tests.ttcn, line 546 */
for ( ; ; ) {
current_location.update_lineno(546);
/* GBProxy_Tests.ttcn, line 546 */
if (!(i < mp__gbconfigs.lengthof())) break;
current_location.update_lineno(547);
/* GBProxy_Tests.ttcn, line 547 */
test__CT_component_g__pcu[i].cfg() = const_cast< const BssgpConfigs&>(mp__gbconfigs)[i];
current_location.update_lineno(549);
/* GBProxy_Tests.ttcn, line 549 */
f__fix__create__cb(test__CT_component_g__pcu[i].cfg());
current_location.update_lineno(551);
/* GBProxy_Tests.ttcn, line 551 */
{
BSSGP__Emulation::BssgpBvcConfigs tmp_87;
tmp_87 = (bvcs + const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc());
bvcs = tmp_87;
}
current_location.update_lineno(546);
/* GBProxy_Tests.ttcn, line 546 */
{
INTEGER tmp_88;
++i;
}
}
current_location.update_lineno(554);
/* GBProxy_Tests.ttcn, line 554 */
i = 0;
current_location.update_lineno(554);
/* GBProxy_Tests.ttcn, line 554 */
for ( ; ; ) {
current_location.update_lineno(554);
/* GBProxy_Tests.ttcn, line 554 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(555);
/* GBProxy_Tests.ttcn, line 555 */
{
BSSGP__Emulation::BssgpConfig& tmp_91 = test__CT_component_g__sgsn[i].cfg(); /* 7388 */
tmp_91.nsei() = const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei();
tmp_91.sgsn__role() = TRUE;
tmp_91.bvc() = bvcs;
}
current_location.update_lineno(554);
/* GBProxy_Tests.ttcn, line 554 */
{
INTEGER tmp_92;
++i;
}
}
current_location.update_lineno(562);
/* GBProxy_Tests.ttcn, line 562 */
f__init__vty();
current_location.update_lineno(563);
/* GBProxy_Tests.ttcn, line 563 */
i = 0;
current_location.update_lineno(563);
/* GBProxy_Tests.ttcn, line 563 */
for ( ; ; ) {
current_location.update_lineno(563);
/* GBProxy_Tests.ttcn, line 563 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(564);
/* GBProxy_Tests.ttcn, line 564 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_16 + int2str(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().nsei())) + cs_17), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(563);
/* GBProxy_Tests.ttcn, line 563 */
{
INTEGER tmp_94;
++i;
}
}
current_location.update_lineno(566);
/* GBProxy_Tests.ttcn, line 566 */
i = 0;
current_location.update_lineno(566);
/* GBProxy_Tests.ttcn, line 566 */
for ( ; ; ) {
current_location.update_lineno(566);
/* GBProxy_Tests.ttcn, line 566 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(567);
/* GBProxy_Tests.ttcn, line 567 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_16 + int2str(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().nsei())) + cs_17), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(568);
/* GBProxy_Tests.ttcn, line 568 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_18 + int2str(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().nsei())) + cs_19), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(566);
/* GBProxy_Tests.ttcn, line 566 */
{
INTEGER tmp_96;
++i;
}
}
current_location.update_lineno(571);
/* GBProxy_Tests.ttcn, line 571 */
i = 0;
current_location.update_lineno(571);
/* GBProxy_Tests.ttcn, line 571 */
for ( ; ; ) {
current_location.update_lineno(571);
/* GBProxy_Tests.ttcn, line 571 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(572);
/* GBProxy_Tests.ttcn, line 572 */
f__init__gb__sgsn(test__CT_component_g__sgsn[i], cs_20, i);
current_location.update_lineno(571);
/* GBProxy_Tests.ttcn, line 571 */
{
INTEGER tmp_98;
++i;
}
}
current_location.update_lineno(574);
/* GBProxy_Tests.ttcn, line 574 */
Osmocom__Types::f__sleep(4.0);
current_location.update_lineno(575);
/* GBProxy_Tests.ttcn, line 575 */
i = 0;
current_location.update_lineno(575);
/* GBProxy_Tests.ttcn, line 575 */
for ( ; ; ) {
current_location.update_lineno(575);
/* GBProxy_Tests.ttcn, line 575 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(576);
/* GBProxy_Tests.ttcn, line 576 */
f__init__gb__pcu(test__CT_component_g__pcu[i], cs_20, i);
current_location.update_lineno(575);
/* GBProxy_Tests.ttcn, line 575 */
{
INTEGER tmp_100;
++i;
}
}
current_location.update_lineno(579);
/* GBProxy_Tests.ttcn, line 579 */
i = 0;
current_location.update_lineno(579);
/* GBProxy_Tests.ttcn, line 579 */
for ( ; ; ) {
current_location.update_lineno(579);
/* GBProxy_Tests.ttcn, line 579 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(580);
/* GBProxy_Tests.ttcn, line 580 */
bvci__unblocked[i] = NULL_VALUE;
current_location.update_lineno(579);
/* GBProxy_Tests.ttcn, line 579 */
{
INTEGER tmp_103;
++i;
}
}
current_location.update_lineno(584);
/* GBProxy_Tests.ttcn, line 584 */
TIMER T("T", 1.5e1);
current_location.update_lineno(585);
/* GBProxy_Tests.ttcn, line 585 */
T.start();
current_location.update_lineno(586);
/* GBProxy_Tests.ttcn, line 586 */
{
tmp_104:
alt_status tmp_104_alt_flag_0 = ALT_MAYBE;
alt_status tmp_104_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_104_alt_flag_2 = ALT_MAYBE;
alt_status tmp_104_alt_flag_3 = ALT_MAYBE;
alt_status tmp_104_alt_flag_4 = ALT_MAYBE;
alt_status tmp_104_alt_flag_5 = ALT_MAYBE;
alt_status tmp_104_alt_flag_6 = ALT_MAYBE;
alt_status tmp_104_alt_flag_7 = ALT_MAYBE;
alt_status tmp_104_alt_flag_8 = ALT_MAYBE;
alt_status tmp_104_alt_flag_9 = ALT_MAYBE;
alt_status tmp_104_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_104_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(589);
/* GBProxy_Tests.ttcn, line 589 */
tmp_104_alt_flag_0 = as__count__unblocked4nse_instance(0, bvci__unblocked);
if (tmp_104_alt_flag_0 == ALT_REPEAT) goto tmp_104;
if (tmp_104_alt_flag_0 == ALT_BREAK) break;
if (tmp_104_alt_flag_0 == ALT_YES) break;
}
if (tmp_104_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(590);
/* GBProxy_Tests.ttcn, line 590 */
if ((test__CT_component_g__sgsn.lengthof() > 1)) tmp_104_alt_flag_1 = ALT_MAYBE;
else tmp_104_alt_flag_1 = ALT_NO;
}
if (tmp_104_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(590);
/* GBProxy_Tests.ttcn, line 590 */
tmp_104_alt_flag_1 = as__count__unblocked4nse_instance(1, bvci__unblocked);
if (tmp_104_alt_flag_1 == ALT_REPEAT) goto tmp_104;
if (tmp_104_alt_flag_1 == ALT_BREAK) break;
if (tmp_104_alt_flag_1 == ALT_YES) break;
}
if (tmp_104_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(591);
/* GBProxy_Tests.ttcn, line 591 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_105;
tmp_105.nsei() = ANY_OR_OMIT;
tmp_105.bvci() = ANY_VALUE;
tmp_105.state() = ANY_VALUE;
tmp_104_alt_flag_2 = test__CT_component_SGSN__MGMT.receive(tmp_105, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_104_alt_flag_2 == ALT_YES) {
current_location.update_lineno(592);
/* GBProxy_Tests.ttcn, line 592 */
goto tmp_104;
}
}
if (tmp_104_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(594);
/* GBProxy_Tests.ttcn, line 594 */
tmp_104_alt_flag_3 = test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::BssgpResetIndication_template(ANY_VALUE), NULL, any_compref, NULL, NULL, NULL);
if (tmp_104_alt_flag_3 == ALT_YES) {
current_location.update_lineno(595);
/* GBProxy_Tests.ttcn, line 595 */
goto tmp_104;
}
}
if (tmp_104_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(597);
/* GBProxy_Tests.ttcn, line 597 */
tmp_104_alt_flag_4 = test__CT_component_SGSN__MGMT.receive(any_compref, NULL, NULL, NULL);
if (tmp_104_alt_flag_4 == ALT_YES) {
current_location.update_lineno(598);
/* GBProxy_Tests.ttcn, line 598 */
Misc__Helpers::f__shutdown(cs_21, 598, FAIL, cs_22);
break;
}
}
if (tmp_104_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(601);
/* GBProxy_Tests.ttcn, line 601 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_106;
tmp_106.nsei() = ANY_OR_OMIT;
tmp_106.bvci() = ANY_VALUE;
tmp_106.state() = BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED;
tmp_104_alt_flag_5 = test__CT_component_PCU__MGMT.receive(tmp_106, &(bsi), any_compref, NULL, NULL, NULL);
}
if (tmp_104_alt_flag_5 == ALT_YES) {
current_location.update_lineno(602);
/* GBProxy_Tests.ttcn, line 602 */
goto tmp_104;
}
}
if (tmp_104_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(604);
/* GBProxy_Tests.ttcn, line 604 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_107;
tmp_107.nsei() = ANY_OR_OMIT;
tmp_107.bvci() = ANY_VALUE;
tmp_107.state() = ANY_VALUE;
tmp_104_alt_flag_6 = test__CT_component_PCU__MGMT.receive(tmp_107, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_104_alt_flag_6 == ALT_YES) {
current_location.update_lineno(605);
/* GBProxy_Tests.ttcn, line 605 */
goto tmp_104;
}
}
if (tmp_104_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(607);
/* GBProxy_Tests.ttcn, line 607 */
{
BSSGP__Emulation::BssgpResetIndication_template tmp_108;
tmp_108.bvci() = 0;
tmp_104_alt_flag_7 = test__CT_component_PCU__MGMT.receive(tmp_108, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_104_alt_flag_7 == ALT_YES) {
current_location.update_lineno(608);
/* GBProxy_Tests.ttcn, line 608 */
goto tmp_104;
}
}
if (tmp_104_alt_flag_8 == ALT_MAYBE) {
current_location.update_lineno(610);
/* GBProxy_Tests.ttcn, line 610 */
tmp_104_alt_flag_8 = test__CT_component_PCU__MGMT.receive(any_compref, NULL, NULL, NULL);
if (tmp_104_alt_flag_8 == ALT_YES) {
current_location.update_lineno(611);
/* GBProxy_Tests.ttcn, line 611 */
Misc__Helpers::f__shutdown(cs_21, 611, FAIL, cs_23);
break;
}
}
if (tmp_104_alt_flag_9 == ALT_MAYBE) {
current_location.update_lineno(614);
/* GBProxy_Tests.ttcn, line 614 */
tmp_104_alt_flag_9 = T.timeout(NULL);
if (tmp_104_alt_flag_9 == ALT_YES) {
current_location.update_lineno(615);
/* GBProxy_Tests.ttcn, line 615 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for unblock of all BVCs on SGSN side; unblocked so far: "),bvci__unblocked.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_104_default_flag == ALT_MAYBE) {
tmp_104_default_flag = TTCN_Default::try_altsteps();
if (tmp_104_default_flag == ALT_YES || tmp_104_default_flag == ALT_BREAK) break;
else if (tmp_104_default_flag == ALT_REPEAT) goto tmp_104;
}
current_location.update_lineno(586);
/* GBProxy_Tests.ttcn, line 586 */
if (tmp_104_alt_flag_0 == ALT_NO && tmp_104_alt_flag_1 == ALT_NO && tmp_104_alt_flag_2 == ALT_NO && tmp_104_alt_flag_3 == ALT_NO && tmp_104_alt_flag_4 == ALT_NO && tmp_104_alt_flag_5 == ALT_NO && tmp_104_alt_flag_6 == ALT_NO && tmp_104_alt_flag_7 == ALT_NO && tmp_104_alt_flag_8 == ALT_NO && tmp_104_alt_flag_9 == ALT_NO && tmp_104_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 586 and 619.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(621);
/* GBProxy_Tests.ttcn, line 621 */
i = 0;
current_location.update_lineno(621);
/* GBProxy_Tests.ttcn, line 621 */
for ( ; ; ) {
current_location.update_lineno(621);
/* GBProxy_Tests.ttcn, line 621 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
{
current_location.update_lineno(623);
/* GBProxy_Tests.ttcn, line 623 */
INTEGER j(0);
current_location.update_lineno(623);
/* GBProxy_Tests.ttcn, line 623 */
for ( ; ; ) {
current_location.update_lineno(623);
/* GBProxy_Tests.ttcn, line 623 */
if (!(j < const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc().lengthof())) break;
current_location.update_lineno(624);
/* GBProxy_Tests.ttcn, line 624 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc()[j].bvci());
current_location.update_lineno(625);
/* GBProxy_Tests.ttcn, line 625 */
if ((!(Osmocom__Types::ro__integer__contains(const_cast< const Osmocom__Types::roro__integer&>(bvci__unblocked)[i], bvci)))) {
current_location.update_lineno(626);
/* GBProxy_Tests.ttcn, line 626 */
Misc__Helpers::f__shutdown(cs_21, 626, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("SGSN "),i.log(),TTCN_Logger::log_event_str(" BVCI="),bvci.log(),TTCN_Logger::log_event_str(" was not unblocked during start-up"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(623);
/* GBProxy_Tests.ttcn, line 623 */
{
INTEGER tmp_110;
++j;
}
}
}
current_location.update_lineno(621);
/* GBProxy_Tests.ttcn, line 621 */
{
INTEGER tmp_111;
++i;
}
}
current_location.update_lineno(634);
/* GBProxy_Tests.ttcn, line 634 */
Osmocom__Types::f__sleep(2.0e-1);
current_location.update_lineno(637);
/* GBProxy_Tests.ttcn, line 637 */
i = 0;
current_location.update_lineno(637);
/* GBProxy_Tests.ttcn, line 637 */
for ( ; ; ) {
current_location.update_lineno(637);
/* GBProxy_Tests.ttcn, line 637 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(638);
/* GBProxy_Tests.ttcn, line 638 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei(), 0, CHARSTRING_template(cs_24));
{
current_location.update_lineno(640);
/* GBProxy_Tests.ttcn, line 640 */
INTEGER j(0);
current_location.update_lineno(640);
/* GBProxy_Tests.ttcn, line 640 */
for ( ; ; ) {
current_location.update_lineno(640);
/* GBProxy_Tests.ttcn, line 640 */
if (!(j < const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc().lengthof())) break;
current_location.update_lineno(641);
/* GBProxy_Tests.ttcn, line 641 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc()[j].bvci());
current_location.update_lineno(642);
/* GBProxy_Tests.ttcn, line 642 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei(), bvci, CHARSTRING_template(cs_24));
current_location.update_lineno(640);
/* GBProxy_Tests.ttcn, line 640 */
{
INTEGER tmp_113;
++j;
}
}
}
current_location.update_lineno(637);
/* GBProxy_Tests.ttcn, line 637 */
{
INTEGER tmp_114;
++i;
}
}
current_location.update_lineno(646);
/* GBProxy_Tests.ttcn, line 646 */
i = 0;
current_location.update_lineno(646);
/* GBProxy_Tests.ttcn, line 646 */
for ( ; ; ) {
current_location.update_lineno(646);
/* GBProxy_Tests.ttcn, line 646 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(647);
/* GBProxy_Tests.ttcn, line 647 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei(), 0, CHARSTRING_template(cs_24));
{
current_location.update_lineno(649);
/* GBProxy_Tests.ttcn, line 649 */
INTEGER j(0);
current_location.update_lineno(649);
/* GBProxy_Tests.ttcn, line 649 */
for ( ; ; ) {
current_location.update_lineno(649);
/* GBProxy_Tests.ttcn, line 649 */
if (!(j < const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc().lengthof())) break;
current_location.update_lineno(650);
/* GBProxy_Tests.ttcn, line 650 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc()[j].bvci());
current_location.update_lineno(651);
/* GBProxy_Tests.ttcn, line 651 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei(), bvci, CHARSTRING_template(cs_24));
current_location.update_lineno(649);
/* GBProxy_Tests.ttcn, line 649 */
{
INTEGER tmp_116;
++j;
}
}
}
current_location.update_lineno(646);
/* GBProxy_Tests.ttcn, line 646 */
{
INTEGER tmp_117;
++i;
}
}
current_location.update_lineno(656);
/* GBProxy_Tests.ttcn, line 656 */
test__CT_component_g__Tguard.start(t__guard);
}

void start_f__init(const COMPONENT& component_reference, const FLOAT& t__guard)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init(");
t__guard.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_init", text_buf);
t__guard.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__cleanup()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 659, TTCN_Location::LOCATION_FUNCTION, "f_cleanup");
current_location.update_lineno(660);
/* GBProxy_Tests.ttcn, line 660 */
INTEGER i;
current_location.update_lineno(665);
/* GBProxy_Tests.ttcn, line 665 */
Osmocom__Types::f__sleep(2.0e-1);
current_location.update_lineno(667);
/* GBProxy_Tests.ttcn, line 667 */
i = 0;
current_location.update_lineno(667);
/* GBProxy_Tests.ttcn, line 667 */
for ( ; ; ) {
current_location.update_lineno(667);
/* GBProxy_Tests.ttcn, line 667 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(668);
/* GBProxy_Tests.ttcn, line 668 */
f__destroy__gb(test__CT_component_g__sgsn[i]);
current_location.update_lineno(667);
/* GBProxy_Tests.ttcn, line 667 */
{
INTEGER tmp_119;
++i;
}
}
current_location.update_lineno(670);
/* GBProxy_Tests.ttcn, line 670 */
i = 0;
current_location.update_lineno(670);
/* GBProxy_Tests.ttcn, line 670 */
for ( ; ; ) {
current_location.update_lineno(670);
/* GBProxy_Tests.ttcn, line 670 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(671);
/* GBProxy_Tests.ttcn, line 671 */
f__destroy__gb(test__CT_component_g__pcu[i]);
current_location.update_lineno(670);
/* GBProxy_Tests.ttcn, line 670 */
{
INTEGER tmp_121;
++i;
}
}
current_location.update_lineno(674);
/* GBProxy_Tests.ttcn, line 674 */
Misc__Helpers::f__shutdown(cs_25, 674, PASS, Misc__Helpers::f__shutdown_text_defval);
}

void start_f__cleanup(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_cleanup(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_cleanup", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

COMPONENT f__start__handler(const void__fn& fn, const CHARSTRING& id, const INTEGER& imsi__suffix, const FLOAT& t__guard, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const BOOLEAN& have__ptmsi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 680, TTCN_Location::LOCATION_FUNCTION, "f_start_handler");
current_location.update_lineno(683);
/* GBProxy_Tests.ttcn, line 683 */
COMPONENT vc__conn;
current_location.update_lineno(684);
/* GBProxy_Tests.ttcn, line 684 */
INTEGER nri(const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx][nri__idx]);
current_location.update_lineno(685);
/* GBProxy_Tests.ttcn, line 685 */
OCTETSTRING p__tmsi(Osmocom__Types::f__gen__tmsi(imsi__suffix, nri, mp__nri__bitlength, Osmocom__Types::f__gen__tmsi_base__tmsi_defval));
current_location.update_lineno(687);
/* GBProxy_Tests.ttcn, line 687 */
BSSGP__ConnHdlrPars pars;
pars.imei() = Osmocom__Types::f__gen__imei(imsi__suffix);
pars.imsi() = Osmocom__Types::f__gen__imsi(imsi__suffix);
pars.msisdn() = Osmocom__Types::f__gen__msisdn(imsi__suffix);
pars.p__tmsi() = p__tmsi;
pars.p__tmsi__sig() = OMIT_VALUE;
pars.tlli() = Osmocom__Gb__Types::f__gprs__tlli__from__tmsi(p__tmsi, Osmocom__Gb__Types::TlliType::TLLI__LOCAL);
pars.tlli__old() = OMIT_VALUE;
pars.ra() = OMIT_VALUE;
pars.pcu() = test__CT_component_g__pcu;
pars.sgsn() = test__CT_component_g__sgsn;
pars.sgsn__idx() = sgsn__idx;
pars.t__guard() = t__guard;
current_location.update_lineno(701);
/* GBProxy_Tests.ttcn, line 701 */
if ((!(have__ptmsi))) {
current_location.update_lineno(702);
/* GBProxy_Tests.ttcn, line 702 */
pars.p__tmsi() = OMIT_VALUE;
}
current_location.update_lineno(705);
/* GBProxy_Tests.ttcn, line 705 */
vc__conn = TTCN_Runtime::create_component("GBProxy_Tests", "BSSGP_ConnHdlr", id, NULL, TRUE);
current_location.update_lineno(707);
/* GBProxy_Tests.ttcn, line 707 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Starting ");
id.log();
TTCN_Logger::log_event_str(" for SGSN[");
sgsn__idx.log();
TTCN_Logger::log_event_str("], NRI=");
nri.log();
TTCN_Logger::log_event_str(", P-TMSI=");
const_cast< const BSSGP__ConnHdlrPars&>(pars).p__tmsi().log();
TTCN_Logger::log_event_str(", TLLI=");
const_cast< const BSSGP__ConnHdlrPars&>(pars).tlli().log();
TTCN_Logger::log_event_str(", IMSI=");
const_cast< const BSSGP__ConnHdlrPars&>(pars).imsi().log();
TTCN_Logger::log_event_str(" on component=");
vc__conn.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(709);
/* GBProxy_Tests.ttcn, line 709 */
start_f__handler__init(vc__conn, fn, id, pars);
current_location.update_lineno(710);
/* GBProxy_Tests.ttcn, line 710 */
return vc__conn;
}

void start_f__start__handler(const COMPONENT& component_reference, const void__fn& fn, const CHARSTRING& id, const INTEGER& imsi__suffix, const FLOAT& t__guard, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const BOOLEAN& have__ptmsi)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handler(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
imsi__suffix.log();
TTCN_Logger::log_event_str(", ");
t__guard.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
have__ptmsi.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_start_handler", text_buf);
fn.encode_text(text_buf);
id.encode_text(text_buf);
imsi__suffix.encode_text(text_buf);
t__guard.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
have__ptmsi.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__start__handlers(const void__fn& fn, const CHARSTRING& id, const INTEGER& , const FLOAT& t__guard, const BOOLEAN& have__ptmsi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 713, TTCN_Location::LOCATION_FUNCTION, "f_start_handlers");
current_location.update_lineno(717);
/* GBProxy_Tests.ttcn, line 717 */
INTEGER sgsn__idx;
current_location.update_lineno(717);
/* GBProxy_Tests.ttcn, line 717 */
INTEGER nri__idx;
current_location.update_lineno(718);
/* GBProxy_Tests.ttcn, line 718 */
sgsn__idx = 0;
current_location.update_lineno(718);
/* GBProxy_Tests.ttcn, line 718 */
for ( ; ; ) {
current_location.update_lineno(718);
/* GBProxy_Tests.ttcn, line 718 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(719);
/* GBProxy_Tests.ttcn, line 719 */
nri__idx = 0;
current_location.update_lineno(719);
/* GBProxy_Tests.ttcn, line 719 */
for ( ; ; ) {
current_location.update_lineno(719);
/* GBProxy_Tests.ttcn, line 719 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(720);
/* GBProxy_Tests.ttcn, line 720 */
INTEGER extd__imsi__suffix(((1000 * sgsn__idx) + (100 * nri__idx)));
current_location.update_lineno(721);
/* GBProxy_Tests.ttcn, line 721 */
COMPONENT vc__conn;
current_location.update_lineno(722);
/* GBProxy_Tests.ttcn, line 722 */
vc__conn = f__start__handler(fn, id, extd__imsi__suffix, t__guard, sgsn__idx, nri__idx, have__ptmsi);
current_location.update_lineno(725);
/* GBProxy_Tests.ttcn, line 725 */
{
tmp_127:
alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (alt_flag != ALT_NO) {
alt_flag = vc__conn.done(NULL, NULL);
if (alt_flag == ALT_YES) break;
else if (alt_flag == ALT_REPEAT) goto tmp_127;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
else if (default_flag == ALT_REPEAT) goto tmp_127;
}
current_location.update_lineno(725);
/* GBProxy_Tests.ttcn, line 725 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file GBProxy_Tests.ttcn, line 725.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(719);
/* GBProxy_Tests.ttcn, line 719 */
{
INTEGER tmp_128;
++nri__idx;
}
}
current_location.update_lineno(718);
/* GBProxy_Tests.ttcn, line 718 */
{
INTEGER tmp_129;
++sgsn__idx;
}
}
}

void start_f__start__handlers(const COMPONENT& component_reference, const void__fn& fn, const CHARSTRING& id, const INTEGER& imsi__suffix, const FLOAT& t__guard, const BOOLEAN& have__ptmsi)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handlers(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
imsi__suffix.log();
TTCN_Logger::log_event_str(", ");
t__guard.log();
TTCN_Logger::log_event_str(", ");
have__ptmsi.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_start_handlers", text_buf);
fn.encode_text(text_buf);
id.encode_text(text_buf);
imsi__suffix.encode_text(text_buf);
t__guard.encode_text(text_buf);
have__ptmsi.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__connect__to__pcu__bvc(const INTEGER& port__idx, const INTEGER& nse__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 731, TTCN_Location::LOCATION_FUNCTION, "f_connect_to_pcu_bvc");
current_location.update_lineno(733);
/* GBProxy_Tests.ttcn, line 733 */
COMPONENT bvc__ct(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[nse__idx].vc__BSSGP__BVC()[bvc__idx]);
current_location.update_lineno(734);
/* GBProxy_Tests.ttcn, line 734 */
if (BSSGP__ConnHdlr_component_PCU__PTP[port__idx].check_port_state(cs_26)) {
current_location.update_lineno(736);
/* GBProxy_Tests.ttcn, line 736 */
f__client__unregister(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), BSSGP__ConnHdlr_component_PCU__PROC[port__idx]);
current_location.update_lineno(737);
/* GBProxy_Tests.ttcn, line 737 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_PCU__PTP[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP.get_name());
current_location.update_lineno(738);
/* GBProxy_Tests.ttcn, line 738 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_PCU__SIG[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP__SIG.get_name());
current_location.update_lineno(739);
/* GBProxy_Tests.ttcn, line 739 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_PCU__PROC[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__PROC.get_name());
}
current_location.update_lineno(742);
/* GBProxy_Tests.ttcn, line 742 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_PCU__PTP[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP.get_name());
current_location.update_lineno(743);
/* GBProxy_Tests.ttcn, line 743 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_PCU__SIG[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP__SIG.get_name());
current_location.update_lineno(744);
/* GBProxy_Tests.ttcn, line 744 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_PCU__PROC[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__PROC.get_name());
current_location.update_lineno(745);
/* GBProxy_Tests.ttcn, line 745 */
f__client__register(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), OCTETSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), BSSGP__ConnHdlr_component_PCU__PROC[port__idx]);
current_location.update_lineno(746);
/* GBProxy_Tests.ttcn, line 746 */
BSSGP__ConnHdlr_component_pcu__ct[port__idx] = bvc__ct;
current_location.update_lineno(747);
/* GBProxy_Tests.ttcn, line 747 */
BSSGP__ConnHdlr_component_pcu__bvc__cfg[port__idx] = const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[nse__idx].cfg().bvc()[bvc__idx];
}

void start_f__connect__to__pcu__bvc(const COMPONENT& component_reference, const INTEGER& port__idx, const INTEGER& nse__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_connect_to_pcu_bvc(");
port__idx.log();
TTCN_Logger::log_event_str(", ");
nse__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_connect_to_pcu_bvc", text_buf);
port__idx.encode_text(text_buf);
nse__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__connect__to__sgsn__bvc(const INTEGER& port__idx, const COMPONENT& bvc__ct)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 751, TTCN_Location::LOCATION_FUNCTION, "f_connect_to_sgsn_bvc");
current_location.update_lineno(752);
/* GBProxy_Tests.ttcn, line 752 */
if (BSSGP__ConnHdlr_component_SGSN__PTP[port__idx].check_port_state(cs_26)) {
current_location.update_lineno(754);
/* GBProxy_Tests.ttcn, line 754 */
f__client__unregister(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), BSSGP__ConnHdlr_component_SGSN__PROC[port__idx]);
current_location.update_lineno(755);
/* GBProxy_Tests.ttcn, line 755 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_SGSN__PTP[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_sgsn__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP.get_name());
current_location.update_lineno(756);
/* GBProxy_Tests.ttcn, line 756 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_SGSN__SIG[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_sgsn__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP__SIG.get_name());
current_location.update_lineno(757);
/* GBProxy_Tests.ttcn, line 757 */
TTCN_Runtime::disconnect_port(self, BSSGP__ConnHdlr_component_SGSN__PROC[port__idx].get_name(), const_cast< const VALUE_ARRAY<COMPONENT, 3, 0>&>(BSSGP__ConnHdlr_component_sgsn__ct)[port__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__PROC.get_name());
}
current_location.update_lineno(760);
/* GBProxy_Tests.ttcn, line 760 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_SGSN__PTP[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP.get_name());
current_location.update_lineno(761);
/* GBProxy_Tests.ttcn, line 761 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_SGSN__SIG[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__SP__SIG.get_name());
current_location.update_lineno(762);
/* GBProxy_Tests.ttcn, line 762 */
TTCN_Runtime::connect_port(self, BSSGP__ConnHdlr_component_SGSN__PROC[port__idx].get_name(), bvc__ct, BSSGP__Emulation::BSSGP__BVC__CT_component_BSSGP__PROC.get_name());
current_location.update_lineno(763);
/* GBProxy_Tests.ttcn, line 763 */
f__client__register(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), OCTETSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), BSSGP__ConnHdlr_component_SGSN__PROC[port__idx]);
current_location.update_lineno(764);
/* GBProxy_Tests.ttcn, line 764 */
BSSGP__ConnHdlr_component_sgsn__ct[port__idx] = bvc__ct;
}

void start_f__connect__to__sgsn__bvc(const COMPONENT& component_reference, const INTEGER& port__idx, const COMPONENT& bvc__ct)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_connect_to_sgsn_bvc(");
port__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__ct.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_connect_to_sgsn_bvc", text_buf);
port__idx.encode_text(text_buf);
bvc__ct.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

alt_status as__gTguard_instance(TIMER& Tguard)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 767, TTCN_Location::LOCATION_ALTSTEP, "as_gTguard");
alt_status ret_val = ALT_NO;
current_location.update_lineno(768);
/* GBProxy_Tests.ttcn, line 768 */
switch (Tguard.timeout(NULL)) {
case ALT_YES:
{
current_location.update_lineno(769);
/* GBProxy_Tests.ttcn, line 769 */
Misc__Helpers::f__shutdown(cs_21, 769, FAIL, cs_27);
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__gTguard(TIMER& Tguard)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__gTguard_instance(Tguard);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_gTguard.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__gTguard(TIMER& Tguard)
{
return new as__gTguard_Default(Tguard);
}

void f__handler__init(const void__fn& fn, const CHARSTRING& id, const BSSGP__ConnHdlrPars& pars)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 774, TTCN_Location::LOCATION_FUNCTION, "f_handler_init");
current_location.update_lineno(776);
/* GBProxy_Tests.ttcn, line 776 */
INTEGER i;
current_location.update_lineno(778);
/* GBProxy_Tests.ttcn, line 778 */
BSSGP__ConnHdlr_component_g__pars = pars;
current_location.update_lineno(780);
/* GBProxy_Tests.ttcn, line 780 */
BSSGP__ConnHdlr_component_llc = BSSGP__Emulation::f__llc__create(FALSE);
current_location.update_lineno(783);
/* GBProxy_Tests.ttcn, line 783 */
i = 0;
current_location.update_lineno(783);
/* GBProxy_Tests.ttcn, line 783 */
for ( ; ; ) {
current_location.update_lineno(783);
/* GBProxy_Tests.ttcn, line 783 */
if (!(i < const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu().lengthof())) break;
current_location.update_lineno(784);
/* GBProxy_Tests.ttcn, line 784 */
f__connect__to__pcu__bvc(i, i, 0);
current_location.update_lineno(783);
/* GBProxy_Tests.ttcn, line 783 */
{
INTEGER tmp_136;
++i;
}
}
current_location.update_lineno(788);
/* GBProxy_Tests.ttcn, line 788 */
i = 0;
current_location.update_lineno(788);
/* GBProxy_Tests.ttcn, line 788 */
for ( ; ; ) {
current_location.update_lineno(788);
/* GBProxy_Tests.ttcn, line 788 */
if (!(i < const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn().lengthof())) break;
current_location.update_lineno(789);
/* GBProxy_Tests.ttcn, line 789 */
f__connect__to__sgsn__bvc(i, COMPONENT(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn()[i].vc__BSSGP__BVC()[0]));
current_location.update_lineno(788);
/* GBProxy_Tests.ttcn, line 788 */
{
INTEGER tmp_138;
++i;
}
}
current_location.update_lineno(792);
/* GBProxy_Tests.ttcn, line 792 */
BSSGP__ConnHdlr_component_g__Tguard.start(const_cast< const BSSGP__ConnHdlrPars&>(pars).t__guard());
current_location.update_lineno(793);
/* GBProxy_Tests.ttcn, line 793 */
activate_as__gTguard(BSSGP__ConnHdlr_component_g__Tguard);
current_location.update_lineno(796);
/* GBProxy_Tests.ttcn, line 796 */
fn.invoke(id);
current_location.update_lineno(798);
/* GBProxy_Tests.ttcn, line 798 */
i = 0;
current_location.update_lineno(798);
/* GBProxy_Tests.ttcn, line 798 */
for ( ; ; ) {
current_location.update_lineno(798);
/* GBProxy_Tests.ttcn, line 798 */
if (!(i < 2)) break;
current_location.update_lineno(799);
/* GBProxy_Tests.ttcn, line 799 */
if (BSSGP__ConnHdlr_component_SGSN__PROC[i].check_port_state(cs_26)) {
current_location.update_lineno(800);
/* GBProxy_Tests.ttcn, line 800 */
f__client__unregister(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), BSSGP__ConnHdlr_component_SGSN__PROC[i]);
}
current_location.update_lineno(798);
/* GBProxy_Tests.ttcn, line 798 */
{
INTEGER tmp_140;
++i;
}
}
current_location.update_lineno(804);
/* GBProxy_Tests.ttcn, line 804 */
i = 0;
current_location.update_lineno(804);
/* GBProxy_Tests.ttcn, line 804 */
for ( ; ; ) {
current_location.update_lineno(804);
/* GBProxy_Tests.ttcn, line 804 */
if (!(i < 3)) break;
current_location.update_lineno(805);
/* GBProxy_Tests.ttcn, line 805 */
if (BSSGP__ConnHdlr_component_PCU__PROC[i].check_port_state(cs_26)) {
current_location.update_lineno(806);
/* GBProxy_Tests.ttcn, line 806 */
f__client__unregister(HEXSTRING(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), BSSGP__ConnHdlr_component_PCU__PROC[i]);
}
current_location.update_lineno(804);
/* GBProxy_Tests.ttcn, line 804 */
{
INTEGER tmp_142;
++i;
}
}
}

void start_f__handler__init(const COMPONENT& component_reference, const void__fn& fn, const CHARSTRING& id, const BSSGP__ConnHdlrPars& pars)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_handler_init(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
pars.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_handler_init", text_buf);
fn.encode_text(text_buf);
id.encode_text(text_buf);
pars.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__client__register(const HEXSTRING& imsi, const OCTETSTRING& tlli, BSSGP__Emulation::BSSGP__PROC__PT& PT)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 811, TTCN_Location::LOCATION_FUNCTION, "f_client_register");
current_location.update_lineno(813);
/* GBProxy_Tests.ttcn, line 813 */
{
BSSGP__Emulation::BSSGP__register__client_template tmp_143;
tmp_143.imsi() = imsi;
tmp_143.tlli() = tlli;
PT.call(tmp_143, NULL);
}
{
alt_status tmp_144_alt_flag_0 = ALT_MAYBE;
current_location.update_lineno(813);
/* GBProxy_Tests.ttcn, line 813 */
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_144_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(814);
/* GBProxy_Tests.ttcn, line 814 */
{
BSSGP__Emulation::BSSGP__register__client_template tmp_145;
tmp_145.imsi() = imsi;
tmp_145.tlli() = tlli;
tmp_144_alt_flag_0 = PT.getreply(tmp_145, any_compref, BSSGP__Emulation::BSSGP__register__client_reply_redirect(), NULL, NULL, NULL);
}
if (tmp_144_alt_flag_0 == ALT_YES) break;
}
current_location.update_lineno(813);
/* GBProxy_Tests.ttcn, line 813 */
if (tmp_144_alt_flag_0 == ALT_NO) TTCN_error("None of the branches can be chosen in the response and exception handling part of call statement in file GBProxy_Tests.ttcn between lines 813 and 815.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void f__client__unregister(const HEXSTRING& imsi, BSSGP__Emulation::BSSGP__PROC__PT& PT)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 818, TTCN_Location::LOCATION_FUNCTION, "f_client_unregister");
current_location.update_lineno(820);
/* GBProxy_Tests.ttcn, line 820 */
{
BSSGP__Emulation::BSSGP__unregister__client_template tmp_146;
tmp_146.imsi() = imsi;
PT.call(tmp_146, NULL);
}
{
alt_status tmp_147_alt_flag_0 = ALT_MAYBE;
current_location.update_lineno(820);
/* GBProxy_Tests.ttcn, line 820 */
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_147_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(821);
/* GBProxy_Tests.ttcn, line 821 */
{
BSSGP__Emulation::BSSGP__unregister__client_template tmp_148;
tmp_148.imsi() = imsi;
tmp_147_alt_flag_0 = PT.getreply(tmp_148, any_compref, BSSGP__Emulation::BSSGP__unregister__client_reply_redirect(), NULL, NULL, NULL);
}
if (tmp_147_alt_flag_0 == ALT_YES) break;
}
current_location.update_lineno(820);
/* GBProxy_Tests.ttcn, line 820 */
if (tmp_147_alt_flag_0 == ALT_NO) TTCN_error("None of the branches can be chosen in the response and exception handling part of call statement in file GBProxy_Tests.ttcn between lines 820 and 822.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void f__pcu2sgsn(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 826, TTCN_Location::LOCATION_FUNCTION, "f_pcu2sgsn");
current_location.update_lineno(828);
/* GBProxy_Tests.ttcn, line 828 */
INTEGER sgsn__idx(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx());
current_location.update_lineno(829);
/* GBProxy_Tests.ttcn, line 829 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(830);
/* GBProxy_Tests.ttcn, line 830 */
TIMER T("T", 2.0);
current_location.update_lineno(832);
/* GBProxy_Tests.ttcn, line 832 */
if (use__sig) {
current_location.update_lineno(833);
/* GBProxy_Tests.ttcn, line 833 */
BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].send(tx, NULL);
}
else {
current_location.update_lineno(835);
/* GBProxy_Tests.ttcn, line 835 */
BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].send(tx, NULL);
}
current_location.update_lineno(838);
/* GBProxy_Tests.ttcn, line 838 */
T.start();
current_location.update_lineno(839);
/* GBProxy_Tests.ttcn, line 839 */
{
tmp_149:
alt_status tmp_149_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_149_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_149_alt_flag_2 = ALT_MAYBE;
alt_status tmp_149_alt_flag_3 = ALT_MAYBE;
alt_status tmp_149_alt_flag_4 = ALT_MAYBE;
alt_status tmp_149_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_149_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(840);
/* GBProxy_Tests.ttcn, line 840 */
if (use__sig) tmp_149_alt_flag_0 = ALT_MAYBE;
else tmp_149_alt_flag_0 = ALT_NO;
}
if (tmp_149_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(840);
/* GBProxy_Tests.ttcn, line 840 */
tmp_149_alt_flag_0 = BSSGP__ConnHdlr_component_SGSN__SIG[sgsn__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_149_alt_flag_0 == ALT_YES) {
current_location.update_lineno(841);
/* GBProxy_Tests.ttcn, line 841 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_149_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(843);
/* GBProxy_Tests.ttcn, line 843 */
if ((!(use__sig))) tmp_149_alt_flag_1 = ALT_MAYBE;
else tmp_149_alt_flag_1 = ALT_NO;
}
if (tmp_149_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(843);
/* GBProxy_Tests.ttcn, line 843 */
tmp_149_alt_flag_1 = BSSGP__ConnHdlr_component_SGSN__PTP[sgsn__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_149_alt_flag_1 == ALT_YES) {
current_location.update_lineno(844);
/* GBProxy_Tests.ttcn, line 844 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_149_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(846);
/* GBProxy_Tests.ttcn, line 846 */
tmp_149_alt_flag_2 = BSSGP__ConnHdlr_component_SGSN__PTP[sgsn__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_149_alt_flag_2 == ALT_YES) {
current_location.update_lineno(847);
/* GBProxy_Tests.ttcn, line 847 */
Misc__Helpers::f__shutdown(cs_21, 847, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on SGSN["),sgsn__idx.log(),TTCN_Logger::log_event_str("] side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_149_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(850);
/* GBProxy_Tests.ttcn, line 850 */
tmp_149_alt_flag_3 = BSSGP__ConnHdlr_component_SGSN__SIG[sgsn__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_149_alt_flag_3 == ALT_YES) {
current_location.update_lineno(851);
/* GBProxy_Tests.ttcn, line 851 */
Misc__Helpers::f__shutdown(cs_21, 851, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected SIG BSSGP on SGSN["),sgsn__idx.log(),TTCN_Logger::log_event_str("] side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_149_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(854);
/* GBProxy_Tests.ttcn, line 854 */
tmp_149_alt_flag_4 = T.timeout(NULL);
if (tmp_149_alt_flag_4 == ALT_YES) {
current_location.update_lineno(855);
/* GBProxy_Tests.ttcn, line 855 */
Misc__Helpers::f__shutdown(cs_21, 855, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on SGSN["),sgsn__idx.log(),TTCN_Logger::log_event_str("] side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_149_default_flag == ALT_MAYBE) {
tmp_149_default_flag = TTCN_Default::try_altsteps();
if (tmp_149_default_flag == ALT_YES || tmp_149_default_flag == ALT_BREAK) break;
else if (tmp_149_default_flag == ALT_REPEAT) goto tmp_149;
}
current_location.update_lineno(839);
/* GBProxy_Tests.ttcn, line 839 */
if (tmp_149_alt_flag_0 == ALT_NO && tmp_149_alt_flag_1 == ALT_NO && tmp_149_alt_flag_2 == ALT_NO && tmp_149_alt_flag_3 == ALT_NO && tmp_149_alt_flag_4 == ALT_NO && tmp_149_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 839 and 858.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__pcu2sgsn(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_pcu2sgsn", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

INTEGER f__pcu2any__sgsn(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 862, TTCN_Location::LOCATION_FUNCTION, "f_pcu2any_sgsn");
current_location.update_lineno(865);
/* GBProxy_Tests.ttcn, line 865 */
INTEGER rx__idx(-1);
current_location.update_lineno(866);
/* GBProxy_Tests.ttcn, line 866 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(867);
/* GBProxy_Tests.ttcn, line 867 */
TIMER T("T", 2.0);
current_location.update_lineno(869);
/* GBProxy_Tests.ttcn, line 869 */
if (use__sig) {
current_location.update_lineno(870);
/* GBProxy_Tests.ttcn, line 870 */
BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].send(tx, NULL);
}
else {
current_location.update_lineno(872);
/* GBProxy_Tests.ttcn, line 872 */
BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].send(tx, NULL);
}
current_location.update_lineno(875);
/* GBProxy_Tests.ttcn, line 875 */
T.start();
current_location.update_lineno(876);
/* GBProxy_Tests.ttcn, line 876 */
{
tmp_150:
alt_status tmp_150_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_150_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_150_alt_flag_2 = ALT_MAYBE;
alt_status tmp_150_alt_flag_3 = ALT_MAYBE;
alt_status tmp_150_alt_flag_4 = ALT_MAYBE;
alt_status tmp_150_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_150_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(877);
/* GBProxy_Tests.ttcn, line 877 */
if (use__sig) tmp_150_alt_flag_0 = ALT_MAYBE;
else tmp_150_alt_flag_0 = ALT_NO;
}
if (tmp_150_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(877);
/* GBProxy_Tests.ttcn, line 877 */
{
class Index_Redirect_tmp_151 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_151(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_151 tmp_152(&(rx__idx));
tmp_150_alt_flag_0 = BSSGP__ConnHdlr_component_SGSN__SIG.receive(exp__rx, NULL, any_compref, NULL, NULL, &tmp_152);
}
if (tmp_150_alt_flag_0 == ALT_YES) {
current_location.update_lineno(878);
/* GBProxy_Tests.ttcn, line 878 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_150_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(880);
/* GBProxy_Tests.ttcn, line 880 */
if ((!(use__sig))) tmp_150_alt_flag_1 = ALT_MAYBE;
else tmp_150_alt_flag_1 = ALT_NO;
}
if (tmp_150_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(880);
/* GBProxy_Tests.ttcn, line 880 */
{
class Index_Redirect_tmp_153 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_153(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_153 tmp_154(&(rx__idx));
tmp_150_alt_flag_1 = BSSGP__ConnHdlr_component_SGSN__PTP.receive(exp__rx, NULL, any_compref, NULL, NULL, &tmp_154);
}
if (tmp_150_alt_flag_1 == ALT_YES) {
current_location.update_lineno(881);
/* GBProxy_Tests.ttcn, line 881 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_150_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(883);
/* GBProxy_Tests.ttcn, line 883 */
{
class Index_Redirect_tmp_155 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_155(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_155 tmp_156(&(rx__idx));
tmp_150_alt_flag_2 = BSSGP__ConnHdlr_component_SGSN__PTP.receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, &tmp_156);
}
if (tmp_150_alt_flag_2 == ALT_YES) {
current_location.update_lineno(884);
/* GBProxy_Tests.ttcn, line 884 */
Misc__Helpers::f__shutdown(cs_21, 884, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on SGSN["),rx__idx.log(),TTCN_Logger::log_event_str("] side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_150_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(887);
/* GBProxy_Tests.ttcn, line 887 */
{
class Index_Redirect_tmp_157 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_157(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_157 tmp_158(&(rx__idx));
tmp_150_alt_flag_3 = BSSGP__ConnHdlr_component_SGSN__SIG.receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, &tmp_158);
}
if (tmp_150_alt_flag_3 == ALT_YES) {
current_location.update_lineno(888);
/* GBProxy_Tests.ttcn, line 888 */
Misc__Helpers::f__shutdown(cs_21, 888, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected SIG BSSGP on SGSN["),rx__idx.log(),TTCN_Logger::log_event_str("] side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_150_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(891);
/* GBProxy_Tests.ttcn, line 891 */
tmp_150_alt_flag_4 = T.timeout(NULL);
if (tmp_150_alt_flag_4 == ALT_YES) {
current_location.update_lineno(892);
/* GBProxy_Tests.ttcn, line 892 */
Misc__Helpers::f__shutdown(cs_21, 892, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on SGSN side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_150_default_flag == ALT_MAYBE) {
tmp_150_default_flag = TTCN_Default::try_altsteps();
if (tmp_150_default_flag == ALT_YES || tmp_150_default_flag == ALT_BREAK) break;
else if (tmp_150_default_flag == ALT_REPEAT) goto tmp_150;
}
current_location.update_lineno(876);
/* GBProxy_Tests.ttcn, line 876 */
if (tmp_150_alt_flag_0 == ALT_NO && tmp_150_alt_flag_1 == ALT_NO && tmp_150_alt_flag_2 == ALT_NO && tmp_150_alt_flag_3 == ALT_NO && tmp_150_alt_flag_4 == ALT_NO && tmp_150_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 876 and 895.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(896);
/* GBProxy_Tests.ttcn, line 896 */
return rx__idx;
}

void start_f__pcu2any__sgsn(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_pcu2any_sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_pcu2any_sgsn", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__sgsn2pcu(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 900, TTCN_Location::LOCATION_FUNCTION, "f_sgsn2pcu");
current_location.update_lineno(902);
/* GBProxy_Tests.ttcn, line 902 */
INTEGER sgsn__idx(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx());
current_location.update_lineno(903);
/* GBProxy_Tests.ttcn, line 903 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(904);
/* GBProxy_Tests.ttcn, line 904 */
TIMER T("T", 2.0);
current_location.update_lineno(906);
/* GBProxy_Tests.ttcn, line 906 */
if (use__sig) {
current_location.update_lineno(907);
/* GBProxy_Tests.ttcn, line 907 */
BSSGP__ConnHdlr_component_SGSN__SIG[sgsn__idx].send(tx, NULL);
}
else {
current_location.update_lineno(909);
/* GBProxy_Tests.ttcn, line 909 */
BSSGP__ConnHdlr_component_SGSN__PTP[sgsn__idx].send(tx, NULL);
}
current_location.update_lineno(912);
/* GBProxy_Tests.ttcn, line 912 */
T.start();
current_location.update_lineno(913);
/* GBProxy_Tests.ttcn, line 913 */
{
tmp_159:
alt_status tmp_159_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_159_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_159_alt_flag_2 = ALT_MAYBE;
alt_status tmp_159_alt_flag_3 = ALT_MAYBE;
alt_status tmp_159_alt_flag_4 = ALT_MAYBE;
alt_status tmp_159_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_159_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(914);
/* GBProxy_Tests.ttcn, line 914 */
if (use__sig) tmp_159_alt_flag_0 = ALT_MAYBE;
else tmp_159_alt_flag_0 = ALT_NO;
}
if (tmp_159_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(914);
/* GBProxy_Tests.ttcn, line 914 */
tmp_159_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_159_alt_flag_0 == ALT_YES) {
current_location.update_lineno(915);
/* GBProxy_Tests.ttcn, line 915 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_159_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(917);
/* GBProxy_Tests.ttcn, line 917 */
if ((!(use__sig))) tmp_159_alt_flag_1 = ALT_MAYBE;
else tmp_159_alt_flag_1 = ALT_NO;
}
if (tmp_159_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(917);
/* GBProxy_Tests.ttcn, line 917 */
tmp_159_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_159_alt_flag_1 == ALT_YES) {
current_location.update_lineno(918);
/* GBProxy_Tests.ttcn, line 918 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_159_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(920);
/* GBProxy_Tests.ttcn, line 920 */
tmp_159_alt_flag_2 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_159_alt_flag_2 == ALT_YES) {
current_location.update_lineno(921);
/* GBProxy_Tests.ttcn, line 921 */
Misc__Helpers::f__shutdown(cs_21, 921, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on PCU side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_159_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(923);
/* GBProxy_Tests.ttcn, line 923 */
tmp_159_alt_flag_3 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_159_alt_flag_3 == ALT_YES) {
current_location.update_lineno(924);
/* GBProxy_Tests.ttcn, line 924 */
Misc__Helpers::f__shutdown(cs_21, 924, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected SIG BSSGP on PCU side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_159_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(926);
/* GBProxy_Tests.ttcn, line 926 */
tmp_159_alt_flag_4 = T.timeout(NULL);
if (tmp_159_alt_flag_4 == ALT_YES) {
current_location.update_lineno(927);
/* GBProxy_Tests.ttcn, line 927 */
Misc__Helpers::f__shutdown(cs_21, 927, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on PCU side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_159_default_flag == ALT_MAYBE) {
tmp_159_default_flag = TTCN_Default::try_altsteps();
if (tmp_159_default_flag == ALT_YES || tmp_159_default_flag == ALT_BREAK) break;
else if (tmp_159_default_flag == ALT_REPEAT) goto tmp_159;
}
current_location.update_lineno(913);
/* GBProxy_Tests.ttcn, line 913 */
if (tmp_159_alt_flag_0 == ALT_NO && tmp_159_alt_flag_1 == ALT_NO && tmp_159_alt_flag_2 == ALT_NO && tmp_159_alt_flag_3 == ALT_NO && tmp_159_alt_flag_4 == ALT_NO && tmp_159_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 913 and 930.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__sgsn2pcu(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_sgsn2pcu", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__init()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 947, TTCN_Location::LOCATION_FUNCTION, "f_global_init");
current_location.update_lineno(948);
/* GBProxy_Tests.ttcn, line 948 */
INTEGER i;
current_location.update_lineno(949);
/* GBProxy_Tests.ttcn, line 949 */
i = 0;
current_location.update_lineno(949);
/* GBProxy_Tests.ttcn, line 949 */
for ( ; ; ) {
current_location.update_lineno(949);
/* GBProxy_Tests.ttcn, line 949 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(950);
/* GBProxy_Tests.ttcn, line 950 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__SGSN[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_GLOBAL.get_name());
current_location.update_lineno(951);
/* GBProxy_Tests.ttcn, line 951 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_RIM__SGSN[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_RIM.get_name());
current_location.update_lineno(949);
/* GBProxy_Tests.ttcn, line 949 */
{
INTEGER tmp_161;
++i;
}
}
current_location.update_lineno(953);
/* GBProxy_Tests.ttcn, line 953 */
i = 0;
current_location.update_lineno(953);
/* GBProxy_Tests.ttcn, line 953 */
for ( ; ; ) {
current_location.update_lineno(953);
/* GBProxy_Tests.ttcn, line 953 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(954);
/* GBProxy_Tests.ttcn, line 954 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__PCU[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_GLOBAL.get_name());
current_location.update_lineno(955);
/* GBProxy_Tests.ttcn, line 955 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_RIM__PCU[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_RIM.get_name());
current_location.update_lineno(953);
/* GBProxy_Tests.ttcn, line 953 */
{
INTEGER tmp_163;
++i;
}
}
}

void start_f__global__init(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_init(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_init", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__init__ptp()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 960, TTCN_Location::LOCATION_FUNCTION, "f_global_init_ptp");
current_location.update_lineno(961);
/* GBProxy_Tests.ttcn, line 961 */
INTEGER i;
current_location.update_lineno(962);
/* GBProxy_Tests.ttcn, line 962 */
i = 0;
current_location.update_lineno(962);
/* GBProxy_Tests.ttcn, line 962 */
for ( ; ; ) {
current_location.update_lineno(962);
/* GBProxy_Tests.ttcn, line 962 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(963);
/* GBProxy_Tests.ttcn, line 963 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Connecting G_SGSN[");
i.log();
TTCN_Logger::log_event_str("] to BVCI=");
const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc()[0].bvci().log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(964);
/* GBProxy_Tests.ttcn, line 964 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__SGSN[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].vc__BSSGP__BVC()[0], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(965);
/* GBProxy_Tests.ttcn, line 965 */
GlobalTest__CT_component_g__sgsn__idx[i] = 0;
current_location.update_lineno(962);
/* GBProxy_Tests.ttcn, line 962 */
{
INTEGER tmp_166;
++i;
}
}
current_location.update_lineno(967);
/* GBProxy_Tests.ttcn, line 967 */
i = 0;
current_location.update_lineno(967);
/* GBProxy_Tests.ttcn, line 967 */
for ( ; ; ) {
current_location.update_lineno(967);
/* GBProxy_Tests.ttcn, line 967 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(968);
/* GBProxy_Tests.ttcn, line 968 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Connecting G_PCU[");
i.log();
TTCN_Logger::log_event_str("] to BVCI=");
const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc()[0].bvci().log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(969);
/* GBProxy_Tests.ttcn, line 969 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__PCU[i].get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].vc__BSSGP__BVC()[0], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(970);
/* GBProxy_Tests.ttcn, line 970 */
GlobalTest__CT_component_g__pcu__idx[i] = 0;
current_location.update_lineno(967);
/* GBProxy_Tests.ttcn, line 967 */
{
INTEGER tmp_169;
++i;
}
}
}

void start_f__global__init__ptp(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_init_ptp(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_init_ptp", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__ptp__connect__sgsn__bvci(const INTEGER& sgsn__idx, const INTEGER& bvci)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 975, TTCN_Location::LOCATION_FUNCTION, "f_global_ptp_connect_sgsn_bvci");
current_location.update_lineno(977);
/* GBProxy_Tests.ttcn, line 977 */
INTEGER sgsn__bvc__idx(get__bvc__idx__for__bvci(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx], bvci));
current_location.update_lineno(978);
/* GBProxy_Tests.ttcn, line 978 */
INTEGER old__sgsn__bvc__idx(const_cast< const VALUE_ARRAY<INTEGER, 2, 0>&>(GlobalTest__CT_component_g__sgsn__idx)[sgsn__idx]);
current_location.update_lineno(979);
/* GBProxy_Tests.ttcn, line 979 */
TTCN_Runtime::disconnect_port(self, GlobalTest__CT_component_G__SGSN[sgsn__idx].get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].vc__BSSGP__BVC()[old__sgsn__bvc__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(980);
/* GBProxy_Tests.ttcn, line 980 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__SGSN[sgsn__idx].get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].vc__BSSGP__BVC()[sgsn__bvc__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(981);
/* GBProxy_Tests.ttcn, line 981 */
GlobalTest__CT_component_g__sgsn__idx[sgsn__idx] = sgsn__bvc__idx;
}

void start_f__global__ptp__connect__sgsn__bvci(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& bvci)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_ptp_connect_sgsn_bvci(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_ptp_connect_sgsn_bvci", text_buf);
sgsn__idx.encode_text(text_buf);
bvci.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__ptp__connect__pcu__bvci(const INTEGER& pcu__idx, const INTEGER& bvci)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 985, TTCN_Location::LOCATION_FUNCTION, "f_global_ptp_connect_pcu_bvci");
current_location.update_lineno(987);
/* GBProxy_Tests.ttcn, line 987 */
INTEGER pcu__bvc__idx(get__bvc__idx__for__bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx], bvci));
current_location.update_lineno(988);
/* GBProxy_Tests.ttcn, line 988 */
INTEGER old__pcu__bvc__idx(const_cast< const VALUE_ARRAY<INTEGER, 3, 0>&>(GlobalTest__CT_component_g__pcu__idx)[pcu__idx]);
current_location.update_lineno(989);
/* GBProxy_Tests.ttcn, line 989 */
TTCN_Runtime::disconnect_port(self, GlobalTest__CT_component_G__PCU[pcu__idx].get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[old__pcu__bvc__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(990);
/* GBProxy_Tests.ttcn, line 990 */
TTCN_Runtime::connect_port(self, GlobalTest__CT_component_G__PCU[pcu__idx].get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[pcu__bvc__idx], BSSGP__Emulation::BSSGP__BVC__CT_component_GLOBAL.get_name());
current_location.update_lineno(991);
/* GBProxy_Tests.ttcn, line 991 */
GlobalTest__CT_component_g__pcu__idx[pcu__idx] = pcu__bvc__idx;
}

void start_f__global__ptp__connect__pcu__bvci(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& bvci)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_ptp_connect_pcu_bvci(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_ptp_connect_pcu_bvci", text_buf);
pcu__idx.encode_text(text_buf);
bvci.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__pcu2sgsn(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const INTEGER& sgsn__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 995, TTCN_Location::LOCATION_FUNCTION, "f_global_pcu2sgsn");
current_location.update_lineno(997);
/* GBProxy_Tests.ttcn, line 997 */
INTEGER rx__idx;
current_location.update_lineno(998);
/* GBProxy_Tests.ttcn, line 998 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(999);
/* GBProxy_Tests.ttcn, line 999 */
TIMER T("T", 2.0);
current_location.update_lineno(1001);
/* GBProxy_Tests.ttcn, line 1001 */
GlobalTest__CT_component_G__PCU[pcu__idx].send(tx, NULL);
current_location.update_lineno(1002);
/* GBProxy_Tests.ttcn, line 1002 */
T.start();
current_location.update_lineno(1003);
/* GBProxy_Tests.ttcn, line 1003 */
{
tmp_172:
alt_status tmp_172_alt_flag_0 = ALT_MAYBE;
alt_status tmp_172_alt_flag_1 = ALT_MAYBE;
alt_status tmp_172_alt_flag_2 = ALT_MAYBE;
alt_status tmp_172_alt_flag_3 = ALT_MAYBE;
alt_status tmp_172_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_172_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1004);
/* GBProxy_Tests.ttcn, line 1004 */
tmp_172_alt_flag_0 = GlobalTest__CT_component_G__SGSN[sgsn__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_172_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1005);
/* GBProxy_Tests.ttcn, line 1005 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_172_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1007);
/* GBProxy_Tests.ttcn, line 1007 */
{
class Index_Redirect_tmp_173 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_173(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_173 tmp_174(&(rx__idx));
tmp_172_alt_flag_1 = GlobalTest__CT_component_G__SGSN.receive(exp__rx, NULL, any_compref, NULL, NULL, &tmp_174);
}
if (tmp_172_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1008);
/* GBProxy_Tests.ttcn, line 1008 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("BSSGP arrived on wrong SGSN["),rx__idx.log(),TTCN_Logger::log_event_str("] instead of SGSN["),sgsn__idx.log(),TTCN_Logger::log_char(']'),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_172_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1010);
/* GBProxy_Tests.ttcn, line 1010 */
tmp_172_alt_flag_2 = GlobalTest__CT_component_G__SGSN[sgsn__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_172_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1011);
/* GBProxy_Tests.ttcn, line 1011 */
Misc__Helpers::f__shutdown(cs_21, 1011, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on SGSN side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_172_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1013);
/* GBProxy_Tests.ttcn, line 1013 */
tmp_172_alt_flag_3 = T.timeout(NULL);
if (tmp_172_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1014);
/* GBProxy_Tests.ttcn, line 1014 */
Misc__Helpers::f__shutdown(cs_21, 1014, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on SGSN side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_172_default_flag == ALT_MAYBE) {
tmp_172_default_flag = TTCN_Default::try_altsteps();
if (tmp_172_default_flag == ALT_YES || tmp_172_default_flag == ALT_BREAK) break;
else if (tmp_172_default_flag == ALT_REPEAT) goto tmp_172;
}
current_location.update_lineno(1003);
/* GBProxy_Tests.ttcn, line 1003 */
if (tmp_172_alt_flag_0 == ALT_NO && tmp_172_alt_flag_1 == ALT_NO && tmp_172_alt_flag_2 == ALT_NO && tmp_172_alt_flag_3 == ALT_NO && tmp_172_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1003 and 1016.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__global__pcu2sgsn(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx, const INTEGER& sgsn__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_pcu2sgsn", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__global__sgsn2pcu(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& sgsn__idx, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1020, TTCN_Location::LOCATION_FUNCTION, "f_global_sgsn2pcu");
current_location.update_lineno(1022);
/* GBProxy_Tests.ttcn, line 1022 */
INTEGER rx__idx;
current_location.update_lineno(1023);
/* GBProxy_Tests.ttcn, line 1023 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(1024);
/* GBProxy_Tests.ttcn, line 1024 */
TIMER T("T", 2.0);
current_location.update_lineno(1026);
/* GBProxy_Tests.ttcn, line 1026 */
GlobalTest__CT_component_G__SGSN[sgsn__idx].send(tx, NULL);
current_location.update_lineno(1027);
/* GBProxy_Tests.ttcn, line 1027 */
T.start();
current_location.update_lineno(1028);
/* GBProxy_Tests.ttcn, line 1028 */
{
tmp_175:
alt_status tmp_175_alt_flag_0 = ALT_MAYBE;
alt_status tmp_175_alt_flag_1 = ALT_MAYBE;
alt_status tmp_175_alt_flag_2 = ALT_MAYBE;
alt_status tmp_175_alt_flag_3 = ALT_MAYBE;
alt_status tmp_175_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_175_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1029);
/* GBProxy_Tests.ttcn, line 1029 */
tmp_175_alt_flag_0 = GlobalTest__CT_component_G__PCU[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_175_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1030);
/* GBProxy_Tests.ttcn, line 1030 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_175_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1032);
/* GBProxy_Tests.ttcn, line 1032 */
{
class Index_Redirect_tmp_176 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_176(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_176 tmp_177(&(rx__idx));
tmp_175_alt_flag_1 = GlobalTest__CT_component_G__PCU.receive(exp__rx, NULL, any_compref, NULL, NULL, &tmp_177);
}
if (tmp_175_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1033);
/* GBProxy_Tests.ttcn, line 1033 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("BSSGP arrived on wrong PCU["),rx__idx.log(),TTCN_Logger::log_event_str("] instead of PCU["),pcu__idx.log(),TTCN_Logger::log_char(']'),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_175_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1035);
/* GBProxy_Tests.ttcn, line 1035 */
tmp_175_alt_flag_2 = GlobalTest__CT_component_G__PCU[pcu__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_175_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1036);
/* GBProxy_Tests.ttcn, line 1036 */
Misc__Helpers::f__shutdown(cs_21, 1036, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on PCU side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_175_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1038);
/* GBProxy_Tests.ttcn, line 1038 */
tmp_175_alt_flag_3 = T.timeout(NULL);
if (tmp_175_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1039);
/* GBProxy_Tests.ttcn, line 1039 */
Misc__Helpers::f__shutdown(cs_21, 1039, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on PCU side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_175_default_flag == ALT_MAYBE) {
tmp_175_default_flag = TTCN_Default::try_altsteps();
if (tmp_175_default_flag == ALT_YES || tmp_175_default_flag == ALT_BREAK) break;
else if (tmp_175_default_flag == ALT_REPEAT) goto tmp_175;
}
current_location.update_lineno(1028);
/* GBProxy_Tests.ttcn, line 1028 */
if (tmp_175_alt_flag_0 == ALT_NO && tmp_175_alt_flag_1 == ALT_NO && tmp_175_alt_flag_2 == ALT_NO && tmp_175_alt_flag_3 == ALT_NO && tmp_175_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1028 and 1041.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__global__sgsn2pcu(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& sgsn__idx, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_global_sgsn2pcu", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__BVC__bringup(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1059, TTCN_Location::LOCATION_FUNCTION, "f_TC_BVC_bringup");
current_location.update_lineno(1060);
/* GBProxy_Tests.ttcn, line 1060 */
Osmocom__Types::f__sleep(5.0);
current_location.update_lineno(1061);
/* GBProxy_Tests.ttcn, line 1061 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__BVC__bringup(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_BVC_bringup(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_BVC_bringup", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__BVC__bringup(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1064, TTCN_Location::LOCATION_TESTCASE, "TC_BVC_bringup");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_BVC_bringup", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1065);
/* GBProxy_Tests.ttcn, line 1065 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1066);
/* GBProxy_Tests.ttcn, line 1066 */
f__start__handlers(&f__TC__BVC__bringup, cs_28, 51, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1067);
/* GBProxy_Tests.ttcn, line 1067 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_BVC_bringup was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__BVC__bringup__conflicting(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1070, TTCN_Location::LOCATION_TESTCASE, "TC_BVC_bringup_conflicting");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_BVC_bringup_conflicting", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1071);
/* GBProxy_Tests.ttcn, line 1071 */
FLOAT t__guard(1.5e1);
current_location.update_lineno(1072);
/* GBProxy_Tests.ttcn, line 1072 */
BSSGP__Emulation::BssgpStatusIndication bsi;
current_location.update_lineno(1073);
/* GBProxy_Tests.ttcn, line 1073 */
INTEGER i;
current_location.update_lineno(1076);
/* GBProxy_Tests.ttcn, line 1076 */
test__CT_component_g__Tguard.start(t__guard);
current_location.update_lineno(1077);
/* GBProxy_Tests.ttcn, line 1077 */
activate_as__gTguard(test__CT_component_g__Tguard);
current_location.update_lineno(1079);
/* GBProxy_Tests.ttcn, line 1079 */
Osmocom__CTRL__Adapter::f__ipa__ctrl__start__client(mp__gbproxy__ip, mp__gbproxy__ctrl__port);
current_location.update_lineno(1081);
/* GBProxy_Tests.ttcn, line 1081 */
BSSGP__Emulation::BssgpBvcConfigs bvcs(NULL_VALUE);
current_location.update_lineno(1082);
/* GBProxy_Tests.ttcn, line 1082 */
i = 0;
current_location.update_lineno(1082);
/* GBProxy_Tests.ttcn, line 1082 */
for ( ; ; ) {
current_location.update_lineno(1082);
/* GBProxy_Tests.ttcn, line 1082 */
if (!(i < mp__gbconfigs.lengthof())) break;
current_location.update_lineno(1083);
/* GBProxy_Tests.ttcn, line 1083 */
test__CT_component_g__pcu[i].cfg() = const_cast< const BssgpConfigs&>(mp__gbconfigs)[i];
current_location.update_lineno(1084);
/* GBProxy_Tests.ttcn, line 1084 */
test__CT_component_g__pcu[i].cfg().bvc()[0].bvci() = 23;
current_location.update_lineno(1086);
/* GBProxy_Tests.ttcn, line 1086 */
f__fix__create__cb(test__CT_component_g__pcu[i].cfg());
current_location.update_lineno(1088);
/* GBProxy_Tests.ttcn, line 1088 */
{
BSSGP__Emulation::BssgpBvcConfigs tmp_181;
tmp_181 = (bvcs + const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc());
bvcs = tmp_181;
}
current_location.update_lineno(1082);
/* GBProxy_Tests.ttcn, line 1082 */
{
INTEGER tmp_182;
++i;
}
}
current_location.update_lineno(1091);
/* GBProxy_Tests.ttcn, line 1091 */
i = 0;
current_location.update_lineno(1091);
/* GBProxy_Tests.ttcn, line 1091 */
for ( ; ; ) {
current_location.update_lineno(1091);
/* GBProxy_Tests.ttcn, line 1091 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(1092);
/* GBProxy_Tests.ttcn, line 1092 */
{
BSSGP__Emulation::BssgpConfig& tmp_185 = test__CT_component_g__sgsn[i].cfg(); /* 7388 */
tmp_185.nsei() = const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei();
tmp_185.sgsn__role() = TRUE;
tmp_185.bvc() = bvcs;
}
current_location.update_lineno(1091);
/* GBProxy_Tests.ttcn, line 1091 */
{
INTEGER tmp_186;
++i;
}
}
current_location.update_lineno(1099);
/* GBProxy_Tests.ttcn, line 1099 */
f__init__vty();
current_location.update_lineno(1100);
/* GBProxy_Tests.ttcn, line 1100 */
i = 0;
current_location.update_lineno(1100);
/* GBProxy_Tests.ttcn, line 1100 */
for ( ; ; ) {
current_location.update_lineno(1100);
/* GBProxy_Tests.ttcn, line 1100 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(1101);
/* GBProxy_Tests.ttcn, line 1101 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_16 + int2str(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().nsei())) + cs_17), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(1100);
/* GBProxy_Tests.ttcn, line 1100 */
{
INTEGER tmp_188;
++i;
}
}
current_location.update_lineno(1103);
/* GBProxy_Tests.ttcn, line 1103 */
i = 0;
current_location.update_lineno(1103);
/* GBProxy_Tests.ttcn, line 1103 */
for ( ; ; ) {
current_location.update_lineno(1103);
/* GBProxy_Tests.ttcn, line 1103 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(1104);
/* GBProxy_Tests.ttcn, line 1104 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_16 + int2str(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().nsei())) + cs_17), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(1105);
/* GBProxy_Tests.ttcn, line 1105 */
Osmocom__VTY__Functions::f__vty__transceive(test__CT_component_GBPVTY, ((cs_18 + int2str(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().nsei())) + cs_19), Osmocom__VTY__Functions::f__vty__transceive_strict_defval);
current_location.update_lineno(1103);
/* GBProxy_Tests.ttcn, line 1103 */
{
INTEGER tmp_190;
++i;
}
}
current_location.update_lineno(1108);
/* GBProxy_Tests.ttcn, line 1108 */
i = 0;
current_location.update_lineno(1108);
/* GBProxy_Tests.ttcn, line 1108 */
for ( ; ; ) {
current_location.update_lineno(1108);
/* GBProxy_Tests.ttcn, line 1108 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(1109);
/* GBProxy_Tests.ttcn, line 1109 */
f__init__gb__sgsn(test__CT_component_g__sgsn[i], cs_20, i);
current_location.update_lineno(1108);
/* GBProxy_Tests.ttcn, line 1108 */
{
INTEGER tmp_192;
++i;
}
}
current_location.update_lineno(1111);
/* GBProxy_Tests.ttcn, line 1111 */
Osmocom__Types::f__sleep(4.0);
current_location.update_lineno(1112);
/* GBProxy_Tests.ttcn, line 1112 */
i = 0;
current_location.update_lineno(1112);
/* GBProxy_Tests.ttcn, line 1112 */
for ( ; ; ) {
current_location.update_lineno(1112);
/* GBProxy_Tests.ttcn, line 1112 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(1113);
/* GBProxy_Tests.ttcn, line 1113 */
f__init__gb__pcu(test__CT_component_g__pcu[i], cs_20, i);
current_location.update_lineno(1112);
/* GBProxy_Tests.ttcn, line 1112 */
{
INTEGER tmp_194;
++i;
}
}
current_location.update_lineno(1117);
/* GBProxy_Tests.ttcn, line 1117 */
TIMER T("T", 5.0);
current_location.update_lineno(1118);
/* GBProxy_Tests.ttcn, line 1118 */
T.start();
current_location.update_lineno(1119);
/* GBProxy_Tests.ttcn, line 1119 */
{
tmp_195:
alt_status tmp_195_alt_flag_0 = ALT_MAYBE;
alt_status tmp_195_alt_flag_1 = ALT_MAYBE;
alt_status tmp_195_alt_flag_2 = ALT_MAYBE;
alt_status tmp_195_alt_flag_3 = ALT_MAYBE;
alt_status tmp_195_alt_flag_4 = ALT_MAYBE;
alt_status tmp_195_alt_flag_5 = ALT_MAYBE;
alt_status tmp_195_alt_flag_6 = ALT_MAYBE;
alt_status tmp_195_alt_flag_7 = ALT_MAYBE;
alt_status tmp_195_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_195_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1120);
/* GBProxy_Tests.ttcn, line 1120 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_196;
tmp_196.nsei() = ANY_OR_OMIT;
tmp_196.bvci() = ANY_VALUE;
tmp_196.state() = ANY_VALUE;
tmp_195_alt_flag_0 = test__CT_component_SGSN__MGMT.receive(tmp_196, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_195_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1121);
/* GBProxy_Tests.ttcn, line 1121 */
goto tmp_195;
}
}
if (tmp_195_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1123);
/* GBProxy_Tests.ttcn, line 1123 */
tmp_195_alt_flag_1 = test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::BssgpResetIndication_template(ANY_VALUE), NULL, any_compref, NULL, NULL, NULL);
if (tmp_195_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1124);
/* GBProxy_Tests.ttcn, line 1124 */
goto tmp_195;
}
}
if (tmp_195_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1126);
/* GBProxy_Tests.ttcn, line 1126 */
tmp_195_alt_flag_2 = test__CT_component_SGSN__MGMT.receive(any_compref, NULL, NULL, NULL);
if (tmp_195_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1127);
/* GBProxy_Tests.ttcn, line 1127 */
Misc__Helpers::f__shutdown(cs_21, 1127, FAIL, cs_22);
break;
}
}
if (tmp_195_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1129);
/* GBProxy_Tests.ttcn, line 1129 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_197;
tmp_197.nsei() = ANY_OR_OMIT;
tmp_197.bvci() = ANY_VALUE;
tmp_197.state() = BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED;
tmp_195_alt_flag_3 = test__CT_component_PCU__MGMT.receive(tmp_197, &(bsi), any_compref, NULL, NULL, NULL);
}
if (tmp_195_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1130);
/* GBProxy_Tests.ttcn, line 1130 */
goto tmp_195;
}
}
if (tmp_195_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1132);
/* GBProxy_Tests.ttcn, line 1132 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_198;
tmp_198.nsei() = ANY_OR_OMIT;
tmp_198.bvci() = ANY_VALUE;
tmp_198.state() = ANY_VALUE;
tmp_195_alt_flag_4 = test__CT_component_PCU__MGMT.receive(tmp_198, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_195_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1133);
/* GBProxy_Tests.ttcn, line 1133 */
goto tmp_195;
}
}
if (tmp_195_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(1135);
/* GBProxy_Tests.ttcn, line 1135 */
{
BSSGP__Emulation::BssgpResetIndication_template tmp_199;
tmp_199.bvci() = 0;
tmp_195_alt_flag_5 = test__CT_component_PCU__MGMT.receive(tmp_199, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_195_alt_flag_5 == ALT_YES) {
current_location.update_lineno(1136);
/* GBProxy_Tests.ttcn, line 1136 */
goto tmp_195;
}
}
if (tmp_195_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(1138);
/* GBProxy_Tests.ttcn, line 1138 */
tmp_195_alt_flag_6 = test__CT_component_PCU__MGMT.receive(any_compref, NULL, NULL, NULL);
if (tmp_195_alt_flag_6 == ALT_YES) {
current_location.update_lineno(1139);
/* GBProxy_Tests.ttcn, line 1139 */
Misc__Helpers::f__shutdown(cs_21, 1139, FAIL, cs_23);
break;
}
}
if (tmp_195_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(1141);
/* GBProxy_Tests.ttcn, line 1141 */
tmp_195_alt_flag_7 = T.timeout(NULL);
if (tmp_195_alt_flag_7 == ALT_YES) break;
}
if (tmp_195_default_flag == ALT_MAYBE) {
tmp_195_default_flag = TTCN_Default::try_altsteps();
if (tmp_195_default_flag == ALT_YES || tmp_195_default_flag == ALT_BREAK) break;
else if (tmp_195_default_flag == ALT_REPEAT) goto tmp_195;
}
current_location.update_lineno(1119);
/* GBProxy_Tests.ttcn, line 1119 */
if (tmp_195_alt_flag_0 == ALT_NO && tmp_195_alt_flag_1 == ALT_NO && tmp_195_alt_flag_2 == ALT_NO && tmp_195_alt_flag_3 == ALT_NO && tmp_195_alt_flag_4 == ALT_NO && tmp_195_alt_flag_5 == ALT_NO && tmp_195_alt_flag_6 == ALT_NO && tmp_195_alt_flag_7 == ALT_NO && tmp_195_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1119 and 1143.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(1147);
/* GBProxy_Tests.ttcn, line 1147 */
Osmocom__Types::f__sleep(2.0e-1);
current_location.update_lineno(1151);
/* GBProxy_Tests.ttcn, line 1151 */
i = 0;
current_location.update_lineno(1151);
/* GBProxy_Tests.ttcn, line 1151 */
for ( ; ; ) {
current_location.update_lineno(1151);
/* GBProxy_Tests.ttcn, line 1151 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(1152);
/* GBProxy_Tests.ttcn, line 1152 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei(), 0, CHARSTRING_template(cs_24));
{
current_location.update_lineno(1154);
/* GBProxy_Tests.ttcn, line 1154 */
INTEGER j(0);
current_location.update_lineno(1154);
/* GBProxy_Tests.ttcn, line 1154 */
for ( ; ; ) {
current_location.update_lineno(1154);
/* GBProxy_Tests.ttcn, line 1154 */
if (!(j < const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc().lengthof())) break;
{
current_location.update_lineno(1155);
/* GBProxy_Tests.ttcn, line 1155 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].cfg().bvc()[j].bvci());
current_location.update_lineno(1156);
/* GBProxy_Tests.ttcn, line 1156 */
if ((bvci == 23)) {
current_location.update_lineno(1157);
/* GBProxy_Tests.ttcn, line 1157 */
goto tmp_201;
}
current_location.update_lineno(1159);
/* GBProxy_Tests.ttcn, line 1159 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsei(), bvci, CHARSTRING_template(cs_24));
}
tmp_201:
current_location.update_lineno(1154);
/* GBProxy_Tests.ttcn, line 1154 */
{
INTEGER tmp_202;
++j;
}
}
}
current_location.update_lineno(1151);
/* GBProxy_Tests.ttcn, line 1151 */
{
INTEGER tmp_203;
++i;
}
}
current_location.update_lineno(1163);
/* GBProxy_Tests.ttcn, line 1163 */
i = 0;
current_location.update_lineno(1163);
/* GBProxy_Tests.ttcn, line 1163 */
for ( ; ; ) {
current_location.update_lineno(1163);
/* GBProxy_Tests.ttcn, line 1163 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(1164);
/* GBProxy_Tests.ttcn, line 1164 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei(), 0, CHARSTRING_template(cs_24));
{
current_location.update_lineno(1166);
/* GBProxy_Tests.ttcn, line 1166 */
INTEGER j(0);
current_location.update_lineno(1166);
/* GBProxy_Tests.ttcn, line 1166 */
for ( ; ; ) {
current_location.update_lineno(1166);
/* GBProxy_Tests.ttcn, line 1166 */
if (!(j < const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc().lengthof())) break;
{
current_location.update_lineno(1167);
/* GBProxy_Tests.ttcn, line 1167 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[i].cfg().bvc()[j].bvci());
current_location.update_lineno(1168);
/* GBProxy_Tests.ttcn, line 1168 */
if ((bvci == 23)) {
current_location.update_lineno(1169);
/* GBProxy_Tests.ttcn, line 1169 */
goto tmp_205;
}
current_location.update_lineno(1171);
/* GBProxy_Tests.ttcn, line 1171 */
f__bvc__fsm__ensure__state(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei(), bvci, CHARSTRING_template(cs_24));
}
tmp_205:
current_location.update_lineno(1166);
/* GBProxy_Tests.ttcn, line 1166 */
{
INTEGER tmp_206;
++j;
}
}
}
current_location.update_lineno(1163);
/* GBProxy_Tests.ttcn, line 1163 */
{
INTEGER tmp_207;
++i;
}
}
current_location.update_lineno(1176);
/* GBProxy_Tests.ttcn, line 1176 */
test__CT_component_g__Tguard.start(t__guard);
current_location.update_lineno(1177);
/* GBProxy_Tests.ttcn, line 1177 */
f__start__handlers(&f__TC__BVC__bringup, cs_29, 51, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1178);
/* GBProxy_Tests.ttcn, line 1178 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_BVC_bringup_conflicting was stopped.");
}
return TTCN_Runtime::end_testcase();
}

OCTETSTRING f__bssgp__suspend(const INTEGER& ran__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1181, TTCN_Location::LOCATION_FUNCTION, "f_bssgp_suspend");
current_location.update_lineno(1182);
/* GBProxy_Tests.ttcn, line 1182 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[ran__idx].cfg().bvc()[0]);
current_location.update_lineno(1183);
/* GBProxy_Tests.ttcn, line 1183 */
TIMER T("T", 5.0);
current_location.update_lineno(1184);
/* GBProxy_Tests.ttcn, line 1184 */
BSSGP__Types::PDU__BSSGP rx__pdu;
current_location.update_lineno(1185);
/* GBProxy_Tests.ttcn, line 1185 */
BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].send(Osmocom__Gb__Types::ts__BSSGP__SUSPEND(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id()), NULL);
current_location.update_lineno(1186);
/* GBProxy_Tests.ttcn, line 1186 */
T.start();
current_location.update_lineno(1187);
/* GBProxy_Tests.ttcn, line 1187 */
{
tmp_208:
alt_status tmp_208_alt_flag_0 = ALT_MAYBE;
alt_status tmp_208_alt_flag_1 = ALT_MAYBE;
alt_status tmp_208_alt_flag_2 = ALT_MAYBE;
alt_status tmp_208_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_208_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1188);
/* GBProxy_Tests.ttcn, line 1188 */
tmp_208_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].receive(Osmocom__Gb__Types::tr__BSSGP__SUSPEND__ACK(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id(), OCTETSTRING_template(ANY_VALUE)), &(rx__pdu), any_compref, NULL, NULL, NULL);
if (tmp_208_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1189);
/* GBProxy_Tests.ttcn, line 1189 */
return const_cast< const BSSGP__Types::PDU__BSSGP&>(rx__pdu).pDU__BSSGP__SUSPEND__ACK().suspend__Reference__Number().suspend__Reference__Number__value();
}
}
if (tmp_208_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1191);
/* GBProxy_Tests.ttcn, line 1191 */
tmp_208_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].receive(Osmocom__Gb__Types::tr__BSSGP__SUSPEND__NACK(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id(), Osmocom__Gb__Types::BssgpCause_template(ANY_VALUE)), &(rx__pdu), any_compref, NULL, NULL, NULL);
if (tmp_208_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1192);
/* GBProxy_Tests.ttcn, line 1192 */
Misc__Helpers::f__shutdown(cs_21, 1192, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("SUSPEND-NACK in response to SUSPEND for TLLI "),const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_208_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1195);
/* GBProxy_Tests.ttcn, line 1195 */
tmp_208_alt_flag_2 = T.timeout(NULL);
if (tmp_208_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1196);
/* GBProxy_Tests.ttcn, line 1196 */
Misc__Helpers::f__shutdown(cs_21, 1196, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No SUSPEND-ACK in response to SUSPEND for TLLI "),const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_208_default_flag == ALT_MAYBE) {
tmp_208_default_flag = TTCN_Default::try_altsteps();
if (tmp_208_default_flag == ALT_YES || tmp_208_default_flag == ALT_BREAK) break;
else if (tmp_208_default_flag == ALT_REPEAT) goto tmp_208;
}
current_location.update_lineno(1187);
/* GBProxy_Tests.ttcn, line 1187 */
if (tmp_208_alt_flag_0 == ALT_NO && tmp_208_alt_flag_1 == ALT_NO && tmp_208_alt_flag_2 == ALT_NO && tmp_208_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1187 and 1199.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(1200);
/* GBProxy_Tests.ttcn, line 1200 */
return os_0;
}

void start_f__bssgp__suspend(const COMPONENT& component_reference, const INTEGER& ran__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bssgp_suspend(");
ran__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_bssgp_suspend", text_buf);
ran__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__bssgp__resume(const OCTETSTRING& susp__ref, const INTEGER& ran__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1203, TTCN_Location::LOCATION_FUNCTION, "f_bssgp_resume");
current_location.update_lineno(1204);
/* GBProxy_Tests.ttcn, line 1204 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[ran__idx].cfg().bvc()[0]);
current_location.update_lineno(1205);
/* GBProxy_Tests.ttcn, line 1205 */
TIMER T("T", 5.0);
current_location.update_lineno(1206);
/* GBProxy_Tests.ttcn, line 1206 */
BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].send(Osmocom__Gb__Types::ts__BSSGP__RESUME(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id(), susp__ref), NULL);
current_location.update_lineno(1207);
/* GBProxy_Tests.ttcn, line 1207 */
T.start();
current_location.update_lineno(1208);
/* GBProxy_Tests.ttcn, line 1208 */
{
tmp_209:
alt_status tmp_209_alt_flag_0 = ALT_MAYBE;
alt_status tmp_209_alt_flag_1 = ALT_MAYBE;
alt_status tmp_209_alt_flag_2 = ALT_MAYBE;
alt_status tmp_209_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_209_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1209);
/* GBProxy_Tests.ttcn, line 1209 */
tmp_209_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].receive(Osmocom__Gb__Types::tr__BSSGP__RESUME__ACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id()), NULL, any_compref, NULL, NULL, NULL);
if (tmp_209_alt_flag_0 == ALT_YES) break;
}
if (tmp_209_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1210);
/* GBProxy_Tests.ttcn, line 1210 */
tmp_209_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG[ran__idx].receive(Osmocom__Gb__Types::tr__BSSGP__RESUME__NACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id().ra__id(), Osmocom__Gb__Types::BssgpCause_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_209_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1211);
/* GBProxy_Tests.ttcn, line 1211 */
Misc__Helpers::f__shutdown(cs_21, 1211, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RESUME-NACK in response to RESUME for TLLI "),const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_209_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1214);
/* GBProxy_Tests.ttcn, line 1214 */
tmp_209_alt_flag_2 = T.timeout(NULL);
if (tmp_209_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1215);
/* GBProxy_Tests.ttcn, line 1215 */
Misc__Helpers::f__shutdown(cs_21, 1215, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No RESUME-ACK in response to SUSPEND for TLLI "),const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_209_default_flag == ALT_MAYBE) {
tmp_209_default_flag = TTCN_Default::try_altsteps();
if (tmp_209_default_flag == ALT_YES || tmp_209_default_flag == ALT_BREAK) break;
else if (tmp_209_default_flag == ALT_REPEAT) goto tmp_209;
}
current_location.update_lineno(1208);
/* GBProxy_Tests.ttcn, line 1208 */
if (tmp_209_alt_flag_0 == ALT_NO && tmp_209_alt_flag_1 == ALT_NO && tmp_209_alt_flag_2 == ALT_NO && tmp_209_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1208 and 1218.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__bssgp__resume(const COMPONENT& component_reference, const OCTETSTRING& susp__ref, const INTEGER& ran__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bssgp_resume(");
susp__ref.log();
TTCN_Logger::log_event_str(", ");
ran__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_bssgp_resume", text_buf);
susp__ref.encode_text(text_buf);
ran__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__ul__unitdata(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1223, TTCN_Location::LOCATION_FUNCTION, "f_TC_ul_unitdata");
current_location.update_lineno(1224);
/* GBProxy_Tests.ttcn, line 1224 */
INTEGER ran__idx(0);
current_location.update_lineno(1225);
/* GBProxy_Tests.ttcn, line 1225 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[ran__idx].cfg().bvc()[0]);
current_location.update_lineno(1226);
/* GBProxy_Tests.ttcn, line 1226 */
INTEGER i;
current_location.update_lineno(1228);
/* GBProxy_Tests.ttcn, line 1228 */
i = 0;
current_location.update_lineno(1228);
/* GBProxy_Tests.ttcn, line 1228 */
for ( ; ; ) {
current_location.update_lineno(1228);
/* GBProxy_Tests.ttcn, line 1228 */
if (!(i < 1596)) break;
current_location.update_lineno(1229);
/* GBProxy_Tests.ttcn, line 1229 */
OCTETSTRING payload(Osmocom__Types::f__rnd__octstring(i));
current_location.update_lineno(1230);
/* GBProxy_Tests.ttcn, line 1230 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__UL__UD(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id(), payload));
current_location.update_lineno(1232);
/* GBProxy_Tests.ttcn, line 1232 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__UL__UD(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), Osmocom__Gb__Types::BssgpCellId_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id()), OCTETSTRING_template(payload)));
current_location.update_lineno(1234);
/* GBProxy_Tests.ttcn, line 1234 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, f__pcu2sgsn_use__sig_defval);
current_location.update_lineno(1228);
/* GBProxy_Tests.ttcn, line 1228 */
{
INTEGER tmp_211;
tmp_211 = (i + 4);
i = tmp_211;
}
}
current_location.update_lineno(1236);
/* GBProxy_Tests.ttcn, line 1236 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ul__unitdata(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ul_unitdata(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_ul_unitdata", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ul__unitdata(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1239, TTCN_Location::LOCATION_TESTCASE, "TC_ul_unitdata");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_ul_unitdata", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1241);
/* GBProxy_Tests.ttcn, line 1241 */
f__init(6.0e1);
current_location.update_lineno(1242);
/* GBProxy_Tests.ttcn, line 1242 */
f__start__handlers(&f__TC__ul__unitdata, cs_30, 1, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1244);
/* GBProxy_Tests.ttcn, line 1244 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ul_unitdata was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ul__unitdata__pool__failure(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1249, TTCN_Location::LOCATION_FUNCTION, "f_TC_ul_unitdata_pool_failure");
current_location.update_lineno(1250);
/* GBProxy_Tests.ttcn, line 1250 */
INTEGER ran__idx(0);
current_location.update_lineno(1251);
/* GBProxy_Tests.ttcn, line 1251 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[ran__idx].cfg().bvc()[0]);
current_location.update_lineno(1252);
/* GBProxy_Tests.ttcn, line 1252 */
INTEGER i;
current_location.update_lineno(1255);
/* GBProxy_Tests.ttcn, line 1255 */
BSSGP__ConnHdlr_component_g__pars.sgsn__idx() = 0;
current_location.update_lineno(1257);
/* GBProxy_Tests.ttcn, line 1257 */
i = 0;
current_location.update_lineno(1257);
/* GBProxy_Tests.ttcn, line 1257 */
for ( ; ; ) {
current_location.update_lineno(1257);
/* GBProxy_Tests.ttcn, line 1257 */
if (!(i < 1596)) break;
current_location.update_lineno(1258);
/* GBProxy_Tests.ttcn, line 1258 */
OCTETSTRING payload(Osmocom__Types::f__rnd__octstring(i));
current_location.update_lineno(1259);
/* GBProxy_Tests.ttcn, line 1259 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__UL__UD(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id(), payload));
current_location.update_lineno(1261);
/* GBProxy_Tests.ttcn, line 1261 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__UL__UD(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), Osmocom__Gb__Types::BssgpCellId_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).cell__id()), OCTETSTRING_template(payload)));
current_location.update_lineno(1263);
/* GBProxy_Tests.ttcn, line 1263 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, f__pcu2sgsn_use__sig_defval);
current_location.update_lineno(1257);
/* GBProxy_Tests.ttcn, line 1257 */
{
INTEGER tmp_214;
tmp_214 = (i + 4);
i = tmp_214;
}
}
current_location.update_lineno(1265);
/* GBProxy_Tests.ttcn, line 1265 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ul__unitdata__pool__failure(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ul_unitdata_pool_failure(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_ul_unitdata_pool_failure", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__disable__ns__pcu(const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1268, TTCN_Location::LOCATION_FUNCTION, "f_disable_ns_pcu");
current_location.update_lineno(1270);
/* GBProxy_Tests.ttcn, line 1270 */
INTEGER i;
current_location.update_lineno(1272);
/* GBProxy_Tests.ttcn, line 1272 */
TTCN_Runtime::connect_port(self, test__CT_component_NS__CTRL.get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__NS(), NS__Emulation::NS__CT_component_NS__CTRL.get_name());
current_location.update_lineno(1273);
/* GBProxy_Tests.ttcn, line 1273 */
i = 0;
current_location.update_lineno(1273);
/* GBProxy_Tests.ttcn, line 1273 */
for ( ; ; ) {
current_location.update_lineno(1273);
/* GBProxy_Tests.ttcn, line 1273 */
if (!(i < const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[pcu__idx].nsvc().lengthof())) break;
current_location.update_lineno(1274);
/* GBProxy_Tests.ttcn, line 1274 */
INTEGER nsvci(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[pcu__idx].nsvc()[i].nsvci());
current_location.update_lineno(1275);
/* GBProxy_Tests.ttcn, line 1275 */
NS__Emulation::NsDisableVcRequest tx__disar;
current_location.update_lineno(1276);
/* GBProxy_Tests.ttcn, line 1276 */
tx__disar.nsvci() = nsvci;
current_location.update_lineno(1277);
/* GBProxy_Tests.ttcn, line 1277 */
try {
TTCN_Logger::begin_event(TTCN_USER);
tx__disar.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(1278);
/* GBProxy_Tests.ttcn, line 1278 */
test__CT_component_NS__CTRL.send(tx__disar, NULL);
current_location.update_lineno(1273);
/* GBProxy_Tests.ttcn, line 1273 */
{
INTEGER tmp_217;
++i;
}
}
current_location.update_lineno(1280);
/* GBProxy_Tests.ttcn, line 1280 */
TTCN_Runtime::disconnect_port(self, test__CT_component_NS__CTRL.get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__NS(), NS__Emulation::NS__CT_component_NS__CTRL.get_name());
}

void start_f__disable__ns__pcu(const COMPONENT& component_reference, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_disable_ns_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_disable_ns_pcu", text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ul__unitdata__pool__failure(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1283, TTCN_Location::LOCATION_TESTCASE, "TC_ul_unitdata_pool_failure");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_ul_unitdata_pool_failure", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1285);
/* GBProxy_Tests.ttcn, line 1285 */
INTEGER i;
current_location.update_lineno(1286);
/* GBProxy_Tests.ttcn, line 1286 */
INTEGER j;
current_location.update_lineno(1288);
/* GBProxy_Tests.ttcn, line 1288 */
f__init(6.0e1);
current_location.update_lineno(1290);
/* GBProxy_Tests.ttcn, line 1290 */
i = 1;
current_location.update_lineno(1290);
/* GBProxy_Tests.ttcn, line 1290 */
for ( ; ; ) {
current_location.update_lineno(1290);
/* GBProxy_Tests.ttcn, line 1290 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(1291);
/* GBProxy_Tests.ttcn, line 1291 */
TTCN_Runtime::connect_port(self, test__CT_component_NS__CTRL.get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].vc__NS(), NS__Emulation::NS__CT_component_NS__CTRL.get_name());
current_location.update_lineno(1292);
/* GBProxy_Tests.ttcn, line 1292 */
j = 0;
current_location.update_lineno(1292);
/* GBProxy_Tests.ttcn, line 1292 */
for ( ; ; ) {
current_location.update_lineno(1292);
/* GBProxy_Tests.ttcn, line 1292 */
if (!(j < const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsvc().lengthof())) break;
current_location.update_lineno(1293);
/* GBProxy_Tests.ttcn, line 1293 */
INTEGER nsvci(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[i].nsvc()[j].nsvci());
current_location.update_lineno(1294);
/* GBProxy_Tests.ttcn, line 1294 */
NS__Emulation::NsDisableVcRequest tx__disar;
current_location.update_lineno(1295);
/* GBProxy_Tests.ttcn, line 1295 */
tx__disar.nsvci() = nsvci;
current_location.update_lineno(1296);
/* GBProxy_Tests.ttcn, line 1296 */
test__CT_component_NS__CTRL.send(tx__disar, NULL);
current_location.update_lineno(1292);
/* GBProxy_Tests.ttcn, line 1292 */
{
INTEGER tmp_221;
++j;
}
}
current_location.update_lineno(1298);
/* GBProxy_Tests.ttcn, line 1298 */
TTCN_Runtime::disconnect_port(self, test__CT_component_NS__CTRL.get_name(), const_cast< const GbInstances&>(test__CT_component_g__sgsn)[i].vc__NS(), NS__Emulation::NS__CT_component_NS__CTRL.get_name());
current_location.update_lineno(1290);
/* GBProxy_Tests.ttcn, line 1290 */
{
INTEGER tmp_222;
++i;
}
}
current_location.update_lineno(1301);
/* GBProxy_Tests.ttcn, line 1301 */
Osmocom__Types::f__sleep(1.5e1);
current_location.update_lineno(1303);
/* GBProxy_Tests.ttcn, line 1303 */
f__start__handlers(&f__TC__ul__unitdata__pool__failure, cs_31, 1, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1305);
/* GBProxy_Tests.ttcn, line 1305 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ul_unitdata_pool_failure was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__dl__unitdata(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1309, TTCN_Location::LOCATION_FUNCTION, "f_TC_dl_unitdata");
current_location.update_lineno(1310);
/* GBProxy_Tests.ttcn, line 1310 */
INTEGER i;
current_location.update_lineno(1312);
/* GBProxy_Tests.ttcn, line 1312 */
i = 0;
current_location.update_lineno(1312);
/* GBProxy_Tests.ttcn, line 1312 */
for ( ; ; ) {
current_location.update_lineno(1312);
/* GBProxy_Tests.ttcn, line 1312 */
if (!(i < 1596)) break;
current_location.update_lineno(1313);
/* GBProxy_Tests.ttcn, line 1313 */
OCTETSTRING payload(Osmocom__Types::f__rnd__octstring(i));
current_location.update_lineno(1314);
/* GBProxy_Tests.ttcn, line 1314 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__DL__UD(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), payload, BSSGP__Types::MSRadioAccessCapabilityV__BSSGP_template(OMIT_VALUE), Osmocom__Gb__Types::ts__BSSGP__IMSI(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi())));
current_location.update_lineno(1317);
/* GBProxy_Tests.ttcn, line 1317 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__DL__UD(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(payload), Osmocom__Gb__Types::tr__BSSGP__IMSI(HEXSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()))));
current_location.update_lineno(1320);
/* GBProxy_Tests.ttcn, line 1320 */
f__sgsn2pcu(pdu__tx, pdu__rx, f__sgsn2pcu_pcu__idx_defval, f__sgsn2pcu_use__sig_defval);
current_location.update_lineno(1312);
/* GBProxy_Tests.ttcn, line 1312 */
{
INTEGER tmp_224;
tmp_224 = (i + 4);
i = tmp_224;
}
}
current_location.update_lineno(1322);
/* GBProxy_Tests.ttcn, line 1322 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__dl__unitdata(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dl_unitdata(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_dl_unitdata", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__dl__unitdata(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1325, TTCN_Location::LOCATION_TESTCASE, "TC_dl_unitdata");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_dl_unitdata", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1327);
/* GBProxy_Tests.ttcn, line 1327 */
f__init(6.0e1);
current_location.update_lineno(1328);
/* GBProxy_Tests.ttcn, line 1328 */
f__start__handlers(&f__TC__dl__unitdata, cs_32, 2, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1330);
/* GBProxy_Tests.ttcn, line 1330 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_dl_unitdata was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ra__capability(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1333, TTCN_Location::LOCATION_FUNCTION, "f_TC_ra_capability");
current_location.update_lineno(1334);
/* GBProxy_Tests.ttcn, line 1334 */
INTEGER i;
current_location.update_lineno(1336);
/* GBProxy_Tests.ttcn, line 1336 */
i = 0;
current_location.update_lineno(1336);
/* GBProxy_Tests.ttcn, line 1336 */
for ( ; ; ) {
current_location.update_lineno(1336);
/* GBProxy_Tests.ttcn, line 1336 */
if (!(i < 10)) break;
current_location.update_lineno(1337);
/* GBProxy_Tests.ttcn, line 1337 */
BSSGP__Types::PDU__BSSGP_template pdu__tx;
{
BSSGP__Types::MSRadioAccessCapabilityV__BSSGP_template tmp_226;
tmp_226.set_size(1);
tmp_226[0] = Osmocom__Gb__Types::ts__RaCapRec__BSSGP(Osmocom__Gb__Types::ts__RaCapRec__BSSGP_att_defval, Osmocom__Gb__Types::ts__RaCapRec__BSSGP_mscap__gprs_defval, Osmocom__Gb__Types::ts__RaCapRec__BSSGP_mscap__egprs_defval);
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__RA__CAP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), tmp_226);
}
current_location.update_lineno(1339);
/* GBProxy_Tests.ttcn, line 1339 */
BSSGP__Types::PDU__BSSGP_template pdu__rx;
{
BSSGP__Types::MSRadioAccessCapabilityV__BSSGP_template tmp_227;
tmp_227.set_size(1);
tmp_227[0] = Osmocom__Gb__Types::tr__RaCapRec__BSSGP(Osmocom__Gb__Types::tr__RaCapRec__BSSGP_att_defval, Osmocom__Gb__Types::tr__RaCapRec__BSSGP_mscap__gprs_defval, Osmocom__Gb__Types::tr__RaCapRec__BSSGP_mscap__egprs_defval);
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__RA__CAP(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), tmp_227);
}
current_location.update_lineno(1341);
/* GBProxy_Tests.ttcn, line 1341 */
f__sgsn2pcu(pdu__tx, pdu__rx, f__sgsn2pcu_pcu__idx_defval, f__sgsn2pcu_use__sig_defval);
current_location.update_lineno(1336);
/* GBProxy_Tests.ttcn, line 1336 */
{
INTEGER tmp_228;
++i;
}
}
current_location.update_lineno(1343);
/* GBProxy_Tests.ttcn, line 1343 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ra__capability(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ra_capability(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_ra_capability", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ra__capability(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1345, TTCN_Location::LOCATION_TESTCASE, "TC_ra_capability");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_ra_capability", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1347);
/* GBProxy_Tests.ttcn, line 1347 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1348);
/* GBProxy_Tests.ttcn, line 1348 */
f__start__handlers(&f__TC__ra__capability, cs_33, 3, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1350);
/* GBProxy_Tests.ttcn, line 1350 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ra_capability was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ra__capability__upd(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1353, TTCN_Location::LOCATION_FUNCTION, "f_TC_ra_capability_upd");
current_location.update_lineno(1354);
/* GBProxy_Tests.ttcn, line 1354 */
INTEGER i;
current_location.update_lineno(1355);
/* GBProxy_Tests.ttcn, line 1355 */
OCTETSTRING tag;
current_location.update_lineno(1356);
/* GBProxy_Tests.ttcn, line 1356 */
i = 0;
current_location.update_lineno(1356);
/* GBProxy_Tests.ttcn, line 1356 */
for ( ; ; ) {
current_location.update_lineno(1356);
/* GBProxy_Tests.ttcn, line 1356 */
if (!(i < 10)) break;
current_location.update_lineno(1357);
/* GBProxy_Tests.ttcn, line 1357 */
tag = int2oct((23 + i), 1);
current_location.update_lineno(1358);
/* GBProxy_Tests.ttcn, line 1358 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__RA__CAP__UPD(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), tag));
current_location.update_lineno(1360);
/* GBProxy_Tests.ttcn, line 1360 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__RA__CAP__UPD(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(tag)));
current_location.update_lineno(1362);
/* GBProxy_Tests.ttcn, line 1362 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, f__pcu2sgsn_use__sig_defval);
current_location.update_lineno(1364);
/* GBProxy_Tests.ttcn, line 1364 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__RA__CAP__UPD__ACK(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), tag, OCTETSTRING_template(os_1), Osmocom__Gb__Types::ts__BSSGP__RA__CAP__UPD__ACK_racap_defval);
current_location.update_lineno(1366);
/* GBProxy_Tests.ttcn, line 1366 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__RA__CAP__UPD__ACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(tag), OCTETSTRING_template(os_1), Osmocom__Gb__Types::tr__BSSGP__RA__CAP__UPD__ACK_racap_defval);
current_location.update_lineno(1368);
/* GBProxy_Tests.ttcn, line 1368 */
f__sgsn2pcu(pdu__tx, pdu__rx, f__sgsn2pcu_pcu__idx_defval, f__sgsn2pcu_use__sig_defval);
current_location.update_lineno(1356);
/* GBProxy_Tests.ttcn, line 1356 */
{
INTEGER tmp_233;
++i;
}
}
current_location.update_lineno(1370);
/* GBProxy_Tests.ttcn, line 1370 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ra__capability__upd(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ra_capability_upd(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_ra_capability_upd", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ra__capability__upd(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1372, TTCN_Location::LOCATION_TESTCASE, "TC_ra_capability_upd");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_ra_capability_upd", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1374);
/* GBProxy_Tests.ttcn, line 1374 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1375);
/* GBProxy_Tests.ttcn, line 1375 */
f__start__handlers(&f__TC__ra__capability__upd, cs_34, 4, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1377);
/* GBProxy_Tests.ttcn, line 1377 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ra_capability_upd was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__radio__status(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1380, TTCN_Location::LOCATION_FUNCTION, "f_TC_radio_status");
current_location.update_lineno(1381);
/* GBProxy_Tests.ttcn, line 1381 */
INTEGER i;
current_location.update_lineno(1382);
/* GBProxy_Tests.ttcn, line 1382 */
Osmocom__Gb__Types::BssgpRadioCause cause(Osmocom__Gb__Types::BssgpRadioCause::BSSGP__RADIO__CAUSE__CONTACT__LOST);
current_location.update_lineno(1383);
/* GBProxy_Tests.ttcn, line 1383 */
i = 0;
current_location.update_lineno(1383);
/* GBProxy_Tests.ttcn, line 1383 */
for ( ; ; ) {
current_location.update_lineno(1383);
/* GBProxy_Tests.ttcn, line 1383 */
if (!(i < 10)) break;
current_location.update_lineno(1384);
/* GBProxy_Tests.ttcn, line 1384 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), Osmocom__Gb__Types::BssgpRadioCause_template(cause), Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS_tmsi_defval, Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS_imsi_defval));
current_location.update_lineno(1386);
/* GBProxy_Tests.ttcn, line 1386 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), Osmocom__Gb__Types::BssgpRadioCause_template(cause), Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS_tmsi_defval, Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS_imsi_defval));
current_location.update_lineno(1388);
/* GBProxy_Tests.ttcn, line 1388 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, f__pcu2sgsn_use__sig_defval);
current_location.update_lineno(1383);
/* GBProxy_Tests.ttcn, line 1383 */
{
INTEGER tmp_235;
++i;
}
}
current_location.update_lineno(1390);
/* GBProxy_Tests.ttcn, line 1390 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__radio__status(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_radio_status", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__radio__status(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1392, TTCN_Location::LOCATION_TESTCASE, "TC_radio_status");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_radio_status", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1394);
/* GBProxy_Tests.ttcn, line 1394 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1395);
/* GBProxy_Tests.ttcn, line 1395 */
f__start__handlers(&f__TC__radio__status, cs_35, 5, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1397);
/* GBProxy_Tests.ttcn, line 1397 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_radio_status was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__radio__status__tmsi(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1400, TTCN_Location::LOCATION_FUNCTION, "f_TC_radio_status_tmsi");
current_location.update_lineno(1401);
/* GBProxy_Tests.ttcn, line 1401 */
INTEGER i;
current_location.update_lineno(1402);
/* GBProxy_Tests.ttcn, line 1402 */
Osmocom__Gb__Types::BssgpRadioCause cause(Osmocom__Gb__Types::BssgpRadioCause::BSSGP__RADIO__CAUSE__CONTACT__LOST);
current_location.update_lineno(1403);
/* GBProxy_Tests.ttcn, line 1403 */
i = 0;
current_location.update_lineno(1403);
/* GBProxy_Tests.ttcn, line 1403 */
for ( ; ; ) {
current_location.update_lineno(1403);
/* GBProxy_Tests.ttcn, line 1403 */
if (!(i < 10)) break;
current_location.update_lineno(1404);
/* GBProxy_Tests.ttcn, line 1404 */
INTEGER tmsi__int(oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()()));
current_location.update_lineno(1405);
/* GBProxy_Tests.ttcn, line 1405 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS(OCTETSTRING_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpRadioCause_template(cause), INTEGER_template(tmsi__int), Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS_imsi_defval));
current_location.update_lineno(1407);
/* GBProxy_Tests.ttcn, line 1407 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS(OCTETSTRING_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpRadioCause_template(cause), INTEGER_template(tmsi__int), Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS_imsi_defval));
current_location.update_lineno(1408);
/* GBProxy_Tests.ttcn, line 1408 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, f__pcu2sgsn_use__sig_defval);
current_location.update_lineno(1403);
/* GBProxy_Tests.ttcn, line 1403 */
{
INTEGER tmp_237;
++i;
}
}
current_location.update_lineno(1410);
/* GBProxy_Tests.ttcn, line 1410 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__radio__status__tmsi(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status_tmsi(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_radio_status_tmsi", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__radio__status__tmsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1412, TTCN_Location::LOCATION_TESTCASE, "TC_radio_status_tmsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_radio_status_tmsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1414);
/* GBProxy_Tests.ttcn, line 1414 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1415);
/* GBProxy_Tests.ttcn, line 1415 */
f__start__handlers(&f__TC__radio__status__tmsi, cs_36, 5, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1416);
/* GBProxy_Tests.ttcn, line 1416 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_radio_status_tmsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__radio__status__imsi(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1419, TTCN_Location::LOCATION_FUNCTION, "f_TC_radio_status_imsi");
current_location.update_lineno(1420);
/* GBProxy_Tests.ttcn, line 1420 */
INTEGER i;
current_location.update_lineno(1421);
/* GBProxy_Tests.ttcn, line 1421 */
Osmocom__Gb__Types::BssgpRadioCause cause(Osmocom__Gb__Types::BssgpRadioCause::BSSGP__RADIO__CAUSE__CONTACT__LOST);
current_location.update_lineno(1422);
/* GBProxy_Tests.ttcn, line 1422 */
i = 0;
current_location.update_lineno(1422);
/* GBProxy_Tests.ttcn, line 1422 */
for ( ; ; ) {
current_location.update_lineno(1422);
/* GBProxy_Tests.ttcn, line 1422 */
if (!(i < 10)) break;
current_location.update_lineno(1423);
/* GBProxy_Tests.ttcn, line 1423 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS(OCTETSTRING_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpRadioCause_template(cause), Osmocom__Gb__Types::ts__BSSGP__RADIO__STATUS_tmsi_defval, HEXSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi())));
current_location.update_lineno(1425);
/* GBProxy_Tests.ttcn, line 1425 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS(OCTETSTRING_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpRadioCause_template(cause), Osmocom__Gb__Types::tr__BSSGP__RADIO__STATUS_tmsi_defval, HEXSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi())));
current_location.update_lineno(1426);
/* GBProxy_Tests.ttcn, line 1426 */
f__pcu2any__sgsn(pdu__tx, pdu__rx, f__pcu2any__sgsn_pcu__idx_defval, f__pcu2any__sgsn_use__sig_defval);
current_location.update_lineno(1422);
/* GBProxy_Tests.ttcn, line 1422 */
{
INTEGER tmp_239;
++i;
}
}
current_location.update_lineno(1428);
/* GBProxy_Tests.ttcn, line 1428 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__radio__status__imsi(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status_imsi(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_radio_status_imsi", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__radio__status__imsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1430, TTCN_Location::LOCATION_TESTCASE, "TC_radio_status_imsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_radio_status_imsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1432);
/* GBProxy_Tests.ttcn, line 1432 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1433);
/* GBProxy_Tests.ttcn, line 1433 */
f__start__handlers(&f__TC__radio__status__imsi, cs_37, 5, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1434);
/* GBProxy_Tests.ttcn, line 1434 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_radio_status_imsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__suspend__one(const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx, const INTEGER& suffix)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1439, TTCN_Location::LOCATION_FUNCTION, "f_suspend_one");
current_location.update_lineno(1443);
/* GBProxy_Tests.ttcn, line 1443 */
GSM__Types::RoutingAreaIdentification ra__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id().ra__id());
current_location.update_lineno(1444);
/* GBProxy_Tests.ttcn, line 1444 */
OCTETSTRING p__tmsi(Osmocom__Types::f__gen__tmsi(suffix, const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx][nri__idx], mp__nri__bitlength, Osmocom__Types::f__gen__tmsi_base__tmsi_defval));
current_location.update_lineno(1446);
/* GBProxy_Tests.ttcn, line 1446 */
OCTETSTRING tlli(Osmocom__Gb__Types::f__gprs__tlli__from__tmsi(p__tmsi, Osmocom__Gb__Types::TlliType::TLLI__LOCAL));
current_location.update_lineno(1447);
/* GBProxy_Tests.ttcn, line 1447 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__SUSPEND(tlli, ra__id));
current_location.update_lineno(1449);
/* GBProxy_Tests.ttcn, line 1449 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__SUSPEND(OCTETSTRING_template(tlli), ra__id));
current_location.update_lineno(1450);
/* GBProxy_Tests.ttcn, line 1450 */
f__global__pcu2sgsn(pdu__tx, pdu__rx, pcu__idx, sgsn__idx);
current_location.update_lineno(1452);
/* GBProxy_Tests.ttcn, line 1452 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__SUSPEND__ACK(tlli, ra__id, OCTETSTRING_template(int2oct(suffix, 1)));
current_location.update_lineno(1454);
/* GBProxy_Tests.ttcn, line 1454 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__SUSPEND__ACK(tlli, ra__id, OCTETSTRING_template(int2oct(suffix, 1)));
current_location.update_lineno(1455);
/* GBProxy_Tests.ttcn, line 1455 */
f__global__sgsn2pcu(pdu__tx, pdu__rx, sgsn__idx, pcu__idx);
current_location.update_lineno(1457);
/* GBProxy_Tests.ttcn, line 1457 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__SUSPEND(tlli, ra__id);
current_location.update_lineno(1459);
/* GBProxy_Tests.ttcn, line 1459 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__SUSPEND(OCTETSTRING_template(tlli), ra__id);
current_location.update_lineno(1460);
/* GBProxy_Tests.ttcn, line 1460 */
f__global__pcu2sgsn(pdu__tx, pdu__rx, pcu__idx, sgsn__idx);
current_location.update_lineno(1463);
/* GBProxy_Tests.ttcn, line 1463 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__SUSPEND__NACK(tlli, ra__id, Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__UNKNOWN__MS));
current_location.update_lineno(1465);
/* GBProxy_Tests.ttcn, line 1465 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__SUSPEND__NACK(tlli, ra__id, Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__UNKNOWN__MS));
current_location.update_lineno(1466);
/* GBProxy_Tests.ttcn, line 1466 */
f__global__sgsn2pcu(pdu__tx, pdu__rx, sgsn__idx, pcu__idx);
}

void start_f__suspend__one(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx, const INTEGER& suffix)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_suspend_one(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(", ");
suffix.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_suspend_one", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
suffix.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__suspend(const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1469, TTCN_Location::LOCATION_FUNCTION, "f_TC_suspend");
current_location.update_lineno(1471);
/* GBProxy_Tests.ttcn, line 1471 */
INTEGER i;
current_location.update_lineno(1473);
/* GBProxy_Tests.ttcn, line 1473 */
i = 0;
current_location.update_lineno(1473);
/* GBProxy_Tests.ttcn, line 1473 */
for ( ; ; ) {
current_location.update_lineno(1473);
/* GBProxy_Tests.ttcn, line 1473 */
if (!(i < 10)) break;
current_location.update_lineno(1474);
/* GBProxy_Tests.ttcn, line 1474 */
f__suspend__one(sgsn__idx, nri__idx, pcu__idx, bvc__idx, i);
current_location.update_lineno(1473);
/* GBProxy_Tests.ttcn, line 1473 */
{
INTEGER tmp_247;
++i;
}
}
current_location.update_lineno(1476);
/* GBProxy_Tests.ttcn, line 1476 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__suspend(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_suspend(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_suspend", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__suspend(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1478, TTCN_Location::LOCATION_TESTCASE, "TC_suspend");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_suspend", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(1480);
/* GBProxy_Tests.ttcn, line 1480 */
INTEGER sgsn__idx;
current_location.update_lineno(1480);
/* GBProxy_Tests.ttcn, line 1480 */
INTEGER nri__idx;
current_location.update_lineno(1481);
/* GBProxy_Tests.ttcn, line 1481 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1482);
/* GBProxy_Tests.ttcn, line 1482 */
f__global__init();
current_location.update_lineno(1483);
/* GBProxy_Tests.ttcn, line 1483 */
sgsn__idx = 0;
current_location.update_lineno(1483);
/* GBProxy_Tests.ttcn, line 1483 */
for ( ; ; ) {
current_location.update_lineno(1483);
/* GBProxy_Tests.ttcn, line 1483 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(1484);
/* GBProxy_Tests.ttcn, line 1484 */
nri__idx = 0;
current_location.update_lineno(1484);
/* GBProxy_Tests.ttcn, line 1484 */
for ( ; ; ) {
current_location.update_lineno(1484);
/* GBProxy_Tests.ttcn, line 1484 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(1485);
/* GBProxy_Tests.ttcn, line 1485 */
f__TC__suspend(sgsn__idx, nri__idx, 0, 0);
current_location.update_lineno(1484);
/* GBProxy_Tests.ttcn, line 1484 */
{
INTEGER tmp_250;
++nri__idx;
}
}
current_location.update_lineno(1483);
/* GBProxy_Tests.ttcn, line 1483 */
{
INTEGER tmp_251;
++sgsn__idx;
}
}
current_location.update_lineno(1488);
/* GBProxy_Tests.ttcn, line 1488 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_suspend was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__resume__one(const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx, const INTEGER& suffix)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1491, TTCN_Location::LOCATION_FUNCTION, "f_resume_one");
current_location.update_lineno(1495);
/* GBProxy_Tests.ttcn, line 1495 */
GSM__Types::RoutingAreaIdentification ra__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id().ra__id());
current_location.update_lineno(1496);
/* GBProxy_Tests.ttcn, line 1496 */
OCTETSTRING p__tmsi(Osmocom__Types::f__gen__tmsi(suffix, const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx][nri__idx], mp__nri__bitlength, Osmocom__Types::f__gen__tmsi_base__tmsi_defval));
current_location.update_lineno(1498);
/* GBProxy_Tests.ttcn, line 1498 */
OCTETSTRING tlli(Osmocom__Gb__Types::f__gprs__tlli__from__tmsi(p__tmsi, Osmocom__Gb__Types::TlliType::TLLI__LOCAL));
current_location.update_lineno(1499);
/* GBProxy_Tests.ttcn, line 1499 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__RESUME(tlli, ra__id, int2oct(suffix, 1)));
current_location.update_lineno(1501);
/* GBProxy_Tests.ttcn, line 1501 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__RESUME(OCTETSTRING_template(tlli), ra__id, OCTETSTRING_template(int2oct(suffix, 1))));
current_location.update_lineno(1502);
/* GBProxy_Tests.ttcn, line 1502 */
f__global__pcu2sgsn(pdu__tx, pdu__rx, pcu__idx, sgsn__idx);
current_location.update_lineno(1504);
/* GBProxy_Tests.ttcn, line 1504 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__RESUME__ACK(tlli, ra__id);
current_location.update_lineno(1506);
/* GBProxy_Tests.ttcn, line 1506 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__RESUME__ACK(OCTETSTRING_template(tlli), ra__id);
current_location.update_lineno(1507);
/* GBProxy_Tests.ttcn, line 1507 */
f__global__sgsn2pcu(pdu__tx, pdu__rx, sgsn__idx, pcu__idx);
current_location.update_lineno(1509);
/* GBProxy_Tests.ttcn, line 1509 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__RESUME(tlli, ra__id, int2oct(suffix, 1));
current_location.update_lineno(1511);
/* GBProxy_Tests.ttcn, line 1511 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__RESUME(OCTETSTRING_template(tlli), ra__id, OCTETSTRING_template(int2oct(suffix, 1)));
current_location.update_lineno(1512);
/* GBProxy_Tests.ttcn, line 1512 */
f__global__pcu2sgsn(pdu__tx, pdu__rx, pcu__idx, sgsn__idx);
current_location.update_lineno(1515);
/* GBProxy_Tests.ttcn, line 1515 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__RESUME__NACK(tlli, ra__id, Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__UNKNOWN__MS));
current_location.update_lineno(1517);
/* GBProxy_Tests.ttcn, line 1517 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__RESUME__NACK(OCTETSTRING_template(tlli), ra__id, Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__UNKNOWN__MS));
current_location.update_lineno(1518);
/* GBProxy_Tests.ttcn, line 1518 */
f__global__sgsn2pcu(pdu__tx, pdu__rx, sgsn__idx, pcu__idx);
}

void start_f__resume__one(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx, const INTEGER& suffix)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_resume_one(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(", ");
suffix.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_resume_one", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
suffix.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__resume(const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1521, TTCN_Location::LOCATION_FUNCTION, "f_TC_resume");
current_location.update_lineno(1523);
/* GBProxy_Tests.ttcn, line 1523 */
INTEGER i;
current_location.update_lineno(1525);
/* GBProxy_Tests.ttcn, line 1525 */
i = 0;
current_location.update_lineno(1525);
/* GBProxy_Tests.ttcn, line 1525 */
for ( ; ; ) {
current_location.update_lineno(1525);
/* GBProxy_Tests.ttcn, line 1525 */
if (!(i < 10)) break;
current_location.update_lineno(1526);
/* GBProxy_Tests.ttcn, line 1526 */
f__resume__one(sgsn__idx, nri__idx, pcu__idx, bvc__idx, i);
current_location.update_lineno(1525);
/* GBProxy_Tests.ttcn, line 1525 */
{
INTEGER tmp_259;
++i;
}
}
current_location.update_lineno(1528);
/* GBProxy_Tests.ttcn, line 1528 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__resume(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_resume(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_resume", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__resume(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1530, TTCN_Location::LOCATION_TESTCASE, "TC_resume");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_resume", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(1532);
/* GBProxy_Tests.ttcn, line 1532 */
INTEGER sgsn__idx;
current_location.update_lineno(1532);
/* GBProxy_Tests.ttcn, line 1532 */
INTEGER nri__idx;
current_location.update_lineno(1533);
/* GBProxy_Tests.ttcn, line 1533 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1534);
/* GBProxy_Tests.ttcn, line 1534 */
f__global__init();
current_location.update_lineno(1535);
/* GBProxy_Tests.ttcn, line 1535 */
sgsn__idx = 0;
current_location.update_lineno(1535);
/* GBProxy_Tests.ttcn, line 1535 */
for ( ; ; ) {
current_location.update_lineno(1535);
/* GBProxy_Tests.ttcn, line 1535 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(1536);
/* GBProxy_Tests.ttcn, line 1536 */
nri__idx = 0;
current_location.update_lineno(1536);
/* GBProxy_Tests.ttcn, line 1536 */
for ( ; ; ) {
current_location.update_lineno(1536);
/* GBProxy_Tests.ttcn, line 1536 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(1537);
/* GBProxy_Tests.ttcn, line 1537 */
f__TC__resume(sgsn__idx, nri__idx, 0, 0);
current_location.update_lineno(1536);
/* GBProxy_Tests.ttcn, line 1536 */
{
INTEGER tmp_262;
++nri__idx;
}
}
current_location.update_lineno(1535);
/* GBProxy_Tests.ttcn, line 1535 */
{
INTEGER tmp_263;
++sgsn__idx;
}
}
current_location.update_lineno(1540);
/* GBProxy_Tests.ttcn, line 1540 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_resume was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__dl__ud__unidir(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1544, TTCN_Location::LOCATION_FUNCTION, "f_TC_dl_ud_unidir");
current_location.update_lineno(1545);
/* GBProxy_Tests.ttcn, line 1545 */
INTEGER i;
current_location.update_lineno(1547);
/* GBProxy_Tests.ttcn, line 1547 */
i = 0;
current_location.update_lineno(1547);
/* GBProxy_Tests.ttcn, line 1547 */
for ( ; ; ) {
current_location.update_lineno(1547);
/* GBProxy_Tests.ttcn, line 1547 */
if (!(i < 10)) break;
current_location.update_lineno(1548);
/* GBProxy_Tests.ttcn, line 1548 */
OCTETSTRING payload(Osmocom__Types::f__rnd__octstring(i));
current_location.update_lineno(1549);
/* GBProxy_Tests.ttcn, line 1549 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__DL__UD(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), payload, BSSGP__Types::MSRadioAccessCapabilityV__BSSGP_template(OMIT_VALUE), Osmocom__Gb__Types::ts__BSSGP__IMSI(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi())));
current_location.update_lineno(1551);
/* GBProxy_Tests.ttcn, line 1551 */
BSSGP__ConnHdlr_component_SGSN__PTP[const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()].send(pdu__tx, NULL);
current_location.update_lineno(1547);
/* GBProxy_Tests.ttcn, line 1547 */
{
INTEGER tmp_265;
++i;
}
}
current_location.update_lineno(1553);
/* GBProxy_Tests.ttcn, line 1553 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__dl__ud__unidir(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dl_ud_unidir(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_dl_ud_unidir", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__load__sharing__dl(const INTEGER& sgsn__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1556, TTCN_Location::LOCATION_FUNCTION, "f_TC_load_sharing_dl");
current_location.update_lineno(1558);
/* GBProxy_Tests.ttcn, line 1558 */
INTEGER num__ue(10);
current_location.update_lineno(1559);
/* GBProxy_Tests.ttcn, line 1559 */
VALUE_ARRAY<COMPONENT, 10, 0> vc__conn;
current_location.update_lineno(1563);
/* GBProxy_Tests.ttcn, line 1563 */
TTCN_Runtime::disconnect_port(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].vc__NS(), NS__Emulation::NS__CT_component_NS__SP.get_name(), const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].vc__BSSGP(), BSSGP__Emulation::BSSGP__CT_component_BSCP.get_name());
current_location.update_lineno(1564);
/* GBProxy_Tests.ttcn, line 1564 */
TTCN_Runtime::connect_port(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].vc__NS(), NS__Emulation::NS__CT_component_NS__SP.get_name(), self, test__CT__NS_component_NS.get_name());
current_location.update_lineno(1568);
/* GBProxy_Tests.ttcn, line 1568 */
Osmocom__Types::f__sleep(3.0);
{
current_location.update_lineno(1571);
/* GBProxy_Tests.ttcn, line 1571 */
INTEGER i(0);
current_location.update_lineno(1571);
/* GBProxy_Tests.ttcn, line 1571 */
for ( ; ; ) {
current_location.update_lineno(1571);
/* GBProxy_Tests.ttcn, line 1571 */
if (!(i < 10)) break;
current_location.update_lineno(1572);
/* GBProxy_Tests.ttcn, line 1572 */
vc__conn[i] = f__start__handler(&f__TC__dl__ud__unidir, TTCN_Runtime::get_testcasename(), (5 + i), 3.0e1, sgsn__idx, f__start__handler_nri__idx_defval, f__start__handler_have__ptmsi_defval);
current_location.update_lineno(1571);
/* GBProxy_Tests.ttcn, line 1571 */
{
INTEGER tmp_267;
++i;
}
}
}
current_location.update_lineno(1578);
/* GBProxy_Tests.ttcn, line 1578 */
Osmocom__Types::ro__integer rx__count;
rx__count.set_size(4);
rx__count[0] = 0;
rx__count[1] = 0;
rx__count[2] = 0;
rx__count[3] = 0;
current_location.update_lineno(1579);
/* GBProxy_Tests.ttcn, line 1579 */
TIMER T("T", 2.0);
current_location.update_lineno(1580);
/* GBProxy_Tests.ttcn, line 1580 */
T.start();
current_location.update_lineno(1581);
/* GBProxy_Tests.ttcn, line 1581 */
{
tmp_268:
alt_status tmp_268_alt_flag_0 = ALT_MAYBE;
alt_status tmp_268_alt_flag_1 = ALT_MAYBE;
alt_status tmp_268_alt_flag_2 = ALT_MAYBE;
alt_status tmp_268_alt_flag_3 = ALT_MAYBE;
alt_status tmp_268_alt_flag_4 = ALT_MAYBE;
alt_status tmp_268_alt_flag_5 = ALT_MAYBE;
alt_status tmp_268_alt_flag_6 = ALT_MAYBE;
alt_status tmp_268_alt_flag_7 = ALT_MAYBE;
alt_status tmp_268_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_268_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1582);
/* GBProxy_Tests.ttcn, line 1582 */
tmp_268_alt_flag_0 = as__NsUdiCount_instance(0, rx__count);
if (tmp_268_alt_flag_0 == ALT_REPEAT) goto tmp_268;
if (tmp_268_alt_flag_0 == ALT_BREAK) break;
if (tmp_268_alt_flag_0 == ALT_YES) break;
}
if (tmp_268_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1583);
/* GBProxy_Tests.ttcn, line 1583 */
tmp_268_alt_flag_1 = as__NsUdiCount_instance(1, rx__count);
if (tmp_268_alt_flag_1 == ALT_REPEAT) goto tmp_268;
if (tmp_268_alt_flag_1 == ALT_BREAK) break;
if (tmp_268_alt_flag_1 == ALT_YES) break;
}
if (tmp_268_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1584);
/* GBProxy_Tests.ttcn, line 1584 */
tmp_268_alt_flag_2 = as__NsUdiCount_instance(2, rx__count);
if (tmp_268_alt_flag_2 == ALT_REPEAT) goto tmp_268;
if (tmp_268_alt_flag_2 == ALT_BREAK) break;
if (tmp_268_alt_flag_2 == ALT_YES) break;
}
if (tmp_268_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1585);
/* GBProxy_Tests.ttcn, line 1585 */
tmp_268_alt_flag_3 = as__NsUdiCount_instance(3, rx__count);
if (tmp_268_alt_flag_3 == ALT_REPEAT) goto tmp_268;
if (tmp_268_alt_flag_3 == ALT_BREAK) break;
if (tmp_268_alt_flag_3 == ALT_YES) break;
}
if (tmp_268_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1586);
/* GBProxy_Tests.ttcn, line 1586 */
{
NS__Emulation::NsUnitdataIndication_template tmp_269;
tmp_269.bvci() = 0;
tmp_269.nsei() = ANY_VALUE;
tmp_269.nsvci() = ANY_VALUE;
tmp_269.sdu() = ANY_OR_OMIT;
tmp_269.bssgp() = ANY_OR_OMIT;
tmp_268_alt_flag_4 = test__CT__NS_component_NS.receive(tmp_269, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_268_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1586);
/* GBProxy_Tests.ttcn, line 1586 */
goto tmp_268;
}
}
if (tmp_268_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(1587);
/* GBProxy_Tests.ttcn, line 1587 */
tmp_268_alt_flag_5 = test__CT__NS_component_NS.receive(NS__Emulation::NsStatusIndication_template(ANY_VALUE), NULL, any_compref, NULL, NULL, NULL);
if (tmp_268_alt_flag_5 == ALT_YES) {
current_location.update_lineno(1587);
/* GBProxy_Tests.ttcn, line 1587 */
goto tmp_268;
}
}
if (tmp_268_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(1588);
/* GBProxy_Tests.ttcn, line 1588 */
tmp_268_alt_flag_6 = test__CT__NS_component_NS.receive(any_compref, NULL, NULL, NULL);
if (tmp_268_alt_flag_6 == ALT_YES) {
current_location.update_lineno(1589);
/* GBProxy_Tests.ttcn, line 1589 */
Misc__Helpers::f__shutdown(cs_21, 1589, FAIL, cs_38);
break;
}
}
if (tmp_268_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(1591);
/* GBProxy_Tests.ttcn, line 1591 */
tmp_268_alt_flag_7 = T.timeout(NULL);
if (tmp_268_alt_flag_7 == ALT_YES) break;
}
if (tmp_268_default_flag == ALT_MAYBE) {
tmp_268_default_flag = TTCN_Default::try_altsteps();
if (tmp_268_default_flag == ALT_YES || tmp_268_default_flag == ALT_BREAK) break;
else if (tmp_268_default_flag == ALT_REPEAT) goto tmp_268;
}
current_location.update_lineno(1581);
/* GBProxy_Tests.ttcn, line 1581 */
if (tmp_268_alt_flag_0 == ALT_NO && tmp_268_alt_flag_1 == ALT_NO && tmp_268_alt_flag_2 == ALT_NO && tmp_268_alt_flag_3 == ALT_NO && tmp_268_alt_flag_4 == ALT_NO && tmp_268_alt_flag_5 == ALT_NO && tmp_268_alt_flag_6 == ALT_NO && tmp_268_alt_flag_7 == ALT_NO && tmp_268_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1581 and 1593.");
TTCN_Snapshot::take_new(TRUE);
}
}
{
current_location.update_lineno(1594);
/* GBProxy_Tests.ttcn, line 1594 */
INTEGER i(0);
current_location.update_lineno(1594);
/* GBProxy_Tests.ttcn, line 1594 */
for ( ; ; ) {
current_location.update_lineno(1594);
/* GBProxy_Tests.ttcn, line 1594 */
if (!(i < rx__count.lengthof())) break;
current_location.update_lineno(1595);
/* GBProxy_Tests.ttcn, line 1595 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Rx on NSVCI ");
const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[0].nsvc()[i].nsvci().log();
TTCN_Logger::log_event_str(": ");
const_cast< const Osmocom__Types::ro__integer&>(rx__count)[i].log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(1596);
/* GBProxy_Tests.ttcn, line 1596 */
if ((const_cast< const Osmocom__Types::ro__integer&>(rx__count)[i] == 0)) {
current_location.update_lineno(1597);
/* GBProxy_Tests.ttcn, line 1597 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Data not shared over all NSVC"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(1594);
/* GBProxy_Tests.ttcn, line 1594 */
{
INTEGER tmp_270;
++i;
}
}
}
}

void start_f__TC__load__sharing__dl(const COMPONENT& component_reference, const INTEGER& sgsn__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_load_sharing_dl(");
sgsn__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_load_sharing_dl", text_buf);
sgsn__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__load__sharing__dl(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1602, TTCN_Location::LOCATION_TESTCASE, "TC_load_sharing_dl");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_load_sharing_dl", "GBProxy_Tests", "test_CT_NS", "GBProxy_Tests", "test_CT_NS", has_timer, timer_value);
current_location.update_lineno(1604);
/* GBProxy_Tests.ttcn, line 1604 */
INTEGER sgsn__idx;
current_location.update_lineno(1604);
/* GBProxy_Tests.ttcn, line 1604 */
INTEGER nri__idx;
current_location.update_lineno(1605);
/* GBProxy_Tests.ttcn, line 1605 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1606);
/* GBProxy_Tests.ttcn, line 1606 */
sgsn__idx = 0;
current_location.update_lineno(1606);
/* GBProxy_Tests.ttcn, line 1606 */
for ( ; ; ) {
current_location.update_lineno(1606);
/* GBProxy_Tests.ttcn, line 1606 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(1607);
/* GBProxy_Tests.ttcn, line 1607 */
f__TC__load__sharing__dl(sgsn__idx);
current_location.update_lineno(1606);
/* GBProxy_Tests.ttcn, line 1606 */
{
INTEGER tmp_272;
++sgsn__idx;
}
}
current_location.update_lineno(1609);
/* GBProxy_Tests.ttcn, line 1609 */
TTCN_Runtime::setverdict(PASS);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_load_sharing_dl was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__NsUdiCount_instance(const INTEGER& nsvc__idx, Osmocom__Types::ro__integer& roi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1611, TTCN_Location::LOCATION_ALTSTEP, "as_NsUdiCount");
current_location.update_lineno(1612);
/* GBProxy_Tests.ttcn, line 1612 */
NS__Emulation::NsUnitdataIndication udi;
current_location.update_lineno(1613);
/* GBProxy_Tests.ttcn, line 1613 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[0]);
alt_status ret_val = ALT_NO;
current_location.update_lineno(1614);
/* GBProxy_Tests.ttcn, line 1614 */
{
alt_status tmp_274;
{
NS__Emulation::NsUnitdataIndication_template tmp_273;
tmp_273.bvci() = const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).bvci();
tmp_273.nsei() = const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().nsei();
tmp_273.nsvci() = const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[0].nsvc()[nsvc__idx].nsvci();
tmp_273.sdu() = ANY_OR_OMIT;
tmp_273.bssgp() = ANY_OR_OMIT;
tmp_274 = test__CT__NS_component_NS.receive(tmp_273, &(udi), any_compref, NULL, NULL, NULL);
}
switch (tmp_274) {
case ALT_YES:
{
current_location.update_lineno(1615);
/* GBProxy_Tests.ttcn, line 1615 */
{
INTEGER tmp_275;
tmp_275 = (const_cast< const Osmocom__Types::ro__integer&>(roi)[nsvc__idx] + 1);
roi[nsvc__idx] = tmp_275;
}
current_location.update_lineno(1616);
/* GBProxy_Tests.ttcn, line 1616 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__NsUdiCount(const INTEGER& nsvc__idx, Osmocom__Types::ro__integer& roi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__NsUdiCount_instance(nsvc__idx, roi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_NsUdiCount.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__NsUdiCount(const INTEGER& nsvc__idx, Osmocom__Types::ro__integer& roi)
{
return new as__NsUdiCount_Default(nsvc__idx, roi);
}

BSSGP__Types::PDU__BSSGP_template f__send__paging__ps(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1628, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_ps");
current_location.update_lineno(1631);
/* GBProxy_Tests.ttcn, line 1631 */
BSSGP__Types::PDU__BSSGP_template pdu__tx;
current_location.update_lineno(1632);
/* GBProxy_Tests.ttcn, line 1632 */
BSSGP__Types::PDU__BSSGP_template pdu__rx;
current_location.update_lineno(1635);
/* GBProxy_Tests.ttcn, line 1635 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__PS__PAGING(INTEGER_template(0));
current_location.update_lineno(1636);
/* GBProxy_Tests.ttcn, line 1636 */
pdu__rx.pDU__BSSGP__PAGING__PS().iMSI() = Osmocom__Gb__Types::tr__BSSGP__IMSI(HEXSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()));
current_location.update_lineno(1637);
/* GBProxy_Tests.ttcn, line 1637 */
{
boolean tmp_281;
{
boolean tmp_278 = BSSGP__ConnHdlr_component_g__pars.is_bound();
if(tmp_278) {
const OPTIONAL< OCTETSTRING >& tmp_279 = BSSGP__ConnHdlr_component_g__pars.p__tmsi();
switch (tmp_279.get_selection()) {
case OPTIONAL_UNBOUND:
tmp_278 = FALSE;
break;
case OPTIONAL_OMIT:
tmp_278 = FALSE;
break;
default:
{
const OCTETSTRING& tmp_280 = (const OCTETSTRING&) tmp_279;
tmp_278 = tmp_280.is_present();
break;}
}
}
tmp_281 = tmp_278;
}
if (tmp_281) {
current_location.update_lineno(1638);
/* GBProxy_Tests.ttcn, line 1638 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__PS__PAGING__PTMSI(0, const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()()));
current_location.update_lineno(1639);
/* GBProxy_Tests.ttcn, line 1639 */
pdu__rx.pDU__BSSGP__PAGING__PS().pTMSI() = Osmocom__Gb__Types::tr__BSSGP__TMSI(oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()()));
}
else {
current_location.update_lineno(1641);
/* GBProxy_Tests.ttcn, line 1641 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__PS__PAGING__IMSI(0, const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi());
current_location.update_lineno(1642);
/* GBProxy_Tests.ttcn, line 1642 */
pdu__rx.pDU__BSSGP__PAGING__PS().pTMSI() = OMIT_VALUE;
}
}
current_location.update_lineno(1644);
/* GBProxy_Tests.ttcn, line 1644 */
pdu__tx.pDU__BSSGP__PAGING__PS().paging__Field4() = p4;
current_location.update_lineno(1645);
/* GBProxy_Tests.ttcn, line 1645 */
pdu__rx.pDU__BSSGP__PAGING__PS().paging__Field4() = p4;
current_location.update_lineno(1646);
/* GBProxy_Tests.ttcn, line 1646 */
if ((use__sig == FALSE)) {
current_location.update_lineno(1647);
/* GBProxy_Tests.ttcn, line 1647 */
BSSGP__ConnHdlr_component_SGSN__PTP[sgsn__idx].send(pdu__tx, NULL);
}
else {
current_location.update_lineno(1649);
/* GBProxy_Tests.ttcn, line 1649 */
BSSGP__ConnHdlr_component_SGSN__SIG[sgsn__idx].send(pdu__tx, NULL);
}
current_location.update_lineno(1651);
/* GBProxy_Tests.ttcn, line 1651 */
return pdu__rx;
}

void start_f__send__paging__ps(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_ps", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__send__paging__ps__exp__one__bss(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1656, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_ps_exp_one_bss");
current_location.update_lineno(1659);
/* GBProxy_Tests.ttcn, line 1659 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(1660);
/* GBProxy_Tests.ttcn, line 1660 */
BOOLEAN test__done(FALSE);
current_location.update_lineno(1663);
/* GBProxy_Tests.ttcn, line 1663 */
exp__rx = f__send__paging__ps(p4, sgsn__idx, use__sig);
current_location.update_lineno(1665);
/* GBProxy_Tests.ttcn, line 1665 */
TIMER T("T", 2.0);
current_location.update_lineno(1666);
/* GBProxy_Tests.ttcn, line 1666 */
T.start();
current_location.update_lineno(1667);
/* GBProxy_Tests.ttcn, line 1667 */
{
tmp_289:
alt_status tmp_289_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_289_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_289_alt_flag_2 = ALT_UNCHECKED;
alt_status tmp_289_alt_flag_3 = ALT_UNCHECKED;
alt_status tmp_289_alt_flag_4 = ALT_MAYBE;
alt_status tmp_289_alt_flag_5 = ALT_MAYBE;
alt_status tmp_289_alt_flag_6 = ALT_MAYBE;
alt_status tmp_289_alt_flag_7 = ALT_MAYBE;
alt_status tmp_289_alt_flag_8 = ALT_UNCHECKED;
alt_status tmp_289_alt_flag_9 = ALT_UNCHECKED;
alt_status tmp_289_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_289_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(1668);
/* GBProxy_Tests.ttcn, line 1668 */
boolean tmp_290;
tmp_290 = (!(use__sig));
if (tmp_290) tmp_290 = (!(test__done));
if (tmp_290) tmp_289_alt_flag_0 = ALT_MAYBE;
else tmp_289_alt_flag_0 = ALT_NO;
}
if (tmp_289_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1668);
/* GBProxy_Tests.ttcn, line 1668 */
tmp_289_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1669);
/* GBProxy_Tests.ttcn, line 1669 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(1670);
/* GBProxy_Tests.ttcn, line 1670 */
test__done = TRUE;
current_location.update_lineno(1671);
/* GBProxy_Tests.ttcn, line 1671 */
goto tmp_289;
}
}
if (tmp_289_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(1673);
/* GBProxy_Tests.ttcn, line 1673 */
if ((!(use__sig))) tmp_289_alt_flag_1 = ALT_MAYBE;
else tmp_289_alt_flag_1 = ALT_NO;
}
if (tmp_289_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1673);
/* GBProxy_Tests.ttcn, line 1673 */
tmp_289_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1674);
/* GBProxy_Tests.ttcn, line 1674 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received paging on SIGNALING BVC, expected PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_2 == ALT_UNCHECKED) {
current_location.update_lineno(1676);
/* GBProxy_Tests.ttcn, line 1676 */
boolean tmp_292;
tmp_292 = use__sig;
if (tmp_292) tmp_292 = (!(test__done));
if (tmp_292) tmp_289_alt_flag_2 = ALT_MAYBE;
else tmp_289_alt_flag_2 = ALT_NO;
}
if (tmp_289_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1676);
/* GBProxy_Tests.ttcn, line 1676 */
tmp_289_alt_flag_2 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1677);
/* GBProxy_Tests.ttcn, line 1677 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(1678);
/* GBProxy_Tests.ttcn, line 1678 */
test__done = TRUE;
current_location.update_lineno(1679);
/* GBProxy_Tests.ttcn, line 1679 */
goto tmp_289;
}
}
if (tmp_289_alt_flag_3 == ALT_UNCHECKED) {
current_location.update_lineno(1681);
/* GBProxy_Tests.ttcn, line 1681 */
if (use__sig) tmp_289_alt_flag_3 = ALT_MAYBE;
else tmp_289_alt_flag_3 = ALT_NO;
}
if (tmp_289_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1681);
/* GBProxy_Tests.ttcn, line 1681 */
tmp_289_alt_flag_3 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1682);
/* GBProxy_Tests.ttcn, line 1682 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received paging on PTP BVC, expected SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1684);
/* GBProxy_Tests.ttcn, line 1684 */
tmp_289_alt_flag_4 = BSSGP__ConnHdlr_component_PCU__PTP.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1685);
/* GBProxy_Tests.ttcn, line 1685 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(1687);
/* GBProxy_Tests.ttcn, line 1687 */
tmp_289_alt_flag_5 = BSSGP__ConnHdlr_component_PCU__SIG.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_289_alt_flag_5 == ALT_YES) {
current_location.update_lineno(1688);
/* GBProxy_Tests.ttcn, line 1688 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(1690);
/* GBProxy_Tests.ttcn, line 1690 */
{
BSSGP__Types::PDU__BSSGP_template tmp_294;
tmp_294.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_289_alt_flag_6 = BSSGP__ConnHdlr_component_PCU__PTP.receive(tmp_294, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_289_alt_flag_6 == ALT_YES) {
current_location.update_lineno(1691);
/* GBProxy_Tests.ttcn, line 1691 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected received PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(1693);
/* GBProxy_Tests.ttcn, line 1693 */
{
BSSGP__Types::PDU__BSSGP_template tmp_295;
tmp_295.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_289_alt_flag_7 = BSSGP__ConnHdlr_component_PCU__SIG.receive(tmp_295, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_289_alt_flag_7 == ALT_YES) {
current_location.update_lineno(1694);
/* GBProxy_Tests.ttcn, line 1694 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected on SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_8 == ALT_UNCHECKED) {
current_location.update_lineno(1696);
/* GBProxy_Tests.ttcn, line 1696 */
if ((!(test__done))) tmp_289_alt_flag_8 = ALT_MAYBE;
else tmp_289_alt_flag_8 = ALT_NO;
}
if (tmp_289_alt_flag_8 == ALT_MAYBE) {
current_location.update_lineno(1696);
/* GBProxy_Tests.ttcn, line 1696 */
tmp_289_alt_flag_8 = T.timeout(NULL);
if (tmp_289_alt_flag_8 == ALT_YES) {
current_location.update_lineno(1697);
/* GBProxy_Tests.ttcn, line 1697 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for paging"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_289_alt_flag_9 == ALT_UNCHECKED) {
current_location.update_lineno(1699);
/* GBProxy_Tests.ttcn, line 1699 */
if (test__done) tmp_289_alt_flag_9 = ALT_MAYBE;
else tmp_289_alt_flag_9 = ALT_NO;
}
if (tmp_289_alt_flag_9 == ALT_MAYBE) {
current_location.update_lineno(1699);
/* GBProxy_Tests.ttcn, line 1699 */
tmp_289_alt_flag_9 = T.timeout(NULL);
if (tmp_289_alt_flag_9 == ALT_YES) break;
}
if (tmp_289_default_flag == ALT_MAYBE) {
tmp_289_default_flag = TTCN_Default::try_altsteps();
if (tmp_289_default_flag == ALT_YES || tmp_289_default_flag == ALT_BREAK) break;
else if (tmp_289_default_flag == ALT_REPEAT) goto tmp_289;
}
current_location.update_lineno(1667);
/* GBProxy_Tests.ttcn, line 1667 */
if (tmp_289_alt_flag_0 == ALT_NO && tmp_289_alt_flag_1 == ALT_NO && tmp_289_alt_flag_2 == ALT_NO && tmp_289_alt_flag_3 == ALT_NO && tmp_289_alt_flag_4 == ALT_NO && tmp_289_alt_flag_5 == ALT_NO && tmp_289_alt_flag_6 == ALT_NO && tmp_289_alt_flag_7 == ALT_NO && tmp_289_alt_flag_8 == ALT_NO && tmp_289_alt_flag_9 == ALT_NO && tmp_289_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1667 and 1700.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__send__paging__ps__exp__one__bss(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_one_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_ps_exp_one_bss", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__send__paging__ps__exp__no__bss(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1704, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_ps_exp_no_bss");
current_location.update_lineno(1707);
/* GBProxy_Tests.ttcn, line 1707 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(1708);
/* GBProxy_Tests.ttcn, line 1708 */
exp__rx = f__send__paging__ps(p4, sgsn__idx, use__sig);
current_location.update_lineno(1710);
/* GBProxy_Tests.ttcn, line 1710 */
TIMER T("T", 2.0);
current_location.update_lineno(1711);
/* GBProxy_Tests.ttcn, line 1711 */
T.start();
current_location.update_lineno(1712);
/* GBProxy_Tests.ttcn, line 1712 */
{
tmp_297:
alt_status tmp_297_alt_flag_0 = ALT_MAYBE;
alt_status tmp_297_alt_flag_1 = ALT_MAYBE;
alt_status tmp_297_alt_flag_2 = ALT_MAYBE;
alt_status tmp_297_alt_flag_3 = ALT_MAYBE;
alt_status tmp_297_alt_flag_4 = ALT_MAYBE;
alt_status tmp_297_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_297_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1713);
/* GBProxy_Tests.ttcn, line 1713 */
tmp_297_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__PTP.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_297_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1714);
/* GBProxy_Tests.ttcn, line 1714 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_297_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1716);
/* GBProxy_Tests.ttcn, line 1716 */
tmp_297_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_297_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1717);
/* GBProxy_Tests.ttcn, line 1717 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_297_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1719);
/* GBProxy_Tests.ttcn, line 1719 */
{
BSSGP__Types::PDU__BSSGP_template tmp_298;
tmp_298.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_297_alt_flag_2 = BSSGP__ConnHdlr_component_PCU__PTP.receive(tmp_298, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_297_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1720);
/* GBProxy_Tests.ttcn, line 1720 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging received on PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_297_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1722);
/* GBProxy_Tests.ttcn, line 1722 */
{
BSSGP__Types::PDU__BSSGP_template tmp_299;
tmp_299.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_297_alt_flag_3 = BSSGP__ConnHdlr_component_PCU__SIG.receive(tmp_299, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_297_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1723);
/* GBProxy_Tests.ttcn, line 1723 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging received on SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_297_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1725);
/* GBProxy_Tests.ttcn, line 1725 */
tmp_297_alt_flag_4 = T.timeout(NULL);
if (tmp_297_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1726);
/* GBProxy_Tests.ttcn, line 1726 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_297_default_flag == ALT_MAYBE) {
tmp_297_default_flag = TTCN_Default::try_altsteps();
if (tmp_297_default_flag == ALT_YES || tmp_297_default_flag == ALT_BREAK) break;
else if (tmp_297_default_flag == ALT_REPEAT) goto tmp_297;
}
current_location.update_lineno(1712);
/* GBProxy_Tests.ttcn, line 1712 */
if (tmp_297_alt_flag_0 == ALT_NO && tmp_297_alt_flag_1 == ALT_NO && tmp_297_alt_flag_2 == ALT_NO && tmp_297_alt_flag_3 == ALT_NO && tmp_297_alt_flag_4 == ALT_NO && tmp_297_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1712 and 1728.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__send__paging__ps__exp__no__bss(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_no_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_ps_exp_no_bss", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__paging__ps__ptp__bss(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1731, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_bss");
current_location.update_lineno(1735);
/* GBProxy_Tests.ttcn, line 1735 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4BssArea, INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__bss(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bss(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_bss", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1737, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1738);
/* GBProxy_Tests.ttcn, line 1738 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1739);
/* GBProxy_Tests.ttcn, line 1739 */
f__start__handlers(&f__TC__paging__ps__ptp__bss, cs_39, 9, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1740);
/* GBProxy_Tests.ttcn, line 1740 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__lac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1744, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_lac");
current_location.update_lineno(1746);
/* GBProxy_Tests.ttcn, line 1746 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(1749);
/* GBProxy_Tests.ttcn, line 1749 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id().lai()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__lac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_lac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_lac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__lac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1751, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_lac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_lac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1752);
/* GBProxy_Tests.ttcn, line 1752 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1753);
/* GBProxy_Tests.ttcn, line 1753 */
f__start__handlers(&f__TC__paging__ps__ptp__lac, cs_40, 10, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1754);
/* GBProxy_Tests.ttcn, line 1754 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_lac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__lac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1758, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_lac_unknown");
current_location.update_lineno(1760);
/* GBProxy_Tests.ttcn, line 1760 */
GSM__Types::LocationAreaIdentification unknown__la;
unknown__la.mcc__mnc() = hs_1;
unknown__la.lac() = 33333;
current_location.update_lineno(1765);
/* GBProxy_Tests.ttcn, line 1765 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(unknown__la), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__lac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_lac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__lac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1767, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_lac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_lac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1768);
/* GBProxy_Tests.ttcn, line 1768 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1769);
/* GBProxy_Tests.ttcn, line 1769 */
f__start__handlers(&f__TC__paging__ps__ptp__lac__unknown, cs_41, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1770);
/* GBProxy_Tests.ttcn, line 1770 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_lac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__rac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1774, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_rac");
current_location.update_lineno(1778);
/* GBProxy_Tests.ttcn, line 1778 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__rac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_rac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_rac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__rac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1780, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_rac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_rac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1781);
/* GBProxy_Tests.ttcn, line 1781 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1782);
/* GBProxy_Tests.ttcn, line 1782 */
f__start__handlers(&f__TC__paging__ps__ptp__rac, cs_42, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1783);
/* GBProxy_Tests.ttcn, line 1783 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_rac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__rac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1787, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_rac_unknown");
current_location.update_lineno(1789);
/* GBProxy_Tests.ttcn, line 1789 */
GSM__Types::RoutingAreaIdentification unknown__ra;
{
GSM__Types::LocationAreaIdentification& tmp_300 = unknown__ra.lai();
tmp_300.mcc__mnc() = hs_1;
tmp_300.lac() = 33333;
}
unknown__ra.rac() = 254;
current_location.update_lineno(1797);
/* GBProxy_Tests.ttcn, line 1797 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(unknown__ra), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__rac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_rac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__rac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1799, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_rac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_rac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1800);
/* GBProxy_Tests.ttcn, line 1800 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1801);
/* GBProxy_Tests.ttcn, line 1801 */
f__start__handlers(&f__TC__paging__ps__ptp__rac__unknown, cs_43, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1802);
/* GBProxy_Tests.ttcn, line 1802 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_rac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1806, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_bvci");
current_location.update_lineno(1809);
/* GBProxy_Tests.ttcn, line 1809 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1811, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1812);
/* GBProxy_Tests.ttcn, line 1812 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1813);
/* GBProxy_Tests.ttcn, line 1813 */
f__start__handlers(&f__TC__paging__ps__ptp__bvci, cs_44, 12, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1814);
/* GBProxy_Tests.ttcn, line 1814 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__paging__ps__ptp__bvci__imsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1819, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_bvci_imsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_bvci_imsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1820);
/* GBProxy_Tests.ttcn, line 1820 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1821);
/* GBProxy_Tests.ttcn, line 1821 */
f__start__handlers(&f__TC__paging__ps__ptp__bvci, cs_45, 12, f__start__handlers_t__guard_defval, FALSE);
current_location.update_lineno(1822);
/* GBProxy_Tests.ttcn, line 1822 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_bvci_imsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__paging__ps__reject__ptp__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1826, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_reject_ptp_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_reject_ptp_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1827);
/* GBProxy_Tests.ttcn, line 1827 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1828);
/* GBProxy_Tests.ttcn, line 1828 */
f__start__handlers(&f__TC__paging__ps__reject__ptp__bvci, cs_46, 16, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1829);
/* GBProxy_Tests.ttcn, line 1829 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_reject_ptp_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__reject__ptp__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1833, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_reject_ptp_bvci");
current_location.update_lineno(1836);
/* GBProxy_Tests.ttcn, line 1836 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
current_location.update_lineno(1838);
/* GBProxy_Tests.ttcn, line 1838 */
f__send__paging__ps__rej(FALSE, f__send__paging__ps__rej_pcu__idx_defval);
}

void start_f__TC__paging__ps__reject__ptp__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_reject_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_reject_ptp_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__reject__ptp__bvci__imsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1840, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_reject_ptp_bvci_imsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_reject_ptp_bvci_imsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1841);
/* GBProxy_Tests.ttcn, line 1841 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1842);
/* GBProxy_Tests.ttcn, line 1842 */
f__start__handlers(&f__TC__paging__ps__reject__ptp__bvci, cs_47, 16, f__start__handlers_t__guard_defval, FALSE);
current_location.update_lineno(1843);
/* GBProxy_Tests.ttcn, line 1843 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_reject_ptp_bvci_imsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__ptp__bvci__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1847, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_ptp_bvci_unknown");
current_location.update_lineno(1850);
/* GBProxy_Tests.ttcn, line 1850 */
f__send__paging__ps__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(33333), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), FALSE, 0);
}

void start_f__TC__paging__ps__ptp__bvci__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_ptp_bvci_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__ptp__bvci__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1852, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_ptp_bvci_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_ptp_bvci_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1853);
/* GBProxy_Tests.ttcn, line 1853 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1854);
/* GBProxy_Tests.ttcn, line 1854 */
f__start__handlers(&f__TC__paging__ps__ptp__bvci__unknown, cs_48, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1855);
/* GBProxy_Tests.ttcn, line 1855 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_ptp_bvci_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__dummy__paging__ps__ptp(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1859, TTCN_Location::LOCATION_FUNCTION, "f_TC_dummy_paging_ps_ptp");
current_location.update_lineno(1861);
/* GBProxy_Tests.ttcn, line 1861 */
f__sgsn2pcu(Osmocom__Gb__Types::ts__BSSGP__DUMMY__PAGING__PS(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), GSM__Types::RoutingAreaIdentification_template(OMIT_VALUE)), Osmocom__Gb__Types::tr__BSSGP__DUMMY__PAGING__PS(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), GSM__Types::RoutingAreaIdentification_template(OMIT_VALUE)), f__sgsn2pcu_pcu__idx_defval, FALSE);
current_location.update_lineno(1863);
/* GBProxy_Tests.ttcn, line 1863 */
f__pcu2sgsn(Osmocom__Gb__Types::ts__BSSGP__DUMMY__PAGING__PS__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), 1, 5), Osmocom__Gb__Types::tr__BSSGP__DUMMY__PAGING__PS__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), INTEGER_template(1), INTEGER_template(5)), f__pcu2sgsn_pcu__idx_defval, FALSE);
}

void start_f__TC__dummy__paging__ps__ptp(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dummy_paging_ps_ptp(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_dummy_paging_ps_ptp", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__dummy__paging__ps__ptp(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1866, TTCN_Location::LOCATION_TESTCASE, "TC_dummy_paging_ps_ptp");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_dummy_paging_ps_ptp", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1867);
/* GBProxy_Tests.ttcn, line 1867 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1868);
/* GBProxy_Tests.ttcn, line 1868 */
f__start__handlers(&f__TC__dummy__paging__ps__ptp, cs_49, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1869);
/* GBProxy_Tests.ttcn, line 1869 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_dummy_paging_ps_ptp was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__paging__sig__pcu_instance(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1873, TTCN_Location::LOCATION_ALTSTEP, "as_paging_sig_pcu");
alt_status ret_val = ALT_NO;
current_location.update_lineno(1875);
/* GBProxy_Tests.ttcn, line 1875 */
switch (BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(1876);
/* GBProxy_Tests.ttcn, line 1876 */
if (Osmocom__Types::ro__integer__contains(roi, pcu__idx)) {
current_location.update_lineno(1877);
/* GBProxy_Tests.ttcn, line 1877 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received multiple paging on same SIG BVC"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(1879);
/* GBProxy_Tests.ttcn, line 1879 */
{
Osmocom__Types::ro__integer tmp_301;
{
Osmocom__Types::ro__integer tmp_302;
tmp_302.set_size(1);
tmp_302[0] = pcu__idx;
tmp_301 = (roi + tmp_302);
}
roi = tmp_301;
}
current_location.update_lineno(1880);
/* GBProxy_Tests.ttcn, line 1880 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
current_location.update_lineno(1882);
/* GBProxy_Tests.ttcn, line 1882 */
switch (BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(1883);
/* GBProxy_Tests.ttcn, line 1883 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received paging on PTP BVC, expected SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
current_location.update_lineno(1885);
/* GBProxy_Tests.ttcn, line 1885 */
{
alt_status tmp_304;
{
BSSGP__Types::PDU__BSSGP_template tmp_303;
tmp_303.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_304 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(tmp_303, NULL, any_compref, NULL, NULL, NULL);
}
switch (tmp_304) {
case ALT_YES:
{
current_location.update_lineno(1886);
/* GBProxy_Tests.ttcn, line 1886 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected received SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
current_location.update_lineno(1888);
/* GBProxy_Tests.ttcn, line 1888 */
{
alt_status tmp_306;
{
BSSGP__Types::PDU__BSSGP_template tmp_305;
tmp_305.pDU__BSSGP__PAGING__PS() = ANY_VALUE;
tmp_306 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(tmp_305, NULL, any_compref, NULL, NULL, NULL);
}
switch (tmp_306) {
case ALT_YES:
{
current_location.update_lineno(1889);
/* GBProxy_Tests.ttcn, line 1889 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected received PTP BVC"),TTCN_Logger::end_event_log2str()));
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__paging__sig__pcu(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__paging__sig__pcu_instance(pcu__idx, exp__rx, roi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_paging_sig_pcu.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__paging__sig__pcu(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
return new as__paging__sig__pcu_Default(pcu__idx, exp__rx, roi);
}

boolean operator==(null_type, const ro__default& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @GBProxy_Tests.ro_default.");
return other_value.val_ptr->n_elements == 0;
}

void f__send__paging__ps__exp__multi(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const Osmocom__Types::ro__integer& exp__on__pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1896, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_ps_exp_multi");
current_location.update_lineno(1899);
/* GBProxy_Tests.ttcn, line 1899 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(1900);
/* GBProxy_Tests.ttcn, line 1900 */
exp__rx = f__send__paging__ps(p4, sgsn__idx, TRUE);
current_location.update_lineno(1903);
/* GBProxy_Tests.ttcn, line 1903 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(1904);
/* GBProxy_Tests.ttcn, line 1904 */
INTEGER i(0);
current_location.update_lineno(1904);
/* GBProxy_Tests.ttcn, line 1904 */
for ( ; ; ) {
current_location.update_lineno(1904);
/* GBProxy_Tests.ttcn, line 1904 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(1905);
/* GBProxy_Tests.ttcn, line 1905 */
DEFAULT d(activate_as__paging__sig__pcu(i, exp__rx, BSSGP__ConnHdlr_component_g__roi));
current_location.update_lineno(1906);
/* GBProxy_Tests.ttcn, line 1906 */
{
ro__default tmp_308;
{
ro__default tmp_309;
tmp_309.set_size(1);
tmp_309[0] = d;
tmp_308 = (defaults + tmp_309);
}
defaults = tmp_308;
}
current_location.update_lineno(1904);
/* GBProxy_Tests.ttcn, line 1904 */
{
INTEGER tmp_310;
++i;
}
}
}
current_location.update_lineno(1908);
/* GBProxy_Tests.ttcn, line 1908 */
Osmocom__Types::f__sleep(2.0);
{
current_location.update_lineno(1909);
/* GBProxy_Tests.ttcn, line 1909 */
INTEGER i(0);
current_location.update_lineno(1909);
/* GBProxy_Tests.ttcn, line 1909 */
for ( ; ; ) {
current_location.update_lineno(1909);
/* GBProxy_Tests.ttcn, line 1909 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(1910);
/* GBProxy_Tests.ttcn, line 1910 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(1909);
/* GBProxy_Tests.ttcn, line 1909 */
{
INTEGER tmp_311;
++i;
}
}
}
current_location.update_lineno(1912);
/* GBProxy_Tests.ttcn, line 1912 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Paging received on PCU ");
BSSGP__ConnHdlr_component_g__roi.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
{
current_location.update_lineno(1914);
/* GBProxy_Tests.ttcn, line 1914 */
INTEGER i(0);
current_location.update_lineno(1914);
/* GBProxy_Tests.ttcn, line 1914 */
for ( ; ; ) {
current_location.update_lineno(1914);
/* GBProxy_Tests.ttcn, line 1914 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(1915);
/* GBProxy_Tests.ttcn, line 1915 */
BOOLEAN rx__on__i(Osmocom__Types::ro__integer__contains(BSSGP__ConnHdlr_component_g__roi, i));
current_location.update_lineno(1916);
/* GBProxy_Tests.ttcn, line 1916 */
BOOLEAN exp__on__i(Osmocom__Types::ro__integer__contains(exp__on__pcu__idx, i));
current_location.update_lineno(1917);
/* GBProxy_Tests.ttcn, line 1917 */
{
boolean tmp_312;
tmp_312 = exp__on__i;
if (tmp_312) tmp_312 = (!(rx__on__i));
if (tmp_312) {
current_location.update_lineno(1918);
/* GBProxy_Tests.ttcn, line 1918 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PS-PAGING not received on "),const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei().log(),TTCN_Logger::end_event_log2str()));
}
}
current_location.update_lineno(1920);
/* GBProxy_Tests.ttcn, line 1920 */
if (((!(exp__on__i)) && rx__on__i)) {
current_location.update_lineno(1921);
/* GBProxy_Tests.ttcn, line 1921 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PS-PAGING not expected but received on "),const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei().log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(1914);
/* GBProxy_Tests.ttcn, line 1914 */
{
INTEGER tmp_313;
++i;
}
}
}
current_location.update_lineno(1924);
/* GBProxy_Tests.ttcn, line 1924 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__send__paging__ps__exp__multi(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const Osmocom__Types::ro__integer& exp__on__pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_multi(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
exp__on__pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_ps_exp_multi", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
exp__on__pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__send__paging__ps__rej(const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1928, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_ps_rej");
current_location.update_lineno(1930);
/* GBProxy_Tests.ttcn, line 1930 */
BSSGP__Types::PDU__BSSGP_template pdu__tx;
current_location.update_lineno(1931);
/* GBProxy_Tests.ttcn, line 1931 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(1932);
/* GBProxy_Tests.ttcn, line 1932 */
BSSGP__Types::PDU__BSSGP pdu__rx;
current_location.update_lineno(1933);
/* GBProxy_Tests.ttcn, line 1933 */
TIMER T("T", 5.0);
current_location.update_lineno(1934);
/* GBProxy_Tests.ttcn, line 1934 */
INTEGER_template tmsi__int(OMIT_VALUE);
current_location.update_lineno(1936);
/* GBProxy_Tests.ttcn, line 1936 */
{
boolean tmp_317;
{
boolean tmp_314 = BSSGP__ConnHdlr_component_g__pars.is_bound();
if(tmp_314) {
const OPTIONAL< OCTETSTRING >& tmp_315 = BSSGP__ConnHdlr_component_g__pars.p__tmsi();
switch (tmp_315.get_selection()) {
case OPTIONAL_UNBOUND:
tmp_314 = FALSE;
break;
case OPTIONAL_OMIT:
tmp_314 = FALSE;
break;
default:
{
const OCTETSTRING& tmp_316 = (const OCTETSTRING&) tmp_315;
tmp_314 = tmp_316.is_present();
break;}
}
}
tmp_317 = tmp_314;
}
if (tmp_317) {
current_location.update_lineno(1937);
/* GBProxy_Tests.ttcn, line 1937 */
tmsi__int = oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()());
}
}
current_location.update_lineno(1940);
/* GBProxy_Tests.ttcn, line 1940 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__PAGING__PS__REJ(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), 23, 42, tmsi__int);
current_location.update_lineno(1941);
/* GBProxy_Tests.ttcn, line 1941 */
exp__rx = Osmocom__Gb__Types::tr__BSSGP__PAGING__PS__REJ(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), INTEGER_template(23), INTEGER_template(42), tmsi__int);
current_location.update_lineno(1943);
/* GBProxy_Tests.ttcn, line 1943 */
if (use__sig) {
current_location.update_lineno(1944);
/* GBProxy_Tests.ttcn, line 1944 */
BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].send(pdu__tx, NULL);
}
else {
current_location.update_lineno(1946);
/* GBProxy_Tests.ttcn, line 1946 */
BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].send(pdu__tx, NULL);
}
current_location.update_lineno(1948);
/* GBProxy_Tests.ttcn, line 1948 */
T.start();
current_location.update_lineno(1949);
/* GBProxy_Tests.ttcn, line 1949 */
{
tmp_321:
alt_status tmp_321_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_2 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_3 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_4 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_5 = ALT_UNCHECKED;
alt_status tmp_321_alt_flag_6 = ALT_MAYBE;
alt_status tmp_321_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_321_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(1950);
/* GBProxy_Tests.ttcn, line 1950 */
if (use__sig) tmp_321_alt_flag_0 = ALT_MAYBE;
else tmp_321_alt_flag_0 = ALT_NO;
}
if (tmp_321_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1950);
/* GBProxy_Tests.ttcn, line 1950 */
tmp_321_alt_flag_0 = BSSGP__ConnHdlr_component_SGSN__SIG[const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()].receive(exp__rx, &(pdu__rx), any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1951);
/* GBProxy_Tests.ttcn, line 1951 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_321_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(1953);
/* GBProxy_Tests.ttcn, line 1953 */
if (use__sig) tmp_321_alt_flag_1 = ALT_MAYBE;
else tmp_321_alt_flag_1 = ALT_NO;
}
if (tmp_321_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1953);
/* GBProxy_Tests.ttcn, line 1953 */
tmp_321_alt_flag_1 = BSSGP__ConnHdlr_component_SGSN__SIG[const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()].receive(any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1954);
/* GBProxy_Tests.ttcn, line 1954 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected PDU on SGSN"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_321_alt_flag_2 == ALT_UNCHECKED) {
current_location.update_lineno(1956);
/* GBProxy_Tests.ttcn, line 1956 */
if (use__sig) tmp_321_alt_flag_2 = ALT_MAYBE;
else tmp_321_alt_flag_2 = ALT_NO;
}
if (tmp_321_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1956);
/* GBProxy_Tests.ttcn, line 1956 */
tmp_321_alt_flag_2 = BSSGP__ConnHdlr_component_SGSN__SIG.receive(exp__rx, &(pdu__rx), any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1957);
/* GBProxy_Tests.ttcn, line 1957 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PAGING-PS-REJECT arrived on wrong SGSN"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_321_alt_flag_3 == ALT_UNCHECKED) {
current_location.update_lineno(1959);
/* GBProxy_Tests.ttcn, line 1959 */
if ((!(use__sig))) tmp_321_alt_flag_3 = ALT_MAYBE;
else tmp_321_alt_flag_3 = ALT_NO;
}
if (tmp_321_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1959);
/* GBProxy_Tests.ttcn, line 1959 */
tmp_321_alt_flag_3 = BSSGP__ConnHdlr_component_SGSN__PTP[const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()].receive(exp__rx, &(pdu__rx), any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1960);
/* GBProxy_Tests.ttcn, line 1960 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_321_alt_flag_4 == ALT_UNCHECKED) {
current_location.update_lineno(1962);
/* GBProxy_Tests.ttcn, line 1962 */
if ((!(use__sig))) tmp_321_alt_flag_4 = ALT_MAYBE;
else tmp_321_alt_flag_4 = ALT_NO;
}
if (tmp_321_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1962);
/* GBProxy_Tests.ttcn, line 1962 */
tmp_321_alt_flag_4 = BSSGP__ConnHdlr_component_SGSN__PTP[const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()].receive(any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1963);
/* GBProxy_Tests.ttcn, line 1963 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected PDU on SGSN"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_321_alt_flag_5 == ALT_UNCHECKED) {
current_location.update_lineno(1965);
/* GBProxy_Tests.ttcn, line 1965 */
if ((!(use__sig))) tmp_321_alt_flag_5 = ALT_MAYBE;
else tmp_321_alt_flag_5 = ALT_NO;
}
if (tmp_321_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(1965);
/* GBProxy_Tests.ttcn, line 1965 */
tmp_321_alt_flag_5 = BSSGP__ConnHdlr_component_SGSN__PTP.receive(exp__rx, &(pdu__rx), any_compref, NULL, NULL, NULL);
if (tmp_321_alt_flag_5 == ALT_YES) {
current_location.update_lineno(1966);
/* GBProxy_Tests.ttcn, line 1966 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PAGING-PS-REJECT arrived on wrong SGSN"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_321_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(1968);
/* GBProxy_Tests.ttcn, line 1968 */
tmp_321_alt_flag_6 = T.timeout(NULL);
if (tmp_321_alt_flag_6 == ALT_YES) {
current_location.update_lineno(1969);
/* GBProxy_Tests.ttcn, line 1969 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for PAGING-PS-REJECT"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_321_default_flag == ALT_MAYBE) {
tmp_321_default_flag = TTCN_Default::try_altsteps();
if (tmp_321_default_flag == ALT_YES || tmp_321_default_flag == ALT_BREAK) break;
else if (tmp_321_default_flag == ALT_REPEAT) goto tmp_321;
}
current_location.update_lineno(1949);
/* GBProxy_Tests.ttcn, line 1949 */
if (tmp_321_alt_flag_0 == ALT_NO && tmp_321_alt_flag_1 == ALT_NO && tmp_321_alt_flag_2 == ALT_NO && tmp_321_alt_flag_3 == ALT_NO && tmp_321_alt_flag_4 == ALT_NO && tmp_321_alt_flag_5 == ALT_NO && tmp_321_alt_flag_6 == ALT_NO && tmp_321_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 1949 and 1971.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__send__paging__ps__rej(const COMPONENT& component_reference, const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_rej(");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_ps_rej", text_buf);
use__sig.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__paging__ps__sig__bss(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1975, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_bss");
current_location.update_lineno(1978);
/* GBProxy_Tests.ttcn, line 1978 */
{
Osmocom__Types::ro__integer tmp_322;
tmp_322.set_size(3);
tmp_322[0] = 0;
tmp_322[1] = 1;
tmp_322[2] = 2;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4BssArea, INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_322);
}
}

void start_f__TC__paging__ps__sig__bss(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bss(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_bss", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1980, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1981);
/* GBProxy_Tests.ttcn, line 1981 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1982);
/* GBProxy_Tests.ttcn, line 1982 */
f__start__handlers(&f__TC__paging__ps__sig__bss, cs_50, 13, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(1983);
/* GBProxy_Tests.ttcn, line 1983 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__lac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 1987, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_lac");
current_location.update_lineno(1990);
/* GBProxy_Tests.ttcn, line 1990 */
{
Osmocom__Types::ro__integer tmp_323;
tmp_323.set_size(3);
tmp_323[0] = 0;
tmp_323[1] = 1;
tmp_323[2] = 2;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id().lai()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_323);
}
current_location.update_lineno(1992);
/* GBProxy_Tests.ttcn, line 1992 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(1994);
/* GBProxy_Tests.ttcn, line 1994 */
f__connect__to__pcu__bvc(2, 2, 1);
current_location.update_lineno(1995);
/* GBProxy_Tests.ttcn, line 1995 */
{
Osmocom__Types::ro__integer tmp_325;
tmp_325.set_size(1);
tmp_325[0] = 2;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id().lai()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_325);
}
}

void start_f__TC__paging__ps__sig__lac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_lac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_lac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__lac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 1997, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_lac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_lac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1998);
/* GBProxy_Tests.ttcn, line 1998 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(1999);
/* GBProxy_Tests.ttcn, line 1999 */
f__start__handlers(&f__TC__paging__ps__sig__lac, cs_51, 14, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2000);
/* GBProxy_Tests.ttcn, line 2000 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_lac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__lac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2004, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_lac_unknown");
current_location.update_lineno(2006);
/* GBProxy_Tests.ttcn, line 2006 */
GSM__Types::LocationAreaIdentification unknown__la;
unknown__la.mcc__mnc() = hs_1;
unknown__la.lac() = 33333;
current_location.update_lineno(2010);
/* GBProxy_Tests.ttcn, line 2010 */
f__send__paging__ps__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(unknown__la), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), TRUE);
}

void start_f__TC__paging__ps__sig__lac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_lac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__lac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2012, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_lac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_lac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2013);
/* GBProxy_Tests.ttcn, line 2013 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2014);
/* GBProxy_Tests.ttcn, line 2014 */
f__start__handlers(&f__TC__paging__ps__sig__lac__unknown, cs_52, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2015);
/* GBProxy_Tests.ttcn, line 2015 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_lac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__rac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2019, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_rac");
current_location.update_lineno(2022);
/* GBProxy_Tests.ttcn, line 2022 */
{
Osmocom__Types::ro__integer tmp_326;
tmp_326.set_size(1);
tmp_326[0] = 0;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_326);
}
current_location.update_lineno(2023);
/* GBProxy_Tests.ttcn, line 2023 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(2025);
/* GBProxy_Tests.ttcn, line 2025 */
{
Osmocom__Types::ro__integer tmp_328;
tmp_328.set_size(2);
tmp_328[0] = 1;
tmp_328[1] = 2;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_328);
}
current_location.update_lineno(2026);
/* GBProxy_Tests.ttcn, line 2026 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(2028);
/* GBProxy_Tests.ttcn, line 2028 */
f__connect__to__pcu__bvc(2, 2, 1);
current_location.update_lineno(2029);
/* GBProxy_Tests.ttcn, line 2029 */
{
Osmocom__Types::ro__integer tmp_330;
tmp_330.set_size(1);
tmp_330[0] = 2;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_330);
}
}

void start_f__TC__paging__ps__sig__rac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_rac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_rac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__rac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2031, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_rac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_rac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2032);
/* GBProxy_Tests.ttcn, line 2032 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2033);
/* GBProxy_Tests.ttcn, line 2033 */
f__start__handlers(&f__TC__paging__ps__sig__rac, cs_53, 15, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2034);
/* GBProxy_Tests.ttcn, line 2034 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_rac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__rac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2038, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_rac_unknown");
current_location.update_lineno(2040);
/* GBProxy_Tests.ttcn, line 2040 */
GSM__Types::RoutingAreaIdentification unknown__ra;
{
GSM__Types::LocationAreaIdentification& tmp_331 = unknown__ra.lai();
tmp_331.mcc__mnc() = hs_1;
tmp_331.lac() = 33333;
}
unknown__ra.rac() = 254;
current_location.update_lineno(2047);
/* GBProxy_Tests.ttcn, line 2047 */
f__send__paging__ps__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(unknown__ra), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), TRUE);
}

void start_f__TC__paging__ps__sig__rac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_rac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__rac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2049, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_rac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_rac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2050);
/* GBProxy_Tests.ttcn, line 2050 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2051);
/* GBProxy_Tests.ttcn, line 2051 */
f__start__handlers(&f__TC__paging__ps__sig__rac__unknown, cs_54, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2052);
/* GBProxy_Tests.ttcn, line 2052 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_rac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2056, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_bvci");
current_location.update_lineno(2058);
/* GBProxy_Tests.ttcn, line 2058 */
{
Osmocom__Types::ro__integer tmp_332;
tmp_332.set_size(1);
tmp_332[0] = 0;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_332);
}
}

void start_f__TC__paging__ps__sig__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2060, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2061);
/* GBProxy_Tests.ttcn, line 2061 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2062);
/* GBProxy_Tests.ttcn, line 2062 */
f__start__handlers(&f__TC__paging__ps__sig__bvci, cs_55, 16, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2063);
/* GBProxy_Tests.ttcn, line 2063 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__paging__ps__sig__bvci__imsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2067, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_bvci_imsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_bvci_imsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2068);
/* GBProxy_Tests.ttcn, line 2068 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2069);
/* GBProxy_Tests.ttcn, line 2069 */
f__start__handlers(&f__TC__paging__ps__sig__bvci, cs_56, 16, f__start__handlers_t__guard_defval, FALSE);
current_location.update_lineno(2070);
/* GBProxy_Tests.ttcn, line 2070 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_bvci_imsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__reject__sig__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2074, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_reject_sig_bvci");
current_location.update_lineno(2077);
/* GBProxy_Tests.ttcn, line 2077 */
{
Osmocom__Types::ro__integer tmp_333;
tmp_333.set_size(1);
tmp_333[0] = 0;
f__send__paging__ps__exp__multi(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), tmp_333);
}
current_location.update_lineno(2079);
/* GBProxy_Tests.ttcn, line 2079 */
f__send__paging__ps__rej(TRUE, f__send__paging__ps__rej_pcu__idx_defval);
}

void start_f__TC__paging__ps__reject__sig__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_reject_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_reject_sig_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__reject__sig__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2082, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_reject_sig_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_reject_sig_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2083);
/* GBProxy_Tests.ttcn, line 2083 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2084);
/* GBProxy_Tests.ttcn, line 2084 */
f__start__handlers(&f__TC__paging__ps__reject__sig__bvci, cs_57, 16, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2085);
/* GBProxy_Tests.ttcn, line 2085 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_reject_sig_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__paging__ps__reject__sig__bvci__imsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2089, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_reject_sig_bvci_imsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_reject_sig_bvci_imsi", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2090);
/* GBProxy_Tests.ttcn, line 2090 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2091);
/* GBProxy_Tests.ttcn, line 2091 */
f__start__handlers(&f__TC__paging__ps__reject__sig__bvci, cs_58, 16, f__start__handlers_t__guard_defval, FALSE);
current_location.update_lineno(2092);
/* GBProxy_Tests.ttcn, line 2092 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_reject_sig_bvci_imsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__ps__sig__bvci__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2096, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_ps_sig_bvci_unknown");
current_location.update_lineno(2098);
/* GBProxy_Tests.ttcn, line 2098 */
f__send__paging__ps__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(33333), INTEGER(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).sgsn__idx()), TRUE);
}

void start_f__TC__paging__ps__sig__bvci__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_ps_sig_bvci_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__ps__sig__bvci__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2100, TTCN_Location::LOCATION_TESTCASE, "TC_paging_ps_sig_bvci_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_ps_sig_bvci_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2101);
/* GBProxy_Tests.ttcn, line 2101 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2102);
/* GBProxy_Tests.ttcn, line 2102 */
f__start__handlers(&f__TC__paging__ps__sig__bvci__unknown, cs_59, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2103);
/* GBProxy_Tests.ttcn, line 2103 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_ps_sig_bvci_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__dummy__paging__ps__sig(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2107, TTCN_Location::LOCATION_FUNCTION, "f_TC_dummy_paging_ps_sig");
current_location.update_lineno(2109);
/* GBProxy_Tests.ttcn, line 2109 */
f__sgsn2pcu(Osmocom__Gb__Types::ts__BSSGP__DUMMY__PAGING__PS(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), GSM__Types::RoutingAreaIdentification_template(OMIT_VALUE)), Osmocom__Gb__Types::tr__BSSGP__DUMMY__PAGING__PS(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), GSM__Types::RoutingAreaIdentification_template(OMIT_VALUE)), f__sgsn2pcu_pcu__idx_defval, TRUE);
current_location.update_lineno(2111);
/* GBProxy_Tests.ttcn, line 2111 */
f__pcu2sgsn(Osmocom__Gb__Types::ts__BSSGP__DUMMY__PAGING__PS__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), 1, 5), Osmocom__Gb__Types::tr__BSSGP__DUMMY__PAGING__PS__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), INTEGER_template(1), INTEGER_template(5)), f__pcu2sgsn_pcu__idx_defval, TRUE);
}

void start_f__TC__dummy__paging__ps__sig(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dummy_paging_ps_sig(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_dummy_paging_ps_sig", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__dummy__paging__ps__sig(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2114, TTCN_Location::LOCATION_TESTCASE, "TC_dummy_paging_ps_sig");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_dummy_paging_ps_sig", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2115);
/* GBProxy_Tests.ttcn, line 2115 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2116);
/* GBProxy_Tests.ttcn, line 2116 */
f__start__handlers(&f__TC__dummy__paging__ps__sig, cs_60, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2117);
/* GBProxy_Tests.ttcn, line 2117 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_dummy_paging_ps_sig was stopped.");
}
return TTCN_Runtime::end_testcase();
}

BSSGP__Types::PDU__BSSGP_template f__send__paging__cs(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2126, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_cs");
current_location.update_lineno(2129);
/* GBProxy_Tests.ttcn, line 2129 */
BSSGP__Types::PDU__BSSGP_template pdu__tx;
current_location.update_lineno(2130);
/* GBProxy_Tests.ttcn, line 2130 */
BSSGP__Types::PDU__BSSGP_template pdu__rx;
current_location.update_lineno(2133);
/* GBProxy_Tests.ttcn, line 2133 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__CS__PAGING(0);
current_location.update_lineno(2134);
/* GBProxy_Tests.ttcn, line 2134 */
pdu__rx.pDU__BSSGP__PAGING__CS().iMSI() = Osmocom__Gb__Types::tr__BSSGP__IMSI(HEXSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()));
current_location.update_lineno(2135);
/* GBProxy_Tests.ttcn, line 2135 */
{
boolean tmp_339;
{
boolean tmp_336 = BSSGP__ConnHdlr_component_g__pars.is_bound();
if(tmp_336) {
const OPTIONAL< OCTETSTRING >& tmp_337 = BSSGP__ConnHdlr_component_g__pars.p__tmsi();
switch (tmp_337.get_selection()) {
case OPTIONAL_UNBOUND:
tmp_336 = FALSE;
break;
case OPTIONAL_OMIT:
tmp_336 = FALSE;
break;
default:
{
const OCTETSTRING& tmp_338 = (const OCTETSTRING&) tmp_337;
tmp_336 = tmp_338.is_present();
break;}
}
}
tmp_339 = tmp_336;
}
if (tmp_339) {
current_location.update_lineno(2136);
/* GBProxy_Tests.ttcn, line 2136 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__CS__PAGING__PTMSI(0, const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()()));
current_location.update_lineno(2137);
/* GBProxy_Tests.ttcn, line 2137 */
pdu__rx.pDU__BSSGP__PAGING__CS().tMSI() = Osmocom__Gb__Types::tr__BSSGP__TMSI(oct2int(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).p__tmsi()()));
}
else {
current_location.update_lineno(2139);
/* GBProxy_Tests.ttcn, line 2139 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__CS__PAGING__IMSI(0, const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi());
current_location.update_lineno(2140);
/* GBProxy_Tests.ttcn, line 2140 */
pdu__rx.pDU__BSSGP__PAGING__CS().tMSI() = OMIT_VALUE;
}
}
current_location.update_lineno(2142);
/* GBProxy_Tests.ttcn, line 2142 */
pdu__tx.pDU__BSSGP__PAGING__CS().paging__Field4() = p4;
current_location.update_lineno(2143);
/* GBProxy_Tests.ttcn, line 2143 */
pdu__rx.pDU__BSSGP__PAGING__CS().paging__Field4() = p4;
current_location.update_lineno(2144);
/* GBProxy_Tests.ttcn, line 2144 */
if ((use__sig == FALSE)) {
current_location.update_lineno(2145);
/* GBProxy_Tests.ttcn, line 2145 */
BSSGP__ConnHdlr_component_SGSN__PTP[sgsn__idx].send(pdu__tx, NULL);
}
else {
current_location.update_lineno(2147);
/* GBProxy_Tests.ttcn, line 2147 */
BSSGP__ConnHdlr_component_SGSN__SIG[sgsn__idx].send(pdu__tx, NULL);
}
current_location.update_lineno(2149);
/* GBProxy_Tests.ttcn, line 2149 */
return pdu__rx;
}

void start_f__send__paging__cs(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_cs", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__send__paging__cs__exp__one__bss(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2154, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_cs_exp_one_bss");
current_location.update_lineno(2157);
/* GBProxy_Tests.ttcn, line 2157 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(2158);
/* GBProxy_Tests.ttcn, line 2158 */
BOOLEAN test__done(FALSE);
current_location.update_lineno(2161);
/* GBProxy_Tests.ttcn, line 2161 */
exp__rx = f__send__paging__cs(p4, sgsn__idx, use__sig);
current_location.update_lineno(2163);
/* GBProxy_Tests.ttcn, line 2163 */
TIMER T("T", 2.0);
current_location.update_lineno(2164);
/* GBProxy_Tests.ttcn, line 2164 */
T.start();
current_location.update_lineno(2165);
/* GBProxy_Tests.ttcn, line 2165 */
{
tmp_347:
alt_status tmp_347_alt_flag_0 = ALT_UNCHECKED;
alt_status tmp_347_alt_flag_1 = ALT_UNCHECKED;
alt_status tmp_347_alt_flag_2 = ALT_UNCHECKED;
alt_status tmp_347_alt_flag_3 = ALT_UNCHECKED;
alt_status tmp_347_alt_flag_4 = ALT_MAYBE;
alt_status tmp_347_alt_flag_5 = ALT_MAYBE;
alt_status tmp_347_alt_flag_6 = ALT_MAYBE;
alt_status tmp_347_alt_flag_7 = ALT_MAYBE;
alt_status tmp_347_alt_flag_8 = ALT_UNCHECKED;
alt_status tmp_347_alt_flag_9 = ALT_UNCHECKED;
alt_status tmp_347_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_347_alt_flag_0 == ALT_UNCHECKED) {
current_location.update_lineno(2166);
/* GBProxy_Tests.ttcn, line 2166 */
boolean tmp_348;
tmp_348 = (!(use__sig));
if (tmp_348) tmp_348 = (!(test__done));
if (tmp_348) tmp_347_alt_flag_0 = ALT_MAYBE;
else tmp_347_alt_flag_0 = ALT_NO;
}
if (tmp_347_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(2166);
/* GBProxy_Tests.ttcn, line 2166 */
tmp_347_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_0 == ALT_YES) {
current_location.update_lineno(2167);
/* GBProxy_Tests.ttcn, line 2167 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2168);
/* GBProxy_Tests.ttcn, line 2168 */
test__done = TRUE;
current_location.update_lineno(2169);
/* GBProxy_Tests.ttcn, line 2169 */
goto tmp_347;
}
}
if (tmp_347_alt_flag_1 == ALT_UNCHECKED) {
current_location.update_lineno(2171);
/* GBProxy_Tests.ttcn, line 2171 */
if ((!(use__sig))) tmp_347_alt_flag_1 = ALT_MAYBE;
else tmp_347_alt_flag_1 = ALT_NO;
}
if (tmp_347_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(2171);
/* GBProxy_Tests.ttcn, line 2171 */
tmp_347_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_1 == ALT_YES) {
current_location.update_lineno(2172);
/* GBProxy_Tests.ttcn, line 2172 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received paging on SIGNALING BVC, expected PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_2 == ALT_UNCHECKED) {
current_location.update_lineno(2174);
/* GBProxy_Tests.ttcn, line 2174 */
boolean tmp_350;
tmp_350 = use__sig;
if (tmp_350) tmp_350 = (!(test__done));
if (tmp_350) tmp_347_alt_flag_2 = ALT_MAYBE;
else tmp_347_alt_flag_2 = ALT_NO;
}
if (tmp_347_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(2174);
/* GBProxy_Tests.ttcn, line 2174 */
tmp_347_alt_flag_2 = BSSGP__ConnHdlr_component_PCU__SIG[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_2 == ALT_YES) {
current_location.update_lineno(2175);
/* GBProxy_Tests.ttcn, line 2175 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2176);
/* GBProxy_Tests.ttcn, line 2176 */
test__done = TRUE;
current_location.update_lineno(2177);
/* GBProxy_Tests.ttcn, line 2177 */
goto tmp_347;
}
}
if (tmp_347_alt_flag_3 == ALT_UNCHECKED) {
current_location.update_lineno(2179);
/* GBProxy_Tests.ttcn, line 2179 */
if (use__sig) tmp_347_alt_flag_3 = ALT_MAYBE;
else tmp_347_alt_flag_3 = ALT_NO;
}
if (tmp_347_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(2179);
/* GBProxy_Tests.ttcn, line 2179 */
tmp_347_alt_flag_3 = BSSGP__ConnHdlr_component_PCU__PTP[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_3 == ALT_YES) {
current_location.update_lineno(2180);
/* GBProxy_Tests.ttcn, line 2180 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received paging on PTP BVC, expected SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(2182);
/* GBProxy_Tests.ttcn, line 2182 */
tmp_347_alt_flag_4 = BSSGP__ConnHdlr_component_PCU__PTP.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_4 == ALT_YES) {
current_location.update_lineno(2183);
/* GBProxy_Tests.ttcn, line 2183 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(2185);
/* GBProxy_Tests.ttcn, line 2185 */
tmp_347_alt_flag_5 = BSSGP__ConnHdlr_component_PCU__SIG.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_347_alt_flag_5 == ALT_YES) {
current_location.update_lineno(2186);
/* GBProxy_Tests.ttcn, line 2186 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(2188);
/* GBProxy_Tests.ttcn, line 2188 */
{
BSSGP__Types::PDU__BSSGP_template tmp_352;
tmp_352.pDU__BSSGP__PAGING__CS() = ANY_VALUE;
tmp_347_alt_flag_6 = BSSGP__ConnHdlr_component_PCU__PTP.receive(tmp_352, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_347_alt_flag_6 == ALT_YES) {
current_location.update_lineno(2189);
/* GBProxy_Tests.ttcn, line 2189 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected received PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(2191);
/* GBProxy_Tests.ttcn, line 2191 */
{
BSSGP__Types::PDU__BSSGP_template tmp_353;
tmp_353.pDU__BSSGP__PAGING__CS() = ANY_VALUE;
tmp_347_alt_flag_7 = BSSGP__ConnHdlr_component_PCU__SIG.receive(tmp_353, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_347_alt_flag_7 == ALT_YES) {
current_location.update_lineno(2192);
/* GBProxy_Tests.ttcn, line 2192 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging than expected on SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_8 == ALT_UNCHECKED) {
current_location.update_lineno(2194);
/* GBProxy_Tests.ttcn, line 2194 */
if ((!(test__done))) tmp_347_alt_flag_8 = ALT_MAYBE;
else tmp_347_alt_flag_8 = ALT_NO;
}
if (tmp_347_alt_flag_8 == ALT_MAYBE) {
current_location.update_lineno(2194);
/* GBProxy_Tests.ttcn, line 2194 */
tmp_347_alt_flag_8 = T.timeout(NULL);
if (tmp_347_alt_flag_8 == ALT_YES) {
current_location.update_lineno(2195);
/* GBProxy_Tests.ttcn, line 2195 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout while waiting for paging"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_347_alt_flag_9 == ALT_UNCHECKED) {
current_location.update_lineno(2197);
/* GBProxy_Tests.ttcn, line 2197 */
if (test__done) tmp_347_alt_flag_9 = ALT_MAYBE;
else tmp_347_alt_flag_9 = ALT_NO;
}
if (tmp_347_alt_flag_9 == ALT_MAYBE) {
current_location.update_lineno(2197);
/* GBProxy_Tests.ttcn, line 2197 */
tmp_347_alt_flag_9 = T.timeout(NULL);
if (tmp_347_alt_flag_9 == ALT_YES) break;
}
if (tmp_347_default_flag == ALT_MAYBE) {
tmp_347_default_flag = TTCN_Default::try_altsteps();
if (tmp_347_default_flag == ALT_YES || tmp_347_default_flag == ALT_BREAK) break;
else if (tmp_347_default_flag == ALT_REPEAT) goto tmp_347;
}
current_location.update_lineno(2165);
/* GBProxy_Tests.ttcn, line 2165 */
if (tmp_347_alt_flag_0 == ALT_NO && tmp_347_alt_flag_1 == ALT_NO && tmp_347_alt_flag_2 == ALT_NO && tmp_347_alt_flag_3 == ALT_NO && tmp_347_alt_flag_4 == ALT_NO && tmp_347_alt_flag_5 == ALT_NO && tmp_347_alt_flag_6 == ALT_NO && tmp_347_alt_flag_7 == ALT_NO && tmp_347_alt_flag_8 == ALT_NO && tmp_347_alt_flag_9 == ALT_NO && tmp_347_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 2165 and 2198.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__send__paging__cs__exp__one__bss(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_one_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_cs_exp_one_bss", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__send__paging__cs__exp__no__bss(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2202, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_cs_exp_no_bss");
current_location.update_lineno(2205);
/* GBProxy_Tests.ttcn, line 2205 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(2206);
/* GBProxy_Tests.ttcn, line 2206 */
exp__rx = f__send__paging__cs(p4, sgsn__idx, use__sig);
current_location.update_lineno(2208);
/* GBProxy_Tests.ttcn, line 2208 */
TIMER T("T", 2.0);
current_location.update_lineno(2209);
/* GBProxy_Tests.ttcn, line 2209 */
T.start();
current_location.update_lineno(2210);
/* GBProxy_Tests.ttcn, line 2210 */
{
tmp_355:
alt_status tmp_355_alt_flag_0 = ALT_MAYBE;
alt_status tmp_355_alt_flag_1 = ALT_MAYBE;
alt_status tmp_355_alt_flag_2 = ALT_MAYBE;
alt_status tmp_355_alt_flag_3 = ALT_MAYBE;
alt_status tmp_355_alt_flag_4 = ALT_MAYBE;
alt_status tmp_355_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_355_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(2211);
/* GBProxy_Tests.ttcn, line 2211 */
tmp_355_alt_flag_0 = BSSGP__ConnHdlr_component_PCU__PTP.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_355_alt_flag_0 == ALT_YES) {
current_location.update_lineno(2212);
/* GBProxy_Tests.ttcn, line 2212 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_355_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(2214);
/* GBProxy_Tests.ttcn, line 2214 */
tmp_355_alt_flag_1 = BSSGP__ConnHdlr_component_PCU__SIG.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_355_alt_flag_1 == ALT_YES) {
current_location.update_lineno(2215);
/* GBProxy_Tests.ttcn, line 2215 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Paging received on unexpected BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_355_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(2217);
/* GBProxy_Tests.ttcn, line 2217 */
{
BSSGP__Types::PDU__BSSGP_template tmp_356;
tmp_356.pDU__BSSGP__PAGING__CS() = ANY_VALUE;
tmp_355_alt_flag_2 = BSSGP__ConnHdlr_component_PCU__PTP.receive(tmp_356, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_355_alt_flag_2 == ALT_YES) {
current_location.update_lineno(2218);
/* GBProxy_Tests.ttcn, line 2218 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging received on PTP BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_355_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(2220);
/* GBProxy_Tests.ttcn, line 2220 */
{
BSSGP__Types::PDU__BSSGP_template tmp_357;
tmp_357.pDU__BSSGP__PAGING__CS() = ANY_VALUE;
tmp_355_alt_flag_3 = BSSGP__ConnHdlr_component_PCU__SIG.receive(tmp_357, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_355_alt_flag_3 == ALT_YES) {
current_location.update_lineno(2221);
/* GBProxy_Tests.ttcn, line 2221 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Different Paging received on SIGNALING BVC"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_355_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(2223);
/* GBProxy_Tests.ttcn, line 2223 */
tmp_355_alt_flag_4 = T.timeout(NULL);
if (tmp_355_alt_flag_4 == ALT_YES) {
current_location.update_lineno(2224);
/* GBProxy_Tests.ttcn, line 2224 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_355_default_flag == ALT_MAYBE) {
tmp_355_default_flag = TTCN_Default::try_altsteps();
if (tmp_355_default_flag == ALT_YES || tmp_355_default_flag == ALT_BREAK) break;
else if (tmp_355_default_flag == ALT_REPEAT) goto tmp_355;
}
current_location.update_lineno(2210);
/* GBProxy_Tests.ttcn, line 2210 */
if (tmp_355_alt_flag_0 == ALT_NO && tmp_355_alt_flag_1 == ALT_NO && tmp_355_alt_flag_2 == ALT_NO && tmp_355_alt_flag_3 == ALT_NO && tmp_355_alt_flag_4 == ALT_NO && tmp_355_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 2210 and 2226.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__send__paging__cs__exp__no__bss(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const BOOLEAN& use__sig)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_no_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_cs_exp_no_bss", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
use__sig.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__paging__cs__ptp__bss(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2229, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_bss");
current_location.update_lineno(2233);
/* GBProxy_Tests.ttcn, line 2233 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4BssArea, 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__bss(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bss(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_bss", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2235, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2236);
/* GBProxy_Tests.ttcn, line 2236 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2237);
/* GBProxy_Tests.ttcn, line 2237 */
f__start__handlers(&f__TC__paging__cs__ptp__bss, cs_61, 17, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2238);
/* GBProxy_Tests.ttcn, line 2238 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__lac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2242, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_lac");
current_location.update_lineno(2244);
/* GBProxy_Tests.ttcn, line 2244 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(2247);
/* GBProxy_Tests.ttcn, line 2247 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id().lai()), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__lac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_lac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_lac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__lac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2249, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_lac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_lac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2250);
/* GBProxy_Tests.ttcn, line 2250 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2251);
/* GBProxy_Tests.ttcn, line 2251 */
f__start__handlers(&f__TC__paging__cs__ptp__lac, cs_62, 18, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2252);
/* GBProxy_Tests.ttcn, line 2252 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_lac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__lac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2256, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_lac_unknown");
current_location.update_lineno(2258);
/* GBProxy_Tests.ttcn, line 2258 */
GSM__Types::LocationAreaIdentification unknown__la;
unknown__la.mcc__mnc() = hs_1;
unknown__la.lac() = 33333;
current_location.update_lineno(2263);
/* GBProxy_Tests.ttcn, line 2263 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(unknown__la), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__lac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_lac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__lac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2265, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_lac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_lac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2266);
/* GBProxy_Tests.ttcn, line 2266 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2267);
/* GBProxy_Tests.ttcn, line 2267 */
f__start__handlers(&f__TC__paging__cs__ptp__lac__unknown, cs_63, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2268);
/* GBProxy_Tests.ttcn, line 2268 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_lac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__rac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2272, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_rac");
current_location.update_lineno(2276);
/* GBProxy_Tests.ttcn, line 2276 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id()), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__rac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_rac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_rac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__rac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2278, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_rac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_rac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2279);
/* GBProxy_Tests.ttcn, line 2279 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2280);
/* GBProxy_Tests.ttcn, line 2280 */
f__start__handlers(&f__TC__paging__cs__ptp__rac, cs_64, 19, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2281);
/* GBProxy_Tests.ttcn, line 2281 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_rac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__rac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2285, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_rac_unknown");
current_location.update_lineno(2287);
/* GBProxy_Tests.ttcn, line 2287 */
GSM__Types::RoutingAreaIdentification unknown__ra;
{
GSM__Types::LocationAreaIdentification& tmp_358 = unknown__ra.lai();
tmp_358.mcc__mnc() = hs_1;
tmp_358.lac() = 33333;
}
unknown__ra.rac() = 254;
current_location.update_lineno(2295);
/* GBProxy_Tests.ttcn, line 2295 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(unknown__ra), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__rac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_rac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__rac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2297, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_rac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_rac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2298);
/* GBProxy_Tests.ttcn, line 2298 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2299);
/* GBProxy_Tests.ttcn, line 2299 */
f__start__handlers(&f__TC__paging__cs__ptp__rac__unknown, cs_65, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2300);
/* GBProxy_Tests.ttcn, line 2300 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_rac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2304, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_bvci");
current_location.update_lineno(2307);
/* GBProxy_Tests.ttcn, line 2307 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2309, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2310);
/* GBProxy_Tests.ttcn, line 2310 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2311);
/* GBProxy_Tests.ttcn, line 2311 */
f__start__handlers(&f__TC__paging__cs__ptp__bvci, cs_66, 20, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2312);
/* GBProxy_Tests.ttcn, line 2312 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__ptp__bvci__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2316, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_ptp_bvci_unknown");
current_location.update_lineno(2319);
/* GBProxy_Tests.ttcn, line 2319 */
f__send__paging__cs__exp__one__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(33333), 0, FALSE, 0);
}

void start_f__TC__paging__cs__ptp__bvci__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_ptp_bvci_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__ptp__bvci__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2321, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_ptp_bvci_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_ptp_bvci_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2322);
/* GBProxy_Tests.ttcn, line 2322 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2323);
/* GBProxy_Tests.ttcn, line 2323 */
f__start__handlers(&f__TC__paging__cs__ptp__bvci__unknown, cs_67, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2324);
/* GBProxy_Tests.ttcn, line 2324 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_ptp_bvci_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__send__paging__cs__exp__multi(const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& , const Osmocom__Types::ro__integer& exp__on__pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2328, TTCN_Location::LOCATION_FUNCTION, "f_send_paging_cs_exp_multi");
current_location.update_lineno(2331);
/* GBProxy_Tests.ttcn, line 2331 */
BSSGP__Types::PDU__BSSGP_template exp__rx;
current_location.update_lineno(2332);
/* GBProxy_Tests.ttcn, line 2332 */
exp__rx = f__send__paging__cs(p4, 0, TRUE);
current_location.update_lineno(2335);
/* GBProxy_Tests.ttcn, line 2335 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(2336);
/* GBProxy_Tests.ttcn, line 2336 */
INTEGER i(0);
current_location.update_lineno(2336);
/* GBProxy_Tests.ttcn, line 2336 */
for ( ; ; ) {
current_location.update_lineno(2336);
/* GBProxy_Tests.ttcn, line 2336 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(2337);
/* GBProxy_Tests.ttcn, line 2337 */
DEFAULT d(activate_as__paging__sig__pcu(i, exp__rx, BSSGP__ConnHdlr_component_g__roi));
current_location.update_lineno(2338);
/* GBProxy_Tests.ttcn, line 2338 */
{
ro__default tmp_360;
{
ro__default tmp_361;
tmp_361.set_size(1);
tmp_361[0] = d;
tmp_360 = (defaults + tmp_361);
}
defaults = tmp_360;
}
current_location.update_lineno(2336);
/* GBProxy_Tests.ttcn, line 2336 */
{
INTEGER tmp_362;
++i;
}
}
}
current_location.update_lineno(2340);
/* GBProxy_Tests.ttcn, line 2340 */
Osmocom__Types::f__sleep(2.0);
{
current_location.update_lineno(2341);
/* GBProxy_Tests.ttcn, line 2341 */
INTEGER i(0);
current_location.update_lineno(2341);
/* GBProxy_Tests.ttcn, line 2341 */
for ( ; ; ) {
current_location.update_lineno(2341);
/* GBProxy_Tests.ttcn, line 2341 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2342);
/* GBProxy_Tests.ttcn, line 2342 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2341);
/* GBProxy_Tests.ttcn, line 2341 */
{
INTEGER tmp_363;
++i;
}
}
}
current_location.update_lineno(2344);
/* GBProxy_Tests.ttcn, line 2344 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Paging received on PCU ");
BSSGP__ConnHdlr_component_g__roi.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
{
current_location.update_lineno(2346);
/* GBProxy_Tests.ttcn, line 2346 */
INTEGER i(0);
current_location.update_lineno(2346);
/* GBProxy_Tests.ttcn, line 2346 */
for ( ; ; ) {
current_location.update_lineno(2346);
/* GBProxy_Tests.ttcn, line 2346 */
if (!(i < mp__nsconfig__pcu.lengthof())) break;
current_location.update_lineno(2347);
/* GBProxy_Tests.ttcn, line 2347 */
BOOLEAN rx__on__i(Osmocom__Types::ro__integer__contains(BSSGP__ConnHdlr_component_g__roi, i));
current_location.update_lineno(2348);
/* GBProxy_Tests.ttcn, line 2348 */
BOOLEAN exp__on__i(Osmocom__Types::ro__integer__contains(exp__on__pcu__idx, i));
current_location.update_lineno(2349);
/* GBProxy_Tests.ttcn, line 2349 */
{
boolean tmp_364;
tmp_364 = exp__on__i;
if (tmp_364) tmp_364 = (!(rx__on__i));
if (tmp_364) {
current_location.update_lineno(2350);
/* GBProxy_Tests.ttcn, line 2350 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PS-PAGING not received on "),const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei().log(),TTCN_Logger::end_event_log2str()));
}
}
current_location.update_lineno(2352);
/* GBProxy_Tests.ttcn, line 2352 */
if (((!(exp__on__i)) && rx__on__i)) {
current_location.update_lineno(2353);
/* GBProxy_Tests.ttcn, line 2353 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("PS-PAGING not expected but received on "),const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i].nsei().log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2346);
/* GBProxy_Tests.ttcn, line 2346 */
{
INTEGER tmp_365;
++i;
}
}
}
current_location.update_lineno(2356);
/* GBProxy_Tests.ttcn, line 2356 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__send__paging__cs__exp__multi(const COMPONENT& component_reference, const BSSGP__Types::Paging__Field4_template& p4, const INTEGER& sgsn__idx, const Osmocom__Types::ro__integer& exp__on__pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_multi(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
exp__on__pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_send_paging_cs_exp_multi", text_buf);
p4.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
exp__on__pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__paging__cs__sig__bss(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2360, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_bss");
current_location.update_lineno(2363);
/* GBProxy_Tests.ttcn, line 2363 */
{
Osmocom__Types::ro__integer tmp_366;
tmp_366.set_size(3);
tmp_366[0] = 0;
tmp_366[1] = 1;
tmp_366[2] = 2;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4BssArea, 0, tmp_366);
}
}

void start_f__TC__paging__cs__sig__bss(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bss(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_bss", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2365, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2366);
/* GBProxy_Tests.ttcn, line 2366 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2367);
/* GBProxy_Tests.ttcn, line 2367 */
f__start__handlers(&f__TC__paging__cs__sig__bss, cs_68, 13, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2368);
/* GBProxy_Tests.ttcn, line 2368 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__lac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2372, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_lac");
current_location.update_lineno(2375);
/* GBProxy_Tests.ttcn, line 2375 */
{
Osmocom__Types::ro__integer tmp_367;
tmp_367.set_size(3);
tmp_367[0] = 0;
tmp_367[1] = 1;
tmp_367[2] = 2;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id().lai()), 0, tmp_367);
}
current_location.update_lineno(2377);
/* GBProxy_Tests.ttcn, line 2377 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(2379);
/* GBProxy_Tests.ttcn, line 2379 */
f__connect__to__pcu__bvc(2, 2, 1);
current_location.update_lineno(2380);
/* GBProxy_Tests.ttcn, line 2380 */
{
Osmocom__Types::ro__integer tmp_369;
tmp_369.set_size(1);
tmp_369[0] = 2;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4LAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id().lai()), 0, tmp_369);
}
}

void start_f__TC__paging__cs__sig__lac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_lac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_lac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__lac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2382, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_lac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_lac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2383);
/* GBProxy_Tests.ttcn, line 2383 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2384);
/* GBProxy_Tests.ttcn, line 2384 */
f__start__handlers(&f__TC__paging__cs__sig__lac, cs_69, 14, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2385);
/* GBProxy_Tests.ttcn, line 2385 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_lac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__lac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2389, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_lac_unknown");
current_location.update_lineno(2391);
/* GBProxy_Tests.ttcn, line 2391 */
GSM__Types::LocationAreaIdentification unknown__la;
unknown__la.mcc__mnc() = hs_1;
unknown__la.lac() = 33333;
current_location.update_lineno(2395);
/* GBProxy_Tests.ttcn, line 2395 */
f__send__paging__cs__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4LAC(unknown__la), 0, TRUE);
}

void start_f__TC__paging__cs__sig__lac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_lac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__lac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2397, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_lac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_lac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2398);
/* GBProxy_Tests.ttcn, line 2398 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2399);
/* GBProxy_Tests.ttcn, line 2399 */
f__start__handlers(&f__TC__paging__cs__sig__lac__unknown, cs_70, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2400);
/* GBProxy_Tests.ttcn, line 2400 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_lac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__rac(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2404, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_rac");
current_location.update_lineno(2407);
/* GBProxy_Tests.ttcn, line 2407 */
{
Osmocom__Types::ro__integer tmp_370;
tmp_370.set_size(1);
tmp_370[0] = 0;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].cell__id().ra__id()), 0, tmp_370);
}
current_location.update_lineno(2408);
/* GBProxy_Tests.ttcn, line 2408 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(2410);
/* GBProxy_Tests.ttcn, line 2410 */
{
Osmocom__Types::ro__integer tmp_372;
tmp_372.set_size(2);
tmp_372[0] = 1;
tmp_372[1] = 2;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id()), 0, tmp_372);
}
current_location.update_lineno(2411);
/* GBProxy_Tests.ttcn, line 2411 */
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
current_location.update_lineno(2413);
/* GBProxy_Tests.ttcn, line 2413 */
f__connect__to__pcu__bvc(2, 2, 1);
current_location.update_lineno(2414);
/* GBProxy_Tests.ttcn, line 2414 */
{
Osmocom__Types::ro__integer tmp_374;
tmp_374.set_size(1);
tmp_374[0] = 2;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4RAC(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[2].cell__id().ra__id()), 0, tmp_374);
}
}

void start_f__TC__paging__cs__sig__rac(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_rac(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_rac", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__rac(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2416, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_rac");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_rac", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2417);
/* GBProxy_Tests.ttcn, line 2417 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2418);
/* GBProxy_Tests.ttcn, line 2418 */
f__start__handlers(&f__TC__paging__cs__sig__rac, cs_71, 15, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2419);
/* GBProxy_Tests.ttcn, line 2419 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_rac was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__rac__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2423, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_rac_unknown");
current_location.update_lineno(2425);
/* GBProxy_Tests.ttcn, line 2425 */
GSM__Types::RoutingAreaIdentification unknown__ra;
{
GSM__Types::LocationAreaIdentification& tmp_375 = unknown__ra.lai();
tmp_375.mcc__mnc() = hs_1;
tmp_375.lac() = 33333;
}
unknown__ra.rac() = 254;
current_location.update_lineno(2432);
/* GBProxy_Tests.ttcn, line 2432 */
f__send__paging__cs__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4RAC(unknown__ra), 0, TRUE);
}

void start_f__TC__paging__cs__sig__rac__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_rac_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__rac__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2434, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_rac_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_rac_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2435);
/* GBProxy_Tests.ttcn, line 2435 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2436);
/* GBProxy_Tests.ttcn, line 2436 */
f__start__handlers(&f__TC__paging__cs__sig__rac__unknown, cs_72, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2437);
/* GBProxy_Tests.ttcn, line 2437 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_rac_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__bvci(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2441, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_bvci");
current_location.update_lineno(2443);
/* GBProxy_Tests.ttcn, line 2443 */
{
Osmocom__Types::ro__integer tmp_376;
tmp_376.set_size(1);
tmp_376[0] = 0;
f__send__paging__cs__exp__multi(Osmocom__Gb__Types::ts__BssgpP4Bvci(const_cast< const VALUE_ARRAY<BSSGP__Emulation::BssgpBvcConfig, 3, 0>&>(BSSGP__ConnHdlr_component_pcu__bvc__cfg)[0].bvci()), 0, tmp_376);
}
}

void start_f__TC__paging__cs__sig__bvci(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_bvci", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2445, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_bvci", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2446);
/* GBProxy_Tests.ttcn, line 2446 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2447);
/* GBProxy_Tests.ttcn, line 2447 */
f__start__handlers(&f__TC__paging__cs__sig__bvci, cs_73, 16, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2448);
/* GBProxy_Tests.ttcn, line 2448 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__paging__cs__sig__bvci__unknown(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2452, TTCN_Location::LOCATION_FUNCTION, "f_TC_paging_cs_sig_bvci_unknown");
current_location.update_lineno(2454);
/* GBProxy_Tests.ttcn, line 2454 */
f__send__paging__cs__exp__no__bss(Osmocom__Gb__Types::ts__BssgpP4Bvci(33333), 0, TRUE);
}

void start_f__TC__paging__cs__sig__bvci__unknown(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_paging_cs_sig_bvci_unknown", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__paging__cs__sig__bvci__unknown(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2456, TTCN_Location::LOCATION_TESTCASE, "TC_paging_cs_sig_bvci_unknown");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_paging_cs_sig_bvci_unknown", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2457);
/* GBProxy_Tests.ttcn, line 2457 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2458);
/* GBProxy_Tests.ttcn, line 2458 */
f__start__handlers(&f__TC__paging__cs__sig__bvci__unknown, cs_74, 11, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2459);
/* GBProxy_Tests.ttcn, line 2459 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_paging_cs_sig_bvci_unknown was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__flush__ll__bvci__new(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2466, TTCN_Location::LOCATION_FUNCTION, "f_TC_flush_ll_bvci_new");
current_location.update_lineno(2467);
/* GBProxy_Tests.ttcn, line 2467 */
INTEGER bvci(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[0].cfg().bvc()[0].bvci());
current_location.update_lineno(2468);
/* GBProxy_Tests.ttcn, line 2468 */
INTEGER i;
current_location.update_lineno(2469);
/* GBProxy_Tests.ttcn, line 2469 */
i = 0;
current_location.update_lineno(2469);
/* GBProxy_Tests.ttcn, line 2469 */
for ( ; ; ) {
current_location.update_lineno(2469);
/* GBProxy_Tests.ttcn, line 2469 */
if (!(i < 10)) break;
current_location.update_lineno(2470);
/* GBProxy_Tests.ttcn, line 2470 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), INTEGER_template(bvci), INTEGER_template(bvci), Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL_nsei_defval));
current_location.update_lineno(2472);
/* GBProxy_Tests.ttcn, line 2472 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), INTEGER_template(bvci), INTEGER_template(bvci), Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL_nsei_defval));
current_location.update_lineno(2474);
/* GBProxy_Tests.ttcn, line 2474 */
f__sgsn2pcu(pdu__tx, pdu__rx, f__sgsn2pcu_pcu__idx_defval, TRUE);
current_location.update_lineno(2476);
/* GBProxy_Tests.ttcn, line 2476 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL__ACK(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), OCTETSTRING_template(os_2), INTEGER_template(23), INTEGER_template(bvci), Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL__ACK_nsei_defval);
current_location.update_lineno(2478);
/* GBProxy_Tests.ttcn, line 2478 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL__ACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(os_2), INTEGER_template(23), INTEGER_template(bvci), Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL__ACK_nsei_defval);
current_location.update_lineno(2480);
/* GBProxy_Tests.ttcn, line 2480 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, TRUE);
current_location.update_lineno(2469);
/* GBProxy_Tests.ttcn, line 2469 */
{
INTEGER tmp_380;
++i;
}
}
current_location.update_lineno(2482);
/* GBProxy_Tests.ttcn, line 2482 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__flush__ll__bvci__new(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_flush_ll_bvci_new(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_flush_ll_bvci_new", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__flush__ll__bvci__new(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2485, TTCN_Location::LOCATION_TESTCASE, "TC_flush_ll_bvci_new");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_flush_ll_bvci_new", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2487);
/* GBProxy_Tests.ttcn, line 2487 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2488);
/* GBProxy_Tests.ttcn, line 2488 */
f__start__handlers(&f__TC__flush__ll__bvci__new, cs_75, 6, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2490);
/* GBProxy_Tests.ttcn, line 2490 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_flush_ll_bvci_new was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__flush__ll__no__bvci__new(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2493, TTCN_Location::LOCATION_FUNCTION, "f_TC_flush_ll_no_bvci_new");
current_location.update_lineno(2494);
/* GBProxy_Tests.ttcn, line 2494 */
INTEGER bvci(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[0].cfg().bvc()[0].bvci());
current_location.update_lineno(2495);
/* GBProxy_Tests.ttcn, line 2495 */
INTEGER i;
current_location.update_lineno(2496);
/* GBProxy_Tests.ttcn, line 2496 */
i = 0;
current_location.update_lineno(2496);
/* GBProxy_Tests.ttcn, line 2496 */
for ( ; ; ) {
current_location.update_lineno(2496);
/* GBProxy_Tests.ttcn, line 2496 */
if (!(i < 10)) break;
current_location.update_lineno(2497);
/* GBProxy_Tests.ttcn, line 2497 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), INTEGER_template(bvci), Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL_bvci__new_defval, Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL_nsei_defval));
current_location.update_lineno(2499);
/* GBProxy_Tests.ttcn, line 2499 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), INTEGER_template(bvci), Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL_bvci__new_defval, Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL_nsei_defval));
current_location.update_lineno(2501);
/* GBProxy_Tests.ttcn, line 2501 */
f__sgsn2pcu(pdu__tx, pdu__rx, f__sgsn2pcu_pcu__idx_defval, TRUE);
current_location.update_lineno(2503);
/* GBProxy_Tests.ttcn, line 2503 */
pdu__tx = Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL__ACK(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), OCTETSTRING_template(os_0), INTEGER_template(23), Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL__ACK_bvci__new_defval, Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL__ACK_nsei_defval);
current_location.update_lineno(2505);
/* GBProxy_Tests.ttcn, line 2505 */
pdu__rx = Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL__ACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(os_0), INTEGER_template(23), Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL__ACK_bvci__new_defval, Osmocom__Gb__Types::tr__BSSGP__FLUSH__LL__ACK_nsei_defval);
current_location.update_lineno(2507);
/* GBProxy_Tests.ttcn, line 2507 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, TRUE);
current_location.update_lineno(2496);
/* GBProxy_Tests.ttcn, line 2496 */
{
INTEGER tmp_384;
++i;
}
}
current_location.update_lineno(2509);
/* GBProxy_Tests.ttcn, line 2509 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__flush__ll__no__bvci__new(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_flush_ll_no_bvci_new(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_flush_ll_no_bvci_new", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__flush__ll__no__bvci__new(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2512, TTCN_Location::LOCATION_TESTCASE, "TC_flush_ll_no_bvci_new");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_flush_ll_no_bvci_new", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2514);
/* GBProxy_Tests.ttcn, line 2514 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2515);
/* GBProxy_Tests.ttcn, line 2515 */
f__start__handlers(&f__TC__flush__ll__no__bvci__new, cs_76, 6, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2517);
/* GBProxy_Tests.ttcn, line 2517 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_flush_ll_no_bvci_new was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__bssgp__g__pcu__count_instance(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2524, TTCN_Location::LOCATION_ALTSTEP, "as_bssgp_g_pcu_count");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2526);
/* GBProxy_Tests.ttcn, line 2526 */
switch (GlobalTest__CT_component_G__PCU[pcu__idx].receive(exp__rx, NULL, COMPONENT_template(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP()), NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(2527);
/* GBProxy_Tests.ttcn, line 2527 */
if (Osmocom__Types::ro__integer__contains(roi, pcu__idx)) {
current_location.update_lineno(2528);
/* GBProxy_Tests.ttcn, line 2528 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received multiple on same SIG BVC"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2530);
/* GBProxy_Tests.ttcn, line 2530 */
{
Osmocom__Types::ro__integer tmp_385;
{
Osmocom__Types::ro__integer tmp_386;
tmp_386.set_size(1);
tmp_386[0] = pcu__idx;
tmp_385 = (roi + tmp_386);
}
roi = tmp_385;
}
current_location.update_lineno(2531);
/* GBProxy_Tests.ttcn, line 2531 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__bssgp__g__pcu__count(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__bssgp__g__pcu__count_instance(pcu__idx, exp__rx, roi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_bssgp_g_pcu_count.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__bssgp__g__pcu__count(const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, Osmocom__Types::ro__integer& roi)
{
return new as__bssgp__g__pcu__count_Default(pcu__idx, exp__rx, roi);
}

verdicttype testcase_TC__trace(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2535, TTCN_Location::LOCATION_TESTCASE, "TC_trace");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_trace", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(2537);
/* GBProxy_Tests.ttcn, line 2537 */
COMPONENT vc__conn;
current_location.update_lineno(2538);
/* GBProxy_Tests.ttcn, line 2538 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2539);
/* GBProxy_Tests.ttcn, line 2539 */
f__global__init();
current_location.update_lineno(2541);
/* GBProxy_Tests.ttcn, line 2541 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__INVOKE__TRACE(os_3, os_4));
current_location.update_lineno(2542);
/* GBProxy_Tests.ttcn, line 2542 */
BSSGP__Types::PDU__BSSGP_template exp__rx(Osmocom__Gb__Types::ts__BSSGP__INVOKE__TRACE(os_3, os_4));
current_location.update_lineno(2544);
/* GBProxy_Tests.ttcn, line 2544 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(2545);
/* GBProxy_Tests.ttcn, line 2545 */
INTEGER i(0);
current_location.update_lineno(2545);
/* GBProxy_Tests.ttcn, line 2545 */
for ( ; ; ) {
current_location.update_lineno(2545);
/* GBProxy_Tests.ttcn, line 2545 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2546);
/* GBProxy_Tests.ttcn, line 2546 */
activate_as__bssgp__g__pcu__count(i, exp__rx, test__CT_component_g__roi);
current_location.update_lineno(2545);
/* GBProxy_Tests.ttcn, line 2545 */
{
INTEGER tmp_387;
++i;
}
}
}
current_location.update_lineno(2548);
/* GBProxy_Tests.ttcn, line 2548 */
GlobalTest__CT_component_G__SGSN[0].send(pdu__tx, NULL);
current_location.update_lineno(2549);
/* GBProxy_Tests.ttcn, line 2549 */
Osmocom__Types::f__sleep(2.0);
{
current_location.update_lineno(2550);
/* GBProxy_Tests.ttcn, line 2550 */
INTEGER i(0);
current_location.update_lineno(2550);
/* GBProxy_Tests.ttcn, line 2550 */
for ( ; ; ) {
current_location.update_lineno(2550);
/* GBProxy_Tests.ttcn, line 2550 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2551);
/* GBProxy_Tests.ttcn, line 2551 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2550);
/* GBProxy_Tests.ttcn, line 2550 */
{
INTEGER tmp_388;
++i;
}
}
}
{
current_location.update_lineno(2554);
/* GBProxy_Tests.ttcn, line 2554 */
INTEGER i(0);
current_location.update_lineno(2554);
/* GBProxy_Tests.ttcn, line 2554 */
for ( ; ; ) {
current_location.update_lineno(2554);
/* GBProxy_Tests.ttcn, line 2554 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2555);
/* GBProxy_Tests.ttcn, line 2555 */
if ((!(Osmocom__Types::ro__integer__contains(test__CT_component_g__roi, i)))) {
current_location.update_lineno(2556);
/* GBProxy_Tests.ttcn, line 2556 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Failed to receive TRACE on PCU index "),i.log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2554);
/* GBProxy_Tests.ttcn, line 2554 */
{
INTEGER tmp_389;
++i;
}
}
}
current_location.update_lineno(2559);
/* GBProxy_Tests.ttcn, line 2559 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2561);
/* GBProxy_Tests.ttcn, line 2561 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_trace was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__llc__discarded(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2568, TTCN_Location::LOCATION_FUNCTION, "f_TC_llc_discarded");
current_location.update_lineno(2569);
/* GBProxy_Tests.ttcn, line 2569 */
INTEGER bvci(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[0].cfg().bvc()[0].bvci());
current_location.update_lineno(2571);
/* GBProxy_Tests.ttcn, line 2571 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BSSGP__LLC__DISCARDED(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), INTEGER_template(23), INTEGER_template(bvci), INTEGER_template(2342)));
current_location.update_lineno(2573);
/* GBProxy_Tests.ttcn, line 2573 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BSSGP__LLC__DISCARDED(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), INTEGER_template(23), INTEGER_template(bvci), INTEGER_template(2342)));
current_location.update_lineno(2575);
/* GBProxy_Tests.ttcn, line 2575 */
f__pcu2sgsn(pdu__tx, pdu__rx, f__pcu2sgsn_pcu__idx_defval, TRUE);
current_location.update_lineno(2577);
/* GBProxy_Tests.ttcn, line 2577 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__llc__discarded(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_llc_discarded(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_llc_discarded", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__llc__discarded(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2580, TTCN_Location::LOCATION_TESTCASE, "TC_llc_discarded");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_llc_discarded", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2582);
/* GBProxy_Tests.ttcn, line 2582 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2583);
/* GBProxy_Tests.ttcn, line 2583 */
f__start__handlers(&f__TC__llc__discarded, cs_77, 6, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(2585);
/* GBProxy_Tests.ttcn, line 2585 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_llc_discarded was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__overload(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2593, TTCN_Location::LOCATION_TESTCASE, "TC_overload");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_overload", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(2595);
/* GBProxy_Tests.ttcn, line 2595 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2596);
/* GBProxy_Tests.ttcn, line 2596 */
f__global__init();
current_location.update_lineno(2598);
/* GBProxy_Tests.ttcn, line 2598 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__OVERLOAD(BITSTRING_template(bs_0)));
current_location.update_lineno(2599);
/* GBProxy_Tests.ttcn, line 2599 */
BSSGP__Types::PDU__BSSGP_template exp__rx(Osmocom__Gb__Types::tr__OVERLOAD(BITSTRING_template(bs_0)));
current_location.update_lineno(2601);
/* GBProxy_Tests.ttcn, line 2601 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(2602);
/* GBProxy_Tests.ttcn, line 2602 */
INTEGER i(0);
current_location.update_lineno(2602);
/* GBProxy_Tests.ttcn, line 2602 */
for ( ; ; ) {
current_location.update_lineno(2602);
/* GBProxy_Tests.ttcn, line 2602 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2603);
/* GBProxy_Tests.ttcn, line 2603 */
activate_as__bssgp__g__pcu__count(i, exp__rx, test__CT_component_g__roi);
current_location.update_lineno(2602);
/* GBProxy_Tests.ttcn, line 2602 */
{
INTEGER tmp_390;
++i;
}
}
}
current_location.update_lineno(2605);
/* GBProxy_Tests.ttcn, line 2605 */
GlobalTest__CT_component_G__SGSN[0].send(pdu__tx, NULL);
current_location.update_lineno(2606);
/* GBProxy_Tests.ttcn, line 2606 */
Osmocom__Types::f__sleep(2.0);
{
current_location.update_lineno(2607);
/* GBProxy_Tests.ttcn, line 2607 */
INTEGER i(0);
current_location.update_lineno(2607);
/* GBProxy_Tests.ttcn, line 2607 */
for ( ; ; ) {
current_location.update_lineno(2607);
/* GBProxy_Tests.ttcn, line 2607 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2608);
/* GBProxy_Tests.ttcn, line 2608 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2607);
/* GBProxy_Tests.ttcn, line 2607 */
{
INTEGER tmp_391;
++i;
}
}
}
{
current_location.update_lineno(2611);
/* GBProxy_Tests.ttcn, line 2611 */
INTEGER i(0);
current_location.update_lineno(2611);
/* GBProxy_Tests.ttcn, line 2611 */
for ( ; ; ) {
current_location.update_lineno(2611);
/* GBProxy_Tests.ttcn, line 2611 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2612);
/* GBProxy_Tests.ttcn, line 2612 */
if ((!(Osmocom__Types::ro__integer__contains(test__CT_component_g__roi, i)))) {
current_location.update_lineno(2613);
/* GBProxy_Tests.ttcn, line 2613 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Failed to receive OVERLOAD on PCU index "),i.log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2611);
/* GBProxy_Tests.ttcn, line 2611 */
{
INTEGER tmp_392;
++i;
}
}
}
current_location.update_lineno(2616);
/* GBProxy_Tests.ttcn, line 2616 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2618);
/* GBProxy_Tests.ttcn, line 2618 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_overload was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__block__ptp__bvc__from__pcu(const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2625, TTCN_Location::LOCATION_FUNCTION, "f_block_ptp_bvc_from_pcu");
current_location.update_lineno(2627);
/* GBProxy_Tests.ttcn, line 2627 */
COMPONENT bvc__ct(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[bvc__idx]);
current_location.update_lineno(2628);
/* GBProxy_Tests.ttcn, line 2628 */
BSSGP__Emulation::BssgpBvcConfig bvc__cfg(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx]);
current_location.update_lineno(2629);
/* GBProxy_Tests.ttcn, line 2629 */
INTEGER nsei__pcu(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().nsei());
current_location.update_lineno(2631);
/* GBProxy_Tests.ttcn, line 2631 */
test__CT_component_SGSN__MGMT.clear();
current_location.update_lineno(2632);
/* GBProxy_Tests.ttcn, line 2632 */
test__CT_component_PCU__MGMT.clear();
current_location.update_lineno(2635);
/* GBProxy_Tests.ttcn, line 2635 */
{
BSSGP__Emulation::BssgpBlockRequest_template tmp_393;
tmp_393.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_PCU__MGMT.send(tmp_393, bvc__ct, NULL);
}
current_location.update_lineno(2637);
/* GBProxy_Tests.ttcn, line 2637 */
{
size_t tmp_394_state[3];
tmp_394_state[0]=2;
tmp_394_state[1]=2;
tmp_394_state[2]=2;
alt_status tmp_394_alt_flag[4];
tmp_394:
for(size_t tmp_i=0; tmp_i<3; tmp_i++) tmp_394_alt_flag[tmp_i]=ALT_UNCHECKED;
tmp_394_alt_flag[3]=ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for( ; ; ) {
if(tmp_394_state[0]==1 && tmp_394_state[1]==1 && tmp_394_state[2]==1) break;
current_location.update_lineno(2638);
/* GBProxy_Tests.ttcn, line 2638 */
if(tmp_394_alt_flag[0]==ALT_UNCHECKED) {
if(tmp_394_state[0]==2) {
tmp_394_alt_flag[0]=ALT_MAYBE;
}
else tmp_394_alt_flag[0]=ALT_NO;
}
if(tmp_394_alt_flag[0]==ALT_MAYBE) {
tmp_394_alt_flag[0]=test__CT_component_PCU__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(nsei__pcu), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED)), NULL, COMPONENT_template(bvc__ct), NULL, NULL, NULL);
if(tmp_394_alt_flag[0]==ALT_YES) {
tmp_394_state[0]=1;
goto tmp_394;
}
}
current_location.update_lineno(2639);
/* GBProxy_Tests.ttcn, line 2639 */
if(tmp_394_alt_flag[1]==ALT_UNCHECKED) {
if(tmp_394_state[1]==2) {
tmp_394_alt_flag[1]=ALT_MAYBE;
}
else tmp_394_alt_flag[1]=ALT_NO;
}
if(tmp_394_alt_flag[1]==ALT_MAYBE) {
tmp_394_alt_flag[1]=test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[0].nsei()), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED)), NULL, any_compref, NULL, NULL, NULL);
if(tmp_394_alt_flag[1]==ALT_YES) {
tmp_394_state[1]=1;
goto tmp_394;
}
}
current_location.update_lineno(2640);
/* GBProxy_Tests.ttcn, line 2640 */
if(tmp_394_alt_flag[2]==ALT_UNCHECKED) {
if(tmp_394_state[2]==2) {
tmp_394_alt_flag[2]=ALT_MAYBE;
}
else tmp_394_alt_flag[2]=ALT_NO;
}
if(tmp_394_alt_flag[2]==ALT_MAYBE) {
tmp_394_alt_flag[2]=test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[1].nsei()), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED)), NULL, any_compref, NULL, NULL, NULL);
if(tmp_394_alt_flag[2]==ALT_YES) {
tmp_394_state[2]=1;
goto tmp_394;
}
}
if(tmp_394_alt_flag[3]==ALT_MAYBE) {
tmp_394_alt_flag[3]=TTCN_Default::try_altsteps();
if(tmp_394_alt_flag[3]==ALT_YES || tmp_394_alt_flag[3]==ALT_BREAK) break;
else if(tmp_394_alt_flag[3]==ALT_REPEAT) goto tmp_394;
}
current_location.update_lineno(2637);
/* GBProxy_Tests.ttcn, line 2637 */
for(size_t tmp_i=0; tmp_i<4; tmp_i++) if(tmp_394_alt_flag[tmp_i]!=ALT_NO) goto tmp_394_newsnapshot;
TTCN_error("None of the branches can be chosen in the interleave statement in file GBProxy_Tests.ttcn between lines 2637 and 2642.");
tmp_394_newsnapshot:
TTCN_Snapshot::take_new(TRUE);
continue;
current_location.update_lineno(2637);
/* GBProxy_Tests.ttcn, line 2637 */
}
}
current_location.update_lineno(2643);
/* GBProxy_Tests.ttcn, line 2643 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__block__ptp__bvc__from__pcu(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_block_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_block_ptp_bvc_from_pcu", text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__bvc__block__ptp(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2645, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_block_ptp");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_block_ptp", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2647);
/* GBProxy_Tests.ttcn, line 2647 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2648);
/* GBProxy_Tests.ttcn, line 2648 */
Osmocom__Types::f__sleep(1.0);
current_location.update_lineno(2649);
/* GBProxy_Tests.ttcn, line 2649 */
f__block__ptp__bvc__from__pcu(0, 0);
current_location.update_lineno(2650);
/* GBProxy_Tests.ttcn, line 2650 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_block_ptp was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__unblock__ptp__bvc__from__pcu(const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2653, TTCN_Location::LOCATION_FUNCTION, "f_unblock_ptp_bvc_from_pcu");
current_location.update_lineno(2655);
/* GBProxy_Tests.ttcn, line 2655 */
COMPONENT bvc__ct(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[bvc__idx]);
current_location.update_lineno(2656);
/* GBProxy_Tests.ttcn, line 2656 */
BSSGP__Emulation::BssgpBvcConfig bvc__cfg(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx]);
current_location.update_lineno(2657);
/* GBProxy_Tests.ttcn, line 2657 */
INTEGER nsei__pcu(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().nsei());
current_location.update_lineno(2659);
/* GBProxy_Tests.ttcn, line 2659 */
test__CT_component_SGSN__MGMT.clear();
current_location.update_lineno(2660);
/* GBProxy_Tests.ttcn, line 2660 */
test__CT_component_PCU__MGMT.clear();
current_location.update_lineno(2663);
/* GBProxy_Tests.ttcn, line 2663 */
test__CT_component_PCU__MGMT.send(BSSGP__Emulation::BssgpUnblockRequest_template(NULL_VALUE), bvc__ct, NULL);
current_location.update_lineno(2665);
/* GBProxy_Tests.ttcn, line 2665 */
{
size_t tmp_395_state[3];
tmp_395_state[0]=2;
tmp_395_state[1]=2;
tmp_395_state[2]=2;
alt_status tmp_395_alt_flag[4];
tmp_395:
for(size_t tmp_i=0; tmp_i<3; tmp_i++) tmp_395_alt_flag[tmp_i]=ALT_UNCHECKED;
tmp_395_alt_flag[3]=ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for( ; ; ) {
if(tmp_395_state[0]==1 && tmp_395_state[1]==1 && tmp_395_state[2]==1) break;
current_location.update_lineno(2666);
/* GBProxy_Tests.ttcn, line 2666 */
if(tmp_395_alt_flag[0]==ALT_UNCHECKED) {
if(tmp_395_state[0]==2) {
tmp_395_alt_flag[0]=ALT_MAYBE;
}
else tmp_395_alt_flag[0]=ALT_NO;
}
if(tmp_395_alt_flag[0]==ALT_MAYBE) {
tmp_395_alt_flag[0]=test__CT_component_PCU__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(nsei__pcu), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED)), NULL, COMPONENT_template(bvc__ct), NULL, NULL, NULL);
if(tmp_395_alt_flag[0]==ALT_YES) {
tmp_395_state[0]=1;
goto tmp_395;
}
}
current_location.update_lineno(2667);
/* GBProxy_Tests.ttcn, line 2667 */
if(tmp_395_alt_flag[1]==ALT_UNCHECKED) {
if(tmp_395_state[1]==2) {
tmp_395_alt_flag[1]=ALT_MAYBE;
}
else tmp_395_alt_flag[1]=ALT_NO;
}
if(tmp_395_alt_flag[1]==ALT_MAYBE) {
tmp_395_alt_flag[1]=test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[0].nsei()), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED)), NULL, any_compref, NULL, NULL, NULL);
if(tmp_395_alt_flag[1]==ALT_YES) {
tmp_395_state[1]=1;
goto tmp_395;
}
}
current_location.update_lineno(2668);
/* GBProxy_Tests.ttcn, line 2668 */
if(tmp_395_alt_flag[2]==ALT_UNCHECKED) {
if(tmp_395_state[2]==2) {
tmp_395_alt_flag[2]=ALT_MAYBE;
}
else tmp_395_alt_flag[2]=ALT_NO;
}
if(tmp_395_alt_flag[2]==ALT_MAYBE) {
tmp_395_alt_flag[2]=test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(const_cast< const NSConfigurations&>(mp__nsconfig__sgsn)[1].nsei()), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED)), NULL, any_compref, NULL, NULL, NULL);
if(tmp_395_alt_flag[2]==ALT_YES) {
tmp_395_state[2]=1;
goto tmp_395;
}
}
if(tmp_395_alt_flag[3]==ALT_MAYBE) {
tmp_395_alt_flag[3]=TTCN_Default::try_altsteps();
if(tmp_395_alt_flag[3]==ALT_YES || tmp_395_alt_flag[3]==ALT_BREAK) break;
else if(tmp_395_alt_flag[3]==ALT_REPEAT) goto tmp_395;
}
current_location.update_lineno(2665);
/* GBProxy_Tests.ttcn, line 2665 */
for(size_t tmp_i=0; tmp_i<4; tmp_i++) if(tmp_395_alt_flag[tmp_i]!=ALT_NO) goto tmp_395_newsnapshot;
TTCN_error("None of the branches can be chosen in the interleave statement in file GBProxy_Tests.ttcn between lines 2665 and 2670.");
tmp_395_newsnapshot:
TTCN_Snapshot::take_new(TRUE);
continue;
current_location.update_lineno(2665);
/* GBProxy_Tests.ttcn, line 2665 */
}
}
current_location.update_lineno(2671);
/* GBProxy_Tests.ttcn, line 2671 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__unblock__ptp__bvc__from__pcu(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_unblock_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_unblock_ptp_bvc_from_pcu", text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__bvc__unblock__ptp(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2673, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_unblock_ptp");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_unblock_ptp", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2675);
/* GBProxy_Tests.ttcn, line 2675 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2676);
/* GBProxy_Tests.ttcn, line 2676 */
Osmocom__Types::f__sleep(1.0);
current_location.update_lineno(2677);
/* GBProxy_Tests.ttcn, line 2677 */
f__block__ptp__bvc__from__pcu(0, 0);
current_location.update_lineno(2678);
/* GBProxy_Tests.ttcn, line 2678 */
Osmocom__Types::f__sleep(1.0);
current_location.update_lineno(2679);
/* GBProxy_Tests.ttcn, line 2679 */
f__unblock__ptp__bvc__from__pcu(0, 0);
current_location.update_lineno(2680);
/* GBProxy_Tests.ttcn, line 2680 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_unblock_ptp was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__count__bvc__reset_instance(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2686, TTCN_Location::LOCATION_ALTSTEP, "as_count_bvc_reset");
current_location.update_lineno(2688);
/* GBProxy_Tests.ttcn, line 2688 */
COMPONENT sgsn__bvc__ct(f__get__sgsn__bvc__ct(sgsn__idx, bvci));
alt_status ret_val = ALT_NO;
current_location.update_lineno(2689);
/* GBProxy_Tests.ttcn, line 2689 */
{
alt_status tmp_397;
{
BSSGP__Emulation::BssgpResetIndication_template tmp_396;
tmp_396.bvci() = bvci;
tmp_397 = test__CT_component_SGSN__MGMT.receive(tmp_396, NULL, COMPONENT_template(sgsn__bvc__ct), NULL, NULL, NULL);
}
switch (tmp_397) {
case ALT_YES:
{
current_location.update_lineno(2690);
/* GBProxy_Tests.ttcn, line 2690 */
{
Osmocom__Types::ro__integer tmp_398;
{
Osmocom__Types::ro__integer tmp_400;
tmp_400.set_size(1);
tmp_400[0] = bvci;
tmp_398 = (const_cast< const Osmocom__Types::roro__integer&>(roroi)[sgsn__idx] + tmp_400);
}
{
Osmocom__Types::ro__integer& tmp_399 = roroi[sgsn__idx]; /* 7388 */
tmp_399 = tmp_398;
}
}
current_location.update_lineno(2691);
/* GBProxy_Tests.ttcn, line 2691 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__count__bvc__reset(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__bvc__reset_instance(sgsn__idx, bvci, roroi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_bvc_reset.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__bvc__reset(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
return new as__count__bvc__reset_Default(sgsn__idx, bvci, roroi);
}

alt_status as__ignore__status_instance(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2694, TTCN_Location::LOCATION_ALTSTEP, "as_ignore_status");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2695);
/* GBProxy_Tests.ttcn, line 2695 */
switch (pt.receive(BSSGP__Emulation::BssgpStatusIndication_template(ANY_VALUE), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(2695);
/* GBProxy_Tests.ttcn, line 2695 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__ignore__status(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__ignore__status_instance(pt);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_ignore_status.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__ignore__status(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
return new as__ignore__status_Default(pt);
}

COMPONENT f__get__sgsn__bvc__ct(const INTEGER& sgsn__idx, const INTEGER& bvci)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2697, TTCN_Location::LOCATION_FUNCTION, "f_get_sgsn_bvc_ct");
{
current_location.update_lineno(2698);
/* GBProxy_Tests.ttcn, line 2698 */
INTEGER i(0);
current_location.update_lineno(2698);
/* GBProxy_Tests.ttcn, line 2698 */
for ( ; ; ) {
current_location.update_lineno(2698);
/* GBProxy_Tests.ttcn, line 2698 */
if (!(i < const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(2699);
/* GBProxy_Tests.ttcn, line 2699 */
if ((const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].cfg().bvc()[i].bvci() == bvci)) {
current_location.update_lineno(2700);
/* GBProxy_Tests.ttcn, line 2700 */
return const_cast< const GbInstances&>(test__CT_component_g__sgsn)[sgsn__idx].vc__BSSGP__BVC()[i];
}
current_location.update_lineno(2698);
/* GBProxy_Tests.ttcn, line 2698 */
{
INTEGER tmp_401;
++i;
}
}
}
current_location.update_lineno(2703);
/* GBProxy_Tests.ttcn, line 2703 */
return NULL_COMPREF;
}

void start_f__get__sgsn__bvc__ct(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& bvci)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_get_sgsn_bvc_ct(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_get_sgsn_bvc_ct", text_buf);
sgsn__idx.encode_text(text_buf);
bvci.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__reset__ptp__bvc__from__pcu(const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2705, TTCN_Location::LOCATION_FUNCTION, "f_reset_ptp_bvc_from_pcu");
current_location.update_lineno(2707);
/* GBProxy_Tests.ttcn, line 2707 */
COMPONENT pcu__bvc__ct(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[bvc__idx]);
current_location.update_lineno(2708);
/* GBProxy_Tests.ttcn, line 2708 */
BSSGP__Emulation::BssgpBvcConfig bvc__cfg(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx]);
current_location.update_lineno(2709);
/* GBProxy_Tests.ttcn, line 2709 */
INTEGER nsei__pcu(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().nsei());
current_location.update_lineno(2710);
/* GBProxy_Tests.ttcn, line 2710 */
ro__default defaults;
current_location.update_lineno(2711);
/* GBProxy_Tests.ttcn, line 2711 */
INTEGER i;
current_location.update_lineno(2713);
/* GBProxy_Tests.ttcn, line 2713 */
test__CT_component_SGSN__MGMT.clear();
current_location.update_lineno(2714);
/* GBProxy_Tests.ttcn, line 2714 */
test__CT_component_PCU__MGMT.clear();
current_location.update_lineno(2716);
/* GBProxy_Tests.ttcn, line 2716 */
i = 0;
current_location.update_lineno(2716);
/* GBProxy_Tests.ttcn, line 2716 */
for ( ; ; ) {
current_location.update_lineno(2716);
/* GBProxy_Tests.ttcn, line 2716 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(2717);
/* GBProxy_Tests.ttcn, line 2717 */
test__CT_component_g__roroi[i] = NULL_VALUE;
current_location.update_lineno(2716);
/* GBProxy_Tests.ttcn, line 2716 */
{
INTEGER tmp_404;
++i;
}
}
current_location.update_lineno(2721);
/* GBProxy_Tests.ttcn, line 2721 */
{
BSSGP__Emulation::BssgpResetRequest_template tmp_405;
tmp_405.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_PCU__MGMT.send(tmp_405, pcu__bvc__ct, NULL);
}
current_location.update_lineno(2724);
/* GBProxy_Tests.ttcn, line 2724 */
defaults.set_size(1);
defaults[0] = activate_as__ignore__status(test__CT_component_SGSN__MGMT);
current_location.update_lineno(2727);
/* GBProxy_Tests.ttcn, line 2727 */
i = 0;
current_location.update_lineno(2727);
/* GBProxy_Tests.ttcn, line 2727 */
for ( ; ; ) {
current_location.update_lineno(2727);
/* GBProxy_Tests.ttcn, line 2727 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(2728);
/* GBProxy_Tests.ttcn, line 2728 */
DEFAULT d(activate_as__count__bvc__reset(i, const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci(), test__CT_component_g__roroi));
current_location.update_lineno(2729);
/* GBProxy_Tests.ttcn, line 2729 */
{
ro__default tmp_408;
{
ro__default tmp_409;
tmp_409.set_size(1);
tmp_409[0] = d;
tmp_408 = (defaults + tmp_409);
}
defaults = tmp_408;
}
current_location.update_lineno(2727);
/* GBProxy_Tests.ttcn, line 2727 */
{
INTEGER tmp_410;
++i;
}
}
current_location.update_lineno(2732);
/* GBProxy_Tests.ttcn, line 2732 */
TIMER T("T", 3.0);
current_location.update_lineno(2733);
/* GBProxy_Tests.ttcn, line 2733 */
T.start();
current_location.update_lineno(2734);
/* GBProxy_Tests.ttcn, line 2734 */
{
tmp_411:
alt_status tmp_411_alt_flag_0 = ALT_MAYBE;
alt_status tmp_411_alt_flag_1 = ALT_MAYBE;
alt_status tmp_411_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_411_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(2735);
/* GBProxy_Tests.ttcn, line 2735 */
tmp_411_alt_flag_0 = test__CT_component_PCU__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(nsei__pcu), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED)), NULL, COMPONENT_template(pcu__bvc__ct), NULL, NULL, NULL);
if (tmp_411_alt_flag_0 == ALT_YES) {
current_location.update_lineno(2736);
/* GBProxy_Tests.ttcn, line 2736 */
{
Osmocom__Types::ro__integer tmp_412;
{
Osmocom__Types::ro__integer tmp_413;
tmp_413.set_size(1);
tmp_413[0] = const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci();
tmp_412 = (test__CT_component_g__roi + tmp_413);
}
test__CT_component_g__roi = tmp_412;
}
current_location.update_lineno(2737);
/* GBProxy_Tests.ttcn, line 2737 */
goto tmp_411;
}
}
if (tmp_411_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(2739);
/* GBProxy_Tests.ttcn, line 2739 */
tmp_411_alt_flag_1 = T.timeout(NULL);
if (tmp_411_alt_flag_1 == ALT_YES) break;
}
if (tmp_411_default_flag == ALT_MAYBE) {
tmp_411_default_flag = TTCN_Default::try_altsteps();
if (tmp_411_default_flag == ALT_YES || tmp_411_default_flag == ALT_BREAK) break;
else if (tmp_411_default_flag == ALT_REPEAT) goto tmp_411;
}
current_location.update_lineno(2734);
/* GBProxy_Tests.ttcn, line 2734 */
if (tmp_411_alt_flag_0 == ALT_NO && tmp_411_alt_flag_1 == ALT_NO && tmp_411_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 2734 and 2740.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(2742);
/* GBProxy_Tests.ttcn, line 2742 */
i = 0;
current_location.update_lineno(2742);
/* GBProxy_Tests.ttcn, line 2742 */
for ( ; ; ) {
current_location.update_lineno(2742);
/* GBProxy_Tests.ttcn, line 2742 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2743);
/* GBProxy_Tests.ttcn, line 2743 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2742);
/* GBProxy_Tests.ttcn, line 2742 */
{
INTEGER tmp_415;
++i;
}
}
current_location.update_lineno(2747);
/* GBProxy_Tests.ttcn, line 2747 */
i = 0;
current_location.update_lineno(2747);
/* GBProxy_Tests.ttcn, line 2747 */
for ( ; ; ) {
current_location.update_lineno(2747);
/* GBProxy_Tests.ttcn, line 2747 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(2748);
/* GBProxy_Tests.ttcn, line 2748 */
if ((!(Osmocom__Types::ro__integer__contains(const_cast< const Osmocom__Types::roro__integer&>(test__CT_component_g__roroi)[i], const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci())))) {
current_location.update_lineno(2749);
/* GBProxy_Tests.ttcn, line 2749 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing SGSN["),i.log(),TTCN_Logger::log_event_str("] BVC-BLOCK of BVCI="),const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci().log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2747);
/* GBProxy_Tests.ttcn, line 2747 */
{
INTEGER tmp_417;
++i;
}
}
current_location.update_lineno(2753);
/* GBProxy_Tests.ttcn, line 2753 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2754);
/* GBProxy_Tests.ttcn, line 2754 */
f__cleanup();
}

void start_f__reset__ptp__bvc__from__pcu(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_reset_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_reset_ptp_bvc_from_pcu", text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__bvc__reset__ptp__from__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2757, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_reset_ptp_from_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_reset_ptp_from_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2759);
/* GBProxy_Tests.ttcn, line 2759 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2760);
/* GBProxy_Tests.ttcn, line 2760 */
Osmocom__Types::f__sleep(3.0);
current_location.update_lineno(2761);
/* GBProxy_Tests.ttcn, line 2761 */
f__reset__ptp__bvc__from__pcu(0, 0);
current_location.update_lineno(2762);
/* GBProxy_Tests.ttcn, line 2762 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_reset_ptp_from_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__count__bvc__sts_instance(const INTEGER& sgsn__idx, const INTEGER& bvci, const BSSGP__Emulation::BvcState_template& exp__bvc__state, Osmocom__Types::roro__integer& roroi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2765, TTCN_Location::LOCATION_ALTSTEP, "as_count_bvc_sts");
current_location.update_lineno(2768);
/* GBProxy_Tests.ttcn, line 2768 */
COMPONENT sgsn__bvc__ct(f__get__sgsn__bvc__ct(sgsn__idx, bvci));
alt_status ret_val = ALT_NO;
current_location.update_lineno(2769);
/* GBProxy_Tests.ttcn, line 2769 */
switch (test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(ANY_VALUE), INTEGER_template(bvci), exp__bvc__state), NULL, COMPONENT_template(sgsn__bvc__ct), NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(2770);
/* GBProxy_Tests.ttcn, line 2770 */
{
Osmocom__Types::ro__integer tmp_418;
{
Osmocom__Types::ro__integer tmp_420;
tmp_420.set_size(1);
tmp_420[0] = bvci;
tmp_418 = (const_cast< const Osmocom__Types::roro__integer&>(roroi)[sgsn__idx] + tmp_420);
}
{
Osmocom__Types::ro__integer& tmp_419 = roroi[sgsn__idx]; /* 7388 */
tmp_419 = tmp_418;
}
}
current_location.update_lineno(2771);
/* GBProxy_Tests.ttcn, line 2771 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__count__bvc__sts(const INTEGER& sgsn__idx, const INTEGER& bvci, const BSSGP__Emulation::BvcState_template& exp__bvc__state, Osmocom__Types::roro__integer& roroi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__bvc__sts_instance(sgsn__idx, bvci, exp__bvc__state, roroi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_bvc_sts.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__bvc__sts(const INTEGER& sgsn__idx, const INTEGER& bvci, const BSSGP__Emulation::BvcState_template& exp__bvc__state, Osmocom__Types::roro__integer& roroi)
{
return new as__count__bvc__sts_Default(sgsn__idx, bvci, exp__bvc__state, roroi);
}

alt_status as__count__bvc__block_instance(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2775, TTCN_Location::LOCATION_ALTSTEP, "as_count_bvc_block");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2777);
/* GBProxy_Tests.ttcn, line 2777 */
switch (as__count__bvc__sts_instance(sgsn__idx, bvci, BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED), roroi)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__count__bvc__block(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__bvc__block_instance(sgsn__idx, bvci, roroi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_bvc_block.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__bvc__block(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
return new as__count__bvc__block_Default(sgsn__idx, bvci, roroi);
}

alt_status as__count__bvc__unblock_instance(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2780, TTCN_Location::LOCATION_ALTSTEP, "as_count_bvc_unblock");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2782);
/* GBProxy_Tests.ttcn, line 2782 */
switch (as__count__bvc__sts_instance(sgsn__idx, bvci, BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED), roroi)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__count__bvc__unblock(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__bvc__unblock_instance(sgsn__idx, bvci, roroi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_bvc_unblock.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__bvc__unblock(const INTEGER& sgsn__idx, const INTEGER& bvci, Osmocom__Types::roro__integer& roroi)
{
return new as__count__bvc__unblock_Default(sgsn__idx, bvci, roroi);
}

verdicttype testcase_TC__bvc__reset__sig__from__bss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2786, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_reset_sig_from_bss");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_reset_sig_from_bss", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2788);
/* GBProxy_Tests.ttcn, line 2788 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2789);
/* GBProxy_Tests.ttcn, line 2789 */
Osmocom__Types::f__sleep(3.0);
{
current_location.update_lineno(2791);
/* GBProxy_Tests.ttcn, line 2791 */
INTEGER i(0);
current_location.update_lineno(2791);
/* GBProxy_Tests.ttcn, line 2791 */
for ( ; ; ) {
current_location.update_lineno(2791);
/* GBProxy_Tests.ttcn, line 2791 */
if (!(i < mp__nsconfig__sgsn.lengthof())) break;
current_location.update_lineno(2792);
/* GBProxy_Tests.ttcn, line 2792 */
test__CT_component_g__roroi[i] = NULL_VALUE;
current_location.update_lineno(2791);
/* GBProxy_Tests.ttcn, line 2791 */
{
INTEGER tmp_422;
++i;
}
}
}
current_location.update_lineno(2796);
/* GBProxy_Tests.ttcn, line 2796 */
{
BSSGP__Emulation::BssgpResetRequest_template tmp_423;
tmp_423.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_PCU__MGMT.send(tmp_423, const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].vc__BSSGP(), NULL);
}
current_location.update_lineno(2799);
/* GBProxy_Tests.ttcn, line 2799 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(2800);
/* GBProxy_Tests.ttcn, line 2800 */
INTEGER i(0);
current_location.update_lineno(2800);
/* GBProxy_Tests.ttcn, line 2800 */
for ( ; ; ) {
current_location.update_lineno(2800);
/* GBProxy_Tests.ttcn, line 2800 */
if (!(i < const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc().lengthof())) break;
current_location.update_lineno(2801);
/* GBProxy_Tests.ttcn, line 2801 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[i]);
{
current_location.update_lineno(2802);
/* GBProxy_Tests.ttcn, line 2802 */
INTEGER j(0);
current_location.update_lineno(2802);
/* GBProxy_Tests.ttcn, line 2802 */
for ( ; ; ) {
current_location.update_lineno(2802);
/* GBProxy_Tests.ttcn, line 2802 */
if (!(j < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(2803);
/* GBProxy_Tests.ttcn, line 2803 */
DEFAULT d(activate_as__count__bvc__block(j, const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).bvci(), test__CT_component_g__roroi));
current_location.update_lineno(2804);
/* GBProxy_Tests.ttcn, line 2804 */
{
ro__default tmp_424;
{
ro__default tmp_425;
tmp_425.set_size(1);
tmp_425[0] = d;
tmp_424 = (defaults + tmp_425);
}
defaults = tmp_424;
}
current_location.update_lineno(2802);
/* GBProxy_Tests.ttcn, line 2802 */
{
INTEGER tmp_426;
++j;
}
}
}
current_location.update_lineno(2800);
/* GBProxy_Tests.ttcn, line 2800 */
{
INTEGER tmp_427;
++i;
}
}
}
current_location.update_lineno(2808);
/* GBProxy_Tests.ttcn, line 2808 */
TIMER T("T", 3.0);
current_location.update_lineno(2809);
/* GBProxy_Tests.ttcn, line 2809 */
T.start();
current_location.update_lineno(2810);
/* GBProxy_Tests.ttcn, line 2810 */
{
tmp_428:
alt_status tmp_428_alt_flag_0 = ALT_MAYBE;
alt_status tmp_428_alt_flag_1 = ALT_MAYBE;
alt_status tmp_428_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_428_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(2811);
/* GBProxy_Tests.ttcn, line 2811 */
{
BSSGP__Emulation::BssgpResetIndication_template tmp_429;
tmp_429.bvci() = 0;
tmp_428_alt_flag_0 = test__CT_component_SGSN__MGMT.receive(tmp_429, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_428_alt_flag_0 == ALT_YES) {
current_location.update_lineno(2812);
/* GBProxy_Tests.ttcn, line 2812 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("BSS-side Reset of BVCI=0 should not propagate"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_428_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(2814);
/* GBProxy_Tests.ttcn, line 2814 */
tmp_428_alt_flag_1 = T.timeout(NULL);
if (tmp_428_alt_flag_1 == ALT_YES) break;
}
if (tmp_428_default_flag == ALT_MAYBE) {
tmp_428_default_flag = TTCN_Default::try_altsteps();
if (tmp_428_default_flag == ALT_YES || tmp_428_default_flag == ALT_BREAK) break;
else if (tmp_428_default_flag == ALT_REPEAT) goto tmp_428;
}
current_location.update_lineno(2810);
/* GBProxy_Tests.ttcn, line 2810 */
if (tmp_428_alt_flag_0 == ALT_NO && tmp_428_alt_flag_1 == ALT_NO && tmp_428_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 2810 and 2815.");
TTCN_Snapshot::take_new(TRUE);
}
}
{
current_location.update_lineno(2817);
/* GBProxy_Tests.ttcn, line 2817 */
INTEGER i(0);
current_location.update_lineno(2817);
/* GBProxy_Tests.ttcn, line 2817 */
for ( ; ; ) {
current_location.update_lineno(2817);
/* GBProxy_Tests.ttcn, line 2817 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2818);
/* GBProxy_Tests.ttcn, line 2818 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2817);
/* GBProxy_Tests.ttcn, line 2817 */
{
INTEGER tmp_430;
++i;
}
}
}
{
current_location.update_lineno(2822);
/* GBProxy_Tests.ttcn, line 2822 */
INTEGER i(0);
current_location.update_lineno(2822);
/* GBProxy_Tests.ttcn, line 2822 */
for ( ; ; ) {
current_location.update_lineno(2822);
/* GBProxy_Tests.ttcn, line 2822 */
if (!(i < const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc().lengthof())) break;
current_location.update_lineno(2823);
/* GBProxy_Tests.ttcn, line 2823 */
BSSGP__Emulation::BssgpBvcConfig bvcc(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[i]);
{
current_location.update_lineno(2824);
/* GBProxy_Tests.ttcn, line 2824 */
INTEGER j(0);
current_location.update_lineno(2824);
/* GBProxy_Tests.ttcn, line 2824 */
for ( ; ; ) {
current_location.update_lineno(2824);
/* GBProxy_Tests.ttcn, line 2824 */
if (!(j < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(2825);
/* GBProxy_Tests.ttcn, line 2825 */
if ((!(Osmocom__Types::ro__integer__contains(const_cast< const Osmocom__Types::roro__integer&>(test__CT_component_g__roroi)[j], const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).bvci())))) {
current_location.update_lineno(2826);
/* GBProxy_Tests.ttcn, line 2826 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing SGSN["),j.log(),TTCN_Logger::log_event_str("] BVC-BLOCK of BVCI="),const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvcc).bvci().log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2824);
/* GBProxy_Tests.ttcn, line 2824 */
{
INTEGER tmp_431;
++j;
}
}
}
current_location.update_lineno(2822);
/* GBProxy_Tests.ttcn, line 2822 */
{
INTEGER tmp_432;
++i;
}
}
}
current_location.update_lineno(2833);
/* GBProxy_Tests.ttcn, line 2833 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(2834);
/* GBProxy_Tests.ttcn, line 2834 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_reset_sig_from_bss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__reset__ptp__bvc__from__sgsn(const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2837, TTCN_Location::LOCATION_FUNCTION, "f_reset_ptp_bvc_from_sgsn");
current_location.update_lineno(2839);
/* GBProxy_Tests.ttcn, line 2839 */
COMPONENT pcu__bvc__ct(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP__BVC()[bvc__idx]);
current_location.update_lineno(2840);
/* GBProxy_Tests.ttcn, line 2840 */
BSSGP__Emulation::BssgpBvcConfig bvc__cfg(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx]);
current_location.update_lineno(2841);
/* GBProxy_Tests.ttcn, line 2841 */
INTEGER nsei__pcu(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().nsei());
current_location.update_lineno(2842);
/* GBProxy_Tests.ttcn, line 2842 */
COMPONENT sgsn__bvc__ct(f__get__sgsn__bvc__ct(0, const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()));
current_location.update_lineno(2843);
/* GBProxy_Tests.ttcn, line 2843 */
DEFAULT d;
current_location.update_lineno(2845);
/* GBProxy_Tests.ttcn, line 2845 */
test__CT_component_SGSN__MGMT.clear();
current_location.update_lineno(2846);
/* GBProxy_Tests.ttcn, line 2846 */
test__CT_component_PCU__MGMT.clear();
current_location.update_lineno(2849);
/* GBProxy_Tests.ttcn, line 2849 */
{
BSSGP__Emulation::BssgpResetRequest_template tmp_433;
tmp_433.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_SGSN__MGMT.send(tmp_433, sgsn__bvc__ct, NULL);
}
current_location.update_lineno(2851);
/* GBProxy_Tests.ttcn, line 2851 */
d = activate_as__ignore__status(test__CT_component_PCU__MGMT);
current_location.update_lineno(2852);
/* GBProxy_Tests.ttcn, line 2852 */
{
size_t tmp_435_state[2];
tmp_435_state[0]=2;
tmp_435_state[1]=2;
alt_status tmp_435_alt_flag[3];
tmp_435:
for(size_t tmp_i=0; tmp_i<2; tmp_i++) tmp_435_alt_flag[tmp_i]=ALT_UNCHECKED;
tmp_435_alt_flag[2]=ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for( ; ; ) {
if(tmp_435_state[0]==1 && tmp_435_state[1]==1) break;
current_location.update_lineno(2853);
/* GBProxy_Tests.ttcn, line 2853 */
if(tmp_435_alt_flag[0]==ALT_UNCHECKED) {
if(tmp_435_state[0]==2) {
tmp_435_alt_flag[0]=ALT_MAYBE;
}
else tmp_435_alt_flag[0]=ALT_NO;
}
if(tmp_435_alt_flag[0]==ALT_MAYBE) {
tmp_435_alt_flag[0]=test__CT_component_SGSN__MGMT.receive(BSSGP__Emulation::tr__BssgpStsInd(INTEGER_template(ANY_VALUE), INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), BSSGP__Emulation::BvcState_template(BSSGP__Emulation::BvcState::BVC__S__BLOCKED)), NULL, COMPONENT_template(sgsn__bvc__ct), NULL, NULL, NULL);
if(tmp_435_alt_flag[0]==ALT_YES) {
tmp_435_state[0]=1;
goto tmp_435;
}
}
current_location.update_lineno(2854);
/* GBProxy_Tests.ttcn, line 2854 */
if(tmp_435_alt_flag[1]==ALT_UNCHECKED) {
if(tmp_435_state[1]==2) {
tmp_435_alt_flag[1]=ALT_MAYBE;
}
else tmp_435_alt_flag[1]=ALT_NO;
}
if(tmp_435_alt_flag[1]==ALT_MAYBE) {
{
BSSGP__Emulation::BssgpResetIndication_template tmp_436;
tmp_436.bvci() = const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci();
tmp_435_alt_flag[1]=test__CT_component_PCU__MGMT.receive(tmp_436, NULL, COMPONENT_template(pcu__bvc__ct), NULL, NULL, NULL);
}
if(tmp_435_alt_flag[1]==ALT_YES) {
tmp_435_state[1]=1;
goto tmp_435;
}
}
if(tmp_435_alt_flag[2]==ALT_MAYBE) {
tmp_435_alt_flag[2]=TTCN_Default::try_altsteps();
if(tmp_435_alt_flag[2]==ALT_YES || tmp_435_alt_flag[2]==ALT_BREAK) break;
else if(tmp_435_alt_flag[2]==ALT_REPEAT) goto tmp_435;
}
current_location.update_lineno(2852);
/* GBProxy_Tests.ttcn, line 2852 */
for(size_t tmp_i=0; tmp_i<3; tmp_i++) if(tmp_435_alt_flag[tmp_i]!=ALT_NO) goto tmp_435_newsnapshot;
TTCN_error("None of the branches can be chosen in the interleave statement in file GBProxy_Tests.ttcn between lines 2852 and 2855.");
tmp_435_newsnapshot:
TTCN_Snapshot::take_new(TRUE);
continue;
current_location.update_lineno(2852);
/* GBProxy_Tests.ttcn, line 2852 */
}
}
current_location.update_lineno(2856);
/* GBProxy_Tests.ttcn, line 2856 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(2857);
/* GBProxy_Tests.ttcn, line 2857 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__reset__ptp__bvc__from__sgsn(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_reset_ptp_bvc_from_sgsn(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_reset_ptp_bvc_from_sgsn", text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__bvc__reset__ptp__from__sgsn(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2861, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_reset_ptp_from_sgsn");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_reset_ptp_from_sgsn", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2863);
/* GBProxy_Tests.ttcn, line 2863 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2864);
/* GBProxy_Tests.ttcn, line 2864 */
Osmocom__Types::f__sleep(3.0);
current_location.update_lineno(2865);
/* GBProxy_Tests.ttcn, line 2865 */
f__reset__ptp__bvc__from__sgsn(0, 0);
current_location.update_lineno(2866);
/* GBProxy_Tests.ttcn, line 2866 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_reset_ptp_from_sgsn was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__bvc__reset__blocked__ptp__from__sgsn(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2870, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_reset_blocked_ptp_from_sgsn");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_reset_blocked_ptp_from_sgsn", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(2872);
/* GBProxy_Tests.ttcn, line 2872 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2873);
/* GBProxy_Tests.ttcn, line 2873 */
f__global__init();
current_location.update_lineno(2874);
/* GBProxy_Tests.ttcn, line 2874 */
Osmocom__Types::f__sleep(3.0);
current_location.update_lineno(2876);
/* GBProxy_Tests.ttcn, line 2876 */
f__disable__ns__pcu(0);
current_location.update_lineno(2877);
/* GBProxy_Tests.ttcn, line 2877 */
Osmocom__Types::f__sleep(1.0e1);
current_location.update_lineno(2879);
/* GBProxy_Tests.ttcn, line 2879 */
BSSGP__Emulation::BssgpBvcConfig bvc__cfg(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[0]);
current_location.update_lineno(2880);
/* GBProxy_Tests.ttcn, line 2880 */
{
BSSGP__Emulation::BssgpResetRequest_template tmp_437;
tmp_437.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_SGSN__MGMT.send(tmp_437, f__get__sgsn__bvc__ct(0, const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), NULL);
}
current_location.update_lineno(2883);
/* GBProxy_Tests.ttcn, line 2883 */
BSSGP__Types::PDU__BSSGP_template exp__rx(Osmocom__Gb__Types::tr__BSSGP__STATUS(INTEGER_template(const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci()), Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__BVCI__UNKNOWN), OCTETSTRING_template(ANY_VALUE)));
current_location.update_lineno(2886);
/* GBProxy_Tests.ttcn, line 2886 */
{
tmp_438:
alt_status tmp_438_alt_flag_0 = ALT_MAYBE;
alt_status tmp_438_alt_flag_1 = ALT_MAYBE;
alt_status tmp_438_alt_flag_2 = ALT_MAYBE;
alt_status tmp_438_alt_flag_3 = ALT_MAYBE;
alt_status tmp_438_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_438_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(2887);
/* GBProxy_Tests.ttcn, line 2887 */
tmp_438_alt_flag_0 = GlobalTest__CT_component_G__SGSN[0].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_438_alt_flag_0 == ALT_YES) {
current_location.update_lineno(2888);
/* GBProxy_Tests.ttcn, line 2888 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_438_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(2890);
/* GBProxy_Tests.ttcn, line 2890 */
{
BSSGP__Emulation::BssgpStatusIndication_template tmp_439;
tmp_439.nsei() = ANY_OR_OMIT;
tmp_439.bvci() = const_cast< const BSSGP__Emulation::BssgpBvcConfig&>(bvc__cfg).bvci();
tmp_439.state() = BSSGP__Emulation::BvcState::BVC__S__UNBLOCKED;
tmp_438_alt_flag_1 = test__CT_component_SGSN__MGMT.receive(tmp_439, NULL, any_compref, NULL, NULL, NULL);
}
if (tmp_438_alt_flag_1 == ALT_YES) {
current_location.update_lineno(2891);
/* GBProxy_Tests.ttcn, line 2891 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("BVC unblocked that should be gone on BSS side"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_438_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(2893);
/* GBProxy_Tests.ttcn, line 2893 */
tmp_438_alt_flag_2 = test__CT_component_SGSN__MGMT.receive(any_compref, NULL, NULL, NULL);
if (tmp_438_alt_flag_2 == ALT_YES) {
current_location.update_lineno(2894);
/* GBProxy_Tests.ttcn, line 2894 */
goto tmp_438;
}
}
if (tmp_438_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(2896);
/* GBProxy_Tests.ttcn, line 2896 */
tmp_438_alt_flag_3 = GlobalTest__CT_component_G__SGSN[0].receive(any_compref, NULL, NULL, NULL);
if (tmp_438_alt_flag_3 == ALT_YES) {
current_location.update_lineno(2897);
/* GBProxy_Tests.ttcn, line 2897 */
goto tmp_438;
}
}
if (tmp_438_default_flag == ALT_MAYBE) {
tmp_438_default_flag = TTCN_Default::try_altsteps();
if (tmp_438_default_flag == ALT_YES || tmp_438_default_flag == ALT_BREAK) break;
else if (tmp_438_default_flag == ALT_REPEAT) goto tmp_438;
}
current_location.update_lineno(2886);
/* GBProxy_Tests.ttcn, line 2886 */
if (tmp_438_alt_flag_0 == ALT_NO && tmp_438_alt_flag_1 == ALT_NO && tmp_438_alt_flag_2 == ALT_NO && tmp_438_alt_flag_3 == ALT_NO && tmp_438_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 2886 and 2899.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(2901);
/* GBProxy_Tests.ttcn, line 2901 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_reset_blocked_ptp_from_sgsn was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__ignore__mgmt_instance(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2904, TTCN_Location::LOCATION_ALTSTEP, "as_ignore_mgmt");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2905);
/* GBProxy_Tests.ttcn, line 2905 */
switch (pt.receive(any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(2905);
/* GBProxy_Tests.ttcn, line 2905 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__ignore__mgmt(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__ignore__mgmt_instance(pt);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_ignore_mgmt.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__ignore__mgmt(BSSGP__Emulation::BSSGP__BVC__MGMT__PT& pt)
{
return new as__ignore__mgmt_Default(pt);
}

alt_status as__count__bvc0__block_instance(const INTEGER& pcu__idx, const INTEGER& nsei, Osmocom__Types::ro__integer& roi)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2908, TTCN_Location::LOCATION_ALTSTEP, "as_count_bvc0_block");
current_location.update_lineno(2910);
/* GBProxy_Tests.ttcn, line 2910 */
COMPONENT pcu__ct(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].vc__BSSGP());
alt_status ret_val = ALT_NO;
current_location.update_lineno(2911);
/* GBProxy_Tests.ttcn, line 2911 */
{
alt_status tmp_441;
{
BSSGP__Emulation::BssgpResetIndication_template tmp_440;
tmp_440.bvci() = 0;
tmp_441 = test__CT_component_PCU__MGMT.receive(tmp_440, NULL, COMPONENT_template(pcu__ct), NULL, NULL, NULL);
}
switch (tmp_441) {
case ALT_YES:
{
current_location.update_lineno(2912);
/* GBProxy_Tests.ttcn, line 2912 */
{
Osmocom__Types::ro__integer tmp_442;
{
Osmocom__Types::ro__integer tmp_443;
tmp_443.set_size(1);
tmp_443[0] = nsei;
tmp_442 = (roi + tmp_443);
}
roi = tmp_442;
}
current_location.update_lineno(2913);
/* GBProxy_Tests.ttcn, line 2913 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__count__bvc0__block(const INTEGER& pcu__idx, const INTEGER& nsei, Osmocom__Types::ro__integer& roi)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__count__bvc0__block_instance(pcu__idx, nsei, roi);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_count_bvc0_block.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__count__bvc0__block(const INTEGER& pcu__idx, const INTEGER& nsei, Osmocom__Types::ro__integer& roi)
{
return new as__count__bvc0__block_Default(pcu__idx, nsei, roi);
}

verdicttype testcase_TC__bvc__reset__sig__from__sgsn(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2918, TTCN_Location::LOCATION_TESTCASE, "TC_bvc_reset_sig_from_sgsn");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_bvc_reset_sig_from_sgsn", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(2920);
/* GBProxy_Tests.ttcn, line 2920 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2921);
/* GBProxy_Tests.ttcn, line 2921 */
Osmocom__Types::f__sleep(3.0);
current_location.update_lineno(2923);
/* GBProxy_Tests.ttcn, line 2923 */
test__CT_component_SGSN__MGMT.clear();
current_location.update_lineno(2924);
/* GBProxy_Tests.ttcn, line 2924 */
test__CT_component_PCU__MGMT.clear();
current_location.update_lineno(2927);
/* GBProxy_Tests.ttcn, line 2927 */
{
BSSGP__Emulation::BssgpResetRequest_template tmp_444;
tmp_444.cause() = Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__OM__INTERVENTION;
test__CT_component_SGSN__MGMT.send(tmp_444, const_cast< const GbInstances&>(test__CT_component_g__sgsn)[0].vc__BSSGP(), NULL);
}
current_location.update_lineno(2933);
/* GBProxy_Tests.ttcn, line 2933 */
ro__default defaults;
defaults.set_size(1);
defaults[0] = activate_as__ignore__mgmt(test__CT_component_PCU__MGMT);
{
current_location.update_lineno(2936);
/* GBProxy_Tests.ttcn, line 2936 */
INTEGER i(0);
current_location.update_lineno(2936);
/* GBProxy_Tests.ttcn, line 2936 */
for ( ; ; ) {
current_location.update_lineno(2936);
/* GBProxy_Tests.ttcn, line 2936 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2937);
/* GBProxy_Tests.ttcn, line 2937 */
NS__Emulation::NSConfiguration nscfg(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i]);
current_location.update_lineno(2938);
/* GBProxy_Tests.ttcn, line 2938 */
DEFAULT d(activate_as__count__bvc0__block(i, const_cast< const NS__Emulation::NSConfiguration&>(nscfg).nsei(), test__CT_component_g__roi));
current_location.update_lineno(2939);
/* GBProxy_Tests.ttcn, line 2939 */
{
ro__default tmp_445;
{
ro__default tmp_446;
tmp_446.set_size(1);
tmp_446[0] = d;
tmp_445 = (defaults + tmp_446);
}
defaults = tmp_445;
}
current_location.update_lineno(2936);
/* GBProxy_Tests.ttcn, line 2936 */
{
INTEGER tmp_447;
++i;
}
}
}
current_location.update_lineno(2942);
/* GBProxy_Tests.ttcn, line 2942 */
Osmocom__Types::f__sleep(3.0);
{
current_location.update_lineno(2944);
/* GBProxy_Tests.ttcn, line 2944 */
INTEGER i(0);
current_location.update_lineno(2944);
/* GBProxy_Tests.ttcn, line 2944 */
for ( ; ; ) {
current_location.update_lineno(2944);
/* GBProxy_Tests.ttcn, line 2944 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(2945);
/* GBProxy_Tests.ttcn, line 2945 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(2944);
/* GBProxy_Tests.ttcn, line 2944 */
{
INTEGER tmp_448;
++i;
}
}
}
{
current_location.update_lineno(2949);
/* GBProxy_Tests.ttcn, line 2949 */
INTEGER i(0);
current_location.update_lineno(2949);
/* GBProxy_Tests.ttcn, line 2949 */
for ( ; ; ) {
current_location.update_lineno(2949);
/* GBProxy_Tests.ttcn, line 2949 */
if (!(i < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(2950);
/* GBProxy_Tests.ttcn, line 2950 */
NS__Emulation::NSConfiguration nscfg(const_cast< const NSConfigurations&>(mp__nsconfig__pcu)[i]);
current_location.update_lineno(2951);
/* GBProxy_Tests.ttcn, line 2951 */
if ((!(Osmocom__Types::ro__integer__contains(test__CT_component_g__roi, const_cast< const NS__Emulation::NSConfiguration&>(nscfg).nsei())))) {
current_location.update_lineno(2952);
/* GBProxy_Tests.ttcn, line 2952 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing PCU-side BVC-RESET of BVCI=0 on PCU index "),i.log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(2949);
/* GBProxy_Tests.ttcn, line 2949 */
{
INTEGER tmp_449;
++i;
}
}
}
current_location.update_lineno(2959);
/* GBProxy_Tests.ttcn, line 2959 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_bvc_reset_sig_from_sgsn was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__g__count__sgsn_instance(const INTEGER& sgsn__idx, Osmocom__Types::ro__integer& roi, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const BSSGP__Types::PDU__BSSGP_template& tx__reply)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 2966, TTCN_Location::LOCATION_ALTSTEP, "as_g_count_sgsn");
alt_status ret_val = ALT_NO;
current_location.update_lineno(2969);
/* GBProxy_Tests.ttcn, line 2969 */
switch (GlobalTest__CT_component_G__SGSN[sgsn__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(2970);
/* GBProxy_Tests.ttcn, line 2970 */
{
Osmocom__Types::ro__integer tmp_450;
{
Osmocom__Types::ro__integer tmp_451;
tmp_451.set_size(1);
tmp_451[0] = sgsn__idx;
tmp_450 = (roi + tmp_451);
}
roi = tmp_450;
}
current_location.update_lineno(2971);
/* GBProxy_Tests.ttcn, line 2971 */
if (tx__reply.is_present()) {
current_location.update_lineno(2972);
/* GBProxy_Tests.ttcn, line 2972 */
GlobalTest__CT_component_G__SGSN[sgsn__idx].send(tx__reply, NULL);
}
current_location.update_lineno(2974);
/* GBProxy_Tests.ttcn, line 2974 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__g__count__sgsn(const INTEGER& sgsn__idx, Osmocom__Types::ro__integer& roi, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const BSSGP__Types::PDU__BSSGP_template& tx__reply)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__g__count__sgsn_instance(sgsn__idx, roi, exp__rx, tx__reply);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_g_count_sgsn.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__g__count__sgsn(const INTEGER& sgsn__idx, Osmocom__Types::ro__integer& roi, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const BSSGP__Types::PDU__BSSGP_template& tx__reply)
{
return new as__g__count__sgsn_Default(sgsn__idx, roi, exp__rx, tx__reply);
}

verdicttype testcase_TC__fc__bvc(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 2978, TTCN_Location::LOCATION_TESTCASE, "TC_fc_bvc");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_fc_bvc", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(2980);
/* GBProxy_Tests.ttcn, line 2980 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(2981);
/* GBProxy_Tests.ttcn, line 2981 */
f__global__init__ptp();
current_location.update_lineno(2983);
/* GBProxy_Tests.ttcn, line 2983 */
BSSGP__Types::PDU__BSSGP_template pdu__tx(Osmocom__Gb__Types::ts__BVC__FC__BVC(10240, 2000, 1024, 1000, os_2));
current_location.update_lineno(2985);
/* GBProxy_Tests.ttcn, line 2985 */
BSSGP__Types::PDU__BSSGP_template pdu__rx(Osmocom__Gb__Types::tr__BVC__FC__BVC(INTEGER_template(10240), INTEGER_template(2000), INTEGER_template(1024), INTEGER_template(1000), OCTETSTRING_template(os_2)));
current_location.update_lineno(2986);
/* GBProxy_Tests.ttcn, line 2986 */
BSSGP__Types::PDU__BSSGP_template ack__tx(Osmocom__Gb__Types::ts__BVC__FC__BVC__ACK(const_cast< const BSSGP__Types::PDU__BSSGP_template&>(pdu__tx).pDU__BSSGP__FLOW__CONTROL__BVC().tag().unstructured__Value()));
current_location.update_lineno(2990);
/* GBProxy_Tests.ttcn, line 2990 */
GlobalTest__CT_component_G__PCU[0].send(pdu__tx, NULL);
current_location.update_lineno(2993);
/* GBProxy_Tests.ttcn, line 2993 */
ro__default defaults(NULL_VALUE);
{
current_location.update_lineno(2994);
/* GBProxy_Tests.ttcn, line 2994 */
INTEGER i(0);
current_location.update_lineno(2994);
/* GBProxy_Tests.ttcn, line 2994 */
for ( ; ; ) {
current_location.update_lineno(2994);
/* GBProxy_Tests.ttcn, line 2994 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(2995);
/* GBProxy_Tests.ttcn, line 2995 */
DEFAULT d(activate_as__g__count__sgsn(i, test__CT_component_g__roi, pdu__rx, ack__tx));
current_location.update_lineno(2996);
/* GBProxy_Tests.ttcn, line 2996 */
{
ro__default tmp_452;
{
ro__default tmp_453;
tmp_453.set_size(1);
tmp_453[0] = d;
tmp_452 = (defaults + tmp_453);
}
defaults = tmp_452;
}
current_location.update_lineno(2994);
/* GBProxy_Tests.ttcn, line 2994 */
{
INTEGER tmp_454;
++i;
}
}
}
current_location.update_lineno(2999);
/* GBProxy_Tests.ttcn, line 2999 */
Osmocom__Types::f__sleep(3.0);
{
current_location.update_lineno(3001);
/* GBProxy_Tests.ttcn, line 3001 */
INTEGER i(0);
current_location.update_lineno(3001);
/* GBProxy_Tests.ttcn, line 3001 */
for ( ; ; ) {
current_location.update_lineno(3001);
/* GBProxy_Tests.ttcn, line 3001 */
if (!(i < defaults.lengthof())) break;
current_location.update_lineno(3002);
/* GBProxy_Tests.ttcn, line 3002 */
TTCN_Default::deactivate(const_cast< const ro__default&>(defaults)[i]);
;
current_location.update_lineno(3001);
/* GBProxy_Tests.ttcn, line 3001 */
{
INTEGER tmp_455;
++i;
}
}
}
{
current_location.update_lineno(3006);
/* GBProxy_Tests.ttcn, line 3006 */
INTEGER i(0);
current_location.update_lineno(3006);
/* GBProxy_Tests.ttcn, line 3006 */
for ( ; ; ) {
current_location.update_lineno(3006);
/* GBProxy_Tests.ttcn, line 3006 */
if (!(i < test__CT_component_g__sgsn.lengthof())) break;
current_location.update_lineno(3007);
/* GBProxy_Tests.ttcn, line 3007 */
if ((!(Osmocom__Types::ro__integer__contains(test__CT_component_g__roi, i)))) {
current_location.update_lineno(3008);
/* GBProxy_Tests.ttcn, line 3008 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing BVC-FLOW-CONTROL on SGSN index "),i.log(),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(3006);
/* GBProxy_Tests.ttcn, line 3006 */
{
INTEGER tmp_456;
++i;
}
}
}
current_location.update_lineno(3013);
/* GBProxy_Tests.ttcn, line 3013 */
{
tmp_457:
alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (alt_flag != ALT_NO) {
alt_flag = GlobalTest__CT_component_G__PCU[0].receive(ack__tx, NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
else if (default_flag == ALT_REPEAT) goto tmp_457;
}
current_location.update_lineno(3013);
/* GBProxy_Tests.ttcn, line 3013 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file GBProxy_Tests.ttcn, line 3013.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(3015);
/* GBProxy_Tests.ttcn, line 3015 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(3017);
/* GBProxy_Tests.ttcn, line 3017 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_fc_bvc was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__fc__ms(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3024, TTCN_Location::LOCATION_FUNCTION, "f_TC_fc_ms");
current_location.update_lineno(3025);
/* GBProxy_Tests.ttcn, line 3025 */
INTEGER bvci(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).pcu()[0].cfg().bvc()[0].bvci());
current_location.update_lineno(3027);
/* GBProxy_Tests.ttcn, line 3027 */
BSSGP__Types::PDU__BSSGP_template fc__tx(Osmocom__Gb__Types::ts__BVC__FC__MS(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli(), 100, 200, os_5));
current_location.update_lineno(3029);
/* GBProxy_Tests.ttcn, line 3029 */
BSSGP__Types::PDU__BSSGP_template fc__rx(Osmocom__Gb__Types::tr__BVC__FC__MS(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), INTEGER_template(100), INTEGER_template(200), OCTETSTRING_template(os_5)));
current_location.update_lineno(3030);
/* GBProxy_Tests.ttcn, line 3030 */
BSSGP__Types::PDU__BSSGP_template ack__tx(Osmocom__Gb__Types::ts__BVC__FC__MS__ACK(OCTETSTRING_template(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).tlli()), OCTETSTRING_template(os_5)));
current_location.update_lineno(3032);
/* GBProxy_Tests.ttcn, line 3032 */
f__pcu2sgsn(fc__tx, fc__rx, f__pcu2sgsn_pcu__idx_defval, FALSE);
current_location.update_lineno(3033);
/* GBProxy_Tests.ttcn, line 3033 */
f__sgsn2pcu(ack__tx, ack__tx, f__sgsn2pcu_pcu__idx_defval, FALSE);
current_location.update_lineno(3035);
/* GBProxy_Tests.ttcn, line 3035 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__fc__ms(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_fc_ms(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_fc_ms", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__fc__ms(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3038, TTCN_Location::LOCATION_TESTCASE, "TC_fc_ms");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_fc_ms", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(3040);
/* GBProxy_Tests.ttcn, line 3040 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3041);
/* GBProxy_Tests.ttcn, line 3041 */
f__start__handlers(&f__TC__fc__ms, cs_78, 21, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(3043);
/* GBProxy_Tests.ttcn, line 3043 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_fc_ms was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ms__reg__enq(const CHARSTRING& )
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3050, TTCN_Location::LOCATION_FUNCTION, "f_TC_ms_reg_enq");
current_location.update_lineno(3052);
/* GBProxy_Tests.ttcn, line 3052 */
f__pcu2any__sgsn(Osmocom__Gb__Types::ts__BSSGP__MS__REG__ENQ(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), Osmocom__Gb__Types::tr__BSSGP__MS__REG__ENQ(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi()), f__pcu2any__sgsn_pcu__idx_defval, TRUE);
current_location.update_lineno(3053);
/* GBProxy_Tests.ttcn, line 3053 */
f__sgsn2pcu(Osmocom__Gb__Types::ts__BSSGP__MS__REW__ENQ__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), HEXSTRING_template(OMIT_VALUE)), Osmocom__Gb__Types::tr__BSSGP__MS__REW__ENQ__RESP(const_cast< const BSSGP__ConnHdlrPars&>(BSSGP__ConnHdlr_component_g__pars).imsi(), HEXSTRING_template(OMIT_VALUE)), f__sgsn2pcu_pcu__idx_defval, TRUE);
}

void start_f__TC__ms__reg__enq(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ms_reg_enq(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_ms_reg_enq", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ms__reg__enq(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3055, TTCN_Location::LOCATION_TESTCASE, "TC_ms_reg_enq");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_ms_reg_enq", "GBProxy_Tests", "test_CT", "GBProxy_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(3057);
/* GBProxy_Tests.ttcn, line 3057 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3058);
/* GBProxy_Tests.ttcn, line 3058 */
f__start__handlers(&f__TC__ms__reg__enq, cs_79, 22, f__start__handlers_t__guard_defval, f__start__handlers_have__ptmsi_defval);
current_location.update_lineno(3059);
/* GBProxy_Tests.ttcn, line 3059 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ms_reg_enq was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__rim__pcu2sgsn(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3085, TTCN_Location::LOCATION_FUNCTION, "f_rim_pcu2sgsn");
current_location.update_lineno(3087);
/* GBProxy_Tests.ttcn, line 3087 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(3088);
/* GBProxy_Tests.ttcn, line 3088 */
TIMER T("T", 2.0);
current_location.update_lineno(3090);
/* GBProxy_Tests.ttcn, line 3090 */
GlobalTest__CT_component_RIM__PCU[pcu__idx].send(tx, NULL);
current_location.update_lineno(3091);
/* GBProxy_Tests.ttcn, line 3091 */
T.start();
current_location.update_lineno(3092);
/* GBProxy_Tests.ttcn, line 3092 */
{
tmp_460:
alt_status tmp_460_alt_flag_0 = ALT_MAYBE;
alt_status tmp_460_alt_flag_1 = ALT_MAYBE;
alt_status tmp_460_alt_flag_2 = ALT_MAYBE;
alt_status tmp_460_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_460_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(3093);
/* GBProxy_Tests.ttcn, line 3093 */
tmp_460_alt_flag_0 = GlobalTest__CT_component_RIM__SGSN.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_460_alt_flag_0 == ALT_YES) {
current_location.update_lineno(3094);
/* GBProxy_Tests.ttcn, line 3094 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_460_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(3096);
/* GBProxy_Tests.ttcn, line 3096 */
tmp_460_alt_flag_1 = GlobalTest__CT_component_RIM__SGSN.receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_460_alt_flag_1 == ALT_YES) {
current_location.update_lineno(3097);
/* GBProxy_Tests.ttcn, line 3097 */
Misc__Helpers::f__shutdown(cs_21, 3097, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on SGSN side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_460_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(3099);
/* GBProxy_Tests.ttcn, line 3099 */
tmp_460_alt_flag_2 = T.timeout(NULL);
if (tmp_460_alt_flag_2 == ALT_YES) {
current_location.update_lineno(3100);
/* GBProxy_Tests.ttcn, line 3100 */
Misc__Helpers::f__shutdown(cs_21, 3100, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on SGSN side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_460_default_flag == ALT_MAYBE) {
tmp_460_default_flag = TTCN_Default::try_altsteps();
if (tmp_460_default_flag == ALT_YES || tmp_460_default_flag == ALT_BREAK) break;
else if (tmp_460_default_flag == ALT_REPEAT) goto tmp_460;
}
current_location.update_lineno(3092);
/* GBProxy_Tests.ttcn, line 3092 */
if (tmp_460_alt_flag_0 == ALT_NO && tmp_460_alt_flag_1 == ALT_NO && tmp_460_alt_flag_2 == ALT_NO && tmp_460_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 3092 and 3103.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__rim__pcu2sgsn(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_rim_pcu2sgsn", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__rim__sgsn2pcu(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& sgsn__idx, const INTEGER& pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3107, TTCN_Location::LOCATION_FUNCTION, "f_rim_sgsn2pcu");
current_location.update_lineno(3109);
/* GBProxy_Tests.ttcn, line 3109 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(3110);
/* GBProxy_Tests.ttcn, line 3110 */
TIMER T("T", 2.0);
current_location.update_lineno(3112);
/* GBProxy_Tests.ttcn, line 3112 */
GlobalTest__CT_component_RIM__SGSN[sgsn__idx].send(tx, NULL);
current_location.update_lineno(3113);
/* GBProxy_Tests.ttcn, line 3113 */
T.start();
current_location.update_lineno(3114);
/* GBProxy_Tests.ttcn, line 3114 */
{
tmp_461:
alt_status tmp_461_alt_flag_0 = ALT_MAYBE;
alt_status tmp_461_alt_flag_1 = ALT_MAYBE;
alt_status tmp_461_alt_flag_2 = ALT_MAYBE;
alt_status tmp_461_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_461_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(3115);
/* GBProxy_Tests.ttcn, line 3115 */
tmp_461_alt_flag_0 = GlobalTest__CT_component_RIM__PCU[pcu__idx].receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_461_alt_flag_0 == ALT_YES) {
current_location.update_lineno(3116);
/* GBProxy_Tests.ttcn, line 3116 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_461_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(3118);
/* GBProxy_Tests.ttcn, line 3118 */
tmp_461_alt_flag_1 = GlobalTest__CT_component_RIM__PCU[pcu__idx].receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_461_alt_flag_1 == ALT_YES) {
current_location.update_lineno(3119);
/* GBProxy_Tests.ttcn, line 3119 */
Misc__Helpers::f__shutdown(cs_21, 3119, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on PCU side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_461_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(3121);
/* GBProxy_Tests.ttcn, line 3121 */
tmp_461_alt_flag_2 = T.timeout(NULL);
if (tmp_461_alt_flag_2 == ALT_YES) {
current_location.update_lineno(3122);
/* GBProxy_Tests.ttcn, line 3122 */
Misc__Helpers::f__shutdown(cs_21, 3122, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on PCU side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_461_default_flag == ALT_MAYBE) {
tmp_461_default_flag = TTCN_Default::try_altsteps();
if (tmp_461_default_flag == ALT_YES || tmp_461_default_flag == ALT_BREAK) break;
else if (tmp_461_default_flag == ALT_REPEAT) goto tmp_461;
}
current_location.update_lineno(3114);
/* GBProxy_Tests.ttcn, line 3114 */
if (tmp_461_alt_flag_0 == ALT_NO && tmp_461_alt_flag_1 == ALT_NO && tmp_461_alt_flag_2 == ALT_NO && tmp_461_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 3114 and 3125.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__rim__sgsn2pcu(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& sgsn__idx, const INTEGER& pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_rim_sgsn2pcu", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__rim__pcu2pcu(const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& src__pcu__idx, const INTEGER& dst__pcu__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3129, TTCN_Location::LOCATION_FUNCTION, "f_rim_pcu2pcu");
current_location.update_lineno(3131);
/* GBProxy_Tests.ttcn, line 3131 */
INTEGER rx__idx;
current_location.update_lineno(3132);
/* GBProxy_Tests.ttcn, line 3132 */
BSSGP__Types::PDU__BSSGP rx;
current_location.update_lineno(3133);
/* GBProxy_Tests.ttcn, line 3133 */
TIMER T("T", 2.0);
current_location.update_lineno(3135);
/* GBProxy_Tests.ttcn, line 3135 */
GlobalTest__CT_component_RIM__PCU[src__pcu__idx].send(tx, NULL);
current_location.update_lineno(3136);
/* GBProxy_Tests.ttcn, line 3136 */
T.start();
current_location.update_lineno(3137);
/* GBProxy_Tests.ttcn, line 3137 */
{
tmp_462:
alt_status tmp_462_alt_flag_0 = ALT_MAYBE;
alt_status tmp_462_alt_flag_1 = ALT_MAYBE;
alt_status tmp_462_alt_flag_2 = ALT_MAYBE;
alt_status tmp_462_alt_flag_3 = ALT_MAYBE;
alt_status tmp_462_alt_flag_4 = ALT_MAYBE;
alt_status tmp_462_default_flag = ALT_MAYBE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_462_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(3138);
/* GBProxy_Tests.ttcn, line 3138 */
tmp_462_alt_flag_0 = GlobalTest__CT_component_RIM__PCU[dst__pcu__idx].receive(exp__rx, &(rx), any_compref, NULL, NULL, NULL);
if (tmp_462_alt_flag_0 == ALT_YES) {
current_location.update_lineno(3139);
/* GBProxy_Tests.ttcn, line 3139 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_462_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(3141);
/* GBProxy_Tests.ttcn, line 3141 */
{
class Index_Redirect_tmp_463 : public Index_Redirect {
INTEGER* ptr;
public:
Index_Redirect_tmp_463(INTEGER* par): Index_Redirect(), ptr(par) { }
void add_index(int p_index) { *ptr = p_index; }
};
Index_Redirect_tmp_463 tmp_464(&(rx__idx));
tmp_462_alt_flag_1 = GlobalTest__CT_component_RIM__PCU.receive(exp__rx, NULL, any_compref, NULL, NULL, &tmp_464);
}
if (tmp_462_alt_flag_1 == ALT_YES) {
current_location.update_lineno(3142);
/* GBProxy_Tests.ttcn, line 3142 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received RIM on wrong PCU["),rx__idx.log(),TTCN_Logger::log_event_str("], expected on PCU["),dst__pcu__idx.log(),TTCN_Logger::log_char(']'),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_462_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(3144);
/* GBProxy_Tests.ttcn, line 3144 */
tmp_462_alt_flag_2 = GlobalTest__CT_component_RIM__SGSN.receive(exp__rx, NULL, any_compref, NULL, NULL, NULL);
if (tmp_462_alt_flag_2 == ALT_YES) {
current_location.update_lineno(3145);
/* GBProxy_Tests.ttcn, line 3145 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received RIM on SGSN but expected it on other PCU"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_462_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(3147);
/* GBProxy_Tests.ttcn, line 3147 */
tmp_462_alt_flag_3 = GlobalTest__CT_component_RIM__SGSN.receive(BSSGP__Types::PDU__BSSGP_template(ANY_VALUE), &(rx), any_compref, NULL, NULL, NULL);
if (tmp_462_alt_flag_3 == ALT_YES) {
current_location.update_lineno(3148);
/* GBProxy_Tests.ttcn, line 3148 */
Misc__Helpers::f__shutdown(cs_21, 3148, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected BSSGP on SGSN side: "),rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_462_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(3150);
/* GBProxy_Tests.ttcn, line 3150 */
tmp_462_alt_flag_4 = T.timeout(NULL);
if (tmp_462_alt_flag_4 == ALT_YES) {
current_location.update_lineno(3151);
/* GBProxy_Tests.ttcn, line 3151 */
Misc__Helpers::f__shutdown(cs_21, 3151, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for BSSGP on SGSN side: "),exp__rx.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_462_default_flag == ALT_MAYBE) {
tmp_462_default_flag = TTCN_Default::try_altsteps();
if (tmp_462_default_flag == ALT_YES || tmp_462_default_flag == ALT_BREAK) break;
else if (tmp_462_default_flag == ALT_REPEAT) goto tmp_462;
}
current_location.update_lineno(3137);
/* GBProxy_Tests.ttcn, line 3137 */
if (tmp_462_alt_flag_0 == ALT_NO && tmp_462_alt_flag_1 == ALT_NO && tmp_462_alt_flag_2 == ALT_NO && tmp_462_alt_flag_3 == ALT_NO && tmp_462_alt_flag_4 == ALT_NO && tmp_462_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file GBProxy_Tests.ttcn between lines 3137 and 3154.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__rim__pcu2pcu(const COMPONENT& component_reference, const BSSGP__Types::PDU__BSSGP_template& tx, const BSSGP__Types::PDU__BSSGP_template& exp__rx, const INTEGER& src__pcu__idx, const INTEGER& dst__pcu__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_pcu2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
src__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
dst__pcu__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_rim_pcu2pcu", text_buf);
tx.encode_text(text_buf);
exp__rx.encode_text(text_buf);
src__pcu__idx.encode_text(text_buf);
dst__pcu__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__rim__iterator(const rim__fn& fn)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3162, TTCN_Location::LOCATION_FUNCTION, "f_rim_iterator");
current_location.update_lineno(3164);
/* GBProxy_Tests.ttcn, line 3164 */
INTEGER sgsn__idx;
current_location.update_lineno(3164);
/* GBProxy_Tests.ttcn, line 3164 */
INTEGER pcu__idx;
current_location.update_lineno(3164);
/* GBProxy_Tests.ttcn, line 3164 */
INTEGER bvc__idx;
current_location.update_lineno(3165);
/* GBProxy_Tests.ttcn, line 3165 */
sgsn__idx = 0;
current_location.update_lineno(3165);
/* GBProxy_Tests.ttcn, line 3165 */
for ( ; ; ) {
current_location.update_lineno(3165);
/* GBProxy_Tests.ttcn, line 3165 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3166);
/* GBProxy_Tests.ttcn, line 3166 */
pcu__idx = 0;
current_location.update_lineno(3166);
/* GBProxy_Tests.ttcn, line 3166 */
for ( ; ; ) {
current_location.update_lineno(3166);
/* GBProxy_Tests.ttcn, line 3166 */
if (!(pcu__idx < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(3167);
/* GBProxy_Tests.ttcn, line 3167 */
bvc__idx = 0;
current_location.update_lineno(3167);
/* GBProxy_Tests.ttcn, line 3167 */
for ( ; ; ) {
current_location.update_lineno(3167);
/* GBProxy_Tests.ttcn, line 3167 */
if (!(bvc__idx < const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(3168);
/* GBProxy_Tests.ttcn, line 3168 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Testing RIM SGSN[");
sgsn__idx.log();
TTCN_Logger::log_event_str("] <-> PCU[");
pcu__idx.log();
TTCN_Logger::log_event_str("][");
bvc__idx.log();
TTCN_Logger::log_char(']');
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(3169);
/* GBProxy_Tests.ttcn, line 3169 */
fn.invoke(sgsn__idx, pcu__idx, bvc__idx);
current_location.update_lineno(3167);
/* GBProxy_Tests.ttcn, line 3167 */
{
INTEGER tmp_468;
++bvc__idx;
}
}
current_location.update_lineno(3166);
/* GBProxy_Tests.ttcn, line 3166 */
{
INTEGER tmp_469;
++pcu__idx;
}
}
current_location.update_lineno(3165);
/* GBProxy_Tests.ttcn, line 3165 */
{
INTEGER tmp_470;
++sgsn__idx;
}
}
}

void start_f__rim__iterator(const COMPONENT& component_reference, const rim__fn& fn)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_iterator(");
fn.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_rim_iterator", text_buf);
fn.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__rim__info__req(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3176, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info_req");
current_location.update_lineno(3179);
/* GBProxy_Tests.ttcn, line 3179 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3180);
/* GBProxy_Tests.ttcn, line 3180 */
BSSGP__Types::RAN__Information__Request__RIM__Container_template cont__tx;
current_location.update_lineno(3181);
/* GBProxy_Tests.ttcn, line 3181 */
BSSGP__Types::RAN__Information__Request__RIM__Container_template cont__rx;
current_location.update_lineno(3182);
/* GBProxy_Tests.ttcn, line 3182 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3183);
/* GBProxy_Tests.ttcn, line 3183 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3185);
/* GBProxy_Tests.ttcn, line 3185 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3186);
/* GBProxy_Tests.ttcn, line 3186 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn));
current_location.update_lineno(3188);
/* GBProxy_Tests.ttcn, line 3188 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RIM__PDU__Indications(FALSE, Osmocom__Gb__Types::RIM__PDU__TYPE__STOP), Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_ver_defval, Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_app__cont_defval, Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_son__app__id_defval);
current_location.update_lineno(3191);
/* GBProxy_Tests.ttcn, line 3191 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RIM__PDU__Indications(BOOLEAN_template(FALSE), BITSTRING_template(Osmocom__Gb__Types::RIM__PDU__TYPE__STOP)), Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_ver_defval, Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_app__cont_defval, Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_son__app__id_defval);
current_location.update_lineno(3195);
/* GBProxy_Tests.ttcn, line 3195 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_475;
tmp_475 = ra__sgsn;
tmp_475.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_476;
tmp_476 = ra__pcu;
tmp_476.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_475), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_476), cont__tx), Osmocom__Gb__Types::tr__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
current_location.update_lineno(3203);
/* GBProxy_Tests.ttcn, line 3203 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_477;
tmp_477 = ra__pcu;
tmp_477.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_478;
tmp_478 = ra__sgsn;
tmp_478.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_477), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_478), cont__tx), Osmocom__Gb__Types::tr__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
}

void start_f__TC__rim__info__req(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_req(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info_req", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info__req(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3211, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info_req");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info_req", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3213);
/* GBProxy_Tests.ttcn, line 3213 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3214);
/* GBProxy_Tests.ttcn, line 3214 */
f__global__init();
current_location.update_lineno(3215);
/* GBProxy_Tests.ttcn, line 3215 */
f__rim__iterator(&f__TC__rim__info__req);
current_location.update_lineno(3216);
/* GBProxy_Tests.ttcn, line 3216 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info_req was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__info(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3220, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info");
current_location.update_lineno(3223);
/* GBProxy_Tests.ttcn, line 3223 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3224);
/* GBProxy_Tests.ttcn, line 3224 */
BSSGP__Types::RAN__Information__RIM__Container_template cont__tx;
current_location.update_lineno(3225);
/* GBProxy_Tests.ttcn, line 3225 */
BSSGP__Types::RAN__Information__RIM__Container_template cont__rx;
current_location.update_lineno(3226);
/* GBProxy_Tests.ttcn, line 3226 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3227);
/* GBProxy_Tests.ttcn, line 3227 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3229);
/* GBProxy_Tests.ttcn, line 3229 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3230);
/* GBProxy_Tests.ttcn, line 3230 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn));
current_location.update_lineno(3232);
/* GBProxy_Tests.ttcn, line 3232 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RIM__PDU__Indications(FALSE, Osmocom__Gb__Types::RIM__PDU__TYPE__STOP), Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_ver_defval, Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_app__cont__or__app__err_defval, Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_son__app__id_defval);
current_location.update_lineno(3236);
/* GBProxy_Tests.ttcn, line 3236 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RIM__PDU__Indications(BOOLEAN_template(FALSE), BITSTRING_template(Osmocom__Gb__Types::RIM__PDU__TYPE__STOP)), Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_ver_defval, Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_app__cont__or__app__err_defval, Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_son__app__id_defval);
current_location.update_lineno(3240);
/* GBProxy_Tests.ttcn, line 3240 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_483;
tmp_483 = ra__sgsn;
tmp_483.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_484;
tmp_484 = ra__pcu;
tmp_484.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_483), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_484), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
current_location.update_lineno(3248);
/* GBProxy_Tests.ttcn, line 3248 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_485;
tmp_485 = ra__pcu;
tmp_485.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_486;
tmp_486 = ra__sgsn;
tmp_486.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_485), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_486), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
}

void start_f__TC__rim__info(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3256, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3258);
/* GBProxy_Tests.ttcn, line 3258 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3259);
/* GBProxy_Tests.ttcn, line 3259 */
f__global__init();
current_location.update_lineno(3260);
/* GBProxy_Tests.ttcn, line 3260 */
f__rim__iterator(&f__TC__rim__info);
current_location.update_lineno(3261);
/* GBProxy_Tests.ttcn, line 3261 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__info__ack(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3265, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info_ack");
current_location.update_lineno(3268);
/* GBProxy_Tests.ttcn, line 3268 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3269);
/* GBProxy_Tests.ttcn, line 3269 */
BSSGP__Types::RAN__Information__Ack__RIM__Container_template cont__tx;
current_location.update_lineno(3270);
/* GBProxy_Tests.ttcn, line 3270 */
BSSGP__Types::RAN__Information__Ack__RIM__Container_template cont__rx;
current_location.update_lineno(3271);
/* GBProxy_Tests.ttcn, line 3271 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3272);
/* GBProxy_Tests.ttcn, line 3272 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3274);
/* GBProxy_Tests.ttcn, line 3274 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3275);
/* GBProxy_Tests.ttcn, line 3275 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn));
current_location.update_lineno(3277);
/* GBProxy_Tests.ttcn, line 3277 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__Ack__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RAN__Information__Ack__RIM__Container_ver_defval, Osmocom__Gb__Types::ts__RAN__Information__Ack__RIM__Container_son__app__id_defval);
current_location.update_lineno(3280);
/* GBProxy_Tests.ttcn, line 3280 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__Ack__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RAN__Information__Ack__RIM__Container_ver_defval, Osmocom__Gb__Types::tr__RAN__Information__Ack__RIM__Container_son__app__id_defval);
current_location.update_lineno(3283);
/* GBProxy_Tests.ttcn, line 3283 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_491;
tmp_491 = ra__sgsn;
tmp_491.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_492;
tmp_492 = ra__pcu;
tmp_492.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__ACK(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_491), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_492), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__ACK(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
current_location.update_lineno(3291);
/* GBProxy_Tests.ttcn, line 3291 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_493;
tmp_493 = ra__pcu;
tmp_493.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_494;
tmp_494 = ra__sgsn;
tmp_494.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__ACK(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_493), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_494), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__ACK(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
}

void start_f__TC__rim__info__ack(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_ack(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info_ack", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info__ack(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3299, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info_ack");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info_ack", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3301);
/* GBProxy_Tests.ttcn, line 3301 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3302);
/* GBProxy_Tests.ttcn, line 3302 */
f__global__init();
current_location.update_lineno(3303);
/* GBProxy_Tests.ttcn, line 3303 */
f__rim__iterator(&f__TC__rim__info__ack);
current_location.update_lineno(3304);
/* GBProxy_Tests.ttcn, line 3304 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info_ack was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__info__error(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3308, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info_error");
current_location.update_lineno(3311);
/* GBProxy_Tests.ttcn, line 3311 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3312);
/* GBProxy_Tests.ttcn, line 3312 */
BSSGP__Types::RAN__Information__Error__RIM__Container_template cont__tx;
current_location.update_lineno(3313);
/* GBProxy_Tests.ttcn, line 3313 */
BSSGP__Types::RAN__Information__Error__RIM__Container_template cont__rx;
current_location.update_lineno(3314);
/* GBProxy_Tests.ttcn, line 3314 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3315);
/* GBProxy_Tests.ttcn, line 3315 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3317);
/* GBProxy_Tests.ttcn, line 3317 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3318);
/* GBProxy_Tests.ttcn, line 3318 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn));
current_location.update_lineno(3320);
/* GBProxy_Tests.ttcn, line 3320 */
{
BSSGP__Types::Cause__BSSGP_template tmp_498;
tmp_498 = Osmocom__Gb__Types::ts__BSSGP__CAUSE(Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE));
tmp_498.check_restriction(TR_VALUE);
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__Error__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), tmp_498, BSSGP__Types::RIM__Protocol__Version__Number_template(OMIT_VALUE), Osmocom__Gb__Types::ts__BVC__UNBLOCK(INTEGER_template(23)).valueof(), Osmocom__Gb__Types::ts__RAN__Information__Error__RIM__Container_son__app__id_defval);
}
current_location.update_lineno(3324);
/* GBProxy_Tests.ttcn, line 3324 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__Error__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::ts__BSSGP__CAUSE(Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE)), BSSGP__Types::RIM__Protocol__Version__Number_template(OMIT_VALUE), OCTETSTRING_template(BSSGP__Types::enc__PDU__BSSGP(Osmocom__Gb__Types::tr__BVC__UNBLOCK(INTEGER_template(23)).valueof())), Osmocom__Gb__Types::tr__RAN__Information__Error__RIM__Container_son__app__id_defval);
current_location.update_lineno(3328);
/* GBProxy_Tests.ttcn, line 3328 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_500;
tmp_500 = ra__sgsn;
tmp_500.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_501;
tmp_501 = ra__pcu;
tmp_501.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__ERROR(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_500), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_501), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__ERROR(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
current_location.update_lineno(3336);
/* GBProxy_Tests.ttcn, line 3336 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_502;
tmp_502 = ra__pcu;
tmp_502.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_503;
tmp_503 = ra__sgsn;
tmp_503.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__ERROR(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_502), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_503), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__ERROR(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
}

void start_f__TC__rim__info__error(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_error(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info_error", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info__error(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3344, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info_error");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info_error", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3346);
/* GBProxy_Tests.ttcn, line 3346 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3347);
/* GBProxy_Tests.ttcn, line 3347 */
f__global__init();
current_location.update_lineno(3348);
/* GBProxy_Tests.ttcn, line 3348 */
f__rim__iterator(&f__TC__rim__info__error);
current_location.update_lineno(3349);
/* GBProxy_Tests.ttcn, line 3349 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info_error was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__info__app__error(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3354, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info_app_error");
current_location.update_lineno(3357);
/* GBProxy_Tests.ttcn, line 3357 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3358);
/* GBProxy_Tests.ttcn, line 3358 */
BSSGP__Types::Application__Error__Container_template app__cont__tx;
current_location.update_lineno(3359);
/* GBProxy_Tests.ttcn, line 3359 */
BSSGP__Types::Application__Error__Container_template app__cont__rx;
current_location.update_lineno(3360);
/* GBProxy_Tests.ttcn, line 3360 */
BSSGP__Types::RAN__Information__Application__Error__RIM__Container_template cont__tx;
current_location.update_lineno(3361);
/* GBProxy_Tests.ttcn, line 3361 */
BSSGP__Types::RAN__Information__Application__Error__RIM__Container_template cont__rx;
current_location.update_lineno(3362);
/* GBProxy_Tests.ttcn, line 3362 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3363);
/* GBProxy_Tests.ttcn, line 3363 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3365);
/* GBProxy_Tests.ttcn, line 3365 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3366);
/* GBProxy_Tests.ttcn, line 3366 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn));
current_location.update_lineno(3368);
/* GBProxy_Tests.ttcn, line 3368 */
app__cont__tx = Osmocom__Gb__Types::tsu__Application__Error__Container__NACC(Osmocom__Gb__Types::BssgpCellId_template(cell__id), 23, Osmocom__Gb__Types::tsu__Application__Container__IE__NACC__req(Osmocom__Gb__Types::BssgpCellId_template(cell__id)));
current_location.update_lineno(3371);
/* GBProxy_Tests.ttcn, line 3371 */
app__cont__rx = Osmocom__Gb__Types::rsu__Application__Error__Container__NACC(Osmocom__Gb__Types::BssgpCellId_template(cell__id), INTEGER_template(23), Osmocom__Gb__Types::rsu__Application__Container__IE__NACC__req(Osmocom__Gb__Types::BssgpCellId_template(cell__id)));
current_location.update_lineno(3374);
/* GBProxy_Tests.ttcn, line 3374 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__Application__Error__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RIM__PDU__Indications(FALSE, Osmocom__Gb__Types::RIM__PDU__TYPE__STOP), BSSGP__Types::RIM__Protocol__Version__Number_template(OMIT_VALUE), app__cont__tx, Osmocom__Gb__Types::ts__RAN__Information__Application__Error__RIM__Container_son__app__id_defval);
current_location.update_lineno(3378);
/* GBProxy_Tests.ttcn, line 3378 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__Application__Error__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RIM__PDU__Indications(BOOLEAN_template(FALSE), BITSTRING_template(Osmocom__Gb__Types::RIM__PDU__TYPE__STOP)), BSSGP__Types::RIM__Protocol__Version__Number_template(OMIT_VALUE), app__cont__rx, Osmocom__Gb__Types::tr__RAN__Information__Application__Error__RIM__Container_son__app__id_defval);
current_location.update_lineno(3383);
/* GBProxy_Tests.ttcn, line 3383 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_510;
tmp_510 = ra__sgsn;
tmp_510.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_511;
tmp_511 = ra__pcu;
tmp_511.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__APPLICATION__ERROR(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_510), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_511), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__APPLICATION__ERROR(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
current_location.update_lineno(3391);
/* GBProxy_Tests.ttcn, line 3391 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_512;
tmp_512 = ra__pcu;
tmp_512.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_513;
tmp_513 = ra__sgsn;
tmp_513.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION__APPLICATION__ERROR(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_512), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_513), cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION__APPLICATION__ERROR(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
}

void start_f__TC__rim__info__app__error(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_app_error(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info_app_error", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info__app__error(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3399, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info_app_error");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info_app_error", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3401);
/* GBProxy_Tests.ttcn, line 3401 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3402);
/* GBProxy_Tests.ttcn, line 3402 */
f__global__init();
current_location.update_lineno(3403);
/* GBProxy_Tests.ttcn, line 3403 */
f__rim__iterator(&f__TC__rim__info__app__error);
current_location.update_lineno(3404);
/* GBProxy_Tests.ttcn, line 3404 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info_app_error was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__info__pcu2pcu(const INTEGER& src__pcu__idx, const INTEGER& src__bvc__idx, const INTEGER& dst__pcu__idx, const INTEGER& dst__bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3408, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_info_pcu2pcu");
current_location.update_lineno(3412);
/* GBProxy_Tests.ttcn, line 3412 */
Osmocom__Gb__Types::BssgpCellId cell__id__src(const_cast< const GbInstances&>(test__CT_component_g__pcu)[src__pcu__idx].cfg().bvc()[src__bvc__idx].cell__id());
current_location.update_lineno(3413);
/* GBProxy_Tests.ttcn, line 3413 */
Osmocom__Gb__Types::BssgpCellId cell__id__dst(const_cast< const GbInstances&>(test__CT_component_g__pcu)[dst__pcu__idx].cfg().bvc()[dst__bvc__idx].cell__id());
current_location.update_lineno(3414);
/* GBProxy_Tests.ttcn, line 3414 */
BSSGP__Types::RIM__Routing__Information_template ri__pcu__src__tx;
current_location.update_lineno(3415);
/* GBProxy_Tests.ttcn, line 3415 */
BSSGP__Types::RIM__Routing__Information_template ri__pcu__dst__tx;
current_location.update_lineno(3416);
/* GBProxy_Tests.ttcn, line 3416 */
BSSGP__Types::RIM__Routing__Information_template ri__pcu__src__rx;
current_location.update_lineno(3417);
/* GBProxy_Tests.ttcn, line 3417 */
BSSGP__Types::RIM__Routing__Information_template ri__pcu__dst__rx;
current_location.update_lineno(3418);
/* GBProxy_Tests.ttcn, line 3418 */
BSSGP__Types::RAN__Information__RIM__Container_template cont__tx;
current_location.update_lineno(3419);
/* GBProxy_Tests.ttcn, line 3419 */
BSSGP__Types::RAN__Information__RIM__Container_template cont__rx;
current_location.update_lineno(3421);
/* GBProxy_Tests.ttcn, line 3421 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Testing RIM PCU2PCU from PCU[");
src__pcu__idx.log();
TTCN_Logger::log_event_str("][");
src__bvc__idx.log();
TTCN_Logger::log_event_str("] to PCU[");
dst__pcu__idx.log();
TTCN_Logger::log_event_str("][");
dst__bvc__idx.log();
TTCN_Logger::log_char(']');
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(3424);
/* GBProxy_Tests.ttcn, line 3424 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_515;
tmp_515 = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__src));
tmp_515.check_restriction(TR_VALUE);
ri__pcu__src__tx = Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_515);
}
current_location.update_lineno(3426);
/* GBProxy_Tests.ttcn, line 3426 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_517;
tmp_517 = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__dst));
tmp_517.check_restriction(TR_VALUE);
ri__pcu__dst__tx = Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_517);
}
current_location.update_lineno(3428);
/* GBProxy_Tests.ttcn, line 3428 */
ri__pcu__src__rx = Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__src)));
current_location.update_lineno(3430);
/* GBProxy_Tests.ttcn, line 3430 */
ri__pcu__dst__rx = Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__dst)));
current_location.update_lineno(3433);
/* GBProxy_Tests.ttcn, line 3433 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RIM__PDU__Indications(FALSE, Osmocom__Gb__Types::RIM__PDU__TYPE__STOP), Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_ver_defval, Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_app__cont__or__app__err_defval, Osmocom__Gb__Types::ts__RAN__Information__RIM__Container_son__app__id_defval);
current_location.update_lineno(3436);
/* GBProxy_Tests.ttcn, line 3436 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RIM__PDU__Indications(BOOLEAN_template(FALSE), BITSTRING_template(Osmocom__Gb__Types::RIM__PDU__TYPE__STOP)), Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_ver_defval, Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_app__cont__or__app__err_defval, Osmocom__Gb__Types::tr__RAN__Information__RIM__Container_son__app__id_defval);
current_location.update_lineno(3440);
/* GBProxy_Tests.ttcn, line 3440 */
f__rim__pcu2pcu(Osmocom__Gb__Types::ts__PDU__BSSGP__RAN__INFORMATION(ri__pcu__dst__tx, ri__pcu__src__tx, cont__tx), Osmocom__Gb__Types::tr__PDU__BSSGP__RAN__INFORMATION(ri__pcu__dst__rx, ri__pcu__src__rx, cont__rx), src__pcu__idx, dst__pcu__idx);
}

void start_f__TC__rim__info__pcu2pcu(const COMPONENT& component_reference, const INTEGER& src__pcu__idx, const INTEGER& src__bvc__idx, const INTEGER& dst__pcu__idx, const INTEGER& dst__bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_pcu2pcu(");
src__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
src__bvc__idx.log();
TTCN_Logger::log_event_str(", ");
dst__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
dst__bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_info_pcu2pcu", text_buf);
src__pcu__idx.encode_text(text_buf);
src__bvc__idx.encode_text(text_buf);
dst__pcu__idx.encode_text(text_buf);
dst__bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__info__pcu2pcu(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3444, TTCN_Location::LOCATION_TESTCASE, "TC_rim_info_pcu2pcu");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_info_pcu2pcu", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3446);
/* GBProxy_Tests.ttcn, line 3446 */
INTEGER src__pcu__idx;
current_location.update_lineno(3446);
/* GBProxy_Tests.ttcn, line 3446 */
INTEGER dst__pcu__idx;
current_location.update_lineno(3447);
/* GBProxy_Tests.ttcn, line 3447 */
INTEGER src__bvc__idx;
current_location.update_lineno(3447);
/* GBProxy_Tests.ttcn, line 3447 */
INTEGER dst__bvc__idx;
current_location.update_lineno(3448);
/* GBProxy_Tests.ttcn, line 3448 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3449);
/* GBProxy_Tests.ttcn, line 3449 */
f__global__init();
current_location.update_lineno(3451);
/* GBProxy_Tests.ttcn, line 3451 */
src__pcu__idx = 0;
current_location.update_lineno(3451);
/* GBProxy_Tests.ttcn, line 3451 */
for ( ; ; ) {
current_location.update_lineno(3451);
/* GBProxy_Tests.ttcn, line 3451 */
if (!(src__pcu__idx < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(3452);
/* GBProxy_Tests.ttcn, line 3452 */
src__bvc__idx = 0;
current_location.update_lineno(3452);
/* GBProxy_Tests.ttcn, line 3452 */
for ( ; ; ) {
current_location.update_lineno(3452);
/* GBProxy_Tests.ttcn, line 3452 */
if (!(src__bvc__idx < const_cast< const GbInstances&>(test__CT_component_g__pcu)[src__pcu__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(3453);
/* GBProxy_Tests.ttcn, line 3453 */
dst__pcu__idx = 0;
current_location.update_lineno(3453);
/* GBProxy_Tests.ttcn, line 3453 */
for ( ; ; ) {
current_location.update_lineno(3453);
/* GBProxy_Tests.ttcn, line 3453 */
if (!(dst__pcu__idx < test__CT_component_g__pcu.lengthof())) break;
{
current_location.update_lineno(3454);
/* GBProxy_Tests.ttcn, line 3454 */
if ((dst__pcu__idx == src__pcu__idx)) {
current_location.update_lineno(3455);
/* GBProxy_Tests.ttcn, line 3455 */
goto tmp_525;
}
current_location.update_lineno(3458);
/* GBProxy_Tests.ttcn, line 3458 */
dst__bvc__idx = 0;
current_location.update_lineno(3458);
/* GBProxy_Tests.ttcn, line 3458 */
for ( ; ; ) {
current_location.update_lineno(3458);
/* GBProxy_Tests.ttcn, line 3458 */
if (!(dst__bvc__idx < const_cast< const GbInstances&>(test__CT_component_g__pcu)[dst__pcu__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(3460);
/* GBProxy_Tests.ttcn, line 3460 */
f__TC__rim__info__pcu2pcu(src__pcu__idx, src__bvc__idx, dst__pcu__idx, dst__bvc__idx);
current_location.update_lineno(3459);
/* GBProxy_Tests.ttcn, line 3459 */
{
INTEGER tmp_527;
++dst__bvc__idx;
}
}
}
tmp_525:
current_location.update_lineno(3453);
/* GBProxy_Tests.ttcn, line 3453 */
{
INTEGER tmp_528;
++dst__pcu__idx;
}
}
current_location.update_lineno(3452);
/* GBProxy_Tests.ttcn, line 3452 */
{
INTEGER tmp_529;
++src__bvc__idx;
}
}
current_location.update_lineno(3451);
/* GBProxy_Tests.ttcn, line 3451 */
{
INTEGER tmp_530;
++src__pcu__idx;
}
}
current_location.update_lineno(3466);
/* GBProxy_Tests.ttcn, line 3466 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_info_pcu2pcu was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rim__from__eutran(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3471, TTCN_Location::LOCATION_FUNCTION, "f_TC_rim_from_eutran");
current_location.update_lineno(3474);
/* GBProxy_Tests.ttcn, line 3474 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3475);
/* GBProxy_Tests.ttcn, line 3475 */
BSSGP__Types::RAN__Information__Request__RIM__Container_template cont__tx;
current_location.update_lineno(3476);
/* GBProxy_Tests.ttcn, line 3476 */
BSSGP__Types::RAN__Information__Request__RIM__Container_template cont__rx;
current_location.update_lineno(3477);
/* GBProxy_Tests.ttcn, line 3477 */
BSSGP__Types::RIM__Routing__Address_template ra__pcu;
current_location.update_lineno(3478);
/* GBProxy_Tests.ttcn, line 3478 */
BSSGP__Types::RIM__Routing__Address_template ra__sgsn;
current_location.update_lineno(3480);
/* GBProxy_Tests.ttcn, line 3480 */
ra__pcu = Osmocom__Gb__Types::t__RIM__Routing__Address__cid(Osmocom__Gb__Types::BssgpCellId_template(cell__id));
current_location.update_lineno(3481);
/* GBProxy_Tests.ttcn, line 3481 */
ra__sgsn = Osmocom__Gb__Types::t__RIM__Routing__Address__enbid(Osmocom__Gb__Types::BssgpCellId_template(cell__id__sgsn), INTEGER_template(3), OCTETSTRING_template(os_6));
current_location.update_lineno(3483);
/* GBProxy_Tests.ttcn, line 3483 */
cont__tx = Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container(Osmocom__Gb__Types::ts__RIM__Application__Identity(Osmocom__Gb__Types::RIM__APP__ID__NACC), Osmocom__Gb__Types::ts__RIM__Sequence__Number(0), Osmocom__Gb__Types::ts__RIM__PDU__Indications(FALSE, Osmocom__Gb__Types::RIM__PDU__TYPE__STOP), Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_ver_defval, Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_app__cont_defval, Osmocom__Gb__Types::ts__RAN__Information__Request__RIM__Container_son__app__id_defval);
current_location.update_lineno(3486);
/* GBProxy_Tests.ttcn, line 3486 */
cont__rx = Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container(Osmocom__Gb__Types::tr__RIM__Application__Identity(OCTETSTRING_template(Osmocom__Gb__Types::RIM__APP__ID__NACC)), Osmocom__Gb__Types::tr__RIM__Sequence__Number(INTEGER_template(0)), Osmocom__Gb__Types::tr__RIM__PDU__Indications(BOOLEAN_template(FALSE), BITSTRING_template(Osmocom__Gb__Types::RIM__PDU__TYPE__STOP)), Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_ver_defval, Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_app__cont_defval, Osmocom__Gb__Types::tr__RAN__Information__Request__RIM__Container_son__app__id_defval);
current_location.update_lineno(3490);
/* GBProxy_Tests.ttcn, line 3490 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_535;
tmp_535 = ra__pcu;
tmp_535.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_536;
tmp_536 = ra__sgsn;
tmp_536.check_restriction(TR_VALUE);
f__rim__sgsn2pcu(Osmocom__Gb__Types::ts__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_535), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__EUTRAN__NODEB__ID, tmp_536), cont__tx), Osmocom__Gb__Types::tr__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__EUTRAN__NODEB__ID), ra__sgsn), cont__rx), sgsn__idx, pcu__idx);
}
current_location.update_lineno(3499);
/* GBProxy_Tests.ttcn, line 3499 */
{
BSSGP__Types::RIM__Routing__Address_template tmp_537;
tmp_537 = ra__sgsn;
tmp_537.check_restriction(TR_VALUE);
BSSGP__Types::RIM__Routing__Address_template tmp_538;
tmp_538 = ra__pcu;
tmp_538.check_restriction(TR_VALUE);
f__rim__pcu2sgsn(Osmocom__Gb__Types::ts__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__EUTRAN__NODEB__ID, tmp_537), Osmocom__Gb__Types::ts__RIM__Routing__Information(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID, tmp_538), cont__tx), Osmocom__Gb__Types::tr__RAN__INFORMATION__REQUEST(Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__EUTRAN__NODEB__ID), ra__sgsn), Osmocom__Gb__Types::tr__RIM__Routing__Information(HEXSTRING_template(Osmocom__Gb__Types::RIM__ADDR__GERAN__CELL__ID), ra__pcu), cont__rx), pcu__idx);
}
}

void start_f__TC__rim__from__eutran(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const INTEGER& bvc__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_from_eutran(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_rim_from_eutran", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
bvc__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rim__from__eutran(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3507, TTCN_Location::LOCATION_TESTCASE, "TC_rim_from_eutran");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_rim_from_eutran", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3509);
/* GBProxy_Tests.ttcn, line 3509 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3510);
/* GBProxy_Tests.ttcn, line 3510 */
f__global__init();
current_location.update_lineno(3511);
/* GBProxy_Tests.ttcn, line 3511 */
f__rim__iterator(&f__TC__rim__from__eutran);
current_location.update_lineno(3512);
/* GBProxy_Tests.ttcn, line 3512 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rim_from_eutran was stopped.");
}
return TTCN_Runtime::end_testcase();
}

OCTETSTRING f__gen__tmsi__for__sgsn__nri(const INTEGER& sgsn__idx, const INTEGER& nri__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3522, TTCN_Location::LOCATION_FUNCTION, "f_gen_tmsi_for_sgsn_nri");
current_location.update_lineno(3524);
/* GBProxy_Tests.ttcn, line 3524 */
INTEGER nri(const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx][nri__idx]);
current_location.update_lineno(3525);
/* GBProxy_Tests.ttcn, line 3525 */
return Osmocom__Types::f__gen__tmsi(0, nri, mp__nri__bitlength, Osmocom__Types::f__gen__tmsi_base__tmsi_defval);
}

void start_f__gen__tmsi__for__sgsn__nri(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_gen_tmsi_for_sgsn_nri(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_gen_tmsi_for_sgsn_nri", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

OCTETSTRING f__gen__tlli__for__sgsn__nri(const INTEGER& sgsn__idx, const INTEGER& nri__idx)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3529, TTCN_Location::LOCATION_FUNCTION, "f_gen_tlli_for_sgsn_nri");
current_location.update_lineno(3531);
/* GBProxy_Tests.ttcn, line 3531 */
OCTETSTRING p__tmsi(f__gen__tmsi__for__sgsn__nri(sgsn__idx, nri__idx));
current_location.update_lineno(3532);
/* GBProxy_Tests.ttcn, line 3532 */
return Osmocom__Gb__Types::f__gprs__tlli__from__tmsi(p__tmsi, Osmocom__Gb__Types::TlliType::TLLI__LOCAL);
}

void start_f__gen__tlli__for__sgsn__nri(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& nri__idx)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_gen_tlli_for_sgsn_nri(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_gen_tlli_for_sgsn_nri", text_buf);
sgsn__idx.encode_text(text_buf);
nri__idx.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__status__ul(const INTEGER& pcu__idx, const INTEGER& sgsn__idx, const BSSGP__Types::PDU__BSSGP& inner)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3536, TTCN_Location::LOCATION_FUNCTION, "f_TC_status_ul");
current_location.update_lineno(3539);
/* GBProxy_Tests.ttcn, line 3539 */
BSSGP__Types::PDU__BSSGP_template tx(Osmocom__Gb__Types::ts__BSSGP__STATUS(INTEGER_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE), inner));
current_location.update_lineno(3540);
/* GBProxy_Tests.ttcn, line 3540 */
BSSGP__Types::PDU__BSSGP_template exp__rx(Osmocom__Gb__Types::tr__BSSGP__STATUS(INTEGER_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE), const_cast< const BSSGP__Types::PDU__BSSGP_template&>(tx).pDU__BSSGP__STATUS().pDU__in__Error().erroneous__BSSGP__PDU()));
current_location.update_lineno(3544);
/* GBProxy_Tests.ttcn, line 3544 */
f__global__pcu2sgsn(tx, exp__rx, pcu__idx, sgsn__idx);
}

void start_f__TC__status__ul(const COMPONENT& component_reference, const INTEGER& pcu__idx, const INTEGER& sgsn__idx, const BSSGP__Types::PDU__BSSGP& inner)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_status_ul(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
inner.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_status_ul", text_buf);
pcu__idx.encode_text(text_buf);
sgsn__idx.encode_text(text_buf);
inner.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__status__dl(const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP& inner)
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3548, TTCN_Location::LOCATION_FUNCTION, "f_TC_status_dl");
current_location.update_lineno(3551);
/* GBProxy_Tests.ttcn, line 3551 */
BSSGP__Types::PDU__BSSGP_template tx(Osmocom__Gb__Types::ts__BSSGP__STATUS(INTEGER_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE), inner));
current_location.update_lineno(3552);
/* GBProxy_Tests.ttcn, line 3552 */
BSSGP__Types::PDU__BSSGP_template exp__rx(Osmocom__Gb__Types::tr__BSSGP__STATUS(INTEGER_template(OMIT_VALUE), Osmocom__Gb__Types::BssgpCause_template(Osmocom__Gb__Types::BssgpCause::BSSGP__CAUSE__EQUIMENT__FAILURE), const_cast< const BSSGP__Types::PDU__BSSGP_template&>(tx).pDU__BSSGP__STATUS().pDU__in__Error().erroneous__BSSGP__PDU()));
current_location.update_lineno(3556);
/* GBProxy_Tests.ttcn, line 3556 */
f__global__sgsn2pcu(tx, exp__rx, sgsn__idx, pcu__idx);
}

void start_f__TC__status__dl(const COMPONENT& component_reference, const INTEGER& sgsn__idx, const INTEGER& pcu__idx, const BSSGP__Types::PDU__BSSGP& inner)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_status_dl(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
inner.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "GBProxy_Tests", "f_TC_status_dl", text_buf);
sgsn__idx.encode_text(text_buf);
pcu__idx.encode_text(text_buf);
inner.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__status__sig__ul__tlli(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3560, TTCN_Location::LOCATION_TESTCASE, "TC_status_sig_ul_tlli");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_sig_ul_tlli", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3562);
/* GBProxy_Tests.ttcn, line 3562 */
INTEGER sgsn__idx;
current_location.update_lineno(3562);
/* GBProxy_Tests.ttcn, line 3562 */
INTEGER nri__idx;
current_location.update_lineno(3564);
/* GBProxy_Tests.ttcn, line 3564 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3565);
/* GBProxy_Tests.ttcn, line 3565 */
f__global__init();
current_location.update_lineno(3567);
/* GBProxy_Tests.ttcn, line 3567 */
sgsn__idx = 0;
current_location.update_lineno(3567);
/* GBProxy_Tests.ttcn, line 3567 */
for ( ; ; ) {
current_location.update_lineno(3567);
/* GBProxy_Tests.ttcn, line 3567 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3568);
/* GBProxy_Tests.ttcn, line 3568 */
nri__idx = 0;
current_location.update_lineno(3568);
/* GBProxy_Tests.ttcn, line 3568 */
for ( ; ; ) {
current_location.update_lineno(3568);
/* GBProxy_Tests.ttcn, line 3568 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(3570);
/* GBProxy_Tests.ttcn, line 3570 */
OCTETSTRING tlli(f__gen__tlli__for__sgsn__nri(sgsn__idx, nri__idx));
current_location.update_lineno(3571);
/* GBProxy_Tests.ttcn, line 3571 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL(tlli, INTEGER_template(2342), Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL_bvci__new_defval, Osmocom__Gb__Types::ts__BSSGP__FLUSH__LL_nsei_defval).valueof());
current_location.update_lineno(3573);
/* GBProxy_Tests.ttcn, line 3573 */
f__TC__status__ul(0, sgsn__idx, inner);
current_location.update_lineno(3568);
/* GBProxy_Tests.ttcn, line 3568 */
{
INTEGER tmp_541;
++nri__idx;
}
}
current_location.update_lineno(3567);
/* GBProxy_Tests.ttcn, line 3567 */
{
INTEGER tmp_542;
++sgsn__idx;
}
}
current_location.update_lineno(3577);
/* GBProxy_Tests.ttcn, line 3577 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_sig_ul_tlli was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__status__sig__ul__tmsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3581, TTCN_Location::LOCATION_TESTCASE, "TC_status_sig_ul_tmsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_sig_ul_tmsi", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3583);
/* GBProxy_Tests.ttcn, line 3583 */
INTEGER sgsn__idx;
current_location.update_lineno(3583);
/* GBProxy_Tests.ttcn, line 3583 */
INTEGER nri__idx;
current_location.update_lineno(3585);
/* GBProxy_Tests.ttcn, line 3585 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3586);
/* GBProxy_Tests.ttcn, line 3586 */
f__global__init();
current_location.update_lineno(3588);
/* GBProxy_Tests.ttcn, line 3588 */
sgsn__idx = 0;
current_location.update_lineno(3588);
/* GBProxy_Tests.ttcn, line 3588 */
for ( ; ; ) {
current_location.update_lineno(3588);
/* GBProxy_Tests.ttcn, line 3588 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3589);
/* GBProxy_Tests.ttcn, line 3589 */
nri__idx = 0;
current_location.update_lineno(3589);
/* GBProxy_Tests.ttcn, line 3589 */
for ( ; ; ) {
current_location.update_lineno(3589);
/* GBProxy_Tests.ttcn, line 3589 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(3591);
/* GBProxy_Tests.ttcn, line 3591 */
HEXSTRING imsi(hs_2);
current_location.update_lineno(3592);
/* GBProxy_Tests.ttcn, line 3592 */
OCTETSTRING tmsi(f__gen__tmsi__for__sgsn__nri(sgsn__idx, nri__idx));
current_location.update_lineno(3593);
/* GBProxy_Tests.ttcn, line 3593 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[0].bvci());
current_location.update_lineno(3594);
/* GBProxy_Tests.ttcn, line 3594 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__CS__PAGING__PTMSI(bvci, hs_2, oct2int(tmsi)).valueof());
current_location.update_lineno(3595);
/* GBProxy_Tests.ttcn, line 3595 */
f__TC__status__ul(0, sgsn__idx, inner);
current_location.update_lineno(3589);
/* GBProxy_Tests.ttcn, line 3589 */
{
INTEGER tmp_545;
++nri__idx;
}
}
current_location.update_lineno(3588);
/* GBProxy_Tests.ttcn, line 3588 */
{
INTEGER tmp_546;
++sgsn__idx;
}
}
current_location.update_lineno(3599);
/* GBProxy_Tests.ttcn, line 3599 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_sig_ul_tmsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__status__ptp__ul__tlli(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3604, TTCN_Location::LOCATION_TESTCASE, "TC_status_ptp_ul_tlli");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_ptp_ul_tlli", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3606);
/* GBProxy_Tests.ttcn, line 3606 */
INTEGER sgsn__idx;
current_location.update_lineno(3606);
/* GBProxy_Tests.ttcn, line 3606 */
INTEGER nri__idx;
current_location.update_lineno(3608);
/* GBProxy_Tests.ttcn, line 3608 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3609);
/* GBProxy_Tests.ttcn, line 3609 */
f__global__init__ptp();
current_location.update_lineno(3611);
/* GBProxy_Tests.ttcn, line 3611 */
sgsn__idx = 0;
current_location.update_lineno(3611);
/* GBProxy_Tests.ttcn, line 3611 */
for ( ; ; ) {
current_location.update_lineno(3611);
/* GBProxy_Tests.ttcn, line 3611 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3612);
/* GBProxy_Tests.ttcn, line 3612 */
nri__idx = 0;
current_location.update_lineno(3612);
/* GBProxy_Tests.ttcn, line 3612 */
for ( ; ; ) {
current_location.update_lineno(3612);
/* GBProxy_Tests.ttcn, line 3612 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(3614);
/* GBProxy_Tests.ttcn, line 3614 */
OCTETSTRING tlli(f__gen__tlli__for__sgsn__nri(sgsn__idx, nri__idx));
current_location.update_lineno(3615);
/* GBProxy_Tests.ttcn, line 3615 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__DL__UD(tlli, os_7, Osmocom__Gb__Types::ts__BSSGP__DL__UD_racap_defval, Osmocom__Gb__Types::ts__BSSGP__DL__UD_imsi_defval).valueof());
current_location.update_lineno(3617);
/* GBProxy_Tests.ttcn, line 3617 */
f__TC__status__ul(0, sgsn__idx, inner);
current_location.update_lineno(3612);
/* GBProxy_Tests.ttcn, line 3612 */
{
INTEGER tmp_549;
++nri__idx;
}
}
current_location.update_lineno(3611);
/* GBProxy_Tests.ttcn, line 3611 */
{
INTEGER tmp_550;
++sgsn__idx;
}
}
current_location.update_lineno(3621);
/* GBProxy_Tests.ttcn, line 3621 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_ptp_ul_tlli was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__status__ptp__ul__tmsi(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3625, TTCN_Location::LOCATION_TESTCASE, "TC_status_ptp_ul_tmsi");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_ptp_ul_tmsi", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3627);
/* GBProxy_Tests.ttcn, line 3627 */
INTEGER sgsn__idx;
current_location.update_lineno(3627);
/* GBProxy_Tests.ttcn, line 3627 */
INTEGER nri__idx;
current_location.update_lineno(3629);
/* GBProxy_Tests.ttcn, line 3629 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3630);
/* GBProxy_Tests.ttcn, line 3630 */
f__global__init__ptp();
current_location.update_lineno(3632);
/* GBProxy_Tests.ttcn, line 3632 */
sgsn__idx = 0;
current_location.update_lineno(3632);
/* GBProxy_Tests.ttcn, line 3632 */
for ( ; ; ) {
current_location.update_lineno(3632);
/* GBProxy_Tests.ttcn, line 3632 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3633);
/* GBProxy_Tests.ttcn, line 3633 */
nri__idx = 0;
current_location.update_lineno(3633);
/* GBProxy_Tests.ttcn, line 3633 */
for ( ; ; ) {
current_location.update_lineno(3633);
/* GBProxy_Tests.ttcn, line 3633 */
if (!(nri__idx < const_cast< const Osmocom__Types::roro__integer&>(mp__sgsn__nri)[sgsn__idx].lengthof())) break;
current_location.update_lineno(3635);
/* GBProxy_Tests.ttcn, line 3635 */
HEXSTRING imsi(hs_2);
current_location.update_lineno(3636);
/* GBProxy_Tests.ttcn, line 3636 */
OCTETSTRING tmsi(f__gen__tmsi__for__sgsn__nri(sgsn__idx, nri__idx));
current_location.update_lineno(3637);
/* GBProxy_Tests.ttcn, line 3637 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[0].cfg().bvc()[0].bvci());
current_location.update_lineno(3638);
/* GBProxy_Tests.ttcn, line 3638 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__CS__PAGING__PTMSI(bvci, hs_2, oct2int(tmsi)).valueof());
current_location.update_lineno(3639);
/* GBProxy_Tests.ttcn, line 3639 */
f__TC__status__ul(0, sgsn__idx, inner);
current_location.update_lineno(3633);
/* GBProxy_Tests.ttcn, line 3633 */
{
INTEGER tmp_553;
++nri__idx;
}
}
current_location.update_lineno(3632);
/* GBProxy_Tests.ttcn, line 3632 */
{
INTEGER tmp_554;
++sgsn__idx;
}
}
current_location.update_lineno(3643);
/* GBProxy_Tests.ttcn, line 3643 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_ptp_ul_tmsi was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__status__sig__dl__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3647, TTCN_Location::LOCATION_TESTCASE, "TC_status_sig_dl_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_sig_dl_bvci", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3649);
/* GBProxy_Tests.ttcn, line 3649 */
INTEGER sgsn__idx;
current_location.update_lineno(3649);
/* GBProxy_Tests.ttcn, line 3649 */
INTEGER pcu__idx;
current_location.update_lineno(3649);
/* GBProxy_Tests.ttcn, line 3649 */
INTEGER bvc__idx;
current_location.update_lineno(3651);
/* GBProxy_Tests.ttcn, line 3651 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3652);
/* GBProxy_Tests.ttcn, line 3652 */
f__global__init();
current_location.update_lineno(3655);
/* GBProxy_Tests.ttcn, line 3655 */
pcu__idx = 0;
current_location.update_lineno(3655);
/* GBProxy_Tests.ttcn, line 3655 */
for ( ; ; ) {
current_location.update_lineno(3655);
/* GBProxy_Tests.ttcn, line 3655 */
if (!(pcu__idx < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(3656);
/* GBProxy_Tests.ttcn, line 3656 */
bvc__idx = 0;
current_location.update_lineno(3656);
/* GBProxy_Tests.ttcn, line 3656 */
for ( ; ; ) {
current_location.update_lineno(3656);
/* GBProxy_Tests.ttcn, line 3656 */
if (!(bvc__idx < const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(3657);
/* GBProxy_Tests.ttcn, line 3657 */
sgsn__idx = 0;
current_location.update_lineno(3657);
/* GBProxy_Tests.ttcn, line 3657 */
for ( ; ; ) {
current_location.update_lineno(3657);
/* GBProxy_Tests.ttcn, line 3657 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3659);
/* GBProxy_Tests.ttcn, line 3659 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].bvci());
current_location.update_lineno(3660);
/* GBProxy_Tests.ttcn, line 3660 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__LLC__DISCARDED(os_8, INTEGER_template(1), INTEGER_template(bvci), INTEGER_template(23)).valueof());
current_location.update_lineno(3661);
/* GBProxy_Tests.ttcn, line 3661 */
f__TC__status__dl(sgsn__idx, pcu__idx, inner);
current_location.update_lineno(3657);
/* GBProxy_Tests.ttcn, line 3657 */
{
INTEGER tmp_558;
++sgsn__idx;
}
}
current_location.update_lineno(3656);
/* GBProxy_Tests.ttcn, line 3656 */
{
INTEGER tmp_559;
++bvc__idx;
}
}
current_location.update_lineno(3655);
/* GBProxy_Tests.ttcn, line 3655 */
{
INTEGER tmp_560;
++pcu__idx;
}
}
current_location.update_lineno(3666);
/* GBProxy_Tests.ttcn, line 3666 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_sig_dl_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__status__ptp__dl__bvci(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("GBProxy_Tests.ttcn", 3670, TTCN_Location::LOCATION_TESTCASE, "TC_status_ptp_dl_bvci");
try {
TTCN_Runtime::begin_testcase("GBProxy_Tests", "TC_status_ptp_dl_bvci", "GBProxy_Tests", "GlobalTest_CT", "GBProxy_Tests", "GlobalTest_CT", has_timer, timer_value);
current_location.update_lineno(3672);
/* GBProxy_Tests.ttcn, line 3672 */
INTEGER sgsn__idx;
current_location.update_lineno(3672);
/* GBProxy_Tests.ttcn, line 3672 */
INTEGER pcu__idx;
current_location.update_lineno(3672);
/* GBProxy_Tests.ttcn, line 3672 */
INTEGER bvc__idx;
current_location.update_lineno(3674);
/* GBProxy_Tests.ttcn, line 3674 */
f__init(f__init_t__guard_defval);
current_location.update_lineno(3675);
/* GBProxy_Tests.ttcn, line 3675 */
f__global__init__ptp();
current_location.update_lineno(3678);
/* GBProxy_Tests.ttcn, line 3678 */
pcu__idx = 0;
current_location.update_lineno(3678);
/* GBProxy_Tests.ttcn, line 3678 */
for ( ; ; ) {
current_location.update_lineno(3678);
/* GBProxy_Tests.ttcn, line 3678 */
if (!(pcu__idx < test__CT_component_g__pcu.lengthof())) break;
current_location.update_lineno(3679);
/* GBProxy_Tests.ttcn, line 3679 */
bvc__idx = 0;
current_location.update_lineno(3679);
/* GBProxy_Tests.ttcn, line 3679 */
for ( ; ; ) {
current_location.update_lineno(3679);
/* GBProxy_Tests.ttcn, line 3679 */
if (!(bvc__idx < const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc().lengthof())) break;
current_location.update_lineno(3680);
/* GBProxy_Tests.ttcn, line 3680 */
INTEGER bvci(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].bvci());
current_location.update_lineno(3681);
/* GBProxy_Tests.ttcn, line 3681 */
f__global__ptp__connect__pcu__bvci(pcu__idx, bvci);
current_location.update_lineno(3682);
/* GBProxy_Tests.ttcn, line 3682 */
sgsn__idx = 0;
current_location.update_lineno(3682);
/* GBProxy_Tests.ttcn, line 3682 */
for ( ; ; ) {
current_location.update_lineno(3682);
/* GBProxy_Tests.ttcn, line 3682 */
if (!(sgsn__idx < 2)) break;
current_location.update_lineno(3683);
/* GBProxy_Tests.ttcn, line 3683 */
f__global__ptp__connect__sgsn__bvci(sgsn__idx, bvci);
current_location.update_lineno(3686);
/* GBProxy_Tests.ttcn, line 3686 */
Osmocom__Gb__Types::BssgpCellId cell__id(const_cast< const GbInstances&>(test__CT_component_g__pcu)[pcu__idx].cfg().bvc()[bvc__idx].cell__id());
current_location.update_lineno(3687);
/* GBProxy_Tests.ttcn, line 3687 */
BSSGP__Types::PDU__BSSGP inner(Osmocom__Gb__Types::ts__BSSGP__UL__UD(os_8, cell__id, os_9).valueof());
current_location.update_lineno(3688);
/* GBProxy_Tests.ttcn, line 3688 */
f__TC__status__dl(sgsn__idx, pcu__idx, inner);
current_location.update_lineno(3682);
/* GBProxy_Tests.ttcn, line 3682 */
{
INTEGER tmp_564;
++sgsn__idx;
}
}
current_location.update_lineno(3679);
/* GBProxy_Tests.ttcn, line 3679 */
{
INTEGER tmp_565;
++bvc__idx;
}
}
current_location.update_lineno(3678);
/* GBProxy_Tests.ttcn, line 3678 */
{
INTEGER tmp_566;
++pcu__idx;
}
}
current_location.update_lineno(3693);
/* GBProxy_Tests.ttcn, line 3693 */
f__cleanup();
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_status_ptp_dl_bvci was stopped.");
}
return TTCN_Runtime::end_testcase();
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "GBProxy_Tests");
BSSGP__Emulation::module_object.pre_init_module();
SCCPasp__Types::module_object.pre_init_module();
L3__Templates::module_object.pre_init_module();
L3__Common::module_object.pre_init_module();
Osmocom__VTY__Functions::module_object.pre_init_module();
Osmocom__CTRL__Adapter::module_object.pre_init_module();
current_location.update_lineno(42);
/* GBProxy_Tests.ttcn, line 42 */
const_c__mcc__mnc = hs_0;
current_location.update_lineno(45);
/* GBProxy_Tests.ttcn, line 45 */
const_max__fr__info__size = 1600;
current_location.update_lineno(48);
/* GBProxy_Tests.ttcn, line 48 */
modulepar_mp__gbproxy__ip = cs_0;
module_object.add_modulepar("mp_gbproxy_ip");
current_location.update_lineno(49);
/* GBProxy_Tests.ttcn, line 49 */
modulepar_mp__gbproxy__ctrl__port = 4263;
module_object.add_modulepar("mp_gbproxy_ctrl_port");
current_location.update_lineno(51);
/* GBProxy_Tests.ttcn, line 51 */
modulepar_mp__nri__bitlength = 5;
module_object.add_modulepar("mp_nri_bitlength");
current_location.update_lineno(52);
/* GBProxy_Tests.ttcn, line 52 */
modulepar_mp__sgsn__nri.set_size(2);
{
Osmocom__Types::ro__integer& tmp_0 = modulepar_mp__sgsn__nri[0];
tmp_0.set_size(1);
tmp_0[0] = 3;
}
{
Osmocom__Types::ro__integer& tmp_1 = modulepar_mp__sgsn__nri[1];
tmp_1.set_size(1);
tmp_1[0] = 4;
}
module_object.add_modulepar("mp_sgsn_nri");
current_location.update_lineno(56);
/* GBProxy_Tests.ttcn, line 56 */
modulepar_mp__enable__bss__load__sharing = FALSE;
module_object.add_modulepar("mp_enable_bss_load_sharing");
current_location.update_lineno(58);
/* GBProxy_Tests.ttcn, line 58 */
modulepar_mp__nsconfig__sgsn.set_size(2);
{
NS__Emulation::NSConfiguration& tmp_2 = modulepar_mp__nsconfig__sgsn[0];
tmp_2.nsei() = 101;
tmp_2.role__sgsn() = TRUE;
tmp_2.handle__sns() = FALSE;
{
NS__Emulation::NSVCConfigurations& tmp_3 = tmp_2.nsvc();
tmp_3.set_size(2);
{
NS__Emulation::NSVCConfiguration& tmp_4 = tmp_3[0];
{
NS__Emulation::NSVCConfigurationIP& tmp_5 = tmp_4.provider().ip();
tmp_5.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_5.local__udp__port() = 7777;
tmp_5.local__ip() = cs_1;
tmp_5.remote__udp__port() = 23000;
tmp_5.remote__ip() = cs_0;
tmp_5.data__weight() = 0;
tmp_5.signalling__weight() = 1;
}
tmp_4.nsvci() = 101;
}
{
NS__Emulation::NSVCConfiguration& tmp_6 = tmp_3[1];
{
NS__Emulation::NSVCConfigurationIP& tmp_7 = tmp_6.provider().ip();
tmp_7.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_7.local__udp__port() = 7770;
tmp_7.local__ip() = cs_1;
tmp_7.remote__udp__port() = 23000;
tmp_7.remote__ip() = cs_0;
tmp_7.data__weight() = 1;
tmp_7.signalling__weight() = 0;
}
tmp_6.nsvci() = 201;
}
}
}
{
NS__Emulation::NSConfiguration& tmp_8 = modulepar_mp__nsconfig__sgsn[1];
tmp_8.nsei() = 102;
tmp_8.role__sgsn() = TRUE;
tmp_8.handle__sns() = FALSE;
{
NS__Emulation::NSVCConfigurations& tmp_9 = tmp_8.nsvc();
tmp_9.set_size(2);
{
NS__Emulation::NSVCConfiguration& tmp_10 = tmp_9[0];
{
NS__Emulation::NSVCConfigurationIP& tmp_11 = tmp_10.provider().ip();
tmp_11.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_11.local__udp__port() = 8888;
tmp_11.local__ip() = cs_2;
tmp_11.remote__udp__port() = 23000;
tmp_11.remote__ip() = cs_0;
tmp_11.data__weight() = 0;
tmp_11.signalling__weight() = 1;
}
tmp_10.nsvci() = 102;
}
{
NS__Emulation::NSVCConfiguration& tmp_12 = tmp_9[1];
{
NS__Emulation::NSVCConfigurationIP& tmp_13 = tmp_12.provider().ip();
tmp_13.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_13.local__udp__port() = 8880;
tmp_13.local__ip() = cs_2;
tmp_13.remote__udp__port() = 23000;
tmp_13.remote__ip() = cs_0;
tmp_13.data__weight() = 1;
tmp_13.signalling__weight() = 0;
}
tmp_12.nsvci() = 202;
}
}
}
module_object.add_modulepar("mp_nsconfig_sgsn");
current_location.update_lineno(131);
/* GBProxy_Tests.ttcn, line 131 */
modulepar_mp__nsconfig__pcu.set_size(3);
{
NS__Emulation::NSConfiguration& tmp_14 = modulepar_mp__nsconfig__pcu[0];
tmp_14.nsei() = 2001;
tmp_14.role__sgsn() = FALSE;
tmp_14.handle__sns() = TRUE;
{
NS__Emulation::NSVCConfigurations& tmp_15 = tmp_14.nsvc();
tmp_15.set_size(1);
{
NS__Emulation::NSVCConfiguration& tmp_16 = tmp_15[0];
{
NS__Emulation::NSVCConfigurationIP& tmp_17 = tmp_16.provider().ip();
tmp_17.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_17.local__udp__port() = 21010;
tmp_17.local__ip() = cs_3;
tmp_17.remote__udp__port() = 23000;
tmp_17.remote__ip() = cs_4;
tmp_17.data__weight() = 1;
tmp_17.signalling__weight() = 1;
}
tmp_16.nsvci() = 2101;
}
}
}
{
NS__Emulation::NSConfiguration& tmp_18 = modulepar_mp__nsconfig__pcu[1];
tmp_18.nsei() = 2002;
tmp_18.role__sgsn() = FALSE;
tmp_18.handle__sns() = TRUE;
{
NS__Emulation::NSVCConfigurations& tmp_19 = tmp_18.nsvc();
tmp_19.set_size(1);
{
NS__Emulation::NSVCConfiguration& tmp_20 = tmp_19[0];
{
NS__Emulation::NSVCConfigurationIP& tmp_21 = tmp_20.provider().ip();
tmp_21.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_21.local__udp__port() = 21020;
tmp_21.local__ip() = cs_5;
tmp_21.remote__udp__port() = 23000;
tmp_21.remote__ip() = cs_4;
tmp_21.data__weight() = 1;
tmp_21.signalling__weight() = 1;
}
tmp_20.nsvci() = 2102;
}
}
}
{
NS__Emulation::NSConfiguration& tmp_22 = modulepar_mp__nsconfig__pcu[2];
tmp_22.nsei() = 2003;
tmp_22.role__sgsn() = FALSE;
tmp_22.handle__sns() = TRUE;
{
NS__Emulation::NSVCConfigurations& tmp_23 = tmp_22.nsvc();
tmp_23.set_size(1);
{
NS__Emulation::NSVCConfiguration& tmp_24 = tmp_23[0];
{
NS__Emulation::NSVCConfigurationIP& tmp_25 = tmp_24.provider().ip();
tmp_25.address__family() = Osmocom__Types::AddressFamily::AF__INET;
tmp_25.local__udp__port() = 21030;
tmp_25.local__ip() = cs_6;
tmp_25.remote__udp__port() = 23000;
tmp_25.remote__ip() = cs_4;
tmp_25.data__weight() = 1;
tmp_25.signalling__weight() = 1;
}
tmp_24.nsvci() = 2103;
}
}
}
module_object.add_modulepar("mp_nsconfig_pcu");
current_location.update_lineno(205);
/* GBProxy_Tests.ttcn, line 205 */
modulepar_mp__gbconfigs.set_size(3);
{
BSSGP__Emulation::BssgpConfig& tmp_26 = modulepar_mp__gbconfigs[0];
tmp_26.nsei() = 2001;
tmp_26.sgsn__role() = FALSE;
{
BSSGP__Emulation::BssgpBvcConfigs& tmp_27 = tmp_26.bvc();
tmp_27.set_size(1);
{
BSSGP__Emulation::BssgpBvcConfig& tmp_28 = tmp_27[0];
tmp_28.bvci() = 20011;
{
Osmocom__Gb__Types::BssgpCellId& tmp_29 = tmp_28.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_30 = tmp_29.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_31 = tmp_30.lai();
tmp_31.mcc__mnc() = hs_0;
tmp_31.lac() = 13135;
}
tmp_30.rac() = 0;
}
tmp_29.cell__id() = 30011;
}
tmp_28.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_28.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
}
}
{
BSSGP__Emulation::BssgpConfig& tmp_32 = modulepar_mp__gbconfigs[1];
tmp_32.nsei() = 2002;
tmp_32.sgsn__role() = FALSE;
{
BSSGP__Emulation::BssgpBvcConfigs& tmp_33 = tmp_32.bvc();
tmp_33.set_size(2);
{
BSSGP__Emulation::BssgpBvcConfig& tmp_34 = tmp_33[0];
tmp_34.bvci() = 20021;
{
Osmocom__Gb__Types::BssgpCellId& tmp_35 = tmp_34.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_36 = tmp_35.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_37 = tmp_36.lai();
tmp_37.mcc__mnc() = hs_0;
tmp_37.lac() = 13135;
}
tmp_36.rac() = 1;
}
tmp_35.cell__id() = 30021;
}
tmp_34.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_34.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
{
BSSGP__Emulation::BssgpBvcConfig& tmp_38 = tmp_33[1];
tmp_38.bvci() = 20022;
{
Osmocom__Gb__Types::BssgpCellId& tmp_39 = tmp_38.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_40 = tmp_39.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_41 = tmp_40.lai();
tmp_41.mcc__mnc() = hs_0;
tmp_41.lac() = 13135;
}
tmp_40.rac() = 2;
}
tmp_39.cell__id() = 30022;
}
tmp_38.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_38.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
}
}
{
BSSGP__Emulation::BssgpConfig& tmp_42 = modulepar_mp__gbconfigs[2];
tmp_42.nsei() = 2003;
tmp_42.sgsn__role() = FALSE;
{
BSSGP__Emulation::BssgpBvcConfigs& tmp_43 = tmp_42.bvc();
tmp_43.set_size(3);
{
BSSGP__Emulation::BssgpBvcConfig& tmp_44 = tmp_43[0];
tmp_44.bvci() = 20031;
{
Osmocom__Gb__Types::BssgpCellId& tmp_45 = tmp_44.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_46 = tmp_45.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_47 = tmp_46.lai();
tmp_47.mcc__mnc() = hs_0;
tmp_47.lac() = 13135;
}
tmp_46.rac() = 1;
}
tmp_45.cell__id() = 30031;
}
tmp_44.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_44.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
{
BSSGP__Emulation::BssgpBvcConfig& tmp_48 = tmp_43[1];
tmp_48.bvci() = 20032;
{
Osmocom__Gb__Types::BssgpCellId& tmp_49 = tmp_48.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_50 = tmp_49.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_51 = tmp_50.lai();
tmp_51.mcc__mnc() = hs_0;
tmp_51.lac() = 13300;
}
tmp_50.rac() = 0;
}
tmp_49.cell__id() = 30032;
}
tmp_48.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_48.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
{
BSSGP__Emulation::BssgpBvcConfig& tmp_52 = tmp_43[2];
tmp_52.bvci() = 20033;
{
Osmocom__Gb__Types::BssgpCellId& tmp_53 = tmp_52.cell__id();
{
GSM__Types::RoutingAreaIdentification& tmp_54 = tmp_53.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_55 = tmp_54.lai();
tmp_55.mcc__mnc() = hs_0;
tmp_55.lac() = 13300;
}
tmp_54.rac() = 0;
}
tmp_53.cell__id() = 30033;
}
tmp_52.depth() = BSSGP__Emulation::BssgpDecodeDepth::BSSGP__DECODE__DEPTH__BSSGP;
tmp_52.create__cb() = &BSSGP__Emulation::DefaultCreateCallback;
}
}
}
module_object.add_modulepar("mp_gbconfigs");
current_location.update_lineno(323);
/* GBProxy_Tests.ttcn, line 323 */
const_NUM__PCU = 3;
current_location.update_lineno(332);
/* GBProxy_Tests.ttcn, line 332 */
const_NUM__SGSN = 2;
{
static const char * const port_name = "PCU_PTP";
BSSGP__ConnHdlr_component_PCU__PTP.set_name(port_name);
}
{
static const char * const port_name = "PCU_SIG";
BSSGP__ConnHdlr_component_PCU__SIG.set_name(port_name);
}
{
static const char * const port_name = "PCU_PROC";
BSSGP__ConnHdlr_component_PCU__PROC.set_name(port_name);
}
{
static const char * const port_name = "SGSN_PTP";
BSSGP__ConnHdlr_component_SGSN__PTP.set_name(port_name);
}
{
static const char * const port_name = "SGSN_SIG";
BSSGP__ConnHdlr_component_SGSN__SIG.set_name(port_name);
}
{
static const char * const port_name = "SGSN_PROC";
BSSGP__ConnHdlr_component_SGSN__PROC.set_name(port_name);
}
module_object.add_function("get_bvc_idx_for_bvci", (genericfunc_t)&get__bvc__idx__for__bvci, NULL);
module_object.add_function("f_cellid_to_RAI", (genericfunc_t)&f__cellid__to__RAI, NULL);
module_object.add_function("f_fix_create_cb", (genericfunc_t)&f__fix__create__cb, NULL);
module_object.add_function("f_init_gb_pcu", (genericfunc_t)&f__init__gb__pcu, (genericfunc_t)&start_f__init__gb__pcu);
module_object.add_function("f_init_gb_sgsn", (genericfunc_t)&f__init__gb__sgsn, (genericfunc_t)&start_f__init__gb__sgsn);
module_object.add_function("f_destroy_gb", (genericfunc_t)&f__destroy__gb, (genericfunc_t)&start_f__destroy__gb);
module_object.add_function("f_init_vty", (genericfunc_t)&f__init__vty, (genericfunc_t)&start_f__init__vty);
module_object.add_altstep("as_count_unblocked4nse", (genericfunc_t)&as__count__unblocked4nse_instance, (genericfunc_t )&activate_as__count__unblocked4nse, (genericfunc_t )&as__count__unblocked4nse);
module_object.add_function("f_bvc_fsm_ensure_state", (genericfunc_t)&f__bvc__fsm__ensure__state, (genericfunc_t)&start_f__bvc__fsm__ensure__state);
module_object.add_function("f_init", (genericfunc_t)&f__init, (genericfunc_t)&start_f__init);
module_object.add_function("f_cleanup", (genericfunc_t)&f__cleanup, (genericfunc_t)&start_f__cleanup);
module_object.add_function("f_start_handler", (genericfunc_t)&f__start__handler, (genericfunc_t)&start_f__start__handler);
module_object.add_function("f_start_handlers", (genericfunc_t)&f__start__handlers, (genericfunc_t)&start_f__start__handlers);
module_object.add_function("f_connect_to_pcu_bvc", (genericfunc_t)&f__connect__to__pcu__bvc, (genericfunc_t)&start_f__connect__to__pcu__bvc);
module_object.add_function("f_connect_to_sgsn_bvc", (genericfunc_t)&f__connect__to__sgsn__bvc, (genericfunc_t)&start_f__connect__to__sgsn__bvc);
module_object.add_altstep("as_gTguard", (genericfunc_t)&as__gTguard_instance, (genericfunc_t )&activate_as__gTguard, (genericfunc_t )&as__gTguard);
module_object.add_function("f_handler_init", (genericfunc_t)&f__handler__init, (genericfunc_t)&start_f__handler__init);
module_object.add_function("f_client_register", (genericfunc_t)&f__client__register, NULL);
module_object.add_function("f_client_unregister", (genericfunc_t)&f__client__unregister, NULL);
module_object.add_function("f_pcu2sgsn", (genericfunc_t)&f__pcu2sgsn, (genericfunc_t)&start_f__pcu2sgsn);
module_object.add_function("f_pcu2any_sgsn", (genericfunc_t)&f__pcu2any__sgsn, (genericfunc_t)&start_f__pcu2any__sgsn);
module_object.add_function("f_sgsn2pcu", (genericfunc_t)&f__sgsn2pcu, (genericfunc_t)&start_f__sgsn2pcu);
{
static const char * const port_name = "G_PCU";
GlobalTest__CT_component_G__PCU.set_name(port_name);
}
{
static const char * const port_name = "G_SGSN";
GlobalTest__CT_component_G__SGSN.set_name(port_name);
}
{
static const char * const port_name = "RIM_PCU";
GlobalTest__CT_component_RIM__PCU.set_name(port_name);
}
{
static const char * const port_name = "RIM_SGSN";
GlobalTest__CT_component_RIM__SGSN.set_name(port_name);
}
module_object.add_function("f_global_init", (genericfunc_t)&f__global__init, (genericfunc_t)&start_f__global__init);
module_object.add_function("f_global_init_ptp", (genericfunc_t)&f__global__init__ptp, (genericfunc_t)&start_f__global__init__ptp);
module_object.add_function("f_global_ptp_connect_sgsn_bvci", (genericfunc_t)&f__global__ptp__connect__sgsn__bvci, (genericfunc_t)&start_f__global__ptp__connect__sgsn__bvci);
module_object.add_function("f_global_ptp_connect_pcu_bvci", (genericfunc_t)&f__global__ptp__connect__pcu__bvci, (genericfunc_t)&start_f__global__ptp__connect__pcu__bvci);
module_object.add_function("f_global_pcu2sgsn", (genericfunc_t)&f__global__pcu2sgsn, (genericfunc_t)&start_f__global__pcu2sgsn);
module_object.add_function("f_global_sgsn2pcu", (genericfunc_t)&f__global__sgsn2pcu, (genericfunc_t)&start_f__global__sgsn2pcu);
module_object.add_function("f_TC_BVC_bringup", (genericfunc_t)&f__TC__BVC__bringup, (genericfunc_t)&start_f__TC__BVC__bringup);
module_object.add_testcase_nonpard("TC_BVC_bringup", testcase_TC__BVC__bringup);
module_object.add_testcase_nonpard("TC_BVC_bringup_conflicting", testcase_TC__BVC__bringup__conflicting);
module_object.add_function("f_bssgp_suspend", (genericfunc_t)&f__bssgp__suspend, (genericfunc_t)&start_f__bssgp__suspend);
module_object.add_function("f_bssgp_resume", (genericfunc_t)&f__bssgp__resume, (genericfunc_t)&start_f__bssgp__resume);
module_object.add_function("f_TC_ul_unitdata", (genericfunc_t)&f__TC__ul__unitdata, (genericfunc_t)&start_f__TC__ul__unitdata);
module_object.add_testcase_nonpard("TC_ul_unitdata", testcase_TC__ul__unitdata);
module_object.add_function("f_TC_ul_unitdata_pool_failure", (genericfunc_t)&f__TC__ul__unitdata__pool__failure, (genericfunc_t)&start_f__TC__ul__unitdata__pool__failure);
module_object.add_function("f_disable_ns_pcu", (genericfunc_t)&f__disable__ns__pcu, (genericfunc_t)&start_f__disable__ns__pcu);
module_object.add_testcase_nonpard("TC_ul_unitdata_pool_failure", testcase_TC__ul__unitdata__pool__failure);
module_object.add_function("f_TC_dl_unitdata", (genericfunc_t)&f__TC__dl__unitdata, (genericfunc_t)&start_f__TC__dl__unitdata);
module_object.add_testcase_nonpard("TC_dl_unitdata", testcase_TC__dl__unitdata);
module_object.add_function("f_TC_ra_capability", (genericfunc_t)&f__TC__ra__capability, (genericfunc_t)&start_f__TC__ra__capability);
module_object.add_testcase_nonpard("TC_ra_capability", testcase_TC__ra__capability);
module_object.add_function("f_TC_ra_capability_upd", (genericfunc_t)&f__TC__ra__capability__upd, (genericfunc_t)&start_f__TC__ra__capability__upd);
module_object.add_testcase_nonpard("TC_ra_capability_upd", testcase_TC__ra__capability__upd);
module_object.add_function("f_TC_radio_status", (genericfunc_t)&f__TC__radio__status, (genericfunc_t)&start_f__TC__radio__status);
module_object.add_testcase_nonpard("TC_radio_status", testcase_TC__radio__status);
module_object.add_function("f_TC_radio_status_tmsi", (genericfunc_t)&f__TC__radio__status__tmsi, (genericfunc_t)&start_f__TC__radio__status__tmsi);
module_object.add_testcase_nonpard("TC_radio_status_tmsi", testcase_TC__radio__status__tmsi);
module_object.add_function("f_TC_radio_status_imsi", (genericfunc_t)&f__TC__radio__status__imsi, (genericfunc_t)&start_f__TC__radio__status__imsi);
module_object.add_testcase_nonpard("TC_radio_status_imsi", testcase_TC__radio__status__imsi);
module_object.add_function("f_suspend_one", (genericfunc_t)&f__suspend__one, (genericfunc_t)&start_f__suspend__one);
module_object.add_function("f_TC_suspend", (genericfunc_t)&f__TC__suspend, (genericfunc_t)&start_f__TC__suspend);
module_object.add_testcase_nonpard("TC_suspend", testcase_TC__suspend);
module_object.add_function("f_resume_one", (genericfunc_t)&f__resume__one, (genericfunc_t)&start_f__resume__one);
module_object.add_function("f_TC_resume", (genericfunc_t)&f__TC__resume, (genericfunc_t)&start_f__TC__resume);
module_object.add_testcase_nonpard("TC_resume", testcase_TC__resume);
module_object.add_function("f_TC_dl_ud_unidir", (genericfunc_t)&f__TC__dl__ud__unidir, (genericfunc_t)&start_f__TC__dl__ud__unidir);
module_object.add_function("f_TC_load_sharing_dl", (genericfunc_t)&f__TC__load__sharing__dl, (genericfunc_t)&start_f__TC__load__sharing__dl);
module_object.add_testcase_nonpard("TC_load_sharing_dl", testcase_TC__load__sharing__dl);
module_object.add_altstep("as_NsUdiCount", (genericfunc_t)&as__NsUdiCount_instance, (genericfunc_t )&activate_as__NsUdiCount, (genericfunc_t )&as__NsUdiCount);
module_object.add_function("f_send_paging_ps", (genericfunc_t)&f__send__paging__ps, (genericfunc_t)&start_f__send__paging__ps);
module_object.add_function("f_send_paging_ps_exp_one_bss", (genericfunc_t)&f__send__paging__ps__exp__one__bss, (genericfunc_t)&start_f__send__paging__ps__exp__one__bss);
module_object.add_function("f_send_paging_ps_exp_no_bss", (genericfunc_t)&f__send__paging__ps__exp__no__bss, (genericfunc_t)&start_f__send__paging__ps__exp__no__bss);
module_object.add_function("f_TC_paging_ps_ptp_bss", (genericfunc_t)&f__TC__paging__ps__ptp__bss, (genericfunc_t)&start_f__TC__paging__ps__ptp__bss);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_bss", testcase_TC__paging__ps__ptp__bss);
module_object.add_function("f_TC_paging_ps_ptp_lac", (genericfunc_t)&f__TC__paging__ps__ptp__lac, (genericfunc_t)&start_f__TC__paging__ps__ptp__lac);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_lac", testcase_TC__paging__ps__ptp__lac);
module_object.add_function("f_TC_paging_ps_ptp_lac_unknown", (genericfunc_t)&f__TC__paging__ps__ptp__lac__unknown, (genericfunc_t)&start_f__TC__paging__ps__ptp__lac__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_lac_unknown", testcase_TC__paging__ps__ptp__lac__unknown);
module_object.add_function("f_TC_paging_ps_ptp_rac", (genericfunc_t)&f__TC__paging__ps__ptp__rac, (genericfunc_t)&start_f__TC__paging__ps__ptp__rac);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_rac", testcase_TC__paging__ps__ptp__rac);
module_object.add_function("f_TC_paging_ps_ptp_rac_unknown", (genericfunc_t)&f__TC__paging__ps__ptp__rac__unknown, (genericfunc_t)&start_f__TC__paging__ps__ptp__rac__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_rac_unknown", testcase_TC__paging__ps__ptp__rac__unknown);
module_object.add_function("f_TC_paging_ps_ptp_bvci", (genericfunc_t)&f__TC__paging__ps__ptp__bvci, (genericfunc_t)&start_f__TC__paging__ps__ptp__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_bvci", testcase_TC__paging__ps__ptp__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_bvci_imsi", testcase_TC__paging__ps__ptp__bvci__imsi);
module_object.add_testcase_nonpard("TC_paging_ps_reject_ptp_bvci", testcase_TC__paging__ps__reject__ptp__bvci);
module_object.add_function("f_TC_paging_ps_reject_ptp_bvci", (genericfunc_t)&f__TC__paging__ps__reject__ptp__bvci, (genericfunc_t)&start_f__TC__paging__ps__reject__ptp__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_reject_ptp_bvci_imsi", testcase_TC__paging__ps__reject__ptp__bvci__imsi);
module_object.add_function("f_TC_paging_ps_ptp_bvci_unknown", (genericfunc_t)&f__TC__paging__ps__ptp__bvci__unknown, (genericfunc_t)&start_f__TC__paging__ps__ptp__bvci__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_ptp_bvci_unknown", testcase_TC__paging__ps__ptp__bvci__unknown);
module_object.add_function("f_TC_dummy_paging_ps_ptp", (genericfunc_t)&f__TC__dummy__paging__ps__ptp, (genericfunc_t)&start_f__TC__dummy__paging__ps__ptp);
module_object.add_testcase_nonpard("TC_dummy_paging_ps_ptp", testcase_TC__dummy__paging__ps__ptp);
module_object.add_altstep("as_paging_sig_pcu", (genericfunc_t)&as__paging__sig__pcu_instance, (genericfunc_t )&activate_as__paging__sig__pcu, (genericfunc_t )&as__paging__sig__pcu);
module_object.add_function("f_send_paging_ps_exp_multi", (genericfunc_t)&f__send__paging__ps__exp__multi, (genericfunc_t)&start_f__send__paging__ps__exp__multi);
module_object.add_function("f_send_paging_ps_rej", (genericfunc_t)&f__send__paging__ps__rej, (genericfunc_t)&start_f__send__paging__ps__rej);
module_object.add_function("f_TC_paging_ps_sig_bss", (genericfunc_t)&f__TC__paging__ps__sig__bss, (genericfunc_t)&start_f__TC__paging__ps__sig__bss);
module_object.add_testcase_nonpard("TC_paging_ps_sig_bss", testcase_TC__paging__ps__sig__bss);
module_object.add_function("f_TC_paging_ps_sig_lac", (genericfunc_t)&f__TC__paging__ps__sig__lac, (genericfunc_t)&start_f__TC__paging__ps__sig__lac);
module_object.add_testcase_nonpard("TC_paging_ps_sig_lac", testcase_TC__paging__ps__sig__lac);
module_object.add_function("f_TC_paging_ps_sig_lac_unknown", (genericfunc_t)&f__TC__paging__ps__sig__lac__unknown, (genericfunc_t)&start_f__TC__paging__ps__sig__lac__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_sig_lac_unknown", testcase_TC__paging__ps__sig__lac__unknown);
module_object.add_function("f_TC_paging_ps_sig_rac", (genericfunc_t)&f__TC__paging__ps__sig__rac, (genericfunc_t)&start_f__TC__paging__ps__sig__rac);
module_object.add_testcase_nonpard("TC_paging_ps_sig_rac", testcase_TC__paging__ps__sig__rac);
module_object.add_function("f_TC_paging_ps_sig_rac_unknown", (genericfunc_t)&f__TC__paging__ps__sig__rac__unknown, (genericfunc_t)&start_f__TC__paging__ps__sig__rac__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_sig_rac_unknown", testcase_TC__paging__ps__sig__rac__unknown);
module_object.add_function("f_TC_paging_ps_sig_bvci", (genericfunc_t)&f__TC__paging__ps__sig__bvci, (genericfunc_t)&start_f__TC__paging__ps__sig__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_sig_bvci", testcase_TC__paging__ps__sig__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_sig_bvci_imsi", testcase_TC__paging__ps__sig__bvci__imsi);
module_object.add_function("f_TC_paging_ps_reject_sig_bvci", (genericfunc_t)&f__TC__paging__ps__reject__sig__bvci, (genericfunc_t)&start_f__TC__paging__ps__reject__sig__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_reject_sig_bvci", testcase_TC__paging__ps__reject__sig__bvci);
module_object.add_testcase_nonpard("TC_paging_ps_reject_sig_bvci_imsi", testcase_TC__paging__ps__reject__sig__bvci__imsi);
module_object.add_function("f_TC_paging_ps_sig_bvci_unknown", (genericfunc_t)&f__TC__paging__ps__sig__bvci__unknown, (genericfunc_t)&start_f__TC__paging__ps__sig__bvci__unknown);
module_object.add_testcase_nonpard("TC_paging_ps_sig_bvci_unknown", testcase_TC__paging__ps__sig__bvci__unknown);
module_object.add_function("f_TC_dummy_paging_ps_sig", (genericfunc_t)&f__TC__dummy__paging__ps__sig, (genericfunc_t)&start_f__TC__dummy__paging__ps__sig);
module_object.add_testcase_nonpard("TC_dummy_paging_ps_sig", testcase_TC__dummy__paging__ps__sig);
module_object.add_function("f_send_paging_cs", (genericfunc_t)&f__send__paging__cs, (genericfunc_t)&start_f__send__paging__cs);
module_object.add_function("f_send_paging_cs_exp_one_bss", (genericfunc_t)&f__send__paging__cs__exp__one__bss, (genericfunc_t)&start_f__send__paging__cs__exp__one__bss);
module_object.add_function("f_send_paging_cs_exp_no_bss", (genericfunc_t)&f__send__paging__cs__exp__no__bss, (genericfunc_t)&start_f__send__paging__cs__exp__no__bss);
module_object.add_function("f_TC_paging_cs_ptp_bss", (genericfunc_t)&f__TC__paging__cs__ptp__bss, (genericfunc_t)&start_f__TC__paging__cs__ptp__bss);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_bss", testcase_TC__paging__cs__ptp__bss);
module_object.add_function("f_TC_paging_cs_ptp_lac", (genericfunc_t)&f__TC__paging__cs__ptp__lac, (genericfunc_t)&start_f__TC__paging__cs__ptp__lac);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_lac", testcase_TC__paging__cs__ptp__lac);
module_object.add_function("f_TC_paging_cs_ptp_lac_unknown", (genericfunc_t)&f__TC__paging__cs__ptp__lac__unknown, (genericfunc_t)&start_f__TC__paging__cs__ptp__lac__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_lac_unknown", testcase_TC__paging__cs__ptp__lac__unknown);
module_object.add_function("f_TC_paging_cs_ptp_rac", (genericfunc_t)&f__TC__paging__cs__ptp__rac, (genericfunc_t)&start_f__TC__paging__cs__ptp__rac);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_rac", testcase_TC__paging__cs__ptp__rac);
module_object.add_function("f_TC_paging_cs_ptp_rac_unknown", (genericfunc_t)&f__TC__paging__cs__ptp__rac__unknown, (genericfunc_t)&start_f__TC__paging__cs__ptp__rac__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_rac_unknown", testcase_TC__paging__cs__ptp__rac__unknown);
module_object.add_function("f_TC_paging_cs_ptp_bvci", (genericfunc_t)&f__TC__paging__cs__ptp__bvci, (genericfunc_t)&start_f__TC__paging__cs__ptp__bvci);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_bvci", testcase_TC__paging__cs__ptp__bvci);
module_object.add_function("f_TC_paging_cs_ptp_bvci_unknown", (genericfunc_t)&f__TC__paging__cs__ptp__bvci__unknown, (genericfunc_t)&start_f__TC__paging__cs__ptp__bvci__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_ptp_bvci_unknown", testcase_TC__paging__cs__ptp__bvci__unknown);
module_object.add_function("f_send_paging_cs_exp_multi", (genericfunc_t)&f__send__paging__cs__exp__multi, (genericfunc_t)&start_f__send__paging__cs__exp__multi);
module_object.add_function("f_TC_paging_cs_sig_bss", (genericfunc_t)&f__TC__paging__cs__sig__bss, (genericfunc_t)&start_f__TC__paging__cs__sig__bss);
module_object.add_testcase_nonpard("TC_paging_cs_sig_bss", testcase_TC__paging__cs__sig__bss);
module_object.add_function("f_TC_paging_cs_sig_lac", (genericfunc_t)&f__TC__paging__cs__sig__lac, (genericfunc_t)&start_f__TC__paging__cs__sig__lac);
module_object.add_testcase_nonpard("TC_paging_cs_sig_lac", testcase_TC__paging__cs__sig__lac);
module_object.add_function("f_TC_paging_cs_sig_lac_unknown", (genericfunc_t)&f__TC__paging__cs__sig__lac__unknown, (genericfunc_t)&start_f__TC__paging__cs__sig__lac__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_sig_lac_unknown", testcase_TC__paging__cs__sig__lac__unknown);
module_object.add_function("f_TC_paging_cs_sig_rac", (genericfunc_t)&f__TC__paging__cs__sig__rac, (genericfunc_t)&start_f__TC__paging__cs__sig__rac);
module_object.add_testcase_nonpard("TC_paging_cs_sig_rac", testcase_TC__paging__cs__sig__rac);
module_object.add_function("f_TC_paging_cs_sig_rac_unknown", (genericfunc_t)&f__TC__paging__cs__sig__rac__unknown, (genericfunc_t)&start_f__TC__paging__cs__sig__rac__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_sig_rac_unknown", testcase_TC__paging__cs__sig__rac__unknown);
module_object.add_function("f_TC_paging_cs_sig_bvci", (genericfunc_t)&f__TC__paging__cs__sig__bvci, (genericfunc_t)&start_f__TC__paging__cs__sig__bvci);
module_object.add_testcase_nonpard("TC_paging_cs_sig_bvci", testcase_TC__paging__cs__sig__bvci);
module_object.add_function("f_TC_paging_cs_sig_bvci_unknown", (genericfunc_t)&f__TC__paging__cs__sig__bvci__unknown, (genericfunc_t)&start_f__TC__paging__cs__sig__bvci__unknown);
module_object.add_testcase_nonpard("TC_paging_cs_sig_bvci_unknown", testcase_TC__paging__cs__sig__bvci__unknown);
module_object.add_function("f_TC_flush_ll_bvci_new", (genericfunc_t)&f__TC__flush__ll__bvci__new, (genericfunc_t)&start_f__TC__flush__ll__bvci__new);
module_object.add_testcase_nonpard("TC_flush_ll_bvci_new", testcase_TC__flush__ll__bvci__new);
module_object.add_function("f_TC_flush_ll_no_bvci_new", (genericfunc_t)&f__TC__flush__ll__no__bvci__new, (genericfunc_t)&start_f__TC__flush__ll__no__bvci__new);
module_object.add_testcase_nonpard("TC_flush_ll_no_bvci_new", testcase_TC__flush__ll__no__bvci__new);
module_object.add_altstep("as_bssgp_g_pcu_count", (genericfunc_t)&as__bssgp__g__pcu__count_instance, (genericfunc_t )&activate_as__bssgp__g__pcu__count, (genericfunc_t )&as__bssgp__g__pcu__count);
module_object.add_testcase_nonpard("TC_trace", testcase_TC__trace);
module_object.add_function("f_TC_llc_discarded", (genericfunc_t)&f__TC__llc__discarded, (genericfunc_t)&start_f__TC__llc__discarded);
module_object.add_testcase_nonpard("TC_llc_discarded", testcase_TC__llc__discarded);
module_object.add_testcase_nonpard("TC_overload", testcase_TC__overload);
module_object.add_function("f_block_ptp_bvc_from_pcu", (genericfunc_t)&f__block__ptp__bvc__from__pcu, (genericfunc_t)&start_f__block__ptp__bvc__from__pcu);
module_object.add_testcase_nonpard("TC_bvc_block_ptp", testcase_TC__bvc__block__ptp);
module_object.add_function("f_unblock_ptp_bvc_from_pcu", (genericfunc_t)&f__unblock__ptp__bvc__from__pcu, (genericfunc_t)&start_f__unblock__ptp__bvc__from__pcu);
module_object.add_testcase_nonpard("TC_bvc_unblock_ptp", testcase_TC__bvc__unblock__ptp);
module_object.add_altstep("as_count_bvc_reset", (genericfunc_t)&as__count__bvc__reset_instance, (genericfunc_t )&activate_as__count__bvc__reset, (genericfunc_t )&as__count__bvc__reset);
module_object.add_altstep("as_ignore_status", (genericfunc_t)&as__ignore__status_instance, (genericfunc_t )&activate_as__ignore__status, (genericfunc_t )&as__ignore__status);
module_object.add_function("f_get_sgsn_bvc_ct", (genericfunc_t)&f__get__sgsn__bvc__ct, (genericfunc_t)&start_f__get__sgsn__bvc__ct);
module_object.add_function("f_reset_ptp_bvc_from_pcu", (genericfunc_t)&f__reset__ptp__bvc__from__pcu, (genericfunc_t)&start_f__reset__ptp__bvc__from__pcu);
module_object.add_testcase_nonpard("TC_bvc_reset_ptp_from_bss", testcase_TC__bvc__reset__ptp__from__bss);
module_object.add_altstep("as_count_bvc_sts", (genericfunc_t)&as__count__bvc__sts_instance, (genericfunc_t )&activate_as__count__bvc__sts, (genericfunc_t )&as__count__bvc__sts);
module_object.add_altstep("as_count_bvc_block", (genericfunc_t)&as__count__bvc__block_instance, (genericfunc_t )&activate_as__count__bvc__block, (genericfunc_t )&as__count__bvc__block);
module_object.add_altstep("as_count_bvc_unblock", (genericfunc_t)&as__count__bvc__unblock_instance, (genericfunc_t )&activate_as__count__bvc__unblock, (genericfunc_t )&as__count__bvc__unblock);
module_object.add_testcase_nonpard("TC_bvc_reset_sig_from_bss", testcase_TC__bvc__reset__sig__from__bss);
module_object.add_function("f_reset_ptp_bvc_from_sgsn", (genericfunc_t)&f__reset__ptp__bvc__from__sgsn, (genericfunc_t)&start_f__reset__ptp__bvc__from__sgsn);
module_object.add_testcase_nonpard("TC_bvc_reset_ptp_from_sgsn", testcase_TC__bvc__reset__ptp__from__sgsn);
module_object.add_testcase_nonpard("TC_bvc_reset_blocked_ptp_from_sgsn", testcase_TC__bvc__reset__blocked__ptp__from__sgsn);
module_object.add_altstep("as_ignore_mgmt", (genericfunc_t)&as__ignore__mgmt_instance, (genericfunc_t )&activate_as__ignore__mgmt, (genericfunc_t )&as__ignore__mgmt);
module_object.add_altstep("as_count_bvc0_block", (genericfunc_t)&as__count__bvc0__block_instance, (genericfunc_t )&activate_as__count__bvc0__block, (genericfunc_t )&as__count__bvc0__block);
module_object.add_testcase_nonpard("TC_bvc_reset_sig_from_sgsn", testcase_TC__bvc__reset__sig__from__sgsn);
module_object.add_altstep("as_g_count_sgsn", (genericfunc_t)&as__g__count__sgsn_instance, (genericfunc_t )&activate_as__g__count__sgsn, (genericfunc_t )&as__g__count__sgsn);
module_object.add_testcase_nonpard("TC_fc_bvc", testcase_TC__fc__bvc);
module_object.add_function("f_TC_fc_ms", (genericfunc_t)&f__TC__fc__ms, (genericfunc_t)&start_f__TC__fc__ms);
module_object.add_testcase_nonpard("TC_fc_ms", testcase_TC__fc__ms);
module_object.add_function("f_TC_ms_reg_enq", (genericfunc_t)&f__TC__ms__reg__enq, (genericfunc_t)&start_f__TC__ms__reg__enq);
module_object.add_testcase_nonpard("TC_ms_reg_enq", testcase_TC__ms__reg__enq);
current_location.update_lineno(3073);
/* GBProxy_Tests.ttcn, line 3073 */
{
GSM__Types::RoutingAreaIdentification& tmp_458 = const_cell__id__sgsn.ra__id();
{
GSM__Types::LocationAreaIdentification& tmp_459 = tmp_458.lai();
tmp_459.mcc__mnc() = hs_0;
tmp_459.lac() = 65534;
}
tmp_458.rac() = 0;
}
const_cell__id__sgsn.cell__id() = 65533;
module_object.add_function("f_rim_pcu2sgsn", (genericfunc_t)&f__rim__pcu2sgsn, (genericfunc_t)&start_f__rim__pcu2sgsn);
module_object.add_function("f_rim_sgsn2pcu", (genericfunc_t)&f__rim__sgsn2pcu, (genericfunc_t)&start_f__rim__sgsn2pcu);
module_object.add_function("f_rim_pcu2pcu", (genericfunc_t)&f__rim__pcu2pcu, (genericfunc_t)&start_f__rim__pcu2pcu);
module_object.add_function("f_rim_iterator", (genericfunc_t)&f__rim__iterator, (genericfunc_t)&start_f__rim__iterator);
module_object.add_function("f_TC_rim_info_req", (genericfunc_t)&f__TC__rim__info__req, (genericfunc_t)&start_f__TC__rim__info__req);
module_object.add_testcase_nonpard("TC_rim_info_req", testcase_TC__rim__info__req);
module_object.add_function("f_TC_rim_info", (genericfunc_t)&f__TC__rim__info, (genericfunc_t)&start_f__TC__rim__info);
module_object.add_testcase_nonpard("TC_rim_info", testcase_TC__rim__info);
module_object.add_function("f_TC_rim_info_ack", (genericfunc_t)&f__TC__rim__info__ack, (genericfunc_t)&start_f__TC__rim__info__ack);
module_object.add_testcase_nonpard("TC_rim_info_ack", testcase_TC__rim__info__ack);
module_object.add_function("f_TC_rim_info_error", (genericfunc_t)&f__TC__rim__info__error, (genericfunc_t)&start_f__TC__rim__info__error);
module_object.add_testcase_nonpard("TC_rim_info_error", testcase_TC__rim__info__error);
module_object.add_function("f_TC_rim_info_app_error", (genericfunc_t)&f__TC__rim__info__app__error, (genericfunc_t)&start_f__TC__rim__info__app__error);
module_object.add_testcase_nonpard("TC_rim_info_app_error", testcase_TC__rim__info__app__error);
module_object.add_function("f_TC_rim_info_pcu2pcu", (genericfunc_t)&f__TC__rim__info__pcu2pcu, (genericfunc_t)&start_f__TC__rim__info__pcu2pcu);
module_object.add_testcase_nonpard("TC_rim_info_pcu2pcu", testcase_TC__rim__info__pcu2pcu);
module_object.add_function("f_TC_rim_from_eutran", (genericfunc_t)&f__TC__rim__from__eutran, (genericfunc_t)&start_f__TC__rim__from__eutran);
module_object.add_testcase_nonpard("TC_rim_from_eutran", testcase_TC__rim__from__eutran);
module_object.add_function("f_gen_tmsi_for_sgsn_nri", (genericfunc_t)&f__gen__tmsi__for__sgsn__nri, (genericfunc_t)&start_f__gen__tmsi__for__sgsn__nri);
module_object.add_function("f_gen_tlli_for_sgsn_nri", (genericfunc_t)&f__gen__tlli__for__sgsn__nri, (genericfunc_t)&start_f__gen__tlli__for__sgsn__nri);
module_object.add_function("f_TC_status_ul", (genericfunc_t)&f__TC__status__ul, (genericfunc_t)&start_f__TC__status__ul);
module_object.add_function("f_TC_status_dl", (genericfunc_t)&f__TC__status__dl, (genericfunc_t)&start_f__TC__status__dl);
module_object.add_testcase_nonpard("TC_status_sig_ul_tlli", testcase_TC__status__sig__ul__tlli);
module_object.add_testcase_nonpard("TC_status_sig_ul_tmsi", testcase_TC__status__sig__ul__tmsi);
module_object.add_testcase_nonpard("TC_status_ptp_ul_tlli", testcase_TC__status__ptp__ul__tlli);
module_object.add_testcase_nonpard("TC_status_ptp_ul_tmsi", testcase_TC__status__ptp__ul__tmsi);
module_object.add_testcase_nonpard("TC_status_sig_dl_bvci", testcase_TC__status__sig__dl__bvci);
module_object.add_testcase_nonpard("TC_status_ptp_dl_bvci", testcase_TC__status__ptp__dl__bvci);
}

void post_init_module()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "GBProxy_Tests");
BSSGP__Emulation::module_object.post_init_module();
SCCPasp__Types::module_object.post_init_module();
L3__Templates::module_object.post_init_module();
L3__Common::module_object.post_init_module();
Osmocom__VTY__Functions::module_object.post_init_module();
Osmocom__CTRL__Adapter::module_object.post_init_module();
current_location.update_lineno(530);
/* GBProxy_Tests.ttcn, line 530 */
const_f__init_t__guard_defval = 3.0e1;
current_location.update_lineno(680);
/* GBProxy_Tests.ttcn, line 680 */
const_f__start__handler_t__guard_defval = 3.0e1;
current_location.update_lineno(681);
/* GBProxy_Tests.ttcn, line 681 */
const_f__start__handler_sgsn__idx_defval = 0;
current_location.update_lineno(681);
/* GBProxy_Tests.ttcn, line 681 */
const_f__start__handler_nri__idx_defval = 0;
current_location.update_lineno(681);
/* GBProxy_Tests.ttcn, line 681 */
const_f__start__handler_have__ptmsi_defval = TRUE;
current_location.update_lineno(713);
/* GBProxy_Tests.ttcn, line 713 */
const_f__start__handlers_t__guard_defval = 3.0e1;
current_location.update_lineno(714);
/* GBProxy_Tests.ttcn, line 714 */
const_f__start__handlers_have__ptmsi_defval = TRUE;
current_location.update_lineno(827);
/* GBProxy_Tests.ttcn, line 827 */
const_f__pcu2sgsn_pcu__idx_defval = 0;
current_location.update_lineno(827);
/* GBProxy_Tests.ttcn, line 827 */
const_f__pcu2sgsn_use__sig_defval = FALSE;
current_location.update_lineno(863);
/* GBProxy_Tests.ttcn, line 863 */
const_f__pcu2any__sgsn_pcu__idx_defval = 0;
current_location.update_lineno(863);
/* GBProxy_Tests.ttcn, line 863 */
const_f__pcu2any__sgsn_use__sig_defval = FALSE;
current_location.update_lineno(901);
/* GBProxy_Tests.ttcn, line 901 */
const_f__sgsn2pcu_pcu__idx_defval = 0;
current_location.update_lineno(901);
/* GBProxy_Tests.ttcn, line 901 */
const_f__sgsn2pcu_use__sig_defval = FALSE;
current_location.update_lineno(996);
/* GBProxy_Tests.ttcn, line 996 */
const_f__global__pcu2sgsn_pcu__idx_defval = 0;
current_location.update_lineno(996);
/* GBProxy_Tests.ttcn, line 996 */
const_f__global__pcu2sgsn_sgsn__idx_defval = 0;
current_location.update_lineno(1021);
/* GBProxy_Tests.ttcn, line 1021 */
const_f__global__sgsn2pcu_sgsn__idx_defval = 0;
current_location.update_lineno(1021);
/* GBProxy_Tests.ttcn, line 1021 */
const_f__global__sgsn2pcu_pcu__idx_defval = 0;
current_location.update_lineno(1181);
/* GBProxy_Tests.ttcn, line 1181 */
const_f__bssgp__suspend_ran__idx_defval = 0;
current_location.update_lineno(1203);
/* GBProxy_Tests.ttcn, line 1203 */
const_f__bssgp__resume_ran__idx_defval = 0;
current_location.update_lineno(1628);
/* GBProxy_Tests.ttcn, line 1628 */
const_f__send__paging__ps_sgsn__idx_defval = 0;
current_location.update_lineno(1629);
/* GBProxy_Tests.ttcn, line 1629 */
const_f__send__paging__ps_use__sig_defval = FALSE;
current_location.update_lineno(1656);
/* GBProxy_Tests.ttcn, line 1656 */
const_f__send__paging__ps__exp__one__bss_sgsn__idx_defval = 0;
current_location.update_lineno(1657);
/* GBProxy_Tests.ttcn, line 1657 */
const_f__send__paging__ps__exp__one__bss_use__sig_defval = FALSE;
current_location.update_lineno(1657);
/* GBProxy_Tests.ttcn, line 1657 */
const_f__send__paging__ps__exp__one__bss_pcu__idx_defval = 0;
current_location.update_lineno(1704);
/* GBProxy_Tests.ttcn, line 1704 */
const_f__send__paging__ps__exp__no__bss_sgsn__idx_defval = 0;
current_location.update_lineno(1705);
/* GBProxy_Tests.ttcn, line 1705 */
const_f__send__paging__ps__exp__no__bss_use__sig_defval = FALSE;
current_location.update_lineno(1896);
/* GBProxy_Tests.ttcn, line 1896 */
const_f__send__paging__ps__exp__multi_sgsn__idx_defval = 0;
current_location.update_lineno(1928);
/* GBProxy_Tests.ttcn, line 1928 */
const_f__send__paging__ps__rej_use__sig_defval = TRUE;
current_location.update_lineno(1928);
/* GBProxy_Tests.ttcn, line 1928 */
const_f__send__paging__ps__rej_pcu__idx_defval = 0;
current_location.update_lineno(2126);
/* GBProxy_Tests.ttcn, line 2126 */
const_f__send__paging__cs_sgsn__idx_defval = 0;
current_location.update_lineno(2127);
/* GBProxy_Tests.ttcn, line 2127 */
const_f__send__paging__cs_use__sig_defval = FALSE;
current_location.update_lineno(2154);
/* GBProxy_Tests.ttcn, line 2154 */
const_f__send__paging__cs__exp__one__bss_sgsn__idx_defval = 0;
current_location.update_lineno(2155);
/* GBProxy_Tests.ttcn, line 2155 */
const_f__send__paging__cs__exp__one__bss_use__sig_defval = FALSE;
current_location.update_lineno(2155);
/* GBProxy_Tests.ttcn, line 2155 */
const_f__send__paging__cs__exp__one__bss_pcu__idx_defval = 0;
current_location.update_lineno(2202);
/* GBProxy_Tests.ttcn, line 2202 */
const_f__send__paging__cs__exp__no__bss_sgsn__idx_defval = 0;
current_location.update_lineno(2203);
/* GBProxy_Tests.ttcn, line 2203 */
const_f__send__paging__cs__exp__no__bss_use__sig_defval = FALSE;
current_location.update_lineno(2328);
/* GBProxy_Tests.ttcn, line 2328 */
const_f__send__paging__cs__exp__multi_sgsn__idx_defval = 0;
current_location.update_lineno(3086);
/* GBProxy_Tests.ttcn, line 3086 */
const_f__rim__pcu2sgsn_pcu__idx_defval = 0;
current_location.update_lineno(3108);
/* GBProxy_Tests.ttcn, line 3108 */
const_f__rim__sgsn2pcu_sgsn__idx_defval = 0;
current_location.update_lineno(3108);
/* GBProxy_Tests.ttcn, line 3108 */
const_f__rim__sgsn2pcu_pcu__idx_defval = 0;
current_location.update_lineno(3176);
/* GBProxy_Tests.ttcn, line 3176 */
const_f__TC__rim__info__req_bvc__idx_defval = 0;
current_location.update_lineno(3220);
/* GBProxy_Tests.ttcn, line 3220 */
const_f__TC__rim__info_bvc__idx_defval = 0;
current_location.update_lineno(3265);
/* GBProxy_Tests.ttcn, line 3265 */
const_f__TC__rim__info__ack_bvc__idx_defval = 0;
current_location.update_lineno(3308);
/* GBProxy_Tests.ttcn, line 3308 */
const_f__TC__rim__info__error_bvc__idx_defval = 0;
current_location.update_lineno(3354);
/* GBProxy_Tests.ttcn, line 3354 */
const_f__TC__rim__info__app__error_bvc__idx_defval = 0;
current_location.update_lineno(3471);
/* GBProxy_Tests.ttcn, line 3471 */
const_f__TC__rim__from__eutran_bvc__idx_defval = 0;
}

boolean set_module_param(Module_Param& param)
{
const char* const par_name = param.get_id()->get_current_name();
if (!strcmp(par_name, "mp_gbproxy_ip")) {
modulepar_mp__gbproxy__ip.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_gbproxy_ctrl_port")) {
modulepar_mp__gbproxy__ctrl__port.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_nri_bitlength")) {
modulepar_mp__nri__bitlength.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_sgsn_nri")) {
modulepar_mp__sgsn__nri.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_enable_bss_load_sharing")) {
modulepar_mp__enable__bss__load__sharing.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_nsconfig_sgsn")) {
modulepar_mp__nsconfig__sgsn.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_nsconfig_pcu")) {
modulepar_mp__nsconfig__pcu.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_gbconfigs")) {
modulepar_mp__gbconfigs.set_param(param);
return TRUE;
} else return FALSE;
}

void log_module_param()
{
TTCN_Logger::log_event_str("mp_gbproxy_ip := ");
mp__gbproxy__ip.log();
TTCN_Logger::log_event_str(", mp_gbproxy_ctrl_port := ");
mp__gbproxy__ctrl__port.log();
TTCN_Logger::log_event_str(", mp_nri_bitlength := ");
mp__nri__bitlength.log();
TTCN_Logger::log_event_str(", mp_sgsn_nri := ");
mp__sgsn__nri.log();
TTCN_Logger::log_event_str(", mp_enable_bss_load_sharing := ");
mp__enable__bss__load__sharing.log();
TTCN_Logger::log_event_str(", mp_nsconfig_sgsn := ");
mp__nsconfig__sgsn.log();
TTCN_Logger::log_event_str(", mp_nsconfig_pcu := ");
mp__nsconfig__pcu.log();
TTCN_Logger::log_event_str(", mp_gbconfigs := ");
mp__gbconfigs.log();
}

boolean init_comp_type(const char *component_type, boolean init_base_comps)
{
(void)init_base_comps;
if (!strcmp(component_type, "test_CT")) {
if (init_base_comps) {
Module_List::initialize_component("Osmocom_CTRL_Adapter", "CTRL_Adapter_CT", FALSE);
}
test__CT_component_g__pcu.clean_up();
test__CT_component_g__sgsn.clean_up();
test__CT_component_NS__CTRL.activate_port();
test__CT_component_PROC.activate_port();
test__CT_component_SGSN__MGMT.activate_port();
test__CT_component_PCU__MGMT.activate_port();
test__CT_component_GBPVTY.activate_port();
test__CT_component_g__initialized = FALSE;
test__CT_component_g__use__echo = FALSE;
test__CT_component_g__roi = NULL_VALUE;
test__CT_component_g__roroi = NULL_VALUE;
return TRUE;
} else if (!strcmp(component_type, "BSSGP_ConnHdlr")) {
BSSGP__ConnHdlr_component_PCU__PTP.activate_port();
BSSGP__ConnHdlr_component_PCU__SIG.activate_port();
BSSGP__ConnHdlr_component_PCU__PROC.activate_port();
BSSGP__ConnHdlr_component_pcu__ct.clean_up();
BSSGP__ConnHdlr_component_pcu__bvc__cfg.clean_up();
BSSGP__ConnHdlr_component_SGSN__PTP.activate_port();
BSSGP__ConnHdlr_component_SGSN__SIG.activate_port();
BSSGP__ConnHdlr_component_SGSN__PROC.activate_port();
BSSGP__ConnHdlr_component_sgsn__ct.clean_up();
BSSGP__ConnHdlr_component_g__pars.clean_up();
BSSGP__ConnHdlr_component_llc.clean_up();
BSSGP__ConnHdlr_component_g__roi = NULL_VALUE;
return TRUE;
} else if (!strcmp(component_type, "GlobalTest_CT")) {
if (init_base_comps) {
init_comp_type("test_CT", FALSE);
Module_List::initialize_component("Osmocom_CTRL_Adapter", "CTRL_Adapter_CT", FALSE);
}
GlobalTest__CT_component_G__PCU.activate_port();
GlobalTest__CT_component_g__pcu__idx.clean_up();
GlobalTest__CT_component_G__SGSN.activate_port();
GlobalTest__CT_component_g__sgsn__idx.clean_up();
GlobalTest__CT_component_RIM__PCU.activate_port();
GlobalTest__CT_component_RIM__SGSN.activate_port();
return TRUE;
} else if (!strcmp(component_type, "test_CT_NS")) {
if (init_base_comps) {
init_comp_type("test_CT", FALSE);
Module_List::initialize_component("Osmocom_CTRL_Adapter", "CTRL_Adapter_CT", FALSE);
}
test__CT__NS_component_NS.activate_port();
return TRUE;
} else return FALSE;
}

boolean init_system_port(const char* component_type, const char* port_name)
{
if (!strcmp(component_type, "test_CT")) {
if (!strcmp(port_name, "GBPVTY")) {
test__CT_component_GBPVTY.safe_start();
return TRUE;
}
if (!strcmp(port_name, "IPA_CTRL")) {
Osmocom__CTRL__Adapter::CTRL__Adapter__CT_component_IPA__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "NS_CTRL")) {
test__CT_component_NS__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PCU_MGMT")) {
test__CT_component_PCU__MGMT.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PROC")) {
test__CT_component_PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_MGMT")) {
test__CT_component_SGSN__MGMT.safe_start();
return TRUE;
}
}
else if (!strcmp(component_type, "BSSGP_ConnHdlr")) {
if (!strcmp(port_name, "PCU_PROC")) {
BSSGP__ConnHdlr_component_PCU__PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PCU_PTP")) {
BSSGP__ConnHdlr_component_PCU__PTP.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PCU_SIG")) {
BSSGP__ConnHdlr_component_PCU__SIG.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_PROC")) {
BSSGP__ConnHdlr_component_SGSN__PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_PTP")) {
BSSGP__ConnHdlr_component_SGSN__PTP.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_SIG")) {
BSSGP__ConnHdlr_component_SGSN__SIG.safe_start();
return TRUE;
}
}
else if (!strcmp(component_type, "GlobalTest_CT")) {
if (!strcmp(port_name, "GBPVTY")) {
test__CT_component_GBPVTY.safe_start();
return TRUE;
}
if (!strcmp(port_name, "G_PCU")) {
GlobalTest__CT_component_G__PCU.safe_start();
return TRUE;
}
if (!strcmp(port_name, "G_SGSN")) {
GlobalTest__CT_component_G__SGSN.safe_start();
return TRUE;
}
if (!strcmp(port_name, "IPA_CTRL")) {
Osmocom__CTRL__Adapter::CTRL__Adapter__CT_component_IPA__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "NS_CTRL")) {
test__CT_component_NS__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PCU_MGMT")) {
test__CT_component_PCU__MGMT.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PROC")) {
test__CT_component_PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "RIM_PCU")) {
GlobalTest__CT_component_RIM__PCU.safe_start();
return TRUE;
}
if (!strcmp(port_name, "RIM_SGSN")) {
GlobalTest__CT_component_RIM__SGSN.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_MGMT")) {
test__CT_component_SGSN__MGMT.safe_start();
return TRUE;
}
}
else if (!strcmp(component_type, "test_CT_NS")) {
if (!strcmp(port_name, "GBPVTY")) {
test__CT_component_GBPVTY.safe_start();
return TRUE;
}
if (!strcmp(port_name, "IPA_CTRL")) {
Osmocom__CTRL__Adapter::CTRL__Adapter__CT_component_IPA__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "NS")) {
test__CT__NS_component_NS.safe_start();
return TRUE;
}
if (!strcmp(port_name, "NS_CTRL")) {
test__CT_component_NS__CTRL.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PCU_MGMT")) {
test__CT_component_PCU__MGMT.safe_start();
return TRUE;
}
if (!strcmp(port_name, "PROC")) {
test__CT_component_PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "SGSN_MGMT")) {
test__CT_component_SGSN__MGMT.safe_start();
return TRUE;
}
}
return FALSE;
}

boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments)
{
if (!strcmp(function_name, "f_init_gb_pcu")) {
GbInstance  gb;
CHARSTRING id;
INTEGER offset;
gb.decode_text(function_arguments);
id.decode_text(function_arguments);
offset.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_gb_pcu(");
gb.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
offset.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__init__gb__pcu(gb, id, offset);
TTCN_Runtime::function_finished("f_init_gb_pcu");
return TRUE;
} else if (!strcmp(function_name, "f_init_gb_sgsn")) {
GbInstance  gb;
CHARSTRING id;
INTEGER offset;
gb.decode_text(function_arguments);
id.decode_text(function_arguments);
offset.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_gb_sgsn(");
gb.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
offset.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__init__gb__sgsn(gb, id, offset);
TTCN_Runtime::function_finished("f_init_gb_sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_destroy_gb")) {
GbInstance  gb;
gb.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_destroy_gb(");
gb.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__destroy__gb(gb);
TTCN_Runtime::function_finished("f_destroy_gb");
return TRUE;
} else if (!strcmp(function_name, "f_init_vty")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_init_vty().");
TTCN_Runtime::function_started(function_arguments);
f__init__vty();
TTCN_Runtime::function_finished("f_init_vty");
return TRUE;
} else if (!strcmp(function_name, "f_bvc_fsm_ensure_state")) {
INTEGER nsei;
INTEGER bvci;
CHARSTRING_template exp;
nsei.decode_text(function_arguments);
bvci.decode_text(function_arguments);
exp.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bvc_fsm_ensure_state(");
nsei.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(", ");
exp.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__bvc__fsm__ensure__state(nsei, bvci, exp);
TTCN_Runtime::function_finished("f_bvc_fsm_ensure_state");
return TRUE;
} else if (!strcmp(function_name, "f_init")) {
FLOAT t__guard;
t__guard.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init(");
t__guard.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__init(t__guard);
TTCN_Runtime::function_finished("f_init");
return TRUE;
} else if (!strcmp(function_name, "f_cleanup")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_cleanup().");
TTCN_Runtime::function_started(function_arguments);
f__cleanup();
TTCN_Runtime::function_finished("f_cleanup");
return TRUE;
} else if (!strcmp(function_name, "f_start_handler")) {
void__fn fn;
CHARSTRING id;
INTEGER imsi__suffix;
FLOAT t__guard;
INTEGER sgsn__idx;
INTEGER nri__idx;
BOOLEAN have__ptmsi;
fn.decode_text(function_arguments);
id.decode_text(function_arguments);
imsi__suffix.decode_text(function_arguments);
t__guard.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
have__ptmsi.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handler(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
imsi__suffix.log();
TTCN_Logger::log_event_str(", ");
t__guard.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
have__ptmsi.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__start__handler(fn, id, imsi__suffix, t__guard, sgsn__idx, nri__idx, have__ptmsi);
TTCN_Runtime::function_finished("f_start_handler");
return TRUE;
} else if (!strcmp(function_name, "f_start_handlers")) {
void__fn fn;
CHARSTRING id;
INTEGER imsi__suffix;
FLOAT t__guard;
BOOLEAN have__ptmsi;
fn.decode_text(function_arguments);
id.decode_text(function_arguments);
imsi__suffix.decode_text(function_arguments);
t__guard.decode_text(function_arguments);
have__ptmsi.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handlers(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
imsi__suffix.log();
TTCN_Logger::log_event_str(", ");
t__guard.log();
TTCN_Logger::log_event_str(", ");
have__ptmsi.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__start__handlers(fn, id, imsi__suffix, t__guard, have__ptmsi);
TTCN_Runtime::function_finished("f_start_handlers");
return TRUE;
} else if (!strcmp(function_name, "f_connect_to_pcu_bvc")) {
INTEGER port__idx;
INTEGER nse__idx;
INTEGER bvc__idx;
port__idx.decode_text(function_arguments);
nse__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_connect_to_pcu_bvc(");
port__idx.log();
TTCN_Logger::log_event_str(", ");
nse__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__connect__to__pcu__bvc(port__idx, nse__idx, bvc__idx);
TTCN_Runtime::function_finished("f_connect_to_pcu_bvc");
return TRUE;
} else if (!strcmp(function_name, "f_connect_to_sgsn_bvc")) {
INTEGER port__idx;
COMPONENT bvc__ct;
port__idx.decode_text(function_arguments);
bvc__ct.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_connect_to_sgsn_bvc(");
port__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__ct.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__connect__to__sgsn__bvc(port__idx, bvc__ct);
TTCN_Runtime::function_finished("f_connect_to_sgsn_bvc");
return TRUE;
} else if (!strcmp(function_name, "f_handler_init")) {
void__fn fn;
CHARSTRING id;
BSSGP__ConnHdlrPars pars;
fn.decode_text(function_arguments);
id.decode_text(function_arguments);
pars.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_handler_init(");
fn.log();
TTCN_Logger::log_event_str(", ");
id.log();
TTCN_Logger::log_event_str(", ");
pars.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__handler__init(fn, id, pars);
TTCN_Runtime::function_finished("f_handler_init");
return TRUE;
} else if (!strcmp(function_name, "f_pcu2sgsn")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER pcu__idx;
BOOLEAN use__sig;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__pcu2sgsn(tx, exp__rx, pcu__idx, use__sig);
TTCN_Runtime::function_finished("f_pcu2sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_pcu2any_sgsn")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER pcu__idx;
BOOLEAN use__sig;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_pcu2any_sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__pcu2any__sgsn(tx, exp__rx, pcu__idx, use__sig);
TTCN_Runtime::function_finished("f_pcu2any_sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_sgsn2pcu")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER pcu__idx;
BOOLEAN use__sig;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__sgsn2pcu(tx, exp__rx, pcu__idx, use__sig);
TTCN_Runtime::function_finished("f_sgsn2pcu");
return TRUE;
} else if (!strcmp(function_name, "f_global_init")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_global_init().");
TTCN_Runtime::function_started(function_arguments);
f__global__init();
TTCN_Runtime::function_finished("f_global_init");
return TRUE;
} else if (!strcmp(function_name, "f_global_init_ptp")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_global_init_ptp().");
TTCN_Runtime::function_started(function_arguments);
f__global__init__ptp();
TTCN_Runtime::function_finished("f_global_init_ptp");
return TRUE;
} else if (!strcmp(function_name, "f_global_ptp_connect_sgsn_bvci")) {
INTEGER sgsn__idx;
INTEGER bvci;
sgsn__idx.decode_text(function_arguments);
bvci.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_ptp_connect_sgsn_bvci(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__global__ptp__connect__sgsn__bvci(sgsn__idx, bvci);
TTCN_Runtime::function_finished("f_global_ptp_connect_sgsn_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_global_ptp_connect_pcu_bvci")) {
INTEGER pcu__idx;
INTEGER bvci;
pcu__idx.decode_text(function_arguments);
bvci.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_ptp_connect_pcu_bvci(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__global__ptp__connect__pcu__bvci(pcu__idx, bvci);
TTCN_Runtime::function_finished("f_global_ptp_connect_pcu_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_global_pcu2sgsn")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER pcu__idx;
INTEGER sgsn__idx;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__global__pcu2sgsn(tx, exp__rx, pcu__idx, sgsn__idx);
TTCN_Runtime::function_finished("f_global_pcu2sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_global_sgsn2pcu")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER sgsn__idx;
INTEGER pcu__idx;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_global_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__global__sgsn2pcu(tx, exp__rx, sgsn__idx, pcu__idx);
TTCN_Runtime::function_finished("f_global_sgsn2pcu");
return TRUE;
} else if (!strcmp(function_name, "f_TC_BVC_bringup")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_BVC_bringup(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__BVC__bringup(id);
TTCN_Runtime::function_finished("f_TC_BVC_bringup");
return TRUE;
} else if (!strcmp(function_name, "f_bssgp_suspend")) {
INTEGER ran__idx;
ran__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bssgp_suspend(");
ran__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__bssgp__suspend(ran__idx);
TTCN_Runtime::function_finished("f_bssgp_suspend");
return TRUE;
} else if (!strcmp(function_name, "f_bssgp_resume")) {
OCTETSTRING susp__ref;
INTEGER ran__idx;
susp__ref.decode_text(function_arguments);
ran__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_bssgp_resume(");
susp__ref.log();
TTCN_Logger::log_event_str(", ");
ran__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__bssgp__resume(susp__ref, ran__idx);
TTCN_Runtime::function_finished("f_bssgp_resume");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ul_unitdata")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ul_unitdata(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ul__unitdata(id);
TTCN_Runtime::function_finished("f_TC_ul_unitdata");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ul_unitdata_pool_failure")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ul_unitdata_pool_failure(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ul__unitdata__pool__failure(id);
TTCN_Runtime::function_finished("f_TC_ul_unitdata_pool_failure");
return TRUE;
} else if (!strcmp(function_name, "f_disable_ns_pcu")) {
INTEGER pcu__idx;
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_disable_ns_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__disable__ns__pcu(pcu__idx);
TTCN_Runtime::function_finished("f_disable_ns_pcu");
return TRUE;
} else if (!strcmp(function_name, "f_TC_dl_unitdata")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dl_unitdata(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__dl__unitdata(id);
TTCN_Runtime::function_finished("f_TC_dl_unitdata");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ra_capability")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ra_capability(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ra__capability(id);
TTCN_Runtime::function_finished("f_TC_ra_capability");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ra_capability_upd")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ra_capability_upd(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ra__capability__upd(id);
TTCN_Runtime::function_finished("f_TC_ra_capability_upd");
return TRUE;
} else if (!strcmp(function_name, "f_TC_radio_status")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__radio__status(id);
TTCN_Runtime::function_finished("f_TC_radio_status");
return TRUE;
} else if (!strcmp(function_name, "f_TC_radio_status_tmsi")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status_tmsi(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__radio__status__tmsi(id);
TTCN_Runtime::function_finished("f_TC_radio_status_tmsi");
return TRUE;
} else if (!strcmp(function_name, "f_TC_radio_status_imsi")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_radio_status_imsi(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__radio__status__imsi(id);
TTCN_Runtime::function_finished("f_TC_radio_status_imsi");
return TRUE;
} else if (!strcmp(function_name, "f_suspend_one")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
INTEGER suffix;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
suffix.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_suspend_one(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(", ");
suffix.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__suspend__one(sgsn__idx, nri__idx, pcu__idx, bvc__idx, suffix);
TTCN_Runtime::function_finished("f_suspend_one");
return TRUE;
} else if (!strcmp(function_name, "f_TC_suspend")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_suspend(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__suspend(sgsn__idx, nri__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_suspend");
return TRUE;
} else if (!strcmp(function_name, "f_resume_one")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
INTEGER suffix;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
suffix.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_resume_one(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(", ");
suffix.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__resume__one(sgsn__idx, nri__idx, pcu__idx, bvc__idx, suffix);
TTCN_Runtime::function_finished("f_resume_one");
return TRUE;
} else if (!strcmp(function_name, "f_TC_resume")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_resume(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__resume(sgsn__idx, nri__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_resume");
return TRUE;
} else if (!strcmp(function_name, "f_TC_dl_ud_unidir")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dl_ud_unidir(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__dl__ud__unidir(id);
TTCN_Runtime::function_finished("f_TC_dl_ud_unidir");
return TRUE;
} else if (!strcmp(function_name, "f_TC_load_sharing_dl")) {
INTEGER sgsn__idx;
sgsn__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_load_sharing_dl(");
sgsn__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__load__sharing__dl(sgsn__idx);
TTCN_Runtime::function_finished("f_TC_load_sharing_dl");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_ps")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__ps(p4, sgsn__idx, use__sig);
TTCN_Runtime::function_finished("f_send_paging_ps");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_ps_exp_one_bss")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
INTEGER pcu__idx;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_one_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__ps__exp__one__bss(p4, sgsn__idx, use__sig, pcu__idx);
TTCN_Runtime::function_finished("f_send_paging_ps_exp_one_bss");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_ps_exp_no_bss")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_no_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__ps__exp__no__bss(p4, sgsn__idx, use__sig);
TTCN_Runtime::function_finished("f_send_paging_ps_exp_no_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_bss")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bss(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__bss(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_lac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_lac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__lac(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_lac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_lac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__lac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_lac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_rac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_rac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__rac(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_rac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_rac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__rac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_rac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_reject_ptp_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_reject_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__reject__ptp__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_reject_ptp_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_ptp_bvci_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_ptp_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__ptp__bvci__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_ptp_bvci_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_dummy_paging_ps_ptp")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dummy_paging_ps_ptp(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__dummy__paging__ps__ptp(id);
TTCN_Runtime::function_finished("f_TC_dummy_paging_ps_ptp");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_ps_exp_multi")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
Osmocom__Types::ro__integer exp__on__pcu__idx;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
exp__on__pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_exp_multi(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
exp__on__pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__ps__exp__multi(p4, sgsn__idx, exp__on__pcu__idx);
TTCN_Runtime::function_finished("f_send_paging_ps_exp_multi");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_ps_rej")) {
BOOLEAN use__sig;
INTEGER pcu__idx;
use__sig.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_ps_rej(");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__ps__rej(use__sig, pcu__idx);
TTCN_Runtime::function_finished("f_send_paging_ps_rej");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_bss")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bss(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__bss(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_lac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_lac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__lac(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_lac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_lac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__lac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_lac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_rac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_rac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__rac(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_rac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_rac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__rac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_rac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_reject_sig_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_reject_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__reject__sig__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_reject_sig_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_ps_sig_bvci_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_ps_sig_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__ps__sig__bvci__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_ps_sig_bvci_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_dummy_paging_ps_sig")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_dummy_paging_ps_sig(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__dummy__paging__ps__sig(id);
TTCN_Runtime::function_finished("f_TC_dummy_paging_ps_sig");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_cs")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__cs(p4, sgsn__idx, use__sig);
TTCN_Runtime::function_finished("f_send_paging_cs");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_cs_exp_one_bss")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
INTEGER pcu__idx;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_one_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__cs__exp__one__bss(p4, sgsn__idx, use__sig, pcu__idx);
TTCN_Runtime::function_finished("f_send_paging_cs_exp_one_bss");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_cs_exp_no_bss")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
BOOLEAN use__sig;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
use__sig.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_no_bss(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
use__sig.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__cs__exp__no__bss(p4, sgsn__idx, use__sig);
TTCN_Runtime::function_finished("f_send_paging_cs_exp_no_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_bss")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bss(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__bss(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_lac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_lac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__lac(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_lac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_lac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__lac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_lac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_rac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_rac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__rac(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_rac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_rac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__rac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_rac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_ptp_bvci_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_ptp_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__ptp__bvci__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_ptp_bvci_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_send_paging_cs_exp_multi")) {
BSSGP__Types::Paging__Field4_template p4;
INTEGER sgsn__idx;
Osmocom__Types::ro__integer exp__on__pcu__idx;
p4.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
exp__on__pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_send_paging_cs_exp_multi(");
p4.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
exp__on__pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__send__paging__cs__exp__multi(p4, sgsn__idx, exp__on__pcu__idx);
TTCN_Runtime::function_finished("f_send_paging_cs_exp_multi");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_bss")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bss(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__bss(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_bss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_lac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_lac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__lac(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_lac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_lac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_lac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__lac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_lac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_rac")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_rac(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__rac(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_rac");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_rac_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_rac_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__rac__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_rac_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_bvci")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bvci(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__bvci(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_bvci");
return TRUE;
} else if (!strcmp(function_name, "f_TC_paging_cs_sig_bvci_unknown")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_paging_cs_sig_bvci_unknown(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__paging__cs__sig__bvci__unknown(id);
TTCN_Runtime::function_finished("f_TC_paging_cs_sig_bvci_unknown");
return TRUE;
} else if (!strcmp(function_name, "f_TC_flush_ll_bvci_new")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_flush_ll_bvci_new(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__flush__ll__bvci__new(id);
TTCN_Runtime::function_finished("f_TC_flush_ll_bvci_new");
return TRUE;
} else if (!strcmp(function_name, "f_TC_flush_ll_no_bvci_new")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_flush_ll_no_bvci_new(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__flush__ll__no__bvci__new(id);
TTCN_Runtime::function_finished("f_TC_flush_ll_no_bvci_new");
return TRUE;
} else if (!strcmp(function_name, "f_TC_llc_discarded")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_llc_discarded(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__llc__discarded(id);
TTCN_Runtime::function_finished("f_TC_llc_discarded");
return TRUE;
} else if (!strcmp(function_name, "f_block_ptp_bvc_from_pcu")) {
INTEGER pcu__idx;
INTEGER bvc__idx;
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_block_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__block__ptp__bvc__from__pcu(pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_block_ptp_bvc_from_pcu");
return TRUE;
} else if (!strcmp(function_name, "f_unblock_ptp_bvc_from_pcu")) {
INTEGER pcu__idx;
INTEGER bvc__idx;
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_unblock_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__unblock__ptp__bvc__from__pcu(pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_unblock_ptp_bvc_from_pcu");
return TRUE;
} else if (!strcmp(function_name, "f_get_sgsn_bvc_ct")) {
INTEGER sgsn__idx;
INTEGER bvci;
sgsn__idx.decode_text(function_arguments);
bvci.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_get_sgsn_bvc_ct(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
bvci.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__get__sgsn__bvc__ct(sgsn__idx, bvci);
TTCN_Runtime::function_finished("f_get_sgsn_bvc_ct");
return TRUE;
} else if (!strcmp(function_name, "f_reset_ptp_bvc_from_pcu")) {
INTEGER pcu__idx;
INTEGER bvc__idx;
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_reset_ptp_bvc_from_pcu(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__reset__ptp__bvc__from__pcu(pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_reset_ptp_bvc_from_pcu");
return TRUE;
} else if (!strcmp(function_name, "f_reset_ptp_bvc_from_sgsn")) {
INTEGER pcu__idx;
INTEGER bvc__idx;
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_reset_ptp_bvc_from_sgsn(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__reset__ptp__bvc__from__sgsn(pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_reset_ptp_bvc_from_sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_TC_fc_ms")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_fc_ms(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__fc__ms(id);
TTCN_Runtime::function_finished("f_TC_fc_ms");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ms_reg_enq")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ms_reg_enq(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ms__reg__enq(id);
TTCN_Runtime::function_finished("f_TC_ms_reg_enq");
return TRUE;
} else if (!strcmp(function_name, "f_rim_pcu2sgsn")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER pcu__idx;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_pcu2sgsn(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__rim__pcu2sgsn(tx, exp__rx, pcu__idx);
TTCN_Runtime::function_finished("f_rim_pcu2sgsn");
return TRUE;
} else if (!strcmp(function_name, "f_rim_sgsn2pcu")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER sgsn__idx;
INTEGER pcu__idx;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_sgsn2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__rim__sgsn2pcu(tx, exp__rx, sgsn__idx, pcu__idx);
TTCN_Runtime::function_finished("f_rim_sgsn2pcu");
return TRUE;
} else if (!strcmp(function_name, "f_rim_pcu2pcu")) {
BSSGP__Types::PDU__BSSGP_template tx;
BSSGP__Types::PDU__BSSGP_template exp__rx;
INTEGER src__pcu__idx;
INTEGER dst__pcu__idx;
tx.decode_text(function_arguments);
exp__rx.decode_text(function_arguments);
src__pcu__idx.decode_text(function_arguments);
dst__pcu__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_pcu2pcu(");
tx.log();
TTCN_Logger::log_event_str(", ");
exp__rx.log();
TTCN_Logger::log_event_str(", ");
src__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
dst__pcu__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__rim__pcu2pcu(tx, exp__rx, src__pcu__idx, dst__pcu__idx);
TTCN_Runtime::function_finished("f_rim_pcu2pcu");
return TRUE;
} else if (!strcmp(function_name, "f_rim_iterator")) {
rim__fn fn;
fn.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_rim_iterator(");
fn.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__rim__iterator(fn);
TTCN_Runtime::function_finished("f_rim_iterator");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info_req")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_req(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info__req(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info_req");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info_ack")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_ack(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info__ack(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info_ack");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info_error")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_error(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info__error(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info_error");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info_app_error")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_app_error(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info__app__error(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info_app_error");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_info_pcu2pcu")) {
INTEGER src__pcu__idx;
INTEGER src__bvc__idx;
INTEGER dst__pcu__idx;
INTEGER dst__bvc__idx;
src__pcu__idx.decode_text(function_arguments);
src__bvc__idx.decode_text(function_arguments);
dst__pcu__idx.decode_text(function_arguments);
dst__bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_info_pcu2pcu(");
src__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
src__bvc__idx.log();
TTCN_Logger::log_event_str(", ");
dst__pcu__idx.log();
TTCN_Logger::log_event_str(", ");
dst__bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__info__pcu2pcu(src__pcu__idx, src__bvc__idx, dst__pcu__idx, dst__bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_info_pcu2pcu");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rim_from_eutran")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
INTEGER bvc__idx;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
bvc__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rim_from_eutran(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
bvc__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rim__from__eutran(sgsn__idx, pcu__idx, bvc__idx);
TTCN_Runtime::function_finished("f_TC_rim_from_eutran");
return TRUE;
} else if (!strcmp(function_name, "f_gen_tmsi_for_sgsn_nri")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_gen_tmsi_for_sgsn_nri(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__gen__tmsi__for__sgsn__nri(sgsn__idx, nri__idx);
TTCN_Runtime::function_finished("f_gen_tmsi_for_sgsn_nri");
return TRUE;
} else if (!strcmp(function_name, "f_gen_tlli_for_sgsn_nri")) {
INTEGER sgsn__idx;
INTEGER nri__idx;
sgsn__idx.decode_text(function_arguments);
nri__idx.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_gen_tlli_for_sgsn_nri(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
nri__idx.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__gen__tlli__for__sgsn__nri(sgsn__idx, nri__idx);
TTCN_Runtime::function_finished("f_gen_tlli_for_sgsn_nri");
return TRUE;
} else if (!strcmp(function_name, "f_TC_status_ul")) {
INTEGER pcu__idx;
INTEGER sgsn__idx;
BSSGP__Types::PDU__BSSGP inner;
pcu__idx.decode_text(function_arguments);
sgsn__idx.decode_text(function_arguments);
inner.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_status_ul(");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
inner.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__status__ul(pcu__idx, sgsn__idx, inner);
TTCN_Runtime::function_finished("f_TC_status_ul");
return TRUE;
} else if (!strcmp(function_name, "f_TC_status_dl")) {
INTEGER sgsn__idx;
INTEGER pcu__idx;
BSSGP__Types::PDU__BSSGP inner;
sgsn__idx.decode_text(function_arguments);
pcu__idx.decode_text(function_arguments);
inner.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_status_dl(");
sgsn__idx.log();
TTCN_Logger::log_event_str(", ");
pcu__idx.log();
TTCN_Logger::log_event_str(", ");
inner.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__status__dl(sgsn__idx, pcu__idx, inner);
TTCN_Runtime::function_finished("f_TC_status_dl");
return TRUE;
} else return FALSE;
}

void module_control_part()
{
TTCN_Location current_location("GBProxy_Tests.ttcn", 3699, TTCN_Location::LOCATION_CONTROLPART, "GBProxy_Tests");
TTCN_Runtime::begin_controlpart("GBProxy_Tests");
current_location.update_lineno(3700);
/* GBProxy_Tests.ttcn, line 3700 */
testcase_TC__BVC__bringup(FALSE, 0.0);
current_location.update_lineno(3701);
/* GBProxy_Tests.ttcn, line 3701 */
testcase_TC__BVC__bringup__conflicting(FALSE, 0.0);
current_location.update_lineno(3703);
/* GBProxy_Tests.ttcn, line 3703 */
testcase_TC__ul__unitdata(FALSE, 0.0);
current_location.update_lineno(3704);
/* GBProxy_Tests.ttcn, line 3704 */
testcase_TC__ul__unitdata__pool__failure(FALSE, 0.0);
current_location.update_lineno(3705);
/* GBProxy_Tests.ttcn, line 3705 */
testcase_TC__dl__unitdata(FALSE, 0.0);
current_location.update_lineno(3706);
/* GBProxy_Tests.ttcn, line 3706 */
testcase_TC__ra__capability(FALSE, 0.0);
current_location.update_lineno(3707);
/* GBProxy_Tests.ttcn, line 3707 */
testcase_TC__ra__capability__upd(FALSE, 0.0);
current_location.update_lineno(3708);
/* GBProxy_Tests.ttcn, line 3708 */
testcase_TC__radio__status(FALSE, 0.0);
current_location.update_lineno(3709);
/* GBProxy_Tests.ttcn, line 3709 */
testcase_TC__radio__status__tmsi(FALSE, 0.0);
current_location.update_lineno(3710);
/* GBProxy_Tests.ttcn, line 3710 */
testcase_TC__radio__status__imsi(FALSE, 0.0);
current_location.update_lineno(3711);
/* GBProxy_Tests.ttcn, line 3711 */
testcase_TC__suspend(FALSE, 0.0);
current_location.update_lineno(3712);
/* GBProxy_Tests.ttcn, line 3712 */
testcase_TC__resume(FALSE, 0.0);
current_location.update_lineno(3713);
/* GBProxy_Tests.ttcn, line 3713 */
testcase_TC__trace(FALSE, 0.0);
current_location.update_lineno(3714);
/* GBProxy_Tests.ttcn, line 3714 */
testcase_TC__llc__discarded(FALSE, 0.0);
current_location.update_lineno(3715);
/* GBProxy_Tests.ttcn, line 3715 */
testcase_TC__overload(FALSE, 0.0);
current_location.update_lineno(3716);
/* GBProxy_Tests.ttcn, line 3716 */
testcase_TC__bvc__block__ptp(FALSE, 0.0);
current_location.update_lineno(3717);
/* GBProxy_Tests.ttcn, line 3717 */
testcase_TC__bvc__unblock__ptp(FALSE, 0.0);
current_location.update_lineno(3718);
/* GBProxy_Tests.ttcn, line 3718 */
testcase_TC__bvc__reset__ptp__from__bss(FALSE, 0.0);
current_location.update_lineno(3719);
/* GBProxy_Tests.ttcn, line 3719 */
testcase_TC__bvc__reset__sig__from__bss(FALSE, 0.0);
current_location.update_lineno(3720);
/* GBProxy_Tests.ttcn, line 3720 */
testcase_TC__bvc__reset__ptp__from__sgsn(FALSE, 0.0);
current_location.update_lineno(3721);
/* GBProxy_Tests.ttcn, line 3721 */
testcase_TC__bvc__reset__blocked__ptp__from__sgsn(FALSE, 0.0);
current_location.update_lineno(3722);
/* GBProxy_Tests.ttcn, line 3722 */
testcase_TC__bvc__reset__sig__from__sgsn(FALSE, 0.0);
current_location.update_lineno(3723);
/* GBProxy_Tests.ttcn, line 3723 */
if (mp__enable__bss__load__sharing) {
current_location.update_lineno(3725);
/* GBProxy_Tests.ttcn, line 3725 */
testcase_TC__load__sharing__dl(FALSE, 0.0);
}
current_location.update_lineno(3729);
/* GBProxy_Tests.ttcn, line 3729 */
testcase_TC__paging__ps__ptp__bss(FALSE, 0.0);
current_location.update_lineno(3730);
/* GBProxy_Tests.ttcn, line 3730 */
testcase_TC__paging__ps__ptp__lac(FALSE, 0.0);
current_location.update_lineno(3731);
/* GBProxy_Tests.ttcn, line 3731 */
testcase_TC__paging__ps__ptp__lac__unknown(FALSE, 0.0);
current_location.update_lineno(3732);
/* GBProxy_Tests.ttcn, line 3732 */
testcase_TC__paging__ps__ptp__rac(FALSE, 0.0);
current_location.update_lineno(3733);
/* GBProxy_Tests.ttcn, line 3733 */
testcase_TC__paging__ps__ptp__rac__unknown(FALSE, 0.0);
current_location.update_lineno(3734);
/* GBProxy_Tests.ttcn, line 3734 */
testcase_TC__paging__ps__ptp__bvci(FALSE, 0.0);
current_location.update_lineno(3735);
/* GBProxy_Tests.ttcn, line 3735 */
testcase_TC__paging__ps__ptp__bvci__imsi(FALSE, 0.0);
current_location.update_lineno(3736);
/* GBProxy_Tests.ttcn, line 3736 */
testcase_TC__paging__ps__ptp__bvci__unknown(FALSE, 0.0);
current_location.update_lineno(3737);
/* GBProxy_Tests.ttcn, line 3737 */
testcase_TC__paging__ps__reject__ptp__bvci(FALSE, 0.0);
current_location.update_lineno(3738);
/* GBProxy_Tests.ttcn, line 3738 */
testcase_TC__paging__ps__reject__ptp__bvci__imsi(FALSE, 0.0);
current_location.update_lineno(3739);
/* GBProxy_Tests.ttcn, line 3739 */
testcase_TC__dummy__paging__ps__ptp(FALSE, 0.0);
current_location.update_lineno(3742);
/* GBProxy_Tests.ttcn, line 3742 */
testcase_TC__paging__ps__sig__bss(FALSE, 0.0);
current_location.update_lineno(3743);
/* GBProxy_Tests.ttcn, line 3743 */
testcase_TC__paging__ps__sig__lac(FALSE, 0.0);
current_location.update_lineno(3744);
/* GBProxy_Tests.ttcn, line 3744 */
testcase_TC__paging__ps__sig__lac__unknown(FALSE, 0.0);
current_location.update_lineno(3745);
/* GBProxy_Tests.ttcn, line 3745 */
testcase_TC__paging__ps__sig__rac(FALSE, 0.0);
current_location.update_lineno(3746);
/* GBProxy_Tests.ttcn, line 3746 */
testcase_TC__paging__ps__sig__rac__unknown(FALSE, 0.0);
current_location.update_lineno(3747);
/* GBProxy_Tests.ttcn, line 3747 */
testcase_TC__paging__ps__sig__bvci(FALSE, 0.0);
current_location.update_lineno(3748);
/* GBProxy_Tests.ttcn, line 3748 */
testcase_TC__paging__ps__sig__bvci__imsi(FALSE, 0.0);
current_location.update_lineno(3749);
/* GBProxy_Tests.ttcn, line 3749 */
testcase_TC__paging__ps__sig__bvci__unknown(FALSE, 0.0);
current_location.update_lineno(3750);
/* GBProxy_Tests.ttcn, line 3750 */
testcase_TC__paging__ps__reject__sig__bvci(FALSE, 0.0);
current_location.update_lineno(3751);
/* GBProxy_Tests.ttcn, line 3751 */
testcase_TC__paging__ps__reject__sig__bvci__imsi(FALSE, 0.0);
current_location.update_lineno(3752);
/* GBProxy_Tests.ttcn, line 3752 */
testcase_TC__dummy__paging__ps__sig(FALSE, 0.0);
current_location.update_lineno(3755);
/* GBProxy_Tests.ttcn, line 3755 */
testcase_TC__paging__cs__ptp__bss(FALSE, 0.0);
current_location.update_lineno(3756);
/* GBProxy_Tests.ttcn, line 3756 */
testcase_TC__paging__cs__ptp__lac(FALSE, 0.0);
current_location.update_lineno(3757);
/* GBProxy_Tests.ttcn, line 3757 */
testcase_TC__paging__cs__ptp__lac__unknown(FALSE, 0.0);
current_location.update_lineno(3758);
/* GBProxy_Tests.ttcn, line 3758 */
testcase_TC__paging__cs__ptp__rac(FALSE, 0.0);
current_location.update_lineno(3759);
/* GBProxy_Tests.ttcn, line 3759 */
testcase_TC__paging__cs__ptp__rac__unknown(FALSE, 0.0);
current_location.update_lineno(3760);
/* GBProxy_Tests.ttcn, line 3760 */
testcase_TC__paging__cs__ptp__bvci(FALSE, 0.0);
current_location.update_lineno(3761);
/* GBProxy_Tests.ttcn, line 3761 */
testcase_TC__paging__cs__ptp__bvci__unknown(FALSE, 0.0);
current_location.update_lineno(3764);
/* GBProxy_Tests.ttcn, line 3764 */
testcase_TC__paging__cs__sig__bss(FALSE, 0.0);
current_location.update_lineno(3765);
/* GBProxy_Tests.ttcn, line 3765 */
testcase_TC__paging__cs__sig__lac(FALSE, 0.0);
current_location.update_lineno(3766);
/* GBProxy_Tests.ttcn, line 3766 */
testcase_TC__paging__cs__sig__lac__unknown(FALSE, 0.0);
current_location.update_lineno(3767);
/* GBProxy_Tests.ttcn, line 3767 */
testcase_TC__paging__cs__sig__rac(FALSE, 0.0);
current_location.update_lineno(3768);
/* GBProxy_Tests.ttcn, line 3768 */
testcase_TC__paging__cs__sig__rac__unknown(FALSE, 0.0);
current_location.update_lineno(3769);
/* GBProxy_Tests.ttcn, line 3769 */
testcase_TC__paging__cs__sig__bvci(FALSE, 0.0);
current_location.update_lineno(3770);
/* GBProxy_Tests.ttcn, line 3770 */
testcase_TC__paging__cs__sig__bvci__unknown(FALSE, 0.0);
current_location.update_lineno(3773);
/* GBProxy_Tests.ttcn, line 3773 */
testcase_TC__rim__info__req(FALSE, 0.0);
current_location.update_lineno(3774);
/* GBProxy_Tests.ttcn, line 3774 */
testcase_TC__rim__info(FALSE, 0.0);
current_location.update_lineno(3775);
/* GBProxy_Tests.ttcn, line 3775 */
testcase_TC__rim__info__ack(FALSE, 0.0);
current_location.update_lineno(3776);
/* GBProxy_Tests.ttcn, line 3776 */
testcase_TC__rim__info__error(FALSE, 0.0);
current_location.update_lineno(3777);
/* GBProxy_Tests.ttcn, line 3777 */
testcase_TC__rim__info__app__error(FALSE, 0.0);
current_location.update_lineno(3778);
/* GBProxy_Tests.ttcn, line 3778 */
testcase_TC__rim__info__pcu2pcu(FALSE, 0.0);
current_location.update_lineno(3779);
/* GBProxy_Tests.ttcn, line 3779 */
testcase_TC__rim__from__eutran(FALSE, 0.0);
current_location.update_lineno(3782);
/* GBProxy_Tests.ttcn, line 3782 */
testcase_TC__flush__ll__bvci__new(FALSE, 0.0);
current_location.update_lineno(3784);
/* GBProxy_Tests.ttcn, line 3784 */
testcase_TC__flush__ll__no__bvci__new(FALSE, 0.0);
current_location.update_lineno(3786);
/* GBProxy_Tests.ttcn, line 3786 */
testcase_TC__fc__bvc(FALSE, 0.0);
current_location.update_lineno(3787);
/* GBProxy_Tests.ttcn, line 3787 */
testcase_TC__fc__ms(FALSE, 0.0);
current_location.update_lineno(3788);
/* GBProxy_Tests.ttcn, line 3788 */
testcase_TC__ms__reg__enq(FALSE, 0.0);
current_location.update_lineno(3791);
/* GBProxy_Tests.ttcn, line 3791 */
testcase_TC__status__sig__ul__tlli(FALSE, 0.0);
current_location.update_lineno(3792);
/* GBProxy_Tests.ttcn, line 3792 */
testcase_TC__status__sig__ul__tmsi(FALSE, 0.0);
current_location.update_lineno(3793);
/* GBProxy_Tests.ttcn, line 3793 */
testcase_TC__status__ptp__ul__tlli(FALSE, 0.0);
current_location.update_lineno(3794);
/* GBProxy_Tests.ttcn, line 3794 */
testcase_TC__status__ptp__ul__tmsi(FALSE, 0.0);
current_location.update_lineno(3797);
/* GBProxy_Tests.ttcn, line 3797 */
testcase_TC__status__sig__dl__bvci(FALSE, 0.0);
current_location.update_lineno(3798);
/* GBProxy_Tests.ttcn, line 3798 */
testcase_TC__status__ptp__dl__bvci(FALSE, 0.0);
TTCN_Runtime::end_controlpart();
}


} /* end of namespace */
