// This C++ source file was generated by the TTCN-3 compiler // of the TTCN-3 Test Executor version 11.1.0 // The generation of user and time information were disabled by the -D flag. // Copyright (c) 2000-2025 Ericsson Telecom AB // Do not edit this file unless you know what you are doing. /* Including header files */ #include "RAN_Emulation.hh" namespace RAN__Emulation { /* Literal string constants */ const unsigned char bs_4_bits[] = { 96 }, bs_3_bits[] = { 240 }, bs_0_bits[] = { 12 }, bs_1_bits[] = { 10 }, bs_2_bits[] = { 13 }; extern const BITSTRING bs_4(8, bs_4_bits), bs_3(8, bs_3_bits), bs_0(4, bs_0_bits), bs_1(4, bs_1_bits), bs_2(4, bs_2_bits); const unsigned char os_0_octets[] = { 0 }, os_2_octets[] = { 3 }, os_4_octets[] = { 7 }, os_3_octets[] = { 63 }, os_1_octets[] = { 255, 255, 255, 255 }; extern const OCTETSTRING os_0(1, os_0_octets), os_2(1, os_2_octets), os_4(1, os_4_octets), os_3(1, os_3_octets), os_1(4, os_1_octets); extern const CHARSTRING cs_0(4, "omit"); const unsigned char module_checksum[] = { 0x9e, 0x2c, 0x00, 0xee, 0x28, 0xef, 0x0a, 0x3f, 0x0a, 0x10, 0x26, 0x4c, 0xf5, 0x2b, 0x17, 0xa5 }; /* Global variable definitions */ const TTCN_Typedescriptor_t& RAN__ConnHdlr_descr_ = COMPONENT_descr_; RAN__Conn__PT RAN__ConnHdlr_component_RAN__CONN("RAN_CONN"); RAN__PROC__PT RAN__ConnHdlr_component_RAN__CONN__PROC("RAN_CONN_PROC"); // No XER for MSC__CONN__PRIM__CONNECT__RES const TTCN_Typedescriptor_t MSC__CONN__PRIM__CONNECT__RES_descr_ = { "@RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for MSC__CONN__PRIM__DISC__IND const TTCN_Typedescriptor_t MSC__CONN__PRIM__DISC__IND_descr_ = { "@RAN_Emulation.MSC_CONN_PRIM_DISC_IND", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t MSC__CONN__PRIM__DISC__REQ_reason_xer_ = { {"reason>\n", "reason>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t MSC__CONN__PRIM__DISC__REQ_reason_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t MSC__CONN__PRIM__DISC__REQ_reason_descr_ = { "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ.reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &MSC__CONN__PRIM__DISC__REQ_reason_xer_, &INTEGER_json_, &MSC__CONN__PRIM__DISC__REQ_reason_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for MSC__CONN__PRIM__DISC__REQ const TTCN_Typedescriptor_t MSC__CONN__PRIM__DISC__REQ_descr_ = { "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for MSC__CONN__PRIM__CONF__IND const TTCN_Typedescriptor_t MSC__CONN__PRIM__CONF__IND_descr_ = { "@RAN_Emulation.MSC_CONN_PRIM_CONF_IND", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for RAN__Conn__Prim const TTCN_Typedescriptor_t RAN__Conn__Prim_descr_ = { "@RAN_Emulation.RAN_Conn_Prim", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; RAN__Conn__Prim_template template_tr__MSC__CONN__PRIM__CONNECT__RES; const RAN__Conn__Prim_template& tr__MSC__CONN__PRIM__CONNECT__RES = template_tr__MSC__CONN__PRIM__CONNECT__RES; RAN__Conn__Prim_template template_ts__MSC__CONN__PRIM__CONNECT__RES; const RAN__Conn__Prim_template& ts__MSC__CONN__PRIM__CONNECT__RES = template_ts__MSC__CONN__PRIM__CONNECT__RES; RAN__Conn__Prim_template template_tr__MSC__CONN__PRIM__DISC__IND; const RAN__Conn__Prim_template& tr__MSC__CONN__PRIM__DISC__IND = template_tr__MSC__CONN__PRIM__DISC__IND; RAN__Conn__Prim_template template_ts__MSC__CONN__PRIM__DISC__IND; const RAN__Conn__Prim_template& ts__MSC__CONN__PRIM__DISC__IND = template_ts__MSC__CONN__PRIM__DISC__IND; RAN__Conn__Prim_template template_tr__MSC__CONN__PRIM__DISC__REQ; const RAN__Conn__Prim_template& tr__MSC__CONN__PRIM__DISC__REQ = template_tr__MSC__CONN__PRIM__DISC__REQ; INTEGER_template template_ts__MSC__CONN__PRIM__DISC__REQ_reason_defval; const INTEGER_template& ts__MSC__CONN__PRIM__DISC__REQ_reason_defval = template_ts__MSC__CONN__PRIM__DISC__REQ_reason_defval; RAN__Conn__Prim_template template_tr__MSC__CONN__PRIM__CONF__IND; const RAN__Conn__Prim_template& tr__MSC__CONN__PRIM__CONF__IND = template_tr__MSC__CONN__PRIM__CONF__IND; RAN__Conn__Prim_template template_ts__MSC__CONN__PRIM__CONF__IND; const RAN__Conn__Prim_template& ts__MSC__CONN__PRIM__CONF__IND = template_ts__MSC__CONN__PRIM__CONF__IND; // No XER for RAN__Transport const TTCN_Typedescriptor_t RAN__Transport_descr_ = { "@RAN_Emulation.RAN_Transport", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__MO_dtap_default_coding("RAW"); // No XER for PDU__DTAP__MO const TTCN_Typedescriptor_t PDU__DTAP__MO_descr_ = { "@RAN_Emulation.PDU_DTAP_MO", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PDU__DTAP__MO_dlci_xer_ = { {"dlci>\n", "dlci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__MO_dlci_oer_ext_arr_[0] = {}; const int PDU__DTAP__MO_dlci_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__MO_dlci_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PDU__DTAP__MO_dlci_oer_ext_arr_, 0, PDU__DTAP__MO_dlci_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__MO_dlci_descr_ = { "@RAN_Emulation.PDU_DTAP_MO.dlci", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PDU__DTAP__MO_dlci_xer_, &OCTETSTRING_json_, &PDU__DTAP__MO_dlci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__MO_dlci_default_coding("RAW"); const XERdescriptor_t PDU__DTAP__MO_skip__seq__patching_xer_ = { {"skip_seq_patching>\n", "skip_seq_patching>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__MO_skip__seq__patching_oer_ext_arr_[0] = {}; const int PDU__DTAP__MO_skip__seq__patching_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__MO_skip__seq__patching_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PDU__DTAP__MO_skip__seq__patching_oer_ext_arr_, 0, PDU__DTAP__MO_skip__seq__patching_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__MO_skip__seq__patching_descr_ = { "@RAN_Emulation.PDU_DTAP_MO.skip_seq_patching", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &PDU__DTAP__MO_skip__seq__patching_xer_, &BOOLEAN_json_, &PDU__DTAP__MO_skip__seq__patching_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__MT_dtap_default_coding("RAW"); // No XER for PDU__DTAP__MT const TTCN_Typedescriptor_t PDU__DTAP__MT_descr_ = { "@RAN_Emulation.PDU_DTAP_MT", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PDU__DTAP__MT_dlci_xer_ = { {"dlci>\n", "dlci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__MT_dlci_oer_ext_arr_[0] = {}; const int PDU__DTAP__MT_dlci_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__MT_dlci_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PDU__DTAP__MT_dlci_oer_ext_arr_, 0, PDU__DTAP__MT_dlci_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__MT_dlci_descr_ = { "@RAN_Emulation.PDU_DTAP_MT.dlci", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PDU__DTAP__MT_dlci_xer_, &OCTETSTRING_json_, &PDU__DTAP__MT_dlci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__MT_dlci_default_coding("RAW"); UNIVERSAL_CHARSTRING PDU__DTAP__PS__MO_dtap_default_coding("RAW"); // No XER for PDU__DTAP__PS__MO const TTCN_Typedescriptor_t PDU__DTAP__PS__MO_descr_ = { "@RAN_Emulation.PDU_DTAP_PS_MO", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PDU__DTAP__PS__MO_dlci_xer_ = { {"dlci>\n", "dlci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__PS__MO_dlci_oer_ext_arr_[0] = {}; const int PDU__DTAP__PS__MO_dlci_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__PS__MO_dlci_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PDU__DTAP__PS__MO_dlci_oer_ext_arr_, 0, PDU__DTAP__PS__MO_dlci_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__PS__MO_dlci_descr_ = { "@RAN_Emulation.PDU_DTAP_PS_MO.dlci", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PDU__DTAP__PS__MO_dlci_xer_, &OCTETSTRING_json_, &PDU__DTAP__PS__MO_dlci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__PS__MO_dlci_default_coding("RAW"); const XERdescriptor_t PDU__DTAP__PS__MO_skip__seq__patching_xer_ = { {"skip_seq_patching>\n", "skip_seq_patching>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__PS__MO_skip__seq__patching_oer_ext_arr_[0] = {}; const int PDU__DTAP__PS__MO_skip__seq__patching_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__PS__MO_skip__seq__patching_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PDU__DTAP__PS__MO_skip__seq__patching_oer_ext_arr_, 0, PDU__DTAP__PS__MO_skip__seq__patching_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__PS__MO_skip__seq__patching_descr_ = { "@RAN_Emulation.PDU_DTAP_PS_MO.skip_seq_patching", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &PDU__DTAP__PS__MO_skip__seq__patching_xer_, &BOOLEAN_json_, &PDU__DTAP__PS__MO_skip__seq__patching_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__PS__MT_dtap_default_coding("RAW"); // No XER for PDU__DTAP__PS__MT const TTCN_Typedescriptor_t PDU__DTAP__PS__MT_descr_ = { "@RAN_Emulation.PDU_DTAP_PS_MT", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PDU__DTAP__PS__MT_dlci_xer_ = { {"dlci>\n", "dlci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int PDU__DTAP__PS__MT_dlci_oer_ext_arr_[0] = {}; const int PDU__DTAP__PS__MT_dlci_oer_p_[0] = {}; const TTCN_OERdescriptor_t PDU__DTAP__PS__MT_dlci_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PDU__DTAP__PS__MT_dlci_oer_ext_arr_, 0, PDU__DTAP__PS__MT_dlci_oer_p_}; const TTCN_Typedescriptor_t PDU__DTAP__PS__MT_dlci_descr_ = { "@RAN_Emulation.PDU_DTAP_PS_MT.dlci", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PDU__DTAP__PS__MT_dlci_xer_, &OCTETSTRING_json_, &PDU__DTAP__PS__MT_dlci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING PDU__DTAP__PS__MT_dlci_default_coding("RAW"); OCTETSTRING_template template_ts__PDU__DTAP__MT_dlci_defval; const OCTETSTRING_template& ts__PDU__DTAP__MT_dlci_defval = template_ts__PDU__DTAP__MT_dlci_defval; OCTETSTRING_template template_ts__PDU__DTAP__MO_dlci_defval; const OCTETSTRING_template& ts__PDU__DTAP__MO_dlci_defval = template_ts__PDU__DTAP__MO_dlci_defval; BOOLEAN const_ts__PDU__DTAP__MO_skip__seq__patching_defval; const BOOLEAN& ts__PDU__DTAP__MO_skip__seq__patching_defval = const_ts__PDU__DTAP__MO_skip__seq__patching_defval; OCTETSTRING_template template_tr__PDU__DTAP__MT_dlci_defval; const OCTETSTRING_template& tr__PDU__DTAP__MT_dlci_defval = template_tr__PDU__DTAP__MT_dlci_defval; OCTETSTRING_template template_tr__PDU__DTAP__MO_dlci_defval; const OCTETSTRING_template& tr__PDU__DTAP__MO_dlci_defval = template_tr__PDU__DTAP__MO_dlci_defval; OCTETSTRING_template template_ts__PDU__DTAP__PS__MT_dlci_defval; const OCTETSTRING_template& ts__PDU__DTAP__PS__MT_dlci_defval = template_ts__PDU__DTAP__PS__MT_dlci_defval; OCTETSTRING_template template_ts__PDU__DTAP__PS__MO_dlci_defval; const OCTETSTRING_template& ts__PDU__DTAP__PS__MO_dlci_defval = template_ts__PDU__DTAP__PS__MO_dlci_defval; BOOLEAN const_ts__PDU__DTAP__PS__MO_skip__seq__patching_defval; const BOOLEAN& ts__PDU__DTAP__PS__MO_skip__seq__patching_defval = const_ts__PDU__DTAP__PS__MO_skip__seq__patching_defval; OCTETSTRING_template template_tr__PDU__DTAP__PS__MT_dlci_defval; const OCTETSTRING_template& tr__PDU__DTAP__PS__MT_dlci_defval = template_tr__PDU__DTAP__PS__MT_dlci_defval; OCTETSTRING_template template_tr__PDU__DTAP__PS__MO_dlci_defval; const OCTETSTRING_template& tr__PDU__DTAP__PS__MO_dlci_defval = template_tr__PDU__DTAP__PS__MO_dlci_defval; UNIVERSAL_CHARSTRING N__Sd__Array_0_default_coding("RAW"); // No XER for N__Sd__Array const TTCN_Typedescriptor_t N__Sd__Array_descr_ = { "@RAN_Emulation.N_Sd_Array", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ConnectionData_sccp__conn__id_xer_ = { {"sccp_conn_id>\n", "sccp_conn_id>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ConnectionData_sccp__conn__id_descr_ = { "@RAN_Emulation.ConnectionData.sccp_conn_id", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ConnectionData_sccp__conn__id_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ConnectionData const TTCN_Typedescriptor_t ConnectionData_descr_ = { "@RAN_Emulation.ConnectionData", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ConnectionData_cic_xer_ = { {"cic>\n", "cic>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ConnectionData_cic_descr_ = { "@RAN_Emulation.ConnectionData.cic", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ConnectionData_cic_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ImsiMapping_tmsi_xer_ = { {"tmsi>\n", "tmsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ImsiMapping_tmsi_oer_ext_arr_[0] = {}; const int ImsiMapping_tmsi_oer_p_[0] = {}; const TTCN_OERdescriptor_t ImsiMapping_tmsi_oer_ = { -1, TRUE, 4, FALSE, 0, 0, ImsiMapping_tmsi_oer_ext_arr_, 0, ImsiMapping_tmsi_oer_p_}; const TTCN_Typedescriptor_t ImsiMapping_tmsi_descr_ = { "@RAN_Emulation.ImsiMapping.tmsi", &OCTETSTRING_ber_, &General__Types::OCT4_raw_, &OCTETSTRING_text_, &ImsiMapping_tmsi_xer_, &OCTETSTRING_json_, &ImsiMapping_tmsi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING ImsiMapping_tmsi_default_coding("RAW"); // No XER for ImsiMapping const TTCN_Typedescriptor_t ImsiMapping_descr_ = { "@RAN_Emulation.ImsiMapping", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ImsiMapping_imsi_xer_ = { {"imsi>\n", "imsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ImsiMapping_imsi_descr_ = { "@RAN_Emulation.ImsiMapping.imsi", NULL, &HEXSTRING_raw_, NULL, &ImsiMapping_imsi_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for IuSigConIdMapping const TTCN_Typedescriptor_t IuSigConIdMapping_descr_ = { "@RAN_Emulation.IuSigConIdMapping", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IuSigConIdMapping_sigc__id_default_coding(""); const TTCN_Typedescriptor_t& RAN__Emulation__CT_descr_ = COMPONENT_descr_; RANAP__CodecPort::RANAP__CODEC__PT RAN__Emulation__CT_component_RANAP("RANAP"); VALUE_ARRAY RAN__Emulation__CT_component_IuSigConIdTable; RAN__Conn__PT RAN__Emulation__CT_component_CLIENT("CLIENT"); VALUE_ARRAY RAN__Emulation__CT_component_ConnectionTable; const XERdescriptor_t ExpectData_sccp__cr__without__payload_xer_ = { {"sccp_cr_without_payload>\n", "sccp_cr_without_payload>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ExpectData_sccp__cr__without__payload_oer_ext_arr_[0] = {}; const int ExpectData_sccp__cr__without__payload_oer_p_[0] = {}; const TTCN_OERdescriptor_t ExpectData_sccp__cr__without__payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ExpectData_sccp__cr__without__payload_oer_ext_arr_, 0, ExpectData_sccp__cr__without__payload_oer_p_}; const TTCN_Typedescriptor_t ExpectData_sccp__cr__without__payload_descr_ = { "@RAN_Emulation.ExpectData.sccp_cr_without_payload", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &ExpectData_sccp__cr__without__payload_xer_, &BOOLEAN_json_, &ExpectData_sccp__cr__without__payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ExpectData const TTCN_Typedescriptor_t ExpectData_descr_ = { "@RAN_Emulation.ExpectData", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ExpectData_l3__payload_xer_ = { {"l3_payload>\n", "l3_payload>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ExpectData_l3__payload_oer_ext_arr_[0] = {}; const int ExpectData_l3__payload_oer_p_[0] = {}; const TTCN_OERdescriptor_t ExpectData_l3__payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ExpectData_l3__payload_oer_ext_arr_, 0, ExpectData_l3__payload_oer_p_}; const TTCN_Typedescriptor_t ExpectData_l3__payload_descr_ = { "@RAN_Emulation.ExpectData.l3_payload", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ExpectData_l3__payload_xer_, &OCTETSTRING_json_, &ExpectData_l3__payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ExpectData_n__connectPointCode_xer_ = { {"n_connectPointCode>\n", "n_connectPointCode>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ExpectData_n__connectPointCode_descr_ = { "@RAN_Emulation.ExpectData.n_connectPointCode", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ExpectData_n__connectPointCode_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; VALUE_ARRAY RAN__Emulation__CT_component_ExpectTable; VALUE_ARRAY RAN__Emulation__CT_component_ImsiTable; RAN__PROC__PT RAN__Emulation__CT_component_PROC("PROC"); CHARSTRING RAN__Emulation__CT_component_g__ran__id; INTEGER RAN__Emulation__CT_component_g__next__e1__ts; const XERdescriptor_t RanOps_ranap__connect__ind__auto__res_xer_ = { {"ranap_connect_ind_auto_res>\n", "ranap_connect_ind_auto_res>\n"}, {28, 28}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int RanOps_ranap__connect__ind__auto__res_oer_ext_arr_[0] = {}; const int RanOps_ranap__connect__ind__auto__res_oer_p_[0] = {}; const TTCN_OERdescriptor_t RanOps_ranap__connect__ind__auto__res_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RanOps_ranap__connect__ind__auto__res_oer_ext_arr_, 0, RanOps_ranap__connect__ind__auto__res_oer_p_}; const TTCN_Typedescriptor_t RanOps_ranap__connect__ind__auto__res_descr_ = { "@RAN_Emulation.RanOps.ranap_connect_ind_auto_res", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &RanOps_ranap__connect__ind__auto__res_xer_, &BOOLEAN_json_, &RanOps_ranap__connect__ind__auto__res_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t RanOps_ps__domain_xer_ = { {"ps_domain>\n", "ps_domain>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int RanOps_ps__domain_oer_ext_arr_[0] = {}; const int RanOps_ps__domain_oer_p_[0] = {}; const TTCN_OERdescriptor_t RanOps_ps__domain_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RanOps_ps__domain_oer_ext_arr_, 0, RanOps_ps__domain_oer_p_}; const TTCN_Typedescriptor_t RanOps_ps__domain_descr_ = { "@RAN_Emulation.RanOps.ps_domain", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &RanOps_ps__domain_xer_, &BOOLEAN_json_, &RanOps_ps__domain_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t RanOps_decode__dtap_xer_ = { {"decode_dtap>\n", "decode_dtap>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int RanOps_decode__dtap_oer_ext_arr_[0] = {}; const int RanOps_decode__dtap_oer_p_[0] = {}; const TTCN_OERdescriptor_t RanOps_decode__dtap_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RanOps_decode__dtap_oer_ext_arr_, 0, RanOps_decode__dtap_oer_p_}; const TTCN_Typedescriptor_t RanOps_decode__dtap_descr_ = { "@RAN_Emulation.RanOps.decode_dtap", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &RanOps_decode__dtap_xer_, &BOOLEAN_json_, &RanOps_decode__dtap_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t RanOps_role__ms_xer_ = { {"role_ms>\n", "role_ms>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int RanOps_role__ms_oer_ext_arr_[0] = {}; const int RanOps_role__ms_oer_p_[0] = {}; const TTCN_OERdescriptor_t RanOps_role__ms_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RanOps_role__ms_oer_ext_arr_, 0, RanOps_role__ms_oer_p_}; const TTCN_Typedescriptor_t RanOps_role__ms_descr_ = { "@RAN_Emulation.RanOps.role_ms", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &RanOps_role__ms_xer_, &BOOLEAN_json_, &RanOps_role__ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for RanProtocol const TTCN_Typedescriptor_t RanProtocol_descr_ = { "@RAN_Emulation.RanProtocol", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t RanOps_use__osmux_xer_ = { {"use_osmux>\n", "use_osmux>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int RanOps_use__osmux_oer_ext_arr_[0] = {}; const int RanOps_use__osmux_oer_p_[0] = {}; const TTCN_OERdescriptor_t RanOps_use__osmux_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RanOps_use__osmux_oer_ext_arr_, 0, RanOps_use__osmux_oer_p_}; const TTCN_Typedescriptor_t RanOps_use__osmux_descr_ = { "@RAN_Emulation.RanOps.use_osmux", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &RanOps_use__osmux_xer_, &BOOLEAN_json_, &RanOps_use__osmux_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t RanOps_bssap__reset__retries_xer_ = { {"bssap_reset_retries>\n", "bssap_reset_retries>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t RanOps_bssap__reset__retries_descr_ = { "@RAN_Emulation.RanOps.bssap_reset_retries", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &RanOps_bssap__reset__retries_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for RanOps const TTCN_Typedescriptor_t RanOps_descr_ = { "@RAN_Emulation.RanOps", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for RanapCreateCallback const TTCN_Typedescriptor_t RanapCreateCallback_descr_ = { "@RAN_Emulation.RanapCreateCallback", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for RanapUnitdataCallback const TTCN_Typedescriptor_t RanapUnitdataCallback_descr_ = { "@RAN_Emulation.RanapUnitdataCallback", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RanOps_grnc__id_default_coding(""); RanOps RAN__Emulation__CT_component_g__ran__ops; // No XER for RANAP__Conn__Req const TTCN_Typedescriptor_t RANAP__Conn__Req_descr_ = { "@RAN_Emulation.RANAP_Conn_Req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RANAP__Conn__Req_ranap_default_coding(""); SCCPasp__Types::SCCP__PAR__Address_template template_tr__RANAP__Conn__Req_peer_defval; const SCCPasp__Types::SCCP__PAR__Address_template& tr__RANAP__Conn__Req_peer_defval = template_tr__RANAP__Conn__Req_peer_defval; SCCPasp__Types::SCCP__PAR__Address_template template_tr__RANAP__Conn__Req_own_defval; const SCCPasp__Types::SCCP__PAR__Address_template& tr__RANAP__Conn__Req_own_defval = template_tr__RANAP__Conn__Req_own_defval; RANAP__PDU__Descriptions::RANAP__PDU_template template_tr__RANAP__Conn__Req_ranap_defval; const RANAP__PDU__Descriptions::RANAP__PDU_template& tr__RANAP__Conn__Req_ranap_defval = template_tr__RANAP__Conn__Req_ranap_defval; // No XER for RANAP__Conn__Ind const TTCN_Typedescriptor_t RANAP__Conn__Ind_descr_ = { "@RAN_Emulation.RANAP_Conn_Ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING RANAP__Conn__Ind_ranap_default_coding(""); SCCPasp__Types::SCCP__PAR__Address_template template_tr__RANAP__Conn__Ind_peer_defval; const SCCPasp__Types::SCCP__PAR__Address_template& tr__RANAP__Conn__Ind_peer_defval = template_tr__RANAP__Conn__Ind_peer_defval; SCCPasp__Types::SCCP__PAR__Address_template template_tr__RANAP__Conn__Ind_own_defval; const SCCPasp__Types::SCCP__PAR__Address_template& tr__RANAP__Conn__Ind_own_defval = template_tr__RANAP__Conn__Ind_own_defval; RANAP__PDU__Descriptions::RANAP__PDU_template template_tr__RANAP__Conn__Ind_ranap_defval; const RANAP__PDU__Descriptions::RANAP__PDU_template& tr__RANAP__Conn__Ind_ranap_defval = template_tr__RANAP__Conn__Ind_ranap_defval; RANAP__IEs::GlobalRNC__ID_template template_f__ranap__reset_grnc__id_defval; const RANAP__IEs::GlobalRNC__ID_template& f__ranap__reset_grnc__id_defval = template_f__ranap__reset_grnc__id_defval; BITSTRING_template template_t__ML3__DISC__CC__MM__SS; const BITSTRING_template& t__ML3__DISC__CC__MM__SS = template_t__ML3__DISC__CC__MM__SS; BOOLEAN const_as__reset__ack_append__osmux__support_defval; const BOOLEAN& as__reset__ack_append__osmux__support_defval = const_as__reset__ack_append__osmux__support_defval; INTEGER_template template_f__create__expect_n__connectPointCode_defval; const INTEGER_template& f__create__expect_n__connectPointCode_defval = template_f__create__expect_n__connectPointCode_defval; TTCN_Module module_object("RAN_Emulation", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, init_comp_type, init_system_port, start_ptc_function, NULL); const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_11, current_runtime_version.requires_minor_version_1, current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1); /* Member functions of C++ classes */ MSC__CONN__PRIM__CONNECT__RES::MSC__CONN__PRIM__CONNECT__RES() { bound_flag = FALSE; } MSC__CONN__PRIM__CONNECT__RES::MSC__CONN__PRIM__CONNECT__RES(null_type) { bound_flag = TRUE; } MSC__CONN__PRIM__CONNECT__RES::MSC__CONN__PRIM__CONNECT__RES(const MSC__CONN__PRIM__CONNECT__RES& other_value) { other_value.must_bound("Copying an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); bound_flag = TRUE; } MSC__CONN__PRIM__CONNECT__RES& MSC__CONN__PRIM__CONNECT__RES::operator=(null_type) { bound_flag = TRUE; return *this; } MSC__CONN__PRIM__CONNECT__RES& MSC__CONN__PRIM__CONNECT__RES::operator=(const MSC__CONN__PRIM__CONNECT__RES& other_value) { other_value.must_bound("Assignment of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); bound_flag = TRUE; return *this; } boolean MSC__CONN__PRIM__CONNECT__RES::operator==(null_type) const { must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); return TRUE; } boolean MSC__CONN__PRIM__CONNECT__RES::operator==(const MSC__CONN__PRIM__CONNECT__RES& other_value) const { must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); other_value.must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); return TRUE; } void MSC__CONN__PRIM__CONNECT__RES::log() const { if (bound_flag) TTCN_Logger::log_event_str("{ }"); else TTCN_Logger::log_event_unbound(); } void MSC__CONN__PRIM__CONNECT__RES::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "empty record/set value (i.e. { })"); if (param.get_type()!=Module_Param::MP_Value_List || param.get_size()>0) { param.type_error("empty record/set value (i.e. { })", "@RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES"); } bound_flag = TRUE; } void MSC__CONN__PRIM__CONNECT__RES::encode_text(Text_Buf& /*text_buf*/) const { must_bound("Text encoder: Encoding an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } void MSC__CONN__PRIM__CONNECT__RES::decode_text(Text_Buf& /*text_buf*/) { bound_flag = TRUE; } void MSC__CONN__PRIM__CONNECT__RES_template::copy_template(const MSC__CONN__PRIM__CONNECT__RES_template& other_value) { set_selection(other_value); switch (template_selection) { case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__CONNECT__RES_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 MSC__CONN__PRIM__CONNECT__RES_template(*other_value.implication_.precondition); implication_.implied_template = new MSC__CONN__PRIM__CONNECT__RES_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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); break; } } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template() { } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(null_type) : Base_Template(SPECIFIC_VALUE) { } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(const MSC__CONN__PRIM__CONNECT__RES& other_value) : Base_Template(SPECIFIC_VALUE) { other_value.must_bound("Creating a template from an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES from an unbound optional field."); } } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(MSC__CONN__PRIM__CONNECT__RES_template* p_precondition, MSC__CONN__PRIM__CONNECT__RES_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } MSC__CONN__PRIM__CONNECT__RES_template::MSC__CONN__PRIM__CONNECT__RES_template(const MSC__CONN__PRIM__CONNECT__RES_template& other_value) : Base_Template(){ copy_template(other_value); } MSC__CONN__PRIM__CONNECT__RES_template::~MSC__CONN__PRIM__CONNECT__RES_template() { clean_up(); } void MSC__CONN__PRIM__CONNECT__RES_template::clean_up() { switch (template_selection) { 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; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_template::operator=(null_type) { clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_template::operator=(const MSC__CONN__PRIM__CONNECT__RES& other_value) { other_value.must_bound("Assignment of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES to a template."); clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } return *this; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_template::operator=(const MSC__CONN__PRIM__CONNECT__RES_template& other_value) { if (&other_value != this) { clean_up(); set_selection(other_value); } return *this; } boolean MSC__CONN__PRIM__CONNECT__RES_template::match(null_type other_value,boolean) const { switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: return TRUE; case OMIT_VALUE: return FALSE; 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)) 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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } return FALSE; } boolean MSC__CONN__PRIM__CONNECT__RES_template::match(const MSC__CONN__PRIM__CONNECT__RES& other_value, boolean) const { if (!other_value.is_bound()) return FALSE; return match(NULL_VALUE); } MSC__CONN__PRIM__CONNECT__RES MSC__CONN__PRIM__CONNECT__RES_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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); return NULL_VALUE; } void MSC__CONN__PRIM__CONNECT__RES_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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new MSC__CONN__PRIM__CONNECT__RES_template[list_length]; } MSC__CONN__PRIM__CONNECT__RES_template& MSC__CONN__PRIM__CONNECT__RES_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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); return value_list.list_value[list_index]; } void MSC__CONN__PRIM__CONNECT__RES_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__CONNECT__RES_template::log_match(const MSC__CONN__PRIM__CONNECT__RES& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void MSC__CONN__PRIM__CONNECT__RES_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: case SPECIFIC_VALUE: 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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } } void MSC__CONN__PRIM__CONNECT__RES_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: case SPECIFIC_VALUE: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new MSC__CONN__PRIM__CONNECT__RES_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 @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); } } void MSC__CONN__PRIM__CONNECT__RES_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "empty record/set 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: { MSC__CONN__PRIM__CONNECT__RES_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_i0) param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES"); *this = NULL_VALUE; break; case Module_Param::MP_Implication_Template: { MSC__CONN__PRIM__CONNECT__RES_template* precondition = new MSC__CONN__PRIM__CONNECT__RES_template; precondition->set_param(*param.get_elem(0)); MSC__CONN__PRIM__CONNECT__RES_template* implied_template = new MSC__CONN__PRIM__CONNECT__RES_template; implied_template->set_param(*param.get_elem(1)); *this = MSC__CONN__PRIM__CONNECT__RES_template(precondition, implied_template); } break; default: param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES"); } is_ifpresent = param.get_ifpresent(); } void MSC__CONN__PRIM__CONNECT__RES_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; 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 : "@RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES"); } boolean MSC__CONN__PRIM__CONNECT__RES_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean MSC__CONN__PRIM__CONNECT__RES_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_idx0) { param.type_error("empty record/set value (i.e. { })", "@RAN_Emulation.MSC_CONN_PRIM_DISC_IND"); } bound_flag = TRUE; } void MSC__CONN__PRIM__DISC__IND::encode_text(Text_Buf& /*text_buf*/) const { must_bound("Text encoder: Encoding an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } void MSC__CONN__PRIM__DISC__IND::decode_text(Text_Buf& /*text_buf*/) { bound_flag = TRUE; } void MSC__CONN__PRIM__DISC__IND_template::copy_template(const MSC__CONN__PRIM__DISC__IND_template& other_value) { set_selection(other_value); switch (template_selection) { case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__DISC__IND_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 MSC__CONN__PRIM__DISC__IND_template(*other_value.implication_.precondition); implication_.implied_template = new MSC__CONN__PRIM__DISC__IND_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); break; } } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template() { } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(null_type) : Base_Template(SPECIFIC_VALUE) { } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(const MSC__CONN__PRIM__DISC__IND& other_value) : Base_Template(SPECIFIC_VALUE) { other_value.must_bound("Creating a template from an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND from an unbound optional field."); } } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(MSC__CONN__PRIM__DISC__IND_template* p_precondition, MSC__CONN__PRIM__DISC__IND_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } MSC__CONN__PRIM__DISC__IND_template::MSC__CONN__PRIM__DISC__IND_template(const MSC__CONN__PRIM__DISC__IND_template& other_value) : Base_Template(){ copy_template(other_value); } MSC__CONN__PRIM__DISC__IND_template::~MSC__CONN__PRIM__DISC__IND_template() { clean_up(); } void MSC__CONN__PRIM__DISC__IND_template::clean_up() { switch (template_selection) { 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; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_template::operator=(null_type) { clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_template::operator=(const MSC__CONN__PRIM__DISC__IND& other_value) { other_value.must_bound("Assignment of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND to a template."); clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } return *this; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_template::operator=(const MSC__CONN__PRIM__DISC__IND_template& other_value) { if (&other_value != this) { clean_up(); set_selection(other_value); } return *this; } boolean MSC__CONN__PRIM__DISC__IND_template::match(null_type other_value,boolean) const { switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: return TRUE; case OMIT_VALUE: return FALSE; 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)) 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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } return FALSE; } boolean MSC__CONN__PRIM__DISC__IND_template::match(const MSC__CONN__PRIM__DISC__IND& other_value, boolean) const { if (!other_value.is_bound()) return FALSE; return match(NULL_VALUE); } MSC__CONN__PRIM__DISC__IND MSC__CONN__PRIM__DISC__IND_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); return NULL_VALUE; } void MSC__CONN__PRIM__DISC__IND_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new MSC__CONN__PRIM__DISC__IND_template[list_length]; } MSC__CONN__PRIM__DISC__IND_template& MSC__CONN__PRIM__DISC__IND_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); return value_list.list_value[list_index]; } void MSC__CONN__PRIM__DISC__IND_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__DISC__IND_template::log_match(const MSC__CONN__PRIM__DISC__IND& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void MSC__CONN__PRIM__DISC__IND_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: case SPECIFIC_VALUE: 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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } } void MSC__CONN__PRIM__DISC__IND_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: case SPECIFIC_VALUE: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new MSC__CONN__PRIM__DISC__IND_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); } } void MSC__CONN__PRIM__DISC__IND_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "empty record/set 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: { MSC__CONN__PRIM__DISC__IND_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_i0) param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_DISC_IND"); *this = NULL_VALUE; break; case Module_Param::MP_Implication_Template: { MSC__CONN__PRIM__DISC__IND_template* precondition = new MSC__CONN__PRIM__DISC__IND_template; precondition->set_param(*param.get_elem(0)); MSC__CONN__PRIM__DISC__IND_template* implied_template = new MSC__CONN__PRIM__DISC__IND_template; implied_template->set_param(*param.get_elem(1)); *this = MSC__CONN__PRIM__DISC__IND_template(precondition, implied_template); } break; default: param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_DISC_IND"); } is_ifpresent = param.get_ifpresent(); } void MSC__CONN__PRIM__DISC__IND_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; 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 : "@RAN_Emulation.MSC_CONN_PRIM_DISC_IND"); } boolean MSC__CONN__PRIM__DISC__IND_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean MSC__CONN__PRIM__DISC__IND_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_idx0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) reason().set_param(*param.get_elem(0)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "reason")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { reason().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ"); } } void MSC__CONN__PRIM__DISC__REQ::encode_text(Text_Buf& text_buf) const { field_reason.encode_text(text_buf); } void MSC__CONN__PRIM__DISC__REQ::decode_text(Text_Buf& text_buf) { field_reason.decode_text(text_buf); } struct MSC__CONN__PRIM__DISC__REQ_template::single_value_struct { INTEGER_template field_reason; }; void MSC__CONN__PRIM__DISC__REQ_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_reason = ANY_VALUE; } } } void MSC__CONN__PRIM__DISC__REQ_template::copy_value(const MSC__CONN__PRIM__DISC__REQ& other_value) { single_value = new single_value_struct; if (other_value.reason().is_bound()) { single_value->field_reason = other_value.reason(); } else { single_value->field_reason.clean_up(); } set_selection(SPECIFIC_VALUE); } void MSC__CONN__PRIM__DISC__REQ_template::copy_template(const MSC__CONN__PRIM__DISC__REQ_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.reason().get_selection()) { single_value->field_reason = other_value.reason(); } else { single_value->field_reason.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 MSC__CONN__PRIM__DISC__REQ_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 MSC__CONN__PRIM__DISC__REQ_template(*other_value.implication_.precondition); implication_.implied_template = new MSC__CONN__PRIM__DISC__REQ_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); break; } set_selection(other_value); } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template() { } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(const MSC__CONN__PRIM__DISC__REQ& other_value) { copy_value(other_value); } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const MSC__CONN__PRIM__DISC__REQ&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ from an unbound optional field."); } } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(MSC__CONN__PRIM__DISC__REQ_template* p_precondition, MSC__CONN__PRIM__DISC__REQ_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } MSC__CONN__PRIM__DISC__REQ_template::MSC__CONN__PRIM__DISC__REQ_template(const MSC__CONN__PRIM__DISC__REQ_template& other_value) : Base_Template() { copy_template(other_value); } MSC__CONN__PRIM__DISC__REQ_template::~MSC__CONN__PRIM__DISC__REQ_template() { clean_up(); } MSC__CONN__PRIM__DISC__REQ_template& MSC__CONN__PRIM__DISC__REQ_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } MSC__CONN__PRIM__DISC__REQ_template& MSC__CONN__PRIM__DISC__REQ_template::operator=(const MSC__CONN__PRIM__DISC__REQ& other_value) { clean_up(); copy_value(other_value); return *this; } MSC__CONN__PRIM__DISC__REQ_template& MSC__CONN__PRIM__DISC__REQ_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const MSC__CONN__PRIM__DISC__REQ&)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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); } return *this; } MSC__CONN__PRIM__DISC__REQ_template& MSC__CONN__PRIM__DISC__REQ_template::operator=(const MSC__CONN__PRIM__DISC__REQ_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean MSC__CONN__PRIM__DISC__REQ_template::match(const MSC__CONN__PRIM__DISC__REQ& 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.reason().is_bound()) return FALSE; if(!single_value->field_reason.match(other_value.reason(), 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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); } return FALSE; } boolean MSC__CONN__PRIM__DISC__REQ_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_reason.is_bound(); } boolean MSC__CONN__PRIM__DISC__REQ_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_reason.is_value(); } void MSC__CONN__PRIM__DISC__REQ_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; } MSC__CONN__PRIM__DISC__REQ MSC__CONN__PRIM__DISC__REQ_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); MSC__CONN__PRIM__DISC__REQ ret_val; if (single_value->field_reason.is_bound()) { ret_val.reason() = single_value->field_reason.valueof(); } return ret_val; } void MSC__CONN__PRIM__DISC__REQ_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new MSC__CONN__PRIM__DISC__REQ_template[list_length]; } MSC__CONN__PRIM__DISC__REQ_template& MSC__CONN__PRIM__DISC__REQ_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); return value_list.list_value[list_index]; } INTEGER_template& MSC__CONN__PRIM__DISC__REQ_template::reason() { set_specific(); return single_value->field_reason; } const INTEGER_template& MSC__CONN__PRIM__DISC__REQ_template::reason() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field reason of a non-specific template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); return single_value->field_reason; } int MSC__CONN__PRIM__DISC__REQ_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: return 1; case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ 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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); } return 0; } void MSC__CONN__PRIM__DISC__REQ_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ reason := "); single_value->field_reason.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 MSC__CONN__PRIM__DISC__REQ_template::log_match(const MSC__CONN__PRIM__DISC__REQ& 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_reason.match(match_value.reason(), legacy)){ TTCN_Logger::log_logmatch_info(".reason"); single_value->field_reason.log_match(match_value.reason(), 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("{ reason := "); single_value->field_reason.log_match(match_value.reason(), 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 MSC__CONN__PRIM__DISC__REQ_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (reason().is_bound()) reason().set_implicit_omit(); } void MSC__CONN__PRIM__DISC__REQ_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_reason.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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); } } void MSC__CONN__PRIM__DISC__REQ_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_reason.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 MSC__CONN__PRIM__DISC__REQ_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 @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ."); } } void MSC__CONN__PRIM__DISC__REQ_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: { MSC__CONN__PRIM__DISC__REQ_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) reason().set_param(*param.get_elem(0)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "reason")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { reason().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.MSC_CONN_PRIM_DISC_REQ: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { MSC__CONN__PRIM__DISC__REQ_template* precondition = new MSC__CONN__PRIM__DISC__REQ_template; precondition->set_param(*param.get_elem(0)); MSC__CONN__PRIM__DISC__REQ_template* implied_template = new MSC__CONN__PRIM__DISC__REQ_template; implied_template->set_param(*param.get_elem(1)); *this = MSC__CONN__PRIM__DISC__REQ_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ"); } is_ifpresent = param.get_ifpresent(); } void MSC__CONN__PRIM__DISC__REQ_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_reason.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ"); 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 : "@RAN_Emulation.MSC_CONN_PRIM_DISC_REQ"); } boolean MSC__CONN__PRIM__DISC__REQ_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean MSC__CONN__PRIM__DISC__REQ_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_idx0) { param.type_error("empty record/set value (i.e. { })", "@RAN_Emulation.MSC_CONN_PRIM_CONF_IND"); } bound_flag = TRUE; } void MSC__CONN__PRIM__CONF__IND::encode_text(Text_Buf& /*text_buf*/) const { must_bound("Text encoder: Encoding an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } void MSC__CONN__PRIM__CONF__IND::decode_text(Text_Buf& /*text_buf*/) { bound_flag = TRUE; } void MSC__CONN__PRIM__CONF__IND_template::copy_template(const MSC__CONN__PRIM__CONF__IND_template& other_value) { set_selection(other_value); switch (template_selection) { case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__CONF__IND_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 MSC__CONN__PRIM__CONF__IND_template(*other_value.implication_.precondition); implication_.implied_template = new MSC__CONN__PRIM__CONF__IND_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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); break; } } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template() { } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(null_type) : Base_Template(SPECIFIC_VALUE) { } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(const MSC__CONN__PRIM__CONF__IND& other_value) : Base_Template(SPECIFIC_VALUE) { other_value.must_bound("Creating a template from an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND from an unbound optional field."); } } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(MSC__CONN__PRIM__CONF__IND_template* p_precondition, MSC__CONN__PRIM__CONF__IND_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } MSC__CONN__PRIM__CONF__IND_template::MSC__CONN__PRIM__CONF__IND_template(const MSC__CONN__PRIM__CONF__IND_template& other_value) : Base_Template(){ copy_template(other_value); } MSC__CONN__PRIM__CONF__IND_template::~MSC__CONN__PRIM__CONF__IND_template() { clean_up(); } void MSC__CONN__PRIM__CONF__IND_template::clean_up() { switch (template_selection) { 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; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_template::operator=(null_type) { clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_template::operator=(const MSC__CONN__PRIM__CONF__IND& other_value) { other_value.must_bound("Assignment of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND to a template."); clean_up(); set_selection(SPECIFIC_VALUE); return *this; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } return *this; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_template::operator=(const MSC__CONN__PRIM__CONF__IND_template& other_value) { if (&other_value != this) { clean_up(); set_selection(other_value); } return *this; } boolean MSC__CONN__PRIM__CONF__IND_template::match(null_type other_value,boolean) const { switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: case SPECIFIC_VALUE: return TRUE; case OMIT_VALUE: return FALSE; 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)) 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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } return FALSE; } boolean MSC__CONN__PRIM__CONF__IND_template::match(const MSC__CONN__PRIM__CONF__IND& other_value, boolean) const { if (!other_value.is_bound()) return FALSE; return match(NULL_VALUE); } MSC__CONN__PRIM__CONF__IND MSC__CONN__PRIM__CONF__IND_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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); return NULL_VALUE; } void MSC__CONN__PRIM__CONF__IND_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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new MSC__CONN__PRIM__CONF__IND_template[list_length]; } MSC__CONN__PRIM__CONF__IND_template& MSC__CONN__PRIM__CONF__IND_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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); return value_list.list_value[list_index]; } void MSC__CONN__PRIM__CONF__IND_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: 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 MSC__CONN__PRIM__CONF__IND_template::log_match(const MSC__CONN__PRIM__CONF__IND& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void MSC__CONN__PRIM__CONF__IND_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: case SPECIFIC_VALUE: 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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } } void MSC__CONN__PRIM__CONF__IND_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: case SPECIFIC_VALUE: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new MSC__CONN__PRIM__CONF__IND_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 @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); } } void MSC__CONN__PRIM__CONF__IND_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "empty record/set 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: { MSC__CONN__PRIM__CONF__IND_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_i0) param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_CONF_IND"); *this = NULL_VALUE; break; case Module_Param::MP_Implication_Template: { MSC__CONN__PRIM__CONF__IND_template* precondition = new MSC__CONN__PRIM__CONF__IND_template; precondition->set_param(*param.get_elem(0)); MSC__CONN__PRIM__CONF__IND_template* implied_template = new MSC__CONN__PRIM__CONF__IND_template; implied_template->set_param(*param.get_elem(1)); *this = MSC__CONN__PRIM__CONF__IND_template(precondition, implied_template); } break; default: param.type_error("empty record/set template", "@RAN_Emulation.MSC_CONN_PRIM_CONF_IND"); } is_ifpresent = param.get_ifpresent(); } void MSC__CONN__PRIM__CONF__IND_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; 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 : "@RAN_Emulation.MSC_CONN_PRIM_CONF_IND"); } boolean MSC__CONN__PRIM__CONF__IND_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean MSC__CONN__PRIM__CONF__IND_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_idxis_value(); case ALT_disc__ind: return field_disc__ind->is_value(); case ALT_disc__req: return field_disc__req->is_value(); case ALT_conf__ind: return field_conf__ind->is_value(); default: TTCN_error("Invalid selection in union is_bound");} } void RAN__Conn__Prim::clean_up() { switch (union_selection) { case ALT_connect__res: delete field_connect__res; break; case ALT_disc__ind: delete field_disc__ind; break; case ALT_disc__req: delete field_disc__req; break; case ALT_conf__ind: delete field_conf__ind; break; default: break; } union_selection = UNBOUND_VALUE; } void RAN__Conn__Prim::log() const { switch (union_selection) { case ALT_connect__res: TTCN_Logger::log_event_str("{ connect_res := "); field_connect__res->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_disc__ind: TTCN_Logger::log_event_str("{ disc_ind := "); field_disc__ind->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_disc__req: TTCN_Logger::log_event_str("{ disc_req := "); field_disc__req->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_conf__ind: TTCN_Logger::log_event_str("{ conf_ind := "); field_conf__ind->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_unbound(); } } void RAN__Conn__Prim::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "union value"); Module_Param_Ptr m_p = ¶m; if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return; if (m_p->get_type()!=Module_Param::MP_Assignment_List) { param.error("union value with field name was expected"); } Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "connect_res")) { connect__res().set_param(*mp_last); if (!connect__res().is_bound()) clean_up(); return; } if (!strcmp(last_name, "disc_ind")) { disc__ind().set_param(*mp_last); if (!disc__ind().is_bound()) clean_up(); return; } if (!strcmp(last_name, "disc_req")) { disc__req().set_param(*mp_last); if (!disc__req().is_bound()) clean_up(); return; } if (!strcmp(last_name, "conf_ind")) { conf__ind().set_param(*mp_last); if (!conf__ind().is_bound()) clean_up(); return; } mp_last->error("Field %s does not exist in type @RAN_Emulation.RAN_Conn_Prim.", last_name); } void RAN__Conn__Prim::set_implicit_omit() { switch (union_selection) { case ALT_connect__res: field_connect__res->set_implicit_omit(); break; case ALT_disc__ind: field_disc__ind->set_implicit_omit(); break; case ALT_disc__req: field_disc__req->set_implicit_omit(); break; case ALT_conf__ind: field_conf__ind->set_implicit_omit(); break; default: break; } } void RAN__Conn__Prim::encode_text(Text_Buf& text_buf) const { text_buf.push_int(union_selection); switch (union_selection) { case ALT_connect__res: field_connect__res->encode_text(text_buf); break; case ALT_disc__ind: field_disc__ind->encode_text(text_buf); break; case ALT_disc__req: field_disc__req->encode_text(text_buf); break; case ALT_conf__ind: field_conf__ind->encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an unbound value of union type @RAN_Emulation.RAN_Conn_Prim."); } } void RAN__Conn__Prim::decode_text(Text_Buf& text_buf) { switch ((union_selection_type)text_buf.pull_int().get_val()) { case ALT_connect__res: connect__res().decode_text(text_buf); break; case ALT_disc__ind: disc__ind().decode_text(text_buf); break; case ALT_disc__req: disc__req().decode_text(text_buf); break; case ALT_conf__ind: conf__ind().decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for type @RAN_Emulation.RAN_Conn_Prim."); } } void RAN__Conn__Prim_template::copy_value(const RAN__Conn__Prim& other_value) { single_value.union_selection = other_value.get_selection(); switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res = new MSC__CONN__PRIM__CONNECT__RES_template(other_value.connect__res()); break; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind = new MSC__CONN__PRIM__DISC__IND_template(other_value.disc__ind()); break; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req = new MSC__CONN__PRIM__DISC__REQ_template(other_value.disc__req()); break; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind = new MSC__CONN__PRIM__CONF__IND_template(other_value.conf__ind()); break; default: TTCN_error("Initializing a template with an unbound value of type @RAN_Emulation.RAN_Conn_Prim."); } set_selection(SPECIFIC_VALUE); } void RAN__Conn__Prim_template::copy_template(const RAN__Conn__Prim_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value.union_selection = other_value.single_value.union_selection; switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res = new MSC__CONN__PRIM__CONNECT__RES_template(*other_value.single_value.field_connect__res); break; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind = new MSC__CONN__PRIM__DISC__IND_template(*other_value.single_value.field_disc__ind); break; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req = new MSC__CONN__PRIM__DISC__REQ_template(*other_value.single_value.field_disc__req); break; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind = new MSC__CONN__PRIM__CONF__IND_template(*other_value.single_value.field_conf__ind); break; default: TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @RAN_Emulation.RAN_Conn_Prim."); } 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 RAN__Conn__Prim_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 RAN__Conn__Prim_template(*other_value.implication_.precondition); implication_.implied_template = new RAN__Conn__Prim_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 template of union type @RAN_Emulation.RAN_Conn_Prim."); } set_selection(other_value); } RAN__Conn__Prim_template::RAN__Conn__Prim_template() { } RAN__Conn__Prim_template::RAN__Conn__Prim_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RAN__Conn__Prim_template::RAN__Conn__Prim_template(const RAN__Conn__Prim& other_value) { copy_value(other_value); } RAN__Conn__Prim_template::RAN__Conn__Prim_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RAN__Conn__Prim&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of union type @RAN_Emulation.RAN_Conn_Prim from an unbound optional field."); } } RAN__Conn__Prim_template::RAN__Conn__Prim_template(RAN__Conn__Prim_template* p_precondition, RAN__Conn__Prim_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RAN__Conn__Prim_template::RAN__Conn__Prim_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RAN__Conn__Prim_template::RAN__Conn__Prim_template(const RAN__Conn__Prim_template& other_value) : Base_Template(){ copy_template(other_value); } RAN__Conn__Prim_template::~RAN__Conn__Prim_template() { clean_up(); } void RAN__Conn__Prim_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: delete single_value.field_connect__res; break; case RAN__Conn__Prim::ALT_disc__ind: delete single_value.field_disc__ind; break; case RAN__Conn__Prim::ALT_disc__req: delete single_value.field_disc__req; break; case RAN__Conn__Prim::ALT_conf__ind: delete single_value.field_conf__ind; default: break; } 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; } RAN__Conn__Prim_template& RAN__Conn__Prim_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RAN__Conn__Prim_template& RAN__Conn__Prim_template::operator=(const RAN__Conn__Prim& other_value) { clean_up(); copy_value(other_value); return *this; } RAN__Conn__Prim_template& RAN__Conn__Prim_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RAN__Conn__Prim&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of union type @RAN_Emulation.RAN_Conn_Prim."); } return *this; } RAN__Conn__Prim_template& RAN__Conn__Prim_template::operator=(const RAN__Conn__Prim_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RAN__Conn__Prim_template::match(const RAN__Conn__Prim& 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: { RAN__Conn__Prim::union_selection_type value_selection = other_value.get_selection(); if (value_selection == RAN__Conn__Prim::UNBOUND_VALUE) return FALSE; if (value_selection != single_value.union_selection) return FALSE; switch (value_selection) { case RAN__Conn__Prim::ALT_connect__res: return single_value.field_connect__res->match(other_value.connect__res(), legacy); case RAN__Conn__Prim::ALT_disc__ind: return single_value.field_disc__ind->match(other_value.disc__ind(), legacy); case RAN__Conn__Prim::ALT_disc__req: return single_value.field_disc__req->match(other_value.disc__req(), legacy); case RAN__Conn__Prim::ALT_conf__ind: return single_value.field_conf__ind->match(other_value.conf__ind(), legacy); default: TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @RAN_Emulation.RAN_Conn_Prim."); } } 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 template of union type @RAN_Emulation.RAN_Conn_Prim."); } return FALSE; } boolean RAN__Conn__Prim_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: return single_value.field_connect__res->is_value(); case RAN__Conn__Prim::ALT_disc__ind: return single_value.field_disc__ind->is_value(); case RAN__Conn__Prim::ALT_disc__req: return single_value.field_disc__req->is_value(); case RAN__Conn__Prim::ALT_conf__ind: return single_value.field_conf__ind->is_value(); default: TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @RAN_Emulation.RAN_Conn_Prim."); } } RAN__Conn__Prim RAN__Conn__Prim_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of union type @RAN_Emulation.RAN_Conn_Prim."); RAN__Conn__Prim ret_val; switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: ret_val.connect__res() = single_value.field_connect__res->valueof(); break; case RAN__Conn__Prim::ALT_disc__ind: ret_val.disc__ind() = single_value.field_disc__ind->valueof(); break; case RAN__Conn__Prim::ALT_disc__req: ret_val.disc__req() = single_value.field_disc__req->valueof(); break; case RAN__Conn__Prim::ALT_conf__ind: ret_val.conf__ind() = single_value.field_conf__ind->valueof(); break; default: TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @RAN_Emulation.RAN_Conn_Prim."); } return ret_val; } RAN__Conn__Prim_template& RAN__Conn__Prim_template::list_item(unsigned int list_index) const { 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 union type @RAN_Emulation.RAN_Conn_Prim."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @RAN_Emulation.RAN_Conn_Prim."); return value_list.list_value[list_index]; } void RAN__Conn__Prim_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 ("Internal error: Setting an invalid list for a template of union type @RAN_Emulation.RAN_Conn_Prim."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RAN__Conn__Prim_template[list_length]; } MSC__CONN__PRIM__CONNECT__RES_template& RAN__Conn__Prim_template::connect__res() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RAN__Conn__Prim::ALT_connect__res) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_connect__res = new MSC__CONN__PRIM__CONNECT__RES_template(ANY_VALUE); else single_value.field_connect__res = new MSC__CONN__PRIM__CONNECT__RES_template; single_value.union_selection = RAN__Conn__Prim::ALT_connect__res; set_selection(SPECIFIC_VALUE); } return *single_value.field_connect__res; } const MSC__CONN__PRIM__CONNECT__RES_template& RAN__Conn__Prim_template::connect__res() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field connect_res in a non-specific template of union type @RAN_Emulation.RAN_Conn_Prim."); if (single_value.union_selection != RAN__Conn__Prim::ALT_connect__res) TTCN_error("Accessing non-selected field connect_res in a template of union type @RAN_Emulation.RAN_Conn_Prim."); return *single_value.field_connect__res; } MSC__CONN__PRIM__DISC__IND_template& RAN__Conn__Prim_template::disc__ind() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RAN__Conn__Prim::ALT_disc__ind) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_disc__ind = new MSC__CONN__PRIM__DISC__IND_template(ANY_VALUE); else single_value.field_disc__ind = new MSC__CONN__PRIM__DISC__IND_template; single_value.union_selection = RAN__Conn__Prim::ALT_disc__ind; set_selection(SPECIFIC_VALUE); } return *single_value.field_disc__ind; } const MSC__CONN__PRIM__DISC__IND_template& RAN__Conn__Prim_template::disc__ind() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field disc_ind in a non-specific template of union type @RAN_Emulation.RAN_Conn_Prim."); if (single_value.union_selection != RAN__Conn__Prim::ALT_disc__ind) TTCN_error("Accessing non-selected field disc_ind in a template of union type @RAN_Emulation.RAN_Conn_Prim."); return *single_value.field_disc__ind; } MSC__CONN__PRIM__DISC__REQ_template& RAN__Conn__Prim_template::disc__req() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RAN__Conn__Prim::ALT_disc__req) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_disc__req = new MSC__CONN__PRIM__DISC__REQ_template(ANY_VALUE); else single_value.field_disc__req = new MSC__CONN__PRIM__DISC__REQ_template; single_value.union_selection = RAN__Conn__Prim::ALT_disc__req; set_selection(SPECIFIC_VALUE); } return *single_value.field_disc__req; } const MSC__CONN__PRIM__DISC__REQ_template& RAN__Conn__Prim_template::disc__req() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field disc_req in a non-specific template of union type @RAN_Emulation.RAN_Conn_Prim."); if (single_value.union_selection != RAN__Conn__Prim::ALT_disc__req) TTCN_error("Accessing non-selected field disc_req in a template of union type @RAN_Emulation.RAN_Conn_Prim."); return *single_value.field_disc__req; } MSC__CONN__PRIM__CONF__IND_template& RAN__Conn__Prim_template::conf__ind() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RAN__Conn__Prim::ALT_conf__ind) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_conf__ind = new MSC__CONN__PRIM__CONF__IND_template(ANY_VALUE); else single_value.field_conf__ind = new MSC__CONN__PRIM__CONF__IND_template; single_value.union_selection = RAN__Conn__Prim::ALT_conf__ind; set_selection(SPECIFIC_VALUE); } return *single_value.field_conf__ind; } const MSC__CONN__PRIM__CONF__IND_template& RAN__Conn__Prim_template::conf__ind() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field conf_ind in a non-specific template of union type @RAN_Emulation.RAN_Conn_Prim."); if (single_value.union_selection != RAN__Conn__Prim::ALT_conf__ind) TTCN_error("Accessing non-selected field conf_ind in a template of union type @RAN_Emulation.RAN_Conn_Prim."); return *single_value.field_conf__ind; } boolean RAN__Conn__Prim_template::ischosen(RAN__Conn__Prim::union_selection_type checked_selection) const { if (checked_selection == RAN__Conn__Prim::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @RAN_Emulation.RAN_Conn_Prim."); switch (template_selection) { case SPECIFIC_VALUE: if (single_value.union_selection == RAN__Conn__Prim::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @RAN_Emulation.RAN_Conn_Prim."); return single_value.union_selection == checked_selection; case VALUE_LIST: { if (value_list.n_values < 1) TTCN_error("Internal error: Performing ischosen() operation on a template of union type @RAN_Emulation.RAN_Conn_Prim containing an empty list."); boolean ret_val = value_list.list_value[0].ischosen(checked_selection); for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) { ret_val = value_list.list_value[list_count].ischosen(checked_selection); } return ret_val; } default: return FALSE; } return FALSE; } void RAN__Conn__Prim_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: TTCN_Logger::log_event_str("{ connect_res := "); single_value.field_connect__res->log(); TTCN_Logger::log_event_str(" }"); break; case RAN__Conn__Prim::ALT_disc__ind: TTCN_Logger::log_event_str("{ disc_ind := "); single_value.field_disc__ind->log(); TTCN_Logger::log_event_str(" }"); break; case RAN__Conn__Prim::ALT_disc__req: TTCN_Logger::log_event_str("{ disc_req := "); single_value.field_disc__req->log(); TTCN_Logger::log_event_str(" }"); break; case RAN__Conn__Prim::ALT_conf__ind: TTCN_Logger::log_event_str("{ conf_ind := "); single_value.field_conf__ind->log(); TTCN_Logger::log_event_str(" }"); break; default: 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 RAN__Conn__Prim_template::log_match(const RAN__Conn__Prim& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); return; } if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".connect_res"); single_value.field_connect__res->log_match(match_value.connect__res(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ connect_res := "); single_value.field_connect__res->log_match(match_value.connect__res(), legacy); TTCN_Logger::log_event_str(" }"); } break; case RAN__Conn__Prim::ALT_disc__ind: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".disc_ind"); single_value.field_disc__ind->log_match(match_value.disc__ind(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ disc_ind := "); single_value.field_disc__ind->log_match(match_value.disc__ind(), legacy); TTCN_Logger::log_event_str(" }"); } break; case RAN__Conn__Prim::ALT_disc__req: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".disc_req"); single_value.field_disc__req->log_match(match_value.disc__req(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ disc_req := "); single_value.field_disc__req->log_match(match_value.disc__req(), legacy); TTCN_Logger::log_event_str(" }"); } break; case RAN__Conn__Prim::ALT_conf__ind: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".conf_ind"); single_value.field_conf__ind->log_match(match_value.conf__ind(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ conf_ind := "); single_value.field_conf__ind->log_match(match_value.conf__ind(), legacy); TTCN_Logger::log_event_str(" }"); } break; default: TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(""); } } else { TTCN_Logger::print_logmatch_buffer(); 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 RAN__Conn__Prim_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res->set_implicit_omit(); break; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind->set_implicit_omit(); break; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req->set_implicit_omit(); break; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind->set_implicit_omit(); break; default: break; } } void RAN__Conn__Prim_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value.union_selection); switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res->encode_text(text_buf); break; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind->encode_text(text_buf); break; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req->encode_text(text_buf); break; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind->encode_text(text_buf); break; default: TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @RAN_Emulation.RAN_Conn_Prim."); } 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 template of type @RAN_Emulation.RAN_Conn_Prim."); } } void RAN__Conn__Prim_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: { single_value.union_selection = RAN__Conn__Prim::UNBOUND_VALUE; RAN__Conn__Prim::union_selection_type new_selection = (RAN__Conn__Prim::union_selection_type)text_buf.pull_int().get_val(); switch (new_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res = new MSC__CONN__PRIM__CONNECT__RES_template; single_value.field_connect__res->decode_text(text_buf); break; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind = new MSC__CONN__PRIM__DISC__IND_template; single_value.field_disc__ind->decode_text(text_buf); break; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req = new MSC__CONN__PRIM__DISC__REQ_template; single_value.field_disc__req->decode_text(text_buf); break; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind = new MSC__CONN__PRIM__CONF__IND_template; single_value.field_conf__ind->decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @RAN_Emulation.RAN_Conn_Prim."); } single_value.union_selection = new_selection; } 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 RAN__Conn__Prim_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: Unrecognized selector was received in a template of type @RAN_Emulation.RAN_Conn_Prim."); } } boolean RAN__Conn__Prim_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RAN__Conn__Prim_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 v_idx=0; v_idx(param.get_id()) != NULL && param.get_id()->next_name()) { char* param_field = param.get_id()->get_current_name(); if (param_field[0] >= '0' && param_field[0] <= '9') { param.error("Unexpected array index in module parameter, expected a valid field" " name for union template type `@RAN_Emulation.RAN_Conn_Prim'"); } if (strcmp("connect_res", param_field) == 0) { connect__res().set_param(param); return; } else if (strcmp("disc_ind", param_field) == 0) { disc__ind().set_param(param); return; } else if (strcmp("disc_req", param_field) == 0) { disc__req().set_param(param); return; } else if (strcmp("conf_ind", param_field) == 0) { conf__ind().set_param(param); return; } else param.error("Field `%s' not found in union template type `@RAN_Emulation.RAN_Conn_Prim'", param_field); } param.basic_check(Module_Param::BC_TEMPLATE, "union template"); Module_Param_Ptr m_p = ¶m; switch (m_p->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: { RAN__Conn__Prim_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Value_List: if (m_p->get_size()==0) break; param.type_error("union template", "@RAN_Emulation.RAN_Conn_Prim"); break; case Module_Param::MP_Assignment_List: { Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "connect_res")) { connect__res().set_param(*mp_last); break; } if (!strcmp(last_name, "disc_ind")) { disc__ind().set_param(*mp_last); break; } if (!strcmp(last_name, "disc_req")) { disc__req().set_param(*mp_last); break; } if (!strcmp(last_name, "conf_ind")) { conf__ind().set_param(*mp_last); break; } mp_last->error("Field %s does not exist in type @RAN_Emulation.RAN_Conn_Prim.", last_name); } break; case Module_Param::MP_Implication_Template: { RAN__Conn__Prim_template* precondition = new RAN__Conn__Prim_template; precondition->set_param(*m_p->get_elem(0)); RAN__Conn__Prim_template* implied_template = new RAN__Conn__Prim_template; implied_template->set_param(*m_p->get_elem(1)); *this = RAN__Conn__Prim_template(precondition, implied_template); } break; default: param.type_error("union template", "@RAN_Emulation.RAN_Conn_Prim"); } is_ifpresent = param.get_ifpresent(); } void RAN__Conn__Prim_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; switch (single_value.union_selection) { case RAN__Conn__Prim::ALT_connect__res: single_value.field_connect__res->check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RAN_Conn_Prim"); return; case RAN__Conn__Prim::ALT_disc__ind: single_value.field_disc__ind->check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RAN_Conn_Prim"); return; case RAN__Conn__Prim::ALT_disc__req: single_value.field_disc__req->check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RAN_Conn_Prim"); return; case RAN__Conn__Prim::ALT_conf__ind: single_value.field_conf__ind->check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RAN_Conn_Prim"); return; default: TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @RAN_Emulation.RAN_Conn_Prim."); } 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 : "@RAN_Emulation.RAN_Conn_Prim"); } RAN__Transport::RAN__Transport() { enum_value = UNBOUND_VALUE; } RAN__Transport::RAN__Transport(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @RAN_Emulation.RAN_Transport with invalid numeric value %d.", other_value); enum_value = (enum_type)other_value; } RAN__Transport::RAN__Transport(enum_type other_value) { enum_value = other_value; } RAN__Transport::RAN__Transport(const RAN__Transport& other_value) : Base_Type() { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); enum_value = other_value.enum_value; } RAN__Transport& RAN__Transport::operator=(int other_value) { if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @RAN_Emulation.RAN_Transport.", other_value); enum_value = (enum_type)other_value; return *this; } RAN__Transport& RAN__Transport::operator=(enum_type other_value) { enum_value = other_value; return *this; } RAN__Transport& RAN__Transport::operator=(const RAN__Transport& other_value) { if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); enum_value = other_value.enum_value; return *this; } boolean RAN__Transport::operator==(int other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @RAN_Emulation.RAN_Transport comparison is an unknown numeric value %d", other_value); return enum_value == other_value; } boolean RAN__Transport::operator==(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value == other_value; } boolean RAN__Transport::operator==(const RAN__Transport& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value == other_value.enum_value; } boolean RAN__Transport::operator<(int other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @RAN_Emulation.RAN_Transport comparison is an unknown numeric value %d", other_value); return enum_value < other_value; } boolean RAN__Transport::operator<(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value < other_value; } boolean RAN__Transport::operator<(const RAN__Transport& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value < other_value.enum_value; } boolean RAN__Transport::operator>(int other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @RAN_Emulation.RAN_Transport comparison is an unknown numeric value %d", other_value); return enum_value > other_value; } boolean RAN__Transport::operator>(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value > other_value; } boolean RAN__Transport::operator>(const RAN__Transport& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value > other_value.enum_value; } const char *RAN__Transport::enum_to_str(enum_type enum_par) { switch (enum_par) { case BSSAP__TRANSPORT__AoIP: return "BSSAP_TRANSPORT_AoIP"; case BSSAP__TRANSPORT__SCCPlite: return "BSSAP_TRANSPORT_SCCPlite"; case RANAP__TRANSPORT__IuCS: return "RANAP_TRANSPORT_IuCS"; default: return ""; } } RAN__Transport::enum_type RAN__Transport::str_to_enum(const char *str_par, const int* int_par, const int* int_par2) { if (int_par == NULL && int_par2 == NULL) { if (!strcmp(str_par, "BSSAP_TRANSPORT_AoIP")) return BSSAP__TRANSPORT__AoIP; if (!strcmp(str_par, "BSSAP_TRANSPORT_SCCPlite")) return BSSAP__TRANSPORT__SCCPlite; if (!strcmp(str_par, "RANAP_TRANSPORT_IuCS")) return RANAP__TRANSPORT__IuCS; } return UNKNOWN_VALUE; } boolean RAN__Transport::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: case 2: return TRUE; default: return FALSE; } } int RAN__Transport::enum2int(enum_type enum_par) { if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RAN_Emulation.RAN_Transport.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int RAN__Transport::enum2int(const RAN__Transport& enum_par) { if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RAN_Emulation.RAN_Transport.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void RAN__Transport::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @RAN_Emulation.RAN_Transport.", int_val); enum_value = (enum_type)int_val; } RAN__Transport::operator RAN__Transport::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @RAN_Emulation.RAN_Transport."); return enum_value; } void RAN__Transport::log() const { if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value); else TTCN_Logger::log_event_unbound(); } void RAN__Transport::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "enumerated value"); if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@RAN_Emulation.RAN_Transport"); enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @RAN_Emulation.RAN_Transport."); } } void RAN__Transport::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); text_buf.push_int(enum_value); } void RAN__Transport::decode_text(Text_Buf& text_buf) { enum_value = (enum_type)text_buf.pull_int().get_val(); if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @RAN_Emulation.RAN_Transport.", enum_value); } void RAN__Transport_template::copy_template(const RAN__Transport_template& other_value) { set_selection(other_value); switch (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: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new RAN__Transport_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 RAN__Transport_template(*other_value.implication_.precondition); implication_.implied_template = new RAN__Transport_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 enumerated type @RAN_Emulation.RAN_Transport."); } } RAN__Transport_template::RAN__Transport_template() { } RAN__Transport_template::RAN__Transport_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RAN__Transport_template::RAN__Transport_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!RAN__Transport::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @RAN_Emulation.RAN_Transport with unknown numeric value %d.", other_value); single_value = (RAN__Transport::enum_type)other_value; } RAN__Transport_template::RAN__Transport_template(RAN__Transport::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } RAN__Transport_template::RAN__Transport_template(const RAN__Transport& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == RAN__Transport::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @RAN_Emulation.RAN_Transport."); single_value = other_value.enum_value; } RAN__Transport_template::RAN__Transport_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (RAN__Transport::enum_type)(const RAN__Transport&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @RAN_Emulation.RAN_Transport from an unbound optional field."); } } RAN__Transport_template::RAN__Transport_template(RAN__Transport_template* p_precondition, RAN__Transport_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RAN__Transport_template::RAN__Transport_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RAN__Transport_template::RAN__Transport_template(const RAN__Transport_template& other_value) : Base_Template() { copy_template(other_value); } RAN__Transport_template::~RAN__Transport_template() { clean_up(); } boolean RAN__Transport_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean RAN__Transport_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != RAN__Transport::UNBOUND_VALUE; } void RAN__Transport_template::clean_up() { switch (template_selection) { 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; } RAN__Transport_template& RAN__Transport_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RAN__Transport_template& RAN__Transport_template::operator=(int other_value) { if (!RAN__Transport::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @RAN_Emulation.RAN_Transport.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (RAN__Transport::enum_type)other_value; return *this; } RAN__Transport_template& RAN__Transport_template::operator=(RAN__Transport::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } RAN__Transport_template& RAN__Transport_template::operator=(const RAN__Transport& other_value) { if (other_value.enum_value == RAN__Transport::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @RAN_Emulation.RAN_Transport to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } RAN__Transport_template& RAN__Transport_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (RAN__Transport::enum_type)(const RAN__Transport&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of enumerated type @RAN_Emulation.RAN_Transport."); } return *this; } RAN__Transport_template& RAN__Transport_template::operator=(const RAN__Transport_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RAN__Transport_template::match(RAN__Transport::enum_type 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 list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value)) 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 enumerated type @RAN_Emulation.RAN_Transport."); } return FALSE; } boolean RAN__Transport_template::match(const RAN__Transport& other_value, boolean) const { if (other_value.enum_value == RAN__Transport::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @RAN_Emulation.RAN_Transport with an unbound value."); return match(other_value.enum_value); } RAN__Transport::enum_type RAN__Transport_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @RAN_Emulation.RAN_Transport."); return single_value; } void RAN__Transport_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: set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RAN__Transport_template[list_length]; break; default: TTCN_error("Setting an invalid type for a template of enumerated type @RAN_Emulation.RAN_Transport."); } } RAN__Transport_template& RAN__Transport_template::list_item(unsigned int list_index) { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @RAN_Emulation.RAN_Transport."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @RAN_Emulation.RAN_Transport."); return value_list.list_value[list_index]; } void RAN__Transport_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(RAN__Transport::enum_to_str(single_value), single_value); 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 elem_count = 0; elem_count < value_list.n_values; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[elem_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 RAN__Transport_template::log_match(const RAN__Transport& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void RAN__Transport_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value); 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 elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @RAN_Emulation.RAN_Transport."); } } void RAN__Transport_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (RAN__Transport::enum_type)text_buf.pull_int().get_val(); if (!RAN__Transport::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @RAN_Emulation.RAN_Transport.", single_value); 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 RAN__Transport_template[value_list.n_values]; for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @RAN_Emulation.RAN_Transport."); } } boolean RAN__Transport_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RAN__Transport_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; iget_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: { RAN__Transport_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Enumerated: { RAN__Transport::enum_type enum_val = RAN__Transport::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value()); if (!RAN__Transport::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @RAN_Emulation.RAN_Transport."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { RAN__Transport_template* precondition = new RAN__Transport_template; precondition->set_param(*m_p->get_elem(0)); RAN__Transport_template* implied_template = new RAN__Transport_template; implied_template->set_param(*m_p->get_elem(1)); *this = RAN__Transport_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@RAN_Emulation.RAN_Transport"); } is_ifpresent = param.get_ifpresent(); } void RAN__Transport_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 : "@RAN_Emulation.RAN_Transport"); } PDU__DTAP__MO::PDU__DTAP__MO() { } PDU__DTAP__MO::PDU__DTAP__MO(const OPTIONAL< OCTETSTRING >& par_dlci, const OPTIONAL< BOOLEAN >& par_skip__seq__patching, const MobileL3__Types::PDU__ML3__MS__NW& par_dtap) : field_dlci(par_dlci), field_skip__seq__patching(par_skip__seq__patching), field_dtap(par_dtap) { } PDU__DTAP__MO::PDU__DTAP__MO(const PDU__DTAP__MO& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.PDU_DTAP_MO."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.skip__seq__patching().is_bound()) field_skip__seq__patching = other_value.skip__seq__patching(); else field_skip__seq__patching.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } void PDU__DTAP__MO::clean_up() { field_dlci.clean_up(); field_skip__seq__patching.clean_up(); field_dtap.clean_up(); } const TTCN_Typedescriptor_t* PDU__DTAP__MO::get_descriptor() const { return &PDU__DTAP__MO_descr_; } PDU__DTAP__MO& PDU__DTAP__MO::operator=(const PDU__DTAP__MO& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.PDU_DTAP_MO."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.skip__seq__patching().is_bound()) field_skip__seq__patching = other_value.skip__seq__patching(); else field_skip__seq__patching.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } return *this; } boolean PDU__DTAP__MO::operator==(const PDU__DTAP__MO& other_value) const { return field_dlci==other_value.field_dlci && field_skip__seq__patching==other_value.field_skip__seq__patching && field_dtap==other_value.field_dtap; } boolean PDU__DTAP__MO::is_bound() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_bound()) || (OPTIONAL_OMIT == field_skip__seq__patching.get_selection() || field_skip__seq__patching.is_bound()) || (field_dtap.is_bound()); } boolean PDU__DTAP__MO::is_value() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_value()) && (OPTIONAL_OMIT == field_skip__seq__patching.get_selection() || field_skip__seq__patching.is_value()) && field_dtap.is_value(); } int PDU__DTAP__MO::size_of() const { int ret_val = 1; if (field_dlci.ispresent()) ret_val++; if (field_skip__seq__patching.ispresent()) ret_val++; return ret_val; } void PDU__DTAP__MO::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ dlci := "); field_dlci.log(); TTCN_Logger::log_event_str(", skip_seq_patching := "); field_skip__seq__patching.log(); TTCN_Logger::log_event_str(", dtap := "); field_dtap.log(); TTCN_Logger::log_event_str(" }"); } void PDU__DTAP__MO::set_implicit_omit() { if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (!skip__seq__patching().is_bound()) skip__seq__patching() = OMIT_VALUE; else skip__seq__patching().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__MO::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 (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) skip__seq__patching().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "skip_seq_patching")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { skip__seq__patching().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_MO: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.PDU_DTAP_MO"); } } void PDU__DTAP__MO::encode_text(Text_Buf& text_buf) const { field_dlci.encode_text(text_buf); field_skip__seq__patching.encode_text(text_buf); field_dtap.encode_text(text_buf); } void PDU__DTAP__MO::decode_text(Text_Buf& text_buf) { field_dlci.decode_text(text_buf); field_skip__seq__patching.decode_text(text_buf); field_dtap.decode_text(text_buf); } struct PDU__DTAP__MO_template::single_value_struct { OCTETSTRING_template field_dlci; BOOLEAN_template field_skip__seq__patching; MobileL3__Types::PDU__ML3__MS__NW_template field_dtap; }; void PDU__DTAP__MO_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_dlci = ANY_OR_OMIT; single_value->field_skip__seq__patching = ANY_OR_OMIT; single_value->field_dtap = ANY_VALUE; } } } void PDU__DTAP__MO_template::copy_value(const PDU__DTAP__MO& other_value) { single_value = new single_value_struct; if (other_value.dlci().is_bound()) { if (other_value.dlci().ispresent()) single_value->field_dlci = other_value.dlci()(); else single_value->field_dlci = OMIT_VALUE; } else { single_value->field_dlci.clean_up(); } if (other_value.skip__seq__patching().is_bound()) { if (other_value.skip__seq__patching().ispresent()) single_value->field_skip__seq__patching = other_value.skip__seq__patching()(); else single_value->field_skip__seq__patching = OMIT_VALUE; } else { single_value->field_skip__seq__patching.clean_up(); } if (other_value.dtap().is_bound()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.clean_up(); } set_selection(SPECIFIC_VALUE); } void PDU__DTAP__MO_template::copy_template(const PDU__DTAP__MO_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.dlci().get_selection()) { single_value->field_dlci = other_value.dlci(); } else { single_value->field_dlci.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.skip__seq__patching().get_selection()) { single_value->field_skip__seq__patching = other_value.skip__seq__patching(); } else { single_value->field_skip__seq__patching.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.dtap().get_selection()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.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 PDU__DTAP__MO_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 PDU__DTAP__MO_template(*other_value.implication_.precondition); implication_.implied_template = new PDU__DTAP__MO_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 @RAN_Emulation.PDU_DTAP_MO."); break; } set_selection(other_value); } PDU__DTAP__MO_template::PDU__DTAP__MO_template() { } PDU__DTAP__MO_template::PDU__DTAP__MO_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PDU__DTAP__MO_template::PDU__DTAP__MO_template(const PDU__DTAP__MO& other_value) { copy_value(other_value); } PDU__DTAP__MO_template::PDU__DTAP__MO_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__MO&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.PDU_DTAP_MO from an unbound optional field."); } } PDU__DTAP__MO_template::PDU__DTAP__MO_template(PDU__DTAP__MO_template* p_precondition, PDU__DTAP__MO_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PDU__DTAP__MO_template::PDU__DTAP__MO_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } PDU__DTAP__MO_template::PDU__DTAP__MO_template(const PDU__DTAP__MO_template& other_value) : Base_Template() { copy_template(other_value); } PDU__DTAP__MO_template::~PDU__DTAP__MO_template() { clean_up(); } PDU__DTAP__MO_template& PDU__DTAP__MO_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PDU__DTAP__MO_template& PDU__DTAP__MO_template::operator=(const PDU__DTAP__MO& other_value) { clean_up(); copy_value(other_value); return *this; } PDU__DTAP__MO_template& PDU__DTAP__MO_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__MO&)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 @RAN_Emulation.PDU_DTAP_MO."); } return *this; } PDU__DTAP__MO_template& PDU__DTAP__MO_template::operator=(const PDU__DTAP__MO_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PDU__DTAP__MO_template::match(const PDU__DTAP__MO& 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.dlci().is_bound()) return FALSE; if((other_value.dlci().ispresent() ? !single_value->field_dlci.match((const OCTETSTRING&)other_value.dlci(), legacy) : !single_value->field_dlci.match_omit(legacy)))return FALSE; if(!other_value.skip__seq__patching().is_bound()) return FALSE; if((other_value.skip__seq__patching().ispresent() ? !single_value->field_skip__seq__patching.match((const BOOLEAN&)other_value.skip__seq__patching(), legacy) : !single_value->field_skip__seq__patching.match_omit(legacy)))return FALSE; if(!other_value.dtap().is_bound()) return FALSE; if(!single_value->field_dtap.match(other_value.dtap(), 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 @RAN_Emulation.PDU_DTAP_MO."); } return FALSE; } boolean PDU__DTAP__MO_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_bound()) || (single_value->field_skip__seq__patching.is_omit() || single_value->field_skip__seq__patching.is_bound()) || single_value->field_dtap.is_bound(); } boolean PDU__DTAP__MO_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_value()) && (single_value->field_skip__seq__patching.is_omit() || single_value->field_skip__seq__patching.is_value()) && single_value->field_dtap.is_value(); } void PDU__DTAP__MO_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; } PDU__DTAP__MO PDU__DTAP__MO_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 @RAN_Emulation.PDU_DTAP_MO."); PDU__DTAP__MO ret_val; if (single_value->field_dlci.is_omit()) ret_val.dlci() = OMIT_VALUE; else if (single_value->field_dlci.is_bound()) { ret_val.dlci() = single_value->field_dlci.valueof(); } if (single_value->field_skip__seq__patching.is_omit()) ret_val.skip__seq__patching() = OMIT_VALUE; else if (single_value->field_skip__seq__patching.is_bound()) { ret_val.skip__seq__patching() = single_value->field_skip__seq__patching.valueof(); } if (single_value->field_dtap.is_bound()) { ret_val.dtap() = single_value->field_dtap.valueof(); } return ret_val; } void PDU__DTAP__MO_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 @RAN_Emulation.PDU_DTAP_MO."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PDU__DTAP__MO_template[list_length]; } PDU__DTAP__MO_template& PDU__DTAP__MO_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 @RAN_Emulation.PDU_DTAP_MO."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.PDU_DTAP_MO."); return value_list.list_value[list_index]; } OCTETSTRING_template& PDU__DTAP__MO_template::dlci() { set_specific(); return single_value->field_dlci; } const OCTETSTRING_template& PDU__DTAP__MO_template::dlci() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dlci of a non-specific template of type @RAN_Emulation.PDU_DTAP_MO."); return single_value->field_dlci; } BOOLEAN_template& PDU__DTAP__MO_template::skip__seq__patching() { set_specific(); return single_value->field_skip__seq__patching; } const BOOLEAN_template& PDU__DTAP__MO_template::skip__seq__patching() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field skip_seq_patching of a non-specific template of type @RAN_Emulation.PDU_DTAP_MO."); return single_value->field_skip__seq__patching; } MobileL3__Types::PDU__ML3__MS__NW_template& PDU__DTAP__MO_template::dtap() { set_specific(); return single_value->field_dtap; } const MobileL3__Types::PDU__ML3__MS__NW_template& PDU__DTAP__MO_template::dtap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dtap of a non-specific template of type @RAN_Emulation.PDU_DTAP_MO."); return single_value->field_dtap; } int PDU__DTAP__MO_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 1; if (single_value->field_dlci.is_present()) ret_val++; if (single_value->field_skip__seq__patching.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 @RAN_Emulation.PDU_DTAP_MO 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 @RAN_Emulation.PDU_DTAP_MO containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MO containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.PDU_DTAP_MO."); } return 0; } void PDU__DTAP__MO_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ dlci := "); single_value->field_dlci.log(); TTCN_Logger::log_event_str(", skip_seq_patching := "); single_value->field_skip__seq__patching.log(); TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.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 PDU__DTAP__MO_template::log_match(const PDU__DTAP__MO& 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 (match_value.dlci().ispresent()){ if(!single_value->field_dlci.match(match_value.dlci(), legacy)){ TTCN_Logger::log_logmatch_info(".dlci"); single_value->field_dlci.log_match(match_value.dlci(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_dlci.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".dlci := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_dlci.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.skip__seq__patching().ispresent()){ if(!single_value->field_skip__seq__patching.match(match_value.skip__seq__patching(), legacy)){ TTCN_Logger::log_logmatch_info(".skip_seq_patching"); single_value->field_skip__seq__patching.log_match(match_value.skip__seq__patching(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_skip__seq__patching.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".skip_seq_patching := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_skip__seq__patching.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_dtap.match(match_value.dtap(), legacy)){ TTCN_Logger::log_logmatch_info(".dtap"); single_value->field_dtap.log_match(match_value.dtap(), 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("{ dlci := "); if (match_value.dlci().ispresent()) { single_value->field_dlci.log_match(match_value.dlci(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_dlci.log(); if (single_value->field_dlci.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", skip_seq_patching := "); if (match_value.skip__seq__patching().ispresent()) { single_value->field_skip__seq__patching.log_match(match_value.skip__seq__patching(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_skip__seq__patching.log(); if (single_value->field_skip__seq__patching.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.log_match(match_value.dtap(), 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 PDU__DTAP__MO_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (!skip__seq__patching().is_bound()) skip__seq__patching() = OMIT_VALUE; else skip__seq__patching().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__MO_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_dlci.encode_text(text_buf); single_value->field_skip__seq__patching.encode_text(text_buf); single_value->field_dtap.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 @RAN_Emulation.PDU_DTAP_MO."); } } void PDU__DTAP__MO_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_dlci.decode_text(text_buf); single_value->field_skip__seq__patching.decode_text(text_buf); single_value->field_dtap.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 PDU__DTAP__MO_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 @RAN_Emulation.PDU_DTAP_MO."); } } void PDU__DTAP__MO_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: { PDU__DTAP__MO_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) skip__seq__patching().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "skip_seq_patching")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { skip__seq__patching().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_MO: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PDU__DTAP__MO_template* precondition = new PDU__DTAP__MO_template; precondition->set_param(*param.get_elem(0)); PDU__DTAP__MO_template* implied_template = new PDU__DTAP__MO_template; implied_template->set_param(*param.get_elem(1)); *this = PDU__DTAP__MO_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.PDU_DTAP_MO"); } is_ifpresent = param.get_ifpresent(); } void PDU__DTAP__MO_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_dlci.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_MO"); single_value->field_skip__seq__patching.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_MO"); single_value->field_dtap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_MO"); 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 : "@RAN_Emulation.PDU_DTAP_MO"); } boolean PDU__DTAP__MO_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PDU__DTAP__MO_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& par_dlci, const MobileL3__Types::PDU__ML3__NW__MS& par_dtap) : field_dlci(par_dlci), field_dtap(par_dtap) { } PDU__DTAP__MT::PDU__DTAP__MT(const PDU__DTAP__MT& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.PDU_DTAP_MT."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } void PDU__DTAP__MT::clean_up() { field_dlci.clean_up(); field_dtap.clean_up(); } const TTCN_Typedescriptor_t* PDU__DTAP__MT::get_descriptor() const { return &PDU__DTAP__MT_descr_; } PDU__DTAP__MT& PDU__DTAP__MT::operator=(const PDU__DTAP__MT& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.PDU_DTAP_MT."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } return *this; } boolean PDU__DTAP__MT::operator==(const PDU__DTAP__MT& other_value) const { return field_dlci==other_value.field_dlci && field_dtap==other_value.field_dtap; } boolean PDU__DTAP__MT::is_bound() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_bound()) || (field_dtap.is_bound()); } boolean PDU__DTAP__MT::is_value() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_value()) && field_dtap.is_value(); } int PDU__DTAP__MT::size_of() const { int ret_val = 1; if (field_dlci.ispresent()) ret_val++; return ret_val; } void PDU__DTAP__MT::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ dlci := "); field_dlci.log(); TTCN_Logger::log_event_str(", dtap := "); field_dtap.log(); TTCN_Logger::log_event_str(" }"); } void PDU__DTAP__MT::set_implicit_omit() { if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__MT::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 (20 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_MT: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.PDU_DTAP_MT"); } } void PDU__DTAP__MT::encode_text(Text_Buf& text_buf) const { field_dlci.encode_text(text_buf); field_dtap.encode_text(text_buf); } void PDU__DTAP__MT::decode_text(Text_Buf& text_buf) { field_dlci.decode_text(text_buf); field_dtap.decode_text(text_buf); } struct PDU__DTAP__MT_template::single_value_struct { OCTETSTRING_template field_dlci; MobileL3__Types::PDU__ML3__NW__MS_template field_dtap; }; void PDU__DTAP__MT_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_dlci = ANY_OR_OMIT; single_value->field_dtap = ANY_VALUE; } } } void PDU__DTAP__MT_template::copy_value(const PDU__DTAP__MT& other_value) { single_value = new single_value_struct; if (other_value.dlci().is_bound()) { if (other_value.dlci().ispresent()) single_value->field_dlci = other_value.dlci()(); else single_value->field_dlci = OMIT_VALUE; } else { single_value->field_dlci.clean_up(); } if (other_value.dtap().is_bound()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.clean_up(); } set_selection(SPECIFIC_VALUE); } void PDU__DTAP__MT_template::copy_template(const PDU__DTAP__MT_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.dlci().get_selection()) { single_value->field_dlci = other_value.dlci(); } else { single_value->field_dlci.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.dtap().get_selection()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.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 PDU__DTAP__MT_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 PDU__DTAP__MT_template(*other_value.implication_.precondition); implication_.implied_template = new PDU__DTAP__MT_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 @RAN_Emulation.PDU_DTAP_MT."); break; } set_selection(other_value); } PDU__DTAP__MT_template::PDU__DTAP__MT_template() { } PDU__DTAP__MT_template::PDU__DTAP__MT_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PDU__DTAP__MT_template::PDU__DTAP__MT_template(const PDU__DTAP__MT& other_value) { copy_value(other_value); } PDU__DTAP__MT_template::PDU__DTAP__MT_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__MT&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.PDU_DTAP_MT from an unbound optional field."); } } PDU__DTAP__MT_template::PDU__DTAP__MT_template(PDU__DTAP__MT_template* p_precondition, PDU__DTAP__MT_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PDU__DTAP__MT_template::PDU__DTAP__MT_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } PDU__DTAP__MT_template::PDU__DTAP__MT_template(const PDU__DTAP__MT_template& other_value) : Base_Template() { copy_template(other_value); } PDU__DTAP__MT_template::~PDU__DTAP__MT_template() { clean_up(); } PDU__DTAP__MT_template& PDU__DTAP__MT_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PDU__DTAP__MT_template& PDU__DTAP__MT_template::operator=(const PDU__DTAP__MT& other_value) { clean_up(); copy_value(other_value); return *this; } PDU__DTAP__MT_template& PDU__DTAP__MT_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__MT&)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 @RAN_Emulation.PDU_DTAP_MT."); } return *this; } PDU__DTAP__MT_template& PDU__DTAP__MT_template::operator=(const PDU__DTAP__MT_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PDU__DTAP__MT_template::match(const PDU__DTAP__MT& 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.dlci().is_bound()) return FALSE; if((other_value.dlci().ispresent() ? !single_value->field_dlci.match((const OCTETSTRING&)other_value.dlci(), legacy) : !single_value->field_dlci.match_omit(legacy)))return FALSE; if(!other_value.dtap().is_bound()) return FALSE; if(!single_value->field_dtap.match(other_value.dtap(), 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 @RAN_Emulation.PDU_DTAP_MT."); } return FALSE; } boolean PDU__DTAP__MT_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_bound()) || single_value->field_dtap.is_bound(); } boolean PDU__DTAP__MT_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_value()) && single_value->field_dtap.is_value(); } void PDU__DTAP__MT_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; } PDU__DTAP__MT PDU__DTAP__MT_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 @RAN_Emulation.PDU_DTAP_MT."); PDU__DTAP__MT ret_val; if (single_value->field_dlci.is_omit()) ret_val.dlci() = OMIT_VALUE; else if (single_value->field_dlci.is_bound()) { ret_val.dlci() = single_value->field_dlci.valueof(); } if (single_value->field_dtap.is_bound()) { ret_val.dtap() = single_value->field_dtap.valueof(); } return ret_val; } void PDU__DTAP__MT_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 @RAN_Emulation.PDU_DTAP_MT."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PDU__DTAP__MT_template[list_length]; } PDU__DTAP__MT_template& PDU__DTAP__MT_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 @RAN_Emulation.PDU_DTAP_MT."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.PDU_DTAP_MT."); return value_list.list_value[list_index]; } OCTETSTRING_template& PDU__DTAP__MT_template::dlci() { set_specific(); return single_value->field_dlci; } const OCTETSTRING_template& PDU__DTAP__MT_template::dlci() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dlci of a non-specific template of type @RAN_Emulation.PDU_DTAP_MT."); return single_value->field_dlci; } MobileL3__Types::PDU__ML3__NW__MS_template& PDU__DTAP__MT_template::dtap() { set_specific(); return single_value->field_dtap; } const MobileL3__Types::PDU__ML3__NW__MS_template& PDU__DTAP__MT_template::dtap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dtap of a non-specific template of type @RAN_Emulation.PDU_DTAP_MT."); return single_value->field_dtap; } int PDU__DTAP__MT_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 1; if (single_value->field_dlci.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 @RAN_Emulation.PDU_DTAP_MT 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 @RAN_Emulation.PDU_DTAP_MT containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_MT containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.PDU_DTAP_MT."); } return 0; } void PDU__DTAP__MT_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ dlci := "); single_value->field_dlci.log(); TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.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 PDU__DTAP__MT_template::log_match(const PDU__DTAP__MT& 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 (match_value.dlci().ispresent()){ if(!single_value->field_dlci.match(match_value.dlci(), legacy)){ TTCN_Logger::log_logmatch_info(".dlci"); single_value->field_dlci.log_match(match_value.dlci(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_dlci.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".dlci := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_dlci.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_dtap.match(match_value.dtap(), legacy)){ TTCN_Logger::log_logmatch_info(".dtap"); single_value->field_dtap.log_match(match_value.dtap(), 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("{ dlci := "); if (match_value.dlci().ispresent()) { single_value->field_dlci.log_match(match_value.dlci(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_dlci.log(); if (single_value->field_dlci.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.log_match(match_value.dtap(), 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 PDU__DTAP__MT_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__MT_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_dlci.encode_text(text_buf); single_value->field_dtap.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 @RAN_Emulation.PDU_DTAP_MT."); } } void PDU__DTAP__MT_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_dlci.decode_text(text_buf); single_value->field_dtap.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 PDU__DTAP__MT_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 @RAN_Emulation.PDU_DTAP_MT."); } } void PDU__DTAP__MT_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: { PDU__DTAP__MT_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_MT: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PDU__DTAP__MT_template* precondition = new PDU__DTAP__MT_template; precondition->set_param(*param.get_elem(0)); PDU__DTAP__MT_template* implied_template = new PDU__DTAP__MT_template; implied_template->set_param(*param.get_elem(1)); *this = PDU__DTAP__MT_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.PDU_DTAP_MT"); } is_ifpresent = param.get_ifpresent(); } void PDU__DTAP__MT_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_dlci.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_MT"); single_value->field_dtap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_MT"); 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 : "@RAN_Emulation.PDU_DTAP_MT"); } boolean PDU__DTAP__MT_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PDU__DTAP__MT_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& par_dlci, const OPTIONAL< BOOLEAN >& par_skip__seq__patching, const MobileL3__Types::PDU__L3__MS__SGSN& par_dtap) : field_dlci(par_dlci), field_skip__seq__patching(par_skip__seq__patching), field_dtap(par_dtap) { } PDU__DTAP__PS__MO::PDU__DTAP__PS__MO(const PDU__DTAP__PS__MO& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.PDU_DTAP_PS_MO."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.skip__seq__patching().is_bound()) field_skip__seq__patching = other_value.skip__seq__patching(); else field_skip__seq__patching.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } void PDU__DTAP__PS__MO::clean_up() { field_dlci.clean_up(); field_skip__seq__patching.clean_up(); field_dtap.clean_up(); } const TTCN_Typedescriptor_t* PDU__DTAP__PS__MO::get_descriptor() const { return &PDU__DTAP__PS__MO_descr_; } PDU__DTAP__PS__MO& PDU__DTAP__PS__MO::operator=(const PDU__DTAP__PS__MO& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.PDU_DTAP_PS_MO."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.skip__seq__patching().is_bound()) field_skip__seq__patching = other_value.skip__seq__patching(); else field_skip__seq__patching.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } return *this; } boolean PDU__DTAP__PS__MO::operator==(const PDU__DTAP__PS__MO& other_value) const { return field_dlci==other_value.field_dlci && field_skip__seq__patching==other_value.field_skip__seq__patching && field_dtap==other_value.field_dtap; } boolean PDU__DTAP__PS__MO::is_bound() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_bound()) || (OPTIONAL_OMIT == field_skip__seq__patching.get_selection() || field_skip__seq__patching.is_bound()) || (field_dtap.is_bound()); } boolean PDU__DTAP__PS__MO::is_value() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_value()) && (OPTIONAL_OMIT == field_skip__seq__patching.get_selection() || field_skip__seq__patching.is_value()) && field_dtap.is_value(); } int PDU__DTAP__PS__MO::size_of() const { int ret_val = 1; if (field_dlci.ispresent()) ret_val++; if (field_skip__seq__patching.ispresent()) ret_val++; return ret_val; } void PDU__DTAP__PS__MO::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ dlci := "); field_dlci.log(); TTCN_Logger::log_event_str(", skip_seq_patching := "); field_skip__seq__patching.log(); TTCN_Logger::log_event_str(", dtap := "); field_dtap.log(); TTCN_Logger::log_event_str(" }"); } void PDU__DTAP__PS__MO::set_implicit_omit() { if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (!skip__seq__patching().is_bound()) skip__seq__patching() = OMIT_VALUE; else skip__seq__patching().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__PS__MO::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 (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) skip__seq__patching().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "skip_seq_patching")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { skip__seq__patching().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_PS_MO: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.PDU_DTAP_PS_MO"); } } void PDU__DTAP__PS__MO::encode_text(Text_Buf& text_buf) const { field_dlci.encode_text(text_buf); field_skip__seq__patching.encode_text(text_buf); field_dtap.encode_text(text_buf); } void PDU__DTAP__PS__MO::decode_text(Text_Buf& text_buf) { field_dlci.decode_text(text_buf); field_skip__seq__patching.decode_text(text_buf); field_dtap.decode_text(text_buf); } struct PDU__DTAP__PS__MO_template::single_value_struct { OCTETSTRING_template field_dlci; BOOLEAN_template field_skip__seq__patching; MobileL3__Types::PDU__L3__MS__SGSN_template field_dtap; }; void PDU__DTAP__PS__MO_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_dlci = ANY_OR_OMIT; single_value->field_skip__seq__patching = ANY_OR_OMIT; single_value->field_dtap = ANY_VALUE; } } } void PDU__DTAP__PS__MO_template::copy_value(const PDU__DTAP__PS__MO& other_value) { single_value = new single_value_struct; if (other_value.dlci().is_bound()) { if (other_value.dlci().ispresent()) single_value->field_dlci = other_value.dlci()(); else single_value->field_dlci = OMIT_VALUE; } else { single_value->field_dlci.clean_up(); } if (other_value.skip__seq__patching().is_bound()) { if (other_value.skip__seq__patching().ispresent()) single_value->field_skip__seq__patching = other_value.skip__seq__patching()(); else single_value->field_skip__seq__patching = OMIT_VALUE; } else { single_value->field_skip__seq__patching.clean_up(); } if (other_value.dtap().is_bound()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.clean_up(); } set_selection(SPECIFIC_VALUE); } void PDU__DTAP__PS__MO_template::copy_template(const PDU__DTAP__PS__MO_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.dlci().get_selection()) { single_value->field_dlci = other_value.dlci(); } else { single_value->field_dlci.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.skip__seq__patching().get_selection()) { single_value->field_skip__seq__patching = other_value.skip__seq__patching(); } else { single_value->field_skip__seq__patching.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.dtap().get_selection()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.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 PDU__DTAP__PS__MO_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 PDU__DTAP__PS__MO_template(*other_value.implication_.precondition); implication_.implied_template = new PDU__DTAP__PS__MO_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 @RAN_Emulation.PDU_DTAP_PS_MO."); break; } set_selection(other_value); } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template() { } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(const PDU__DTAP__PS__MO& other_value) { copy_value(other_value); } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__PS__MO&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.PDU_DTAP_PS_MO from an unbound optional field."); } } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(PDU__DTAP__PS__MO_template* p_precondition, PDU__DTAP__PS__MO_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } PDU__DTAP__PS__MO_template::PDU__DTAP__PS__MO_template(const PDU__DTAP__PS__MO_template& other_value) : Base_Template() { copy_template(other_value); } PDU__DTAP__PS__MO_template::~PDU__DTAP__PS__MO_template() { clean_up(); } PDU__DTAP__PS__MO_template& PDU__DTAP__PS__MO_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PDU__DTAP__PS__MO_template& PDU__DTAP__PS__MO_template::operator=(const PDU__DTAP__PS__MO& other_value) { clean_up(); copy_value(other_value); return *this; } PDU__DTAP__PS__MO_template& PDU__DTAP__PS__MO_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__PS__MO&)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 @RAN_Emulation.PDU_DTAP_PS_MO."); } return *this; } PDU__DTAP__PS__MO_template& PDU__DTAP__PS__MO_template::operator=(const PDU__DTAP__PS__MO_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PDU__DTAP__PS__MO_template::match(const PDU__DTAP__PS__MO& 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.dlci().is_bound()) return FALSE; if((other_value.dlci().ispresent() ? !single_value->field_dlci.match((const OCTETSTRING&)other_value.dlci(), legacy) : !single_value->field_dlci.match_omit(legacy)))return FALSE; if(!other_value.skip__seq__patching().is_bound()) return FALSE; if((other_value.skip__seq__patching().ispresent() ? !single_value->field_skip__seq__patching.match((const BOOLEAN&)other_value.skip__seq__patching(), legacy) : !single_value->field_skip__seq__patching.match_omit(legacy)))return FALSE; if(!other_value.dtap().is_bound()) return FALSE; if(!single_value->field_dtap.match(other_value.dtap(), 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 @RAN_Emulation.PDU_DTAP_PS_MO."); } return FALSE; } boolean PDU__DTAP__PS__MO_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_bound()) || (single_value->field_skip__seq__patching.is_omit() || single_value->field_skip__seq__patching.is_bound()) || single_value->field_dtap.is_bound(); } boolean PDU__DTAP__PS__MO_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_value()) && (single_value->field_skip__seq__patching.is_omit() || single_value->field_skip__seq__patching.is_value()) && single_value->field_dtap.is_value(); } void PDU__DTAP__PS__MO_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; } PDU__DTAP__PS__MO PDU__DTAP__PS__MO_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 @RAN_Emulation.PDU_DTAP_PS_MO."); PDU__DTAP__PS__MO ret_val; if (single_value->field_dlci.is_omit()) ret_val.dlci() = OMIT_VALUE; else if (single_value->field_dlci.is_bound()) { ret_val.dlci() = single_value->field_dlci.valueof(); } if (single_value->field_skip__seq__patching.is_omit()) ret_val.skip__seq__patching() = OMIT_VALUE; else if (single_value->field_skip__seq__patching.is_bound()) { ret_val.skip__seq__patching() = single_value->field_skip__seq__patching.valueof(); } if (single_value->field_dtap.is_bound()) { ret_val.dtap() = single_value->field_dtap.valueof(); } return ret_val; } void PDU__DTAP__PS__MO_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 @RAN_Emulation.PDU_DTAP_PS_MO."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PDU__DTAP__PS__MO_template[list_length]; } PDU__DTAP__PS__MO_template& PDU__DTAP__PS__MO_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 @RAN_Emulation.PDU_DTAP_PS_MO."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.PDU_DTAP_PS_MO."); return value_list.list_value[list_index]; } OCTETSTRING_template& PDU__DTAP__PS__MO_template::dlci() { set_specific(); return single_value->field_dlci; } const OCTETSTRING_template& PDU__DTAP__PS__MO_template::dlci() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dlci of a non-specific template of type @RAN_Emulation.PDU_DTAP_PS_MO."); return single_value->field_dlci; } BOOLEAN_template& PDU__DTAP__PS__MO_template::skip__seq__patching() { set_specific(); return single_value->field_skip__seq__patching; } const BOOLEAN_template& PDU__DTAP__PS__MO_template::skip__seq__patching() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field skip_seq_patching of a non-specific template of type @RAN_Emulation.PDU_DTAP_PS_MO."); return single_value->field_skip__seq__patching; } MobileL3__Types::PDU__L3__MS__SGSN_template& PDU__DTAP__PS__MO_template::dtap() { set_specific(); return single_value->field_dtap; } const MobileL3__Types::PDU__L3__MS__SGSN_template& PDU__DTAP__PS__MO_template::dtap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dtap of a non-specific template of type @RAN_Emulation.PDU_DTAP_PS_MO."); return single_value->field_dtap; } int PDU__DTAP__PS__MO_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 1; if (single_value->field_dlci.is_present()) ret_val++; if (single_value->field_skip__seq__patching.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 @RAN_Emulation.PDU_DTAP_PS_MO 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 @RAN_Emulation.PDU_DTAP_PS_MO containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MO containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.PDU_DTAP_PS_MO."); } return 0; } void PDU__DTAP__PS__MO_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ dlci := "); single_value->field_dlci.log(); TTCN_Logger::log_event_str(", skip_seq_patching := "); single_value->field_skip__seq__patching.log(); TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.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 PDU__DTAP__PS__MO_template::log_match(const PDU__DTAP__PS__MO& 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 (match_value.dlci().ispresent()){ if(!single_value->field_dlci.match(match_value.dlci(), legacy)){ TTCN_Logger::log_logmatch_info(".dlci"); single_value->field_dlci.log_match(match_value.dlci(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_dlci.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".dlci := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_dlci.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.skip__seq__patching().ispresent()){ if(!single_value->field_skip__seq__patching.match(match_value.skip__seq__patching(), legacy)){ TTCN_Logger::log_logmatch_info(".skip_seq_patching"); single_value->field_skip__seq__patching.log_match(match_value.skip__seq__patching(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_skip__seq__patching.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".skip_seq_patching := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_skip__seq__patching.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_dtap.match(match_value.dtap(), legacy)){ TTCN_Logger::log_logmatch_info(".dtap"); single_value->field_dtap.log_match(match_value.dtap(), 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("{ dlci := "); if (match_value.dlci().ispresent()) { single_value->field_dlci.log_match(match_value.dlci(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_dlci.log(); if (single_value->field_dlci.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", skip_seq_patching := "); if (match_value.skip__seq__patching().ispresent()) { single_value->field_skip__seq__patching.log_match(match_value.skip__seq__patching(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_skip__seq__patching.log(); if (single_value->field_skip__seq__patching.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.log_match(match_value.dtap(), 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 PDU__DTAP__PS__MO_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (!skip__seq__patching().is_bound()) skip__seq__patching() = OMIT_VALUE; else skip__seq__patching().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__PS__MO_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_dlci.encode_text(text_buf); single_value->field_skip__seq__patching.encode_text(text_buf); single_value->field_dtap.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 @RAN_Emulation.PDU_DTAP_PS_MO."); } } void PDU__DTAP__PS__MO_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_dlci.decode_text(text_buf); single_value->field_skip__seq__patching.decode_text(text_buf); single_value->field_dtap.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 PDU__DTAP__PS__MO_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 @RAN_Emulation.PDU_DTAP_PS_MO."); } } void PDU__DTAP__PS__MO_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: { PDU__DTAP__PS__MO_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) skip__seq__patching().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "skip_seq_patching")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { skip__seq__patching().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_PS_MO: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PDU__DTAP__PS__MO_template* precondition = new PDU__DTAP__PS__MO_template; precondition->set_param(*param.get_elem(0)); PDU__DTAP__PS__MO_template* implied_template = new PDU__DTAP__PS__MO_template; implied_template->set_param(*param.get_elem(1)); *this = PDU__DTAP__PS__MO_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.PDU_DTAP_PS_MO"); } is_ifpresent = param.get_ifpresent(); } void PDU__DTAP__PS__MO_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_dlci.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_PS_MO"); single_value->field_skip__seq__patching.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_PS_MO"); single_value->field_dtap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_PS_MO"); 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 : "@RAN_Emulation.PDU_DTAP_PS_MO"); } boolean PDU__DTAP__PS__MO_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PDU__DTAP__PS__MO_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& par_dlci, const MobileL3__Types::PDU__L3__SGSN__MS& par_dtap) : field_dlci(par_dlci), field_dtap(par_dtap) { } PDU__DTAP__PS__MT::PDU__DTAP__PS__MT(const PDU__DTAP__PS__MT& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.PDU_DTAP_PS_MT."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } void PDU__DTAP__PS__MT::clean_up() { field_dlci.clean_up(); field_dtap.clean_up(); } const TTCN_Typedescriptor_t* PDU__DTAP__PS__MT::get_descriptor() const { return &PDU__DTAP__PS__MT_descr_; } PDU__DTAP__PS__MT& PDU__DTAP__PS__MT::operator=(const PDU__DTAP__PS__MT& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.PDU_DTAP_PS_MT."); if (other_value.dlci().is_bound()) field_dlci = other_value.dlci(); else field_dlci.clean_up(); if (other_value.dtap().is_bound()) field_dtap = other_value.dtap(); else field_dtap.clean_up(); } return *this; } boolean PDU__DTAP__PS__MT::operator==(const PDU__DTAP__PS__MT& other_value) const { return field_dlci==other_value.field_dlci && field_dtap==other_value.field_dtap; } boolean PDU__DTAP__PS__MT::is_bound() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_bound()) || (field_dtap.is_bound()); } boolean PDU__DTAP__PS__MT::is_value() const { return (OPTIONAL_OMIT == field_dlci.get_selection() || field_dlci.is_value()) && field_dtap.is_value(); } int PDU__DTAP__PS__MT::size_of() const { int ret_val = 1; if (field_dlci.ispresent()) ret_val++; return ret_val; } void PDU__DTAP__PS__MT::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ dlci := "); field_dlci.log(); TTCN_Logger::log_event_str(", dtap := "); field_dtap.log(); TTCN_Logger::log_event_str(" }"); } void PDU__DTAP__PS__MT::set_implicit_omit() { if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__PS__MT::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 (20 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_PS_MT: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.PDU_DTAP_PS_MT"); } } void PDU__DTAP__PS__MT::encode_text(Text_Buf& text_buf) const { field_dlci.encode_text(text_buf); field_dtap.encode_text(text_buf); } void PDU__DTAP__PS__MT::decode_text(Text_Buf& text_buf) { field_dlci.decode_text(text_buf); field_dtap.decode_text(text_buf); } struct PDU__DTAP__PS__MT_template::single_value_struct { OCTETSTRING_template field_dlci; MobileL3__Types::PDU__L3__SGSN__MS_template field_dtap; }; void PDU__DTAP__PS__MT_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_dlci = ANY_OR_OMIT; single_value->field_dtap = ANY_VALUE; } } } void PDU__DTAP__PS__MT_template::copy_value(const PDU__DTAP__PS__MT& other_value) { single_value = new single_value_struct; if (other_value.dlci().is_bound()) { if (other_value.dlci().ispresent()) single_value->field_dlci = other_value.dlci()(); else single_value->field_dlci = OMIT_VALUE; } else { single_value->field_dlci.clean_up(); } if (other_value.dtap().is_bound()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.clean_up(); } set_selection(SPECIFIC_VALUE); } void PDU__DTAP__PS__MT_template::copy_template(const PDU__DTAP__PS__MT_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.dlci().get_selection()) { single_value->field_dlci = other_value.dlci(); } else { single_value->field_dlci.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.dtap().get_selection()) { single_value->field_dtap = other_value.dtap(); } else { single_value->field_dtap.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 PDU__DTAP__PS__MT_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 PDU__DTAP__PS__MT_template(*other_value.implication_.precondition); implication_.implied_template = new PDU__DTAP__PS__MT_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 @RAN_Emulation.PDU_DTAP_PS_MT."); break; } set_selection(other_value); } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template() { } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(const PDU__DTAP__PS__MT& other_value) { copy_value(other_value); } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__PS__MT&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.PDU_DTAP_PS_MT from an unbound optional field."); } } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(PDU__DTAP__PS__MT_template* p_precondition, PDU__DTAP__PS__MT_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } PDU__DTAP__PS__MT_template::PDU__DTAP__PS__MT_template(const PDU__DTAP__PS__MT_template& other_value) : Base_Template() { copy_template(other_value); } PDU__DTAP__PS__MT_template::~PDU__DTAP__PS__MT_template() { clean_up(); } PDU__DTAP__PS__MT_template& PDU__DTAP__PS__MT_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PDU__DTAP__PS__MT_template& PDU__DTAP__PS__MT_template::operator=(const PDU__DTAP__PS__MT& other_value) { clean_up(); copy_value(other_value); return *this; } PDU__DTAP__PS__MT_template& PDU__DTAP__PS__MT_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PDU__DTAP__PS__MT&)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 @RAN_Emulation.PDU_DTAP_PS_MT."); } return *this; } PDU__DTAP__PS__MT_template& PDU__DTAP__PS__MT_template::operator=(const PDU__DTAP__PS__MT_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PDU__DTAP__PS__MT_template::match(const PDU__DTAP__PS__MT& 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.dlci().is_bound()) return FALSE; if((other_value.dlci().ispresent() ? !single_value->field_dlci.match((const OCTETSTRING&)other_value.dlci(), legacy) : !single_value->field_dlci.match_omit(legacy)))return FALSE; if(!other_value.dtap().is_bound()) return FALSE; if(!single_value->field_dtap.match(other_value.dtap(), 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 @RAN_Emulation.PDU_DTAP_PS_MT."); } return FALSE; } boolean PDU__DTAP__PS__MT_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_bound()) || single_value->field_dtap.is_bound(); } boolean PDU__DTAP__PS__MT_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_dlci.is_omit() || single_value->field_dlci.is_value()) && single_value->field_dtap.is_value(); } void PDU__DTAP__PS__MT_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; } PDU__DTAP__PS__MT PDU__DTAP__PS__MT_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 @RAN_Emulation.PDU_DTAP_PS_MT."); PDU__DTAP__PS__MT ret_val; if (single_value->field_dlci.is_omit()) ret_val.dlci() = OMIT_VALUE; else if (single_value->field_dlci.is_bound()) { ret_val.dlci() = single_value->field_dlci.valueof(); } if (single_value->field_dtap.is_bound()) { ret_val.dtap() = single_value->field_dtap.valueof(); } return ret_val; } void PDU__DTAP__PS__MT_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 @RAN_Emulation.PDU_DTAP_PS_MT."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PDU__DTAP__PS__MT_template[list_length]; } PDU__DTAP__PS__MT_template& PDU__DTAP__PS__MT_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 @RAN_Emulation.PDU_DTAP_PS_MT."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.PDU_DTAP_PS_MT."); return value_list.list_value[list_index]; } OCTETSTRING_template& PDU__DTAP__PS__MT_template::dlci() { set_specific(); return single_value->field_dlci; } const OCTETSTRING_template& PDU__DTAP__PS__MT_template::dlci() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dlci of a non-specific template of type @RAN_Emulation.PDU_DTAP_PS_MT."); return single_value->field_dlci; } MobileL3__Types::PDU__L3__SGSN__MS_template& PDU__DTAP__PS__MT_template::dtap() { set_specific(); return single_value->field_dtap; } const MobileL3__Types::PDU__L3__SGSN__MS_template& PDU__DTAP__PS__MT_template::dtap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dtap of a non-specific template of type @RAN_Emulation.PDU_DTAP_PS_MT."); return single_value->field_dtap; } int PDU__DTAP__PS__MT_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 1; if (single_value->field_dlci.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 @RAN_Emulation.PDU_DTAP_PS_MT 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 @RAN_Emulation.PDU_DTAP_PS_MT containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.PDU_DTAP_PS_MT containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.PDU_DTAP_PS_MT."); } return 0; } void PDU__DTAP__PS__MT_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ dlci := "); single_value->field_dlci.log(); TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.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 PDU__DTAP__PS__MT_template::log_match(const PDU__DTAP__PS__MT& 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 (match_value.dlci().ispresent()){ if(!single_value->field_dlci.match(match_value.dlci(), legacy)){ TTCN_Logger::log_logmatch_info(".dlci"); single_value->field_dlci.log_match(match_value.dlci(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_dlci.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".dlci := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_dlci.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_dtap.match(match_value.dtap(), legacy)){ TTCN_Logger::log_logmatch_info(".dtap"); single_value->field_dtap.log_match(match_value.dtap(), 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("{ dlci := "); if (match_value.dlci().ispresent()) { single_value->field_dlci.log_match(match_value.dlci(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_dlci.log(); if (single_value->field_dlci.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", dtap := "); single_value->field_dtap.log_match(match_value.dtap(), 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 PDU__DTAP__PS__MT_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!dlci().is_bound()) dlci() = OMIT_VALUE; else dlci().set_implicit_omit(); if (dtap().is_bound()) dtap().set_implicit_omit(); } void PDU__DTAP__PS__MT_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_dlci.encode_text(text_buf); single_value->field_dtap.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 @RAN_Emulation.PDU_DTAP_PS_MT."); } } void PDU__DTAP__PS__MT_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_dlci.decode_text(text_buf); single_value->field_dtap.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 PDU__DTAP__PS__MT_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 @RAN_Emulation.PDU_DTAP_PS_MT."); } } void PDU__DTAP__PS__MT_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: { PDU__DTAP__PS__MT_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) dlci().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) dtap().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "dlci")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dlci().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.PDU_DTAP_PS_MT: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PDU__DTAP__PS__MT_template* precondition = new PDU__DTAP__PS__MT_template; precondition->set_param(*param.get_elem(0)); PDU__DTAP__PS__MT_template* implied_template = new PDU__DTAP__PS__MT_template; implied_template->set_param(*param.get_elem(1)); *this = PDU__DTAP__PS__MT_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.PDU_DTAP_PS_MT"); } is_ifpresent = param.get_ifpresent(); } void PDU__DTAP__PS__MT_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_dlci.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_PS_MT"); single_value->field_dtap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.PDU_DTAP_PS_MT"); 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 : "@RAN_Emulation.PDU_DTAP_PS_MT"); } boolean PDU__DTAP__PS__MT_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PDU__DTAP__PS__MT_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_idxitem_selection) { case MESSAGE_0: delete (my_head)->message_0; break; case MESSAGE_1: delete (my_head)->message_1; break; case MESSAGE_2: delete (my_head)->message_2; break; case MESSAGE_3: delete (my_head)->message_3; break; case MESSAGE_4: delete (my_head)->message_4; break; case MESSAGE_5: delete (my_head)->message_5; break; case MESSAGE_6: delete (my_head)->message_6; break; case MESSAGE_7: delete (my_head)->message_7; break; case MESSAGE_8: delete (my_head)->message_8; break; default: TTCN_error("Internal error: Invalid message selector in the queue of port %s.", port_name); } msg_queue_item_base *next_item = msg_queue_head->next_item; delete (msg_queue_item*)msg_queue_head; msg_queue_head = next_item; if (next_item == NULL) msg_queue_tail = NULL; TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::extract__msg, port_name, 0, ++msg_head_count, CHARSTRING(0,NULL), CHARSTRING(0,NULL));} void RAN__Conn__PT::clear_queue() { while (msg_queue_head != NULL) remove_msg_queue_head(); } RAN__Conn__PT::RAN__Conn__PT(const char *par_port_name) : PORT(par_port_name) { msg_queue_head = NULL; msg_queue_tail = NULL; } RAN__Conn__PT::~RAN__Conn__PT() { clear_queue(); } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RANAP-PDU-Descriptions.RANAP-PDU : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RANAP-PDU-Descriptions.RANAP-PDU"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RANAP-PDU-Descriptions.RANAP-PDU"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RANAP-PDU-Descriptions.RANAP-PDU : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const RANAP__PDU__Descriptions::RANAP__PDU& send_par_value = RANAP__PDU__Descriptions::RANAP__PDU(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const RANAP__PDU__Descriptions::RANAP__PDU& send_par_value = RANAP__PDU__Descriptions::RANAP__PDU(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__PDU__Descriptions::RANAP__PDU_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const RANAP__PDU__Descriptions::RANAP__PDU& send_par_value = RANAP__PDU__Descriptions::RANAP__PDU(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RANAP_CodecPort.RANAP_N_UNITDATA_req"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RANAP_CodecPort.RANAP_N_UNITDATA_req"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par_value = RANAP__CodecPort::RANAP__N__UNITDATA__req(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par_value = RANAP__CodecPort::RANAP__N__UNITDATA__req(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const RANAP__CodecPort::RANAP__N__UNITDATA__req& send_par_value = RANAP__CodecPort::RANAP__N__UNITDATA__req(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Req : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RANAP_Conn_Req"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const RANAP__Conn__Req& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Req& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RANAP_Conn_Req"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Req : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const RANAP__Conn__Req& send_par_value = RANAP__Conn__Req(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Req_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const RANAP__Conn__Req& send_par_value = RANAP__Conn__Req(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Req_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const RANAP__Conn__Req& send_par_value = RANAP__Conn__Req(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Ind : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RANAP_Conn_Ind"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const RANAP__Conn__Ind& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Ind& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RANAP_Conn_Ind"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Ind : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const RANAP__Conn__Ind& send_par_value = RANAP__Conn__Ind(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Ind_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const RANAP__Conn__Ind& send_par_value = RANAP__Conn__Ind(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const RANAP__Conn__Ind_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const RANAP__Conn__Ind& send_par_value = RANAP__Conn__Ind(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MO& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MO : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_MO"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const PDU__DTAP__MO& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MO& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_MO"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MO : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MO_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const PDU__DTAP__MO& send_par_value = PDU__DTAP__MO(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MO_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const PDU__DTAP__MO& send_par_value = PDU__DTAP__MO(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MO_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const PDU__DTAP__MO& send_par_value = PDU__DTAP__MO(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MT& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MT : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_MT"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const PDU__DTAP__MT& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MT& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_MT"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MT : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MT_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const PDU__DTAP__MT& send_par_value = PDU__DTAP__MT(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MT_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const PDU__DTAP__MT& send_par_value = PDU__DTAP__MT(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__MT_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const PDU__DTAP__MT& send_par_value = PDU__DTAP__MT(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MO : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_PS_MO"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_PS_MO"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MO : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MO& send_par_value = PDU__DTAP__PS__MO(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MO& send_par_value = PDU__DTAP__PS__MO(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MO_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MO& send_par_value = PDU__DTAP__PS__MO(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MT : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_PS_MT"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.PDU_DTAP_PS_MT"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MT : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MT& send_par_value = PDU__DTAP__PS__MT(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MT& send_par_value = PDU__DTAP__PS__MT(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const PDU__DTAP__PS__MT_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const PDU__DTAP__PS__MT& send_par_value = PDU__DTAP__PS__MT(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } void RAN__Conn__PT::send(const RAN__Conn__Prim& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation."); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_send(port_name, destination_component, (TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RAN_Conn_Prim : "), send_par.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name); else { Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RAN_Conn_Prim"); send_par.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__Conn__PT::send(const RAN__Conn__Prim& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) send(send_par, destination_components[i], timestamp_redirect); } void RAN__Conn__PT::send(const RAN__Conn__Prim& send_par, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_message(text_buf, "@RAN_Emulation.RAN_Conn_Prim"); send_par.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_SEND, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MCSEND, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RAN_Conn_Prim : "), send_par.log(), TTCN_Logger::end_event_log2str())); } else send(send_par, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__Conn__PT::send(const RAN__Conn__Prim_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { const RAN__Conn__Prim& send_par_value = RAN__Conn__Prim(send_par.valueof()); send(send_par_value, destination_component, timestamp_redirect); } void RAN__Conn__PT::send(const RAN__Conn__Prim_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { const RAN__Conn__Prim& send_par_value = RAN__Conn__Prim(send_par.valueof()); send(send_par_value, nof_components, destination_components, timestamp_redirect); } void RAN__Conn__PT::send(const RAN__Conn__Prim_template& send_par, boolean broadcast, FLOAT* timestamp_redirect) { const RAN__Conn__Prim& send_par_value = RAN__Conn__Prim(send_par.valueof()); send(send_par_value, broadcast, timestamp_redirect); } alt_status RAN__Conn__PT::receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else { if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { switch (my_head->item_selection) { case MESSAGE_0: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU: "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_1: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req: "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_2: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req: "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_3: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind: "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_4: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO: "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_5: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT: "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_6: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO: "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_7: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT: "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_8: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim: "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; default: TTCN_error("Internal error: unknown message"); } } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else { if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { switch (my_head->item_selection) { case MESSAGE_0: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU: "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_1: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req: "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_2: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req: "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_3: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind: "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_4: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO: "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_5: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT: "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_6: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO: "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_7: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT: "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_8: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim: "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; default: TTCN_error("Internal error: unknown message"); } } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { switch (my_head->item_selection) { case MESSAGE_0: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU: "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_1: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req: "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_2: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req: "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_3: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind: "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_4: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO: "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_5: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT: "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_6: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO: "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_7: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT: "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; case MESSAGE_8: TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim: "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); break; default: TTCN_error("Internal error: unknown message"); } } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const RANAP__PDU__Descriptions::RANAP__PDU_template& value_template, RANAP__PDU__Descriptions::RANAP__PDU *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_0) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RANAP-PDU-Descriptions.RANAP-PDU.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_0)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_0; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU : "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const RANAP__PDU__Descriptions::RANAP__PDU_template& value_template, RANAP__PDU__Descriptions::RANAP__PDU *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_0) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RANAP-PDU-Descriptions.RANAP-PDU.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_0)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_0; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU : "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const RANAP__PDU__Descriptions::RANAP__PDU_template& value_template, RANAP__PDU__Descriptions::RANAP__PDU *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_0) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RANAP-PDU-Descriptions.RANAP-PDU.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_0)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_0; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP-PDU-Descriptions.RANAP-PDU : "), my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& value_template, RANAP__CodecPort::RANAP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_1) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RANAP_CodecPort.RANAP_N_UNITDATA_req.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_1)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_1; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& value_template, RANAP__CodecPort::RANAP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_1) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RANAP_CodecPort.RANAP_N_UNITDATA_req.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_1)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_1; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const RANAP__CodecPort::RANAP__N__UNITDATA__req_template& value_template, RANAP__CodecPort::RANAP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_1) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RANAP_CodecPort.RANAP_N_UNITDATA_req.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_1)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_1; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const RANAP__Conn__Req_template& value_template, RANAP__Conn__Req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_2) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Req.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_2)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_2; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req : "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const RANAP__Conn__Req_template& value_template, RANAP__Conn__Req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_2) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Req.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_2)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_2; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req : "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const RANAP__Conn__Req_template& value_template, RANAP__Conn__Req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_2) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Req.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_2)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_2; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Req : "), my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const RANAP__Conn__Ind_template& value_template, RANAP__Conn__Ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_3) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Ind.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_3)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_3; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind : "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const RANAP__Conn__Ind_template& value_template, RANAP__Conn__Ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_3) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Ind.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_3)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_3; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind : "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const RANAP__Conn__Ind_template& value_template, RANAP__Conn__Ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_3) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.RANAP_Conn_Ind.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_3)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_3; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RANAP_Conn_Ind : "), my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const PDU__DTAP__MO_template& value_template, PDU__DTAP__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_4) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MO.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_4)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_4; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO : "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const PDU__DTAP__MO_template& value_template, PDU__DTAP__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_4) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MO.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_4)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_4; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO : "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const PDU__DTAP__MO_template& value_template, PDU__DTAP__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_4) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MO.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_4)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_4; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MO : "), my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const PDU__DTAP__MT_template& value_template, PDU__DTAP__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_5) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MT.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_5)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_5; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT : "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const PDU__DTAP__MT_template& value_template, PDU__DTAP__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_5) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MT.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_5)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_5; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT : "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const PDU__DTAP__MT_template& value_template, PDU__DTAP__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_5) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_MT.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_5)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_5; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_MT : "), my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const PDU__DTAP__PS__MO_template& value_template, PDU__DTAP__PS__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_6) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MO.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_6)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_6; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO : "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const PDU__DTAP__PS__MO_template& value_template, PDU__DTAP__PS__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_6) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MO.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_6)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_6; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO : "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const PDU__DTAP__PS__MO_template& value_template, PDU__DTAP__PS__MO *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_6) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MO.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_6)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_6; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MO : "), my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const PDU__DTAP__PS__MT_template& value_template, PDU__DTAP__PS__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_7) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MT.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_7)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_7; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT : "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const PDU__DTAP__PS__MT_template& value_template, PDU__DTAP__PS__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_7) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MT.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_7)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_7; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT : "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const PDU__DTAP__PS__MT_template& value_template, PDU__DTAP__PS__MT *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_7) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.PDU_DTAP_PS_MT.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_7)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_7; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.PDU_DTAP_PS_MT : "), my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::receive(const RAN__Conn__Prim_template& value_template, RAN__Conn__Prim *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_8) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RAN_Conn_Prim.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_8)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_8; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim : "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } alt_status RAN__Conn__PT::check_receive(const RAN__Conn__Prim_template& value_template, RAN__Conn__Prim *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (my_head->item_selection != MESSAGE_8) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @RAN_Emulation.RAN_Conn_Prim.", port_name); return ALT_NO; } else if (!value_template.match(*my_head->message_8)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_8; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim : "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__Conn__PT::trigger(const RAN__Conn__Prim_template& value_template, RAN__Conn__Prim *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template"); msg_queue_item *my_head = (msg_queue_item*)msg_queue_head; if (msg_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(my_head->sender_component)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name); sender_template.log_match(my_head->sender_component); TTCN_Logger::end_event(); } remove_msg_queue_head(); return ALT_REPEAT; } else if (my_head->item_selection != MESSAGE_8) { TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @RAN_Emulation.RAN_Conn_Prim.", port_name); remove_msg_queue_head(); return ALT_REPEAT; } else if (!value_template.match(*my_head->message_8)) { const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } remove_msg_queue_head(); return ALT_REPEAT; } else { if (value_redirect != NULL) { *value_redirect = *my_head->message_8; } if (sender_ptr != NULL) *sender_ptr = my_head->sender_component; TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__, port_name, my_head->sender_component, (TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8), TTCN_Logger::end_event_log2str())); } log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op, my_head->sender_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @RAN_Emulation.RAN_Conn_Prim : "), my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_msg_queue_head(); return ALT_YES; } } void RAN__Conn__PT::incoming_message(const RANAP__PDU__Descriptions::RANAP__PDU& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RANAP-PDU-Descriptions.RANAP-PDU : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_0; new_item->message_0 = new RANAP__PDU__Descriptions::RANAP__PDU(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const RANAP__CodecPort::RANAP__N__UNITDATA__req& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RANAP_CodecPort.RANAP_N_UNITDATA_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_1; new_item->message_1 = new RANAP__CodecPort::RANAP__N__UNITDATA__req(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const RANAP__Conn__Req& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Req : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_2; new_item->message_2 = new RANAP__Conn__Req(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const RANAP__Conn__Ind& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RANAP_Conn_Ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_3; new_item->message_3 = new RANAP__Conn__Ind(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const PDU__DTAP__MO& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MO : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_4; new_item->message_4 = new PDU__DTAP__MO(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const PDU__DTAP__MT& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_MT : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_5; new_item->message_5 = new PDU__DTAP__MT(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const PDU__DTAP__PS__MO& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MO : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_6; new_item->message_6 = new PDU__DTAP__PS__MO(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const PDU__DTAP__PS__MT& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.PDU_DTAP_PS_MT : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_7; new_item->message_7 = new PDU__DTAP__PS__MT(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } void RAN__Conn__PT::incoming_message(const RAN__Conn__Prim& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a message has arrived on it.", port_name); } } msg_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @RAN_Emulation.RAN_Conn_Prim : "), incoming_par.log(), TTCN_Logger::end_event_log2str())); } msg_queue_item *new_item = new msg_queue_item; new_item->item_selection = MESSAGE_8; new_item->message_8 = new RAN__Conn__Prim(incoming_par); new_item->sender_component = sender_component; append_to_msg_queue(new_item); } boolean RAN__Conn__PT::process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING&) { if (!strcmp(message_type, "@RANAP-PDU-Descriptions.RANAP-PDU")) { RANAP__PDU__Descriptions::RANAP__PDU incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RANAP_CodecPort.RANAP_N_UNITDATA_req")) { RANAP__CodecPort::RANAP__N__UNITDATA__req incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.RANAP_Conn_Req")) { RANAP__Conn__Req incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.RANAP_Conn_Ind")) { RANAP__Conn__Ind incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.PDU_DTAP_MO")) { PDU__DTAP__MO incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.PDU_DTAP_MT")) { PDU__DTAP__MT incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.PDU_DTAP_PS_MO")) { PDU__DTAP__PS__MO incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.PDU_DTAP_PS_MT")) { PDU__DTAP__PS__MT incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else if (!strcmp(message_type, "@RAN_Emulation.RAN_Conn_Prim")) { RAN__Conn__Prim incoming_par; incoming_par.decode_text(incoming_buf); incoming_message(incoming_par, sender_component); return TRUE; } else return FALSE; } ConnectionData::ConnectionData() { } ConnectionData::ConnectionData(const COMPONENT& par_comp__ref, const INTEGER& par_sccp__conn__id, const OPTIONAL< INTEGER >& par_cic, const N__Sd__Array& par_n__sd) : field_comp__ref(par_comp__ref), field_sccp__conn__id(par_sccp__conn__id), field_cic(par_cic), field_n__sd(par_n__sd) { } ConnectionData::ConnectionData(const ConnectionData& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.ConnectionData."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.sccp__conn__id().is_bound()) field_sccp__conn__id = other_value.sccp__conn__id(); else field_sccp__conn__id.clean_up(); if (other_value.cic().is_bound()) field_cic = other_value.cic(); else field_cic.clean_up(); if (other_value.n__sd().is_bound()) field_n__sd = other_value.n__sd(); else field_n__sd.clean_up(); } void ConnectionData::clean_up() { field_comp__ref.clean_up(); field_sccp__conn__id.clean_up(); field_cic.clean_up(); field_n__sd.clean_up(); } const TTCN_Typedescriptor_t* ConnectionData::get_descriptor() const { return &ConnectionData_descr_; } ConnectionData& ConnectionData::operator=(const ConnectionData& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.ConnectionData."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.sccp__conn__id().is_bound()) field_sccp__conn__id = other_value.sccp__conn__id(); else field_sccp__conn__id.clean_up(); if (other_value.cic().is_bound()) field_cic = other_value.cic(); else field_cic.clean_up(); if (other_value.n__sd().is_bound()) field_n__sd = other_value.n__sd(); else field_n__sd.clean_up(); } return *this; } boolean ConnectionData::operator==(const ConnectionData& other_value) const { return field_comp__ref==other_value.field_comp__ref && field_sccp__conn__id==other_value.field_sccp__conn__id && field_cic==other_value.field_cic && field_n__sd==other_value.field_n__sd; } boolean ConnectionData::is_bound() const { return (field_comp__ref.is_bound()) || (field_sccp__conn__id.is_bound()) || (OPTIONAL_OMIT == field_cic.get_selection() || field_cic.is_bound()) || (field_n__sd.is_bound()); } boolean ConnectionData::is_value() const { return field_comp__ref.is_value() && field_sccp__conn__id.is_value() && (OPTIONAL_OMIT == field_cic.get_selection() || field_cic.is_value()) && field_n__sd.is_value(); } int ConnectionData::size_of() const { int ret_val = 3; if (field_cic.ispresent()) ret_val++; return ret_val; } void ConnectionData::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ comp_ref := "); field_comp__ref.log(); TTCN_Logger::log_event_str(", sccp_conn_id := "); field_sccp__conn__id.log(); TTCN_Logger::log_event_str(", cic := "); field_cic.log(); TTCN_Logger::log_event_str(", n_sd := "); field_n__sd.log(); TTCN_Logger::log_event_str(" }"); } void ConnectionData::set_implicit_omit() { if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (sccp__conn__id().is_bound()) sccp__conn__id().set_implicit_omit(); if (!cic().is_bound()) cic() = OMIT_VALUE; else cic().set_implicit_omit(); if (n__sd().is_bound()) n__sd().set_implicit_omit(); } void ConnectionData::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 (40 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sccp__conn__id().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) cic().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) n__sd().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_conn_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__conn__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "cic")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { cic().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "n_sd")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { n__sd().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ConnectionData: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.ConnectionData"); } } void ConnectionData::encode_text(Text_Buf& text_buf) const { field_comp__ref.encode_text(text_buf); field_sccp__conn__id.encode_text(text_buf); field_cic.encode_text(text_buf); field_n__sd.encode_text(text_buf); } void ConnectionData::decode_text(Text_Buf& text_buf) { field_comp__ref.decode_text(text_buf); field_sccp__conn__id.decode_text(text_buf); field_cic.decode_text(text_buf); field_n__sd.decode_text(text_buf); } struct ConnectionData_template::single_value_struct { COMPONENT_template field_comp__ref; INTEGER_template field_sccp__conn__id; INTEGER_template field_cic; N__Sd__Array_template field_n__sd; }; void ConnectionData_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_comp__ref = ANY_VALUE; single_value->field_sccp__conn__id = ANY_VALUE; single_value->field_cic = ANY_OR_OMIT; single_value->field_n__sd = ANY_VALUE; } } } void ConnectionData_template::copy_value(const ConnectionData& other_value) { single_value = new single_value_struct; if (other_value.comp__ref().is_bound()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.clean_up(); } if (other_value.sccp__conn__id().is_bound()) { single_value->field_sccp__conn__id = other_value.sccp__conn__id(); } else { single_value->field_sccp__conn__id.clean_up(); } if (other_value.cic().is_bound()) { if (other_value.cic().ispresent()) single_value->field_cic = other_value.cic()(); else single_value->field_cic = OMIT_VALUE; } else { single_value->field_cic.clean_up(); } if (other_value.n__sd().is_bound()) { single_value->field_n__sd = other_value.n__sd(); } else { single_value->field_n__sd.clean_up(); } set_selection(SPECIFIC_VALUE); } void ConnectionData_template::copy_template(const ConnectionData_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.comp__ref().get_selection()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sccp__conn__id().get_selection()) { single_value->field_sccp__conn__id = other_value.sccp__conn__id(); } else { single_value->field_sccp__conn__id.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.cic().get_selection()) { single_value->field_cic = other_value.cic(); } else { single_value->field_cic.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.n__sd().get_selection()) { single_value->field_n__sd = other_value.n__sd(); } else { single_value->field_n__sd.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 ConnectionData_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 ConnectionData_template(*other_value.implication_.precondition); implication_.implied_template = new ConnectionData_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 @RAN_Emulation.ConnectionData."); break; } set_selection(other_value); } ConnectionData_template::ConnectionData_template() { } ConnectionData_template::ConnectionData_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ConnectionData_template::ConnectionData_template(const ConnectionData& other_value) { copy_value(other_value); } ConnectionData_template::ConnectionData_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ConnectionData&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.ConnectionData from an unbound optional field."); } } ConnectionData_template::ConnectionData_template(ConnectionData_template* p_precondition, ConnectionData_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ConnectionData_template::ConnectionData_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ConnectionData_template::ConnectionData_template(const ConnectionData_template& other_value) : Base_Template() { copy_template(other_value); } ConnectionData_template::~ConnectionData_template() { clean_up(); } ConnectionData_template& ConnectionData_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ConnectionData_template& ConnectionData_template::operator=(const ConnectionData& other_value) { clean_up(); copy_value(other_value); return *this; } ConnectionData_template& ConnectionData_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ConnectionData&)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 @RAN_Emulation.ConnectionData."); } return *this; } ConnectionData_template& ConnectionData_template::operator=(const ConnectionData_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ConnectionData_template::match(const ConnectionData& 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.comp__ref().is_bound()) return FALSE; if(!single_value->field_comp__ref.match(other_value.comp__ref(), legacy))return FALSE; if(!other_value.sccp__conn__id().is_bound()) return FALSE; if(!single_value->field_sccp__conn__id.match(other_value.sccp__conn__id(), legacy))return FALSE; if(!other_value.cic().is_bound()) return FALSE; if((other_value.cic().ispresent() ? !single_value->field_cic.match((const INTEGER&)other_value.cic(), legacy) : !single_value->field_cic.match_omit(legacy)))return FALSE; if(!other_value.n__sd().is_bound()) return FALSE; if(!single_value->field_n__sd.match(other_value.n__sd(), 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 @RAN_Emulation.ConnectionData."); } return FALSE; } boolean ConnectionData_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_comp__ref.is_bound() || single_value->field_sccp__conn__id.is_bound() || (single_value->field_cic.is_omit() || single_value->field_cic.is_bound()) || single_value->field_n__sd.is_bound(); } boolean ConnectionData_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_comp__ref.is_value() && single_value->field_sccp__conn__id.is_value() && (single_value->field_cic.is_omit() || single_value->field_cic.is_value()) && single_value->field_n__sd.is_value(); } void ConnectionData_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; } ConnectionData ConnectionData_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 @RAN_Emulation.ConnectionData."); ConnectionData ret_val; if (single_value->field_comp__ref.is_bound()) { ret_val.comp__ref() = single_value->field_comp__ref.valueof(); } if (single_value->field_sccp__conn__id.is_bound()) { ret_val.sccp__conn__id() = single_value->field_sccp__conn__id.valueof(); } if (single_value->field_cic.is_omit()) ret_val.cic() = OMIT_VALUE; else if (single_value->field_cic.is_bound()) { ret_val.cic() = single_value->field_cic.valueof(); } if (single_value->field_n__sd.is_bound()) { ret_val.n__sd() = single_value->field_n__sd.valueof(); } return ret_val; } void ConnectionData_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 @RAN_Emulation.ConnectionData."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ConnectionData_template[list_length]; } ConnectionData_template& ConnectionData_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 @RAN_Emulation.ConnectionData."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.ConnectionData."); return value_list.list_value[list_index]; } COMPONENT_template& ConnectionData_template::comp__ref() { set_specific(); return single_value->field_comp__ref; } const COMPONENT_template& ConnectionData_template::comp__ref() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field comp_ref of a non-specific template of type @RAN_Emulation.ConnectionData."); return single_value->field_comp__ref; } INTEGER_template& ConnectionData_template::sccp__conn__id() { set_specific(); return single_value->field_sccp__conn__id; } const INTEGER_template& ConnectionData_template::sccp__conn__id() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sccp_conn_id of a non-specific template of type @RAN_Emulation.ConnectionData."); return single_value->field_sccp__conn__id; } INTEGER_template& ConnectionData_template::cic() { set_specific(); return single_value->field_cic; } const INTEGER_template& ConnectionData_template::cic() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cic of a non-specific template of type @RAN_Emulation.ConnectionData."); return single_value->field_cic; } N__Sd__Array_template& ConnectionData_template::n__sd() { set_specific(); return single_value->field_n__sd; } const N__Sd__Array_template& ConnectionData_template::n__sd() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field n_sd of a non-specific template of type @RAN_Emulation.ConnectionData."); return single_value->field_n__sd; } int ConnectionData_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 3; if (single_value->field_cic.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 @RAN_Emulation.ConnectionData 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 @RAN_Emulation.ConnectionData containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ConnectionData containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.ConnectionData."); } return 0; } void ConnectionData_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ comp_ref := "); single_value->field_comp__ref.log(); TTCN_Logger::log_event_str(", sccp_conn_id := "); single_value->field_sccp__conn__id.log(); TTCN_Logger::log_event_str(", cic := "); single_value->field_cic.log(); TTCN_Logger::log_event_str(", n_sd := "); single_value->field_n__sd.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 ConnectionData_template::log_match(const ConnectionData& 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_comp__ref.match(match_value.comp__ref(), legacy)){ TTCN_Logger::log_logmatch_info(".comp_ref"); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_sccp__conn__id.match(match_value.sccp__conn__id(), legacy)){ TTCN_Logger::log_logmatch_info(".sccp_conn_id"); single_value->field_sccp__conn__id.log_match(match_value.sccp__conn__id(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.cic().ispresent()){ if(!single_value->field_cic.match(match_value.cic(), legacy)){ TTCN_Logger::log_logmatch_info(".cic"); single_value->field_cic.log_match(match_value.cic(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_cic.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".cic := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_cic.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_n__sd.match(match_value.n__sd(), legacy)){ TTCN_Logger::log_logmatch_info(".n_sd"); single_value->field_n__sd.log_match(match_value.n__sd(), 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("{ comp_ref := "); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::log_event_str(", sccp_conn_id := "); single_value->field_sccp__conn__id.log_match(match_value.sccp__conn__id(), legacy); TTCN_Logger::log_event_str(", cic := "); if (match_value.cic().ispresent()) { single_value->field_cic.log_match(match_value.cic(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_cic.log(); if (single_value->field_cic.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", n_sd := "); single_value->field_n__sd.log_match(match_value.n__sd(), 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 ConnectionData_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (sccp__conn__id().is_bound()) sccp__conn__id().set_implicit_omit(); if (!cic().is_bound()) cic() = OMIT_VALUE; else cic().set_implicit_omit(); if (n__sd().is_bound()) n__sd().set_implicit_omit(); } void ConnectionData_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_comp__ref.encode_text(text_buf); single_value->field_sccp__conn__id.encode_text(text_buf); single_value->field_cic.encode_text(text_buf); single_value->field_n__sd.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 @RAN_Emulation.ConnectionData."); } } void ConnectionData_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_comp__ref.decode_text(text_buf); single_value->field_sccp__conn__id.decode_text(text_buf); single_value->field_cic.decode_text(text_buf); single_value->field_n__sd.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 ConnectionData_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 @RAN_Emulation.ConnectionData."); } } void ConnectionData_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: { ConnectionData_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sccp__conn__id().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) cic().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) n__sd().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_conn_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__conn__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "cic")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { cic().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "n_sd")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { n__sd().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ConnectionData: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { ConnectionData_template* precondition = new ConnectionData_template; precondition->set_param(*param.get_elem(0)); ConnectionData_template* implied_template = new ConnectionData_template; implied_template->set_param(*param.get_elem(1)); *this = ConnectionData_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.ConnectionData"); } is_ifpresent = param.get_ifpresent(); } void ConnectionData_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_comp__ref.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ConnectionData"); single_value->field_sccp__conn__id.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ConnectionData"); single_value->field_cic.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ConnectionData"); single_value->field_n__sd.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ConnectionData"); 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 : "@RAN_Emulation.ConnectionData"); } boolean ConnectionData_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ConnectionData_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& par_imsi, const OCTETSTRING& par_tmsi) : field_comp__ref(par_comp__ref), field_imsi(par_imsi), field_tmsi(par_tmsi) { } ImsiMapping::ImsiMapping(const ImsiMapping& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.ImsiMapping."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.imsi().is_bound()) field_imsi = other_value.imsi(); else field_imsi.clean_up(); if (other_value.tmsi().is_bound()) field_tmsi = other_value.tmsi(); else field_tmsi.clean_up(); } void ImsiMapping::clean_up() { field_comp__ref.clean_up(); field_imsi.clean_up(); field_tmsi.clean_up(); } const TTCN_Typedescriptor_t* ImsiMapping::get_descriptor() const { return &ImsiMapping_descr_; } ImsiMapping& ImsiMapping::operator=(const ImsiMapping& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.ImsiMapping."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.imsi().is_bound()) field_imsi = other_value.imsi(); else field_imsi.clean_up(); if (other_value.tmsi().is_bound()) field_tmsi = other_value.tmsi(); else field_tmsi.clean_up(); } return *this; } boolean ImsiMapping::operator==(const ImsiMapping& other_value) const { return field_comp__ref==other_value.field_comp__ref && field_imsi==other_value.field_imsi && field_tmsi==other_value.field_tmsi; } boolean ImsiMapping::is_bound() const { return (field_comp__ref.is_bound()) || (OPTIONAL_OMIT == field_imsi.get_selection() || field_imsi.is_bound()) || (field_tmsi.is_bound()); } boolean ImsiMapping::is_value() const { return field_comp__ref.is_value() && (OPTIONAL_OMIT == field_imsi.get_selection() || field_imsi.is_value()) && field_tmsi.is_value(); } int ImsiMapping::size_of() const { int ret_val = 2; if (field_imsi.ispresent()) ret_val++; return ret_val; } void ImsiMapping::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ comp_ref := "); field_comp__ref.log(); TTCN_Logger::log_event_str(", imsi := "); field_imsi.log(); TTCN_Logger::log_event_str(", tmsi := "); field_tmsi.log(); TTCN_Logger::log_event_str(" }"); } void ImsiMapping::set_implicit_omit() { if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (!imsi().is_bound()) imsi() = OMIT_VALUE; else imsi().set_implicit_omit(); if (tmsi().is_bound()) tmsi().set_implicit_omit(); } void ImsiMapping::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 (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().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) tmsi().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_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_idxget_id()->get_name(), "tmsi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { tmsi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ImsiMapping: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.ImsiMapping"); } } void ImsiMapping::encode_text(Text_Buf& text_buf) const { field_comp__ref.encode_text(text_buf); field_imsi.encode_text(text_buf); field_tmsi.encode_text(text_buf); } void ImsiMapping::decode_text(Text_Buf& text_buf) { field_comp__ref.decode_text(text_buf); field_imsi.decode_text(text_buf); field_tmsi.decode_text(text_buf); } struct ImsiMapping_template::single_value_struct { COMPONENT_template field_comp__ref; HEXSTRING_template field_imsi; OCTETSTRING_template field_tmsi; }; void ImsiMapping_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_comp__ref = ANY_VALUE; single_value->field_imsi = ANY_OR_OMIT; single_value->field_tmsi = ANY_VALUE; } } } void ImsiMapping_template::copy_value(const ImsiMapping& other_value) { single_value = new single_value_struct; if (other_value.comp__ref().is_bound()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.clean_up(); } if (other_value.imsi().is_bound()) { if (other_value.imsi().ispresent()) single_value->field_imsi = other_value.imsi()(); else single_value->field_imsi = OMIT_VALUE; } else { single_value->field_imsi.clean_up(); } if (other_value.tmsi().is_bound()) { single_value->field_tmsi = other_value.tmsi(); } else { single_value->field_tmsi.clean_up(); } set_selection(SPECIFIC_VALUE); } void ImsiMapping_template::copy_template(const ImsiMapping_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.comp__ref().get_selection()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.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.tmsi().get_selection()) { single_value->field_tmsi = other_value.tmsi(); } else { single_value->field_tmsi.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 ImsiMapping_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 ImsiMapping_template(*other_value.implication_.precondition); implication_.implied_template = new ImsiMapping_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 @RAN_Emulation.ImsiMapping."); break; } set_selection(other_value); } ImsiMapping_template::ImsiMapping_template() { } ImsiMapping_template::ImsiMapping_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ImsiMapping_template::ImsiMapping_template(const ImsiMapping& other_value) { copy_value(other_value); } ImsiMapping_template::ImsiMapping_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ImsiMapping&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.ImsiMapping from an unbound optional field."); } } ImsiMapping_template::ImsiMapping_template(ImsiMapping_template* p_precondition, ImsiMapping_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ImsiMapping_template::ImsiMapping_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ImsiMapping_template::ImsiMapping_template(const ImsiMapping_template& other_value) : Base_Template() { copy_template(other_value); } ImsiMapping_template::~ImsiMapping_template() { clean_up(); } ImsiMapping_template& ImsiMapping_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ImsiMapping_template& ImsiMapping_template::operator=(const ImsiMapping& other_value) { clean_up(); copy_value(other_value); return *this; } ImsiMapping_template& ImsiMapping_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ImsiMapping&)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 @RAN_Emulation.ImsiMapping."); } return *this; } ImsiMapping_template& ImsiMapping_template::operator=(const ImsiMapping_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ImsiMapping_template::match(const ImsiMapping& 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.comp__ref().is_bound()) return FALSE; if(!single_value->field_comp__ref.match(other_value.comp__ref(), legacy))return FALSE; if(!other_value.imsi().is_bound()) return FALSE; if((other_value.imsi().ispresent() ? !single_value->field_imsi.match((const HEXSTRING&)other_value.imsi(), legacy) : !single_value->field_imsi.match_omit(legacy)))return FALSE; if(!other_value.tmsi().is_bound()) return FALSE; if(!single_value->field_tmsi.match(other_value.tmsi(), 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 @RAN_Emulation.ImsiMapping."); } return FALSE; } boolean ImsiMapping_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_comp__ref.is_bound() || (single_value->field_imsi.is_omit() || single_value->field_imsi.is_bound()) || single_value->field_tmsi.is_bound(); } boolean ImsiMapping_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_comp__ref.is_value() && (single_value->field_imsi.is_omit() || single_value->field_imsi.is_value()) && single_value->field_tmsi.is_value(); } void ImsiMapping_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; } ImsiMapping ImsiMapping_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 @RAN_Emulation.ImsiMapping."); ImsiMapping ret_val; if (single_value->field_comp__ref.is_bound()) { ret_val.comp__ref() = single_value->field_comp__ref.valueof(); } if (single_value->field_imsi.is_omit()) ret_val.imsi() = OMIT_VALUE; else if (single_value->field_imsi.is_bound()) { ret_val.imsi() = single_value->field_imsi.valueof(); } if (single_value->field_tmsi.is_bound()) { ret_val.tmsi() = single_value->field_tmsi.valueof(); } return ret_val; } void ImsiMapping_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 @RAN_Emulation.ImsiMapping."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ImsiMapping_template[list_length]; } ImsiMapping_template& ImsiMapping_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 @RAN_Emulation.ImsiMapping."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.ImsiMapping."); return value_list.list_value[list_index]; } COMPONENT_template& ImsiMapping_template::comp__ref() { set_specific(); return single_value->field_comp__ref; } const COMPONENT_template& ImsiMapping_template::comp__ref() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field comp_ref of a non-specific template of type @RAN_Emulation.ImsiMapping."); return single_value->field_comp__ref; } HEXSTRING_template& ImsiMapping_template::imsi() { set_specific(); return single_value->field_imsi; } const HEXSTRING_template& ImsiMapping_template::imsi() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field imsi of a non-specific template of type @RAN_Emulation.ImsiMapping."); return single_value->field_imsi; } OCTETSTRING_template& ImsiMapping_template::tmsi() { set_specific(); return single_value->field_tmsi; } const OCTETSTRING_template& ImsiMapping_template::tmsi() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field tmsi of a non-specific template of type @RAN_Emulation.ImsiMapping."); return single_value->field_tmsi; } int ImsiMapping_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 2; if (single_value->field_imsi.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 @RAN_Emulation.ImsiMapping 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 @RAN_Emulation.ImsiMapping containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ImsiMapping containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.ImsiMapping."); } return 0; } void ImsiMapping_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ comp_ref := "); single_value->field_comp__ref.log(); TTCN_Logger::log_event_str(", imsi := "); single_value->field_imsi.log(); TTCN_Logger::log_event_str(", tmsi := "); single_value->field_tmsi.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 ImsiMapping_template::log_match(const ImsiMapping& 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_comp__ref.match(match_value.comp__ref(), legacy)){ TTCN_Logger::log_logmatch_info(".comp_ref"); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.imsi().ispresent()){ 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); } } else { if (!single_value->field_imsi.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".imsi := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_imsi.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_tmsi.match(match_value.tmsi(), legacy)){ TTCN_Logger::log_logmatch_info(".tmsi"); single_value->field_tmsi.log_match(match_value.tmsi(), 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("{ comp_ref := "); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::log_event_str(", imsi := "); if (match_value.imsi().ispresent()) { single_value->field_imsi.log_match(match_value.imsi(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_imsi.log(); if (single_value->field_imsi.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", tmsi := "); single_value->field_tmsi.log_match(match_value.tmsi(), 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 ImsiMapping_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (!imsi().is_bound()) imsi() = OMIT_VALUE; else imsi().set_implicit_omit(); if (tmsi().is_bound()) tmsi().set_implicit_omit(); } void ImsiMapping_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_comp__ref.encode_text(text_buf); single_value->field_imsi.encode_text(text_buf); single_value->field_tmsi.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 @RAN_Emulation.ImsiMapping."); } } void ImsiMapping_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_comp__ref.decode_text(text_buf); single_value->field_imsi.decode_text(text_buf); single_value->field_tmsi.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 ImsiMapping_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 @RAN_Emulation.ImsiMapping."); } } void ImsiMapping_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: { ImsiMapping_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().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) tmsi().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_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_idxget_id()->get_name(), "tmsi")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { tmsi().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ImsiMapping: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { ImsiMapping_template* precondition = new ImsiMapping_template; precondition->set_param(*param.get_elem(0)); ImsiMapping_template* implied_template = new ImsiMapping_template; implied_template->set_param(*param.get_elem(1)); *this = ImsiMapping_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.ImsiMapping"); } is_ifpresent = param.get_ifpresent(); } void ImsiMapping_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_comp__ref.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ImsiMapping"); single_value->field_imsi.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ImsiMapping"); single_value->field_tmsi.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ImsiMapping"); 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 : "@RAN_Emulation.ImsiMapping"); } boolean ImsiMapping_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ImsiMapping_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& par_sigc__id) : field_comp__ref(par_comp__ref), field_sigc__id(par_sigc__id) { } IuSigConIdMapping::IuSigConIdMapping(const IuSigConIdMapping& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.IuSigConIdMapping."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.sigc__id().is_bound()) field_sigc__id = other_value.sigc__id(); else field_sigc__id.clean_up(); } void IuSigConIdMapping::clean_up() { field_comp__ref.clean_up(); field_sigc__id.clean_up(); } const TTCN_Typedescriptor_t* IuSigConIdMapping::get_descriptor() const { return &IuSigConIdMapping_descr_; } IuSigConIdMapping& IuSigConIdMapping::operator=(const IuSigConIdMapping& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.IuSigConIdMapping."); if (other_value.comp__ref().is_bound()) field_comp__ref = other_value.comp__ref(); else field_comp__ref.clean_up(); if (other_value.sigc__id().is_bound()) field_sigc__id = other_value.sigc__id(); else field_sigc__id.clean_up(); } return *this; } boolean IuSigConIdMapping::operator==(const IuSigConIdMapping& other_value) const { return field_comp__ref==other_value.field_comp__ref && field_sigc__id==other_value.field_sigc__id; } boolean IuSigConIdMapping::is_bound() const { return (field_comp__ref.is_bound()) || (OPTIONAL_OMIT == field_sigc__id.get_selection() || field_sigc__id.is_bound()); } boolean IuSigConIdMapping::is_value() const { return field_comp__ref.is_value() && (OPTIONAL_OMIT == field_sigc__id.get_selection() || field_sigc__id.is_value()); } int IuSigConIdMapping::size_of() const { int ret_val = 1; if (field_sigc__id.ispresent()) ret_val++; return ret_val; } void IuSigConIdMapping::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ comp_ref := "); field_comp__ref.log(); TTCN_Logger::log_event_str(", sigc_id := "); field_sigc__id.log(); TTCN_Logger::log_event_str(" }"); } void IuSigConIdMapping::set_implicit_omit() { if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (!sigc__id().is_bound()) sigc__id() = OMIT_VALUE; else sigc__id().set_implicit_omit(); } void IuSigConIdMapping::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 (20 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sigc__id().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sigc_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sigc__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.IuSigConIdMapping: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.IuSigConIdMapping"); } } void IuSigConIdMapping::encode_text(Text_Buf& text_buf) const { field_comp__ref.encode_text(text_buf); field_sigc__id.encode_text(text_buf); } void IuSigConIdMapping::decode_text(Text_Buf& text_buf) { field_comp__ref.decode_text(text_buf); field_sigc__id.decode_text(text_buf); } struct IuSigConIdMapping_template::single_value_struct { COMPONENT_template field_comp__ref; BITSTRING_template field_sigc__id; }; void IuSigConIdMapping_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_comp__ref = ANY_VALUE; single_value->field_sigc__id = ANY_OR_OMIT; } } } void IuSigConIdMapping_template::copy_value(const IuSigConIdMapping& other_value) { single_value = new single_value_struct; if (other_value.comp__ref().is_bound()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.clean_up(); } if (other_value.sigc__id().is_bound()) { if (other_value.sigc__id().ispresent()) single_value->field_sigc__id = other_value.sigc__id()(); else single_value->field_sigc__id = OMIT_VALUE; } else { single_value->field_sigc__id.clean_up(); } set_selection(SPECIFIC_VALUE); } void IuSigConIdMapping_template::copy_template(const IuSigConIdMapping_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.comp__ref().get_selection()) { single_value->field_comp__ref = other_value.comp__ref(); } else { single_value->field_comp__ref.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sigc__id().get_selection()) { single_value->field_sigc__id = other_value.sigc__id(); } else { single_value->field_sigc__id.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 IuSigConIdMapping_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 IuSigConIdMapping_template(*other_value.implication_.precondition); implication_.implied_template = new IuSigConIdMapping_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 @RAN_Emulation.IuSigConIdMapping."); break; } set_selection(other_value); } IuSigConIdMapping_template::IuSigConIdMapping_template() { } IuSigConIdMapping_template::IuSigConIdMapping_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } IuSigConIdMapping_template::IuSigConIdMapping_template(const IuSigConIdMapping& other_value) { copy_value(other_value); } IuSigConIdMapping_template::IuSigConIdMapping_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const IuSigConIdMapping&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.IuSigConIdMapping from an unbound optional field."); } } IuSigConIdMapping_template::IuSigConIdMapping_template(IuSigConIdMapping_template* p_precondition, IuSigConIdMapping_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } IuSigConIdMapping_template::IuSigConIdMapping_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } IuSigConIdMapping_template::IuSigConIdMapping_template(const IuSigConIdMapping_template& other_value) : Base_Template() { copy_template(other_value); } IuSigConIdMapping_template::~IuSigConIdMapping_template() { clean_up(); } IuSigConIdMapping_template& IuSigConIdMapping_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } IuSigConIdMapping_template& IuSigConIdMapping_template::operator=(const IuSigConIdMapping& other_value) { clean_up(); copy_value(other_value); return *this; } IuSigConIdMapping_template& IuSigConIdMapping_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const IuSigConIdMapping&)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 @RAN_Emulation.IuSigConIdMapping."); } return *this; } IuSigConIdMapping_template& IuSigConIdMapping_template::operator=(const IuSigConIdMapping_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean IuSigConIdMapping_template::match(const IuSigConIdMapping& 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.comp__ref().is_bound()) return FALSE; if(!single_value->field_comp__ref.match(other_value.comp__ref(), legacy))return FALSE; if(!other_value.sigc__id().is_bound()) return FALSE; if((other_value.sigc__id().ispresent() ? !single_value->field_sigc__id.match((const BITSTRING&)other_value.sigc__id(), legacy) : !single_value->field_sigc__id.match_omit(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 @RAN_Emulation.IuSigConIdMapping."); } return FALSE; } boolean IuSigConIdMapping_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_comp__ref.is_bound() || (single_value->field_sigc__id.is_omit() || single_value->field_sigc__id.is_bound()); } boolean IuSigConIdMapping_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_comp__ref.is_value() && (single_value->field_sigc__id.is_omit() || single_value->field_sigc__id.is_value()); } void IuSigConIdMapping_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; } IuSigConIdMapping IuSigConIdMapping_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 @RAN_Emulation.IuSigConIdMapping."); IuSigConIdMapping ret_val; if (single_value->field_comp__ref.is_bound()) { ret_val.comp__ref() = single_value->field_comp__ref.valueof(); } if (single_value->field_sigc__id.is_omit()) ret_val.sigc__id() = OMIT_VALUE; else if (single_value->field_sigc__id.is_bound()) { ret_val.sigc__id() = single_value->field_sigc__id.valueof(); } return ret_val; } void IuSigConIdMapping_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 @RAN_Emulation.IuSigConIdMapping."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new IuSigConIdMapping_template[list_length]; } IuSigConIdMapping_template& IuSigConIdMapping_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 @RAN_Emulation.IuSigConIdMapping."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.IuSigConIdMapping."); return value_list.list_value[list_index]; } COMPONENT_template& IuSigConIdMapping_template::comp__ref() { set_specific(); return single_value->field_comp__ref; } const COMPONENT_template& IuSigConIdMapping_template::comp__ref() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field comp_ref of a non-specific template of type @RAN_Emulation.IuSigConIdMapping."); return single_value->field_comp__ref; } BITSTRING_template& IuSigConIdMapping_template::sigc__id() { set_specific(); return single_value->field_sigc__id; } const BITSTRING_template& IuSigConIdMapping_template::sigc__id() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sigc_id of a non-specific template of type @RAN_Emulation.IuSigConIdMapping."); return single_value->field_sigc__id; } int IuSigConIdMapping_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 1; if (single_value->field_sigc__id.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 @RAN_Emulation.IuSigConIdMapping 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 @RAN_Emulation.IuSigConIdMapping containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.IuSigConIdMapping containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.IuSigConIdMapping."); } return 0; } void IuSigConIdMapping_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ comp_ref := "); single_value->field_comp__ref.log(); TTCN_Logger::log_event_str(", sigc_id := "); single_value->field_sigc__id.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 IuSigConIdMapping_template::log_match(const IuSigConIdMapping& 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_comp__ref.match(match_value.comp__ref(), legacy)){ TTCN_Logger::log_logmatch_info(".comp_ref"); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.sigc__id().ispresent()){ if(!single_value->field_sigc__id.match(match_value.sigc__id(), legacy)){ TTCN_Logger::log_logmatch_info(".sigc_id"); single_value->field_sigc__id.log_match(match_value.sigc__id(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sigc__id.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sigc_id := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sigc__id.log(); TTCN_Logger::log_event_str(" unmatched"); 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("{ comp_ref := "); single_value->field_comp__ref.log_match(match_value.comp__ref(), legacy); TTCN_Logger::log_event_str(", sigc_id := "); if (match_value.sigc__id().ispresent()) { single_value->field_sigc__id.log_match(match_value.sigc__id(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sigc__id.log(); if (single_value->field_sigc__id.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } 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 IuSigConIdMapping_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (comp__ref().is_bound()) comp__ref().set_implicit_omit(); if (!sigc__id().is_bound()) sigc__id() = OMIT_VALUE; else sigc__id().set_implicit_omit(); } void IuSigConIdMapping_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_comp__ref.encode_text(text_buf); single_value->field_sigc__id.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 @RAN_Emulation.IuSigConIdMapping."); } } void IuSigConIdMapping_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_comp__ref.decode_text(text_buf); single_value->field_sigc__id.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 IuSigConIdMapping_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 @RAN_Emulation.IuSigConIdMapping."); } } void IuSigConIdMapping_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: { IuSigConIdMapping_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) comp__ref().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sigc__id().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "comp_ref")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { comp__ref().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sigc_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sigc__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.IuSigConIdMapping: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { IuSigConIdMapping_template* precondition = new IuSigConIdMapping_template; precondition->set_param(*param.get_elem(0)); IuSigConIdMapping_template* implied_template = new IuSigConIdMapping_template; implied_template->set_param(*param.get_elem(1)); *this = IuSigConIdMapping_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.IuSigConIdMapping"); } is_ifpresent = param.get_ifpresent(); } void IuSigConIdMapping_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_comp__ref.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.IuSigConIdMapping"); single_value->field_sigc__id.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.IuSigConIdMapping"); 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 : "@RAN_Emulation.IuSigConIdMapping"); } boolean IuSigConIdMapping_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean IuSigConIdMapping_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& par_l3__payload, const OPTIONAL< INTEGER >& par_n__connectPointCode, const BOOLEAN& par_sccp__cr__without__payload, const COMPONENT& par_vc__conn) : field_l3__payload(par_l3__payload), field_n__connectPointCode(par_n__connectPointCode), field_sccp__cr__without__payload(par_sccp__cr__without__payload), field_vc__conn(par_vc__conn) { } ExpectData::ExpectData(const ExpectData& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.ExpectData."); if (other_value.l3__payload().is_bound()) field_l3__payload = other_value.l3__payload(); else field_l3__payload.clean_up(); if (other_value.n__connectPointCode().is_bound()) field_n__connectPointCode = other_value.n__connectPointCode(); else field_n__connectPointCode.clean_up(); if (other_value.sccp__cr__without__payload().is_bound()) field_sccp__cr__without__payload = other_value.sccp__cr__without__payload(); else field_sccp__cr__without__payload.clean_up(); if (other_value.vc__conn().is_bound()) field_vc__conn = other_value.vc__conn(); else field_vc__conn.clean_up(); } void ExpectData::clean_up() { field_l3__payload.clean_up(); field_n__connectPointCode.clean_up(); field_sccp__cr__without__payload.clean_up(); field_vc__conn.clean_up(); } const TTCN_Typedescriptor_t* ExpectData::get_descriptor() const { return &ExpectData_descr_; } ExpectData& ExpectData::operator=(const ExpectData& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.ExpectData."); if (other_value.l3__payload().is_bound()) field_l3__payload = other_value.l3__payload(); else field_l3__payload.clean_up(); if (other_value.n__connectPointCode().is_bound()) field_n__connectPointCode = other_value.n__connectPointCode(); else field_n__connectPointCode.clean_up(); if (other_value.sccp__cr__without__payload().is_bound()) field_sccp__cr__without__payload = other_value.sccp__cr__without__payload(); else field_sccp__cr__without__payload.clean_up(); if (other_value.vc__conn().is_bound()) field_vc__conn = other_value.vc__conn(); else field_vc__conn.clean_up(); } return *this; } boolean ExpectData::operator==(const ExpectData& other_value) const { return field_l3__payload==other_value.field_l3__payload && field_n__connectPointCode==other_value.field_n__connectPointCode && field_sccp__cr__without__payload==other_value.field_sccp__cr__without__payload && field_vc__conn==other_value.field_vc__conn; } boolean ExpectData::is_bound() const { return (OPTIONAL_OMIT == field_l3__payload.get_selection() || field_l3__payload.is_bound()) || (OPTIONAL_OMIT == field_n__connectPointCode.get_selection() || field_n__connectPointCode.is_bound()) || (field_sccp__cr__without__payload.is_bound()) || (field_vc__conn.is_bound()); } boolean ExpectData::is_value() const { return (OPTIONAL_OMIT == field_l3__payload.get_selection() || field_l3__payload.is_value()) && (OPTIONAL_OMIT == field_n__connectPointCode.get_selection() || field_n__connectPointCode.is_value()) && field_sccp__cr__without__payload.is_value() && field_vc__conn.is_value(); } int ExpectData::size_of() const { int ret_val = 2; if (field_l3__payload.ispresent()) ret_val++; if (field_n__connectPointCode.ispresent()) ret_val++; return ret_val; } void ExpectData::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ l3_payload := "); field_l3__payload.log(); TTCN_Logger::log_event_str(", n_connectPointCode := "); field_n__connectPointCode.log(); TTCN_Logger::log_event_str(", sccp_cr_without_payload := "); field_sccp__cr__without__payload.log(); TTCN_Logger::log_event_str(", vc_conn := "); field_vc__conn.log(); TTCN_Logger::log_event_str(" }"); } void ExpectData::set_implicit_omit() { if (!l3__payload().is_bound()) l3__payload() = OMIT_VALUE; else l3__payload().set_implicit_omit(); if (!n__connectPointCode().is_bound()) n__connectPointCode() = OMIT_VALUE; else n__connectPointCode().set_implicit_omit(); if (sccp__cr__without__payload().is_bound()) sccp__cr__without__payload().set_implicit_omit(); if (vc__conn().is_bound()) vc__conn().set_implicit_omit(); } void ExpectData::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 (40 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) l3__payload().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) n__connectPointCode().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sccp__cr__without__payload().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) vc__conn().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "l3_payload")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l3__payload().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "n_connectPointCode")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { n__connectPointCode().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_cr_without_payload")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__cr__without__payload().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "vc_conn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { vc__conn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ExpectData: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.ExpectData"); } } void ExpectData::encode_text(Text_Buf& text_buf) const { field_l3__payload.encode_text(text_buf); field_n__connectPointCode.encode_text(text_buf); field_sccp__cr__without__payload.encode_text(text_buf); field_vc__conn.encode_text(text_buf); } void ExpectData::decode_text(Text_Buf& text_buf) { field_l3__payload.decode_text(text_buf); field_n__connectPointCode.decode_text(text_buf); field_sccp__cr__without__payload.decode_text(text_buf); field_vc__conn.decode_text(text_buf); } struct ExpectData_template::single_value_struct { OCTETSTRING_template field_l3__payload; INTEGER_template field_n__connectPointCode; BOOLEAN_template field_sccp__cr__without__payload; COMPONENT_template field_vc__conn; }; void ExpectData_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_l3__payload = ANY_OR_OMIT; single_value->field_n__connectPointCode = ANY_OR_OMIT; single_value->field_sccp__cr__without__payload = ANY_VALUE; single_value->field_vc__conn = ANY_VALUE; } } } void ExpectData_template::copy_value(const ExpectData& other_value) { single_value = new single_value_struct; if (other_value.l3__payload().is_bound()) { if (other_value.l3__payload().ispresent()) single_value->field_l3__payload = other_value.l3__payload()(); else single_value->field_l3__payload = OMIT_VALUE; } else { single_value->field_l3__payload.clean_up(); } if (other_value.n__connectPointCode().is_bound()) { if (other_value.n__connectPointCode().ispresent()) single_value->field_n__connectPointCode = other_value.n__connectPointCode()(); else single_value->field_n__connectPointCode = OMIT_VALUE; } else { single_value->field_n__connectPointCode.clean_up(); } if (other_value.sccp__cr__without__payload().is_bound()) { single_value->field_sccp__cr__without__payload = other_value.sccp__cr__without__payload(); } else { single_value->field_sccp__cr__without__payload.clean_up(); } if (other_value.vc__conn().is_bound()) { single_value->field_vc__conn = other_value.vc__conn(); } else { single_value->field_vc__conn.clean_up(); } set_selection(SPECIFIC_VALUE); } void ExpectData_template::copy_template(const ExpectData_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.l3__payload().get_selection()) { single_value->field_l3__payload = other_value.l3__payload(); } else { single_value->field_l3__payload.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.n__connectPointCode().get_selection()) { single_value->field_n__connectPointCode = other_value.n__connectPointCode(); } else { single_value->field_n__connectPointCode.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sccp__cr__without__payload().get_selection()) { single_value->field_sccp__cr__without__payload = other_value.sccp__cr__without__payload(); } else { single_value->field_sccp__cr__without__payload.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.vc__conn().get_selection()) { single_value->field_vc__conn = other_value.vc__conn(); } else { single_value->field_vc__conn.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 ExpectData_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 ExpectData_template(*other_value.implication_.precondition); implication_.implied_template = new ExpectData_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 @RAN_Emulation.ExpectData."); break; } set_selection(other_value); } ExpectData_template::ExpectData_template() { } ExpectData_template::ExpectData_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ExpectData_template::ExpectData_template(const ExpectData& other_value) { copy_value(other_value); } ExpectData_template::ExpectData_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ExpectData&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.ExpectData from an unbound optional field."); } } ExpectData_template::ExpectData_template(ExpectData_template* p_precondition, ExpectData_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ExpectData_template::ExpectData_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ExpectData_template::ExpectData_template(const ExpectData_template& other_value) : Base_Template() { copy_template(other_value); } ExpectData_template::~ExpectData_template() { clean_up(); } ExpectData_template& ExpectData_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ExpectData_template& ExpectData_template::operator=(const ExpectData& other_value) { clean_up(); copy_value(other_value); return *this; } ExpectData_template& ExpectData_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ExpectData&)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 @RAN_Emulation.ExpectData."); } return *this; } ExpectData_template& ExpectData_template::operator=(const ExpectData_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ExpectData_template::match(const ExpectData& 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.l3__payload().is_bound()) return FALSE; if((other_value.l3__payload().ispresent() ? !single_value->field_l3__payload.match((const OCTETSTRING&)other_value.l3__payload(), legacy) : !single_value->field_l3__payload.match_omit(legacy)))return FALSE; if(!other_value.n__connectPointCode().is_bound()) return FALSE; if((other_value.n__connectPointCode().ispresent() ? !single_value->field_n__connectPointCode.match((const INTEGER&)other_value.n__connectPointCode(), legacy) : !single_value->field_n__connectPointCode.match_omit(legacy)))return FALSE; if(!other_value.sccp__cr__without__payload().is_bound()) return FALSE; if(!single_value->field_sccp__cr__without__payload.match(other_value.sccp__cr__without__payload(), legacy))return FALSE; if(!other_value.vc__conn().is_bound()) return FALSE; if(!single_value->field_vc__conn.match(other_value.vc__conn(), 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 @RAN_Emulation.ExpectData."); } return FALSE; } boolean ExpectData_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_l3__payload.is_omit() || single_value->field_l3__payload.is_bound()) || (single_value->field_n__connectPointCode.is_omit() || single_value->field_n__connectPointCode.is_bound()) || single_value->field_sccp__cr__without__payload.is_bound() || single_value->field_vc__conn.is_bound(); } boolean ExpectData_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_l3__payload.is_omit() || single_value->field_l3__payload.is_value()) && (single_value->field_n__connectPointCode.is_omit() || single_value->field_n__connectPointCode.is_value()) && single_value->field_sccp__cr__without__payload.is_value() && single_value->field_vc__conn.is_value(); } void ExpectData_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; } ExpectData ExpectData_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 @RAN_Emulation.ExpectData."); ExpectData ret_val; if (single_value->field_l3__payload.is_omit()) ret_val.l3__payload() = OMIT_VALUE; else if (single_value->field_l3__payload.is_bound()) { ret_val.l3__payload() = single_value->field_l3__payload.valueof(); } if (single_value->field_n__connectPointCode.is_omit()) ret_val.n__connectPointCode() = OMIT_VALUE; else if (single_value->field_n__connectPointCode.is_bound()) { ret_val.n__connectPointCode() = single_value->field_n__connectPointCode.valueof(); } if (single_value->field_sccp__cr__without__payload.is_bound()) { ret_val.sccp__cr__without__payload() = single_value->field_sccp__cr__without__payload.valueof(); } if (single_value->field_vc__conn.is_bound()) { ret_val.vc__conn() = single_value->field_vc__conn.valueof(); } return ret_val; } void ExpectData_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 @RAN_Emulation.ExpectData."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ExpectData_template[list_length]; } ExpectData_template& ExpectData_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 @RAN_Emulation.ExpectData."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.ExpectData."); return value_list.list_value[list_index]; } OCTETSTRING_template& ExpectData_template::l3__payload() { set_specific(); return single_value->field_l3__payload; } const OCTETSTRING_template& ExpectData_template::l3__payload() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field l3_payload of a non-specific template of type @RAN_Emulation.ExpectData."); return single_value->field_l3__payload; } INTEGER_template& ExpectData_template::n__connectPointCode() { set_specific(); return single_value->field_n__connectPointCode; } const INTEGER_template& ExpectData_template::n__connectPointCode() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field n_connectPointCode of a non-specific template of type @RAN_Emulation.ExpectData."); return single_value->field_n__connectPointCode; } BOOLEAN_template& ExpectData_template::sccp__cr__without__payload() { set_specific(); return single_value->field_sccp__cr__without__payload; } const BOOLEAN_template& ExpectData_template::sccp__cr__without__payload() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sccp_cr_without_payload of a non-specific template of type @RAN_Emulation.ExpectData."); return single_value->field_sccp__cr__without__payload; } COMPONENT_template& ExpectData_template::vc__conn() { set_specific(); return single_value->field_vc__conn; } const COMPONENT_template& ExpectData_template::vc__conn() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field vc_conn of a non-specific template of type @RAN_Emulation.ExpectData."); return single_value->field_vc__conn; } int ExpectData_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 2; if (single_value->field_l3__payload.is_present()) ret_val++; if (single_value->field_n__connectPointCode.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 @RAN_Emulation.ExpectData 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 @RAN_Emulation.ExpectData containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.ExpectData containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.ExpectData."); } return 0; } void ExpectData_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ l3_payload := "); single_value->field_l3__payload.log(); TTCN_Logger::log_event_str(", n_connectPointCode := "); single_value->field_n__connectPointCode.log(); TTCN_Logger::log_event_str(", sccp_cr_without_payload := "); single_value->field_sccp__cr__without__payload.log(); TTCN_Logger::log_event_str(", vc_conn := "); single_value->field_vc__conn.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 ExpectData_template::log_match(const ExpectData& 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 (match_value.l3__payload().ispresent()){ if(!single_value->field_l3__payload.match(match_value.l3__payload(), legacy)){ TTCN_Logger::log_logmatch_info(".l3_payload"); single_value->field_l3__payload.log_match(match_value.l3__payload(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_l3__payload.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".l3_payload := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_l3__payload.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.n__connectPointCode().ispresent()){ if(!single_value->field_n__connectPointCode.match(match_value.n__connectPointCode(), legacy)){ TTCN_Logger::log_logmatch_info(".n_connectPointCode"); single_value->field_n__connectPointCode.log_match(match_value.n__connectPointCode(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_n__connectPointCode.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".n_connectPointCode := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_n__connectPointCode.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_sccp__cr__without__payload.match(match_value.sccp__cr__without__payload(), legacy)){ TTCN_Logger::log_logmatch_info(".sccp_cr_without_payload"); single_value->field_sccp__cr__without__payload.log_match(match_value.sccp__cr__without__payload(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_vc__conn.match(match_value.vc__conn(), legacy)){ TTCN_Logger::log_logmatch_info(".vc_conn"); single_value->field_vc__conn.log_match(match_value.vc__conn(), 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("{ l3_payload := "); if (match_value.l3__payload().ispresent()) { single_value->field_l3__payload.log_match(match_value.l3__payload(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_l3__payload.log(); if (single_value->field_l3__payload.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", n_connectPointCode := "); if (match_value.n__connectPointCode().ispresent()) { single_value->field_n__connectPointCode.log_match(match_value.n__connectPointCode(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_n__connectPointCode.log(); if (single_value->field_n__connectPointCode.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sccp_cr_without_payload := "); single_value->field_sccp__cr__without__payload.log_match(match_value.sccp__cr__without__payload(), legacy); TTCN_Logger::log_event_str(", vc_conn := "); single_value->field_vc__conn.log_match(match_value.vc__conn(), 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 ExpectData_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!l3__payload().is_bound()) l3__payload() = OMIT_VALUE; else l3__payload().set_implicit_omit(); if (!n__connectPointCode().is_bound()) n__connectPointCode() = OMIT_VALUE; else n__connectPointCode().set_implicit_omit(); if (sccp__cr__without__payload().is_bound()) sccp__cr__without__payload().set_implicit_omit(); if (vc__conn().is_bound()) vc__conn().set_implicit_omit(); } void ExpectData_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_l3__payload.encode_text(text_buf); single_value->field_n__connectPointCode.encode_text(text_buf); single_value->field_sccp__cr__without__payload.encode_text(text_buf); single_value->field_vc__conn.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 @RAN_Emulation.ExpectData."); } } void ExpectData_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_l3__payload.decode_text(text_buf); single_value->field_n__connectPointCode.decode_text(text_buf); single_value->field_sccp__cr__without__payload.decode_text(text_buf); single_value->field_vc__conn.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 ExpectData_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 @RAN_Emulation.ExpectData."); } } void ExpectData_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: { ExpectData_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) l3__payload().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) n__connectPointCode().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sccp__cr__without__payload().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) vc__conn().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "l3_payload")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l3__payload().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "n_connectPointCode")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { n__connectPointCode().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_cr_without_payload")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__cr__without__payload().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "vc_conn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { vc__conn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.ExpectData: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { ExpectData_template* precondition = new ExpectData_template; precondition->set_param(*param.get_elem(0)); ExpectData_template* implied_template = new ExpectData_template; implied_template->set_param(*param.get_elem(1)); *this = ExpectData_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.ExpectData"); } is_ifpresent = param.get_ifpresent(); } void ExpectData_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_l3__payload.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ExpectData"); single_value->field_n__connectPointCode.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ExpectData"); single_value->field_sccp__cr__without__payload.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ExpectData"); single_value->field_vc__conn.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.ExpectData"); 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 : "@RAN_Emulation.ExpectData"); } boolean ExpectData_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ExpectData_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(int other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RanProtocol."); if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @RAN_Emulation.RanProtocol comparison is an unknown numeric value %d", other_value); return enum_value > other_value; } boolean RanProtocol::operator>(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RanProtocol."); return enum_value > other_value; } boolean RanProtocol::operator>(const RanProtocol& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @RAN_Emulation.RanProtocol."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @RAN_Emulation.RanProtocol."); return enum_value > other_value.enum_value; } const char *RanProtocol::enum_to_str(enum_type enum_par) { switch (enum_par) { case RAN__PROTOCOL__BSSAP: return "RAN_PROTOCOL_BSSAP"; case RAN__PROTOCOL__RANAP: return "RAN_PROTOCOL_RANAP"; default: return ""; } } RanProtocol::enum_type RanProtocol::str_to_enum(const char *str_par, const int* int_par, const int* int_par2) { if (int_par == NULL && int_par2 == NULL) { if (!strcmp(str_par, "RAN_PROTOCOL_BSSAP")) return RAN__PROTOCOL__BSSAP; if (!strcmp(str_par, "RAN_PROTOCOL_RANAP")) return RAN__PROTOCOL__RANAP; } return UNKNOWN_VALUE; } boolean RanProtocol::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: return TRUE; default: return FALSE; } } int RanProtocol::enum2int(enum_type enum_par) { if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RAN_Emulation.RanProtocol.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int RanProtocol::enum2int(const RanProtocol& enum_par) { if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @RAN_Emulation.RanProtocol.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void RanProtocol::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @RAN_Emulation.RanProtocol.", int_val); enum_value = (enum_type)int_val; } RanProtocol::operator RanProtocol::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @RAN_Emulation.RanProtocol."); return enum_value; } void RanProtocol::log() const { if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value); else TTCN_Logger::log_event_unbound(); } void RanProtocol::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "enumerated value"); if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@RAN_Emulation.RanProtocol"); enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @RAN_Emulation.RanProtocol."); } } void RanProtocol::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @RAN_Emulation.RanProtocol."); text_buf.push_int(enum_value); } void RanProtocol::decode_text(Text_Buf& text_buf) { enum_value = (enum_type)text_buf.pull_int().get_val(); if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @RAN_Emulation.RanProtocol.", enum_value); } void RanProtocol_template::copy_template(const RanProtocol_template& other_value) { set_selection(other_value); switch (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: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new RanProtocol_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 RanProtocol_template(*other_value.implication_.precondition); implication_.implied_template = new RanProtocol_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 enumerated type @RAN_Emulation.RanProtocol."); } } RanProtocol_template::RanProtocol_template() { } RanProtocol_template::RanProtocol_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RanProtocol_template::RanProtocol_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!RanProtocol::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @RAN_Emulation.RanProtocol with unknown numeric value %d.", other_value); single_value = (RanProtocol::enum_type)other_value; } RanProtocol_template::RanProtocol_template(RanProtocol::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } RanProtocol_template::RanProtocol_template(const RanProtocol& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == RanProtocol::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @RAN_Emulation.RanProtocol."); single_value = other_value.enum_value; } RanProtocol_template::RanProtocol_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (RanProtocol::enum_type)(const RanProtocol&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @RAN_Emulation.RanProtocol from an unbound optional field."); } } RanProtocol_template::RanProtocol_template(RanProtocol_template* p_precondition, RanProtocol_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RanProtocol_template::RanProtocol_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RanProtocol_template::RanProtocol_template(const RanProtocol_template& other_value) : Base_Template() { copy_template(other_value); } RanProtocol_template::~RanProtocol_template() { clean_up(); } boolean RanProtocol_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean RanProtocol_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != RanProtocol::UNBOUND_VALUE; } void RanProtocol_template::clean_up() { switch (template_selection) { 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; } RanProtocol_template& RanProtocol_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RanProtocol_template& RanProtocol_template::operator=(int other_value) { if (!RanProtocol::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @RAN_Emulation.RanProtocol.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (RanProtocol::enum_type)other_value; return *this; } RanProtocol_template& RanProtocol_template::operator=(RanProtocol::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } RanProtocol_template& RanProtocol_template::operator=(const RanProtocol& other_value) { if (other_value.enum_value == RanProtocol::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @RAN_Emulation.RanProtocol to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } RanProtocol_template& RanProtocol_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (RanProtocol::enum_type)(const RanProtocol&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of enumerated type @RAN_Emulation.RanProtocol."); } return *this; } RanProtocol_template& RanProtocol_template::operator=(const RanProtocol_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RanProtocol_template::match(RanProtocol::enum_type 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 list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value)) 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 enumerated type @RAN_Emulation.RanProtocol."); } return FALSE; } boolean RanProtocol_template::match(const RanProtocol& other_value, boolean) const { if (other_value.enum_value == RanProtocol::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @RAN_Emulation.RanProtocol with an unbound value."); return match(other_value.enum_value); } RanProtocol::enum_type RanProtocol_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @RAN_Emulation.RanProtocol."); return single_value; } void RanProtocol_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: set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RanProtocol_template[list_length]; break; default: TTCN_error("Setting an invalid type for a template of enumerated type @RAN_Emulation.RanProtocol."); } } RanProtocol_template& RanProtocol_template::list_item(unsigned int list_index) { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @RAN_Emulation.RanProtocol."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @RAN_Emulation.RanProtocol."); return value_list.list_value[list_index]; } void RanProtocol_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(RanProtocol::enum_to_str(single_value), single_value); 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 elem_count = 0; elem_count < value_list.n_values; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[elem_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 RanProtocol_template::log_match(const RanProtocol& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void RanProtocol_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value); 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 elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @RAN_Emulation.RanProtocol."); } } void RanProtocol_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (RanProtocol::enum_type)text_buf.pull_int().get_val(); if (!RanProtocol::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @RAN_Emulation.RanProtocol.", single_value); 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 RanProtocol_template[value_list.n_values]; for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @RAN_Emulation.RanProtocol."); } } boolean RanProtocol_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RanProtocol_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; iget_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: { RanProtocol_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Enumerated: { RanProtocol::enum_type enum_val = RanProtocol::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value()); if (!RanProtocol::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @RAN_Emulation.RanProtocol."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { RanProtocol_template* precondition = new RanProtocol_template; precondition->set_param(*m_p->get_elem(0)); RanProtocol_template* implied_template = new RanProtocol_template; implied_template->set_param(*m_p->get_elem(1)); *this = RanProtocol_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@RAN_Emulation.RanProtocol"); } is_ifpresent = param.get_ifpresent(); } void RanProtocol_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 : "@RAN_Emulation.RanProtocol"); } RanOps::RanOps() { } RanOps::RanOps(const OPTIONAL< RanapCreateCallback >& par_ranap__create__cb, const OPTIONAL< RanapUnitdataCallback >& par_ranap__unitdata__cb, const BOOLEAN& par_ranap__connect__ind__auto__res, const BOOLEAN& par_ps__domain, const OPTIONAL< RANAP__IEs::GlobalRNC__ID >& par_grnc__id, const BOOLEAN& par_decode__dtap, const BOOLEAN& par_role__ms, const RanProtocol& par_protocol, const RAN__Transport& par_transport, const BOOLEAN& par_use__osmux, const INTEGER& par_bssap__reset__retries, const OPTIONAL< SCCPasp__Types::SCCP__PAR__Address >& par_sccp__addr__local, const OPTIONAL< SCCPasp__Types::SCCP__PAR__Address >& par_sccp__addr__peer) : field_ranap__create__cb(par_ranap__create__cb), field_ranap__unitdata__cb(par_ranap__unitdata__cb), field_ranap__connect__ind__auto__res(par_ranap__connect__ind__auto__res), field_ps__domain(par_ps__domain), field_grnc__id(par_grnc__id), field_decode__dtap(par_decode__dtap), field_role__ms(par_role__ms), field_protocol(par_protocol), field_transport(par_transport), field_use__osmux(par_use__osmux), field_bssap__reset__retries(par_bssap__reset__retries), field_sccp__addr__local(par_sccp__addr__local), field_sccp__addr__peer(par_sccp__addr__peer) { } RanOps::RanOps(const RanOps& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.RanOps."); if (other_value.ranap__create__cb().is_bound()) field_ranap__create__cb = other_value.ranap__create__cb(); else field_ranap__create__cb.clean_up(); if (other_value.ranap__unitdata__cb().is_bound()) field_ranap__unitdata__cb = other_value.ranap__unitdata__cb(); else field_ranap__unitdata__cb.clean_up(); if (other_value.ranap__connect__ind__auto__res().is_bound()) field_ranap__connect__ind__auto__res = other_value.ranap__connect__ind__auto__res(); else field_ranap__connect__ind__auto__res.clean_up(); if (other_value.ps__domain().is_bound()) field_ps__domain = other_value.ps__domain(); else field_ps__domain.clean_up(); if (other_value.grnc__id().is_bound()) field_grnc__id = other_value.grnc__id(); else field_grnc__id.clean_up(); if (other_value.decode__dtap().is_bound()) field_decode__dtap = other_value.decode__dtap(); else field_decode__dtap.clean_up(); if (other_value.role__ms().is_bound()) field_role__ms = other_value.role__ms(); else field_role__ms.clean_up(); if (other_value.protocol().is_bound()) field_protocol = other_value.protocol(); else field_protocol.clean_up(); if (other_value.transport().is_bound()) field_transport = other_value.transport(); else field_transport.clean_up(); if (other_value.use__osmux().is_bound()) field_use__osmux = other_value.use__osmux(); else field_use__osmux.clean_up(); if (other_value.bssap__reset__retries().is_bound()) field_bssap__reset__retries = other_value.bssap__reset__retries(); else field_bssap__reset__retries.clean_up(); if (other_value.sccp__addr__local().is_bound()) field_sccp__addr__local = other_value.sccp__addr__local(); else field_sccp__addr__local.clean_up(); if (other_value.sccp__addr__peer().is_bound()) field_sccp__addr__peer = other_value.sccp__addr__peer(); else field_sccp__addr__peer.clean_up(); } void RanOps::clean_up() { field_ranap__create__cb.clean_up(); field_ranap__unitdata__cb.clean_up(); field_ranap__connect__ind__auto__res.clean_up(); field_ps__domain.clean_up(); field_grnc__id.clean_up(); field_decode__dtap.clean_up(); field_role__ms.clean_up(); field_protocol.clean_up(); field_transport.clean_up(); field_use__osmux.clean_up(); field_bssap__reset__retries.clean_up(); field_sccp__addr__local.clean_up(); field_sccp__addr__peer.clean_up(); } const TTCN_Typedescriptor_t* RanOps::get_descriptor() const { return &RanOps_descr_; } RanOps& RanOps::operator=(const RanOps& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.RanOps."); if (other_value.ranap__create__cb().is_bound()) field_ranap__create__cb = other_value.ranap__create__cb(); else field_ranap__create__cb.clean_up(); if (other_value.ranap__unitdata__cb().is_bound()) field_ranap__unitdata__cb = other_value.ranap__unitdata__cb(); else field_ranap__unitdata__cb.clean_up(); if (other_value.ranap__connect__ind__auto__res().is_bound()) field_ranap__connect__ind__auto__res = other_value.ranap__connect__ind__auto__res(); else field_ranap__connect__ind__auto__res.clean_up(); if (other_value.ps__domain().is_bound()) field_ps__domain = other_value.ps__domain(); else field_ps__domain.clean_up(); if (other_value.grnc__id().is_bound()) field_grnc__id = other_value.grnc__id(); else field_grnc__id.clean_up(); if (other_value.decode__dtap().is_bound()) field_decode__dtap = other_value.decode__dtap(); else field_decode__dtap.clean_up(); if (other_value.role__ms().is_bound()) field_role__ms = other_value.role__ms(); else field_role__ms.clean_up(); if (other_value.protocol().is_bound()) field_protocol = other_value.protocol(); else field_protocol.clean_up(); if (other_value.transport().is_bound()) field_transport = other_value.transport(); else field_transport.clean_up(); if (other_value.use__osmux().is_bound()) field_use__osmux = other_value.use__osmux(); else field_use__osmux.clean_up(); if (other_value.bssap__reset__retries().is_bound()) field_bssap__reset__retries = other_value.bssap__reset__retries(); else field_bssap__reset__retries.clean_up(); if (other_value.sccp__addr__local().is_bound()) field_sccp__addr__local = other_value.sccp__addr__local(); else field_sccp__addr__local.clean_up(); if (other_value.sccp__addr__peer().is_bound()) field_sccp__addr__peer = other_value.sccp__addr__peer(); else field_sccp__addr__peer.clean_up(); } return *this; } boolean RanOps::operator==(const RanOps& other_value) const { return field_ranap__create__cb==other_value.field_ranap__create__cb && field_ranap__unitdata__cb==other_value.field_ranap__unitdata__cb && field_ranap__connect__ind__auto__res==other_value.field_ranap__connect__ind__auto__res && field_ps__domain==other_value.field_ps__domain && field_grnc__id==other_value.field_grnc__id && field_decode__dtap==other_value.field_decode__dtap && field_role__ms==other_value.field_role__ms && field_protocol==other_value.field_protocol && field_transport==other_value.field_transport && field_use__osmux==other_value.field_use__osmux && field_bssap__reset__retries==other_value.field_bssap__reset__retries && field_sccp__addr__local==other_value.field_sccp__addr__local && field_sccp__addr__peer==other_value.field_sccp__addr__peer; } boolean RanOps::is_bound() const { return (OPTIONAL_OMIT == field_ranap__create__cb.get_selection() || field_ranap__create__cb.is_bound()) || (OPTIONAL_OMIT == field_ranap__unitdata__cb.get_selection() || field_ranap__unitdata__cb.is_bound()) || (field_ranap__connect__ind__auto__res.is_bound()) || (field_ps__domain.is_bound()) || (OPTIONAL_OMIT == field_grnc__id.get_selection() || field_grnc__id.is_bound()) || (field_decode__dtap.is_bound()) || (field_role__ms.is_bound()) || (field_protocol.is_bound()) || (field_transport.is_bound()) || (field_use__osmux.is_bound()) || (field_bssap__reset__retries.is_bound()) || (OPTIONAL_OMIT == field_sccp__addr__local.get_selection() || field_sccp__addr__local.is_bound()) || (OPTIONAL_OMIT == field_sccp__addr__peer.get_selection() || field_sccp__addr__peer.is_bound()); } boolean RanOps::is_value() const { return (OPTIONAL_OMIT == field_ranap__create__cb.get_selection() || field_ranap__create__cb.is_value()) && (OPTIONAL_OMIT == field_ranap__unitdata__cb.get_selection() || field_ranap__unitdata__cb.is_value()) && field_ranap__connect__ind__auto__res.is_value() && field_ps__domain.is_value() && (OPTIONAL_OMIT == field_grnc__id.get_selection() || field_grnc__id.is_value()) && field_decode__dtap.is_value() && field_role__ms.is_value() && field_protocol.is_value() && field_transport.is_value() && field_use__osmux.is_value() && field_bssap__reset__retries.is_value() && (OPTIONAL_OMIT == field_sccp__addr__local.get_selection() || field_sccp__addr__local.is_value()) && (OPTIONAL_OMIT == field_sccp__addr__peer.get_selection() || field_sccp__addr__peer.is_value()); } int RanOps::size_of() const { int ret_val = 8; if (field_ranap__create__cb.ispresent()) ret_val++; if (field_ranap__unitdata__cb.ispresent()) ret_val++; if (field_grnc__id.ispresent()) ret_val++; if (field_sccp__addr__local.ispresent()) ret_val++; if (field_sccp__addr__peer.ispresent()) ret_val++; return ret_val; } void RanOps::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ ranap_create_cb := "); field_ranap__create__cb.log(); TTCN_Logger::log_event_str(", ranap_unitdata_cb := "); field_ranap__unitdata__cb.log(); TTCN_Logger::log_event_str(", ranap_connect_ind_auto_res := "); field_ranap__connect__ind__auto__res.log(); TTCN_Logger::log_event_str(", ps_domain := "); field_ps__domain.log(); TTCN_Logger::log_event_str(", grnc_id := "); field_grnc__id.log(); TTCN_Logger::log_event_str(", decode_dtap := "); field_decode__dtap.log(); TTCN_Logger::log_event_str(", role_ms := "); field_role__ms.log(); TTCN_Logger::log_event_str(", protocol := "); field_protocol.log(); TTCN_Logger::log_event_str(", transport := "); field_transport.log(); TTCN_Logger::log_event_str(", use_osmux := "); field_use__osmux.log(); TTCN_Logger::log_event_str(", bssap_reset_retries := "); field_bssap__reset__retries.log(); TTCN_Logger::log_event_str(", sccp_addr_local := "); field_sccp__addr__local.log(); TTCN_Logger::log_event_str(", sccp_addr_peer := "); field_sccp__addr__peer.log(); TTCN_Logger::log_event_str(" }"); } void RanOps::set_implicit_omit() { if (!ranap__create__cb().is_bound()) ranap__create__cb() = OMIT_VALUE; else ranap__create__cb().set_implicit_omit(); if (!ranap__unitdata__cb().is_bound()) ranap__unitdata__cb() = OMIT_VALUE; else ranap__unitdata__cb().set_implicit_omit(); if (ranap__connect__ind__auto__res().is_bound()) ranap__connect__ind__auto__res().set_implicit_omit(); if (ps__domain().is_bound()) ps__domain().set_implicit_omit(); if (!grnc__id().is_bound()) grnc__id() = OMIT_VALUE; else grnc__id().set_implicit_omit(); if (decode__dtap().is_bound()) decode__dtap().set_implicit_omit(); if (role__ms().is_bound()) role__ms().set_implicit_omit(); if (protocol().is_bound()) protocol().set_implicit_omit(); if (transport().is_bound()) transport().set_implicit_omit(); if (use__osmux().is_bound()) use__osmux().set_implicit_omit(); if (bssap__reset__retries().is_bound()) bssap__reset__retries().set_implicit_omit(); if (!sccp__addr__local().is_bound()) sccp__addr__local() = OMIT_VALUE; else sccp__addr__local().set_implicit_omit(); if (!sccp__addr__peer().is_bound()) sccp__addr__peer() = OMIT_VALUE; else sccp__addr__peer().set_implicit_omit(); } void RanOps::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 (130 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ranap__create__cb().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ranap__unitdata__cb().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap__connect__ind__auto__res().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ps__domain().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) grnc__id().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) decode__dtap().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) role__ms().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) protocol().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) transport().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) use__osmux().set_param(*param.get_elem(9)); if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) bssap__reset__retries().set_param(*param.get_elem(10)); if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) sccp__addr__local().set_param(*param.get_elem(11)); if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) sccp__addr__peer().set_param(*param.get_elem(12)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_create_cb")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__create__cb().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_unitdata_cb")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__unitdata__cb().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_connect_ind_auto_res")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__connect__ind__auto__res().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ps_domain")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ps__domain().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "grnc_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { grnc__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "decode_dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { decode__dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "role_ms")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { role__ms().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "protocol")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { protocol().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "transport")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { transport().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "use_osmux")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { use__osmux().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "bssap_reset_retries")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { bssap__reset__retries().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_addr_local")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__addr__local().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RanOps: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.RanOps"); } } void RanOps::encode_text(Text_Buf& text_buf) const { field_ranap__create__cb.encode_text(text_buf); field_ranap__unitdata__cb.encode_text(text_buf); field_ranap__connect__ind__auto__res.encode_text(text_buf); field_ps__domain.encode_text(text_buf); field_grnc__id.encode_text(text_buf); field_decode__dtap.encode_text(text_buf); field_role__ms.encode_text(text_buf); field_protocol.encode_text(text_buf); field_transport.encode_text(text_buf); field_use__osmux.encode_text(text_buf); field_bssap__reset__retries.encode_text(text_buf); field_sccp__addr__local.encode_text(text_buf); field_sccp__addr__peer.encode_text(text_buf); } void RanOps::decode_text(Text_Buf& text_buf) { field_ranap__create__cb.decode_text(text_buf); field_ranap__unitdata__cb.decode_text(text_buf); field_ranap__connect__ind__auto__res.decode_text(text_buf); field_ps__domain.decode_text(text_buf); field_grnc__id.decode_text(text_buf); field_decode__dtap.decode_text(text_buf); field_role__ms.decode_text(text_buf); field_protocol.decode_text(text_buf); field_transport.decode_text(text_buf); field_use__osmux.decode_text(text_buf); field_bssap__reset__retries.decode_text(text_buf); field_sccp__addr__local.decode_text(text_buf); field_sccp__addr__peer.decode_text(text_buf); } struct RanOps_template::single_value_struct { RanapCreateCallback_template field_ranap__create__cb; RanapUnitdataCallback_template field_ranap__unitdata__cb; BOOLEAN_template field_ranap__connect__ind__auto__res; BOOLEAN_template field_ps__domain; RANAP__IEs::GlobalRNC__ID_template field_grnc__id; BOOLEAN_template field_decode__dtap; BOOLEAN_template field_role__ms; RanProtocol_template field_protocol; RAN__Transport_template field_transport; BOOLEAN_template field_use__osmux; INTEGER_template field_bssap__reset__retries; SCCPasp__Types::SCCP__PAR__Address_template field_sccp__addr__local; SCCPasp__Types::SCCP__PAR__Address_template field_sccp__addr__peer; }; void RanOps_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_ranap__create__cb = ANY_OR_OMIT; single_value->field_ranap__unitdata__cb = ANY_OR_OMIT; single_value->field_ranap__connect__ind__auto__res = ANY_VALUE; single_value->field_ps__domain = ANY_VALUE; single_value->field_grnc__id = ANY_OR_OMIT; single_value->field_decode__dtap = ANY_VALUE; single_value->field_role__ms = ANY_VALUE; single_value->field_protocol = ANY_VALUE; single_value->field_transport = ANY_VALUE; single_value->field_use__osmux = ANY_VALUE; single_value->field_bssap__reset__retries = ANY_VALUE; single_value->field_sccp__addr__local = ANY_OR_OMIT; single_value->field_sccp__addr__peer = ANY_OR_OMIT; } } } void RanOps_template::copy_value(const RanOps& other_value) { single_value = new single_value_struct; if (other_value.ranap__create__cb().is_bound()) { if (other_value.ranap__create__cb().ispresent()) single_value->field_ranap__create__cb = other_value.ranap__create__cb()(); else single_value->field_ranap__create__cb = OMIT_VALUE; } else { single_value->field_ranap__create__cb.clean_up(); } if (other_value.ranap__unitdata__cb().is_bound()) { if (other_value.ranap__unitdata__cb().ispresent()) single_value->field_ranap__unitdata__cb = other_value.ranap__unitdata__cb()(); else single_value->field_ranap__unitdata__cb = OMIT_VALUE; } else { single_value->field_ranap__unitdata__cb.clean_up(); } if (other_value.ranap__connect__ind__auto__res().is_bound()) { single_value->field_ranap__connect__ind__auto__res = other_value.ranap__connect__ind__auto__res(); } else { single_value->field_ranap__connect__ind__auto__res.clean_up(); } if (other_value.ps__domain().is_bound()) { single_value->field_ps__domain = other_value.ps__domain(); } else { single_value->field_ps__domain.clean_up(); } if (other_value.grnc__id().is_bound()) { if (other_value.grnc__id().ispresent()) single_value->field_grnc__id = other_value.grnc__id()(); else single_value->field_grnc__id = OMIT_VALUE; } else { single_value->field_grnc__id.clean_up(); } if (other_value.decode__dtap().is_bound()) { single_value->field_decode__dtap = other_value.decode__dtap(); } else { single_value->field_decode__dtap.clean_up(); } if (other_value.role__ms().is_bound()) { single_value->field_role__ms = other_value.role__ms(); } else { single_value->field_role__ms.clean_up(); } if (other_value.protocol().is_bound()) { single_value->field_protocol = other_value.protocol(); } else { single_value->field_protocol.clean_up(); } if (other_value.transport().is_bound()) { single_value->field_transport = other_value.transport(); } else { single_value->field_transport.clean_up(); } if (other_value.use__osmux().is_bound()) { single_value->field_use__osmux = other_value.use__osmux(); } else { single_value->field_use__osmux.clean_up(); } if (other_value.bssap__reset__retries().is_bound()) { single_value->field_bssap__reset__retries = other_value.bssap__reset__retries(); } else { single_value->field_bssap__reset__retries.clean_up(); } if (other_value.sccp__addr__local().is_bound()) { if (other_value.sccp__addr__local().ispresent()) single_value->field_sccp__addr__local = other_value.sccp__addr__local()(); else single_value->field_sccp__addr__local = OMIT_VALUE; } else { single_value->field_sccp__addr__local.clean_up(); } if (other_value.sccp__addr__peer().is_bound()) { if (other_value.sccp__addr__peer().ispresent()) single_value->field_sccp__addr__peer = other_value.sccp__addr__peer()(); else single_value->field_sccp__addr__peer = OMIT_VALUE; } else { single_value->field_sccp__addr__peer.clean_up(); } set_selection(SPECIFIC_VALUE); } void RanOps_template::copy_template(const RanOps_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.ranap__create__cb().get_selection()) { single_value->field_ranap__create__cb = other_value.ranap__create__cb(); } else { single_value->field_ranap__create__cb.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ranap__unitdata__cb().get_selection()) { single_value->field_ranap__unitdata__cb = other_value.ranap__unitdata__cb(); } else { single_value->field_ranap__unitdata__cb.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ranap__connect__ind__auto__res().get_selection()) { single_value->field_ranap__connect__ind__auto__res = other_value.ranap__connect__ind__auto__res(); } else { single_value->field_ranap__connect__ind__auto__res.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ps__domain().get_selection()) { single_value->field_ps__domain = other_value.ps__domain(); } else { single_value->field_ps__domain.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.grnc__id().get_selection()) { single_value->field_grnc__id = other_value.grnc__id(); } else { single_value->field_grnc__id.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.decode__dtap().get_selection()) { single_value->field_decode__dtap = other_value.decode__dtap(); } else { single_value->field_decode__dtap.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.role__ms().get_selection()) { single_value->field_role__ms = other_value.role__ms(); } else { single_value->field_role__ms.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.protocol().get_selection()) { single_value->field_protocol = other_value.protocol(); } else { single_value->field_protocol.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.transport().get_selection()) { single_value->field_transport = other_value.transport(); } else { single_value->field_transport.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.use__osmux().get_selection()) { single_value->field_use__osmux = other_value.use__osmux(); } else { single_value->field_use__osmux.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.bssap__reset__retries().get_selection()) { single_value->field_bssap__reset__retries = other_value.bssap__reset__retries(); } else { single_value->field_bssap__reset__retries.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sccp__addr__local().get_selection()) { single_value->field_sccp__addr__local = other_value.sccp__addr__local(); } else { single_value->field_sccp__addr__local.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sccp__addr__peer().get_selection()) { single_value->field_sccp__addr__peer = other_value.sccp__addr__peer(); } else { single_value->field_sccp__addr__peer.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 RanOps_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 RanOps_template(*other_value.implication_.precondition); implication_.implied_template = new RanOps_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 @RAN_Emulation.RanOps."); break; } set_selection(other_value); } RanOps_template::RanOps_template() { } RanOps_template::RanOps_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RanOps_template::RanOps_template(const RanOps& other_value) { copy_value(other_value); } RanOps_template::RanOps_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RanOps&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.RanOps from an unbound optional field."); } } RanOps_template::RanOps_template(RanOps_template* p_precondition, RanOps_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RanOps_template::RanOps_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RanOps_template::RanOps_template(const RanOps_template& other_value) : Base_Template() { copy_template(other_value); } RanOps_template::~RanOps_template() { clean_up(); } RanOps_template& RanOps_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RanOps_template& RanOps_template::operator=(const RanOps& other_value) { clean_up(); copy_value(other_value); return *this; } RanOps_template& RanOps_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RanOps&)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 @RAN_Emulation.RanOps."); } return *this; } RanOps_template& RanOps_template::operator=(const RanOps_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RanOps_template::match(const RanOps& 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.ranap__create__cb().is_bound()) return FALSE; if((other_value.ranap__create__cb().ispresent() ? !single_value->field_ranap__create__cb.match((const RanapCreateCallback&)other_value.ranap__create__cb(), legacy) : !single_value->field_ranap__create__cb.match_omit(legacy)))return FALSE; if(!other_value.ranap__unitdata__cb().is_bound()) return FALSE; if((other_value.ranap__unitdata__cb().ispresent() ? !single_value->field_ranap__unitdata__cb.match((const RanapUnitdataCallback&)other_value.ranap__unitdata__cb(), legacy) : !single_value->field_ranap__unitdata__cb.match_omit(legacy)))return FALSE; if(!other_value.ranap__connect__ind__auto__res().is_bound()) return FALSE; if(!single_value->field_ranap__connect__ind__auto__res.match(other_value.ranap__connect__ind__auto__res(), legacy))return FALSE; if(!other_value.ps__domain().is_bound()) return FALSE; if(!single_value->field_ps__domain.match(other_value.ps__domain(), legacy))return FALSE; if(!other_value.grnc__id().is_bound()) return FALSE; if((other_value.grnc__id().ispresent() ? !single_value->field_grnc__id.match((const RANAP__IEs::GlobalRNC__ID&)other_value.grnc__id(), legacy) : !single_value->field_grnc__id.match_omit(legacy)))return FALSE; if(!other_value.decode__dtap().is_bound()) return FALSE; if(!single_value->field_decode__dtap.match(other_value.decode__dtap(), legacy))return FALSE; if(!other_value.role__ms().is_bound()) return FALSE; if(!single_value->field_role__ms.match(other_value.role__ms(), legacy))return FALSE; if(!other_value.protocol().is_bound()) return FALSE; if(!single_value->field_protocol.match(other_value.protocol(), legacy))return FALSE; if(!other_value.transport().is_bound()) return FALSE; if(!single_value->field_transport.match(other_value.transport(), legacy))return FALSE; if(!other_value.use__osmux().is_bound()) return FALSE; if(!single_value->field_use__osmux.match(other_value.use__osmux(), legacy))return FALSE; if(!other_value.bssap__reset__retries().is_bound()) return FALSE; if(!single_value->field_bssap__reset__retries.match(other_value.bssap__reset__retries(), legacy))return FALSE; if(!other_value.sccp__addr__local().is_bound()) return FALSE; if((other_value.sccp__addr__local().ispresent() ? !single_value->field_sccp__addr__local.match((const SCCPasp__Types::SCCP__PAR__Address&)other_value.sccp__addr__local(), legacy) : !single_value->field_sccp__addr__local.match_omit(legacy)))return FALSE; if(!other_value.sccp__addr__peer().is_bound()) return FALSE; if((other_value.sccp__addr__peer().ispresent() ? !single_value->field_sccp__addr__peer.match((const SCCPasp__Types::SCCP__PAR__Address&)other_value.sccp__addr__peer(), legacy) : !single_value->field_sccp__addr__peer.match_omit(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 @RAN_Emulation.RanOps."); } return FALSE; } boolean RanOps_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_ranap__create__cb.is_omit() || single_value->field_ranap__create__cb.is_bound()) || (single_value->field_ranap__unitdata__cb.is_omit() || single_value->field_ranap__unitdata__cb.is_bound()) || single_value->field_ranap__connect__ind__auto__res.is_bound() || single_value->field_ps__domain.is_bound() || (single_value->field_grnc__id.is_omit() || single_value->field_grnc__id.is_bound()) || single_value->field_decode__dtap.is_bound() || single_value->field_role__ms.is_bound() || single_value->field_protocol.is_bound() || single_value->field_transport.is_bound() || single_value->field_use__osmux.is_bound() || single_value->field_bssap__reset__retries.is_bound() || (single_value->field_sccp__addr__local.is_omit() || single_value->field_sccp__addr__local.is_bound()) || (single_value->field_sccp__addr__peer.is_omit() || single_value->field_sccp__addr__peer.is_bound()); } boolean RanOps_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_ranap__create__cb.is_omit() || single_value->field_ranap__create__cb.is_value()) && (single_value->field_ranap__unitdata__cb.is_omit() || single_value->field_ranap__unitdata__cb.is_value()) && single_value->field_ranap__connect__ind__auto__res.is_value() && single_value->field_ps__domain.is_value() && (single_value->field_grnc__id.is_omit() || single_value->field_grnc__id.is_value()) && single_value->field_decode__dtap.is_value() && single_value->field_role__ms.is_value() && single_value->field_protocol.is_value() && single_value->field_transport.is_value() && single_value->field_use__osmux.is_value() && single_value->field_bssap__reset__retries.is_value() && (single_value->field_sccp__addr__local.is_omit() || single_value->field_sccp__addr__local.is_value()) && (single_value->field_sccp__addr__peer.is_omit() || single_value->field_sccp__addr__peer.is_value()); } void RanOps_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; } RanOps RanOps_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 @RAN_Emulation.RanOps."); RanOps ret_val; if (single_value->field_ranap__create__cb.is_omit()) ret_val.ranap__create__cb() = OMIT_VALUE; else if (single_value->field_ranap__create__cb.is_bound()) { ret_val.ranap__create__cb() = single_value->field_ranap__create__cb.valueof(); } if (single_value->field_ranap__unitdata__cb.is_omit()) ret_val.ranap__unitdata__cb() = OMIT_VALUE; else if (single_value->field_ranap__unitdata__cb.is_bound()) { ret_val.ranap__unitdata__cb() = single_value->field_ranap__unitdata__cb.valueof(); } if (single_value->field_ranap__connect__ind__auto__res.is_bound()) { ret_val.ranap__connect__ind__auto__res() = single_value->field_ranap__connect__ind__auto__res.valueof(); } if (single_value->field_ps__domain.is_bound()) { ret_val.ps__domain() = single_value->field_ps__domain.valueof(); } if (single_value->field_grnc__id.is_omit()) ret_val.grnc__id() = OMIT_VALUE; else if (single_value->field_grnc__id.is_bound()) { ret_val.grnc__id() = single_value->field_grnc__id.valueof(); } if (single_value->field_decode__dtap.is_bound()) { ret_val.decode__dtap() = single_value->field_decode__dtap.valueof(); } if (single_value->field_role__ms.is_bound()) { ret_val.role__ms() = single_value->field_role__ms.valueof(); } if (single_value->field_protocol.is_bound()) { ret_val.protocol() = single_value->field_protocol.valueof(); } if (single_value->field_transport.is_bound()) { ret_val.transport() = single_value->field_transport.valueof(); } if (single_value->field_use__osmux.is_bound()) { ret_val.use__osmux() = single_value->field_use__osmux.valueof(); } if (single_value->field_bssap__reset__retries.is_bound()) { ret_val.bssap__reset__retries() = single_value->field_bssap__reset__retries.valueof(); } if (single_value->field_sccp__addr__local.is_omit()) ret_val.sccp__addr__local() = OMIT_VALUE; else if (single_value->field_sccp__addr__local.is_bound()) { ret_val.sccp__addr__local() = single_value->field_sccp__addr__local.valueof(); } if (single_value->field_sccp__addr__peer.is_omit()) ret_val.sccp__addr__peer() = OMIT_VALUE; else if (single_value->field_sccp__addr__peer.is_bound()) { ret_val.sccp__addr__peer() = single_value->field_sccp__addr__peer.valueof(); } return ret_val; } void RanOps_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 @RAN_Emulation.RanOps."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RanOps_template[list_length]; } RanOps_template& RanOps_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 @RAN_Emulation.RanOps."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.RanOps."); return value_list.list_value[list_index]; } RanapCreateCallback_template& RanOps_template::ranap__create__cb() { set_specific(); return single_value->field_ranap__create__cb; } const RanapCreateCallback_template& RanOps_template::ranap__create__cb() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ranap_create_cb of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_ranap__create__cb; } RanapUnitdataCallback_template& RanOps_template::ranap__unitdata__cb() { set_specific(); return single_value->field_ranap__unitdata__cb; } const RanapUnitdataCallback_template& RanOps_template::ranap__unitdata__cb() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ranap_unitdata_cb of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_ranap__unitdata__cb; } BOOLEAN_template& RanOps_template::ranap__connect__ind__auto__res() { set_specific(); return single_value->field_ranap__connect__ind__auto__res; } const BOOLEAN_template& RanOps_template::ranap__connect__ind__auto__res() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ranap_connect_ind_auto_res of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_ranap__connect__ind__auto__res; } BOOLEAN_template& RanOps_template::ps__domain() { set_specific(); return single_value->field_ps__domain; } const BOOLEAN_template& RanOps_template::ps__domain() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ps_domain of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_ps__domain; } RANAP__IEs::GlobalRNC__ID_template& RanOps_template::grnc__id() { set_specific(); return single_value->field_grnc__id; } const RANAP__IEs::GlobalRNC__ID_template& RanOps_template::grnc__id() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field grnc_id of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_grnc__id; } BOOLEAN_template& RanOps_template::decode__dtap() { set_specific(); return single_value->field_decode__dtap; } const BOOLEAN_template& RanOps_template::decode__dtap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field decode_dtap of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_decode__dtap; } BOOLEAN_template& RanOps_template::role__ms() { set_specific(); return single_value->field_role__ms; } const BOOLEAN_template& RanOps_template::role__ms() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field role_ms of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_role__ms; } RanProtocol_template& RanOps_template::protocol() { set_specific(); return single_value->field_protocol; } const RanProtocol_template& RanOps_template::protocol() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field protocol of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_protocol; } RAN__Transport_template& RanOps_template::transport() { set_specific(); return single_value->field_transport; } const RAN__Transport_template& RanOps_template::transport() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field transport of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_transport; } BOOLEAN_template& RanOps_template::use__osmux() { set_specific(); return single_value->field_use__osmux; } const BOOLEAN_template& RanOps_template::use__osmux() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field use_osmux of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_use__osmux; } INTEGER_template& RanOps_template::bssap__reset__retries() { set_specific(); return single_value->field_bssap__reset__retries; } const INTEGER_template& RanOps_template::bssap__reset__retries() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field bssap_reset_retries of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_bssap__reset__retries; } SCCPasp__Types::SCCP__PAR__Address_template& RanOps_template::sccp__addr__local() { set_specific(); return single_value->field_sccp__addr__local; } const SCCPasp__Types::SCCP__PAR__Address_template& RanOps_template::sccp__addr__local() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sccp_addr_local of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_sccp__addr__local; } SCCPasp__Types::SCCP__PAR__Address_template& RanOps_template::sccp__addr__peer() { set_specific(); return single_value->field_sccp__addr__peer; } const SCCPasp__Types::SCCP__PAR__Address_template& RanOps_template::sccp__addr__peer() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sccp_addr_peer of a non-specific template of type @RAN_Emulation.RanOps."); return single_value->field_sccp__addr__peer; } int RanOps_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 8; if (single_value->field_ranap__create__cb.is_present()) ret_val++; if (single_value->field_ranap__unitdata__cb.is_present()) ret_val++; if (single_value->field_grnc__id.is_present()) ret_val++; if (single_value->field_sccp__addr__local.is_present()) ret_val++; if (single_value->field_sccp__addr__peer.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 @RAN_Emulation.RanOps 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 @RAN_Emulation.RanOps containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RanOps containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.RanOps."); } return 0; } void RanOps_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ ranap_create_cb := "); single_value->field_ranap__create__cb.log(); TTCN_Logger::log_event_str(", ranap_unitdata_cb := "); single_value->field_ranap__unitdata__cb.log(); TTCN_Logger::log_event_str(", ranap_connect_ind_auto_res := "); single_value->field_ranap__connect__ind__auto__res.log(); TTCN_Logger::log_event_str(", ps_domain := "); single_value->field_ps__domain.log(); TTCN_Logger::log_event_str(", grnc_id := "); single_value->field_grnc__id.log(); TTCN_Logger::log_event_str(", decode_dtap := "); single_value->field_decode__dtap.log(); TTCN_Logger::log_event_str(", role_ms := "); single_value->field_role__ms.log(); TTCN_Logger::log_event_str(", protocol := "); single_value->field_protocol.log(); TTCN_Logger::log_event_str(", transport := "); single_value->field_transport.log(); TTCN_Logger::log_event_str(", use_osmux := "); single_value->field_use__osmux.log(); TTCN_Logger::log_event_str(", bssap_reset_retries := "); single_value->field_bssap__reset__retries.log(); TTCN_Logger::log_event_str(", sccp_addr_local := "); single_value->field_sccp__addr__local.log(); TTCN_Logger::log_event_str(", sccp_addr_peer := "); single_value->field_sccp__addr__peer.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 RanOps_template::log_match(const RanOps& 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 (match_value.ranap__create__cb().ispresent()){ if(!single_value->field_ranap__create__cb.match(match_value.ranap__create__cb(), legacy)){ TTCN_Logger::log_logmatch_info(".ranap_create_cb"); single_value->field_ranap__create__cb.log_match(match_value.ranap__create__cb(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ranap__create__cb.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ranap_create_cb := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ranap__create__cb.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ranap__unitdata__cb().ispresent()){ if(!single_value->field_ranap__unitdata__cb.match(match_value.ranap__unitdata__cb(), legacy)){ TTCN_Logger::log_logmatch_info(".ranap_unitdata_cb"); single_value->field_ranap__unitdata__cb.log_match(match_value.ranap__unitdata__cb(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ranap__unitdata__cb.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ranap_unitdata_cb := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ranap__unitdata__cb.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_ranap__connect__ind__auto__res.match(match_value.ranap__connect__ind__auto__res(), legacy)){ TTCN_Logger::log_logmatch_info(".ranap_connect_ind_auto_res"); single_value->field_ranap__connect__ind__auto__res.log_match(match_value.ranap__connect__ind__auto__res(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_ps__domain.match(match_value.ps__domain(), legacy)){ TTCN_Logger::log_logmatch_info(".ps_domain"); single_value->field_ps__domain.log_match(match_value.ps__domain(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.grnc__id().ispresent()){ if(!single_value->field_grnc__id.match(match_value.grnc__id(), legacy)){ TTCN_Logger::log_logmatch_info(".grnc_id"); single_value->field_grnc__id.log_match(match_value.grnc__id(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_grnc__id.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".grnc_id := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_grnc__id.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if(!single_value->field_decode__dtap.match(match_value.decode__dtap(), legacy)){ TTCN_Logger::log_logmatch_info(".decode_dtap"); single_value->field_decode__dtap.log_match(match_value.decode__dtap(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_role__ms.match(match_value.role__ms(), legacy)){ TTCN_Logger::log_logmatch_info(".role_ms"); single_value->field_role__ms.log_match(match_value.role__ms(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_protocol.match(match_value.protocol(), legacy)){ TTCN_Logger::log_logmatch_info(".protocol"); single_value->field_protocol.log_match(match_value.protocol(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_transport.match(match_value.transport(), legacy)){ TTCN_Logger::log_logmatch_info(".transport"); single_value->field_transport.log_match(match_value.transport(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_use__osmux.match(match_value.use__osmux(), legacy)){ TTCN_Logger::log_logmatch_info(".use_osmux"); single_value->field_use__osmux.log_match(match_value.use__osmux(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_bssap__reset__retries.match(match_value.bssap__reset__retries(), legacy)){ TTCN_Logger::log_logmatch_info(".bssap_reset_retries"); single_value->field_bssap__reset__retries.log_match(match_value.bssap__reset__retries(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.sccp__addr__local().ispresent()){ if(!single_value->field_sccp__addr__local.match(match_value.sccp__addr__local(), legacy)){ TTCN_Logger::log_logmatch_info(".sccp_addr_local"); single_value->field_sccp__addr__local.log_match(match_value.sccp__addr__local(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sccp__addr__local.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sccp_addr_local := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sccp__addr__local.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sccp__addr__peer().ispresent()){ if(!single_value->field_sccp__addr__peer.match(match_value.sccp__addr__peer(), legacy)){ TTCN_Logger::log_logmatch_info(".sccp_addr_peer"); single_value->field_sccp__addr__peer.log_match(match_value.sccp__addr__peer(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sccp__addr__peer.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sccp_addr_peer := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sccp__addr__peer.log(); TTCN_Logger::log_event_str(" unmatched"); 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("{ ranap_create_cb := "); if (match_value.ranap__create__cb().ispresent()) { single_value->field_ranap__create__cb.log_match(match_value.ranap__create__cb(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ranap__create__cb.log(); if (single_value->field_ranap__create__cb.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ranap_unitdata_cb := "); if (match_value.ranap__unitdata__cb().ispresent()) { single_value->field_ranap__unitdata__cb.log_match(match_value.ranap__unitdata__cb(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ranap__unitdata__cb.log(); if (single_value->field_ranap__unitdata__cb.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ranap_connect_ind_auto_res := "); single_value->field_ranap__connect__ind__auto__res.log_match(match_value.ranap__connect__ind__auto__res(), legacy); TTCN_Logger::log_event_str(", ps_domain := "); single_value->field_ps__domain.log_match(match_value.ps__domain(), legacy); TTCN_Logger::log_event_str(", grnc_id := "); if (match_value.grnc__id().ispresent()) { single_value->field_grnc__id.log_match(match_value.grnc__id(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_grnc__id.log(); if (single_value->field_grnc__id.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", decode_dtap := "); single_value->field_decode__dtap.log_match(match_value.decode__dtap(), legacy); TTCN_Logger::log_event_str(", role_ms := "); single_value->field_role__ms.log_match(match_value.role__ms(), legacy); TTCN_Logger::log_event_str(", protocol := "); single_value->field_protocol.log_match(match_value.protocol(), legacy); TTCN_Logger::log_event_str(", transport := "); single_value->field_transport.log_match(match_value.transport(), legacy); TTCN_Logger::log_event_str(", use_osmux := "); single_value->field_use__osmux.log_match(match_value.use__osmux(), legacy); TTCN_Logger::log_event_str(", bssap_reset_retries := "); single_value->field_bssap__reset__retries.log_match(match_value.bssap__reset__retries(), legacy); TTCN_Logger::log_event_str(", sccp_addr_local := "); if (match_value.sccp__addr__local().ispresent()) { single_value->field_sccp__addr__local.log_match(match_value.sccp__addr__local(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sccp__addr__local.log(); if (single_value->field_sccp__addr__local.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sccp_addr_peer := "); if (match_value.sccp__addr__peer().ispresent()) { single_value->field_sccp__addr__peer.log_match(match_value.sccp__addr__peer(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sccp__addr__peer.log(); if (single_value->field_sccp__addr__peer.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } 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 RanOps_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (!ranap__create__cb().is_bound()) ranap__create__cb() = OMIT_VALUE; else ranap__create__cb().set_implicit_omit(); if (!ranap__unitdata__cb().is_bound()) ranap__unitdata__cb() = OMIT_VALUE; else ranap__unitdata__cb().set_implicit_omit(); if (ranap__connect__ind__auto__res().is_bound()) ranap__connect__ind__auto__res().set_implicit_omit(); if (ps__domain().is_bound()) ps__domain().set_implicit_omit(); if (!grnc__id().is_bound()) grnc__id() = OMIT_VALUE; else grnc__id().set_implicit_omit(); if (decode__dtap().is_bound()) decode__dtap().set_implicit_omit(); if (role__ms().is_bound()) role__ms().set_implicit_omit(); if (protocol().is_bound()) protocol().set_implicit_omit(); if (transport().is_bound()) transport().set_implicit_omit(); if (use__osmux().is_bound()) use__osmux().set_implicit_omit(); if (bssap__reset__retries().is_bound()) bssap__reset__retries().set_implicit_omit(); if (!sccp__addr__local().is_bound()) sccp__addr__local() = OMIT_VALUE; else sccp__addr__local().set_implicit_omit(); if (!sccp__addr__peer().is_bound()) sccp__addr__peer() = OMIT_VALUE; else sccp__addr__peer().set_implicit_omit(); } void RanOps_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_ranap__create__cb.encode_text(text_buf); single_value->field_ranap__unitdata__cb.encode_text(text_buf); single_value->field_ranap__connect__ind__auto__res.encode_text(text_buf); single_value->field_ps__domain.encode_text(text_buf); single_value->field_grnc__id.encode_text(text_buf); single_value->field_decode__dtap.encode_text(text_buf); single_value->field_role__ms.encode_text(text_buf); single_value->field_protocol.encode_text(text_buf); single_value->field_transport.encode_text(text_buf); single_value->field_use__osmux.encode_text(text_buf); single_value->field_bssap__reset__retries.encode_text(text_buf); single_value->field_sccp__addr__local.encode_text(text_buf); single_value->field_sccp__addr__peer.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 @RAN_Emulation.RanOps."); } } void RanOps_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_ranap__create__cb.decode_text(text_buf); single_value->field_ranap__unitdata__cb.decode_text(text_buf); single_value->field_ranap__connect__ind__auto__res.decode_text(text_buf); single_value->field_ps__domain.decode_text(text_buf); single_value->field_grnc__id.decode_text(text_buf); single_value->field_decode__dtap.decode_text(text_buf); single_value->field_role__ms.decode_text(text_buf); single_value->field_protocol.decode_text(text_buf); single_value->field_transport.decode_text(text_buf); single_value->field_use__osmux.decode_text(text_buf); single_value->field_bssap__reset__retries.decode_text(text_buf); single_value->field_sccp__addr__local.decode_text(text_buf); single_value->field_sccp__addr__peer.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 RanOps_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 @RAN_Emulation.RanOps."); } } void RanOps_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: { RanOps_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ranap__create__cb().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ranap__unitdata__cb().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap__connect__ind__auto__res().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ps__domain().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) grnc__id().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) decode__dtap().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) role__ms().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) protocol().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) transport().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) use__osmux().set_param(*param.get_elem(9)); if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) bssap__reset__retries().set_param(*param.get_elem(10)); if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) sccp__addr__local().set_param(*param.get_elem(11)); if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) sccp__addr__peer().set_param(*param.get_elem(12)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_create_cb")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__create__cb().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_unitdata_cb")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__unitdata__cb().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap_connect_ind_auto_res")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap__connect__ind__auto__res().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ps_domain")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ps__domain().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "grnc_id")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { grnc__id().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "decode_dtap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { decode__dtap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "role_ms")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { role__ms().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "protocol")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { protocol().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "transport")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { transport().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "use_osmux")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { use__osmux().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "bssap_reset_retries")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { bssap__reset__retries().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_addr_local")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__addr__local().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sccp_addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sccp__addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RanOps: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { RanOps_template* precondition = new RanOps_template; precondition->set_param(*param.get_elem(0)); RanOps_template* implied_template = new RanOps_template; implied_template->set_param(*param.get_elem(1)); *this = RanOps_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.RanOps"); } is_ifpresent = param.get_ifpresent(); } void RanOps_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_ranap__create__cb.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_ranap__unitdata__cb.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_ranap__connect__ind__auto__res.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_ps__domain.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_grnc__id.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_decode__dtap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_role__ms.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_protocol.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_transport.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_use__osmux.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_bssap__reset__retries.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_sccp__addr__local.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); single_value->field_sccp__addr__peer.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RanOps"); 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 : "@RAN_Emulation.RanOps"); } boolean RanOps_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RanOps_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& other_value) { if(other_value.ispresent()) { set_selection(SPECIFIC_VALUE); single_value = ((const RanapCreateCallback&)other_value()).referred_function; } else set_selection(OMIT_VALUE); } RanapCreateCallback_template::RanapCreateCallback_template(const RanapCreateCallback_template& other_value) :Base_Template() { copy_template(other_value); } RanapCreateCallback_template::~RanapCreateCallback_template() { clean_up(); } void RanapCreateCallback_template::clean_up(){ if(template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete[] value_list.list_value; template_selection = UNINITIALIZED_TEMPLATE; } RanapCreateCallback_template& RanapCreateCallback_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RanapCreateCallback_template& RanapCreateCallback_template::operator=(RanapCreateCallback::function_pointer other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this;} RanapCreateCallback_template& RanapCreateCallback_template::operator=(const RanapCreateCallback& other_value) { other_value.must_bound("Assignment of an unbound @RAN_Emulation.RanapCreateCallback value to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.referred_function; return *this; } RanapCreateCallback_template& RanapCreateCallback_template::operator=(const OPTIONAL& other_value) { clean_up(); if(other_value.ispresent()) { set_selection(SPECIFIC_VALUE); single_value = ((const RanapCreateCallback&)other_value()).referred_function; } else set_selection(OMIT_VALUE); return *this;} RanapCreateCallback_template& RanapCreateCallback_template::operator=(const RanapCreateCallback_template& other_value) { if(&other_value != this) { clean_up();copy_template(other_value); } return *this; } boolean RanapCreateCallback_template::match(RanapCreateCallback::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 @RAN_Emulation.RanapCreateCallback template."); }; return FALSE; } boolean RanapCreateCallback_template::match(const RanapCreateCallback& other_value, boolean) const { if (!other_value.is_bound()) return FALSE; return match(other_value.referred_function); } RanapCreateCallback RanapCreateCallback_template::valueof() const { if(template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific @RAN_Emulation.RanapCreateCallback template."); return single_value; } void RanapCreateCallback_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 @RAN_Emulation.RanapCreateCallback template."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RanapCreateCallback_template[list_length]; } RanapCreateCallback_template& RanapCreateCallback_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 @RAN_Emulation.RanapCreateCallback"); if(list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.RanapCreateCallback."); return value_list.list_value[list_index]; } void RanapCreateCallback_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 RanapCreateCallback_template::log_match(const RanapCreateCallback& 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 RanapCreateCallback_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 @RAN_Emulation.RanapCreateCallback."); } } void RanapCreateCallback_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 RanapCreateCallback_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 @RAN_Emulation.RanapCreateCallback."); } } boolean RanapCreateCallback_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RanapCreateCallback_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& other_value) { if(other_value.ispresent()) { set_selection(SPECIFIC_VALUE); single_value = ((const RanapUnitdataCallback&)other_value()).referred_function; } else set_selection(OMIT_VALUE); } RanapUnitdataCallback_template::RanapUnitdataCallback_template(const RanapUnitdataCallback_template& other_value) :Base_Template() { copy_template(other_value); } RanapUnitdataCallback_template::~RanapUnitdataCallback_template() { clean_up(); } void RanapUnitdataCallback_template::clean_up(){ if(template_selection == VALUE_LIST || template_selection == COMPLEMENTED_LIST) delete[] value_list.list_value; template_selection = UNINITIALIZED_TEMPLATE; } RanapUnitdataCallback_template& RanapUnitdataCallback_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RanapUnitdataCallback_template& RanapUnitdataCallback_template::operator=(RanapUnitdataCallback::function_pointer other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this;} RanapUnitdataCallback_template& RanapUnitdataCallback_template::operator=(const RanapUnitdataCallback& other_value) { other_value.must_bound("Assignment of an unbound @RAN_Emulation.RanapUnitdataCallback value to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.referred_function; return *this; } RanapUnitdataCallback_template& RanapUnitdataCallback_template::operator=(const OPTIONAL& other_value) { clean_up(); if(other_value.ispresent()) { set_selection(SPECIFIC_VALUE); single_value = ((const RanapUnitdataCallback&)other_value()).referred_function; } else set_selection(OMIT_VALUE); return *this;} RanapUnitdataCallback_template& RanapUnitdataCallback_template::operator=(const RanapUnitdataCallback_template& other_value) { if(&other_value != this) { clean_up();copy_template(other_value); } return *this; } boolean RanapUnitdataCallback_template::match(RanapUnitdataCallback::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 @RAN_Emulation.RanapUnitdataCallback template."); }; return FALSE; } boolean RanapUnitdataCallback_template::match(const RanapUnitdataCallback& other_value, boolean) const { if (!other_value.is_bound()) return FALSE; return match(other_value.referred_function); } RanapUnitdataCallback RanapUnitdataCallback_template::valueof() const { if(template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific @RAN_Emulation.RanapUnitdataCallback template."); return single_value; } void RanapUnitdataCallback_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 @RAN_Emulation.RanapUnitdataCallback template."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RanapUnitdataCallback_template[list_length]; } RanapUnitdataCallback_template& RanapUnitdataCallback_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 @RAN_Emulation.RanapUnitdataCallback"); if(list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.RanapUnitdataCallback."); return value_list.list_value[list_index]; } void RanapUnitdataCallback_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 RanapUnitdataCallback_template::log_match(const RanapUnitdataCallback& 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 RanapUnitdataCallback_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 @RAN_Emulation.RanapUnitdataCallback."); } } void RanapUnitdataCallback_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 RanapUnitdataCallback_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 @RAN_Emulation.RanapUnitdataCallback."); } } boolean RanapUnitdataCallback_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RanapUnitdataCallback_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& par_ranap) : field_addr__peer(par_addr__peer), field_addr__own(par_addr__own), field_ranap(par_ranap) { } RANAP__Conn__Req::RANAP__Conn__Req(const RANAP__Conn__Req& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.RANAP_Conn_Req."); if (other_value.addr__peer().is_bound()) field_addr__peer = other_value.addr__peer(); else field_addr__peer.clean_up(); if (other_value.addr__own().is_bound()) field_addr__own = other_value.addr__own(); else field_addr__own.clean_up(); if (other_value.ranap().is_bound()) field_ranap = other_value.ranap(); else field_ranap.clean_up(); } void RANAP__Conn__Req::clean_up() { field_addr__peer.clean_up(); field_addr__own.clean_up(); field_ranap.clean_up(); } const TTCN_Typedescriptor_t* RANAP__Conn__Req::get_descriptor() const { return &RANAP__Conn__Req_descr_; } RANAP__Conn__Req& RANAP__Conn__Req::operator=(const RANAP__Conn__Req& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.RANAP_Conn_Req."); if (other_value.addr__peer().is_bound()) field_addr__peer = other_value.addr__peer(); else field_addr__peer.clean_up(); if (other_value.addr__own().is_bound()) field_addr__own = other_value.addr__own(); else field_addr__own.clean_up(); if (other_value.ranap().is_bound()) field_ranap = other_value.ranap(); else field_ranap.clean_up(); } return *this; } boolean RANAP__Conn__Req::operator==(const RANAP__Conn__Req& other_value) const { return field_addr__peer==other_value.field_addr__peer && field_addr__own==other_value.field_addr__own && field_ranap==other_value.field_ranap; } boolean RANAP__Conn__Req::is_bound() const { return (field_addr__peer.is_bound()) || (field_addr__own.is_bound()) || (OPTIONAL_OMIT == field_ranap.get_selection() || field_ranap.is_bound()); } boolean RANAP__Conn__Req::is_value() const { return field_addr__peer.is_value() && field_addr__own.is_value() && (OPTIONAL_OMIT == field_ranap.get_selection() || field_ranap.is_value()); } int RANAP__Conn__Req::size_of() const { int ret_val = 2; if (field_ranap.ispresent()) ret_val++; return ret_val; } void RANAP__Conn__Req::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ addr_peer := "); field_addr__peer.log(); TTCN_Logger::log_event_str(", addr_own := "); field_addr__own.log(); TTCN_Logger::log_event_str(", ranap := "); field_ranap.log(); TTCN_Logger::log_event_str(" }"); } void RANAP__Conn__Req::set_implicit_omit() { if (addr__peer().is_bound()) addr__peer().set_implicit_omit(); if (addr__own().is_bound()) addr__own().set_implicit_omit(); if (!ranap().is_bound()) ranap() = OMIT_VALUE; else ranap().set_implicit_omit(); } void RANAP__Conn__Req::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 (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) addr__peer().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) addr__own().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_own")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__own().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RANAP_Conn_Req: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.RANAP_Conn_Req"); } } void RANAP__Conn__Req::encode_text(Text_Buf& text_buf) const { field_addr__peer.encode_text(text_buf); field_addr__own.encode_text(text_buf); field_ranap.encode_text(text_buf); } void RANAP__Conn__Req::decode_text(Text_Buf& text_buf) { field_addr__peer.decode_text(text_buf); field_addr__own.decode_text(text_buf); field_ranap.decode_text(text_buf); } struct RANAP__Conn__Req_template::single_value_struct { SCCPasp__Types::SCCP__PAR__Address_template field_addr__peer; SCCPasp__Types::SCCP__PAR__Address_template field_addr__own; RANAP__PDU__Descriptions::RANAP__PDU_template field_ranap; }; void RANAP__Conn__Req_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_addr__peer = ANY_VALUE; single_value->field_addr__own = ANY_VALUE; single_value->field_ranap = ANY_OR_OMIT; } } } void RANAP__Conn__Req_template::copy_value(const RANAP__Conn__Req& other_value) { single_value = new single_value_struct; if (other_value.addr__peer().is_bound()) { single_value->field_addr__peer = other_value.addr__peer(); } else { single_value->field_addr__peer.clean_up(); } if (other_value.addr__own().is_bound()) { single_value->field_addr__own = other_value.addr__own(); } else { single_value->field_addr__own.clean_up(); } if (other_value.ranap().is_bound()) { if (other_value.ranap().ispresent()) single_value->field_ranap = other_value.ranap()(); else single_value->field_ranap = OMIT_VALUE; } else { single_value->field_ranap.clean_up(); } set_selection(SPECIFIC_VALUE); } void RANAP__Conn__Req_template::copy_template(const RANAP__Conn__Req_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.addr__peer().get_selection()) { single_value->field_addr__peer = other_value.addr__peer(); } else { single_value->field_addr__peer.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.addr__own().get_selection()) { single_value->field_addr__own = other_value.addr__own(); } else { single_value->field_addr__own.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ranap().get_selection()) { single_value->field_ranap = other_value.ranap(); } else { single_value->field_ranap.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 RANAP__Conn__Req_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 RANAP__Conn__Req_template(*other_value.implication_.precondition); implication_.implied_template = new RANAP__Conn__Req_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 @RAN_Emulation.RANAP_Conn_Req."); break; } set_selection(other_value); } RANAP__Conn__Req_template::RANAP__Conn__Req_template() { } RANAP__Conn__Req_template::RANAP__Conn__Req_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RANAP__Conn__Req_template::RANAP__Conn__Req_template(const RANAP__Conn__Req& other_value) { copy_value(other_value); } RANAP__Conn__Req_template::RANAP__Conn__Req_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RANAP__Conn__Req&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.RANAP_Conn_Req from an unbound optional field."); } } RANAP__Conn__Req_template::RANAP__Conn__Req_template(RANAP__Conn__Req_template* p_precondition, RANAP__Conn__Req_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RANAP__Conn__Req_template::RANAP__Conn__Req_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RANAP__Conn__Req_template::RANAP__Conn__Req_template(const RANAP__Conn__Req_template& other_value) : Base_Template() { copy_template(other_value); } RANAP__Conn__Req_template::~RANAP__Conn__Req_template() { clean_up(); } RANAP__Conn__Req_template& RANAP__Conn__Req_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RANAP__Conn__Req_template& RANAP__Conn__Req_template::operator=(const RANAP__Conn__Req& other_value) { clean_up(); copy_value(other_value); return *this; } RANAP__Conn__Req_template& RANAP__Conn__Req_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RANAP__Conn__Req&)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 @RAN_Emulation.RANAP_Conn_Req."); } return *this; } RANAP__Conn__Req_template& RANAP__Conn__Req_template::operator=(const RANAP__Conn__Req_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RANAP__Conn__Req_template::match(const RANAP__Conn__Req& 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.addr__peer().is_bound()) return FALSE; if(!single_value->field_addr__peer.match(other_value.addr__peer(), legacy))return FALSE; if(!other_value.addr__own().is_bound()) return FALSE; if(!single_value->field_addr__own.match(other_value.addr__own(), legacy))return FALSE; if(!other_value.ranap().is_bound()) return FALSE; if((other_value.ranap().ispresent() ? !single_value->field_ranap.match((const RANAP__PDU__Descriptions::RANAP__PDU&)other_value.ranap(), legacy) : !single_value->field_ranap.match_omit(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 @RAN_Emulation.RANAP_Conn_Req."); } return FALSE; } boolean RANAP__Conn__Req_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_addr__peer.is_bound() || single_value->field_addr__own.is_bound() || (single_value->field_ranap.is_omit() || single_value->field_ranap.is_bound()); } boolean RANAP__Conn__Req_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_addr__peer.is_value() && single_value->field_addr__own.is_value() && (single_value->field_ranap.is_omit() || single_value->field_ranap.is_value()); } void RANAP__Conn__Req_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; } RANAP__Conn__Req RANAP__Conn__Req_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 @RAN_Emulation.RANAP_Conn_Req."); RANAP__Conn__Req ret_val; if (single_value->field_addr__peer.is_bound()) { ret_val.addr__peer() = single_value->field_addr__peer.valueof(); } if (single_value->field_addr__own.is_bound()) { ret_val.addr__own() = single_value->field_addr__own.valueof(); } if (single_value->field_ranap.is_omit()) ret_val.ranap() = OMIT_VALUE; else if (single_value->field_ranap.is_bound()) { ret_val.ranap() = single_value->field_ranap.valueof(); } return ret_val; } void RANAP__Conn__Req_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 @RAN_Emulation.RANAP_Conn_Req."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RANAP__Conn__Req_template[list_length]; } RANAP__Conn__Req_template& RANAP__Conn__Req_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 @RAN_Emulation.RANAP_Conn_Req."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.RANAP_Conn_Req."); return value_list.list_value[list_index]; } SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Req_template::addr__peer() { set_specific(); return single_value->field_addr__peer; } const SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Req_template::addr__peer() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field addr_peer of a non-specific template of type @RAN_Emulation.RANAP_Conn_Req."); return single_value->field_addr__peer; } SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Req_template::addr__own() { set_specific(); return single_value->field_addr__own; } const SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Req_template::addr__own() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field addr_own of a non-specific template of type @RAN_Emulation.RANAP_Conn_Req."); return single_value->field_addr__own; } RANAP__PDU__Descriptions::RANAP__PDU_template& RANAP__Conn__Req_template::ranap() { set_specific(); return single_value->field_ranap; } const RANAP__PDU__Descriptions::RANAP__PDU_template& RANAP__Conn__Req_template::ranap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ranap of a non-specific template of type @RAN_Emulation.RANAP_Conn_Req."); return single_value->field_ranap; } int RANAP__Conn__Req_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 2; if (single_value->field_ranap.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 @RAN_Emulation.RANAP_Conn_Req 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 @RAN_Emulation.RANAP_Conn_Req containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Req containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.RANAP_Conn_Req."); } return 0; } void RANAP__Conn__Req_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ addr_peer := "); single_value->field_addr__peer.log(); TTCN_Logger::log_event_str(", addr_own := "); single_value->field_addr__own.log(); TTCN_Logger::log_event_str(", ranap := "); single_value->field_ranap.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 RANAP__Conn__Req_template::log_match(const RANAP__Conn__Req& 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_addr__peer.match(match_value.addr__peer(), legacy)){ TTCN_Logger::log_logmatch_info(".addr_peer"); single_value->field_addr__peer.log_match(match_value.addr__peer(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_addr__own.match(match_value.addr__own(), legacy)){ TTCN_Logger::log_logmatch_info(".addr_own"); single_value->field_addr__own.log_match(match_value.addr__own(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.ranap().ispresent()){ if(!single_value->field_ranap.match(match_value.ranap(), legacy)){ TTCN_Logger::log_logmatch_info(".ranap"); single_value->field_ranap.log_match(match_value.ranap(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ranap.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ranap := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ranap.log(); TTCN_Logger::log_event_str(" unmatched"); 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("{ addr_peer := "); single_value->field_addr__peer.log_match(match_value.addr__peer(), legacy); TTCN_Logger::log_event_str(", addr_own := "); single_value->field_addr__own.log_match(match_value.addr__own(), legacy); TTCN_Logger::log_event_str(", ranap := "); if (match_value.ranap().ispresent()) { single_value->field_ranap.log_match(match_value.ranap(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ranap.log(); if (single_value->field_ranap.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } 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 RANAP__Conn__Req_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (addr__peer().is_bound()) addr__peer().set_implicit_omit(); if (addr__own().is_bound()) addr__own().set_implicit_omit(); if (!ranap().is_bound()) ranap() = OMIT_VALUE; else ranap().set_implicit_omit(); } void RANAP__Conn__Req_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_addr__peer.encode_text(text_buf); single_value->field_addr__own.encode_text(text_buf); single_value->field_ranap.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 @RAN_Emulation.RANAP_Conn_Req."); } } void RANAP__Conn__Req_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_addr__peer.decode_text(text_buf); single_value->field_addr__own.decode_text(text_buf); single_value->field_ranap.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 RANAP__Conn__Req_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 @RAN_Emulation.RANAP_Conn_Req."); } } void RANAP__Conn__Req_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: { RANAP__Conn__Req_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) addr__peer().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) addr__own().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_own")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__own().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RANAP_Conn_Req: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { RANAP__Conn__Req_template* precondition = new RANAP__Conn__Req_template; precondition->set_param(*param.get_elem(0)); RANAP__Conn__Req_template* implied_template = new RANAP__Conn__Req_template; implied_template->set_param(*param.get_elem(1)); *this = RANAP__Conn__Req_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.RANAP_Conn_Req"); } is_ifpresent = param.get_ifpresent(); } void RANAP__Conn__Req_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_addr__peer.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Req"); single_value->field_addr__own.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Req"); single_value->field_ranap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Req"); 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 : "@RAN_Emulation.RANAP_Conn_Req"); } boolean RANAP__Conn__Req_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RANAP__Conn__Req_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& par_ranap) : field_addr__peer(par_addr__peer), field_addr__own(par_addr__own), field_ranap(par_ranap) { } RANAP__Conn__Ind::RANAP__Conn__Ind(const RANAP__Conn__Ind& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RAN_Emulation.RANAP_Conn_Ind."); if (other_value.addr__peer().is_bound()) field_addr__peer = other_value.addr__peer(); else field_addr__peer.clean_up(); if (other_value.addr__own().is_bound()) field_addr__own = other_value.addr__own(); else field_addr__own.clean_up(); if (other_value.ranap().is_bound()) field_ranap = other_value.ranap(); else field_ranap.clean_up(); } void RANAP__Conn__Ind::clean_up() { field_addr__peer.clean_up(); field_addr__own.clean_up(); field_ranap.clean_up(); } const TTCN_Typedescriptor_t* RANAP__Conn__Ind::get_descriptor() const { return &RANAP__Conn__Ind_descr_; } RANAP__Conn__Ind& RANAP__Conn__Ind::operator=(const RANAP__Conn__Ind& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RAN_Emulation.RANAP_Conn_Ind."); if (other_value.addr__peer().is_bound()) field_addr__peer = other_value.addr__peer(); else field_addr__peer.clean_up(); if (other_value.addr__own().is_bound()) field_addr__own = other_value.addr__own(); else field_addr__own.clean_up(); if (other_value.ranap().is_bound()) field_ranap = other_value.ranap(); else field_ranap.clean_up(); } return *this; } boolean RANAP__Conn__Ind::operator==(const RANAP__Conn__Ind& other_value) const { return field_addr__peer==other_value.field_addr__peer && field_addr__own==other_value.field_addr__own && field_ranap==other_value.field_ranap; } boolean RANAP__Conn__Ind::is_bound() const { return (field_addr__peer.is_bound()) || (field_addr__own.is_bound()) || (OPTIONAL_OMIT == field_ranap.get_selection() || field_ranap.is_bound()); } boolean RANAP__Conn__Ind::is_value() const { return field_addr__peer.is_value() && field_addr__own.is_value() && (OPTIONAL_OMIT == field_ranap.get_selection() || field_ranap.is_value()); } int RANAP__Conn__Ind::size_of() const { int ret_val = 2; if (field_ranap.ispresent()) ret_val++; return ret_val; } void RANAP__Conn__Ind::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ addr_peer := "); field_addr__peer.log(); TTCN_Logger::log_event_str(", addr_own := "); field_addr__own.log(); TTCN_Logger::log_event_str(", ranap := "); field_ranap.log(); TTCN_Logger::log_event_str(" }"); } void RANAP__Conn__Ind::set_implicit_omit() { if (addr__peer().is_bound()) addr__peer().set_implicit_omit(); if (addr__own().is_bound()) addr__own().set_implicit_omit(); if (!ranap().is_bound()) ranap() = OMIT_VALUE; else ranap().set_implicit_omit(); } void RANAP__Conn__Ind::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 (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) addr__peer().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) addr__own().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_own")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__own().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RANAP_Conn_Ind: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@RAN_Emulation.RANAP_Conn_Ind"); } } void RANAP__Conn__Ind::encode_text(Text_Buf& text_buf) const { field_addr__peer.encode_text(text_buf); field_addr__own.encode_text(text_buf); field_ranap.encode_text(text_buf); } void RANAP__Conn__Ind::decode_text(Text_Buf& text_buf) { field_addr__peer.decode_text(text_buf); field_addr__own.decode_text(text_buf); field_ranap.decode_text(text_buf); } struct RANAP__Conn__Ind_template::single_value_struct { SCCPasp__Types::SCCP__PAR__Address_template field_addr__peer; SCCPasp__Types::SCCP__PAR__Address_template field_addr__own; RANAP__PDU__Descriptions::RANAP__PDU_template field_ranap; }; void RANAP__Conn__Ind_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_addr__peer = ANY_VALUE; single_value->field_addr__own = ANY_VALUE; single_value->field_ranap = ANY_OR_OMIT; } } } void RANAP__Conn__Ind_template::copy_value(const RANAP__Conn__Ind& other_value) { single_value = new single_value_struct; if (other_value.addr__peer().is_bound()) { single_value->field_addr__peer = other_value.addr__peer(); } else { single_value->field_addr__peer.clean_up(); } if (other_value.addr__own().is_bound()) { single_value->field_addr__own = other_value.addr__own(); } else { single_value->field_addr__own.clean_up(); } if (other_value.ranap().is_bound()) { if (other_value.ranap().ispresent()) single_value->field_ranap = other_value.ranap()(); else single_value->field_ranap = OMIT_VALUE; } else { single_value->field_ranap.clean_up(); } set_selection(SPECIFIC_VALUE); } void RANAP__Conn__Ind_template::copy_template(const RANAP__Conn__Ind_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.addr__peer().get_selection()) { single_value->field_addr__peer = other_value.addr__peer(); } else { single_value->field_addr__peer.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.addr__own().get_selection()) { single_value->field_addr__own = other_value.addr__own(); } else { single_value->field_addr__own.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ranap().get_selection()) { single_value->field_ranap = other_value.ranap(); } else { single_value->field_ranap.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 RANAP__Conn__Ind_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 RANAP__Conn__Ind_template(*other_value.implication_.precondition); implication_.implied_template = new RANAP__Conn__Ind_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 @RAN_Emulation.RANAP_Conn_Ind."); break; } set_selection(other_value); } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template() { } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(const RANAP__Conn__Ind& other_value) { copy_value(other_value); } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RANAP__Conn__Ind&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @RAN_Emulation.RANAP_Conn_Ind from an unbound optional field."); } } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(RANAP__Conn__Ind_template* p_precondition, RANAP__Conn__Ind_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } RANAP__Conn__Ind_template::RANAP__Conn__Ind_template(const RANAP__Conn__Ind_template& other_value) : Base_Template() { copy_template(other_value); } RANAP__Conn__Ind_template::~RANAP__Conn__Ind_template() { clean_up(); } RANAP__Conn__Ind_template& RANAP__Conn__Ind_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } RANAP__Conn__Ind_template& RANAP__Conn__Ind_template::operator=(const RANAP__Conn__Ind& other_value) { clean_up(); copy_value(other_value); return *this; } RANAP__Conn__Ind_template& RANAP__Conn__Ind_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const RANAP__Conn__Ind&)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 @RAN_Emulation.RANAP_Conn_Ind."); } return *this; } RANAP__Conn__Ind_template& RANAP__Conn__Ind_template::operator=(const RANAP__Conn__Ind_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean RANAP__Conn__Ind_template::match(const RANAP__Conn__Ind& 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.addr__peer().is_bound()) return FALSE; if(!single_value->field_addr__peer.match(other_value.addr__peer(), legacy))return FALSE; if(!other_value.addr__own().is_bound()) return FALSE; if(!single_value->field_addr__own.match(other_value.addr__own(), legacy))return FALSE; if(!other_value.ranap().is_bound()) return FALSE; if((other_value.ranap().ispresent() ? !single_value->field_ranap.match((const RANAP__PDU__Descriptions::RANAP__PDU&)other_value.ranap(), legacy) : !single_value->field_ranap.match_omit(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 @RAN_Emulation.RANAP_Conn_Ind."); } return FALSE; } boolean RANAP__Conn__Ind_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_addr__peer.is_bound() || single_value->field_addr__own.is_bound() || (single_value->field_ranap.is_omit() || single_value->field_ranap.is_bound()); } boolean RANAP__Conn__Ind_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_addr__peer.is_value() && single_value->field_addr__own.is_value() && (single_value->field_ranap.is_omit() || single_value->field_ranap.is_value()); } void RANAP__Conn__Ind_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; } RANAP__Conn__Ind RANAP__Conn__Ind_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 @RAN_Emulation.RANAP_Conn_Ind."); RANAP__Conn__Ind ret_val; if (single_value->field_addr__peer.is_bound()) { ret_val.addr__peer() = single_value->field_addr__peer.valueof(); } if (single_value->field_addr__own.is_bound()) { ret_val.addr__own() = single_value->field_addr__own.valueof(); } if (single_value->field_ranap.is_omit()) ret_val.ranap() = OMIT_VALUE; else if (single_value->field_ranap.is_bound()) { ret_val.ranap() = single_value->field_ranap.valueof(); } return ret_val; } void RANAP__Conn__Ind_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 @RAN_Emulation.RANAP_Conn_Ind."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new RANAP__Conn__Ind_template[list_length]; } RANAP__Conn__Ind_template& RANAP__Conn__Ind_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 @RAN_Emulation.RANAP_Conn_Ind."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @RAN_Emulation.RANAP_Conn_Ind."); return value_list.list_value[list_index]; } SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Ind_template::addr__peer() { set_specific(); return single_value->field_addr__peer; } const SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Ind_template::addr__peer() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field addr_peer of a non-specific template of type @RAN_Emulation.RANAP_Conn_Ind."); return single_value->field_addr__peer; } SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Ind_template::addr__own() { set_specific(); return single_value->field_addr__own; } const SCCPasp__Types::SCCP__PAR__Address_template& RANAP__Conn__Ind_template::addr__own() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field addr_own of a non-specific template of type @RAN_Emulation.RANAP_Conn_Ind."); return single_value->field_addr__own; } RANAP__PDU__Descriptions::RANAP__PDU_template& RANAP__Conn__Ind_template::ranap() { set_specific(); return single_value->field_ranap; } const RANAP__PDU__Descriptions::RANAP__PDU_template& RANAP__Conn__Ind_template::ranap() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ranap of a non-specific template of type @RAN_Emulation.RANAP_Conn_Ind."); return single_value->field_ranap; } int RANAP__Conn__Ind_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 2; if (single_value->field_ranap.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 @RAN_Emulation.RANAP_Conn_Ind 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 @RAN_Emulation.RANAP_Conn_Ind containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @RAN_Emulation.RANAP_Conn_Ind containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @RAN_Emulation.RANAP_Conn_Ind."); } return 0; } void RANAP__Conn__Ind_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ addr_peer := "); single_value->field_addr__peer.log(); TTCN_Logger::log_event_str(", addr_own := "); single_value->field_addr__own.log(); TTCN_Logger::log_event_str(", ranap := "); single_value->field_ranap.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 RANAP__Conn__Ind_template::log_match(const RANAP__Conn__Ind& 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_addr__peer.match(match_value.addr__peer(), legacy)){ TTCN_Logger::log_logmatch_info(".addr_peer"); single_value->field_addr__peer.log_match(match_value.addr__peer(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_addr__own.match(match_value.addr__own(), legacy)){ TTCN_Logger::log_logmatch_info(".addr_own"); single_value->field_addr__own.log_match(match_value.addr__own(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if (match_value.ranap().ispresent()){ if(!single_value->field_ranap.match(match_value.ranap(), legacy)){ TTCN_Logger::log_logmatch_info(".ranap"); single_value->field_ranap.log_match(match_value.ranap(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ranap.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ranap := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ranap.log(); TTCN_Logger::log_event_str(" unmatched"); 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("{ addr_peer := "); single_value->field_addr__peer.log_match(match_value.addr__peer(), legacy); TTCN_Logger::log_event_str(", addr_own := "); single_value->field_addr__own.log_match(match_value.addr__own(), legacy); TTCN_Logger::log_event_str(", ranap := "); if (match_value.ranap().ispresent()) { single_value->field_ranap.log_match(match_value.ranap(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ranap.log(); if (single_value->field_ranap.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } 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 RANAP__Conn__Ind_template::set_implicit_omit() { if (template_selection != SPECIFIC_VALUE) return; if (addr__peer().is_bound()) addr__peer().set_implicit_omit(); if (addr__own().is_bound()) addr__own().set_implicit_omit(); if (!ranap().is_bound()) ranap() = OMIT_VALUE; else ranap().set_implicit_omit(); } void RANAP__Conn__Ind_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_addr__peer.encode_text(text_buf); single_value->field_addr__own.encode_text(text_buf); single_value->field_ranap.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 @RAN_Emulation.RANAP_Conn_Ind."); } } void RANAP__Conn__Ind_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_addr__peer.decode_text(text_buf); single_value->field_addr__own.decode_text(text_buf); single_value->field_ranap.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 RANAP__Conn__Ind_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 @RAN_Emulation.RANAP_Conn_Ind."); } } void RANAP__Conn__Ind_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: { RANAP__Conn__Ind_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_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) addr__peer().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) addr__own().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ranap().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_peer")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__peer().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "addr_own")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { addr__own().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ranap")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ranap().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @RAN_Emulation.RANAP_Conn_Ind: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { RANAP__Conn__Ind_template* precondition = new RANAP__Conn__Ind_template; precondition->set_param(*param.get_elem(0)); RANAP__Conn__Ind_template* implied_template = new RANAP__Conn__Ind_template; implied_template->set_param(*param.get_elem(1)); *this = RANAP__Conn__Ind_template(precondition, implied_template); } break; default: param.type_error("record template", "@RAN_Emulation.RANAP_Conn_Ind"); } is_ifpresent = param.get_ifpresent(); } void RANAP__Conn__Ind_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_addr__peer.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Ind"); single_value->field_addr__own.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Ind"); single_value->field_ranap.check_restriction(t_res, t_name ? t_name : "@RAN_Emulation.RANAP_Conn_Ind"); 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 : "@RAN_Emulation.RANAP_Conn_Ind"); } boolean RANAP__Conn__Ind_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean RANAP__Conn__Ind_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_idxnext_item = NULL; if (proc_queue_tail != NULL) proc_queue_tail->next_item = new_item; else proc_queue_head = new_item; proc_queue_tail = new_item; } void RAN__PROC__PT::remove_proc_queue_head() { switch (proc_queue_head->item_selection) { case CALL_0: delete proc_queue_head->call_0; break; case CALL_1: delete proc_queue_head->call_1; break; case CALL_2: delete proc_queue_head->call_2; break; case CALL_3: delete proc_queue_head->call_3; break; case CALL_4: delete proc_queue_head->call_4; break; case CALL_5: delete proc_queue_head->call_5; break; case CALL_6: delete proc_queue_head->call_6; break; case CALL_7: delete proc_queue_head->call_7; break; case REPLY_0: delete proc_queue_head->reply_0; break; case REPLY_1: delete proc_queue_head->reply_1; break; case REPLY_2: delete proc_queue_head->reply_2; break; case REPLY_3: delete proc_queue_head->reply_3; break; case REPLY_4: delete proc_queue_head->reply_4; break; case REPLY_5: delete proc_queue_head->reply_5; break; case REPLY_6: delete proc_queue_head->reply_6; break; case REPLY_7: delete proc_queue_head->reply_7; break; default: TTCN_error("Internal error: Invalid signature selector in the queue of port %s.", port_name); } proc_queue_item *next_item = proc_queue_head->next_item; delete proc_queue_head; proc_queue_head = next_item; if (next_item == NULL) proc_queue_tail = NULL; TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::extract__op, port_name, 0, ++proc_head_count, CHARSTRING(0,NULL), CHARSTRING(0,NULL));} void RAN__PROC__PT::clear_queue() { while (proc_queue_head != NULL) remove_proc_queue_head(); } RAN__PROC__PT::RAN__PROC__PT(const char *par_port_name) : PORT(par_port_name) { proc_queue_head = NULL; proc_queue_tail = NULL; } RAN__PROC__PT::~RAN__PROC__PT() { clear_queue(); } void RAN__PROC__PT::call(const RAN__register_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__register_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__register_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register"); const RAN__register_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__imsi_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__register__imsi_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_imsi"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__register__imsi_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__imsi_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_imsi"); const RAN__register__imsi_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__unregister__imsi_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__unregister__imsi_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_unregister_imsi"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__unregister__imsi_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__unregister__imsi_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_unregister_imsi"); const RAN__unregister__imsi_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__n__connect_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__register__n__connect_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_n_connect"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__register__n__connect_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__n__connect_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_n_connect"); const RAN__register__n__connect_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__sccp__cr__without__payload_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__register__sccp__cr__without__payload_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_sccp_cr_without_payload"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__register__sccp__cr__without__payload_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__sccp__cr__without__payload_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_sccp_cr_without_payload"); const RAN__register__sccp__cr__without__payload_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__last__n__sd_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__last__n__sd_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_last_n_sd"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__last__n__sd_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__last__n__sd_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_last_n_sd"); const RAN__last__n__sd_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__continue__after__n__sd_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__continue__after__n__sd_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_continue_after_n_sd"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__continue__after__n__sd_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__continue__after__n__sd_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_continue_after_n_sd"); const RAN__continue__after__n__sd_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__IuSigConId_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of call operation."); const RAN__register__IuSigConId_call& call_tmp = call_template.create_call(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name,TitanLoggerApiSimple::Port__oper::call__op, destination_component, CHARSTRING(0,NULL),(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send call to system.", port_name); else { Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_IuSigConId"); call_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::call(const RAN__register__IuSigConId_template& call_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) call(call_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::call(const RAN__register__IuSigConId_template& call_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Calling a signature on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_call(text_buf, "@RAN_Emulation.RAN_register_IuSigConId"); const RAN__register__IuSigConId_call& call_tmp = call_template.create_call(); call_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_CALL, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), call_tmp.log(), TTCN_Logger::end_event_log2str())); } else call(call_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__register_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__register_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register"); const RAN__register_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__imsi_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__register__imsi_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_imsi"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__register__imsi_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__imsi_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_imsi"); const RAN__register__imsi_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__unregister__imsi_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__unregister__imsi_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_unregister_imsi"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__unregister__imsi_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__unregister__imsi_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_unregister_imsi"); const RAN__unregister__imsi_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__n__connect_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__register__n__connect_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_n_connect"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__register__n__connect_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__n__connect_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_n_connect"); const RAN__register__n__connect_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__sccp__cr__without__payload_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__register__sccp__cr__without__payload_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_sccp_cr_without_payload"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__register__sccp__cr__without__payload_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__sccp__cr__without__payload_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_sccp_cr_without_payload"); const RAN__register__sccp__cr__without__payload_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__last__n__sd_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__last__n__sd_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_last_n_sd"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__last__n__sd_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__last__n__sd_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_last_n_sd"); const RAN__last__n__sd_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__continue__after__n__sd_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__continue__after__n__sd_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_continue_after_n_sd"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__continue__after__n__sd_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__continue__after__n__sd_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_continue_after_n_sd"); const RAN__continue__after__n__sd_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__IuSigConId_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect) { if (!is_started) TTCN_error("Replying to a signature on port %s, which is not started.", port_name); if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of reply operation."); const RAN__register__IuSigConId_reply& reply_tmp = reply_template.create_reply(); const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMOUT:TTCN_Logger::PORTEVENT_PCOUT; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_send(port_name, TitanLoggerApiSimple::Port__oper::reply__op, destination_component, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PMOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } if (destination_component == SYSTEM_COMPREF) TTCN_error("Internal port %s cannot send reply to system.", port_name); else { Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_IuSigConId"); reply_tmp.encode_text(text_buf); send_data(text_buf, destination_component); } } void RAN__PROC__PT::reply(const RAN__register__IuSigConId_template& reply_template, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect) { for (size_t i = 0; i < nof_components; ++i) reply(reply_template, destination_components[i], timestamp_redirect); } void RAN__PROC__PT::reply(const RAN__register__IuSigConId_template& reply_template, boolean broadcast, FLOAT* timestamp_redirect) { if (broadcast) { if (!is_started) TTCN_error("Replying to a call on port %s, which is not started.", port_name); Text_Buf text_buf; prepare_reply(text_buf, "@RAN_Emulation.RAN_register_IuSigConId"); const RAN__register__IuSigConId_reply& reply_tmp = reply_template.create_reply(); reply_tmp.encode_text(text_buf); send_data_broadcast(text_buf, PORT::OMT_REPLY, (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PCOUT, TRUE), reply_tmp.log(), TTCN_Logger::end_event_log2str())); } else reply(reply_template, COMPONENT(get_default_destination()), timestamp_redirect); } alt_status RAN__PROC__PT::getcall(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else switch (proc_queue_head->item_selection) { case CALL_0: case CALL_1: case CALL_2: case CALL_3: case CALL_4: case CALL_5: case CALL_6: case CALL_7: { if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, CHARSTRING(0, NULL), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } default: TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: First entity in the queue is not a call.", port_name); return ALT_NO; } } alt_status RAN__PROC__PT::check_getcall(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else switch (proc_queue_head->item_selection) { case CALL_0: case CALL_1: case CALL_2: case CALL_3: case CALL_4: case CALL_5: case CALL_6: case CALL_7: { if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, CHARSTRING(0, NULL), msg_head_count+1); } return ALT_YES; } default: TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: First entity in the queue is not a call.", port_name); return ALT_NO; } } alt_status RAN__PROC__PT::getcall(const RAN__register_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_0) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_0)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_0); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_0); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__register_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_0) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_0)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_0); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_0); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__register__imsi_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__imsi_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_1) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_imsi.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_1)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_1); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_1); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__register__imsi_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__imsi_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_1) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_imsi.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_1)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_1); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_1); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__unregister__imsi_template& getcall_template, const COMPONENT_template& sender_template, const RAN__unregister__imsi_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_2) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_unregister_imsi.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_2)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_2); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_2); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__unregister__imsi_template& getcall_template, const COMPONENT_template& sender_template, const RAN__unregister__imsi_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_2) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_unregister_imsi.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_2)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_2); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_2); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__register__n__connect_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__n__connect_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_3) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_n_connect.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_3)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_3); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_3); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__register__n__connect_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__n__connect_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_3) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_n_connect.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_3)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_3); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_3); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__register__sccp__cr__without__payload_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__sccp__cr__without__payload_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_4) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_sccp_cr_without_payload.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_4)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_4); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_4); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__register__sccp__cr__without__payload_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__sccp__cr__without__payload_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_4) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_sccp_cr_without_payload.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_4)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_4); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_4); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__last__n__sd_template& getcall_template, const COMPONENT_template& sender_template, const RAN__last__n__sd_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_5) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_last_n_sd.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_5)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_5); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_5); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__last__n__sd_template& getcall_template, const COMPONENT_template& sender_template, const RAN__last__n__sd_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_5) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_last_n_sd.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_5)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_5); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_5); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__continue__after__n__sd_template& getcall_template, const COMPONENT_template& sender_template, const RAN__continue__after__n__sd_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_6) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_continue_after_n_sd.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_6)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_6); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_6); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__continue__after__n__sd_template& getcall_template, const COMPONENT_template& sender_template, const RAN__continue__after__n__sd_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_6) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_continue_after_n_sd.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_6)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_6); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_6); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getcall(const RAN__register__IuSigConId_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__IuSigConId_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_7) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_IuSigConId.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_7)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_7); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_7); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getcall(const RAN__register__IuSigConId_template& getcall_template, const COMPONENT_template& sender_template, const RAN__register__IuSigConId_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::sender__does__not__match__from__clause, (TTCN_Logger::begin_event(log_sev, TRUE), sender_template.log_match(proc_queue_head->sender_component), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else if (proc_queue_head->item_selection != CALL_7) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a call for signature @RAN_Emulation.RAN_register_IuSigConId.", port_name); return ALT_NO; } else if (!getcall_template.match_call(*proc_queue_head->call_7)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__call__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getcall_template.log_match_call(*proc_queue_head->call_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->call_7); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getcall_template.log_match_call(*proc_queue_head->call_7); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::call__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->call_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else switch (proc_queue_head->item_selection) { case REPLY_0: case REPLY_1: case REPLY_2: case REPLY_3: case REPLY_4: case REPLY_5: case REPLY_6: case REPLY_7: { if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, CHARSTRING(0, NULL), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } default: TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: First entity in the queue is not a reply.", port_name); return ALT_NO; } } alt_status RAN__PROC__PT::check_getreply(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else switch (proc_queue_head->item_selection) { case REPLY_0: case REPLY_1: case REPLY_2: case REPLY_3: case REPLY_4: case REPLY_5: case REPLY_6: case REPLY_7: { if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS, "Matching on port %s succeeded.", port_name); const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, CHARSTRING(0, NULL), msg_head_count+1); } return ALT_YES; } default: TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: First entity in the queue is not a reply.", port_name); return ALT_NO; } } alt_status RAN__PROC__PT::getreply(const RAN__register_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_0) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_0)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_0); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_0); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__register_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_0) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_0)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_0), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_0); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_0); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__register__imsi_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__imsi_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_1) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_imsi.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_1)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_1); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_1); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__register__imsi_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__imsi_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_1) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_imsi.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_1)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_1), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_1); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_1); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__unregister__imsi_template& getreply_template, const COMPONENT_template& sender_template, const RAN__unregister__imsi_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_2) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_unregister_imsi.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_2)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_2); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_2); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__unregister__imsi_template& getreply_template, const COMPONENT_template& sender_template, const RAN__unregister__imsi_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_2) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_unregister_imsi.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_2)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_2), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_2); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_2); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__register__n__connect_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__n__connect_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_3) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_n_connect.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_3)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_3); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_3); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__register__n__connect_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__n__connect_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_3) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_n_connect.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_3)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_3), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_3); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_3); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__register__sccp__cr__without__payload_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__sccp__cr__without__payload_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_4) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_sccp_cr_without_payload.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_4)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_4); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_4); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__register__sccp__cr__without__payload_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__sccp__cr__without__payload_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_4) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_sccp_cr_without_payload.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_4)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_4), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_4); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_4); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__last__n__sd_template& getreply_template, const COMPONENT_template& sender_template, const RAN__last__n__sd_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_5) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_last_n_sd.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_5)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_5); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_5); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__last__n__sd_template& getreply_template, const COMPONENT_template& sender_template, const RAN__last__n__sd_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_5) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_last_n_sd.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_5)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_5), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_5); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_5); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__continue__after__n__sd_template& getreply_template, const COMPONENT_template& sender_template, const RAN__continue__after__n__sd_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_6) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_continue_after_n_sd.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_6)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_6); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_6); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__continue__after__n__sd_template& getreply_template, const COMPONENT_template& sender_template, const RAN__continue__after__n__sd_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_6) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_continue_after_n_sd.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_6)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_6), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_6); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_6); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } alt_status RAN__PROC__PT::getreply(const RAN__register__IuSigConId_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__IuSigConId_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_7) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_IuSigConId.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_7)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_7); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_7); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, FALSE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } remove_proc_queue_head(); return ALT_YES; } } alt_status RAN__PROC__PT::check_getreply(const RAN__register__IuSigConId_template& getreply_template, const COMPONENT_template& sender_template, const RAN__register__IuSigConId_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*) { if (proc_queue_head == NULL) { if (is_started) return ALT_MAYBE; else { TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name); return ALT_NO; } } else if (!sender_template.match(proc_queue_head->sender_component)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s failed: Sender of the first entity in the queue does not match the from clause: ", port_name); sender_template.log_match(proc_queue_head->sender_component); TTCN_Logger::end_event(); } return ALT_NO; } else if (proc_queue_head->item_selection != REPLY_7) { TTCN_Logger::log(proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMUNSUCC:TTCN_Logger::MATCHING_PCUNSUCC, "Matching on port %s failed: The first entity in the queue is not a reply for signature @RAN_Emulation.RAN_register_IuSigConId.", port_name); return ALT_NO; } else if (!getreply_template.match_reply(*proc_queue_head->reply_7)) { const TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_PMUNSUCC : TTCN_Logger::MATCHING_PCUNSUCC; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::procedure__, port_name, proc_queue_head->sender_component, TitanLoggerApiSimple::MatchingFailureType_reason::parameters__of__reply__do__not__match__template, (TTCN_Logger::begin_event(log_sev, TRUE), getreply_template.log_match_reply(*proc_queue_head->reply_7), TTCN_Logger::end_event_log2str())); } return ALT_NO; } else { param_ref.set_parameters(*proc_queue_head->reply_7); if (sender_ptr != NULL) *sender_ptr = proc_queue_head->sender_component; TTCN_Logger::Severity log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_PMSUCCESS:TTCN_Logger::MATCHING_PCSUCCESS; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::begin_event(log_sev); TTCN_Logger::log_event("Matching on port %s succeeded: ", port_name); getreply_template.log_match_reply(*proc_queue_head->reply_7); TTCN_Logger::end_event(); } log_sev = proc_queue_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_PMIN:TTCN_Logger::PORTEVENT_PCIN; if (TTCN_Logger::log_this_event(log_sev)) { TTCN_Logger::log_procport_recv(port_name, TitanLoggerApiSimple::Port__oper::reply__op, proc_queue_head->sender_component, TRUE, (TTCN_Logger::begin_event(log_sev, TRUE), proc_queue_head->reply_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1); } return ALT_YES; } } void RAN__PROC__PT::incoming_call(const RAN__register_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_0; new_item->call_0 = new RAN__register_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__register__imsi_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_1; new_item->call_1 = new RAN__register__imsi_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__unregister__imsi_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_2; new_item->call_2 = new RAN__unregister__imsi_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__register__n__connect_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_3; new_item->call_3 = new RAN__register__n__connect_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__register__sccp__cr__without__payload_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_4; new_item->call_4 = new RAN__register__sccp__cr__without__payload_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__last__n__sd_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_5; new_item->call_5 = new RAN__last__n__sd_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__continue__after__n__sd_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_6; new_item->call_6 = new RAN__continue__after__n__sd_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_call(const RAN__register__IuSigConId_call& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A call that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a call has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__call, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = CALL_7; new_item->call_7 = new RAN__register__IuSigConId_call(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__register_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_0; new_item->reply_0 = new RAN__register_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__register__imsi_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_1; new_item->reply_1 = new RAN__register__imsi_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__unregister__imsi_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_2; new_item->reply_2 = new RAN__unregister__imsi_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__register__n__connect_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_3; new_item->reply_3 = new RAN__register__n__connect_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__register__sccp__cr__without__payload_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_4; new_item->reply_4 = new RAN__register__sccp__cr__without__payload_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__last__n__sd_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_5; new_item->reply_5 = new RAN__last__n__sd_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__continue__after__n__sd_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_6; new_item->reply_6 = new RAN__continue__after__n__sd_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } void RAN__PROC__PT::incoming_reply(const RAN__register__IuSigConId_reply& incoming_par, component sender_component) { if (!is_started) { if (is_halted) { TTCN_warning("A reply that arrived on port %s has been discarded, because the port is not started.", port_name); return; } else { TTCN_error("Port %s is not started but a reply has arrived on it.", port_name); } } proc_tail_count++; if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_PQUEUE)) { TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__reply, port_name, sender_component, proc_tail_count, CHARSTRING(0, NULL), (TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_PQUEUE, TRUE), TTCN_Logger::log_char(' '), incoming_par.log(), TTCN_Logger::end_event_log2str())); } proc_queue_item *new_item = new proc_queue_item; new_item->item_selection = REPLY_7; new_item->reply_7 = new RAN__register__IuSigConId_reply(incoming_par); new_item->sender_component = sender_component; append_to_proc_queue(new_item); } boolean RAN__PROC__PT::process_call(const char *signature_name, Text_Buf& incoming_buf, component sender_component) { if (!strcmp(signature_name, "@RAN_Emulation.RAN_register")) { RAN__register_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_imsi")) { RAN__register__imsi_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_unregister_imsi")) { RAN__unregister__imsi_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_n_connect")) { RAN__register__n__connect_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_sccp_cr_without_payload")) { RAN__register__sccp__cr__without__payload_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_last_n_sd")) { RAN__last__n__sd_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_continue_after_n_sd")) { RAN__continue__after__n__sd_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_IuSigConId")) { RAN__register__IuSigConId_call incoming_par; incoming_par.decode_text(incoming_buf); incoming_call(incoming_par, sender_component); return TRUE; } else return FALSE; } boolean RAN__PROC__PT::process_reply(const char *signature_name, Text_Buf& incoming_buf, component sender_component) { if (!strcmp(signature_name, "@RAN_Emulation.RAN_register")) { RAN__register_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_imsi")) { RAN__register__imsi_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_unregister_imsi")) { RAN__unregister__imsi_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_n_connect")) { RAN__register__n__connect_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_sccp_cr_without_payload")) { RAN__register__sccp__cr__without__payload_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_last_n_sd")) { RAN__last__n__sd_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_continue_after_n_sd")) { RAN__continue__after__n__sd_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else if (!strcmp(signature_name, "@RAN_Emulation.RAN_register_IuSigConId")) { RAN__register__IuSigConId_reply incoming_par; incoming_par.decode_text(incoming_buf); incoming_reply(incoming_par, sender_component); return TRUE; } else return FALSE; } void RAN__register__IuSigConId_call::encode_text(Text_Buf& text_buf) const { param_sigc__id.encode_text(text_buf); param_hdlr.encode_text(text_buf); } void RAN__register__IuSigConId_call::decode_text(Text_Buf& text_buf) { param_sigc__id.decode_text(text_buf); param_hdlr.decode_text(text_buf); } void RAN__register__IuSigConId_call::log() const { TTCN_Logger::log_event_str("@RAN_Emulation.RAN_register_IuSigConId : { "); TTCN_Logger::log_event_str("sigc_id := "); param_sigc__id.log(); TTCN_Logger::log_event_str(", hdlr := "); param_hdlr.log(); TTCN_Logger::log_event_str(" }"); } void RAN__register__IuSigConId_call_redirect::set_parameters(const RAN__register__IuSigConId_call& call_par) const { if (ptr_sigc__id != NULL) *ptr_sigc__id = call_par.sigc__id(); if (ptr_hdlr != NULL) *ptr_hdlr = call_par.hdlr(); } void RAN__register__IuSigConId_reply::log() const { TTCN_Logger::log_event_str("@RAN_Emulation.RAN_register_IuSigConId : { }"); } RAN__register__IuSigConId_template::RAN__register__IuSigConId_template() : param_sigc__id(ANY_VALUE), param_hdlr(ANY_VALUE) { } RAN__register__IuSigConId_call RAN__register__IuSigConId_template::create_call() const { RAN__register__IuSigConId_call ret_val; ret_val.sigc__id() = param_sigc__id.valueof(); ret_val.hdlr() = param_hdlr.valueof(); return ret_val; } boolean RAN__register__IuSigConId_template::match_call(const RAN__register__IuSigConId_call& match_value, boolean legacy) const { return param_sigc__id.match(match_value.sigc__id(), legacy) && param_hdlr.match(match_value.hdlr(), legacy); } void RAN__register__IuSigConId_template::log() const { TTCN_Logger::log_event_str("{ sigc_id := "); param_sigc__id.log(); TTCN_Logger::log_event_str(", hdlr := "); param_hdlr.log(); TTCN_Logger::log_event_str(" }"); } void RAN__register__IuSigConId_template::log_match_call(const RAN__register__IuSigConId_call& match_value, boolean legacy) const { TTCN_Logger::log_event_str("{ sigc_id := "); param_sigc__id.log_match(match_value.sigc__id(), legacy); TTCN_Logger::log_event_str(", hdlr := "); param_hdlr.log_match(match_value.hdlr(), legacy); TTCN_Logger::log_event_str(" }"); } void RAN__register__IuSigConId_template::log_match_reply(const RAN__register__IuSigConId_reply& , boolean) const { TTCN_Logger::log_event_str("{ } with { } matched"); } void RAN__register__IuSigConId_template::encode_text(Text_Buf& text_buf) const { param_sigc__id.encode_text(text_buf); param_hdlr.encode_text(text_buf); } void RAN__register__IuSigConId_template::decode_text(Text_Buf& text_buf) { param_sigc__id.decode_text(text_buf); param_hdlr.decode_text(text_buf); } as__iu__release__compl__disc_Default::as__iu__release__compl__disc_Default() : Default_Base("as_iu_release_compl_disc") { } alt_status as__iu__release__compl__disc_Default::call_altstep(boolean first_alt_run) { return as__iu__release__compl__disc_instance(first_alt_run); } /* Bodies of functions, altsteps and testcases */ boolean operator==(null_type, const MSC__CONN__PRIM__CONNECT__RES& other_value) { other_value.must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONNECT_RES."); return TRUE; } boolean operator==(null_type, const MSC__CONN__PRIM__DISC__IND& other_value) { other_value.must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_DISC_IND."); return TRUE; } boolean operator==(null_type, const MSC__CONN__PRIM__CONF__IND& other_value) { other_value.must_bound("Comparison of an unbound value of type @RAN_Emulation.MSC_CONN_PRIM_CONF_IND."); return TRUE; } RAN__Conn__Prim_template ts__MSC__CONN__PRIM__DISC__REQ(const INTEGER_template& reason) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 117, TTCN_Location::LOCATION_TEMPLATE, "ts_MSC_CONN_PRIM_DISC_REQ"); RAN__Conn__Prim_template ret_val; ret_val.disc__req().reason() = reason; return ret_val; } PDU__DTAP__MT_template ts__PDU__DTAP__MT(const MobileL3__Types::PDU__ML3__NW__MS_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 160, TTCN_Location::LOCATION_TEMPLATE, "ts_PDU_DTAP_MT"); PDU__DTAP__MT_template ret_val; ret_val.dlci() = dlci; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__MO_template ts__PDU__DTAP__MO(const MobileL3__Types::PDU__ML3__MS__NW_template& dtap, const OCTETSTRING_template& dlci, const BOOLEAN& skip__seq__patching) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 165, TTCN_Location::LOCATION_TEMPLATE, "ts_PDU_DTAP_MO"); PDU__DTAP__MO_template ret_val; ret_val.dlci() = dlci; ret_val.skip__seq__patching() = skip__seq__patching; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__MT_template tr__PDU__DTAP__MT(const MobileL3__Types::PDU__ML3__NW__MS_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 171, TTCN_Location::LOCATION_TEMPLATE, "tr_PDU_DTAP_MT"); PDU__DTAP__MT_template ret_val; ret_val.dlci() = dlci; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__MO_template tr__PDU__DTAP__MO(const MobileL3__Types::PDU__ML3__MS__NW_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 176, TTCN_Location::LOCATION_TEMPLATE, "tr_PDU_DTAP_MO"); PDU__DTAP__MO_template ret_val; ret_val.dlci() = dlci; ret_val.skip__seq__patching() = ANY_VALUE; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__PS__MT_template ts__PDU__DTAP__PS__MT(const MobileL3__Types::PDU__L3__SGSN__MS_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 182, TTCN_Location::LOCATION_TEMPLATE, "ts_PDU_DTAP_PS_MT"); PDU__DTAP__PS__MT_template ret_val; ret_val.dlci() = dlci; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__PS__MO_template ts__PDU__DTAP__PS__MO(const MobileL3__Types::PDU__L3__MS__SGSN_template& dtap, const OCTETSTRING_template& dlci, const BOOLEAN& skip__seq__patching) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 187, TTCN_Location::LOCATION_TEMPLATE, "ts_PDU_DTAP_PS_MO"); PDU__DTAP__PS__MO_template ret_val; ret_val.dlci() = dlci; ret_val.skip__seq__patching() = skip__seq__patching; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__PS__MT_template tr__PDU__DTAP__PS__MT(const MobileL3__Types::PDU__L3__SGSN__MS_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 194, TTCN_Location::LOCATION_TEMPLATE, "tr_PDU_DTAP_PS_MT"); PDU__DTAP__PS__MT_template ret_val; ret_val.dlci() = dlci; ret_val.dtap() = dtap; return ret_val; } PDU__DTAP__PS__MO_template tr__PDU__DTAP__PS__MO(const MobileL3__Types::PDU__L3__MS__SGSN_template& dtap, const OCTETSTRING_template& dlci) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 199, TTCN_Location::LOCATION_TEMPLATE, "tr_PDU_DTAP_PS_MO"); PDU__DTAP__PS__MO_template ret_val; ret_val.dlci() = dlci; ret_val.skip__seq__patching() = ANY_VALUE; ret_val.dtap() = dtap; return ret_val; } BOOLEAN f__conn__id__known(const INTEGER& sccp__conn__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 302, TTCN_Location::LOCATION_FUNCTION, "f_conn_id_known"); current_location.update_lineno(304); /* RAN_Emulation.ttcnpp, line 304 */ INTEGER i; current_location.update_lineno(305); /* RAN_Emulation.ttcnpp, line 305 */ i = 0; current_location.update_lineno(305); /* RAN_Emulation.ttcnpp, line 305 */ for ( ; ; ) { current_location.update_lineno(305); /* RAN_Emulation.ttcnpp, line 305 */ if (!(i < 16)) break; current_location.update_lineno(306); /* RAN_Emulation.ttcnpp, line 306 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].sccp__conn__id() == sccp__conn__id)) { current_location.update_lineno(307); /* RAN_Emulation.ttcnpp, line 307 */ return TRUE; } current_location.update_lineno(305); /* RAN_Emulation.ttcnpp, line 305 */ { INTEGER tmp_1; ++i; } } current_location.update_lineno(310); /* RAN_Emulation.ttcnpp, line 310 */ return FALSE; } void start_f__conn__id__known(const COMPONENT& component_reference, const INTEGER& sccp__conn__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_id_known("); sccp__conn__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, "RAN_Emulation", "f_conn_id_known", text_buf); sccp__conn__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } BOOLEAN f__comp__known(const COMPONENT& client) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 313, TTCN_Location::LOCATION_FUNCTION, "f_comp_known"); current_location.update_lineno(315); /* RAN_Emulation.ttcnpp, line 315 */ INTEGER i; current_location.update_lineno(316); /* RAN_Emulation.ttcnpp, line 316 */ i = 0; current_location.update_lineno(316); /* RAN_Emulation.ttcnpp, line 316 */ for ( ; ; ) { current_location.update_lineno(316); /* RAN_Emulation.ttcnpp, line 316 */ if (!(i < 16)) break; current_location.update_lineno(317); /* RAN_Emulation.ttcnpp, line 317 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref() == client)) { current_location.update_lineno(318); /* RAN_Emulation.ttcnpp, line 318 */ return TRUE; } current_location.update_lineno(316); /* RAN_Emulation.ttcnpp, line 316 */ { INTEGER tmp_3; ++i; } } current_location.update_lineno(321); /* RAN_Emulation.ttcnpp, line 321 */ return FALSE; } void start_f__comp__known(const COMPONENT& component_reference, const COMPONENT& client) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_known("); client.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, "RAN_Emulation", "f_comp_known", text_buf); client.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } BOOLEAN f__cic__known(const INTEGER& cic) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 324, TTCN_Location::LOCATION_FUNCTION, "f_cic_known"); current_location.update_lineno(326); /* RAN_Emulation.ttcnpp, line 326 */ INTEGER i; current_location.update_lineno(327); /* RAN_Emulation.ttcnpp, line 327 */ i = 0; current_location.update_lineno(327); /* RAN_Emulation.ttcnpp, line 327 */ for ( ; ; ) { current_location.update_lineno(327); /* RAN_Emulation.ttcnpp, line 327 */ if (!(i < 16)) break; current_location.update_lineno(328); /* RAN_Emulation.ttcnpp, line 328 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].cic() == cic)) { current_location.update_lineno(329); /* RAN_Emulation.ttcnpp, line 329 */ return TRUE; } current_location.update_lineno(327); /* RAN_Emulation.ttcnpp, line 327 */ { INTEGER tmp_5; ++i; } } current_location.update_lineno(332); /* RAN_Emulation.ttcnpp, line 332 */ return FALSE; } void start_f__cic__known(const COMPONENT& component_reference, const INTEGER& cic) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_cic_known("); cic.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, "RAN_Emulation", "f_cic_known", text_buf); cic.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } COMPONENT f__comp__by__conn__id(const INTEGER& sccp__conn__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 336, TTCN_Location::LOCATION_FUNCTION, "f_comp_by_conn_id"); current_location.update_lineno(338); /* RAN_Emulation.ttcnpp, line 338 */ INTEGER i; current_location.update_lineno(339); /* RAN_Emulation.ttcnpp, line 339 */ i = 0; current_location.update_lineno(339); /* RAN_Emulation.ttcnpp, line 339 */ for ( ; ; ) { current_location.update_lineno(339); /* RAN_Emulation.ttcnpp, line 339 */ if (!(i < 16)) break; current_location.update_lineno(340); /* RAN_Emulation.ttcnpp, line 340 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].sccp__conn__id() == sccp__conn__id)) { current_location.update_lineno(341); /* RAN_Emulation.ttcnpp, line 341 */ return const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref(); } current_location.update_lineno(339); /* RAN_Emulation.ttcnpp, line 339 */ { INTEGER tmp_7; ++i; } } current_location.update_lineno(344); /* RAN_Emulation.ttcnpp, line 344 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table not found by SCCP Connection ID "),sccp__conn__id.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(345); /* RAN_Emulation.ttcnpp, line 345 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__comp__by__conn__id(const COMPONENT& component_reference, const INTEGER& sccp__conn__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_by_conn_id("); sccp__conn__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, "RAN_Emulation", "f_comp_by_conn_id", text_buf); sccp__conn__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } COMPONENT f__comp__by__cic(const INTEGER& cic) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 377, TTCN_Location::LOCATION_FUNCTION, "f_comp_by_cic"); current_location.update_lineno(379); /* RAN_Emulation.ttcnpp, line 379 */ INTEGER i; current_location.update_lineno(380); /* RAN_Emulation.ttcnpp, line 380 */ i = 0; current_location.update_lineno(380); /* RAN_Emulation.ttcnpp, line 380 */ for ( ; ; ) { current_location.update_lineno(380); /* RAN_Emulation.ttcnpp, line 380 */ if (!(i < 16)) break; current_location.update_lineno(381); /* RAN_Emulation.ttcnpp, line 381 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].cic() == cic)) { current_location.update_lineno(382); /* RAN_Emulation.ttcnpp, line 382 */ return const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref(); } current_location.update_lineno(380); /* RAN_Emulation.ttcnpp, line 380 */ { INTEGER tmp_9; ++i; } } current_location.update_lineno(385); /* RAN_Emulation.ttcnpp, line 385 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table not found by CIC "),cic.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(386); /* RAN_Emulation.ttcnpp, line 386 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__comp__by__cic(const COMPONENT& component_reference, const INTEGER& cic) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_by_cic("); cic.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, "RAN_Emulation", "f_comp_by_cic", text_buf); cic.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__comp__store__cic(const COMPONENT& client, const INTEGER& cic) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 389, TTCN_Location::LOCATION_FUNCTION, "f_comp_store_cic"); current_location.update_lineno(391); /* RAN_Emulation.ttcnpp, line 391 */ INTEGER i; current_location.update_lineno(392); /* RAN_Emulation.ttcnpp, line 392 */ i = 0; current_location.update_lineno(392); /* RAN_Emulation.ttcnpp, line 392 */ for ( ; ; ) { current_location.update_lineno(392); /* RAN_Emulation.ttcnpp, line 392 */ if (!(i < 16)) break; current_location.update_lineno(393); /* RAN_Emulation.ttcnpp, line 393 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref() == client)) { current_location.update_lineno(394); /* RAN_Emulation.ttcnpp, line 394 */ RAN__Emulation__CT_component_ConnectionTable[i].cic() = cic; current_location.update_lineno(395); /* RAN_Emulation.ttcnpp, line 395 */ return; } current_location.update_lineno(392); /* RAN_Emulation.ttcnpp, line 392 */ { INTEGER tmp_12; ++i; } } current_location.update_lineno(398); /* RAN_Emulation.ttcnpp, line 398 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table not found by component "),client.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(399); /* RAN_Emulation.ttcnpp, line 399 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__comp__store__cic(const COMPONENT& component_reference, const COMPONENT& client, const INTEGER& cic) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_store_cic("); client.log(); TTCN_Logger::log_event_str(", "); cic.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, "RAN_Emulation", "f_comp_store_cic", text_buf); client.encode_text(text_buf); cic.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } INTEGER f__conn__id__by__comp(const COMPONENT& client) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 403, TTCN_Location::LOCATION_FUNCTION, "f_conn_id_by_comp"); { current_location.update_lineno(405); /* RAN_Emulation.ttcnpp, line 405 */ INTEGER i(0); current_location.update_lineno(405); /* RAN_Emulation.ttcnpp, line 405 */ for ( ; ; ) { current_location.update_lineno(405); /* RAN_Emulation.ttcnpp, line 405 */ if (!(i < 16)) break; current_location.update_lineno(406); /* RAN_Emulation.ttcnpp, line 406 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref() == client)) { current_location.update_lineno(407); /* RAN_Emulation.ttcnpp, line 407 */ return const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].sccp__conn__id(); } current_location.update_lineno(405); /* RAN_Emulation.ttcnpp, line 405 */ { INTEGER tmp_13; ++i; } } } current_location.update_lineno(410); /* RAN_Emulation.ttcnpp, line 410 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table not found by component "),client.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(411); /* RAN_Emulation.ttcnpp, line 411 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__conn__id__by__comp(const COMPONENT& component_reference, const COMPONENT& client) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_id_by_comp("); client.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, "RAN_Emulation", "f_conn_id_by_comp", text_buf); client.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } INTEGER f__idx__by__comp(const COMPONENT& client) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 415, TTCN_Location::LOCATION_FUNCTION, "f_idx_by_comp"); { current_location.update_lineno(417); /* RAN_Emulation.ttcnpp, line 417 */ INTEGER i(0); current_location.update_lineno(417); /* RAN_Emulation.ttcnpp, line 417 */ for ( ; ; ) { current_location.update_lineno(417); /* RAN_Emulation.ttcnpp, line 417 */ if (!(i < 16)) break; current_location.update_lineno(418); /* RAN_Emulation.ttcnpp, line 418 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref() == client)) { current_location.update_lineno(419); /* RAN_Emulation.ttcnpp, line 419 */ return i; } current_location.update_lineno(417); /* RAN_Emulation.ttcnpp, line 417 */ { INTEGER tmp_14; ++i; } } } current_location.update_lineno(422); /* RAN_Emulation.ttcnpp, line 422 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table not found by component "),client.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(423); /* RAN_Emulation.ttcnpp, line 423 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__idx__by__comp(const COMPONENT& component_reference, const COMPONENT& client) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_idx_by_comp("); client.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, "RAN_Emulation", "f_idx_by_comp", text_buf); client.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } INTEGER f__gen__conn__id() { TTCN_Location current_location("RAN_Emulation.ttcnpp", 426, TTCN_Location::LOCATION_FUNCTION, "f_gen_conn_id"); current_location.update_lineno(428); /* RAN_Emulation.ttcnpp, line 428 */ INTEGER conn__id; for ( ; ; ) { current_location.update_lineno(431); /* RAN_Emulation.ttcnpp, line 431 */ conn__id = float2int((rnd() * SCCP__Emulation::tsp__max__ConnectionId)); current_location.update_lineno(432); /* RAN_Emulation.ttcnpp, line 432 */ if (!(f__conn__id__known(conn__id) == TRUE)) break; } current_location.update_lineno(434); /* RAN_Emulation.ttcnpp, line 434 */ return conn__id; } void start_f__gen__conn__id(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_gen_conn_id("); 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, "RAN_Emulation", "f_gen_conn_id", text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__conn__table__init() { TTCN_Location current_location("RAN_Emulation.ttcnpp", 437, TTCN_Location::LOCATION_FUNCTION, "f_conn_table_init"); { current_location.update_lineno(439); /* RAN_Emulation.ttcnpp, line 439 */ INTEGER i(0); current_location.update_lineno(439); /* RAN_Emulation.ttcnpp, line 439 */ for ( ; ; ) { current_location.update_lineno(439); /* RAN_Emulation.ttcnpp, line 439 */ if (!(i < 16)) break; current_location.update_lineno(440); /* RAN_Emulation.ttcnpp, line 440 */ RAN__Emulation__CT_component_ConnectionTable[i].comp__ref() = NULL_COMPREF; current_location.update_lineno(441); /* RAN_Emulation.ttcnpp, line 441 */ RAN__Emulation__CT_component_ConnectionTable[i].sccp__conn__id() = -1; current_location.update_lineno(445); /* RAN_Emulation.ttcnpp, line 445 */ RAN__Emulation__CT_component_ConnectionTable[i].cic() = OMIT_VALUE; current_location.update_lineno(446); /* RAN_Emulation.ttcnpp, line 446 */ { N__Sd__Array& tmp_20 = RAN__Emulation__CT_component_ConnectionTable[i].n__sd(); /* 7388 */ tmp_20[0] = 0; tmp_20[1] = 0; tmp_20[2] = 0; tmp_20[3] = 0; } current_location.update_lineno(439); /* RAN_Emulation.ttcnpp, line 439 */ { INTEGER tmp_21; ++i; } } } { current_location.update_lineno(448); /* RAN_Emulation.ttcnpp, line 448 */ INTEGER i(0); current_location.update_lineno(448); /* RAN_Emulation.ttcnpp, line 448 */ for ( ; ; ) { current_location.update_lineno(448); /* RAN_Emulation.ttcnpp, line 448 */ if (!(i < 16)) break; current_location.update_lineno(449); /* RAN_Emulation.ttcnpp, line 449 */ RAN__Emulation__CT_component_ImsiTable[i].comp__ref() = NULL_COMPREF; current_location.update_lineno(450); /* RAN_Emulation.ttcnpp, line 450 */ RAN__Emulation__CT_component_ImsiTable[i].imsi() = OMIT_VALUE; current_location.update_lineno(451); /* RAN_Emulation.ttcnpp, line 451 */ RAN__Emulation__CT_component_ImsiTable[i].tmsi() = os_1; current_location.update_lineno(448); /* RAN_Emulation.ttcnpp, line 448 */ { INTEGER tmp_25; ++i; } } } { current_location.update_lineno(454); /* RAN_Emulation.ttcnpp, line 454 */ INTEGER i(0); current_location.update_lineno(454); /* RAN_Emulation.ttcnpp, line 454 */ for ( ; ; ) { current_location.update_lineno(454); /* RAN_Emulation.ttcnpp, line 454 */ if (!(i < 16)) break; current_location.update_lineno(455); /* RAN_Emulation.ttcnpp, line 455 */ RAN__Emulation__CT_component_IuSigConIdTable[i].comp__ref() = NULL_COMPREF; current_location.update_lineno(456); /* RAN_Emulation.ttcnpp, line 456 */ RAN__Emulation__CT_component_IuSigConIdTable[i].sigc__id() = OMIT_VALUE; current_location.update_lineno(454); /* RAN_Emulation.ttcnpp, line 454 */ { INTEGER tmp_28; ++i; } } } } void start_f__conn__table__init(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_table_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, "RAN_Emulation", "f_conn_table_init", text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__conn__table__add(const COMPONENT& comp__ref, const INTEGER& sccp__conn__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 461, TTCN_Location::LOCATION_FUNCTION, "f_conn_table_add"); { current_location.update_lineno(463); /* RAN_Emulation.ttcnpp, line 463 */ INTEGER i(0); current_location.update_lineno(463); /* RAN_Emulation.ttcnpp, line 463 */ for ( ; ; ) { current_location.update_lineno(463); /* RAN_Emulation.ttcnpp, line 463 */ if (!(i < 16)) break; current_location.update_lineno(464); /* RAN_Emulation.ttcnpp, line 464 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].sccp__conn__id() == -1)) { current_location.update_lineno(465); /* RAN_Emulation.ttcnpp, line 465 */ RAN__Emulation__CT_component_ConnectionTable[i].comp__ref() = comp__ref; current_location.update_lineno(466); /* RAN_Emulation.ttcnpp, line 466 */ RAN__Emulation__CT_component_ConnectionTable[i].sccp__conn__id() = sccp__conn__id; current_location.update_lineno(467); /* RAN_Emulation.ttcnpp, line 467 */ { N__Sd__Array& tmp_32 = RAN__Emulation__CT_component_ConnectionTable[i].n__sd(); /* 7388 */ tmp_32[0] = 0; tmp_32[1] = 0; tmp_32[2] = 0; tmp_32[3] = 0; } current_location.update_lineno(468); /* RAN_Emulation.ttcnpp, line 468 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Added conn table entry "); i.log(); comp__ref.log(); sccp__conn__id.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(469); /* RAN_Emulation.ttcnpp, line 469 */ return; } current_location.update_lineno(463); /* RAN_Emulation.ttcnpp, line 463 */ { INTEGER tmp_33; ++i; } } } current_location.update_lineno(472); /* RAN_Emulation.ttcnpp, line 472 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table full!"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(473); /* RAN_Emulation.ttcnpp, line 473 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__conn__table__add(const COMPONENT& component_reference, const COMPONENT& comp__ref, const INTEGER& sccp__conn__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_table_add("); comp__ref.log(); TTCN_Logger::log_event_str(", "); sccp__conn__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, "RAN_Emulation", "f_conn_table_add", text_buf); comp__ref.encode_text(text_buf); sccp__conn__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__conn__table__del(const INTEGER& sccp__conn__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 476, TTCN_Location::LOCATION_FUNCTION, "f_conn_table_del"); { current_location.update_lineno(478); /* RAN_Emulation.ttcnpp, line 478 */ INTEGER i(0); current_location.update_lineno(478); /* RAN_Emulation.ttcnpp, line 478 */ for ( ; ; ) { current_location.update_lineno(478); /* RAN_Emulation.ttcnpp, line 478 */ if (!(i < 16)) break; current_location.update_lineno(479); /* RAN_Emulation.ttcnpp, line 479 */ if ((const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].sccp__conn__id() == sccp__conn__id)) { current_location.update_lineno(480); /* RAN_Emulation.ttcnpp, line 480 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Deleted conn table entry "); i.log(); const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[i].comp__ref().log(); sccp__conn__id.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(482); /* RAN_Emulation.ttcnpp, line 482 */ RAN__Emulation__CT_component_ConnectionTable[i].sccp__conn__id() = -1; current_location.update_lineno(483); /* RAN_Emulation.ttcnpp, line 483 */ RAN__Emulation__CT_component_ConnectionTable[i].comp__ref() = NULL_COMPREF; current_location.update_lineno(484); /* RAN_Emulation.ttcnpp, line 484 */ return; } current_location.update_lineno(478); /* RAN_Emulation.ttcnpp, line 478 */ { INTEGER tmp_36; ++i; } } } current_location.update_lineno(487); /* RAN_Emulation.ttcnpp, line 487 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RAN Connection table attempt to delete non-existant "),sccp__conn__id.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(488); /* RAN_Emulation.ttcnpp, line 488 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__conn__table__del(const COMPONENT& component_reference, const INTEGER& sccp__conn__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_table_del("); sccp__conn__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, "RAN_Emulation", "f_conn_table_del", text_buf); sccp__conn__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } COMPONENT f__imsi__table__find(const HEXSTRING& imsi, const OCTETSTRING_template& tmsi) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 491, TTCN_Location::LOCATION_FUNCTION, "f_imsi_table_find"); { current_location.update_lineno(493); /* RAN_Emulation.ttcnpp, line 493 */ INTEGER i(0); current_location.update_lineno(493); /* RAN_Emulation.ttcnpp, line 493 */ for ( ; ; ) { current_location.update_lineno(493); /* RAN_Emulation.ttcnpp, line 493 */ if (!(i < 16)) break; current_location.update_lineno(494); /* RAN_Emulation.ttcnpp, line 494 */ { boolean tmp_37; tmp_37 = (const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ImsiTable)[i].imsi() == imsi); if (!tmp_37) { boolean tmp_38; tmp_38 = tmsi.is_value(); if (tmp_38) tmp_38 = tmsi.match(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ImsiTable)[i].tmsi()); tmp_37 = tmp_38; } if (tmp_37) { current_location.update_lineno(496); /* RAN_Emulation.ttcnpp, line 496 */ return const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ImsiTable)[i].comp__ref(); } } current_location.update_lineno(493); /* RAN_Emulation.ttcnpp, line 493 */ { INTEGER tmp_39; ++i; } } } current_location.update_lineno(499); /* RAN_Emulation.ttcnpp, line 499 */ return NULL_COMPREF; } void start_f__imsi__table__find(const COMPONENT& component_reference, const HEXSTRING& imsi, const OCTETSTRING_template& tmsi) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_imsi_table_find("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi.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, "RAN_Emulation", "f_imsi_table_find", text_buf); imsi.encode_text(text_buf); tmsi.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } RANAP__Conn__Req_template ts__RANAP__Conn__Req(const SCCPasp__Types::SCCP__PAR__Address& peer, const SCCPasp__Types::SCCP__PAR__Address& own, const RANAP__PDU__Descriptions::RANAP__PDU_template& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 632, TTCN_Location::LOCATION_TEMPLATE, "ts_RANAP_Conn_Req"); RANAP__Conn__Req_template ret_val; ret_val.addr__peer() = peer; ret_val.addr__own() = own; ret_val.ranap() = ranap; return ret_val; } RANAP__Conn__Req_template tr__RANAP__Conn__Req(const SCCPasp__Types::SCCP__PAR__Address_template& peer, const SCCPasp__Types::SCCP__PAR__Address_template& own, const RANAP__PDU__Descriptions::RANAP__PDU_template& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 639, TTCN_Location::LOCATION_TEMPLATE, "tr_RANAP_Conn_Req"); RANAP__Conn__Req_template ret_val; ret_val.addr__peer() = peer; ret_val.addr__own() = own; ret_val.ranap() = ranap; return ret_val; } RANAP__Conn__Ind_template ts__RANAP__Conn__Ind(const SCCPasp__Types::SCCP__PAR__Address& peer, const SCCPasp__Types::SCCP__PAR__Address& own, const RANAP__PDU__Descriptions::RANAP__PDU_template& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 653, TTCN_Location::LOCATION_TEMPLATE, "ts_RANAP_Conn_Ind"); RANAP__Conn__Ind_template ret_val; ret_val.addr__peer() = peer; ret_val.addr__own() = own; ret_val.ranap() = ranap; return ret_val; } RANAP__Conn__Ind_template tr__RANAP__Conn__Ind(const SCCPasp__Types::SCCP__PAR__Address_template& peer, const SCCPasp__Types::SCCP__PAR__Address_template& own, const RANAP__PDU__Descriptions::RANAP__PDU_template& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 660, TTCN_Location::LOCATION_TEMPLATE, "tr_RANAP_Conn_Ind"); RANAP__Conn__Ind_template ret_val; ret_val.addr__peer() = peer; ret_val.addr__own() = own; ret_val.ranap() = ranap; return ret_val; } OCTETSTRING_template fake__dlci__from__sapi(const RANAP__IEs::SAPI_template& sapi) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 668, TTCN_Location::LOCATION_FUNCTION, "fake_dlci_from_sapi"); current_location.update_lineno(670); /* RAN_Emulation.ttcnpp, line 670 */ if (sapi.get_istemplate_kind((const char*)cs_0)) { current_location.update_lineno(671); /* RAN_Emulation.ttcnpp, line 671 */ return OCTETSTRING_template(OMIT_VALUE); } else { current_location.update_lineno(672); /* RAN_Emulation.ttcnpp, line 672 */ if ((sapi.valueof() == RANAP__IEs::SAPI::sapi__3)) { current_location.update_lineno(673); /* RAN_Emulation.ttcnpp, line 673 */ return OCTETSTRING_template(os_2); } } current_location.update_lineno(675); /* RAN_Emulation.ttcnpp, line 675 */ return OCTETSTRING_template(os_0); } void f__handle__userData__RANAP(const COMPONENT& client, const RANAP__PDU__Descriptions::RANAP__PDU& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 678, TTCN_Location::LOCATION_FUNCTION, "f_handle_userData_RANAP"); current_location.update_lineno(681); /* RAN_Emulation.ttcnpp, line 681 */ OCTETSTRING_template l3(RANAP__Templates::f__ranap__extract__l3(ranap)); current_location.update_lineno(682); /* RAN_Emulation.ttcnpp, line 682 */ { boolean tmp_40; tmp_40 = l3.get_istemplate_kind((const char*)cs_0); if (!tmp_40) tmp_40 = (!(const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).decode__dtap())); if (tmp_40) { current_location.update_lineno(683); /* RAN_Emulation.ttcnpp, line 683 */ RAN__Emulation__CT_component_CLIENT.send(ranap, COMPONENT(client), NULL); } else { current_location.update_lineno(685); /* RAN_Emulation.ttcnpp, line 685 */ RANAP__IEs::SAPI_template sapi(RANAP__Templates::f__ranap__extract__sapi(ranap)); current_location.update_lineno(686); /* RAN_Emulation.ttcnpp, line 686 */ OCTETSTRING_template dlci(fake__dlci__from__sapi(sapi)); current_location.update_lineno(687); /* RAN_Emulation.ttcnpp, line 687 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms()) { current_location.update_lineno(689); /* RAN_Emulation.ttcnpp, line 689 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ps__domain()) { current_location.update_lineno(690); /* RAN_Emulation.ttcnpp, line 690 */ PDU__DTAP__PS__MT mt; mt.dlci() = OMIT_VALUE; mt.dtap() = MobileL3__Types::dec__PDU__L3__SGSN__MS(l3.valueof()); current_location.update_lineno(694); /* RAN_Emulation.ttcnpp, line 694 */ if (dlci.is_value()) { current_location.update_lineno(695); /* RAN_Emulation.ttcnpp, line 695 */ mt.dlci() = dlci.valueof(); } current_location.update_lineno(697); /* RAN_Emulation.ttcnpp, line 697 */ RAN__Emulation__CT_component_CLIENT.send(mt, COMPONENT(client), NULL); } else { current_location.update_lineno(699); /* RAN_Emulation.ttcnpp, line 699 */ PDU__DTAP__MT mt; mt.dlci() = OMIT_VALUE; mt.dtap() = MobileL3__Types::dec__PDU__ML3__NW__MS(l3.valueof()); current_location.update_lineno(703); /* RAN_Emulation.ttcnpp, line 703 */ if (dlci.is_value()) { current_location.update_lineno(704); /* RAN_Emulation.ttcnpp, line 704 */ mt.dlci() = dlci.valueof(); } current_location.update_lineno(706); /* RAN_Emulation.ttcnpp, line 706 */ RAN__Emulation__CT_component_CLIENT.send(mt, COMPONENT(client), NULL); } } else { current_location.update_lineno(710); /* RAN_Emulation.ttcnpp, line 710 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ps__domain()) { current_location.update_lineno(711); /* RAN_Emulation.ttcnpp, line 711 */ PDU__DTAP__PS__MO mo; mo.dlci() = OMIT_VALUE; mo.dtap() = MobileL3__Types::dec__PDU__L3__MS__SGSN(l3.valueof()); current_location.update_lineno(715); /* RAN_Emulation.ttcnpp, line 715 */ if (dlci.is_value()) { current_location.update_lineno(716); /* RAN_Emulation.ttcnpp, line 716 */ mo.dlci() = dlci.valueof(); } current_location.update_lineno(718); /* RAN_Emulation.ttcnpp, line 718 */ RAN__Emulation__CT_component_CLIENT.send(mo, COMPONENT(client), NULL); } else { current_location.update_lineno(720); /* RAN_Emulation.ttcnpp, line 720 */ PDU__DTAP__MO mo; mo.dlci() = OMIT_VALUE; mo.dtap() = MobileL3__Types::dec__PDU__ML3__MS__NW(l3.valueof()); current_location.update_lineno(724); /* RAN_Emulation.ttcnpp, line 724 */ if (dlci.is_value()) { current_location.update_lineno(725); /* RAN_Emulation.ttcnpp, line 725 */ mo.dlci() = dlci.valueof(); } current_location.update_lineno(727); /* RAN_Emulation.ttcnpp, line 727 */ RAN__Emulation__CT_component_CLIENT.send(mo, COMPONENT(client), NULL); } } } } } void start_f__handle__userData__RANAP(const COMPONENT& component_reference, const COMPONENT& client, const RANAP__PDU__Descriptions::RANAP__PDU& ranap) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_userData_RANAP("); client.log(); TTCN_Logger::log_event_str(", "); ranap.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, "RAN_Emulation", "f_handle_userData_RANAP", text_buf); client.encode_text(text_buf); ranap.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } RANAP__PDU__Descriptions::RANAP__PDU_template CommonRanapUnitdataCallback(const RANAP__PDU__Descriptions::RANAP__PDU& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 741, TTCN_Location::LOCATION_FUNCTION, "CommonRanapUnitdataCallback"); current_location.update_lineno(743); /* RAN_Emulation.ttcnpp, line 743 */ if (RANAP__Templates::tr__RANAP__Paging(RANAP__IEs::CN__DomainIndicator_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE), RANAP__Templates::tr__RANAP__Paging_exts_defval).match(ranap)) { current_location.update_lineno(744); /* RAN_Emulation.ttcnpp, line 744 */ COMPONENT client(NULL_COMPREF); current_location.update_lineno(746); /* RAN_Emulation.ttcnpp, line 746 */ HEXSTRING imsi(Osmocom__Types::imsi__oct2hex(const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().paging().protocolIEs()[1].value__().permanentNAS__UE__ID().iMSI())); current_location.update_lineno(747); /* RAN_Emulation.ttcnpp, line 747 */ OCTETSTRING_template tmsi(OMIT_VALUE); current_location.update_lineno(748); /* RAN_Emulation.ttcnpp, line 748 */ { boolean tmp_45; tmp_45 = (const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().paging().protocolIEs().lengthof() > 2); if (tmp_45) tmp_45 = (const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().paging().protocolIEs()[2].id() == RANAP__Constants::id__TemporaryUE__ID); if (tmp_45) { current_location.update_lineno(750); /* RAN_Emulation.ttcnpp, line 750 */ RANAP__IEs::TemporaryUE__ID ue__id; current_location.update_lineno(751); /* RAN_Emulation.ttcnpp, line 751 */ ue__id = const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().paging().protocolIEs()[2].value__().temporaryUE__ID(); current_location.update_lineno(752); /* RAN_Emulation.ttcnpp, line 752 */ if (ue__id.ischosen(RANAP__IEs::TemporaryUE__ID::ALT_tMSI)) { current_location.update_lineno(753); /* RAN_Emulation.ttcnpp, line 753 */ tmsi = const_cast< const RANAP__IEs::TemporaryUE__ID&>(ue__id).tMSI(); } else { current_location.update_lineno(755); /* RAN_Emulation.ttcnpp, line 755 */ tmsi = const_cast< const RANAP__IEs::TemporaryUE__ID&>(ue__id).p__TMSI(); } } } current_location.update_lineno(758); /* RAN_Emulation.ttcnpp, line 758 */ client = f__imsi__table__find(imsi, tmsi); current_location.update_lineno(759); /* RAN_Emulation.ttcnpp, line 759 */ if ((client != NULL_COMPREF)) { current_location.update_lineno(760); /* RAN_Emulation.ttcnpp, line 760 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("CommonRanapUnitdataCallback: IMSI/TMSI found in table, dispatching to "); client.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(762); /* RAN_Emulation.ttcnpp, line 762 */ RAN__Emulation__CT_component_CLIENT.send(ranap, COMPONENT(client), NULL); current_location.update_lineno(763); /* RAN_Emulation.ttcnpp, line 763 */ return RANAP__PDU__Descriptions::RANAP__PDU_template(OMIT_VALUE); } current_location.update_lineno(765); /* RAN_Emulation.ttcnpp, line 765 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("CommonRanapUnitdataCallback: IMSI="); imsi.log(); TTCN_Logger::log_event_str(", TMSI="); tmsi.log(); TTCN_Logger::log_event_str(" not found in table"); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } else { current_location.update_lineno(766); /* RAN_Emulation.ttcnpp, line 766 */ if (RANAP__Templates::tr__RANAP__ResetResource(RANAP__IEs::CN__DomainIndicator_template(ANY_VALUE), RANAP__IEs::Cause_template(ANY_VALUE), BITSTRING_template(ANY_VALUE), RANAP__Templates::tr__RANAP__ResetResource_exts_defval).match(ranap)) { current_location.update_lineno(768); /* RAN_Emulation.ttcnpp, line 768 */ { boolean tmp_50; tmp_50 = (const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().resetResource().protocolIEs().lengthof() > 2); if (tmp_50) tmp_50 = (const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().resetResource().protocolIEs()[2].id() == RANAP__Constants::id__IuSigConIdList); if (tmp_50) { current_location.update_lineno(770); /* RAN_Emulation.ttcnpp, line 770 */ RANAP__PDU__Contents::_root_RANAP__Containers_ProtocolIE__ContainerList_RANAP__PDU__Contents_inst13 res__li(const_cast< const RANAP__PDU__Descriptions::RANAP__PDU&>(ranap).initiatingMessage().value__().resetResource().protocolIEs()[2].value__().resetResourceList()); { current_location.update_lineno(771); /* RAN_Emulation.ttcnpp, line 771 */ INTEGER i(0); current_location.update_lineno(771); /* RAN_Emulation.ttcnpp, line 771 */ for ( ; ; ) { current_location.update_lineno(771); /* RAN_Emulation.ttcnpp, line 771 */ if (!(i < res__li.lengthof())) break; current_location.update_lineno(772); /* RAN_Emulation.ttcnpp, line 772 */ BITSTRING sigc__id; current_location.update_lineno(772); /* RAN_Emulation.ttcnpp, line 772 */ sigc__id = const_cast< const RANAP__PDU__Contents::_root_RANAP__Containers_ProtocolIE__ContainerList_RANAP__PDU__Contents_inst13&>(res__li)[i][0].value__().resetResourceItem().iuSigConId(); current_location.update_lineno(773); /* RAN_Emulation.ttcnpp, line 773 */ COMPONENT client(NULL_COMPREF); current_location.update_lineno(774); /* RAN_Emulation.ttcnpp, line 774 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("CommonRanapUnitdataCallback: Lookup IuSigConId"); sigc__id.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(775); /* RAN_Emulation.ttcnpp, line 775 */ client = f__IuSigConId__table__find(sigc__id); current_location.update_lineno(776); /* RAN_Emulation.ttcnpp, line 776 */ if ((client != NULL_COMPREF)) { current_location.update_lineno(777); /* RAN_Emulation.ttcnpp, line 777 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("CommonRanapUnitdataCallback: IuSigConId found in table, dispatching to "); client.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(778); /* RAN_Emulation.ttcnpp, line 778 */ RAN__Emulation__CT_component_CLIENT.send(ranap, COMPONENT(client), NULL); } current_location.update_lineno(771); /* RAN_Emulation.ttcnpp, line 771 */ { INTEGER tmp_53; ++i; } } } } } } } current_location.update_lineno(785); /* RAN_Emulation.ttcnpp, line 785 */ { boolean tmp_57; { boolean tmp_54 = RAN__Emulation__CT_component_g__ran__ops.is_bound(); if(tmp_54) { const OPTIONAL< RanapUnitdataCallback >& tmp_55 = RAN__Emulation__CT_component_g__ran__ops.ranap__unitdata__cb(); switch (tmp_55.get_selection()) { case OPTIONAL_UNBOUND: tmp_54 = FALSE; break; case OPTIONAL_OMIT: tmp_54 = FALSE; break; default: { const RanapUnitdataCallback& tmp_56 = (const RanapUnitdataCallback&) tmp_55; tmp_54 = tmp_56.is_present(); break;} } } tmp_57 = (!(tmp_54)); } if (tmp_57) { current_location.update_lineno(786); /* RAN_Emulation.ttcnpp, line 786 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("CommonRanapUnitdataCallback: Ignoring RANAP msg: "); ranap.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(787); /* RAN_Emulation.ttcnpp, line 787 */ return RANAP__PDU__Descriptions::RANAP__PDU_template(OMIT_VALUE); } } current_location.update_lineno(789); /* RAN_Emulation.ttcnpp, line 789 */ return const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ranap__unitdata__cb()().invoke(ranap); } void start_CommonRanapUnitdataCallback(const COMPONENT& component_reference, const RANAP__PDU__Descriptions::RANAP__PDU& ranap) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function CommonRanapUnitdataCallback("); ranap.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, "RAN_Emulation", "CommonRanapUnitdataCallback", text_buf); ranap.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } BOOLEAN f__ranap__l3__is__rr(const RANAP__PDU__Descriptions::RANAP__PDU& ranap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 792, TTCN_Location::LOCATION_FUNCTION, "f_ranap_l3_is_rr"); current_location.update_lineno(793); /* RAN_Emulation.ttcnpp, line 793 */ RANAP__IEs::SAPI_template sapi; current_location.update_lineno(794); /* RAN_Emulation.ttcnpp, line 794 */ OCTETSTRING_template l3(RANAP__Templates::f__ranap__extract__l3(ranap)); current_location.update_lineno(795); /* RAN_Emulation.ttcnpp, line 795 */ return f__L3__is__rr(l3); } void f__ranap__reset(const SCCPasp__Types::SCCP__PAR__Address& peer, const SCCPasp__Types::SCCP__PAR__Address& own, const RANAP__IEs::GlobalRNC__ID_template& grnc__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 798, TTCN_Location::LOCATION_FUNCTION, "f_ranap_reset"); current_location.update_lineno(801); /* RAN_Emulation.ttcnpp, line 801 */ TIMER T("T", 5.0); current_location.update_lineno(802); /* RAN_Emulation.ttcnpp, line 802 */ RANAP__IEs::CN__DomainIndicator dom; current_location.update_lineno(803); /* RAN_Emulation.ttcnpp, line 803 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ps__domain()) { current_location.update_lineno(804); /* RAN_Emulation.ttcnpp, line 804 */ dom = RANAP__IEs::CN__DomainIndicator::ps__domain; } else { current_location.update_lineno(806); /* RAN_Emulation.ttcnpp, line 806 */ dom = RANAP__IEs::CN__DomainIndicator::cs__domain; } current_location.update_lineno(809); /* RAN_Emulation.ttcnpp, line 809 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__UNITDATA__req(peer, own, RANAP__Templates::f__ts__RANAP__Reset(RANAP__Templates::ts__RanapCause__om__intervention, RANAP__IEs::CN__DomainIndicator_template(dom), grnc__id, RANAP__Templates::f__ts__RANAP__Reset_exts_defval)), FALSE, NULL); current_location.update_lineno(810); /* RAN_Emulation.ttcnpp, line 810 */ T.start(); current_location.update_lineno(811); /* RAN_Emulation.ttcnpp, line 811 */ { tmp_60: alt_status tmp_60_alt_flag_0 = ALT_MAYBE; alt_status tmp_60_alt_flag_1 = ALT_MAYBE; alt_status tmp_60_alt_flag_2 = ALT_MAYBE; alt_status tmp_60_alt_flag_3 = ALT_MAYBE; alt_status tmp_60_default_flag = ALT_MAYBE; boolean first_run = TRUE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_60_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(812); /* RAN_Emulation.ttcnpp, line 812 */ tmp_60_alt_flag_0 = RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::tr__RANAP__UNITDATA__ind(SCCPasp__Types::SCCP__PAR__Address_template(own), SCCPasp__Types::SCCP__PAR__Address_template(peer), RANAP__Templates::tr__RANAP__ResetAck(RANAP__Templates::tr__RANAP__ResetAck_dom_defval, RANAP__Templates::tr__RANAP__ResetAck_exts_defval)), NULL, any_compref, NULL, NULL, NULL); if (tmp_60_alt_flag_0 == ALT_YES) { current_location.update_lineno(813); /* RAN_Emulation.ttcnpp, line 813 */ TTCN_Logger::log_str(TTCN_USER, "RANAP: Received RESET-ACK in response to RESET, we're ready to go!"); break; } } if (tmp_60_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(815); /* RAN_Emulation.ttcnpp, line 815 */ tmp_60_alt_flag_1 = as__reset__ack_instance(as__reset__ack_append__osmux__support_defval, first_run); if (tmp_60_alt_flag_1 == ALT_REPEAT) goto tmp_60; if (tmp_60_alt_flag_1 == ALT_BREAK) break; if (tmp_60_alt_flag_1 == ALT_YES) break; } if (tmp_60_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(816); /* RAN_Emulation.ttcnpp, line 816 */ tmp_60_alt_flag_2 = RAN__Emulation__CT_component_RANAP.receive(any_compref, NULL, NULL, NULL); if (tmp_60_alt_flag_2 == ALT_YES) { current_location.update_lineno(816); /* RAN_Emulation.ttcnpp, line 816 */ goto tmp_60; } } if (tmp_60_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(817); /* RAN_Emulation.ttcnpp, line 817 */ tmp_60_alt_flag_3 = T.timeout(NULL); if (tmp_60_alt_flag_3 == ALT_YES) { current_location.update_lineno(818); /* RAN_Emulation.ttcnpp, line 818 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("RANAP: Timeout waiting for RESET-ACK after sending RESET"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(819); /* RAN_Emulation.ttcnpp, line 819 */ TTCN_Runtime::stop_component(MTC_COMPREF); } } if (tmp_60_default_flag == ALT_MAYBE) { tmp_60_default_flag = TTCN_Default::try_altsteps(first_run); if (tmp_60_default_flag == ALT_YES || tmp_60_default_flag == ALT_BREAK) break; else if (tmp_60_default_flag == ALT_REPEAT) goto tmp_60; } current_location.update_lineno(811); /* RAN_Emulation.ttcnpp, line 811 */ if (tmp_60_alt_flag_0 == ALT_NO && tmp_60_alt_flag_1 == ALT_NO && tmp_60_alt_flag_2 == ALT_NO && tmp_60_alt_flag_3 == ALT_NO && tmp_60_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file RAN_Emulation.ttcnpp between lines 811 and 821."); TTCN_Snapshot::take_new(TRUE); first_run = FALSE; } } } void start_f__ranap__reset(const COMPONENT& component_reference, const SCCPasp__Types::SCCP__PAR__Address& peer, const SCCPasp__Types::SCCP__PAR__Address& own, const RANAP__IEs::GlobalRNC__ID_template& grnc__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ranap_reset("); peer.log(); TTCN_Logger::log_event_str(", "); own.log(); TTCN_Logger::log_event_str(", "); grnc__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, "RAN_Emulation", "f_ranap_reset", text_buf); peer.encode_text(text_buf); own.encode_text(text_buf); grnc__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } BOOLEAN f__L3__is__rr(const OCTETSTRING_template& l3) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 858, TTCN_Location::LOCATION_FUNCTION, "f_L3_is_rr"); current_location.update_lineno(859); /* RAN_Emulation.ttcnpp, line 859 */ if ((!(l3.is_value()))) { current_location.update_lineno(860); /* RAN_Emulation.ttcnpp, line 860 */ return FALSE; } current_location.update_lineno(862); /* RAN_Emulation.ttcnpp, line 862 */ OCTETSTRING l3v(l3.valueof()); current_location.update_lineno(863); /* RAN_Emulation.ttcnpp, line 863 */ if ((l3v.lengthof() < 1)) { current_location.update_lineno(864); /* RAN_Emulation.ttcnpp, line 864 */ return FALSE; } current_location.update_lineno(867); /* RAN_Emulation.ttcnpp, line 867 */ if (((oct2bit(const_cast< const OCTETSTRING&>(l3v)[0]) & bs_3) == bs_4)) { current_location.update_lineno(868); /* RAN_Emulation.ttcnpp, line 868 */ return TRUE; } current_location.update_lineno(870); /* RAN_Emulation.ttcnpp, line 870 */ return FALSE; } INTEGER f__next__n__sd(N__Sd__Array& n__sd, const INTEGER& n__sd__idx) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 873, TTCN_Location::LOCATION_FUNCTION, "f_next_n_sd"); current_location.update_lineno(874); /* RAN_Emulation.ttcnpp, line 874 */ INTEGER seq__nr; current_location.update_lineno(875); /* RAN_Emulation.ttcnpp, line 875 */ if ((n__sd__idx == 0)) { current_location.update_lineno(876); /* RAN_Emulation.ttcnpp, line 876 */ seq__nr = const_cast< const N__Sd__Array&>(n__sd)[0]; current_location.update_lineno(877); /* RAN_Emulation.ttcnpp, line 877 */ { INTEGER tmp_62; tmp_62 = mod((const_cast< const N__Sd__Array&>(n__sd)[0] + 1), 4); n__sd[0] = tmp_62; } } else { current_location.update_lineno(878); /* RAN_Emulation.ttcnpp, line 878 */ boolean tmp_63; tmp_63 = (n__sd__idx >= 1); if (tmp_63) tmp_63 = (n__sd__idx <= 3); if (tmp_63) { current_location.update_lineno(879); /* RAN_Emulation.ttcnpp, line 879 */ seq__nr = const_cast< const N__Sd__Array&>(n__sd)[n__sd__idx]; current_location.update_lineno(880); /* RAN_Emulation.ttcnpp, line 880 */ { INTEGER tmp_65; tmp_65 = mod((const_cast< const N__Sd__Array&>(n__sd)[n__sd__idx] + 1), 2); n__sd[n__sd__idx] = tmp_65; } } else { current_location.update_lineno(883); /* RAN_Emulation.ttcnpp, line 883 */ seq__nr = 0; } } current_location.update_lineno(885); /* RAN_Emulation.ttcnpp, line 885 */ return seq__nr; } void f__ML3__patch__seq__nr(const INTEGER& seq__nr, OCTETSTRING& enc__l3) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 889, TTCN_Location::LOCATION_FUNCTION, "f_ML3_patch_seq_nr"); current_location.update_lineno(890); /* RAN_Emulation.ttcnpp, line 890 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("patching N(SD)="); seq__nr.log(); TTCN_Logger::log_event_str(" into dtap "); enc__l3.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(891); /* RAN_Emulation.ttcnpp, line 891 */ { OCTETSTRING tmp_67; tmp_67 = ((const_cast< const OCTETSTRING&>(enc__l3)[1] & os_3) | bit2oct((int2bit(seq__nr, 8) << 6))); enc__l3[1] = tmp_67; } current_location.update_lineno(892); /* RAN_Emulation.ttcnpp, line 892 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("patched enc_l3: "); enc__l3.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } INTEGER f__ML3__n__sd__idx(const MobileL3__Types::PDU__ML3__MS__NW& dtap) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 895, TTCN_Location::LOCATION_FUNCTION, "f_ML3_n_sd_idx"); current_location.update_lineno(896); /* RAN_Emulation.ttcnpp, line 896 */ INTEGER seq__nr; current_location.update_lineno(897); /* RAN_Emulation.ttcnpp, line 897 */ { boolean tmp_68; { boolean tmp_69; { boolean tmp_70 = dtap.is_bound(); if(tmp_70) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_71 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_72 = tmp_71.msgs(); tmp_70 = tmp_72.is_bound(); if (tmp_70) { tmp_70 = tmp_72.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_cc); } } tmp_69 = tmp_70; } if (!tmp_69) { boolean tmp_73 = dtap.is_bound(); if(tmp_73) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_74 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_75 = tmp_74.msgs(); tmp_73 = tmp_75.is_bound(); if (tmp_73) { tmp_73 = tmp_75.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_mm); } } tmp_69 = tmp_73; } tmp_68 = tmp_69; } if (!tmp_68) { boolean tmp_76 = dtap.is_bound(); if(tmp_76) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_77 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_78 = tmp_77.msgs(); tmp_76 = tmp_78.is_bound(); if (tmp_76) { tmp_76 = tmp_78.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_ss); } } tmp_68 = tmp_76; } if (tmp_68) { current_location.update_lineno(898); /* RAN_Emulation.ttcnpp, line 898 */ return 0; } else { current_location.update_lineno(899); /* RAN_Emulation.ttcnpp, line 899 */ boolean tmp_82; { boolean tmp_79 = dtap.is_bound(); if(tmp_79) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_80 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_81 = tmp_80.msgs(); tmp_79 = tmp_81.is_bound(); if (tmp_79) { tmp_79 = tmp_81.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_gcc); } } tmp_82 = tmp_79; } if (tmp_82) { current_location.update_lineno(900); /* RAN_Emulation.ttcnpp, line 900 */ return 1; } else { current_location.update_lineno(901); /* RAN_Emulation.ttcnpp, line 901 */ boolean tmp_86; { boolean tmp_83 = dtap.is_bound(); if(tmp_83) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_84 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_85 = tmp_84.msgs(); tmp_83 = tmp_85.is_bound(); if (tmp_83) { tmp_83 = tmp_85.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_bcc); } } tmp_86 = tmp_83; } if (tmp_86) { current_location.update_lineno(902); /* RAN_Emulation.ttcnpp, line 902 */ return 2; } else { current_location.update_lineno(903); /* RAN_Emulation.ttcnpp, line 903 */ boolean tmp_90; { boolean tmp_87 = dtap.is_bound(); if(tmp_87) { const MobileL3__Types::PDU__ML3__MS__NW& tmp_88 = dtap; const MobileL3__Types::ML3__Discr__MS__NW& tmp_89 = tmp_88.msgs(); tmp_87 = tmp_89.is_bound(); if (tmp_87) { tmp_87 = tmp_89.ischosen(MobileL3__Types::ML3__Discr__MS__NW::ALT_loc); } } tmp_90 = tmp_87; } if (tmp_90) { current_location.update_lineno(904); /* RAN_Emulation.ttcnpp, line 904 */ return 3; } } } } } current_location.update_lineno(907); /* RAN_Emulation.ttcnpp, line 907 */ return -1; } void f__ML3__patch__seq(ConnectionData& cd, const MobileL3__Types::PDU__ML3__MS__NW& dtap, OCTETSTRING& enc__l3) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 911, TTCN_Location::LOCATION_FUNCTION, "f_ML3_patch_seq"); current_location.update_lineno(912); /* RAN_Emulation.ttcnpp, line 912 */ INTEGER n__sd__idx(f__ML3__n__sd__idx(dtap)); current_location.update_lineno(913); /* RAN_Emulation.ttcnpp, line 913 */ if ((n__sd__idx < 0)) { current_location.update_lineno(914); /* RAN_Emulation.ttcnpp, line 914 */ return; } current_location.update_lineno(916); /* RAN_Emulation.ttcnpp, line 916 */ INTEGER seq__nr(f__next__n__sd(cd.n__sd(), n__sd__idx)); current_location.update_lineno(917); /* RAN_Emulation.ttcnpp, line 917 */ f__ML3__patch__seq__nr(seq__nr, enc__l3); } alt_status as__reset__ack_instance(const BOOLEAN& , boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 920, TTCN_Location::LOCATION_ALTSTEP, "as_reset_ack"); current_location.update_lineno(925); /* RAN_Emulation.ttcnpp, line 925 */ RANAP__CodecPort::RANAP__N__UNITDATA__ind rud__ind; alt_status ret_val = ALT_NO; current_location.update_lineno(936); /* RAN_Emulation.ttcnpp, line 936 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::tr__RANAP__UNITDATA__ind(SCCPasp__Types::SCCP__PAR__Address_template(ANY_VALUE), SCCPasp__Types::SCCP__PAR__Address_template(ANY_VALUE), RANAP__Templates::tr__RANAP__Reset(RANAP__Templates::tr__RANAP__Reset_cause_defval, RANAP__Templates::tr__RANAP__Reset_dom_defval, RANAP__Templates::tr__RANAP__Reset_exts_defval)), &(rud__ind), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(937); /* RAN_Emulation.ttcnpp, line 937 */ TTCN_Logger::log_str(TTCN_USER, "RANAP: Responding to inbound IuRESET with IuRESET-ACK"); current_location.update_lineno(938); /* RAN_Emulation.ttcnpp, line 938 */ RANAP__IEs::CN__DomainIndicator dom; current_location.update_lineno(939); /* RAN_Emulation.ttcnpp, line 939 */ dom = const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).userData().initiatingMessage().value__().reset().protocolIEs()[1].value__().cN__DomainIndicator(); current_location.update_lineno(940); /* RAN_Emulation.ttcnpp, line 940 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__UNITDATA__req(const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).callingAddress(), const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).calledAddress(), RANAP__Templates::f__ts__RANAP__ResetAck(RANAP__IEs::CN__DomainIndicator_template(dom), RANAP__IEs::GlobalRNC__ID_template(const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).grnc__id()), RANAP__Templates::f__ts__RANAP__ResetAck_exts_defval)), FALSE, NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } return ret_val; } void as__reset__ack(boolean nodefault_modifier, const BOOLEAN& append__osmux__support) { 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__reset__ack_instance(append__osmux__support, !block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_reset_ack."); else block_flag = TRUE; } } Default_Base *activate_as__reset__ack(const BOOLEAN& append__osmux__support) { return new as__reset__ack_Default(append__osmux__support); } alt_status as__main__bssap_instance(boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 947, TTCN_Location::LOCATION_ALTSTEP, "as_main_bssap"); alt_status ret_val = ALT_NO; current_location.update_lineno(1069); /* RAN_Emulation.ttcnpp, line 1069 */ static boolean guard_expr_0 = FALSE; if (first_alt_run) { guard_expr_0 = FALSE; } if (guard_expr_0) { current_location.update_lineno(1069); /* RAN_Emulation.ttcnpp, line 1069 */ switch (RAN__Emulation__CT_component_CLIENT.receive(any_compref, NULL, NULL, NULL)) { case ALT_YES: return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } return ret_val; } void as__main__bssap(boolean nodefault_modifier) { 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__main__bssap_instance(!block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_main_bssap."); else block_flag = TRUE; } } Default_Base *activate_as__main__bssap() { return new as__main__bssap_Default(); } alt_status as__main__ranap_instance(boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1073, TTCN_Location::LOCATION_ALTSTEP, "as_main_ranap"); current_location.update_lineno(1075); /* RAN_Emulation.ttcnpp, line 1075 */ RANAP__CodecPort::RANAP__N__UNITDATA__ind rud__ind; current_location.update_lineno(1076); /* RAN_Emulation.ttcnpp, line 1076 */ RANAP__CodecPort::RANAP__N__CONNECT__ind rconn__ind; current_location.update_lineno(1077); /* RAN_Emulation.ttcnpp, line 1077 */ RANAP__CodecPort::RANAP__N__CONNECT__cfm rconn__cfm; current_location.update_lineno(1078); /* RAN_Emulation.ttcnpp, line 1078 */ RANAP__CodecPort::RANAP__N__DATA__ind rdata__ind; current_location.update_lineno(1079); /* RAN_Emulation.ttcnpp, line 1079 */ RANAP__CodecPort::RANAP__N__DISCONNECT__ind rdisc__ind; current_location.update_lineno(1080); /* RAN_Emulation.ttcnpp, line 1080 */ RANAP__Conn__Req creq; current_location.update_lineno(1081); /* RAN_Emulation.ttcnpp, line 1081 */ RANAP__PDU__Descriptions::RANAP__PDU ranap; current_location.update_lineno(1082); /* RAN_Emulation.ttcnpp, line 1082 */ RANAP__CodecPort::RANAP__N__UNITDATA__req ranap__ud; current_location.update_lineno(1083); /* RAN_Emulation.ttcnpp, line 1083 */ RAN__Conn__Prim ran__conn__prim; current_location.update_lineno(1084); /* RAN_Emulation.ttcnpp, line 1084 */ COMPONENT vc__conn; current_location.update_lineno(1085); /* RAN_Emulation.ttcnpp, line 1085 */ PDU__DTAP__PS__MO ps__mo; current_location.update_lineno(1086); /* RAN_Emulation.ttcnpp, line 1086 */ PDU__DTAP__PS__MT ps__mt; alt_status ret_val = ALT_NO; current_location.update_lineno(1089); /* RAN_Emulation.ttcnpp, line 1089 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::RANAP__N__UNITDATA__ind_template(ANY_VALUE), &(rud__ind), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1091); /* RAN_Emulation.ttcnpp, line 1091 */ RANAP__PDU__Descriptions::RANAP__PDU_template resp; current_location.update_lineno(1092); /* RAN_Emulation.ttcnpp, line 1092 */ resp = CommonRanapUnitdataCallback(const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).userData()); current_location.update_lineno(1093); /* RAN_Emulation.ttcnpp, line 1093 */ if (resp.is_value()) { current_location.update_lineno(1094); /* RAN_Emulation.ttcnpp, line 1094 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__UNITDATA__req(const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).callingAddress(), const_cast< const RANAP__CodecPort::RANAP__N__UNITDATA__ind&>(rud__ind).calledAddress(), resp), FALSE, NULL); } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1099); /* RAN_Emulation.ttcnpp, line 1099 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::RANAP__N__CONNECT__ind_template(ANY_VALUE), &(rconn__ind), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1100); /* RAN_Emulation.ttcnpp, line 1100 */ vc__conn = const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ranap__create__cb()().invoke(rconn__ind, CHARSTRING(RAN__Emulation__CT_component_g__ran__id)); current_location.update_lineno(1102); /* RAN_Emulation.ttcnpp, line 1102 */ f__conn__table__add(vc__conn, const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(rconn__ind).connectionId()); current_location.update_lineno(1104); /* RAN_Emulation.ttcnpp, line 1104 */ { boolean tmp_97; { boolean tmp_94 = rconn__ind.is_bound(); if(tmp_94) { const OPTIONAL< RANAP__PDU__Descriptions::RANAP__PDU >& tmp_95 = rconn__ind.userData(); switch (tmp_95.get_selection()) { case OPTIONAL_UNBOUND: tmp_94 = FALSE; break; case OPTIONAL_OMIT: tmp_94 = FALSE; break; default: { const RANAP__PDU__Descriptions::RANAP__PDU& tmp_96 = (const RANAP__PDU__Descriptions::RANAP__PDU&) tmp_95; tmp_94 = tmp_96.is_present(); break;} } } tmp_97 = tmp_94; } if (tmp_97) { current_location.update_lineno(1105); /* RAN_Emulation.ttcnpp, line 1105 */ f__handle__userData__RANAP(vc__conn, const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(rconn__ind).userData()); } else { current_location.update_lineno(1108); /* RAN_Emulation.ttcnpp, line 1108 */ RAN__Emulation__CT_component_CLIENT.send(ts__RANAP__Conn__Ind(const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(rconn__ind).callingAddress(), const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(rconn__ind).calledAddress(), RANAP__PDU__Descriptions::RANAP__PDU_template(OMIT_VALUE)), COMPONENT(vc__conn), NULL); } } current_location.update_lineno(1110); /* RAN_Emulation.ttcnpp, line 1110 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).ranap__connect__ind__auto__res()) { current_location.update_lineno(1112); /* RAN_Emulation.ttcnpp, line 1112 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__CONNECT__res(const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(rconn__ind).connectionId(), RANAP__PDU__Descriptions::RANAP__PDU_template(OMIT_VALUE)), FALSE, NULL); } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1116); /* RAN_Emulation.ttcnpp, line 1116 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::RANAP__N__DATA__ind_template(ANY_VALUE), &(rdata__ind), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1117); /* RAN_Emulation.ttcnpp, line 1117 */ vc__conn = f__comp__by__conn__id(const_cast< const RANAP__CodecPort::RANAP__N__DATA__ind&>(rdata__ind).connectionId()); current_location.update_lineno(1118); /* RAN_Emulation.ttcnpp, line 1118 */ { boolean tmp_102; { boolean tmp_99 = rdata__ind.is_bound(); if(tmp_99) { const RANAP__CodecPort::RANAP__N__DATA__ind& tmp_100 = rdata__ind; const RANAP__PDU__Descriptions::RANAP__PDU& tmp_101 = tmp_100.userData(); tmp_99 = tmp_101.is_present(); } tmp_102 = tmp_99; } if (tmp_102) { current_location.update_lineno(1119); /* RAN_Emulation.ttcnpp, line 1119 */ f__handle__userData__RANAP(vc__conn, const_cast< const RANAP__CodecPort::RANAP__N__DATA__ind&>(rdata__ind).userData()); } } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1123); /* RAN_Emulation.ttcnpp, line 1123 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::RANAP__N__DISCONNECT__ind_template(ANY_VALUE), &(rdisc__ind), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1124); /* RAN_Emulation.ttcnpp, line 1124 */ vc__conn = f__comp__by__conn__id(const_cast< const RANAP__CodecPort::RANAP__N__DISCONNECT__ind&>(rdisc__ind).connectionId()); current_location.update_lineno(1125); /* RAN_Emulation.ttcnpp, line 1125 */ { boolean tmp_107; { boolean tmp_104 = rdisc__ind.is_bound(); if(tmp_104) { const OPTIONAL< RANAP__PDU__Descriptions::RANAP__PDU >& tmp_105 = rdisc__ind.userData(); switch (tmp_105.get_selection()) { case OPTIONAL_UNBOUND: tmp_104 = FALSE; break; case OPTIONAL_OMIT: tmp_104 = FALSE; break; default: { const RANAP__PDU__Descriptions::RANAP__PDU& tmp_106 = (const RANAP__PDU__Descriptions::RANAP__PDU&) tmp_105; tmp_104 = tmp_106.is_present(); break;} } } tmp_107 = tmp_104; } if (tmp_107) { current_location.update_lineno(1126); /* RAN_Emulation.ttcnpp, line 1126 */ f__handle__userData__RANAP(vc__conn, const_cast< const RANAP__CodecPort::RANAP__N__DISCONNECT__ind&>(rdisc__ind).userData()); } } current_location.update_lineno(1129); /* RAN_Emulation.ttcnpp, line 1129 */ RAN__Conn__Prim prim(ts__MSC__CONN__PRIM__DISC__IND.valueof()); current_location.update_lineno(1130); /* RAN_Emulation.ttcnpp, line 1130 */ RAN__Emulation__CT_component_CLIENT.send(prim, COMPONENT(vc__conn), NULL); current_location.update_lineno(1131); /* RAN_Emulation.ttcnpp, line 1131 */ f__conn__table__del(const_cast< const RANAP__CodecPort::RANAP__N__DISCONNECT__ind&>(rdisc__ind).connectionId()); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1135); /* RAN_Emulation.ttcnpp, line 1135 */ switch (RAN__Emulation__CT_component_RANAP.receive(RANAP__CodecPort::RANAP__N__CONNECT__cfm_template(ANY_VALUE), &(rconn__cfm), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1136); /* RAN_Emulation.ttcnpp, line 1136 */ vc__conn = f__comp__by__conn__id(const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__cfm&>(rconn__cfm).connectionId()); current_location.update_lineno(1137); /* RAN_Emulation.ttcnpp, line 1137 */ RAN__Conn__Prim prim(ts__MSC__CONN__PRIM__CONF__IND.valueof()); current_location.update_lineno(1138); /* RAN_Emulation.ttcnpp, line 1138 */ RAN__Emulation__CT_component_CLIENT.send(prim, COMPONENT(vc__conn), NULL); current_location.update_lineno(1140); /* RAN_Emulation.ttcnpp, line 1140 */ { boolean tmp_112; { boolean tmp_109 = rconn__cfm.is_bound(); if(tmp_109) { const OPTIONAL< RANAP__PDU__Descriptions::RANAP__PDU >& tmp_110 = rconn__cfm.userData(); switch (tmp_110.get_selection()) { case OPTIONAL_UNBOUND: tmp_109 = FALSE; break; case OPTIONAL_OMIT: tmp_109 = FALSE; break; default: { const RANAP__PDU__Descriptions::RANAP__PDU& tmp_111 = (const RANAP__PDU__Descriptions::RANAP__PDU&) tmp_110; tmp_109 = tmp_111.is_present(); break;} } } tmp_112 = tmp_109; } if (tmp_112) { current_location.update_lineno(1141); /* RAN_Emulation.ttcnpp, line 1141 */ f__handle__userData__RANAP(vc__conn, const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__cfm&>(rconn__cfm).userData()); } } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1145); /* RAN_Emulation.ttcnpp, line 1145 */ switch (RAN__Emulation__CT_component_CLIENT.receive(RANAP__PDU__Descriptions::RANAP__PDU_template(ANY_VALUE), &(ranap), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1146); /* RAN_Emulation.ttcnpp, line 1146 */ INTEGER conn__id(f__conn__id__by__comp(vc__conn)); current_location.update_lineno(1148); /* RAN_Emulation.ttcnpp, line 1148 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__DATA__req(conn__id, RANAP__PDU__Descriptions::RANAP__PDU_template(ranap)), FALSE, NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1152); /* RAN_Emulation.ttcnpp, line 1152 */ switch (RAN__Emulation__CT_component_CLIENT.receive(RANAP__CodecPort::RANAP__N__UNITDATA__req_template(ANY_VALUE), &(ranap__ud), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1153); /* RAN_Emulation.ttcnpp, line 1153 */ RAN__Emulation__CT_component_RANAP.send(ranap__ud, FALSE, NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1157); /* RAN_Emulation.ttcnpp, line 1157 */ switch (RAN__Emulation__CT_component_CLIENT.receive(tr__MSC__CONN__PRIM__CONNECT__RES, &(ran__conn__prim), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1158); /* RAN_Emulation.ttcnpp, line 1158 */ INTEGER conn__id(f__conn__id__by__comp(vc__conn)); current_location.update_lineno(1160); /* RAN_Emulation.ttcnpp, line 1160 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__CONNECT__res(conn__id, RANAP__PDU__Descriptions::RANAP__PDU_template(OMIT_VALUE)), FALSE, NULL); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1164); /* RAN_Emulation.ttcnpp, line 1164 */ switch (RAN__Emulation__CT_component_CLIENT.receive(tr__MSC__CONN__PRIM__DISC__REQ, &(ran__conn__prim), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1165); /* RAN_Emulation.ttcnpp, line 1165 */ INTEGER conn__id(f__conn__id__by__comp(vc__conn)); current_location.update_lineno(1166); /* RAN_Emulation.ttcnpp, line 1166 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__DISC__req(conn__id, INTEGER_template(const_cast< const RAN__Conn__Prim&>(ran__conn__prim).disc__req().reason()), RANAP__CodecPort::ts__RANAP__DISC__req_ranap_defval), FALSE, NULL); current_location.update_lineno(1167); /* RAN_Emulation.ttcnpp, line 1167 */ f__conn__table__del(conn__id); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1171); /* RAN_Emulation.ttcnpp, line 1171 */ switch (RAN__Emulation__CT_component_CLIENT.receive(RANAP__Conn__Req_template(ANY_VALUE), &(creq), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1172); /* RAN_Emulation.ttcnpp, line 1172 */ INTEGER conn__id; current_location.update_lineno(1175); /* RAN_Emulation.ttcnpp, line 1175 */ if ((f__comp__known(vc__conn) == FALSE)) { current_location.update_lineno(1177); /* RAN_Emulation.ttcnpp, line 1177 */ conn__id = f__gen__conn__id(); current_location.update_lineno(1180); /* RAN_Emulation.ttcnpp, line 1180 */ f__conn__table__add(vc__conn, conn__id); current_location.update_lineno(1182); /* RAN_Emulation.ttcnpp, line 1182 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__CONNECT__req(const_cast< const RANAP__Conn__Req&>(creq).addr__peer(), const_cast< const RANAP__Conn__Req&>(creq).addr__own(), conn__id, RANAP__PDU__Descriptions::RANAP__PDU_template(const_cast< const RANAP__Conn__Req&>(creq).ranap())), FALSE, NULL); } else { current_location.update_lineno(1186); /* RAN_Emulation.ttcnpp, line 1186 */ conn__id = f__conn__id__by__comp(vc__conn); current_location.update_lineno(1187); /* RAN_Emulation.ttcnpp, line 1187 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__DATA__req(conn__id, RANAP__PDU__Descriptions::RANAP__PDU_template(const_cast< const RANAP__Conn__Req&>(creq).ranap())), FALSE, NULL); } current_location.update_lineno(1192); /* RAN_Emulation.ttcnpp, line 1192 */ { boolean tmp_115; tmp_115 = const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms(); if (tmp_115) tmp_115 = (!(f__ranap__l3__is__rr(const_cast< const RANAP__Conn__Req&>(creq).ranap()))); if (tmp_115) { current_location.update_lineno(1194); /* RAN_Emulation.ttcnpp, line 1194 */ INTEGER idx(f__idx__by__comp(vc__conn)); current_location.update_lineno(1195); /* RAN_Emulation.ttcnpp, line 1195 */ RAN__Emulation__CT_component_ConnectionTable[idx].n__sd()[0] = 1; current_location.update_lineno(1196); /* RAN_Emulation.ttcnpp, line 1196 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("patch: N(SD) for ConnIdx "); idx.log(); TTCN_Logger::log_event_str(" set to 1"); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1200); /* RAN_Emulation.ttcnpp, line 1200 */ static boolean guard_expr_10 = FALSE; if (first_alt_run) { guard_expr_10 = const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms(); } if (guard_expr_10) { current_location.update_lineno(1200); /* RAN_Emulation.ttcnpp, line 1200 */ switch (RAN__Emulation__CT_component_CLIENT.receive(PDU__DTAP__PS__MO_template(ANY_VALUE), &(ps__mo), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1201); /* RAN_Emulation.ttcnpp, line 1201 */ INTEGER idx(f__idx__by__comp(vc__conn)); current_location.update_lineno(1203); /* RAN_Emulation.ttcnpp, line 1203 */ OCTETSTRING l3__enc(MobileL3__Types::enc__PDU__L3__MS__SGSN(const_cast< const PDU__DTAP__PS__MO&>(ps__mo).dtap())); current_location.update_lineno(1205); /* RAN_Emulation.ttcnpp, line 1205 */ if ((const_cast< const PDU__DTAP__PS__MO&>(ps__mo).skip__seq__patching() == FALSE)) { } current_location.update_lineno(1208); /* RAN_Emulation.ttcnpp, line 1208 */ f__xmit__raw__l3(INTEGER(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[idx].sccp__conn__id()), const_cast< const PDU__DTAP__PS__MO&>(ps__mo).dlci(), l3__enc); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } current_location.update_lineno(1211); /* RAN_Emulation.ttcnpp, line 1211 */ static boolean guard_expr_11 = FALSE; if (first_alt_run) { guard_expr_11 = (!(const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms())); } if (guard_expr_11) { current_location.update_lineno(1211); /* RAN_Emulation.ttcnpp, line 1211 */ switch (RAN__Emulation__CT_component_CLIENT.receive(PDU__DTAP__PS__MT_template(ANY_VALUE), &(ps__mt), any_compref, &(vc__conn), NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1212); /* RAN_Emulation.ttcnpp, line 1212 */ INTEGER idx(f__idx__by__comp(vc__conn)); current_location.update_lineno(1214); /* RAN_Emulation.ttcnpp, line 1214 */ OCTETSTRING l3__enc(MobileL3__Types::enc__PDU__L3__SGSN__MS(const_cast< const PDU__DTAP__PS__MT&>(ps__mt).dtap())); current_location.update_lineno(1215); /* RAN_Emulation.ttcnpp, line 1215 */ f__xmit__raw__l3(INTEGER(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[idx].sccp__conn__id()), const_cast< const PDU__DTAP__PS__MT&>(ps__mt).dlci(), l3__enc); } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } return ret_val; } void as__main__ranap(boolean nodefault_modifier) { 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__main__ranap_instance(!block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_main_ranap."); else block_flag = TRUE; } } Default_Base *activate_as__main__ranap() { return new as__main__ranap_Default(); } alt_status as__main__mgcp_instance(boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1224, TTCN_Location::LOCATION_ALTSTEP, "as_main_mgcp"); alt_status ret_val = ALT_NO; current_location.update_lineno(1269); /* RAN_Emulation.ttcnpp, line 1269 */ static boolean guard_expr_0 = FALSE; if (first_alt_run) { guard_expr_0 = FALSE; } if (guard_expr_0) { current_location.update_lineno(1269); /* RAN_Emulation.ttcnpp, line 1269 */ switch (RAN__Emulation__CT_component_CLIENT.receive(any_compref, NULL, NULL, NULL)) { case ALT_YES: return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } return ret_val; } void as__main__mgcp(boolean nodefault_modifier) { 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__main__mgcp_instance(!block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_main_mgcp."); else block_flag = TRUE; } } Default_Base *activate_as__main__mgcp() { return new as__main__mgcp_Default(); } alt_status as__main__ctrl_instance(boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1273, TTCN_Location::LOCATION_ALTSTEP, "as_main_ctrl"); alt_status ret_val = ALT_NO; current_location.update_lineno(1300); /* RAN_Emulation.ttcnpp, line 1300 */ static boolean guard_expr_0 = FALSE; if (first_alt_run) { guard_expr_0 = FALSE; } if (guard_expr_0) { current_location.update_lineno(1300); /* RAN_Emulation.ttcnpp, line 1300 */ switch (RAN__Emulation__CT_component_CLIENT.receive(any_compref, NULL, NULL, NULL)) { case ALT_YES: return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } } return ret_val; } void as__main__ctrl(boolean nodefault_modifier) { 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__main__ctrl_instance(!block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_main_ctrl."); else block_flag = TRUE; } } Default_Base *activate_as__main__ctrl() { return new as__main__ctrl_Default(); } void f__xmit__raw__l3(const INTEGER& sccp__conn__id, const OCTETSTRING& dlci, const OCTETSTRING& l3__enc) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1305, TTCN_Location::LOCATION_FUNCTION, "f_xmit_raw_l3"); { const RanProtocol &tmp_118 = const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).protocol(); current_location.update_lineno(1316); /* RAN_Emulation.ttcnpp, line 1316 */ if(tmp_118 == RanProtocol::RAN__PROTOCOL__RANAP) goto tmp_117_0; goto tmp_117_end; tmp_117_0: { current_location.update_lineno(1317); /* RAN_Emulation.ttcnpp, line 1317 */ RANAP__IEs::SAPI_template sapi(OMIT_VALUE); current_location.update_lineno(1318); /* RAN_Emulation.ttcnpp, line 1318 */ RANAP__PDU__Descriptions::RANAP__PDU ranap; current_location.update_lineno(1321); /* RAN_Emulation.ttcnpp, line 1321 */ if (((dlci & os_4) == os_2)) { current_location.update_lineno(1322); /* RAN_Emulation.ttcnpp, line 1322 */ sapi = RANAP__IEs::SAPI::sapi__3; } current_location.update_lineno(1325); /* RAN_Emulation.ttcnpp, line 1325 */ ranap = RANAP__Templates::ts__RANAP__DirectTransfer(OCTETSTRING_template(l3__enc), sapi, RANAP__Templates::ts__RANAP__DirectTransfer_ies_defval, RANAP__Templates::ts__RANAP__DirectTransfer_exts_defval).valueof(); current_location.update_lineno(1326); /* RAN_Emulation.ttcnpp, line 1326 */ RAN__Emulation__CT_component_RANAP.send(RANAP__CodecPort::ts__RANAP__DATA__req(sccp__conn__id, RANAP__PDU__Descriptions::RANAP__PDU_template(ranap)), FALSE, NULL); goto tmp_117_end; } tmp_117_end: /* empty */; } } void start_f__xmit__raw__l3(const COMPONENT& component_reference, const INTEGER& sccp__conn__id, const OCTETSTRING& dlci, const OCTETSTRING& l3__enc) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_xmit_raw_l3("); sccp__conn__id.log(); TTCN_Logger::log_event_str(", "); dlci.log(); TTCN_Logger::log_event_str(", "); l3__enc.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, "RAN_Emulation", "f_xmit_raw_l3", text_buf); sccp__conn__id.encode_text(text_buf); dlci.encode_text(text_buf); l3__enc.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void main_(const RanOps& ops, const CHARSTRING& id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1332, TTCN_Location::LOCATION_FUNCTION, "main"); current_location.update_lineno(1334); /* RAN_Emulation.ttcnpp, line 1334 */ RAN__Emulation__CT_component_g__ran__id = id; current_location.update_lineno(1335); /* RAN_Emulation.ttcnpp, line 1335 */ RAN__Emulation__CT_component_g__ran__ops = ops; current_location.update_lineno(1336); /* RAN_Emulation.ttcnpp, line 1336 */ f__conn__table__init(); current_location.update_lineno(1337); /* RAN_Emulation.ttcnpp, line 1337 */ f__expect__table__init(); current_location.update_lineno(1339); /* RAN_Emulation.ttcnpp, line 1339 */ { boolean tmp_123; { boolean tmp_124 = ops.is_bound(); if(tmp_124) { const OPTIONAL< SCCPasp__Types::SCCP__PAR__Address >& tmp_125 = ops.sccp__addr__peer(); switch (tmp_125.get_selection()) { case OPTIONAL_UNBOUND: tmp_124 = FALSE; break; case OPTIONAL_OMIT: tmp_124 = FALSE; break; default: { const SCCPasp__Types::SCCP__PAR__Address& tmp_126 = (const SCCPasp__Types::SCCP__PAR__Address&) tmp_125; tmp_124 = tmp_126.is_value(); break;} } } tmp_123 = tmp_124; } if (tmp_123) { boolean tmp_127 = ops.is_bound(); if(tmp_127) { const OPTIONAL< SCCPasp__Types::SCCP__PAR__Address >& tmp_128 = ops.sccp__addr__local(); switch (tmp_128.get_selection()) { case OPTIONAL_UNBOUND: tmp_127 = FALSE; break; case OPTIONAL_OMIT: tmp_127 = FALSE; break; default: { const SCCPasp__Types::SCCP__PAR__Address& tmp_129 = (const SCCPasp__Types::SCCP__PAR__Address&) tmp_128; tmp_127 = tmp_129.is_value(); break;} } } tmp_123 = tmp_127; } if (tmp_123) { current_location.update_lineno(1340); /* RAN_Emulation.ttcnpp, line 1340 */ Osmocom__Types::f__sleep(1.0); { const RanProtocol &tmp_131 = const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).protocol(); current_location.update_lineno(1348); /* RAN_Emulation.ttcnpp, line 1348 */ if(tmp_131 == RanProtocol::RAN__PROTOCOL__RANAP) goto tmp_130_0; goto tmp_130_end; tmp_130_0: { current_location.update_lineno(1349); /* RAN_Emulation.ttcnpp, line 1349 */ f__ranap__reset(const_cast< const RanOps&>(ops).sccp__addr__peer(), const_cast< const RanOps&>(ops).sccp__addr__local(), RANAP__IEs::GlobalRNC__ID_template(const_cast< const RanOps&>(ops).grnc__id())); goto tmp_130_end; } tmp_130_end: /* empty */; } } } for ( ; ; ) { current_location.update_lineno(1356); /* RAN_Emulation.ttcnpp, line 1356 */ COMPONENT vc__conn; current_location.update_lineno(1357); /* RAN_Emulation.ttcnpp, line 1357 */ PDU__DTAP__MO dtap__mo; current_location.update_lineno(1358); /* RAN_Emulation.ttcnpp, line 1358 */ PDU__DTAP__MT dtap__mt; current_location.update_lineno(1359); /* RAN_Emulation.ttcnpp, line 1359 */ COMPONENT vc__hdlr; current_location.update_lineno(1360); /* RAN_Emulation.ttcnpp, line 1360 */ OCTETSTRING l3__info; current_location.update_lineno(1361); /* RAN_Emulation.ttcnpp, line 1361 */ HEXSTRING imsi; current_location.update_lineno(1362); /* RAN_Emulation.ttcnpp, line 1362 */ OCTETSTRING tmsi; current_location.update_lineno(1363); /* RAN_Emulation.ttcnpp, line 1363 */ INTEGER targetPointCode; current_location.update_lineno(1365); /* RAN_Emulation.ttcnpp, line 1365 */ BITSTRING sigc__id; current_location.update_lineno(1368); /* RAN_Emulation.ttcnpp, line 1368 */ { tmp_132: alt_status tmp_132_alt_flag_0 = ALT_UNCHECKED; alt_status tmp_132_alt_flag_1 = ALT_UNCHECKED; alt_status tmp_132_alt_flag_2 = ALT_UNCHECKED; alt_status tmp_132_alt_flag_3 = ALT_UNCHECKED; alt_status tmp_132_alt_flag_4 = ALT_MAYBE; alt_status tmp_132_alt_flag_5 = ALT_MAYBE; alt_status tmp_132_alt_flag_6 = ALT_MAYBE; alt_status tmp_132_alt_flag_7 = ALT_MAYBE; alt_status tmp_132_alt_flag_8 = ALT_MAYBE; alt_status tmp_132_alt_flag_9 = ALT_MAYBE; alt_status tmp_132_alt_flag_10 = ALT_MAYBE; alt_status tmp_132_alt_flag_11 = ALT_MAYBE; alt_status tmp_132_default_flag = ALT_MAYBE; boolean first_run = TRUE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_132_alt_flag_0 == ALT_UNCHECKED) { current_location.update_lineno(1369); /* RAN_Emulation.ttcnpp, line 1369 */ if ((const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).protocol() == RanProtocol::RAN__PROTOCOL__BSSAP)) tmp_132_alt_flag_0 = ALT_MAYBE; else tmp_132_alt_flag_0 = ALT_NO; } if (tmp_132_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1369); /* RAN_Emulation.ttcnpp, line 1369 */ tmp_132_alt_flag_0 = as__main__bssap_instance(first_run); if (tmp_132_alt_flag_0 == ALT_REPEAT) goto tmp_132; if (tmp_132_alt_flag_0 == ALT_BREAK) break; if (tmp_132_alt_flag_0 == ALT_YES) break; } if (tmp_132_alt_flag_1 == ALT_UNCHECKED) { current_location.update_lineno(1370); /* RAN_Emulation.ttcnpp, line 1370 */ if ((const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).protocol() == RanProtocol::RAN__PROTOCOL__RANAP)) tmp_132_alt_flag_1 = ALT_MAYBE; else tmp_132_alt_flag_1 = ALT_NO; } if (tmp_132_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1370); /* RAN_Emulation.ttcnpp, line 1370 */ tmp_132_alt_flag_1 = as__main__ranap_instance(first_run); if (tmp_132_alt_flag_1 == ALT_REPEAT) goto tmp_132; if (tmp_132_alt_flag_1 == ALT_BREAK) break; if (tmp_132_alt_flag_1 == ALT_YES) break; } if (tmp_132_alt_flag_2 == ALT_UNCHECKED) { current_location.update_lineno(1372); /* RAN_Emulation.ttcnpp, line 1372 */ if (const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms()) tmp_132_alt_flag_2 = ALT_MAYBE; else tmp_132_alt_flag_2 = ALT_NO; } if (tmp_132_alt_flag_2 == ALT_MAYBE) { current_location.update_lineno(1372); /* RAN_Emulation.ttcnpp, line 1372 */ tmp_132_alt_flag_2 = RAN__Emulation__CT_component_CLIENT.receive(PDU__DTAP__MO_template(ANY_VALUE), &(dtap__mo), any_compref, &(vc__conn), NULL, NULL); if (tmp_132_alt_flag_2 == ALT_YES) { current_location.update_lineno(1373); /* RAN_Emulation.ttcnpp, line 1373 */ INTEGER idx(f__idx__by__comp(vc__conn)); current_location.update_lineno(1375); /* RAN_Emulation.ttcnpp, line 1375 */ OCTETSTRING l3__enc(MobileL3__Types::enc__PDU__ML3__MS__NW(const_cast< const PDU__DTAP__MO&>(dtap__mo).dtap())); current_location.update_lineno(1377); /* RAN_Emulation.ttcnpp, line 1377 */ if ((const_cast< const PDU__DTAP__MO&>(dtap__mo).skip__seq__patching() == FALSE)) { current_location.update_lineno(1378); /* RAN_Emulation.ttcnpp, line 1378 */ f__ML3__patch__seq(RAN__Emulation__CT_component_ConnectionTable[idx], const_cast< const PDU__DTAP__MO&>(dtap__mo).dtap(), l3__enc); } current_location.update_lineno(1380); /* RAN_Emulation.ttcnpp, line 1380 */ f__xmit__raw__l3(INTEGER(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[idx].sccp__conn__id()), const_cast< const PDU__DTAP__MO&>(dtap__mo).dlci(), l3__enc); break; } } if (tmp_132_alt_flag_3 == ALT_UNCHECKED) { current_location.update_lineno(1383); /* RAN_Emulation.ttcnpp, line 1383 */ if ((!(const_cast< const RanOps&>(RAN__Emulation__CT_component_g__ran__ops).role__ms()))) tmp_132_alt_flag_3 = ALT_MAYBE; else tmp_132_alt_flag_3 = ALT_NO; } if (tmp_132_alt_flag_3 == ALT_MAYBE) { current_location.update_lineno(1383); /* RAN_Emulation.ttcnpp, line 1383 */ tmp_132_alt_flag_3 = RAN__Emulation__CT_component_CLIENT.receive(PDU__DTAP__MT_template(ANY_VALUE), &(dtap__mt), any_compref, &(vc__conn), NULL, NULL); if (tmp_132_alt_flag_3 == ALT_YES) { current_location.update_lineno(1384); /* RAN_Emulation.ttcnpp, line 1384 */ INTEGER idx(f__idx__by__comp(vc__conn)); current_location.update_lineno(1386); /* RAN_Emulation.ttcnpp, line 1386 */ OCTETSTRING l3__enc(MobileL3__Types::enc__PDU__ML3__NW__MS(const_cast< const PDU__DTAP__MT&>(dtap__mt).dtap())); current_location.update_lineno(1387); /* RAN_Emulation.ttcnpp, line 1387 */ f__xmit__raw__l3(INTEGER(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ConnectionTable)[idx].sccp__conn__id()), const_cast< const PDU__DTAP__MT&>(dtap__mt).dlci(), l3__enc); break; } } if (tmp_132_alt_flag_4 == ALT_MAYBE) { current_location.update_lineno(1390); /* RAN_Emulation.ttcnpp, line 1390 */ tmp_132_alt_flag_4 = as__main__mgcp_instance(first_run); if (tmp_132_alt_flag_4 == ALT_REPEAT) goto tmp_132; if (tmp_132_alt_flag_4 == ALT_BREAK) break; if (tmp_132_alt_flag_4 == ALT_YES) break; } if (tmp_132_alt_flag_5 == ALT_MAYBE) { current_location.update_lineno(1391); /* RAN_Emulation.ttcnpp, line 1391 */ tmp_132_alt_flag_5 = as__main__ctrl_instance(first_run); if (tmp_132_alt_flag_5 == ALT_REPEAT) goto tmp_132; if (tmp_132_alt_flag_5 == ALT_BREAK) break; if (tmp_132_alt_flag_5 == ALT_YES) break; } if (tmp_132_alt_flag_6 == ALT_MAYBE) { current_location.update_lineno(1393); /* RAN_Emulation.ttcnpp, line 1393 */ { RAN__register_template tmp_133; tmp_133.l3() = ANY_VALUE; tmp_133.hdlr() = ANY_VALUE; tmp_132_alt_flag_6 = RAN__Emulation__CT_component_PROC.getcall(tmp_133, any_compref, RAN__register_call_redirect(&(l3__info), &(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_6 == ALT_YES) { current_location.update_lineno(1394); /* RAN_Emulation.ttcnpp, line 1394 */ f__create__expect(OCTETSTRING_template(l3__info), vc__hdlr, f__create__expect_n__connectPointCode_defval); current_location.update_lineno(1395); /* RAN_Emulation.ttcnpp, line 1395 */ { RAN__register_template tmp_134; tmp_134.l3() = l3__info; tmp_134.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_134, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_alt_flag_7 == ALT_MAYBE) { current_location.update_lineno(1398); /* RAN_Emulation.ttcnpp, line 1398 */ { RAN__register__n__connect_template tmp_135; tmp_135.targetPointCode() = ANY_VALUE; tmp_135.hdlr() = ANY_VALUE; tmp_132_alt_flag_7 = RAN__Emulation__CT_component_PROC.getcall(tmp_135, any_compref, RAN__register__n__connect_call_redirect(&(targetPointCode), &(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_7 == ALT_YES) { current_location.update_lineno(1399); /* RAN_Emulation.ttcnpp, line 1399 */ f__create__expect(OCTETSTRING_template(OMIT_VALUE), vc__hdlr, INTEGER_template(targetPointCode)); current_location.update_lineno(1400); /* RAN_Emulation.ttcnpp, line 1400 */ { RAN__register__n__connect_template tmp_136; tmp_136.targetPointCode() = targetPointCode; tmp_136.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_136, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_alt_flag_8 == ALT_MAYBE) { current_location.update_lineno(1403); /* RAN_Emulation.ttcnpp, line 1403 */ { RAN__register__sccp__cr__without__payload_template tmp_137; tmp_137.hdlr() = ANY_VALUE; tmp_132_alt_flag_8 = RAN__Emulation__CT_component_PROC.getcall(tmp_137, any_compref, RAN__register__sccp__cr__without__payload_call_redirect(&(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_8 == ALT_YES) { current_location.update_lineno(1404); /* RAN_Emulation.ttcnpp, line 1404 */ f__create__expect(OCTETSTRING_template(OMIT_VALUE), vc__hdlr, f__create__expect_n__connectPointCode_defval); current_location.update_lineno(1405); /* RAN_Emulation.ttcnpp, line 1405 */ { RAN__register__sccp__cr__without__payload_template tmp_138; tmp_138.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_138, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_alt_flag_9 == ALT_MAYBE) { current_location.update_lineno(1408); /* RAN_Emulation.ttcnpp, line 1408 */ { RAN__register__imsi_template tmp_139; tmp_139.imsi() = ANY_VALUE; tmp_139.tmsi() = ANY_VALUE; tmp_139.hdlr() = ANY_VALUE; tmp_132_alt_flag_9 = RAN__Emulation__CT_component_PROC.getcall(tmp_139, any_compref, RAN__register__imsi_call_redirect(&(imsi), &(tmsi), &(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_9 == ALT_YES) { current_location.update_lineno(1409); /* RAN_Emulation.ttcnpp, line 1409 */ f__create__imsi(imsi, tmsi, vc__hdlr); current_location.update_lineno(1410); /* RAN_Emulation.ttcnpp, line 1410 */ { RAN__register__imsi_template tmp_140; tmp_140.imsi() = imsi; tmp_140.tmsi() = tmsi; tmp_140.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_140, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_alt_flag_10 == ALT_MAYBE) { current_location.update_lineno(1412); /* RAN_Emulation.ttcnpp, line 1412 */ { RAN__unregister__imsi_template tmp_141; tmp_141.imsi() = ANY_VALUE; tmp_141.hdlr() = ANY_VALUE; tmp_132_alt_flag_10 = RAN__Emulation__CT_component_PROC.getcall(tmp_141, any_compref, RAN__unregister__imsi_call_redirect(&(imsi), &(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_10 == ALT_YES) { current_location.update_lineno(1413); /* RAN_Emulation.ttcnpp, line 1413 */ f__destroy__imsi(imsi, vc__hdlr); current_location.update_lineno(1414); /* RAN_Emulation.ttcnpp, line 1414 */ { RAN__unregister__imsi_template tmp_142; tmp_142.imsi() = imsi; tmp_142.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_142, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_alt_flag_11 == ALT_MAYBE) { current_location.update_lineno(1417); /* RAN_Emulation.ttcnpp, line 1417 */ { RAN__register__IuSigConId_template tmp_143; tmp_143.sigc__id() = ANY_VALUE; tmp_143.hdlr() = ANY_VALUE; tmp_132_alt_flag_11 = RAN__Emulation__CT_component_PROC.getcall(tmp_143, any_compref, RAN__register__IuSigConId_call_redirect(&(sigc__id), &(vc__hdlr)), NULL, NULL, NULL); } if (tmp_132_alt_flag_11 == ALT_YES) { current_location.update_lineno(1418); /* RAN_Emulation.ttcnpp, line 1418 */ f__create__IuSigConId(sigc__id, vc__hdlr); current_location.update_lineno(1419); /* RAN_Emulation.ttcnpp, line 1419 */ { RAN__register__IuSigConId_template tmp_144; tmp_144.sigc__id() = sigc__id; tmp_144.hdlr() = vc__hdlr; RAN__Emulation__CT_component_PROC.reply(tmp_144, COMPONENT(vc__hdlr), NULL); } break; } } if (tmp_132_default_flag == ALT_MAYBE) { tmp_132_default_flag = TTCN_Default::try_altsteps(first_run); if (tmp_132_default_flag == ALT_YES || tmp_132_default_flag == ALT_BREAK) break; else if (tmp_132_default_flag == ALT_REPEAT) goto tmp_132; } current_location.update_lineno(1368); /* RAN_Emulation.ttcnpp, line 1368 */ if (tmp_132_alt_flag_0 == ALT_NO && tmp_132_alt_flag_1 == ALT_NO && tmp_132_alt_flag_2 == ALT_NO && tmp_132_alt_flag_3 == ALT_NO && tmp_132_alt_flag_4 == ALT_NO && tmp_132_alt_flag_5 == ALT_NO && tmp_132_alt_flag_6 == ALT_NO && tmp_132_alt_flag_7 == ALT_NO && tmp_132_alt_flag_8 == ALT_NO && tmp_132_alt_flag_9 == ALT_NO && tmp_132_alt_flag_10 == ALT_NO && tmp_132_alt_flag_11 == ALT_NO && tmp_132_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file RAN_Emulation.ttcnpp between lines 1368 and 1422."); TTCN_Snapshot::take_new(TRUE); first_run = FALSE; } } } } void start_main_(const COMPONENT& component_reference, const RanOps& ops, const CHARSTRING& id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function main("); ops.log(); TTCN_Logger::log_event_str(", "); 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, "RAN_Emulation", "main", text_buf); ops.encode_text(text_buf); id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } COMPONENT RanapExpectedCreateCallback(const RANAP__CodecPort::RANAP__N__CONNECT__ind& conn__ind, const CHARSTRING& ) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1542, TTCN_Location::LOCATION_FUNCTION, "RanapExpectedCreateCallback"); current_location.update_lineno(1544); /* RAN_Emulation.ttcnpp, line 1544 */ COMPONENT ret(NULL_COMPREF); current_location.update_lineno(1545); /* RAN_Emulation.ttcnpp, line 1545 */ OCTETSTRING_template l3__info; current_location.update_lineno(1546); /* RAN_Emulation.ttcnpp, line 1546 */ BOOLEAN rx__sccp__cr__without__payload; current_location.update_lineno(1547); /* RAN_Emulation.ttcnpp, line 1547 */ INTEGER i; current_location.update_lineno(1549); /* RAN_Emulation.ttcnpp, line 1549 */ { boolean tmp_148; { boolean tmp_145 = conn__ind.is_bound(); if(tmp_145) { const OPTIONAL< RANAP__PDU__Descriptions::RANAP__PDU >& tmp_146 = conn__ind.userData(); switch (tmp_146.get_selection()) { case OPTIONAL_UNBOUND: tmp_145 = FALSE; break; case OPTIONAL_OMIT: tmp_145 = FALSE; break; default: { const RANAP__PDU__Descriptions::RANAP__PDU& tmp_147 = (const RANAP__PDU__Descriptions::RANAP__PDU&) tmp_146; tmp_145 = tmp_147.is_present(); break;} } } tmp_148 = tmp_145; } if (tmp_148) { current_location.update_lineno(1550); /* RAN_Emulation.ttcnpp, line 1550 */ l3__info = RANAP__Templates::f__ranap__extract__l3(const_cast< const RANAP__CodecPort::RANAP__N__CONNECT__ind&>(conn__ind).userData()); current_location.update_lineno(1551); /* RAN_Emulation.ttcnpp, line 1551 */ rx__sccp__cr__without__payload = FALSE; current_location.update_lineno(1552); /* RAN_Emulation.ttcnpp, line 1552 */ { boolean tmp_151; tmp_151 = l3__info.get_istemplate_kind((const char*)cs_0); if (tmp_151) tmp_151 = (!(rx__sccp__cr__without__payload)); if (tmp_151) { current_location.update_lineno(1553); /* RAN_Emulation.ttcnpp, line 1553 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("N-CONNECT.ind without NAS payload"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1554); /* RAN_Emulation.ttcnpp, line 1554 */ TTCN_Runtime::stop_component(MTC_COMPREF); current_location.update_lineno(1555); /* RAN_Emulation.ttcnpp, line 1555 */ return ret; } } } else { current_location.update_lineno(1558); /* RAN_Emulation.ttcnpp, line 1558 */ l3__info = OMIT_VALUE; current_location.update_lineno(1559); /* RAN_Emulation.ttcnpp, line 1559 */ rx__sccp__cr__without__payload = TRUE; } } current_location.update_lineno(1562); /* RAN_Emulation.ttcnpp, line 1562 */ i = 0; current_location.update_lineno(1562); /* RAN_Emulation.ttcnpp, line 1562 */ for ( ; ; ) { current_location.update_lineno(1562); /* RAN_Emulation.ttcnpp, line 1562 */ if (!(i < 16)) break; current_location.update_lineno(1563); /* RAN_Emulation.ttcnpp, line 1563 */ { boolean tmp_155; { boolean tmp_156; tmp_156 = rx__sccp__cr__without__payload; if (tmp_156) tmp_156 = const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ExpectTable)[i].sccp__cr__without__payload(); tmp_155 = tmp_156; } if (!tmp_155) { boolean tmp_157; { boolean tmp_158 = RAN__Emulation__CT_component_ExpectTable.is_bound(); if(tmp_158) { const int tmp_159 = i; tmp_158 = (tmp_159 >= 0) && (RAN__Emulation__CT_component_ExpectTable.size_of() > tmp_159); if(tmp_158) { const ExpectData& tmp_160 = RAN__Emulation__CT_component_ExpectTable[tmp_159]; tmp_158 = tmp_160.is_bound(); if(tmp_158) { const OPTIONAL< OCTETSTRING >& tmp_161 = tmp_160.l3__payload(); switch (tmp_161.get_selection()) { case OPTIONAL_UNBOUND: tmp_158 = FALSE; break; case OPTIONAL_OMIT: tmp_158 = FALSE; break; default: { const OCTETSTRING& tmp_162 = (const OCTETSTRING&) tmp_161; tmp_158 = tmp_162.is_present(); break;} } } } } tmp_157 = tmp_158; } if (tmp_157) tmp_157 = (l3__info.valueof() == const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ExpectTable)[i].l3__payload()); tmp_155 = tmp_157; } if (tmp_155) { current_location.update_lineno(1565); /* RAN_Emulation.ttcnpp, line 1565 */ ret = const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ExpectTable)[i].vc__conn(); current_location.update_lineno(1567); /* RAN_Emulation.ttcnpp, line 1567 */ RAN__Emulation__CT_component_ExpectTable[i].sccp__cr__without__payload() = FALSE; current_location.update_lineno(1568); /* RAN_Emulation.ttcnpp, line 1568 */ RAN__Emulation__CT_component_ExpectTable[i].l3__payload() = OMIT_VALUE; current_location.update_lineno(1569); /* RAN_Emulation.ttcnpp, line 1569 */ RAN__Emulation__CT_component_ExpectTable[i].vc__conn() = NULL_COMPREF; current_location.update_lineno(1570); /* RAN_Emulation.ttcnpp, line 1570 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Found Expect["); i.log(); TTCN_Logger::log_event_str("] for l3="); l3__info.log(); TTCN_Logger::log_event_str(" handled at "); ret.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(1572); /* RAN_Emulation.ttcnpp, line 1572 */ return ret; } } current_location.update_lineno(1562); /* RAN_Emulation.ttcnpp, line 1562 */ { INTEGER tmp_167; ++i; } } current_location.update_lineno(1575); /* RAN_Emulation.ttcnpp, line 1575 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Couldn't find Expect for incoming connection "),conn__ind.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1576); /* RAN_Emulation.ttcnpp, line 1576 */ TTCN_Runtime::stop_component(MTC_COMPREF); current_location.update_lineno(1577); /* RAN_Emulation.ttcnpp, line 1577 */ return ret; } void start_RanapExpectedCreateCallback(const COMPONENT& component_reference, const RANAP__CodecPort::RANAP__N__CONNECT__ind& conn__ind, const CHARSTRING& id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function RanapExpectedCreateCallback("); conn__ind.log(); TTCN_Logger::log_event_str(", "); 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, "RAN_Emulation", "RanapExpectedCreateCallback", text_buf); conn__ind.encode_text(text_buf); id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__create__IuSigConId(const BITSTRING& sigc__id, const COMPONENT& hdlr) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1580, TTCN_Location::LOCATION_FUNCTION, "f_create_IuSigConId"); { current_location.update_lineno(1582); /* RAN_Emulation.ttcnpp, line 1582 */ INTEGER i(0); current_location.update_lineno(1582); /* RAN_Emulation.ttcnpp, line 1582 */ for ( ; ; ) { current_location.update_lineno(1582); /* RAN_Emulation.ttcnpp, line 1582 */ if (!(i < 16)) break; current_location.update_lineno(1583); /* RAN_Emulation.ttcnpp, line 1583 */ { boolean tmp_173; { boolean tmp_168 = RAN__Emulation__CT_component_IuSigConIdTable.is_bound(); if(tmp_168) { const int tmp_169 = i; tmp_168 = (tmp_169 >= 0) && (RAN__Emulation__CT_component_IuSigConIdTable.size_of() > tmp_169); if(tmp_168) { const IuSigConIdMapping& tmp_170 = RAN__Emulation__CT_component_IuSigConIdTable[tmp_169]; tmp_168 = tmp_170.is_bound(); if(tmp_168) { const OPTIONAL< BITSTRING >& tmp_171 = tmp_170.sigc__id(); switch (tmp_171.get_selection()) { case OPTIONAL_UNBOUND: tmp_168 = FALSE; break; case OPTIONAL_OMIT: tmp_168 = FALSE; break; default: { const BITSTRING& tmp_172 = (const BITSTRING&) tmp_171; tmp_168 = tmp_172.is_present(); break;} } } } } tmp_173 = (!(tmp_168)); } if (tmp_173) { current_location.update_lineno(1584); /* RAN_Emulation.ttcnpp, line 1584 */ RAN__Emulation__CT_component_IuSigConIdTable[i].sigc__id() = sigc__id; current_location.update_lineno(1585); /* RAN_Emulation.ttcnpp, line 1585 */ RAN__Emulation__CT_component_IuSigConIdTable[i].comp__ref() = hdlr; current_location.update_lineno(1586); /* RAN_Emulation.ttcnpp, line 1586 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Created IuSigConId["); i.log(); TTCN_Logger::log_event_str("] for "); sigc__id.log(); TTCN_Logger::log_event_str(" to be handled at "); hdlr.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(1587); /* RAN_Emulation.ttcnpp, line 1587 */ return; } } current_location.update_lineno(1582); /* RAN_Emulation.ttcnpp, line 1582 */ { INTEGER tmp_176; ++i; } } } current_location.update_lineno(1590); /* RAN_Emulation.ttcnpp, line 1590 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No space left in IuSigConIdTable"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1591); /* RAN_Emulation.ttcnpp, line 1591 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__create__IuSigConId(const COMPONENT& component_reference, const BITSTRING& sigc__id, const COMPONENT& hdlr) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_IuSigConId("); sigc__id.log(); TTCN_Logger::log_event_str(", "); hdlr.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, "RAN_Emulation", "f_create_IuSigConId", text_buf); sigc__id.encode_text(text_buf); hdlr.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } COMPONENT f__IuSigConId__table__find(const BITSTRING& sigc__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1594, TTCN_Location::LOCATION_FUNCTION, "f_IuSigConId_table_find"); { current_location.update_lineno(1596); /* RAN_Emulation.ttcnpp, line 1596 */ INTEGER i(0); current_location.update_lineno(1596); /* RAN_Emulation.ttcnpp, line 1596 */ for ( ; ; ) { current_location.update_lineno(1596); /* RAN_Emulation.ttcnpp, line 1596 */ if (!(i < 16)) break; current_location.update_lineno(1597); /* RAN_Emulation.ttcnpp, line 1597 */ { boolean tmp_177; { boolean tmp_178 = RAN__Emulation__CT_component_IuSigConIdTable.is_bound(); if(tmp_178) { const int tmp_179 = i; tmp_178 = (tmp_179 >= 0) && (RAN__Emulation__CT_component_IuSigConIdTable.size_of() > tmp_179); if(tmp_178) { const IuSigConIdMapping& tmp_180 = RAN__Emulation__CT_component_IuSigConIdTable[tmp_179]; tmp_178 = tmp_180.is_bound(); if(tmp_178) { const OPTIONAL< BITSTRING >& tmp_181 = tmp_180.sigc__id(); switch (tmp_181.get_selection()) { case OPTIONAL_UNBOUND: tmp_178 = FALSE; break; case OPTIONAL_OMIT: tmp_178 = FALSE; break; default: { const BITSTRING& tmp_182 = (const BITSTRING&) tmp_181; tmp_178 = tmp_182.is_value(); break;} } } } } tmp_177 = tmp_178; } if (tmp_177) tmp_177 = BITSTRING_template(sigc__id).match(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_IuSigConIdTable)[i].sigc__id()); if (tmp_177) { current_location.update_lineno(1598); /* RAN_Emulation.ttcnpp, line 1598 */ return const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_IuSigConIdTable)[i].comp__ref(); } } current_location.update_lineno(1596); /* RAN_Emulation.ttcnpp, line 1596 */ { INTEGER tmp_183; ++i; } } } current_location.update_lineno(1601); /* RAN_Emulation.ttcnpp, line 1601 */ return NULL_COMPREF; } void start_f__IuSigConId__table__find(const COMPONENT& component_reference, const BITSTRING& sigc__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_IuSigConId_table_find("); sigc__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, "RAN_Emulation", "f_IuSigConId_table_find", text_buf); sigc__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__create__expect(const OCTETSTRING_template& l3, const COMPONENT& hdlr, const INTEGER_template& n__connectPointCode) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1605, TTCN_Location::LOCATION_FUNCTION, "f_create_expect"); current_location.update_lineno(1608); /* RAN_Emulation.ttcnpp, line 1608 */ INTEGER i; current_location.update_lineno(1609); /* RAN_Emulation.ttcnpp, line 1609 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("f_create_expect(l3 := "); l3.log(); TTCN_Logger::log_event_str(", n_connectPointCode := "); n__connectPointCode.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(1610); /* RAN_Emulation.ttcnpp, line 1610 */ i = 0; current_location.update_lineno(1610); /* RAN_Emulation.ttcnpp, line 1610 */ for ( ; ; ) { current_location.update_lineno(1610); /* RAN_Emulation.ttcnpp, line 1610 */ if (!(i < 16)) break; current_location.update_lineno(1611); /* RAN_Emulation.ttcnpp, line 1611 */ { boolean tmp_185; { boolean tmp_186; { boolean tmp_187 = RAN__Emulation__CT_component_ExpectTable.is_bound(); if(tmp_187) { const int tmp_188 = i; tmp_187 = (tmp_188 >= 0) && (RAN__Emulation__CT_component_ExpectTable.size_of() > tmp_188); if(tmp_187) { const ExpectData& tmp_189 = RAN__Emulation__CT_component_ExpectTable[tmp_188]; tmp_187 = tmp_189.is_bound(); if(tmp_187) { const OPTIONAL< OCTETSTRING >& tmp_190 = tmp_189.l3__payload(); switch (tmp_190.get_selection()) { case OPTIONAL_UNBOUND: tmp_187 = FALSE; break; case OPTIONAL_OMIT: tmp_187 = FALSE; break; default: { const OCTETSTRING& tmp_191 = (const OCTETSTRING&) tmp_190; tmp_187 = tmp_191.is_present(); break;} } } } } tmp_186 = (!(tmp_187)); } if (tmp_186) tmp_186 = (!(const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ExpectTable)[i].sccp__cr__without__payload())); tmp_185 = tmp_186; } if (tmp_185) { boolean tmp_192 = RAN__Emulation__CT_component_ExpectTable.is_bound(); if(tmp_192) { const int tmp_193 = i; tmp_192 = (tmp_193 >= 0) && (RAN__Emulation__CT_component_ExpectTable.size_of() > tmp_193); if(tmp_192) { const ExpectData& tmp_194 = RAN__Emulation__CT_component_ExpectTable[tmp_193]; tmp_192 = tmp_194.is_bound(); if(tmp_192) { const OPTIONAL< INTEGER >& tmp_195 = tmp_194.n__connectPointCode(); switch (tmp_195.get_selection()) { case OPTIONAL_UNBOUND: tmp_192 = FALSE; break; case OPTIONAL_OMIT: tmp_192 = FALSE; break; default: { const INTEGER& tmp_196 = (const INTEGER&) tmp_195; tmp_192 = tmp_196.is_present(); break;} } } } } tmp_185 = (!(tmp_192)); } if (tmp_185) { current_location.update_lineno(1614); /* RAN_Emulation.ttcnpp, line 1614 */ if (l3.is_present()) { current_location.update_lineno(1615); /* RAN_Emulation.ttcnpp, line 1615 */ RAN__Emulation__CT_component_ExpectTable[i].l3__payload() = l3.valueof(); } else { current_location.update_lineno(1617); /* RAN_Emulation.ttcnpp, line 1617 */ RAN__Emulation__CT_component_ExpectTable[i].sccp__cr__without__payload() = TRUE; } current_location.update_lineno(1619); /* RAN_Emulation.ttcnpp, line 1619 */ if (n__connectPointCode.is_present()) { current_location.update_lineno(1620); /* RAN_Emulation.ttcnpp, line 1620 */ RAN__Emulation__CT_component_ExpectTable[i].n__connectPointCode() = n__connectPointCode.valueof(); } current_location.update_lineno(1622); /* RAN_Emulation.ttcnpp, line 1622 */ RAN__Emulation__CT_component_ExpectTable[i].vc__conn() = hdlr; current_location.update_lineno(1623); /* RAN_Emulation.ttcnpp, line 1623 */ if (n__connectPointCode.is_present()) { current_location.update_lineno(1624); /* RAN_Emulation.ttcnpp, line 1624 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Created Expect["); i.log(); TTCN_Logger::log_event_str("] for N-CONNECT to be handled at "); hdlr.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } else { current_location.update_lineno(1626); /* RAN_Emulation.ttcnpp, line 1626 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Created Expect["); i.log(); TTCN_Logger::log_event_str("] for "); l3.log(); TTCN_Logger::log_event_str(" to be handled at "); hdlr.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } } current_location.update_lineno(1628); /* RAN_Emulation.ttcnpp, line 1628 */ return; } } current_location.update_lineno(1610); /* RAN_Emulation.ttcnpp, line 1610 */ { INTEGER tmp_201; ++i; } } current_location.update_lineno(1631); /* RAN_Emulation.ttcnpp, line 1631 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No space left in ExpectTable"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1632); /* RAN_Emulation.ttcnpp, line 1632 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__create__expect(const COMPONENT& component_reference, const OCTETSTRING_template& l3, const COMPONENT& hdlr, const INTEGER_template& n__connectPointCode) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_expect("); l3.log(); TTCN_Logger::log_event_str(", "); hdlr.log(); TTCN_Logger::log_event_str(", "); n__connectPointCode.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, "RAN_Emulation", "f_create_expect", text_buf); l3.encode_text(text_buf); hdlr.encode_text(text_buf); n__connectPointCode.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__create__imsi(const HEXSTRING& imsi, const OCTETSTRING& tmsi, const COMPONENT& hdlr) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1635, TTCN_Location::LOCATION_FUNCTION, "f_create_imsi"); { current_location.update_lineno(1637); /* RAN_Emulation.ttcnpp, line 1637 */ INTEGER i(0); current_location.update_lineno(1637); /* RAN_Emulation.ttcnpp, line 1637 */ for ( ; ; ) { current_location.update_lineno(1637); /* RAN_Emulation.ttcnpp, line 1637 */ if (!(i < 16)) break; current_location.update_lineno(1638); /* RAN_Emulation.ttcnpp, line 1638 */ { boolean tmp_207; { boolean tmp_202 = RAN__Emulation__CT_component_ImsiTable.is_bound(); if(tmp_202) { const int tmp_203 = i; tmp_202 = (tmp_203 >= 0) && (RAN__Emulation__CT_component_ImsiTable.size_of() > tmp_203); if(tmp_202) { const ImsiMapping& tmp_204 = RAN__Emulation__CT_component_ImsiTable[tmp_203]; tmp_202 = tmp_204.is_bound(); if(tmp_202) { const OPTIONAL< HEXSTRING >& tmp_205 = tmp_204.imsi(); switch (tmp_205.get_selection()) { case OPTIONAL_UNBOUND: tmp_202 = FALSE; break; case OPTIONAL_OMIT: tmp_202 = FALSE; break; default: { const HEXSTRING& tmp_206 = (const HEXSTRING&) tmp_205; tmp_202 = tmp_206.is_present(); break;} } } } } tmp_207 = (!(tmp_202)); } if (tmp_207) { current_location.update_lineno(1639); /* RAN_Emulation.ttcnpp, line 1639 */ RAN__Emulation__CT_component_ImsiTable[i].imsi() = imsi; current_location.update_lineno(1640); /* RAN_Emulation.ttcnpp, line 1640 */ RAN__Emulation__CT_component_ImsiTable[i].tmsi() = tmsi; current_location.update_lineno(1641); /* RAN_Emulation.ttcnpp, line 1641 */ RAN__Emulation__CT_component_ImsiTable[i].comp__ref() = hdlr; current_location.update_lineno(1642); /* RAN_Emulation.ttcnpp, line 1642 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Created IMSI["); i.log(); TTCN_Logger::log_event_str("] for "); imsi.log(); tmsi.log(); TTCN_Logger::log_event_str(" to be handled at "); hdlr.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(1643); /* RAN_Emulation.ttcnpp, line 1643 */ return; } } current_location.update_lineno(1637); /* RAN_Emulation.ttcnpp, line 1637 */ { INTEGER tmp_211; ++i; } } } current_location.update_lineno(1646); /* RAN_Emulation.ttcnpp, line 1646 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No space left in ImsiTable"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1647); /* RAN_Emulation.ttcnpp, line 1647 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__create__imsi(const COMPONENT& component_reference, const HEXSTRING& imsi, const OCTETSTRING& tmsi, const COMPONENT& hdlr) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi.log(); TTCN_Logger::log_event_str(", "); hdlr.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, "RAN_Emulation", "f_create_imsi", text_buf); imsi.encode_text(text_buf); tmsi.encode_text(text_buf); hdlr.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__destroy__imsi(const HEXSTRING& imsi, const COMPONENT& hdlr) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1650, TTCN_Location::LOCATION_FUNCTION, "f_destroy_imsi"); { current_location.update_lineno(1652); /* RAN_Emulation.ttcnpp, line 1652 */ INTEGER i(0); current_location.update_lineno(1652); /* RAN_Emulation.ttcnpp, line 1652 */ for ( ; ; ) { current_location.update_lineno(1652); /* RAN_Emulation.ttcnpp, line 1652 */ if (!(i < 16)) break; current_location.update_lineno(1653); /* RAN_Emulation.ttcnpp, line 1653 */ { boolean tmp_212; tmp_212 = (const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ImsiTable)[i].imsi() == imsi); if (tmp_212) tmp_212 = (const_cast< const VALUE_ARRAY&>(RAN__Emulation__CT_component_ImsiTable)[i].comp__ref() == hdlr); if (tmp_212) { current_location.update_lineno(1654); /* RAN_Emulation.ttcnpp, line 1654 */ RAN__Emulation__CT_component_ImsiTable[i].comp__ref() = NULL_COMPREF; current_location.update_lineno(1655); /* RAN_Emulation.ttcnpp, line 1655 */ RAN__Emulation__CT_component_ImsiTable[i].imsi() = OMIT_VALUE; current_location.update_lineno(1656); /* RAN_Emulation.ttcnpp, line 1656 */ RAN__Emulation__CT_component_ImsiTable[i].tmsi() = os_1; current_location.update_lineno(1657); /* RAN_Emulation.ttcnpp, line 1657 */ try { TTCN_Logger::begin_event(TTCN_USER); TTCN_Logger::log_event_str("Removed IMSI["); i.log(); TTCN_Logger::log_event_str("] for "); imsi.log(); TTCN_Logger::log_event_str(" to be handled at "); hdlr.log(); TTCN_Logger::end_event(); } catch (...) { TTCN_Logger::finish_event(); throw; } current_location.update_lineno(1658); /* RAN_Emulation.ttcnpp, line 1658 */ return; } } current_location.update_lineno(1652); /* RAN_Emulation.ttcnpp, line 1652 */ { INTEGER tmp_216; ++i; } } } current_location.update_lineno(1661); /* RAN_Emulation.ttcnpp, line 1661 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unable to find to-be-destroyed IMSI in ImsiTable"),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1662); /* RAN_Emulation.ttcnpp, line 1662 */ TTCN_Runtime::stop_component(MTC_COMPREF); } void start_f__destroy__imsi(const COMPONENT& component_reference, const HEXSTRING& imsi, const COMPONENT& hdlr) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_destroy_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); hdlr.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, "RAN_Emulation", "f_destroy_imsi", text_buf); imsi.encode_text(text_buf); hdlr.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__expect__table__init() { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1665, TTCN_Location::LOCATION_FUNCTION, "f_expect_table_init"); { current_location.update_lineno(1667); /* RAN_Emulation.ttcnpp, line 1667 */ INTEGER i(0); current_location.update_lineno(1667); /* RAN_Emulation.ttcnpp, line 1667 */ for ( ; ; ) { current_location.update_lineno(1667); /* RAN_Emulation.ttcnpp, line 1667 */ if (!(i < 16)) break; current_location.update_lineno(1668); /* RAN_Emulation.ttcnpp, line 1668 */ RAN__Emulation__CT_component_ExpectTable[i].l3__payload() = OMIT_VALUE; current_location.update_lineno(1669); /* RAN_Emulation.ttcnpp, line 1669 */ RAN__Emulation__CT_component_ExpectTable[i].n__connectPointCode() = OMIT_VALUE; current_location.update_lineno(1670); /* RAN_Emulation.ttcnpp, line 1670 */ RAN__Emulation__CT_component_ExpectTable[i].sccp__cr__without__payload() = FALSE; current_location.update_lineno(1667); /* RAN_Emulation.ttcnpp, line 1667 */ { INTEGER tmp_220; ++i; } } } } void start_f__expect__table__init(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_expect_table_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, "RAN_Emulation", "f_expect_table_init", text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__ran__register__imsi(const HEXSTRING& imsi, const OCTETSTRING_template& tmsi__or__omit) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1675, TTCN_Location::LOCATION_FUNCTION, "f_ran_register_imsi"); current_location.update_lineno(1677); /* RAN_Emulation.ttcnpp, line 1677 */ OCTETSTRING tmsi; current_location.update_lineno(1680); /* RAN_Emulation.ttcnpp, line 1680 */ if (tmsi__or__omit.get_istemplate_kind((const char*)cs_0)) { current_location.update_lineno(1681); /* RAN_Emulation.ttcnpp, line 1681 */ tmsi = os_1; } else { current_location.update_lineno(1683); /* RAN_Emulation.ttcnpp, line 1683 */ tmsi = tmsi__or__omit.valueof(); } current_location.update_lineno(1686); /* RAN_Emulation.ttcnpp, line 1686 */ { RAN__register__imsi_template tmp_223; tmp_223.imsi() = imsi; tmp_223.tmsi() = tmsi; tmp_223.hdlr() = self; RAN__ConnHdlr_component_RAN__CONN__PROC.call(tmp_223, FALSE, NULL); } { alt_status tmp_224_alt_flag_0 = ALT_MAYBE; current_location.update_lineno(1686); /* RAN_Emulation.ttcnpp, line 1686 */ TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_224_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1687); /* RAN_Emulation.ttcnpp, line 1687 */ { RAN__register__imsi_template tmp_225; tmp_225.imsi() = ANY_VALUE; tmp_225.tmsi() = ANY_VALUE; tmp_225.hdlr() = ANY_VALUE; tmp_224_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN__PROC.getreply(tmp_225, any_compref, RAN__register__imsi_reply_redirect(), NULL, NULL, NULL); } if (tmp_224_alt_flag_0 == ALT_YES) break; } current_location.update_lineno(1686); /* RAN_Emulation.ttcnpp, line 1686 */ if (tmp_224_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 RAN_Emulation.ttcnpp between lines 1686 and 1688."); TTCN_Snapshot::take_new(TRUE); } } } void start_f__ran__register__imsi(const COMPONENT& component_reference, const HEXSTRING& imsi, const OCTETSTRING_template& tmsi__or__omit) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi__or__omit.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, "RAN_Emulation", "f_ran_register_imsi", text_buf); imsi.encode_text(text_buf); tmsi__or__omit.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__ran__unregister__imsi(const HEXSTRING& imsi) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1692, TTCN_Location::LOCATION_FUNCTION, "f_ran_unregister_imsi"); current_location.update_lineno(1695); /* RAN_Emulation.ttcnpp, line 1695 */ { RAN__unregister__imsi_template tmp_226; tmp_226.imsi() = imsi; tmp_226.hdlr() = self; RAN__ConnHdlr_component_RAN__CONN__PROC.call(tmp_226, FALSE, NULL); } { alt_status tmp_227_alt_flag_0 = ALT_MAYBE; current_location.update_lineno(1695); /* RAN_Emulation.ttcnpp, line 1695 */ TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_227_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1696); /* RAN_Emulation.ttcnpp, line 1696 */ { RAN__unregister__imsi_template tmp_228; tmp_228.imsi() = ANY_VALUE; tmp_228.hdlr() = ANY_VALUE; tmp_227_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN__PROC.getreply(tmp_228, any_compref, RAN__unregister__imsi_reply_redirect(), NULL, NULL, NULL); } if (tmp_227_alt_flag_0 == ALT_YES) break; } current_location.update_lineno(1695); /* RAN_Emulation.ttcnpp, line 1695 */ if (tmp_227_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 RAN_Emulation.ttcnpp between lines 1695 and 1697."); TTCN_Snapshot::take_new(TRUE); } } } void start_f__ran__unregister__imsi(const COMPONENT& component_reference, const HEXSTRING& imsi) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_unregister_imsi("); imsi.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, "RAN_Emulation", "f_ran_unregister_imsi", text_buf); imsi.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__ran__register__exp(const OCTETSTRING& l3__enc) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1701, TTCN_Location::LOCATION_FUNCTION, "f_ran_register_exp"); current_location.update_lineno(1702); /* RAN_Emulation.ttcnpp, line 1702 */ { RAN__register_template tmp_229; tmp_229.l3() = l3__enc; tmp_229.hdlr() = self; RAN__ConnHdlr_component_RAN__CONN__PROC.call(tmp_229, FALSE, NULL); } { alt_status tmp_230_alt_flag_0 = ALT_MAYBE; current_location.update_lineno(1702); /* RAN_Emulation.ttcnpp, line 1702 */ TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_230_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1703); /* RAN_Emulation.ttcnpp, line 1703 */ { RAN__register_template tmp_231; tmp_231.l3() = ANY_VALUE; tmp_231.hdlr() = ANY_VALUE; tmp_230_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN__PROC.getreply(tmp_231, any_compref, RAN__register_reply_redirect(), NULL, NULL, NULL); } if (tmp_230_alt_flag_0 == ALT_YES) break; } current_location.update_lineno(1702); /* RAN_Emulation.ttcnpp, line 1702 */ if (tmp_230_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 RAN_Emulation.ttcnpp between lines 1702 and 1704."); TTCN_Snapshot::take_new(TRUE); } } } void start_f__ran__register__exp(const COMPONENT& component_reference, const OCTETSTRING& l3__enc) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_exp("); l3__enc.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, "RAN_Emulation", "f_ran_register_exp", text_buf); l3__enc.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__ran__register__sccp__cr__without__payload() { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1707, TTCN_Location::LOCATION_FUNCTION, "f_ran_register_sccp_cr_without_payload"); current_location.update_lineno(1708); /* RAN_Emulation.ttcnpp, line 1708 */ { RAN__register__sccp__cr__without__payload_template tmp_232; tmp_232.hdlr() = self; RAN__ConnHdlr_component_RAN__CONN__PROC.call(tmp_232, FALSE, NULL); } { alt_status tmp_233_alt_flag_0 = ALT_MAYBE; current_location.update_lineno(1708); /* RAN_Emulation.ttcnpp, line 1708 */ TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_233_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1709); /* RAN_Emulation.ttcnpp, line 1709 */ { RAN__register__sccp__cr__without__payload_template tmp_234; tmp_234.hdlr() = ANY_VALUE; tmp_233_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN__PROC.getreply(tmp_234, any_compref, RAN__register__sccp__cr__without__payload_reply_redirect(), NULL, NULL, NULL); } if (tmp_233_alt_flag_0 == ALT_YES) break; } current_location.update_lineno(1708); /* RAN_Emulation.ttcnpp, line 1708 */ if (tmp_233_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 RAN_Emulation.ttcnpp between lines 1708 and 1710."); TTCN_Snapshot::take_new(TRUE); } } } void start_f__ran__register__sccp__cr__without__payload(const COMPONENT& component_reference) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_sccp_cr_without_payload("); 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, "RAN_Emulation", "f_ran_register_sccp_cr_without_payload", text_buf); TTCN_Runtime::send_start_component(text_buf); } void f__ran__register__IuSigConId(const BITSTRING& sigc__id) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1715, TTCN_Location::LOCATION_FUNCTION, "f_ran_register_IuSigConId"); current_location.update_lineno(1717); /* RAN_Emulation.ttcnpp, line 1717 */ { RAN__register__IuSigConId_template tmp_235; tmp_235.sigc__id() = sigc__id; tmp_235.hdlr() = self; RAN__ConnHdlr_component_RAN__CONN__PROC.call(tmp_235, FALSE, NULL); } { alt_status tmp_236_alt_flag_0 = ALT_MAYBE; current_location.update_lineno(1717); /* RAN_Emulation.ttcnpp, line 1717 */ TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_236_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1718); /* RAN_Emulation.ttcnpp, line 1718 */ { RAN__register__IuSigConId_template tmp_237; tmp_237.sigc__id() = ANY_VALUE; tmp_237.hdlr() = ANY_VALUE; tmp_236_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN__PROC.getreply(tmp_237, any_compref, RAN__register__IuSigConId_reply_redirect(), NULL, NULL, NULL); } if (tmp_236_alt_flag_0 == ALT_YES) break; } current_location.update_lineno(1717); /* RAN_Emulation.ttcnpp, line 1717 */ if (tmp_236_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 RAN_Emulation.ttcnpp between lines 1717 and 1719."); TTCN_Snapshot::take_new(TRUE); } } } void start_f__ran__register__IuSigConId(const COMPONENT& component_reference, const BITSTRING& sigc__id) { TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_IuSigConId("); sigc__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, "RAN_Emulation", "f_ran_register_IuSigConId", text_buf); sigc__id.encode_text(text_buf); TTCN_Runtime::send_start_component(text_buf); } alt_status as__iu__release__compl__disc_instance(boolean first_alt_run) { TTCN_Location current_location("RAN_Emulation.ttcnpp", 1723, TTCN_Location::LOCATION_ALTSTEP, "as_iu_release_compl_disc"); current_location.update_lineno(1724); /* RAN_Emulation.ttcnpp, line 1724 */ RANAP__PDU__Descriptions::RANAP__PDU ranap; alt_status ret_val = ALT_NO; current_location.update_lineno(1725); /* RAN_Emulation.ttcnpp, line 1725 */ switch (RAN__ConnHdlr_component_RAN__CONN.receive(RANAP__Templates::tr__RANAP__IuReleaseCommand(RANAP__IEs::Cause_template(ANY_VALUE), RANAP__Templates::tr__RANAP__IuReleaseCommand_exts_defval), NULL, any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1726); /* RAN_Emulation.ttcnpp, line 1726 */ RAN__ConnHdlr_component_RAN__CONN.send(RANAP__Templates::ts__RANAP__IuReleaseComplete(RANAP__Templates::ts__RANAP__IuReleaseComplete_ies_defval, RANAP__Templates::ts__RANAP__IuReleaseComplete_exts_defval), FALSE, NULL); current_location.update_lineno(1727); /* RAN_Emulation.ttcnpp, line 1727 */ { tmp_238: alt_status tmp_238_alt_flag_0 = ALT_MAYBE; alt_status tmp_238_alt_flag_1 = ALT_MAYBE; alt_status tmp_238_default_flag = ALT_MAYBE; boolean first_run = TRUE; TTCN_Snapshot::take_new(FALSE); for ( ; ; ) { if (tmp_238_alt_flag_0 == ALT_MAYBE) { current_location.update_lineno(1728); /* RAN_Emulation.ttcnpp, line 1728 */ tmp_238_alt_flag_0 = RAN__ConnHdlr_component_RAN__CONN.receive(tr__MSC__CONN__PRIM__DISC__IND, NULL, any_compref, NULL, NULL, NULL); if (tmp_238_alt_flag_0 == ALT_YES) { current_location.update_lineno(1729); /* RAN_Emulation.ttcnpp, line 1729 */ TTCN_Runtime::setverdict(PASS); break; } } if (tmp_238_alt_flag_1 == ALT_MAYBE) { current_location.update_lineno(1731); /* RAN_Emulation.ttcnpp, line 1731 */ tmp_238_alt_flag_1 = RAN__ConnHdlr_component_RAN__CONN.receive(any_compref, NULL, NULL, NULL); if (tmp_238_alt_flag_1 == ALT_YES) { current_location.update_lineno(1732); /* RAN_Emulation.ttcnpp, line 1732 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected RANAP while waiting for SCCP Release "),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1733); /* RAN_Emulation.ttcnpp, line 1733 */ TTCN_Runtime::stop_component(MTC_COMPREF); } } if (tmp_238_default_flag == ALT_MAYBE) { tmp_238_default_flag = TTCN_Default::try_altsteps(first_run); if (tmp_238_default_flag == ALT_YES || tmp_238_default_flag == ALT_BREAK) break; else if (tmp_238_default_flag == ALT_REPEAT) goto tmp_238; } current_location.update_lineno(1727); /* RAN_Emulation.ttcnpp, line 1727 */ if (tmp_238_alt_flag_0 == ALT_NO && tmp_238_alt_flag_1 == ALT_NO && tmp_238_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file RAN_Emulation.ttcnpp between lines 1727 and 1735."); TTCN_Snapshot::take_new(TRUE); first_run = FALSE; } } } return ALT_YES; case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } current_location.update_lineno(1737); /* RAN_Emulation.ttcnpp, line 1737 */ switch (RAN__ConnHdlr_component_RAN__CONN.receive(RANAP__PDU__Descriptions::RANAP__PDU_template(ANY_VALUE), &(ranap), any_compref, NULL, NULL, NULL)) { case ALT_YES: { current_location.update_lineno(1738); /* RAN_Emulation.ttcnpp, line 1738 */ TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected RANAP while waiting for IuReleaseCommand"),ranap.log(),TTCN_Logger::end_event_log2str())); current_location.update_lineno(1739); /* RAN_Emulation.ttcnpp, line 1739 */ TTCN_Runtime::stop_component(MTC_COMPREF); } case ALT_MAYBE: ret_val = ALT_MAYBE; default: break; } return ret_val; } void as__iu__release__compl__disc(boolean nodefault_modifier) { 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__iu__release__compl__disc_instance(!block_flag); if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return; else if (altstep_flag == ALT_REPEAT) goto altstep_begin; } if (!nodefault_modifier && default_flag != ALT_NO) { default_flag = TTCN_Default::try_altsteps(!block_flag); 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_iu_release_compl_disc."); else block_flag = TRUE; } } Default_Base *activate_as__iu__release__compl__disc() { return new as__iu__release__compl__disc_Default(); } /* Bodies of static functions */ void pre_init_module() { TTCN_Location current_location("RAN_Emulation.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "RAN_Emulation"); SCCP__Emulation::module_object.pre_init_module(); IPA__Emulation::module_object.pre_init_module(); MobileL3__Types::module_object.pre_init_module(); RANAP__CodecPort::module_object.pre_init_module(); RANAP__Templates::module_object.pre_init_module(); module_object.add_function("f_conn_id_known", (genericfunc_t)&f__conn__id__known, (genericfunc_t)&start_f__conn__id__known); module_object.add_function("f_comp_known", (genericfunc_t)&f__comp__known, (genericfunc_t)&start_f__comp__known); module_object.add_function("f_cic_known", (genericfunc_t)&f__cic__known, (genericfunc_t)&start_f__cic__known); module_object.add_function("f_comp_by_conn_id", (genericfunc_t)&f__comp__by__conn__id, (genericfunc_t)&start_f__comp__by__conn__id); module_object.add_function("f_comp_by_cic", (genericfunc_t)&f__comp__by__cic, (genericfunc_t)&start_f__comp__by__cic); module_object.add_function("f_comp_store_cic", (genericfunc_t)&f__comp__store__cic, (genericfunc_t)&start_f__comp__store__cic); module_object.add_function("f_conn_id_by_comp", (genericfunc_t)&f__conn__id__by__comp, (genericfunc_t)&start_f__conn__id__by__comp); module_object.add_function("f_idx_by_comp", (genericfunc_t)&f__idx__by__comp, (genericfunc_t)&start_f__idx__by__comp); module_object.add_function("f_gen_conn_id", (genericfunc_t)&f__gen__conn__id, (genericfunc_t)&start_f__gen__conn__id); module_object.add_function("f_conn_table_init", (genericfunc_t)&f__conn__table__init, (genericfunc_t)&start_f__conn__table__init); module_object.add_function("f_conn_table_add", (genericfunc_t)&f__conn__table__add, (genericfunc_t)&start_f__conn__table__add); module_object.add_function("f_conn_table_del", (genericfunc_t)&f__conn__table__del, (genericfunc_t)&start_f__conn__table__del); module_object.add_function("f_imsi_table_find", (genericfunc_t)&f__imsi__table__find, (genericfunc_t)&start_f__imsi__table__find); module_object.add_function("fake_dlci_from_sapi", (genericfunc_t)&fake__dlci__from__sapi, NULL); module_object.add_function("f_handle_userData_RANAP", (genericfunc_t)&f__handle__userData__RANAP, (genericfunc_t)&start_f__handle__userData__RANAP); module_object.add_function("CommonRanapUnitdataCallback", (genericfunc_t)&CommonRanapUnitdataCallback, (genericfunc_t)&start_CommonRanapUnitdataCallback); module_object.add_function("f_ranap_l3_is_rr", (genericfunc_t)&f__ranap__l3__is__rr, NULL); module_object.add_function("f_ranap_reset", (genericfunc_t)&f__ranap__reset, (genericfunc_t)&start_f__ranap__reset); module_object.add_function("f_L3_is_rr", (genericfunc_t)&f__L3__is__rr, NULL); module_object.add_function("f_next_n_sd", (genericfunc_t)&f__next__n__sd, NULL); module_object.add_function("f_ML3_patch_seq_nr", (genericfunc_t)&f__ML3__patch__seq__nr, NULL); module_object.add_function("f_ML3_n_sd_idx", (genericfunc_t)&f__ML3__n__sd__idx, NULL); module_object.add_function("f_ML3_patch_seq", (genericfunc_t)&f__ML3__patch__seq, NULL); module_object.add_altstep("as_reset_ack", (genericfunc_t)&as__reset__ack_instance, (genericfunc_t )&activate_as__reset__ack, (genericfunc_t )&as__reset__ack); module_object.add_altstep("as_main_bssap", (genericfunc_t)&as__main__bssap_instance, (genericfunc_t )&activate_as__main__bssap, (genericfunc_t )&as__main__bssap); module_object.add_altstep("as_main_ranap", (genericfunc_t)&as__main__ranap_instance, (genericfunc_t )&activate_as__main__ranap, (genericfunc_t )&as__main__ranap); module_object.add_altstep("as_main_mgcp", (genericfunc_t)&as__main__mgcp_instance, (genericfunc_t )&activate_as__main__mgcp, (genericfunc_t )&as__main__mgcp); module_object.add_altstep("as_main_ctrl", (genericfunc_t)&as__main__ctrl_instance, (genericfunc_t )&activate_as__main__ctrl, (genericfunc_t )&as__main__ctrl); module_object.add_function("f_xmit_raw_l3", (genericfunc_t)&f__xmit__raw__l3, (genericfunc_t)&start_f__xmit__raw__l3); module_object.add_function("main", (genericfunc_t)&main_, (genericfunc_t)&start_main_); module_object.add_function("RanapExpectedCreateCallback", (genericfunc_t)&RanapExpectedCreateCallback, (genericfunc_t)&start_RanapExpectedCreateCallback); module_object.add_function("f_create_IuSigConId", (genericfunc_t)&f__create__IuSigConId, (genericfunc_t)&start_f__create__IuSigConId); module_object.add_function("f_IuSigConId_table_find", (genericfunc_t)&f__IuSigConId__table__find, (genericfunc_t)&start_f__IuSigConId__table__find); module_object.add_function("f_create_expect", (genericfunc_t)&f__create__expect, (genericfunc_t)&start_f__create__expect); module_object.add_function("f_create_imsi", (genericfunc_t)&f__create__imsi, (genericfunc_t)&start_f__create__imsi); module_object.add_function("f_destroy_imsi", (genericfunc_t)&f__destroy__imsi, (genericfunc_t)&start_f__destroy__imsi); module_object.add_function("f_expect_table_init", (genericfunc_t)&f__expect__table__init, (genericfunc_t)&start_f__expect__table__init); module_object.add_function("f_ran_register_imsi", (genericfunc_t)&f__ran__register__imsi, (genericfunc_t)&start_f__ran__register__imsi); module_object.add_function("f_ran_unregister_imsi", (genericfunc_t)&f__ran__unregister__imsi, (genericfunc_t)&start_f__ran__unregister__imsi); module_object.add_function("f_ran_register_exp", (genericfunc_t)&f__ran__register__exp, (genericfunc_t)&start_f__ran__register__exp); module_object.add_function("f_ran_register_sccp_cr_without_payload", (genericfunc_t)&f__ran__register__sccp__cr__without__payload, (genericfunc_t)&start_f__ran__register__sccp__cr__without__payload); module_object.add_function("f_ran_register_IuSigConId", (genericfunc_t)&f__ran__register__IuSigConId, (genericfunc_t)&start_f__ran__register__IuSigConId); module_object.add_altstep("as_iu_release_compl_disc", (genericfunc_t)&as__iu__release__compl__disc_instance, (genericfunc_t )&activate_as__iu__release__compl__disc, (genericfunc_t )&as__iu__release__compl__disc); } void post_init_module() { TTCN_Location current_location("RAN_Emulation.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "RAN_Emulation"); SCCP__Emulation::module_object.post_init_module(); IPA__Emulation::module_object.post_init_module(); MobileL3__Types::module_object.post_init_module(); RANAP__CodecPort::module_object.post_init_module(); RANAP__Templates::module_object.post_init_module(); current_location.update_lineno(100); /* RAN_Emulation.ttcnpp, line 100 */ template_tr__MSC__CONN__PRIM__CONNECT__RES.connect__res() = ANY_VALUE; current_location.update_lineno(103); /* RAN_Emulation.ttcnpp, line 103 */ template_ts__MSC__CONN__PRIM__CONNECT__RES.connect__res() = NULL_VALUE; current_location.update_lineno(107); /* RAN_Emulation.ttcnpp, line 107 */ template_tr__MSC__CONN__PRIM__DISC__IND.disc__ind() = ANY_VALUE; current_location.update_lineno(110); /* RAN_Emulation.ttcnpp, line 110 */ template_ts__MSC__CONN__PRIM__DISC__IND.disc__ind() = NULL_VALUE; current_location.update_lineno(114); /* RAN_Emulation.ttcnpp, line 114 */ template_tr__MSC__CONN__PRIM__DISC__REQ.disc__req() = ANY_VALUE; current_location.update_lineno(117); /* RAN_Emulation.ttcnpp, line 117 */ template_ts__MSC__CONN__PRIM__DISC__REQ_reason_defval = 0; current_location.update_lineno(123); /* RAN_Emulation.ttcnpp, line 123 */ template_tr__MSC__CONN__PRIM__CONF__IND.conf__ind() = ANY_VALUE; current_location.update_lineno(126); /* RAN_Emulation.ttcnpp, line 126 */ template_ts__MSC__CONN__PRIM__CONF__IND.conf__ind() = NULL_VALUE; current_location.update_lineno(160); /* RAN_Emulation.ttcnpp, line 160 */ template_ts__PDU__DTAP__MT_dlci_defval = OMIT_VALUE; current_location.update_lineno(165); /* RAN_Emulation.ttcnpp, line 165 */ template_ts__PDU__DTAP__MO_dlci_defval = os_0; current_location.update_lineno(165); /* RAN_Emulation.ttcnpp, line 165 */ const_ts__PDU__DTAP__MO_skip__seq__patching_defval = FALSE; current_location.update_lineno(171); /* RAN_Emulation.ttcnpp, line 171 */ template_tr__PDU__DTAP__MT_dlci_defval = ANY_OR_OMIT; current_location.update_lineno(176); /* RAN_Emulation.ttcnpp, line 176 */ template_tr__PDU__DTAP__MO_dlci_defval = ANY_OR_OMIT; current_location.update_lineno(182); /* RAN_Emulation.ttcnpp, line 182 */ template_ts__PDU__DTAP__PS__MT_dlci_defval = OMIT_VALUE; current_location.update_lineno(187); /* RAN_Emulation.ttcnpp, line 187 */ template_ts__PDU__DTAP__PS__MO_dlci_defval = os_0; current_location.update_lineno(188); /* RAN_Emulation.ttcnpp, line 188 */ const_ts__PDU__DTAP__PS__MO_skip__seq__patching_defval = FALSE; current_location.update_lineno(194); /* RAN_Emulation.ttcnpp, line 194 */ template_tr__PDU__DTAP__PS__MT_dlci_defval = ANY_OR_OMIT; current_location.update_lineno(199); /* RAN_Emulation.ttcnpp, line 199 */ template_tr__PDU__DTAP__PS__MO_dlci_defval = ANY_OR_OMIT; current_location.update_lineno(639); /* RAN_Emulation.ttcnpp, line 639 */ template_tr__RANAP__Conn__Req_peer_defval = ANY_VALUE; current_location.update_lineno(640); /* RAN_Emulation.ttcnpp, line 640 */ template_tr__RANAP__Conn__Req_own_defval = ANY_VALUE; current_location.update_lineno(641); /* RAN_Emulation.ttcnpp, line 641 */ template_tr__RANAP__Conn__Req_ranap_defval = ANY_OR_OMIT; current_location.update_lineno(660); /* RAN_Emulation.ttcnpp, line 660 */ template_tr__RANAP__Conn__Ind_peer_defval = ANY_VALUE; current_location.update_lineno(661); /* RAN_Emulation.ttcnpp, line 661 */ template_tr__RANAP__Conn__Ind_own_defval = ANY_VALUE; current_location.update_lineno(662); /* RAN_Emulation.ttcnpp, line 662 */ template_tr__RANAP__Conn__Ind_ranap_defval = ANY_OR_OMIT; current_location.update_lineno(800); /* RAN_Emulation.ttcnpp, line 800 */ template_f__ranap__reset_grnc__id_defval = OMIT_VALUE; current_location.update_lineno(856); /* RAN_Emulation.ttcnpp, line 856 */ template_t__ML3__DISC__CC__MM__SS.set_type(VALUE_LIST, 3); template_t__ML3__DISC__CC__MM__SS.list_item(0) = bs_0; template_t__ML3__DISC__CC__MM__SS.list_item(1) = bs_1; template_t__ML3__DISC__CC__MM__SS.list_item(2) = bs_2; current_location.update_lineno(920); /* RAN_Emulation.ttcnpp, line 920 */ const_as__reset__ack_append__osmux__support_defval = FALSE; current_location.update_lineno(1606); /* RAN_Emulation.ttcnpp, line 1606 */ template_f__create__expect_n__connectPointCode_defval = OMIT_VALUE; } boolean init_comp_type(const char *component_type, boolean init_base_comps) { (void)init_base_comps; if (!strcmp(component_type, "RAN_ConnHdlr")) { RAN__ConnHdlr_component_RAN__CONN.activate_port(); RAN__ConnHdlr_component_RAN__CONN__PROC.activate_port(); return TRUE; } else if (!strcmp(component_type, "RAN_Emulation_CT")) { RAN__Emulation__CT_component_RANAP.activate_port(); RAN__Emulation__CT_component_IuSigConIdTable.clean_up(); RAN__Emulation__CT_component_CLIENT.activate_port(); RAN__Emulation__CT_component_ConnectionTable.clean_up(); RAN__Emulation__CT_component_ExpectTable.clean_up(); RAN__Emulation__CT_component_ImsiTable.clean_up(); RAN__Emulation__CT_component_PROC.activate_port(); RAN__Emulation__CT_component_g__ran__id.clean_up(); RAN__Emulation__CT_component_g__next__e1__ts = 1; RAN__Emulation__CT_component_g__ran__ops.clean_up(); return TRUE; } else return FALSE; } boolean init_system_port(const char* component_type, const char* port_name) { if (!strcmp(component_type, "RAN_ConnHdlr")) { if (!strcmp(port_name, "RAN_CONN")) { RAN__ConnHdlr_component_RAN__CONN.safe_start(); return TRUE; } if (!strcmp(port_name, "RAN_CONN_PROC")) { RAN__ConnHdlr_component_RAN__CONN__PROC.safe_start(); return TRUE; } } else if (!strcmp(component_type, "RAN_Emulation_CT")) { if (!strcmp(port_name, "CLIENT")) { RAN__Emulation__CT_component_CLIENT.safe_start(); return TRUE; } if (!strcmp(port_name, "PROC")) { RAN__Emulation__CT_component_PROC.safe_start(); return TRUE; } if (!strcmp(port_name, "RANAP")) { RAN__Emulation__CT_component_RANAP.safe_start(); return TRUE; } } return FALSE; } boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments) { if (!strcmp(function_name, "f_conn_id_known")) { INTEGER sccp__conn__id; sccp__conn__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_id_known("); sccp__conn__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__conn__id__known(sccp__conn__id); TTCN_Runtime::function_finished("f_conn_id_known"); return TRUE; } else if (!strcmp(function_name, "f_comp_known")) { COMPONENT client; client.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_known("); client.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__comp__known(client); TTCN_Runtime::function_finished("f_comp_known"); return TRUE; } else if (!strcmp(function_name, "f_cic_known")) { INTEGER cic; cic.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_cic_known("); cic.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__cic__known(cic); TTCN_Runtime::function_finished("f_cic_known"); return TRUE; } else if (!strcmp(function_name, "f_comp_by_conn_id")) { INTEGER sccp__conn__id; sccp__conn__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_by_conn_id("); sccp__conn__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__comp__by__conn__id(sccp__conn__id); TTCN_Runtime::function_finished("f_comp_by_conn_id"); return TRUE; } else if (!strcmp(function_name, "f_comp_by_cic")) { INTEGER cic; cic.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_by_cic("); cic.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__comp__by__cic(cic); TTCN_Runtime::function_finished("f_comp_by_cic"); return TRUE; } else if (!strcmp(function_name, "f_comp_store_cic")) { COMPONENT client; INTEGER cic; client.decode_text(function_arguments); cic.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_comp_store_cic("); client.log(); TTCN_Logger::log_event_str(", "); cic.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__comp__store__cic(client, cic); TTCN_Runtime::function_finished("f_comp_store_cic"); return TRUE; } else if (!strcmp(function_name, "f_conn_id_by_comp")) { COMPONENT client; client.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_id_by_comp("); client.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__conn__id__by__comp(client); TTCN_Runtime::function_finished("f_conn_id_by_comp"); return TRUE; } else if (!strcmp(function_name, "f_idx_by_comp")) { COMPONENT client; client.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_idx_by_comp("); client.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__idx__by__comp(client); TTCN_Runtime::function_finished("f_idx_by_comp"); return TRUE; } else if (!strcmp(function_name, "f_gen_conn_id")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_gen_conn_id()."); TTCN_Runtime::function_started(function_arguments); f__gen__conn__id(); TTCN_Runtime::function_finished("f_gen_conn_id"); return TRUE; } else if (!strcmp(function_name, "f_conn_table_init")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_conn_table_init()."); TTCN_Runtime::function_started(function_arguments); f__conn__table__init(); TTCN_Runtime::function_finished("f_conn_table_init"); return TRUE; } else if (!strcmp(function_name, "f_conn_table_add")) { COMPONENT comp__ref; INTEGER sccp__conn__id; comp__ref.decode_text(function_arguments); sccp__conn__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_table_add("); comp__ref.log(); TTCN_Logger::log_event_str(", "); sccp__conn__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__conn__table__add(comp__ref, sccp__conn__id); TTCN_Runtime::function_finished("f_conn_table_add"); return TRUE; } else if (!strcmp(function_name, "f_conn_table_del")) { INTEGER sccp__conn__id; sccp__conn__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_conn_table_del("); sccp__conn__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__conn__table__del(sccp__conn__id); TTCN_Runtime::function_finished("f_conn_table_del"); return TRUE; } else if (!strcmp(function_name, "f_imsi_table_find")) { HEXSTRING imsi; OCTETSTRING_template tmsi; imsi.decode_text(function_arguments); tmsi.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_imsi_table_find("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__imsi__table__find(imsi, tmsi); TTCN_Runtime::function_finished("f_imsi_table_find"); return TRUE; } else if (!strcmp(function_name, "f_handle_userData_RANAP")) { COMPONENT client; RANAP__PDU__Descriptions::RANAP__PDU ranap; client.decode_text(function_arguments); ranap.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_handle_userData_RANAP("); client.log(); TTCN_Logger::log_event_str(", "); ranap.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__handle__userData__RANAP(client, ranap); TTCN_Runtime::function_finished("f_handle_userData_RANAP"); return TRUE; } else if (!strcmp(function_name, "CommonRanapUnitdataCallback")) { RANAP__PDU__Descriptions::RANAP__PDU ranap; ranap.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function CommonRanapUnitdataCallback("); ranap.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); CommonRanapUnitdataCallback(ranap); TTCN_Runtime::function_finished("CommonRanapUnitdataCallback"); return TRUE; } else if (!strcmp(function_name, "f_ranap_reset")) { SCCPasp__Types::SCCP__PAR__Address peer; SCCPasp__Types::SCCP__PAR__Address own; RANAP__IEs::GlobalRNC__ID_template grnc__id; peer.decode_text(function_arguments); own.decode_text(function_arguments); grnc__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ranap_reset("); peer.log(); TTCN_Logger::log_event_str(", "); own.log(); TTCN_Logger::log_event_str(", "); grnc__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__ranap__reset(peer, own, grnc__id); TTCN_Runtime::function_finished("f_ranap_reset"); return TRUE; } else if (!strcmp(function_name, "f_xmit_raw_l3")) { INTEGER sccp__conn__id; OCTETSTRING dlci; OCTETSTRING l3__enc; sccp__conn__id.decode_text(function_arguments); dlci.decode_text(function_arguments); l3__enc.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_xmit_raw_l3("); sccp__conn__id.log(); TTCN_Logger::log_event_str(", "); dlci.log(); TTCN_Logger::log_event_str(", "); l3__enc.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__xmit__raw__l3(sccp__conn__id, dlci, l3__enc); TTCN_Runtime::function_finished("f_xmit_raw_l3"); return TRUE; } else if (!strcmp(function_name, "main")) { RanOps ops; CHARSTRING id; ops.decode_text(function_arguments); id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function main("); ops.log(); TTCN_Logger::log_event_str(", "); id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); main_(ops, id); TTCN_Runtime::function_finished("main"); return TRUE; } else if (!strcmp(function_name, "RanapExpectedCreateCallback")) { RANAP__CodecPort::RANAP__N__CONNECT__ind conn__ind; CHARSTRING id; conn__ind.decode_text(function_arguments); id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function RanapExpectedCreateCallback("); conn__ind.log(); TTCN_Logger::log_event_str(", "); id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); RanapExpectedCreateCallback(conn__ind, id); TTCN_Runtime::function_finished("RanapExpectedCreateCallback"); return TRUE; } else if (!strcmp(function_name, "f_create_IuSigConId")) { BITSTRING sigc__id; COMPONENT hdlr; sigc__id.decode_text(function_arguments); hdlr.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_IuSigConId("); sigc__id.log(); TTCN_Logger::log_event_str(", "); hdlr.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__create__IuSigConId(sigc__id, hdlr); TTCN_Runtime::function_finished("f_create_IuSigConId"); return TRUE; } else if (!strcmp(function_name, "f_IuSigConId_table_find")) { BITSTRING sigc__id; sigc__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_IuSigConId_table_find("); sigc__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__IuSigConId__table__find(sigc__id); TTCN_Runtime::function_finished("f_IuSigConId_table_find"); return TRUE; } else if (!strcmp(function_name, "f_create_expect")) { OCTETSTRING_template l3; COMPONENT hdlr; INTEGER_template n__connectPointCode; l3.decode_text(function_arguments); hdlr.decode_text(function_arguments); n__connectPointCode.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_expect("); l3.log(); TTCN_Logger::log_event_str(", "); hdlr.log(); TTCN_Logger::log_event_str(", "); n__connectPointCode.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__create__expect(l3, hdlr, n__connectPointCode); TTCN_Runtime::function_finished("f_create_expect"); return TRUE; } else if (!strcmp(function_name, "f_create_imsi")) { HEXSTRING imsi; OCTETSTRING tmsi; COMPONENT hdlr; imsi.decode_text(function_arguments); tmsi.decode_text(function_arguments); hdlr.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_create_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi.log(); TTCN_Logger::log_event_str(", "); hdlr.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__create__imsi(imsi, tmsi, hdlr); TTCN_Runtime::function_finished("f_create_imsi"); return TRUE; } else if (!strcmp(function_name, "f_destroy_imsi")) { HEXSTRING imsi; COMPONENT hdlr; imsi.decode_text(function_arguments); hdlr.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_destroy_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); hdlr.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__destroy__imsi(imsi, hdlr); TTCN_Runtime::function_finished("f_destroy_imsi"); return TRUE; } else if (!strcmp(function_name, "f_expect_table_init")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_expect_table_init()."); TTCN_Runtime::function_started(function_arguments); f__expect__table__init(); TTCN_Runtime::function_finished("f_expect_table_init"); return TRUE; } else if (!strcmp(function_name, "f_ran_register_imsi")) { HEXSTRING imsi; OCTETSTRING_template tmsi__or__omit; imsi.decode_text(function_arguments); tmsi__or__omit.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_imsi("); imsi.log(); TTCN_Logger::log_event_str(", "); tmsi__or__omit.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__ran__register__imsi(imsi, tmsi__or__omit); TTCN_Runtime::function_finished("f_ran_register_imsi"); return TRUE; } else if (!strcmp(function_name, "f_ran_unregister_imsi")) { HEXSTRING imsi; imsi.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_unregister_imsi("); imsi.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__ran__unregister__imsi(imsi); TTCN_Runtime::function_finished("f_ran_unregister_imsi"); return TRUE; } else if (!strcmp(function_name, "f_ran_register_exp")) { OCTETSTRING l3__enc; l3__enc.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_exp("); l3__enc.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__ran__register__exp(l3__enc); TTCN_Runtime::function_finished("f_ran_register_exp"); return TRUE; } else if (!strcmp(function_name, "f_ran_register_sccp_cr_without_payload")) { TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_ran_register_sccp_cr_without_payload()."); TTCN_Runtime::function_started(function_arguments); f__ran__register__sccp__cr__without__payload(); TTCN_Runtime::function_finished("f_ran_register_sccp_cr_without_payload"); return TRUE; } else if (!strcmp(function_name, "f_ran_register_IuSigConId")) { BITSTRING sigc__id; sigc__id.decode_text(function_arguments); TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC); TTCN_Logger::log_event_str("Starting function f_ran_register_IuSigConId("); sigc__id.log(); TTCN_Logger::log_event_str(")."); TTCN_Logger::end_event(); TTCN_Runtime::function_started(function_arguments); f__ran__register__IuSigConId(sigc__id); TTCN_Runtime::function_finished("f_ran_register_IuSigConId"); return TRUE; } else return FALSE; } } /* end of namespace */