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

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

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

/* Including header files */

#include "Osmocom_Types.hh"

namespace Osmocom__Types {

/* Literal string constants */

const unsigned char bs_0_bits[] = { 0 },
bs_1_bits[] = { 1 };
extern const BITSTRING bs_0(1, bs_0_bits),
bs_1(1, bs_1_bits);
const unsigned char hs_3_nibbles[] = { 98, 66, 2 },
hs_4_nibbles[] = { 148, 33, 3 },
hs_2_nibbles[] = { 148, 153, 9 },
hs_1_nibbles[] = { 15 };
extern const HEXSTRING hs_0(0, NULL),
hs_3(5, hs_3_nibbles),
hs_4(5, hs_4_nibbles),
hs_2(5, hs_2_nibbles),
hs_1(1, hs_1_nibbles);
const unsigned char os_3_octets[] = { 15 },
os_6_octets[] = { 66, 0, 0, 35 },
os_2_octets[] = { 112 },
os_5_octets[] = { 160 },
os_4_octets[] = { 224 },
os_1_octets[] = { 240 };
extern const OCTETSTRING os_0(0, NULL),
os_3(1, os_3_octets),
os_6(4, os_6_octets),
os_2(1, os_2_octets),
os_5(1, os_5_octets),
os_4(1, os_4_octets),
os_1(1, os_1_octets);
extern const CHARSTRING cs_1('*'),
cs_2('?'),
cs_4(5, "false"),
cs_0(4, "omit"),
cs_3(4, "true");
const unsigned char module_checksum[] = { 0x50, 0xbb, 0x4a, 0xec, 0x3d, 0x06, 0x2f, 0xcd, 0x26, 0x82, 0xb4, 0x2d, 0xf5, 0x8f, 0x20, 0x51 };

/* 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,false};
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, 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,false};
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, 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,false};
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, 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,false};
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, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING uint32__t_default_coding("RAW");
const TTCN_RAWdescriptor_t uint64__t_raw_ = {64,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,false};
const XERdescriptor_t       uint64__t_xer_ = { {"uint64_t>\n", "uint64_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t uint64__t_descr_ = { "@Osmocom_Types.uint64_t", &INTEGER_ber_, &uint64__t_raw_, &INTEGER_text_, &uint64__t_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING uint64__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,false};
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_Typedescriptor_t int8__t_descr_ = { "@Osmocom_Types.int8_t", &INTEGER_ber_, &int8__t_raw_, &INTEGER_text_, &int8__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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_Typedescriptor_t int16__t_descr_ = { "@Osmocom_Types.int16_t", &INTEGER_ber_, &int16__t_raw_, &INTEGER_text_, &int16__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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, 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,false};
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, 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,false};
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, 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,false};
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, 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,false};
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_Typedescriptor_t uint5__t_descr_ = { "@Osmocom_Types.uint5_t", &INTEGER_ber_, &uint5__t_raw_, &INTEGER_text_, &uint5__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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_Typedescriptor_t uint6__t_descr_ = { "@Osmocom_Types.uint6_t", &INTEGER_ber_, &uint6__t_raw_, &INTEGER_text_, &uint6__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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, 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,false};
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_Typedescriptor_t uint9__t_descr_ = { "@Osmocom_Types.uint9_t", &INTEGER_ber_, &uint9__t_raw_, &INTEGER_text_, &uint9__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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_Typedescriptor_t uint10__t_descr_ = { "@Osmocom_Types.uint10_t", &INTEGER_ber_, &uint10__t_raw_, &INTEGER_text_, &uint10__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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, 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,false};
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_Typedescriptor_t uint12__t_descr_ = { "@Osmocom_Types.uint12_t", &INTEGER_ber_, &uint12__t_raw_, &INTEGER_text_, &uint12__t_xer_, &INTEGER_json_, NULL, NULL, 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,false};
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, 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,false};
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, 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,false};
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, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING uint15__t_default_coding("RAW");
const TTCN_RAWdescriptor_t uint40__t_raw_ = {40,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,false};
const XERdescriptor_t       uint40__t_xer_ = { {"uint40_t>\n", "uint40_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t uint40__t_descr_ = { "@Osmocom_Types.uint40_t", &INTEGER_ber_, &uint40__t_raw_, &INTEGER_text_, &uint40__t_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING uint40__t_default_coding("RAW");
INTEGER const_c__UINT16__MAX;
const INTEGER& c__UINT16__MAX = const_c__UINT16__MAX;
INTEGER const_c__UINT32__MAX;
const INTEGER& c__UINT32__MAX = const_c__UINT32__MAX;
BITSTRING const_CSN1__L;
const BITSTRING& CSN1__L = const_CSN1__L;
BITSTRING const_CSN1__H;
const BITSTRING& CSN1__H = const_CSN1__H;
const TTCN_RAWdescriptor_t AddressFamily_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,false};
// No XER for AddressFamily
const TTCN_Typedescriptor_t AddressFamily_descr_ = { "@Osmocom_Types.AddressFamily", NULL, &AddressFamily_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AddressFamily_default_coding("RAW");
INTEGER const_f__rnd__hexstring_max_defval;
const INTEGER& f__rnd__hexstring_max_defval = const_f__rnd__hexstring_max_defval;
HEXSTRING const_f__rnd__imsi_prefix_defval;
const HEXSTRING& f__rnd__imsi_prefix_defval = const_f__rnd__imsi_prefix_defval;
HEXSTRING const_f__rnd__imei_prefix_defval;
const HEXSTRING& f__rnd__imei_prefix_defval = const_f__rnd__imei_prefix_defval;
HEXSTRING const_f__rnd__imeisv_prefix_defval;
const HEXSTRING& f__rnd__imeisv_prefix_defval = const_f__rnd__imeisv_prefix_defval;
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,false};
// No XER for IntegerRecord
const TTCN_Typedescriptor_t IntegerRecord_descr_ = { "@Osmocom_Types.IntegerRecord", NULL, &IntegerRecord_raw_, NULL, 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,false};
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, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IntegerRecord_0_default_coding("RAW");
UNIVERSAL_CHARSTRING IntegerRecord_default_coding("RAW");
INTEGER const_f__gen__tmsi_nri__v_defval;
const INTEGER& f__gen__tmsi_nri__v_defval = const_f__gen__tmsi_nri__v_defval;
INTEGER const_f__gen__tmsi_nri__bitlen_defval;
const INTEGER& f__gen__tmsi_nri__bitlen_defval = const_f__gen__tmsi_nri__bitlen_defval;
OCTETSTRING const_f__gen__tmsi_base__tmsi_defval;
const OCTETSTRING& f__gen__tmsi_base__tmsi_defval = const_f__gen__tmsi_base__tmsi_defval;
const TTCN_RAWdescriptor_t ro__integer_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,false};
// No XER for ro__integer
const TTCN_Typedescriptor_t ro__integer_descr_ = { "@Osmocom_Types.ro_integer", NULL, &ro__integer_raw_, NULL, NULL, NULL, NULL, NULL, &ro__integer_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t ro__integer_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,false};
const XERdescriptor_t       ro__integer_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 ro__integer_0_descr_ = { "@Osmocom_Types.ro_integer.INTEGER", &INTEGER_ber_, &ro__integer_0_raw_, &INTEGER_text_, &ro__integer_0_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ro__integer_0_default_coding("RAW");
UNIVERSAL_CHARSTRING ro__integer_default_coding("RAW");
const TTCN_RAWdescriptor_t roro__integer_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,false};
// No XER for roro__integer
const TTCN_Typedescriptor_t roro__integer_descr_ = { "@Osmocom_Types.roro_integer", NULL, &roro__integer_raw_, NULL, NULL, NULL, NULL, NULL, &roro__integer_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t roro__integer_0_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,false};
// No XER for roro__integer_0
const TTCN_Typedescriptor_t roro__integer_0_descr_ = { "@Osmocom_Types.roro_integer.<oftype>", NULL, &roro__integer_0_raw_, NULL, NULL, NULL, NULL, NULL, &ro__integer_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING roro__integer_0_default_coding("RAW");
UNIVERSAL_CHARSTRING roro__integer_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);

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

/* Member functions of C++ classes */

AddressFamily::AddressFamily()
{
enum_value = UNBOUND_VALUE;
}

AddressFamily::AddressFamily(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Initializing a variable of enumerated type @Osmocom_Types.AddressFamily with invalid numeric value %d.", other_value);
enum_value = (enum_type)other_value;
}

AddressFamily::AddressFamily(enum_type other_value)
{
enum_value = other_value;
}

AddressFamily::AddressFamily(const AddressFamily& other_value)
: Base_Type()
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Copying an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
enum_value = other_value.enum_value;
}

