// This C++ source file was generated by the TTCN-3 compiler // of the TTCN-3 Test Executor version CRL 113 200/6 R5A // The generation of user and time information were disabled by the -D flag. // Copyright (c) 2000-2018 Ericsson Telecom AB // Do not edit this file unless you know what you are doing. /* Including header files */ #include "Osmocom_Types.hh" namespace Osmocom__Types { /* Prototypes of static functions */ static void pre_init_module(); static void post_init_module(); /* Literal string constants */ static const unsigned char bs_1_bits[] = { 0 }, bs_0_bits[] = { 1 }; static const BITSTRING bs_1(1, bs_1_bits), bs_0(1, bs_0_bits); static const HEXSTRING hs_0(0, NULL); static const OCTETSTRING os_0(0, NULL); static const CHARSTRING cs_1('*'), cs_2('?'), cs_0(4, "omit"); static const unsigned char module_checksum[] = { 0xf6, 0xe8, 0x52, 0x94, 0x05, 0xfd, 0x52, 0xd3, 0x21, 0xf8, 0x93, 0x2f, 0xbf, 0x86, 0x75, 0x66 }; /* Global variable definitions */ const TTCN_RAWdescriptor_t uint8__t_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint8__t_xer_ = { {"uint8_t>\n", "uint8_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint8__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint8__t_descr_ = { "@Osmocom_Types.uint8_t", &INTEGER_ber_, &uint8__t_raw_, &INTEGER_text_, &uint8__t_xer_, &INTEGER_json_, &uint8__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint8__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint16__t_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint16__t_xer_ = { {"uint16_t>\n", "uint16_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint16__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint16__t_descr_ = { "@Osmocom_Types.uint16_t", &INTEGER_ber_, &uint16__t_raw_, &INTEGER_text_, &uint16__t_xer_, &INTEGER_json_, &uint16__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint16__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint24__t_raw_ = {24,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint24__t_xer_ = { {"uint24_t>\n", "uint24_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint24__t_descr_ = { "@Osmocom_Types.uint24_t", &INTEGER_ber_, &uint24__t_raw_, &INTEGER_text_, &uint24__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint24__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint32__t_raw_ = {32,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint32__t_xer_ = { {"uint32_t>\n", "uint32_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint32__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint32__t_descr_ = { "@Osmocom_Types.uint32_t", &INTEGER_ber_, &uint32__t_raw_, &INTEGER_text_, &uint32__t_xer_, &INTEGER_json_, &uint32__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint32__t_default_coding("RAW"); const TTCN_RAWdescriptor_t int8__t_raw_ = {8,SG_SG_BIT,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t int8__t_xer_ = { {"int8_t>\n", "int8_t>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t int8__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t int8__t_descr_ = { "@Osmocom_Types.int8_t", &INTEGER_ber_, &int8__t_raw_, &INTEGER_text_, &int8__t_xer_, &INTEGER_json_, &int8__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING int8__t_default_coding("RAW"); const TTCN_RAWdescriptor_t int16__t_raw_ = {16,SG_SG_BIT,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t int16__t_xer_ = { {"int16_t>\n", "int16_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t int16__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t int16__t_descr_ = { "@Osmocom_Types.int16_t", &INTEGER_ber_, &int16__t_raw_, &INTEGER_text_, &int16__t_xer_, &INTEGER_json_, &int16__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING int16__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint1__t_raw_ = {1,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint1__t_xer_ = { {"uint1_t>\n", "uint1_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint1__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint1__t_descr_ = { "@Osmocom_Types.uint1_t", &INTEGER_ber_, &uint1__t_raw_, &INTEGER_text_, &uint1__t_xer_, &INTEGER_json_, &uint1__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint1__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint2__t_raw_ = {2,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint2__t_xer_ = { {"uint2_t>\n", "uint2_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint2__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint2__t_descr_ = { "@Osmocom_Types.uint2_t", &INTEGER_ber_, &uint2__t_raw_, &INTEGER_text_, &uint2__t_xer_, &INTEGER_json_, &uint2__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint2__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint3__t_raw_ = {3,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint3__t_xer_ = { {"uint3_t>\n", "uint3_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint3__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint3__t_descr_ = { "@Osmocom_Types.uint3_t", &INTEGER_ber_, &uint3__t_raw_, &INTEGER_text_, &uint3__t_xer_, &INTEGER_json_, &uint3__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint3__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint4__t_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint4__t_xer_ = { {"uint4_t>\n", "uint4_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint4__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint4__t_descr_ = { "@Osmocom_Types.uint4_t", &INTEGER_ber_, &uint4__t_raw_, &INTEGER_text_, &uint4__t_xer_, &INTEGER_json_, &uint4__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint4__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint5__t_raw_ = {5,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint5__t_xer_ = { {"uint5_t>\n", "uint5_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint5__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint5__t_descr_ = { "@Osmocom_Types.uint5_t", &INTEGER_ber_, &uint5__t_raw_, &INTEGER_text_, &uint5__t_xer_, &INTEGER_json_, &uint5__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint5__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint6__t_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint6__t_xer_ = { {"uint6_t>\n", "uint6_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint6__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint6__t_descr_ = { "@Osmocom_Types.uint6_t", &INTEGER_ber_, &uint6__t_raw_, &INTEGER_text_, &uint6__t_xer_, &INTEGER_json_, &uint6__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint6__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint7__t_raw_ = {7,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint7__t_xer_ = { {"uint7_t>\n", "uint7_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint7__t_descr_ = { "@Osmocom_Types.uint7_t", &INTEGER_ber_, &uint7__t_raw_, &INTEGER_text_, &uint7__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint7__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint9__t_raw_ = {9,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint9__t_xer_ = { {"uint9_t>\n", "uint9_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint9__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint9__t_descr_ = { "@Osmocom_Types.uint9_t", &INTEGER_ber_, &uint9__t_raw_, &INTEGER_text_, &uint9__t_xer_, &INTEGER_json_, &uint9__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint9__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint10__t_raw_ = {10,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint10__t_xer_ = { {"uint10_t>\n", "uint10_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint10__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint10__t_descr_ = { "@Osmocom_Types.uint10_t", &INTEGER_ber_, &uint10__t_raw_, &INTEGER_text_, &uint10__t_xer_, &INTEGER_json_, &uint10__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint10__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint11__t_raw_ = {11,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint11__t_xer_ = { {"uint11_t>\n", "uint11_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint11__t_descr_ = { "@Osmocom_Types.uint11_t", &INTEGER_ber_, &uint11__t_raw_, &INTEGER_text_, &uint11__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint11__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint12__t_raw_ = {12,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint12__t_xer_ = { {"uint12_t>\n", "uint12_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t uint12__t_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t uint12__t_descr_ = { "@Osmocom_Types.uint12_t", &INTEGER_ber_, &uint12__t_raw_, &INTEGER_text_, &uint12__t_xer_, &INTEGER_json_, &uint12__t_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint12__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint13__t_raw_ = {13,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint13__t_xer_ = { {"uint13_t>\n", "uint13_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint13__t_descr_ = { "@Osmocom_Types.uint13_t", &INTEGER_ber_, &uint13__t_raw_, &INTEGER_text_, &uint13__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint13__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint14__t_raw_ = {14,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint14__t_xer_ = { {"uint14_t>\n", "uint14_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint14__t_descr_ = { "@Osmocom_Types.uint14_t", &INTEGER_ber_, &uint14__t_raw_, &INTEGER_text_, &uint14__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint14__t_default_coding("RAW"); const TTCN_RAWdescriptor_t uint15__t_raw_ = {15,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t uint15__t_xer_ = { {"uint15_t>\n", "uint15_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t uint15__t_descr_ = { "@Osmocom_Types.uint15_t", &INTEGER_ber_, &uint15__t_raw_, &INTEGER_text_, &uint15__t_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING uint15__t_default_coding("RAW"); static INTEGER const_c__UINT16__MAX; const INTEGER& c__UINT16__MAX = const_c__UINT16__MAX; static INTEGER const_c__UINT32__MAX; const INTEGER& c__UINT32__MAX = const_c__UINT32__MAX; const TTCN_RAWdescriptor_t Arfcn_pcs_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t Arfcn_pcs_xer_ = { {"pcs>\n", "pcs>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int Arfcn_pcs_oer_ext_arr_[0] = {}; const int Arfcn_pcs_oer_p_[0] = {}; const TTCN_OERdescriptor_t Arfcn_pcs_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Arfcn_pcs_oer_ext_arr_, 0, Arfcn_pcs_oer_p_}; const TTCN_Typedescriptor_t Arfcn_pcs_descr_ = { "@Osmocom_Types.Arfcn.pcs", &BOOLEAN_ber_, &Arfcn_pcs_raw_, &BOOLEAN_text_, &Arfcn_pcs_xer_, &BOOLEAN_json_, &Arfcn_pcs_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING Arfcn_pcs_default_coding("RAW"); const TTCN_RAWdescriptor_t Arfcn_arfcn_raw_ = {15,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t Arfcn_arfcn_xer_ = { {"arfcn>\n", "arfcn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t Arfcn_arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t Arfcn_arfcn_descr_ = { "@Osmocom_Types.Arfcn.arfcn", &INTEGER_ber_, &Arfcn_arfcn_raw_, &INTEGER_text_, &Arfcn_arfcn_xer_, &INTEGER_json_, &Arfcn_arfcn_oer_, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING Arfcn_arfcn_default_coding("RAW"); const TTCN_RAWdescriptor_t Arfcn_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; // No XER for Arfcn const TTCN_Typedescriptor_t Arfcn_descr_ = { "@Osmocom_Types.Arfcn", NULL, &Arfcn_raw_, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING Arfcn_default_coding("RAW"); static INTEGER const_f__rnd__hexstring_max_defval; const INTEGER& f__rnd__hexstring_max_defval = const_f__rnd__hexstring_max_defval; static INTEGER const_f__rnd__msisdn_len_defval; const INTEGER& f__rnd__msisdn_len_defval = const_f__rnd__msisdn_len_defval; const TTCN_RAWdescriptor_t IntegerRecord_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; // No XER for IntegerRecord const TTCN_Typedescriptor_t IntegerRecord_descr_ = { "@Osmocom_Types.IntegerRecord", NULL, &IntegerRecord_raw_, NULL, NULL, NULL, NULL, &IntegerRecord_0_descr_, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_RAWdescriptor_t IntegerRecord_0_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN,NULL}; const XERdescriptor_t IntegerRecord_0_xer_ = { {"INTEGER>\n", "INTEGER>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t IntegerRecord_0_descr_ = { "@Osmocom_Types.IntegerRecord.INTEGER", &INTEGER_ber_, &IntegerRecord_0_raw_, &INTEGER_text_, &IntegerRecord_0_xer_, &INTEGER_json_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; UNIVERSAL_CHARSTRING IntegerRecord_0_default_coding("RAW"); UNIVERSAL_CHARSTRING IntegerRecord_default_coding("RAW"); TTCN_Module module_object("Osmocom_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL); static const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_6, current_runtime_version.requires_minor_version_5, current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1); /* Member functions of C++ classes */ Arfcn::Arfcn() { } Arfcn::Arfcn(const BOOLEAN& par_pcs, const INTEGER& par_arfcn) : field_pcs(par_pcs), field_arfcn(par_arfcn) { } Arfcn::Arfcn(const Arfcn& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @Osmocom_Types.Arfcn."); if (other_value.pcs().is_bound()) field_pcs = other_value.pcs(); else field_pcs.clean_up(); if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn(); else field_arfcn.clean_up(); } void Arfcn::clean_up() { field_pcs.clean_up(); field_arfcn.clean_up(); } const TTCN_Typedescriptor_t* Arfcn::get_descriptor() const { return &Arfcn_descr_; } Arfcn& Arfcn::operator=(const Arfcn& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @Osmocom_Types.Arfcn."); if (other_value.pcs().is_bound()) field_pcs = other_value.pcs(); else field_pcs.clean_up(); if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn(); else field_arfcn.clean_up(); } return *this; } boolean Arfcn::operator==(const Arfcn& other_value) const { return field_pcs==other_value.field_pcs && field_arfcn==other_value.field_arfcn; } boolean Arfcn::is_bound() const { if(field_pcs.is_bound()) return TRUE; if(field_arfcn.is_bound()) return TRUE; return FALSE; } boolean Arfcn::is_value() const { if(!field_pcs.is_value()) return FALSE; if(!field_arfcn.is_value()) return FALSE; return TRUE; } void Arfcn::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ pcs := "); field_pcs.log(); TTCN_Logger::log_event_str(", arfcn := "); field_arfcn.log(); TTCN_Logger::log_event_str(" }"); } void Arfcn::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) pcs().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn().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(), "pcs")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pcs().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "arfcn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { arfcn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @Osmocom_Types.Arfcn: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@Osmocom_Types.Arfcn"); } } void Arfcn::set_implicit_omit() { if (pcs().is_bound()) pcs().set_implicit_omit(); if (arfcn().is_bound()) arfcn().set_implicit_omit(); } void Arfcn::encode_text(Text_Buf& text_buf) const { field_pcs.encode_text(text_buf); field_arfcn.encode_text(text_buf); } void Arfcn::decode_text(Text_Buf& text_buf) { field_pcs.decode_text(text_buf); field_arfcn.decode_text(text_buf); } void Arfcn::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) const { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name); unsigned BER_coding=va_arg(pvar, unsigned); BER_encode_chk_coding(BER_coding); ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding); tlv->put_in_buffer(p_buf); ASN_BER_TLV_t::destruct(tlv); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); RAW_enc_tr_pos rp; rp.level=0; rp.pos=NULL; RAW_enc_tree root(FALSE, NULL, &rp, 1, p_td.raw); RAW_encode(p_td, root); root.put_to_buf(p_buf); break;} case TTCN_EncDec::CT_TEXT: { TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); TEXT_encode(p_td,p_buf); break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0); p_buf.put_c('\n'); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok(va_arg(pvar, int) != 0); JSON_encode(p_td, tok); p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_encode(p_td, p_buf); break;} default: TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name); } va_end(pvar); } void Arfcn::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, TTCN_EncDec::coding_t p_coding, ...) { va_list pvar; va_start(pvar, p_coding); switch(p_coding) { case TTCN_EncDec::CT_BER: { TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name); unsigned L_form=va_arg(pvar, unsigned); ASN_BER_TLV_t tlv; BER_decode_str2TLV(p_buf, tlv, L_form); BER_decode_TLV(p_td, tlv, L_form); if(tlv.isComplete) p_buf.increase_pos(tlv.get_len()); break;} case TTCN_EncDec::CT_RAW: { TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name); if(!p_td.raw) TTCN_EncDec_ErrorContext::error_internal ("No RAW descriptor available for type '%s'.", p_td.name); raw_order_t r_order; switch(p_td.raw->top_bit_order) { case TOP_BIT_LEFT: r_order=ORDER_LSB; break; case TOP_BIT_RIGHT: default: r_order=ORDER_MSB; } int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order); if(rawr<0) switch (-rawr) { case TTCN_EncDec::ET_INCOMPL_MSG: case TTCN_EncDec::ET_LEN_ERR: ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name); break; case 1: default: ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name); break; } break;} case TTCN_EncDec::CT_TEXT: { Limit_Token_List limit; TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name); if(!p_td.text) TTCN_EncDec_ErrorContext::error_internal ("No TEXT descriptor available for type '%s'.", p_td.name); const unsigned char *b_data=p_buf.get_data(); if(b_data[p_buf.get_len()-1]!='\0'){ p_buf.set_pos(p_buf.get_len()); p_buf.put_zero(8,ORDER_LSB); p_buf.rewind(); } if(TEXT_decode(p_td,p_buf,limit)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); break;} case TTCN_EncDec::CT_XER: { TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name); unsigned XER_coding=va_arg(pvar, unsigned); XER_encode_chk_coding(XER_coding, p_td); XmlReaderWrap reader(p_buf); for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) { if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break; } XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0); size_t bytes = reader.ByteConsumed(); p_buf.set_pos(bytes); break;} case TTCN_EncDec::CT_JSON: { TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name); if(!p_td.json) TTCN_EncDec_ErrorContext::error_internal ("No JSON descriptor available for type '%s'.", p_td.name); JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len()); if(JSON_decode(p_td, tok, FALSE)<0) ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name); p_buf.set_pos(tok.get_buf_pos()); break;} case TTCN_EncDec::CT_OER: { TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name); if(!p_td.oer) TTCN_EncDec_ErrorContext::error_internal ("No OER descriptor available for type '%s'.", p_td.name); OER_struct p_oer; OER_decode(p_td, p_buf, p_oer); break;} default: TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name); } va_end(pvar); } int Arfcn::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit) { (void)no_err; int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding); limit-=prepaddlength; size_t last_decoded_pos = p_buf.get_pos_bit(); int decoded_length = 0; int decoded_field_length = 0; raw_order_t local_top_order; if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord; else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB; else local_top_order=ORDER_LSB; RAW_Force_Omit field_0_force_omit(0, force_omit, Arfcn_pcs_descr_.raw->forceomit); decoded_field_length = field_pcs.RAW_decode(Arfcn_pcs_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit); if (decoded_field_length < 0) return decoded_field_length; decoded_length+=decoded_field_length; limit-=decoded_field_length; last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit()); RAW_Force_Omit field_1_force_omit(1, force_omit, Arfcn_arfcn_descr_.raw->forceomit); decoded_field_length = field_arfcn.RAW_decode(Arfcn_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit); if (decoded_field_length < 0) return decoded_field_length; decoded_length+=decoded_field_length; limit-=decoded_field_length; last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit()); p_buf.set_pos_bit(last_decoded_pos); return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding); } int Arfcn::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const { if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value."); int encoded_length = 0; myleaf.isleaf = FALSE; myleaf.body.node.num_of_nodes = 2; myleaf.body.node.nodes = init_nodes_of_enc_tree(2); myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, Arfcn_pcs_descr_.raw); myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, Arfcn_arfcn_descr_.raw); encoded_length += field_pcs.RAW_encode(Arfcn_pcs_descr_, *myleaf.body.node.nodes[0]); encoded_length += field_arfcn.RAW_encode(Arfcn_arfcn_descr_, *myleaf.body.node.nodes[1]); return myleaf.length = encoded_length; } struct Arfcn_template::single_value_struct { BOOLEAN_template field_pcs; INTEGER_template field_arfcn; }; void Arfcn_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_pcs = ANY_VALUE; single_value->field_arfcn = ANY_VALUE; } } } void Arfcn_template::copy_value(const Arfcn& other_value) { single_value = new single_value_struct; if (other_value.pcs().is_bound()) { single_value->field_pcs = other_value.pcs(); } else { single_value->field_pcs.clean_up(); } if (other_value.arfcn().is_bound()) { single_value->field_arfcn = other_value.arfcn(); } else { single_value->field_arfcn.clean_up(); } set_selection(SPECIFIC_VALUE); } void Arfcn_template::copy_template(const Arfcn_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.pcs().get_selection()) { single_value->field_pcs = other_value.pcs(); } else { single_value->field_pcs.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) { single_value->field_arfcn = other_value.arfcn(); } else { single_value->field_arfcn.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new Arfcn_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; default: TTCN_error("Copying an uninitialized/unsupported template of type @Osmocom_Types.Arfcn."); break; } set_selection(other_value); } Arfcn_template::Arfcn_template() { } Arfcn_template::Arfcn_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } Arfcn_template::Arfcn_template(const Arfcn& other_value) { copy_value(other_value); } Arfcn_template::Arfcn_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const Arfcn&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @Osmocom_Types.Arfcn from an unbound optional field."); } } Arfcn_template::Arfcn_template(const Arfcn_template& other_value) : Base_Template() { copy_template(other_value); } Arfcn_template::~Arfcn_template() { clean_up(); } Arfcn_template& Arfcn_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } Arfcn_template& Arfcn_template::operator=(const Arfcn& other_value) { clean_up(); copy_value(other_value); return *this; } Arfcn_template& Arfcn_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const Arfcn&)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 @Osmocom_Types.Arfcn."); } return *this; } Arfcn_template& Arfcn_template::operator=(const Arfcn_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean Arfcn_template::match(const Arfcn& 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.pcs().is_bound()) return FALSE; if(!single_value->field_pcs.match(other_value.pcs(), legacy))return FALSE; if(!other_value.arfcn().is_bound()) return FALSE; if(!single_value->field_arfcn.match(other_value.arfcn(), 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; default: TTCN_error("Matching an uninitialized/unsupported template of type @Osmocom_Types.Arfcn."); } return FALSE; } boolean Arfcn_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; if (single_value->field_pcs.is_bound()) return TRUE; if (single_value->field_arfcn.is_bound()) return TRUE; return FALSE; } boolean Arfcn_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; if (!single_value->field_pcs.is_value()) return FALSE; if (!single_value->field_arfcn.is_value()) return FALSE; return TRUE; } void Arfcn_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: delete [] value_list.list_value; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } Arfcn Arfcn_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 @Osmocom_Types.Arfcn."); Arfcn ret_val; if (single_value->field_pcs.is_bound()) { ret_val.pcs() = single_value->field_pcs.valueof(); } if (single_value->field_arfcn.is_bound()) { ret_val.arfcn() = single_value->field_arfcn.valueof(); } return ret_val; } void Arfcn_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 list for a template of type @Osmocom_Types.Arfcn."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new Arfcn_template[list_length]; } Arfcn_template& Arfcn_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 @Osmocom_Types.Arfcn."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @Osmocom_Types.Arfcn."); return value_list.list_value[list_index]; } BOOLEAN_template& Arfcn_template::pcs() { set_specific(); return single_value->field_pcs; } const BOOLEAN_template& Arfcn_template::pcs() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pcs of a non-specific template of type @Osmocom_Types.Arfcn."); return single_value->field_pcs; } INTEGER_template& Arfcn_template::arfcn() { set_specific(); return single_value->field_arfcn; } const INTEGER_template& Arfcn_template::arfcn() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field arfcn of a non-specific template of type @Osmocom_Types.Arfcn."); return single_value->field_arfcn; } int Arfcn_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @Osmocom_Types.Arfcn which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: return 2; case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @Osmocom_Types.Arfcn 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 @Osmocom_Types.Arfcn containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @Osmocom_Types.Arfcn containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @Osmocom_Types.Arfcn containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @Osmocom_Types.Arfcn containing complemented list."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @Osmocom_Types.Arfcn."); } return 0; } void Arfcn_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ pcs := "); single_value->field_pcs.log(); TTCN_Logger::log_event_str(", arfcn := "); single_value->field_arfcn.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); 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; default: log_generic(); } log_ifpresent(); } void Arfcn_template::log_match(const Arfcn& 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_pcs.match(match_value.pcs(), legacy)){ TTCN_Logger::log_logmatch_info(".pcs"); single_value->field_pcs.log_match(match_value.pcs(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){ TTCN_Logger::log_logmatch_info(".arfcn"); single_value->field_arfcn.log_match(match_value.arfcn(), 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("{ pcs := "); single_value->field_pcs.log_match(match_value.pcs(), legacy); TTCN_Logger::log_event_str(", arfcn := "); single_value->field_arfcn.log_match(match_value.arfcn(), 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 Arfcn_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_pcs.encode_text(text_buf); single_value->field_arfcn.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 @Osmocom_Types.Arfcn."); } } void Arfcn_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_pcs.decode_text(text_buf); single_value->field_arfcn.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 Arfcn_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 @Osmocom_Types.Arfcn."); } } void Arfcn_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: { Arfcn_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : COMPLEMENTED_LIST, param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) pcs().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn().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(), "pcs")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { pcs().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "arfcn")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { arfcn().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @Osmocom_Types.Arfcn: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record template", "@Osmocom_Types.Arfcn"); } is_ifpresent = param.get_ifpresent(); } void Arfcn_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_pcs.check_restriction(t_res, t_name ? t_name : "@Osmocom_Types.Arfcn"); single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@Osmocom_Types.Arfcn"); 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 : "@Osmocom_Types.Arfcn"); } boolean Arfcn_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean Arfcn_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 l_idx=0; l_idx(arr)[i] == key)) { current_location.update_lineno(113); /* Osmocom_Types.ttcn, line 113 */ return TRUE; } current_location.update_lineno(111); /* Osmocom_Types.ttcn, line 111 */ { INTEGER tmp_7; ++i; } } } current_location.update_lineno(116); /* Osmocom_Types.ttcn, line 116 */ return FALSE; } void f__timer__safe__restart(TIMER& T) { TTCN_Location current_location("Osmocom_Types.ttcn", 120, TTCN_Location::LOCATION_FUNCTION, "f_timer_safe_restart"); current_location.update_lineno(121); /* Osmocom_Types.ttcn, line 121 */ if (T.running(NULL)) { current_location.update_lineno(122); /* Osmocom_Types.ttcn, line 122 */ T.stop(); } current_location.update_lineno(124); /* Osmocom_Types.ttcn, line 124 */ T.start(); } INTEGER f__div__round__up(const INTEGER& dividend, const INTEGER& divisor) { TTCN_Location current_location("Osmocom_Types.ttcn", 128, TTCN_Location::LOCATION_FUNCTION, "f_div_round_up"); current_location.update_lineno(129); /* Osmocom_Types.ttcn, line 129 */ INTEGER x((dividend / divisor)); current_location.update_lineno(130); /* Osmocom_Types.ttcn, line 130 */ if ((rem(dividend, divisor) != 0)) { current_location.update_lineno(131); /* Osmocom_Types.ttcn, line 131 */ { INTEGER tmp_8; ++x; } } current_location.update_lineno(133); /* Osmocom_Types.ttcn, line 133 */ return x; } /* Bodies of static functions */ static void pre_init_module() { TTCN_Location current_location("Osmocom_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Osmocom_Types"); General__Types::module_object.pre_init_module(); current_location.update_lineno(29); /* Osmocom_Types.ttcn, line 29 */ const_c__UINT16__MAX = 65535; current_location.update_lineno(30); /* Osmocom_Types.ttcn, line 30 */ { INTEGER INTEGER_tmp("4294967295"); const_c__UINT32__MAX = INTEGER_tmp; } module_object.add_function("f_rnd_int", (genericfunc_t)&f__rnd__int, NULL); module_object.add_function("f_rnd_hexstring", (genericfunc_t)&f__rnd__hexstring, NULL); module_object.add_function("f_rnd_octstring", (genericfunc_t)&f__rnd__octstring, NULL); module_object.add_function("f_rnd_imsi", (genericfunc_t)&f__rnd__imsi, NULL); module_object.add_function("f_rnd_msisdn", (genericfunc_t)&f__rnd__msisdn, NULL); module_object.add_function("f_sleep", (genericfunc_t)&f__sleep, NULL); module_object.add_function("bool2bit", (genericfunc_t)&bool2bit, NULL); module_object.add_function("bool2bit_tmpl", (genericfunc_t)&bool2bit__tmpl, NULL); module_object.add_function("int2bool", (genericfunc_t)&int2bool, NULL); module_object.add_function("f_array_contains", (genericfunc_t)&f__array__contains, NULL); module_object.add_function("f_timer_safe_restart", (genericfunc_t)&f__timer__safe__restart, NULL); module_object.add_function("f_div_round_up", (genericfunc_t)&f__div__round__up, NULL); } static void post_init_module() { TTCN_Location current_location("Osmocom_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "Osmocom_Types"); General__Types::module_object.post_init_module(); const_f__rnd__hexstring_max_defval = 15; const_f__rnd__msisdn_len_defval = 6; } } /* end of namespace */