AddressFamily& AddressFamily::operator=(int other_value)
{
if (!is_valid_enum(other_value)) TTCN_error("Assigning unknown numeric value %d to a variable of enumerated type @Osmocom_Types.AddressFamily.", other_value);
enum_value = (enum_type)other_value;
return *this;
}

AddressFamily& AddressFamily::operator=(enum_type other_value)
{
enum_value = other_value;
return *this;
}

AddressFamily& AddressFamily::operator=(const AddressFamily& other_value)
{
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
enum_value = other_value.enum_value;
return *this;
}

boolean AddressFamily::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 @Osmocom_Types.AddressFamily.");
return enum_value == other_value;
}

boolean AddressFamily::operator==(const AddressFamily& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
return enum_value == other_value.enum_value;
}

boolean AddressFamily::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 @Osmocom_Types.AddressFamily.");
return enum_value < other_value;
}

boolean AddressFamily::operator<(const AddressFamily& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
return enum_value < other_value.enum_value;
}

boolean AddressFamily::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 @Osmocom_Types.AddressFamily.");
return enum_value > other_value;
}

boolean AddressFamily::operator>(const AddressFamily& other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
return enum_value > other_value.enum_value;
}

const char *AddressFamily::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case AF__UNSPEC: return "AF_UNSPEC";
case AF__INET: return "AF_INET";
case AF__INET6: return "AF_INET6";
default: return "<unknown>";
}
}

AddressFamily::enum_type AddressFamily::str_to_enum(const char *str_par)
{
if (!strcmp(str_par, "AF_UNSPEC")) return AF__UNSPEC;
else if (!strcmp(str_par, "AF_INET")) return AF__INET;
else if (!strcmp(str_par, "AF_INET6")) return AF__INET6;
else return UNKNOWN_VALUE;
}

boolean AddressFamily::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 2:
case 10:
return TRUE;
default:
return FALSE;
}
}

int AddressFamily::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 @Osmocom_Types.AddressFamily.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int AddressFamily::enum2int(const AddressFamily& 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 @Osmocom_Types.AddressFamily.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

void AddressFamily::int2enum(int int_val)
{
if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @Osmocom_Types.AddressFamily.", int_val);
enum_value = (enum_type)int_val;
}

AddressFamily::operator AddressFamily::enum_type() const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @Osmocom_Types.AddressFamily.");
return enum_value;
}

void AddressFamily::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 AddressFamily::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", "@Osmocom_Types.AddressFamily");
  enum_value = str_to_enum(param.get_enumerated());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @Osmocom_Types.AddressFamily.");
  }
}

void AddressFamily::encode_text(Text_Buf& text_buf) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
text_buf.push_int(enum_value);
}

void AddressFamily::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 @Osmocom_Types.AddressFamily.", enum_value);
}

void AddressFamily::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int 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(TRUE, 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, FALSE);
    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 AddressFamily::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int 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();
    int null_added=0;
    if(b_data[p_buf.get_len()-1]!='\0'){
      null_added=1;
      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);
    if(null_added){
      size_t actpos=p_buf.get_pos();
      p_buf.set_pos(p_buf.get_len()-1);
      p_buf.cut_end();
      p_buf.set_pos(actpos);
    }
    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, 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 AddressFamily::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*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 4, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

int AddressFamily::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 4);
}

void AddressFamily_template::copy_template(const AddressFamily_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 AddressFamily_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 AddressFamily_template(*other_value.implication_.precondition);
implication_.implied_template = new AddressFamily_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 @Osmocom_Types.AddressFamily.");
}
}

AddressFamily_template::AddressFamily_template()
{
}

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

AddressFamily_template::AddressFamily_template(int other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (!AddressFamily::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @Osmocom_Types.AddressFamily with unknown numeric value %d.", other_value);
single_value = (AddressFamily::enum_type)other_value;
}

AddressFamily_template::AddressFamily_template(AddressFamily::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

AddressFamily_template::AddressFamily_template(const AddressFamily& other_value)
 : Base_Template(SPECIFIC_VALUE)
{
if (other_value.enum_value == AddressFamily::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @Osmocom_Types.AddressFamily.");
single_value = other_value.enum_value;
}

AddressFamily_template::AddressFamily_template(const OPTIONAL<AddressFamily>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (AddressFamily::enum_type)(const AddressFamily&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of enumerated type @Osmocom_Types.AddressFamily from an unbound optional field.");
}
}

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

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

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

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

boolean AddressFamily_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
return TRUE;
}

boolean AddressFamily_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value != AddressFamily::UNBOUND_VALUE;
}

void AddressFamily_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;
}

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

AddressFamily_template& AddressFamily_template::operator=(int other_value)
{
if (!AddressFamily::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @Osmocom_Types.AddressFamily.", other_value);
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = (AddressFamily::enum_type)other_value;
return *this;
}

AddressFamily_template& AddressFamily_template::operator=(AddressFamily::enum_type other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;
}

AddressFamily_template& AddressFamily_template::operator=(const AddressFamily& other_value)
{
if (other_value.enum_value == AddressFamily::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @Osmocom_Types.AddressFamily to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.enum_value;
return *this;
}

AddressFamily_template& AddressFamily_template::operator=(const OPTIONAL<AddressFamily>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (AddressFamily::enum_type)(const AddressFamily&)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 @Osmocom_Types.AddressFamily.");
}
return *this;
}

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

boolean AddressFamily_template::match(AddressFamily::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 @Osmocom_Types.AddressFamily.");
}
return FALSE;
}

boolean AddressFamily_template::match(const AddressFamily& other_value, boolean) const
{
if (other_value.enum_value == AddressFamily::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @Osmocom_Types.AddressFamily with an unbound value.");
return match(other_value.enum_value);
}

AddressFamily::enum_type AddressFamily_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 @Osmocom_Types.AddressFamily.");
return single_value;
}

void AddressFamily_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 type for a template of enumerated type @Osmocom_Types.AddressFamily.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new AddressFamily_template[list_length];
}

AddressFamily_template& AddressFamily_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 @Osmocom_Types.AddressFamily.");
if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @Osmocom_Types.AddressFamily.");
return value_list.list_value[list_index];
}

void AddressFamily_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(AddressFamily::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 AddressFamily_template::log_match(const AddressFamily& 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 AddressFamily_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 @Osmocom_Types.AddressFamily.");
}
}

void AddressFamily_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (AddressFamily::enum_type)text_buf.pull_int().get_val();
if (!AddressFamily::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @Osmocom_Types.AddressFamily.", 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 AddressFamily_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 @Osmocom_Types.AddressFamily.");
}
}

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

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

void AddressFamily_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  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: {
    AddressFamily_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_i<m_p->get_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: {
    AddressFamily::enum_type enum_val = AddressFamily::str_to_enum(m_p->get_enumerated());
    if (!AddressFamily::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @Osmocom_Types.AddressFamily.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    AddressFamily_template* precondition = new AddressFamily_template;
    precondition->set_param(*m_p->get_elem(0));
    AddressFamily_template* implied_template = new AddressFamily_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = AddressFamily_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@Osmocom_Types.AddressFamily");
  }
  is_ifpresent = param.get_ifpresent();
}

void AddressFamily_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 : "@Osmocom_Types.AddressFamily");
}


const ro__integer roro__integer::UNBOUND_ELEM;
roro__integer::roro__integer()
{
val_ptr = NULL;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void roro__integer::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int 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, FALSE);
    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 roro__integer::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int 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();
    int null_added=0;
    if(b_data[p_buf.get_len()-1]!='\0'){
      null_added=1;
      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);
    if(null_added){
      size_t actpos=p_buf.get_pos();
      p_buf.set_pos(p_buf.get_len()-1);
      p_buf.cut_end();
      p_buf.set_pos(actpos);
    }
    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, 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 roro__integer::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean /*no_err*/, int sel_field, boolean first_call, const RAW_Force_Omit*){
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int decoded_field_length=0;
  size_t start_of_field=0;
  if(first_call) {
    clean_up();
    val_ptr=new recordof_setof_struct;
    val_ptr->ref_count=1;
    val_ptr->n_elements=0;
    val_ptr->value_elements=NULL;
  }
  int start_field=val_ptr->n_elements;
  if(p_td.raw->fieldlength || sel_field!=-1){
    int a=0;
    if(sel_field==-1) sel_field=p_td.raw->fieldlength;
    start_of_field=p_buf.get_pos_bit();
    for(a=0;a<sel_field;a++){
      decoded_field_length=(*this)[a+start_field].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
      if(decoded_field_length < 0){
        while(a>=0){
          delete &(*this)[a+start_field];
          a--;
          val_ptr->n_elements--;
        }
        p_buf.set_pos_bit(start_of_field);
        return decoded_field_length;
      }
      decoded_length+=decoded_field_length;
      limit-=decoded_field_length;
    }
    if(a==0) val_ptr->n_elements=0;
  } else {
    if(limit==0){
      if(!first_call) return -1;
      val_ptr->n_elements=0;
      return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
    }
    int a=start_field;
    while(limit>0){
      start_of_field=p_buf.get_pos_bit();
      decoded_field_length=(*this)[a].RAW_decode(*p_td.oftype_descr,p_buf,limit,top_bit_ord,TRUE);
      if(decoded_field_length < 0){
        delete &(*this)[a];
        val_ptr->n_elements--;
        p_buf.set_pos_bit(start_of_field);
        if(a>start_field){
        return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
        } else return -1;
      }
      decoded_length+=decoded_field_length;
      limit-=decoded_field_length;
      a++;
    }
  }
 return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
}

int roro__integer::RAW_encode(const TTCN_Typedescriptor_t& p_td,RAW_enc_tree& myleaf) const{
  int encoded_length=0;
  int encoded_num_of_records=p_td.raw->fieldlength?smaller(val_ptr->n_elements, p_td.raw->fieldlength):val_ptr->n_elements;
  myleaf.isleaf=FALSE;
  myleaf.rec_of=TRUE;
  myleaf.body.node.num_of_nodes=encoded_num_of_records;
  myleaf.body.node.nodes=init_nodes_of_enc_tree(encoded_num_of_records);
  for(int a=0;a<encoded_num_of_records;a++){
    myleaf.body.node.nodes[a]=new RAW_enc_tree(TRUE,&myleaf,&(myleaf.curr_pos),a,p_td.oftype_descr->raw);
    encoded_length+=(*this)[a].RAW_encode(*p_td.oftype_descr,*myleaf.body.node.nodes[a]);
  }
 return myleaf.length=encoded_length;
}

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

void roro__integer_template::copy_template(const roro__integer_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = other_value.single_value.n_elements;
single_value.value_elements = (ro__integer_template**)allocate_pointers(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) {
if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) {
single_value.value_elements[elem_count] = new ro__integer_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new ro__integer_template;
}
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new roro__integer_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 roro__integer_template(*other_value.implication_.precondition);
implication_.implied_template = new roro__integer_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 @Osmocom_Types.roro_integer.");
break;
}
set_selection(other_value);
}

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

roro__integer_template::roro__integer_template()
{
}

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

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

roro__integer_template::roro__integer_template(const roro__integer& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

roro__integer_template& roro__integer_template::operator=(const OPTIONAL<roro__integer>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const roro__integer&)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.roro_integer.");
}
return *this;
}

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

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

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

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

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

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

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

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

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

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

roro__integer roro__integer_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.roro_integer.");
roro__integer ret_val;
ret_val.set_size(single_value.n_elements);
for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++)
if (single_value.value_elements[elem_count]->is_bound()) {
ret_val[elem_count] = single_value.value_elements[elem_count]->valueof();
}
return ret_val;
}

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

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

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

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

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

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

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

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

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

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

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

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

void roro__integer_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
for (int i=0; i<single_value.n_elements; i++) single_value.value_elements[i]->check_restriction(t_res, t_name ? t_name : "@Osmocom_Types.roro_integer");
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.roro_integer");
}

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

/* Bodies of functions, altsteps and testcases */

void uint8__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint8__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint8__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint8__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint16__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint16__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint16__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint16__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint24__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint24__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint24__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint24__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint32__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint32__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint32__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint32__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint64__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint64__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint64__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint64__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void int8__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(int8__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER int8__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(int8__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void int16__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(int16__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER int16__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(int16__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint1__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint1__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint1__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint1__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint2__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint2__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint2__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint2__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint3__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint3__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint3__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint3__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint4__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint4__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint4__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint4__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint5__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint5__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint5__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint5__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint6__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint6__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint6__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint6__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint7__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint7__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint7__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint7__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint9__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint9__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint9__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint9__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint10__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint10__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint10__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint10__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint11__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint11__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint11__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint11__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint12__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint12__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint12__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint12__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint13__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint13__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint13__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint13__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint14__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint14__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint14__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint14__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint15__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint15__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint15__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint15__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void uint40__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(uint40__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER uint40__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(uint40__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddressFamily_encoder(const AddressFamily& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.AddressFamily' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddressFamily_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddressFamily_decoder(OCTETSTRING& input_stream, AddressFamily& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.AddressFamily' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddressFamily_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

CHARSTRING f__int2str(const INTEGER& i, const INTEGER& total__digits)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 56, TTCN_Location::LOCATION_FUNCTION, "f_int2str");
current_location.update_lineno(57);
/* Osmocom_Types.ttcn, line 57 */
CHARSTRING istr(int2str(i));
current_location.update_lineno(58);
/* Osmocom_Types.ttcn, line 58 */
CHARSTRING padstr(hex2str(int2hex(0, (total__digits - istr.lengthof()))));
current_location.update_lineno(59);
/* Osmocom_Types.ttcn, line 59 */
return (padstr + istr);
}

INTEGER f__rnd__int(const INTEGER& max)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 64, TTCN_Location::LOCATION_FUNCTION, "f_rnd_int");
current_location.update_lineno(65);
/* Osmocom_Types.ttcn, line 65 */
return float2int((rnd() * int2float(max)));
}

INTEGER f__rnd__int__nonzero(const INTEGER& max)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 69, TTCN_Location::LOCATION_FUNCTION, "f_rnd_int_nonzero");
current_location.update_lineno(70);
/* Osmocom_Types.ttcn, line 70 */
return float2int((1.0 + (rnd() * int2float((max - 1)))));
}

HEXSTRING f__rnd__hexstring(const INTEGER& len, const INTEGER& max)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 74, TTCN_Location::LOCATION_FUNCTION, "f_rnd_hexstring");
current_location.update_lineno(75);
/* Osmocom_Types.ttcn, line 75 */
INTEGER i;
current_location.update_lineno(76);
/* Osmocom_Types.ttcn, line 76 */
HEXSTRING ret(hs_0);
current_location.update_lineno(77);
/* Osmocom_Types.ttcn, line 77 */
i = 0;
current_location.update_lineno(77);
/* Osmocom_Types.ttcn, line 77 */
for ( ; ; ) {
current_location.update_lineno(77);
/* Osmocom_Types.ttcn, line 77 */
if (!(i < len)) break;
current_location.update_lineno(78);
/* Osmocom_Types.ttcn, line 78 */
{
HEXSTRING tmp_1;
tmp_1 = (ret + int2hex(f__rnd__int(max), 1));
ret = tmp_1;
}
current_location.update_lineno(77);
/* Osmocom_Types.ttcn, line 77 */
{
INTEGER tmp_2;
++i;
}
}
current_location.update_lineno(80);
/* Osmocom_Types.ttcn, line 80 */
return ret;
}

OCTETSTRING f__rnd__octstring(const INTEGER& len)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 84, TTCN_Location::LOCATION_FUNCTION, "f_rnd_octstring");
current_location.update_lineno(85);
/* Osmocom_Types.ttcn, line 85 */
INTEGER i;
current_location.update_lineno(86);
/* Osmocom_Types.ttcn, line 86 */
OCTETSTRING ret(os_0);
current_location.update_lineno(87);
/* Osmocom_Types.ttcn, line 87 */
i = 0;
current_location.update_lineno(87);
/* Osmocom_Types.ttcn, line 87 */
for ( ; ; ) {
current_location.update_lineno(87);
/* Osmocom_Types.ttcn, line 87 */
if (!(i < len)) break;
current_location.update_lineno(88);
/* Osmocom_Types.ttcn, line 88 */
{
OCTETSTRING tmp_4;
tmp_4 = (ret + int2oct(f__rnd__int(256), 1));
ret = tmp_4;
}
current_location.update_lineno(87);
/* Osmocom_Types.ttcn, line 87 */
{
INTEGER tmp_5;
++i;
}
}
current_location.update_lineno(90);
/* Osmocom_Types.ttcn, line 90 */
return ret;
}

OCTETSTRING f__rnd__octstring__rnd__len(const INTEGER& maxlen)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 94, TTCN_Location::LOCATION_FUNCTION, "f_rnd_octstring_rnd_len");
current_location.update_lineno(95);
/* Osmocom_Types.ttcn, line 95 */
return f__rnd__octstring(f__rnd__int__nonzero(maxlen));
}

BITSTRING f__rnd__bitstring(const INTEGER& len)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 99, TTCN_Location::LOCATION_FUNCTION, "f_rnd_bitstring");
current_location.update_lineno(100);
/* Osmocom_Types.ttcn, line 100 */
OCTETSTRING oct(f__rnd__octstring(((len / 8) + 1)));
current_location.update_lineno(101);
/* Osmocom_Types.ttcn, line 101 */
return substr(oct2bit(oct), 0, len);
}

HEXSTRING f__rnd__imsi(const HEXSTRING& prefix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 104, TTCN_Location::LOCATION_FUNCTION, "f_rnd_imsi");
current_location.update_lineno(105);
/* Osmocom_Types.ttcn, line 105 */
return (prefix + f__rnd__hexstring((15 - prefix.lengthof()), 10));
}

HEXSTRING f__rnd__imei(const HEXSTRING& prefix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 108, TTCN_Location::LOCATION_FUNCTION, "f_rnd_imei");
current_location.update_lineno(109);
/* Osmocom_Types.ttcn, line 109 */
return (prefix + f__rnd__hexstring((14 - prefix.lengthof()), 10));
}

HEXSTRING f__rnd__imeisv(const HEXSTRING& prefix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 112, TTCN_Location::LOCATION_FUNCTION, "f_rnd_imeisv");
current_location.update_lineno(113);
/* Osmocom_Types.ttcn, line 113 */
return (prefix + f__rnd__hexstring((16 - prefix.lengthof()), 10));
}

OCTETSTRING f__rnd__msisdn(const OCTETSTRING& prefix, const INTEGER& len)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 116, TTCN_Location::LOCATION_FUNCTION, "f_rnd_msisdn");
current_location.update_lineno(117);
/* Osmocom_Types.ttcn, line 117 */
return (prefix + f__rnd__octstring((len - prefix.lengthof())));
}

void f__rnd__sleep(const FLOAT& max__seconds)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 120, TTCN_Location::LOCATION_FUNCTION, "f_rnd_sleep");
current_location.update_lineno(121);
/* Osmocom_Types.ttcn, line 121 */
f__sleep((rnd() * max__seconds));
}

void f__sleep(const FLOAT& seconds)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 124, TTCN_Location::LOCATION_FUNCTION, "f_sleep");
current_location.update_lineno(125);
/* Osmocom_Types.ttcn, line 125 */
TIMER T("T", seconds);
current_location.update_lineno(126);
/* Osmocom_Types.ttcn, line 126 */
T.start();
current_location.update_lineno(127);
/* Osmocom_Types.ttcn, line 127 */
{
tmp_6:
alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (alt_flag != ALT_NO) {
alt_flag = T.timeout(NULL);
if (alt_flag == ALT_YES) break;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps();
if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
else if (default_flag == ALT_REPEAT) goto tmp_6;
}
current_location.update_lineno(127);
/* Osmocom_Types.ttcn, line 127 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone timeout statement failed in file Osmocom_Types.ttcn, line 127.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

BITSTRING bool2bit(const BOOLEAN& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 130, TTCN_Location::LOCATION_FUNCTION, "bool2bit");
current_location.update_lineno(131);
/* Osmocom_Types.ttcn, line 131 */
if (inp) {
current_location.update_lineno(132);
/* Osmocom_Types.ttcn, line 132 */
return bs_1;
}
else {
current_location.update_lineno(134);
/* Osmocom_Types.ttcn, line 134 */
return bs_0;
}
}

BITSTRING_template bool2bit__tmpl(const BOOLEAN_template& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 138, TTCN_Location::LOCATION_FUNCTION, "bool2bit_tmpl");
current_location.update_lineno(139);
/* Osmocom_Types.ttcn, line 139 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(140);
/* Osmocom_Types.ttcn, line 140 */
return BITSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(141);
/* Osmocom_Types.ttcn, line 141 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(142);
/* Osmocom_Types.ttcn, line 142 */
return BITSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(143);
/* Osmocom_Types.ttcn, line 143 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(144);
/* Osmocom_Types.ttcn, line 144 */
return BITSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(146);
/* Osmocom_Types.ttcn, line 146 */
if (inp.valueof()) {
current_location.update_lineno(147);
/* Osmocom_Types.ttcn, line 147 */
return BITSTRING_template(bs_1);
}
else {
current_location.update_lineno(149);
/* Osmocom_Types.ttcn, line 149 */
return BITSTRING_template(bs_0);
}
}
}
}
}

void IntegerRecord_0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IntegerRecord_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IntegerRecord_0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IntegerRecord_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IntegerRecord_encoder(const IntegerRecord& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.IntegerRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IntegerRecord_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IntegerRecord_decoder(OCTETSTRING& input_stream, IntegerRecord& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.IntegerRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IntegerRecord_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

BOOLEAN int2bool(const INTEGER& int_)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 156, TTCN_Location::LOCATION_FUNCTION, "int2bool");
current_location.update_lineno(157);
/* Osmocom_Types.ttcn, line 157 */
if ((int_ != 0)) {
current_location.update_lineno(158);
/* Osmocom_Types.ttcn, line 158 */
return TRUE;
}
else {
current_location.update_lineno(160);
/* Osmocom_Types.ttcn, line 160 */
return FALSE;
}
}

HEXSTRING_template int2hex__tmpl(const INTEGER_template& inp, const INTEGER& len)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 164, TTCN_Location::LOCATION_FUNCTION, "int2hex_tmpl");
current_location.update_lineno(165);
/* Osmocom_Types.ttcn, line 165 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(166);
/* Osmocom_Types.ttcn, line 166 */
return HEXSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(167);
/* Osmocom_Types.ttcn, line 167 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(168);
/* Osmocom_Types.ttcn, line 168 */
return HEXSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(169);
/* Osmocom_Types.ttcn, line 169 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(170);
/* Osmocom_Types.ttcn, line 170 */
return HEXSTRING_template(ANY_VALUE);
}
}
}
current_location.update_lineno(172);
/* Osmocom_Types.ttcn, line 172 */
return HEXSTRING_template(int2hex(inp.valueof(), len));
}

OCTETSTRING_template int2oct__tmpl(const INTEGER_template& inp, const INTEGER& num__oct)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 175, TTCN_Location::LOCATION_FUNCTION, "int2oct_tmpl");
current_location.update_lineno(177);
/* Osmocom_Types.ttcn, line 177 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(178);
/* Osmocom_Types.ttcn, line 178 */
return OCTETSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(179);
/* Osmocom_Types.ttcn, line 179 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(180);
/* Osmocom_Types.ttcn, line 180 */
return OCTETSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(181);
/* Osmocom_Types.ttcn, line 181 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(182);
/* Osmocom_Types.ttcn, line 182 */
return OCTETSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(184);
/* Osmocom_Types.ttcn, line 184 */
return OCTETSTRING_template(int2oct(inp.valueof(), num__oct));
}
}
}
}

OCTETSTRING_template char2oct__tmpl(const CHARSTRING_template& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 188, TTCN_Location::LOCATION_FUNCTION, "char2oct_tmpl");
current_location.update_lineno(190);
/* Osmocom_Types.ttcn, line 190 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(191);
/* Osmocom_Types.ttcn, line 191 */
return OCTETSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(192);
/* Osmocom_Types.ttcn, line 192 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(193);
/* Osmocom_Types.ttcn, line 193 */
return OCTETSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(194);
/* Osmocom_Types.ttcn, line 194 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(195);
/* Osmocom_Types.ttcn, line 195 */
return OCTETSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(197);
/* Osmocom_Types.ttcn, line 197 */
return OCTETSTRING_template(char2oct(inp.valueof()));
}
}
}
}

OCTETSTRING_template char2oct__tmpl__present(const CHARSTRING_template& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 201, TTCN_Location::LOCATION_FUNCTION, "char2oct_tmpl_present");
current_location.update_lineno(203);
/* Osmocom_Types.ttcn, line 203 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(204);
/* Osmocom_Types.ttcn, line 204 */
return OCTETSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(206);
/* Osmocom_Types.ttcn, line 206 */
return OCTETSTRING_template(char2oct(inp.valueof()));
}
}

CHARSTRING_template hex2str__tmpl(const HEXSTRING_template& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 210, TTCN_Location::LOCATION_FUNCTION, "hex2str_tmpl");
current_location.update_lineno(212);
/* Osmocom_Types.ttcn, line 212 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(213);
/* Osmocom_Types.ttcn, line 213 */
return CHARSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(214);
/* Osmocom_Types.ttcn, line 214 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(215);
/* Osmocom_Types.ttcn, line 215 */
return CHARSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(216);
/* Osmocom_Types.ttcn, line 216 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(217);
/* Osmocom_Types.ttcn, line 217 */
return CHARSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(219);
/* Osmocom_Types.ttcn, line 219 */
return CHARSTRING_template(hex2str(inp.valueof()));
}
}
}
}

BOOLEAN f__array__contains(const IntegerRecord& arr, const INTEGER& key)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 223, TTCN_Location::LOCATION_FUNCTION, "f_array_contains");
{
current_location.update_lineno(224);
/* Osmocom_Types.ttcn, line 224 */
INTEGER i(0);
current_location.update_lineno(224);
/* Osmocom_Types.ttcn, line 224 */
for ( ; ; ) {
current_location.update_lineno(224);
/* Osmocom_Types.ttcn, line 224 */
if (!(i < arr.size_of())) break;
current_location.update_lineno(225);
/* Osmocom_Types.ttcn, line 225 */
if ((const_cast< const IntegerRecord&>(arr)[i] == key)) {
current_location.update_lineno(226);
/* Osmocom_Types.ttcn, line 226 */
return TRUE;
}
current_location.update_lineno(224);
/* Osmocom_Types.ttcn, line 224 */
{
INTEGER tmp_7;
++i;
}
}
}
current_location.update_lineno(229);
/* Osmocom_Types.ttcn, line 229 */
return FALSE;
}

void f__timer__safe__restart(TIMER& T)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 233, TTCN_Location::LOCATION_FUNCTION, "f_timer_safe_restart");
current_location.update_lineno(234);
/* Osmocom_Types.ttcn, line 234 */
if (T.running(NULL)) {
current_location.update_lineno(235);
/* Osmocom_Types.ttcn, line 235 */
T.stop();
}
current_location.update_lineno(237);
/* Osmocom_Types.ttcn, line 237 */
T.start();
}

INTEGER f__div__round__up(const INTEGER& dividend, const INTEGER& divisor)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 241, TTCN_Location::LOCATION_FUNCTION, "f_div_round_up");
current_location.update_lineno(242);
/* Osmocom_Types.ttcn, line 242 */
INTEGER x((dividend / divisor));
current_location.update_lineno(243);
/* Osmocom_Types.ttcn, line 243 */
if ((rem(dividend, divisor) != 0)) {
current_location.update_lineno(244);
/* Osmocom_Types.ttcn, line 244 */
{
INTEGER tmp_8;
++x;
}
}
current_location.update_lineno(246);
/* Osmocom_Types.ttcn, line 246 */
return x;
}

OCTETSTRING imsi__hex2oct(const HEXSTRING& imsi)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 249, TTCN_Location::LOCATION_FUNCTION, "imsi_hex2oct");
current_location.update_lineno(250);
/* Osmocom_Types.ttcn, line 250 */
HEXSTRING tmp(hs_0);
current_location.update_lineno(251);
/* Osmocom_Types.ttcn, line 251 */
OCTETSTRING ret;
current_location.update_lineno(252);
/* Osmocom_Types.ttcn, line 252 */
INTEGER i;
current_location.update_lineno(255);
/* Osmocom_Types.ttcn, line 255 */
i = 0;
current_location.update_lineno(255);
/* Osmocom_Types.ttcn, line 255 */
for ( ; ; ) {
current_location.update_lineno(255);
/* Osmocom_Types.ttcn, line 255 */
if (!(i < imsi.lengthof())) break;
current_location.update_lineno(256);
/* Osmocom_Types.ttcn, line 256 */
if (((i + 1) < imsi.lengthof())) {
current_location.update_lineno(257);
/* Osmocom_Types.ttcn, line 257 */
{
HEXSTRING tmp_10;
tmp_10 = (tmp + const_cast< const HEXSTRING&>(imsi)[(i + 1)]);
tmp = tmp_10;
}
}
else {
current_location.update_lineno(259);
/* Osmocom_Types.ttcn, line 259 */
{
HEXSTRING tmp_11;
tmp_11 = (tmp + hs_1);
tmp = tmp_11;
}
}
current_location.update_lineno(261);
/* Osmocom_Types.ttcn, line 261 */
{
HEXSTRING tmp_12;
tmp_12 = (tmp + const_cast< const HEXSTRING&>(imsi)[i]);
tmp = tmp_12;
}
current_location.update_lineno(262);
/* Osmocom_Types.ttcn, line 262 */
{
INTEGER tmp_13;
++i;
}
current_location.update_lineno(255);
/* Osmocom_Types.ttcn, line 255 */
{
INTEGER tmp_14;
++i;
}
}
current_location.update_lineno(264);
/* Osmocom_Types.ttcn, line 264 */
ret = hex2oct(tmp);
current_location.update_lineno(265);
/* Osmocom_Types.ttcn, line 265 */
return ret;
}

HEXSTRING imsi__oct2hex(const OCTETSTRING& imsi)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 268, TTCN_Location::LOCATION_FUNCTION, "imsi_oct2hex");
current_location.update_lineno(269);
/* Osmocom_Types.ttcn, line 269 */
HEXSTRING ret(hs_0);
current_location.update_lineno(270);
/* Osmocom_Types.ttcn, line 270 */
INTEGER i;
current_location.update_lineno(273);
/* Osmocom_Types.ttcn, line 273 */
i = 0;
current_location.update_lineno(273);
/* Osmocom_Types.ttcn, line 273 */
for ( ; ; ) {
current_location.update_lineno(273);
/* Osmocom_Types.ttcn, line 273 */
if (!(i < imsi.lengthof())) break;
current_location.update_lineno(274);
/* Osmocom_Types.ttcn, line 274 */
HEXSTRING h(oct2hex(const_cast< const OCTETSTRING&>(imsi)[i]));
current_location.update_lineno(275);
/* Osmocom_Types.ttcn, line 275 */
if ((const_cast< const HEXSTRING&>(h)[0] == hs_1)) {
current_location.update_lineno(276);
/* Osmocom_Types.ttcn, line 276 */
{
HEXSTRING tmp_17;
tmp_17 = (ret + const_cast< const HEXSTRING&>(h)[1]);
ret = tmp_17;
}
}
else {
current_location.update_lineno(278);
/* Osmocom_Types.ttcn, line 278 */
{
HEXSTRING tmp_18;
tmp_18 = ((ret + const_cast< const HEXSTRING&>(h)[1]) + const_cast< const HEXSTRING&>(h)[0]);
ret = tmp_18;
}
}
current_location.update_lineno(273);
/* Osmocom_Types.ttcn, line 273 */
{
INTEGER tmp_19;
++i;
}
}
current_location.update_lineno(281);
/* Osmocom_Types.ttcn, line 281 */
return ret;
}

OCTETSTRING f__pad__oct(const OCTETSTRING& str, const INTEGER& len, const OCTETSTRING& pad)
{
OCTETSTRING str_shadow(str);
TTCN_Location current_location("Osmocom_Types.ttcn", 284, TTCN_Location::LOCATION_FUNCTION, "f_pad_oct");
current_location.update_lineno(285);
/* Osmocom_Types.ttcn, line 285 */
INTEGER strlen(str_shadow.lengthof());
{
current_location.update_lineno(286);
/* Osmocom_Types.ttcn, line 286 */
INTEGER i(0);
current_location.update_lineno(286);
/* Osmocom_Types.ttcn, line 286 */
for ( ; ; ) {
current_location.update_lineno(286);
/* Osmocom_Types.ttcn, line 286 */
if (!(i < (len - strlen))) break;
current_location.update_lineno(287);
/* Osmocom_Types.ttcn, line 287 */
{
OCTETSTRING tmp_20;
tmp_20 = (str_shadow + pad);
str_shadow = tmp_20;
}
current_location.update_lineno(286);
/* Osmocom_Types.ttcn, line 286 */
{
INTEGER tmp_21;
++i;
}
}
}
current_location.update_lineno(289);
/* Osmocom_Types.ttcn, line 289 */
return str_shadow;
}

BITSTRING f__pad__bit(const BITSTRING& str, const INTEGER& len, const BITSTRING& pad)
{
BITSTRING str_shadow(str);
TTCN_Location current_location("Osmocom_Types.ttcn", 292, TTCN_Location::LOCATION_FUNCTION, "f_pad_bit");
current_location.update_lineno(293);
/* Osmocom_Types.ttcn, line 293 */
INTEGER strlen(str_shadow.lengthof());
{
current_location.update_lineno(294);
/* Osmocom_Types.ttcn, line 294 */
INTEGER i(0);
current_location.update_lineno(294);
/* Osmocom_Types.ttcn, line 294 */
for ( ; ; ) {
current_location.update_lineno(294);
/* Osmocom_Types.ttcn, line 294 */
if (!(i < (len - strlen))) break;
current_location.update_lineno(295);
/* Osmocom_Types.ttcn, line 295 */
{
BITSTRING tmp_22;
tmp_22 = (str_shadow + pad);
str_shadow = tmp_22;
}
current_location.update_lineno(294);
/* Osmocom_Types.ttcn, line 294 */
{
INTEGER tmp_23;
++i;
}
}
}
current_location.update_lineno(297);
/* Osmocom_Types.ttcn, line 297 */
return str_shadow;
}

HEXSTRING f__pad__bcd__number(const HEXSTRING& number)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 300, TTCN_Location::LOCATION_FUNCTION, "f_pad_bcd_number");
current_location.update_lineno(301);
/* Osmocom_Types.ttcn, line 301 */
if ((mod(number.lengthof(), 2) != 0)) {
current_location.update_lineno(302);
/* Osmocom_Types.ttcn, line 302 */
return (number + hs_1);
}
else {
current_location.update_lineno(304);
/* Osmocom_Types.ttcn, line 304 */
return number;
}
}

HEXSTRING_template f__pad__bcd__number__tmpl(const HEXSTRING_template& inp)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 308, TTCN_Location::LOCATION_FUNCTION, "f_pad_bcd_number_tmpl");
current_location.update_lineno(309);
/* Osmocom_Types.ttcn, line 309 */
if (inp.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(310);
/* Osmocom_Types.ttcn, line 310 */
return HEXSTRING_template(OMIT_VALUE);
}
else {
current_location.update_lineno(311);
/* Osmocom_Types.ttcn, line 311 */
if (inp.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(312);
/* Osmocom_Types.ttcn, line 312 */
return HEXSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(313);
/* Osmocom_Types.ttcn, line 313 */
if (inp.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(314);
/* Osmocom_Types.ttcn, line 314 */
return HEXSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(316);
/* Osmocom_Types.ttcn, line 316 */
return HEXSTRING_template(f__pad__bcd__number(inp.valueof()));
}
}
}
}

BOOLEAN ra__is__ps(const OCTETSTRING& ra)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 321, TTCN_Location::LOCATION_FUNCTION, "ra_is_ps");
current_location.update_lineno(322);
/* Osmocom_Types.ttcn, line 322 */
{
boolean tmp_24;
tmp_24 = ((ra & os_1) == os_2);
if (tmp_24) tmp_24 = ((ra & os_3) != os_3);
if (tmp_24) {
current_location.update_lineno(323);
/* Osmocom_Types.ttcn, line 323 */
return TRUE;
}
}
current_location.update_lineno(325);
/* Osmocom_Types.ttcn, line 325 */
return FALSE;
}

BOOLEAN ra__is__emerg(const OCTETSTRING& ra)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 328, TTCN_Location::LOCATION_FUNCTION, "ra_is_emerg");
current_location.update_lineno(330);
/* Osmocom_Types.ttcn, line 330 */
return ((ra & os_4) == os_5);
}

OCTETSTRING f__rnd__ra__cs()
{
TTCN_Location current_location("Osmocom_Types.ttcn", 334, TTCN_Location::LOCATION_FUNCTION, "f_rnd_ra_cs");
current_location.update_lineno(335);
/* Osmocom_Types.ttcn, line 335 */
OCTETSTRING ra;
for ( ; ; ) {
current_location.update_lineno(337);
/* Osmocom_Types.ttcn, line 337 */
ra = f__rnd__octstring(1);
current_location.update_lineno(338);
/* Osmocom_Types.ttcn, line 338 */
{
boolean tmp_26;
tmp_26 = ra__is__ps(ra);
if (!tmp_26) tmp_26 = ra__is__emerg(ra);
if (!tmp_26) break;
}
}
current_location.update_lineno(339);
/* Osmocom_Types.ttcn, line 339 */
return ra;
}

OCTETSTRING f__rnd__ra__emerg()
{
TTCN_Location current_location("Osmocom_Types.ttcn", 343, TTCN_Location::LOCATION_FUNCTION, "f_rnd_ra_emerg");
current_location.update_lineno(344);
/* Osmocom_Types.ttcn, line 344 */
OCTETSTRING ra;
for ( ; ; ) {
current_location.update_lineno(346);
/* Osmocom_Types.ttcn, line 346 */
ra = f__rnd__octstring(1);
current_location.update_lineno(347);
/* Osmocom_Types.ttcn, line 347 */
if (!(!(ra__is__emerg(ra)))) break;
}
current_location.update_lineno(348);
/* Osmocom_Types.ttcn, line 348 */
return ra;
}

OCTETSTRING f__rnd__ra__ps()
{
TTCN_Location current_location("Osmocom_Types.ttcn", 352, TTCN_Location::LOCATION_FUNCTION, "f_rnd_ra_ps");
current_location.update_lineno(353);
/* Osmocom_Types.ttcn, line 353 */
OCTETSTRING ra;
for ( ; ; ) {
current_location.update_lineno(355);
/* Osmocom_Types.ttcn, line 355 */
ra = f__rnd__octstring(1);
current_location.update_lineno(356);
/* Osmocom_Types.ttcn, line 356 */
if (!(!(ra__is__ps(ra)))) break;
}
current_location.update_lineno(357);
/* Osmocom_Types.ttcn, line 357 */
return ra;
}

BITSTRING f__rnd__ra11__ps()
{
TTCN_Location current_location("Osmocom_Types.ttcn", 361, TTCN_Location::LOCATION_FUNCTION, "f_rnd_ra11_ps");
current_location.update_lineno(362);
/* Osmocom_Types.ttcn, line 362 */
return f__rnd__bitstring(11);
}

HEXSTRING f__concat__pad(const INTEGER& tot__len, const HEXSTRING& prefix, const INTEGER& suffix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 366, TTCN_Location::LOCATION_FUNCTION, "f_concat_pad");
current_location.update_lineno(367);
/* Osmocom_Types.ttcn, line 367 */
INTEGER suffix__len((tot__len - prefix.lengthof()));
current_location.update_lineno(368);
/* Osmocom_Types.ttcn, line 368 */
CHARSTRING suffix__ch(int2str(suffix));
current_location.update_lineno(369);
/* Osmocom_Types.ttcn, line 369 */
INTEGER pad__len((suffix__len - suffix__ch.lengthof()));
current_location.update_lineno(371);
/* Osmocom_Types.ttcn, line 371 */
return ((prefix + int2hex(0, pad__len)) + str2hex(suffix__ch));
}

HEXSTRING f__gen__imei(const INTEGER& suffix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 374, TTCN_Location::LOCATION_FUNCTION, "f_gen_imei");
current_location.update_lineno(375);
/* Osmocom_Types.ttcn, line 375 */
return f__concat__pad(14, hs_2, suffix);
}

HEXSTRING f__gen__imsi(const INTEGER& suffix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 378, TTCN_Location::LOCATION_FUNCTION, "f_gen_imsi");
current_location.update_lineno(379);
/* Osmocom_Types.ttcn, line 379 */
return f__concat__pad(15, hs_3, suffix);
}

HEXSTRING f__gen__msisdn(const INTEGER& suffix)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 382, TTCN_Location::LOCATION_FUNCTION, "f_gen_msisdn");
current_location.update_lineno(383);
/* Osmocom_Types.ttcn, line 383 */
return f__concat__pad(12, hs_4, suffix);
}

OCTETSTRING f__gen__tmsi(const INTEGER& suffix, const INTEGER& nri__v, const INTEGER& nri__bitlen, const OCTETSTRING& base__tmsi)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 386, TTCN_Location::LOCATION_FUNCTION, "f_gen_tmsi");
current_location.update_lineno(388);
/* Osmocom_Types.ttcn, line 388 */
INTEGER tmsi__int((oct2int(base__tmsi) + suffix));
current_location.update_lineno(389);
/* Osmocom_Types.ttcn, line 389 */
BITSTRING base__tmsi__bits(int2bit(tmsi__int, 32));
current_location.update_lineno(390);
/* Osmocom_Types.ttcn, line 390 */
BITSTRING prefix__bits(substr(base__tmsi__bits, 0, 8));
current_location.update_lineno(391);
/* Osmocom_Types.ttcn, line 391 */
BITSTRING suffix__bits(substr(base__tmsi__bits, (8 + nri__bitlen), (24 - nri__bitlen)));
current_location.update_lineno(392);
/* Osmocom_Types.ttcn, line 392 */
BITSTRING total__bits(((prefix__bits + int2bit(nri__v, nri__bitlen)) + suffix__bits));
current_location.update_lineno(393);
/* Osmocom_Types.ttcn, line 393 */
OCTETSTRING tmsi(bit2oct(total__bits));
current_location.update_lineno(395);
/* Osmocom_Types.ttcn, line 395 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("f_gen_tmsi(suffix:=");
suffix.log();
TTCN_Logger::log_event_str(", nri_v:=");
nri__v.log();
TTCN_Logger::log_event_str(", nri_bitlen:=");
nri__bitlen.log();
TTCN_Logger::log_event_str(", base_tmsi:=");
base__tmsi.log();
TTCN_Logger::log_event_str(") -> prefix:=");
prefix__bits.log();
TTCN_Logger::log_event_str(", suffix:=");
suffix__bits.log();
TTCN_Logger::log_event_str(", total_bits:=");
total__bits.log();
TTCN_Logger::log_event_str(" == ");
tmsi.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(399);
/* Osmocom_Types.ttcn, line 399 */
return tmsi;
}

void ro__integer_0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ro__integer_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ro__integer_0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ro__integer_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ro__integer_encoder(const ro__integer& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.ro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ro__integer_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ro__integer_decoder(OCTETSTRING& input_stream, ro__integer& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.ro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ro__integer_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

BOOLEAN ro__integer__contains(const ro__integer& r, const INTEGER& x)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 404, TTCN_Location::LOCATION_FUNCTION, "ro_integer_contains");
{
current_location.update_lineno(405);
/* Osmocom_Types.ttcn, line 405 */
INTEGER j(0);
current_location.update_lineno(405);
/* Osmocom_Types.ttcn, line 405 */
for ( ; ; ) {
current_location.update_lineno(405);
/* Osmocom_Types.ttcn, line 405 */
if (!(j < r.lengthof())) break;
current_location.update_lineno(406);
/* Osmocom_Types.ttcn, line 406 */
if ((const_cast< const ro__integer&>(r)[j] == x)) {
current_location.update_lineno(407);
/* Osmocom_Types.ttcn, line 407 */
return TRUE;
}
current_location.update_lineno(405);
/* Osmocom_Types.ttcn, line 405 */
{
INTEGER tmp_29;
++j;
}
}
}
current_location.update_lineno(410);
/* Osmocom_Types.ttcn, line 410 */
return FALSE;
}

void ro__integer__add__unique(ro__integer& roi, const INTEGER& new__entry)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 413, TTCN_Location::LOCATION_FUNCTION, "ro_integer_add_unique");
current_location.update_lineno(415);
/* Osmocom_Types.ttcn, line 415 */
if (ro__integer__contains(roi, new__entry)) {
current_location.update_lineno(416);
/* Osmocom_Types.ttcn, line 416 */
return;
}
current_location.update_lineno(418);
/* Osmocom_Types.ttcn, line 418 */
{
ro__integer tmp_30;
{
ro__integer tmp_31;
tmp_31.set_size(1);
tmp_31[0] = new__entry;
tmp_30 = (roi + tmp_31);
}
roi = tmp_30;
}
}

void ro__integer__del(ro__integer& roi, const INTEGER& del__entry)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 421, TTCN_Location::LOCATION_FUNCTION, "ro_integer_del");
current_location.update_lineno(423);
/* Osmocom_Types.ttcn, line 423 */
ro__integer tmp(NULL_VALUE);
{
current_location.update_lineno(424);
/* Osmocom_Types.ttcn, line 424 */
INTEGER j(0);
current_location.update_lineno(424);
/* Osmocom_Types.ttcn, line 424 */
for ( ; ; ) {
current_location.update_lineno(424);
/* Osmocom_Types.ttcn, line 424 */
if (!(j < roi.lengthof())) break;
current_location.update_lineno(425);
/* Osmocom_Types.ttcn, line 425 */
if ((const_cast< const ro__integer&>(roi)[j] != del__entry)) {
current_location.update_lineno(426);
/* Osmocom_Types.ttcn, line 426 */
{
ro__integer tmp_32;
{
ro__integer tmp_33;
tmp_33.set_size(1);
tmp_33[0] = const_cast< const ro__integer&>(roi)[j];
tmp_32 = (tmp + tmp_33);
}
tmp = tmp_32;
}
}
current_location.update_lineno(424);
/* Osmocom_Types.ttcn, line 424 */
{
INTEGER tmp_34;
++j;
}
}
}
current_location.update_lineno(429);
/* Osmocom_Types.ttcn, line 429 */
roi = tmp;
}

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

void roro__integer_0_encoder(const ro__integer& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.ro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(roro__integer_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER roro__integer_0_decoder(OCTETSTRING& input_stream, ro__integer& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.ro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(roro__integer_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void roro__integer_encoder(const roro__integer& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.roro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(roro__integer_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER roro__integer_decoder(OCTETSTRING& input_stream, roro__integer& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@Osmocom_Types.roro_integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(roro__integer_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

CHARSTRING f__bool2str(const BOOLEAN& val)
{
TTCN_Location current_location("Osmocom_Types.ttcn", 434, TTCN_Location::LOCATION_FUNCTION, "f_bool2str");
current_location.update_lineno(435);
/* Osmocom_Types.ttcn, line 435 */
if (val) {
current_location.update_lineno(436);
/* Osmocom_Types.ttcn, line 436 */
return cs_3;
}
else {
current_location.update_lineno(438);
/* Osmocom_Types.ttcn, line 438 */
return cs_4;
}
}

BITSTRING f__bits__reversed(const BITSTRING& bits)
{
BITSTRING bits_shadow(bits);
TTCN_Location current_location("Osmocom_Types.ttcn", 443, TTCN_Location::LOCATION_FUNCTION, "f_bits_reversed");
{
current_location.update_lineno(444);
/* Osmocom_Types.ttcn, line 444 */
INTEGER i(0);
current_location.update_lineno(444);
/* Osmocom_Types.ttcn, line 444 */
for ( ; ; ) {
current_location.update_lineno(444);
/* Osmocom_Types.ttcn, line 444 */
if (!(i < (bits_shadow.lengthof() / 2))) break;
current_location.update_lineno(445);
/* Osmocom_Types.ttcn, line 445 */
INTEGER reverse__i(((bits_shadow.lengthof() - 1) - i));
current_location.update_lineno(446);
/* Osmocom_Types.ttcn, line 446 */
if ((i >= reverse__i)) {
current_location.update_lineno(447);
/* Osmocom_Types.ttcn, line 447 */
break;
}
current_location.update_lineno(449);
/* Osmocom_Types.ttcn, line 449 */
BITSTRING tmp;
current_location.update_lineno(450);
/* Osmocom_Types.ttcn, line 450 */
tmp[0] = const_cast< const BITSTRING&>(bits_shadow)[i];
current_location.update_lineno(451);
/* Osmocom_Types.ttcn, line 451 */
{
BITSTRING tmp_37;
tmp_37 = const_cast< const BITSTRING&>(bits_shadow)[reverse__i];
bits_shadow[i] = tmp_37;
}
current_location.update_lineno(452);
/* Osmocom_Types.ttcn, line 452 */
bits_shadow[reverse__i] = const_cast< const BITSTRING&>(tmp)[0];
current_location.update_lineno(444);
/* Osmocom_Types.ttcn, line 444 */
{
INTEGER tmp_39;
++i;
}
}
}
current_location.update_lineno(454);
/* Osmocom_Types.ttcn, line 454 */
return bits_shadow;
}


/* Bodies of static functions */

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(41);
/* Osmocom_Types.ttcn, line 41 */
const_c__UINT16__MAX = 65535;
current_location.update_lineno(42);
/* Osmocom_Types.ttcn, line 42 */
{ INTEGER INTEGER_tmp("4294967295");
const_c__UINT32__MAX = INTEGER_tmp; }
current_location.update_lineno(45);
/* Osmocom_Types.ttcn, line 45 */
const_CSN1__L = bs_0;
current_location.update_lineno(46);
/* Osmocom_Types.ttcn, line 46 */
const_CSN1__H = bs_1;
module_object.add_function("f_int2str", (genericfunc_t)&f__int2str, NULL);
module_object.add_function("f_rnd_int", (genericfunc_t)&f__rnd__int, NULL);
module_object.add_function("f_rnd_int_nonzero", (genericfunc_t)&f__rnd__int__nonzero, 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_octstring_rnd_len", (genericfunc_t)&f__rnd__octstring__rnd__len, NULL);
module_object.add_function("f_rnd_bitstring", (genericfunc_t)&f__rnd__bitstring, NULL);
module_object.add_function("f_rnd_imsi", (genericfunc_t)&f__rnd__imsi, NULL);
module_object.add_function("f_rnd_imei", (genericfunc_t)&f__rnd__imei, NULL);
module_object.add_function("f_rnd_imeisv", (genericfunc_t)&f__rnd__imeisv, NULL);
module_object.add_function("f_rnd_msisdn", (genericfunc_t)&f__rnd__msisdn, NULL);
module_object.add_function("f_rnd_sleep", (genericfunc_t)&f__rnd__sleep, 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("int2hex_tmpl", (genericfunc_t)&int2hex__tmpl, NULL);
module_object.add_function("int2oct_tmpl", (genericfunc_t)&int2oct__tmpl, NULL);
module_object.add_function("char2oct_tmpl", (genericfunc_t)&char2oct__tmpl, NULL);
module_object.add_function("char2oct_tmpl_present", (genericfunc_t)&char2oct__tmpl__present, NULL);
module_object.add_function("hex2str_tmpl", (genericfunc_t)&hex2str__tmpl, 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);
module_object.add_function("imsi_hex2oct", (genericfunc_t)&imsi__hex2oct, NULL);
module_object.add_function("imsi_oct2hex", (genericfunc_t)&imsi__oct2hex, NULL);
module_object.add_function("f_pad_oct", (genericfunc_t)&f__pad__oct, NULL);
module_object.add_function("f_pad_bit", (genericfunc_t)&f__pad__bit, NULL);
module_object.add_function("f_pad_bcd_number", (genericfunc_t)&f__pad__bcd__number, NULL);
module_object.add_function("f_pad_bcd_number_tmpl", (genericfunc_t)&f__pad__bcd__number__tmpl, NULL);
module_object.add_function("ra_is_ps", (genericfunc_t)&ra__is__ps, NULL);
module_object.add_function("ra_is_emerg", (genericfunc_t)&ra__is__emerg, NULL);
module_object.add_function("f_rnd_ra_cs", (genericfunc_t)&f__rnd__ra__cs, NULL);
module_object.add_function("f_rnd_ra_emerg", (genericfunc_t)&f__rnd__ra__emerg, NULL);
module_object.add_function("f_rnd_ra_ps", (genericfunc_t)&f__rnd__ra__ps, NULL);
module_object.add_function("f_rnd_ra11_ps", (genericfunc_t)&f__rnd__ra11__ps, NULL);
module_object.add_function("f_concat_pad", (genericfunc_t)&f__concat__pad, NULL);
module_object.add_function("f_gen_imei", (genericfunc_t)&f__gen__imei, NULL);
module_object.add_function("f_gen_imsi", (genericfunc_t)&f__gen__imsi, NULL);
module_object.add_function("f_gen_msisdn", (genericfunc_t)&f__gen__msisdn, NULL);
module_object.add_function("f_gen_tmsi", (genericfunc_t)&f__gen__tmsi, NULL);
module_object.add_function("ro_integer_contains", (genericfunc_t)&ro__integer__contains, NULL);
module_object.add_function("ro_integer_add_unique", (genericfunc_t)&ro__integer__add__unique, NULL);
module_object.add_function("ro_integer_del", (genericfunc_t)&ro__integer__del, NULL);
module_object.add_function("f_bool2str", (genericfunc_t)&f__bool2str, NULL);
module_object.add_function("f_bits_reversed", (genericfunc_t)&f__bits__reversed, NULL);
}

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();
current_location.update_lineno(74);
/* Osmocom_Types.ttcn, line 74 */
const_f__rnd__hexstring_max_defval = 16;
current_location.update_lineno(104);
/* Osmocom_Types.ttcn, line 104 */
const_f__rnd__imsi_prefix_defval = hs_0;
current_location.update_lineno(108);
/* Osmocom_Types.ttcn, line 108 */
const_f__rnd__imei_prefix_defval = hs_0;
current_location.update_lineno(112);
/* Osmocom_Types.ttcn, line 112 */
const_f__rnd__imeisv_prefix_defval = hs_0;
current_location.update_lineno(116);
/* Osmocom_Types.ttcn, line 116 */
const_f__rnd__msisdn_len_defval = 6;
current_location.update_lineno(386);
/* Osmocom_Types.ttcn, line 386 */
const_f__gen__tmsi_nri__v_defval = 0;
current_location.update_lineno(386);
/* Osmocom_Types.ttcn, line 386 */
const_f__gen__tmsi_nri__bitlen_defval = 10;
current_location.update_lineno(387);
/* Osmocom_Types.ttcn, line 387 */
const_f__gen__tmsi_base__tmsi_defval = os_6;
}


} /* end of namespace */
