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

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

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

/* Including header files */

#include "PCUIF_Types.hh"

namespace PCUIF__Types {

/* Literal string constants */

const unsigned char bs_3_bits[] = { 0 },
bs_1_bits[] = { 0 },
bs_0_bits[] = { 0, 0 },
bs_4_bits[] = { 128 };
extern const BITSTRING bs_2(0, NULL),
bs_3(1, bs_3_bits),
bs_1(3, bs_1_bits),
bs_0(14, bs_0_bits),
bs_4(8, bs_4_bits);
const unsigned char os_2_octets[] = { 0 },
os_0_octets[] = { 0, 0 },
os_1_octets[] = { 0, 0, 0 };
extern const OCTETSTRING os_3(0, NULL),
os_2(1, os_2_octets),
os_0(2, os_0_octets),
os_1(3, os_1_octets);
extern const CHARSTRING cs_0(12, "/tmp/pcu_bts");
const unsigned char module_checksum[] = { 0xf9, 0x0a, 0x1c, 0x61, 0x86, 0x3a, 0x3f, 0xbb, 0x97, 0xab, 0x5a, 0x95, 0x17, 0x2f, 0xfb, 0xe9 };

/* Global variable definitions */

const TTCN_RAWdescriptor_t PCUIF__Version_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Version_xer_ = { {"PCUIF_Version>\n", "PCUIF_Version>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t PCUIF__Version_descr_ = { "@PCUIF_Types.PCUIF_Version", &INTEGER_ber_, &PCUIF__Version_raw_, &INTEGER_text_, &PCUIF__Version_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Version_default_coding("RAW");
INTEGER modulepar_mp__pcuif__version;
const INTEGER& mp__pcuif__version = modulepar_mp__pcuif__version;
CHARSTRING const_PCU__SOCK__DEFAULT;
const CHARSTRING& PCU__SOCK__DEFAULT = const_PCU__SOCK__DEFAULT;
const TTCN_RAWdescriptor_t PCUIF__MsgType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgType
const TTCN_Typedescriptor_t PCUIF__MsgType_descr_ = { "@PCUIF_Types.PCUIF_MsgType", NULL, &PCUIF__MsgType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgType_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__Sapi
const TTCN_Typedescriptor_t PCUIF__Sapi_descr_ = { "@PCUIF_Types.PCUIF_Sapi", NULL, &PCUIF__Sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_bts__active_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_bts__active_xer_ = { {"bts_active>\n", "bts_active>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_bts__active_oer_ext_arr_[0] = {};
const int PCUIF__Flags_bts__active_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_bts__active_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_bts__active_oer_ext_arr_, 0, PCUIF__Flags_bts__active_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_bts__active_descr_ = { "@PCUIF_Types.PCUIF_Flags.bts_active", &BOOLEAN_ber_, &PCUIF__Flags_bts__active_raw_, &BOOLEAN_text_, &PCUIF__Flags_bts__active_xer_, &BOOLEAN_json_, &PCUIF__Flags_bts__active_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_bts__active_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_direct__phy_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_direct__phy_xer_ = { {"direct_phy>\n", "direct_phy>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_direct__phy_oer_ext_arr_[0] = {};
const int PCUIF__Flags_direct__phy_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_direct__phy_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_direct__phy_oer_ext_arr_, 0, PCUIF__Flags_direct__phy_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_direct__phy_descr_ = { "@PCUIF_Types.PCUIF_Flags.direct_phy", &BOOLEAN_ber_, &PCUIF__Flags_direct__phy_raw_, &BOOLEAN_text_, &PCUIF__Flags_direct__phy_xer_, &BOOLEAN_json_, &PCUIF__Flags_direct__phy_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_direct__phy_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_spare_raw_ = {14,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,14,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__Flags_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__Flags_spare_descr_ = { "@PCUIF_Types.PCUIF_Flags.spare", &BITSTRING_ber_, &PCUIF__Flags_spare_raw_, NULL, &PCUIF__Flags_spare_xer_, &BITSTRING_json_, &PCUIF__Flags_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_cs1_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_cs1_xer_ = { {"cs1>\n", "cs1>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_cs1_oer_ext_arr_[0] = {};
const int PCUIF__Flags_cs1_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_cs1_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_cs1_oer_ext_arr_, 0, PCUIF__Flags_cs1_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_cs1_descr_ = { "@PCUIF_Types.PCUIF_Flags.cs1", &BOOLEAN_ber_, &PCUIF__Flags_cs1_raw_, &BOOLEAN_text_, &PCUIF__Flags_cs1_xer_, &BOOLEAN_json_, &PCUIF__Flags_cs1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_cs1_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_cs2_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_cs2_xer_ = { {"cs2>\n", "cs2>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_cs2_oer_ext_arr_[0] = {};
const int PCUIF__Flags_cs2_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_cs2_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_cs2_oer_ext_arr_, 0, PCUIF__Flags_cs2_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_cs2_descr_ = { "@PCUIF_Types.PCUIF_Flags.cs2", &BOOLEAN_ber_, &PCUIF__Flags_cs2_raw_, &BOOLEAN_text_, &PCUIF__Flags_cs2_xer_, &BOOLEAN_json_, &PCUIF__Flags_cs2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_cs2_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_cs3_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_cs3_xer_ = { {"cs3>\n", "cs3>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_cs3_oer_ext_arr_[0] = {};
const int PCUIF__Flags_cs3_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_cs3_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_cs3_oer_ext_arr_, 0, PCUIF__Flags_cs3_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_cs3_descr_ = { "@PCUIF_Types.PCUIF_Flags.cs3", &BOOLEAN_ber_, &PCUIF__Flags_cs3_raw_, &BOOLEAN_text_, &PCUIF__Flags_cs3_xer_, &BOOLEAN_json_, &PCUIF__Flags_cs3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_cs3_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_cs4_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_cs4_xer_ = { {"cs4>\n", "cs4>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_cs4_oer_ext_arr_[0] = {};
const int PCUIF__Flags_cs4_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_cs4_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_cs4_oer_ext_arr_, 0, PCUIF__Flags_cs4_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_cs4_descr_ = { "@PCUIF_Types.PCUIF_Flags.cs4", &BOOLEAN_ber_, &PCUIF__Flags_cs4_raw_, &BOOLEAN_text_, &PCUIF__Flags_cs4_xer_, &BOOLEAN_json_, &PCUIF__Flags_cs4_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_cs4_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs1_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs1_xer_ = { {"mcs1>\n", "mcs1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs1_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs1_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs1_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs1_oer_ext_arr_, 0, PCUIF__Flags_mcs1_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs1_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs1", &BOOLEAN_ber_, &PCUIF__Flags_mcs1_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs1_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs1_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs2_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs2_xer_ = { {"mcs2>\n", "mcs2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs2_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs2_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs2_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs2_oer_ext_arr_, 0, PCUIF__Flags_mcs2_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs2_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs2", &BOOLEAN_ber_, &PCUIF__Flags_mcs2_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs2_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs2_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs3_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs3_xer_ = { {"mcs3>\n", "mcs3>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs3_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs3_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs3_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs3_oer_ext_arr_, 0, PCUIF__Flags_mcs3_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs3_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs3", &BOOLEAN_ber_, &PCUIF__Flags_mcs3_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs3_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs3_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs4_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs4_xer_ = { {"mcs4>\n", "mcs4>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs4_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs4_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs4_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs4_oer_ext_arr_, 0, PCUIF__Flags_mcs4_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs4_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs4", &BOOLEAN_ber_, &PCUIF__Flags_mcs4_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs4_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs4_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs4_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs5_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs5_xer_ = { {"mcs5>\n", "mcs5>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs5_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs5_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs5_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs5_oer_ext_arr_, 0, PCUIF__Flags_mcs5_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs5_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs5", &BOOLEAN_ber_, &PCUIF__Flags_mcs5_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs5_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs5_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs5_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs6_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs6_xer_ = { {"mcs6>\n", "mcs6>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs6_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs6_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs6_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs6_oer_ext_arr_, 0, PCUIF__Flags_mcs6_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs6_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs6", &BOOLEAN_ber_, &PCUIF__Flags_mcs6_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs6_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs6_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs6_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs7_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs7_xer_ = { {"mcs7>\n", "mcs7>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs7_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs7_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs7_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs7_oer_ext_arr_, 0, PCUIF__Flags_mcs7_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs7_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs7", &BOOLEAN_ber_, &PCUIF__Flags_mcs7_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs7_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs7_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs7_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs8_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs8_xer_ = { {"mcs8>\n", "mcs8>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs8_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs8_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs8_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs8_oer_ext_arr_, 0, PCUIF__Flags_mcs8_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs8_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs8", &BOOLEAN_ber_, &PCUIF__Flags_mcs8_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs8_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs8_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs8_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_mcs9_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_mcs9_xer_ = { {"mcs9>\n", "mcs9>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Flags_mcs9_oer_ext_arr_[0] = {};
const int PCUIF__Flags_mcs9_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Flags_mcs9_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__Flags_mcs9_oer_ext_arr_, 0, PCUIF__Flags_mcs9_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Flags_mcs9_descr_ = { "@PCUIF_Types.PCUIF_Flags.mcs9", &BOOLEAN_ber_, &PCUIF__Flags_mcs9_raw_, &BOOLEAN_text_, &PCUIF__Flags_mcs9_xer_, &BOOLEAN_json_, &PCUIF__Flags_mcs9_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_mcs9_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_spare2_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Flags_spare2_xer_ = { {"spare2>\n", "spare2>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__Flags_spare2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__Flags_spare2_descr_ = { "@PCUIF_Types.PCUIF_Flags.spare2", &BITSTRING_ber_, &PCUIF__Flags_spare2_raw_, NULL, &PCUIF__Flags_spare2_xer_, &BITSTRING_json_, &PCUIF__Flags_spare2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_spare2_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Flags_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__Flags
const TTCN_Typedescriptor_t PCUIF__Flags_descr_ = { "@PCUIF_Types.PCUIF_Flags", NULL, &PCUIF__Flags_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Flags_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__bts__model_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__bts__model
const TTCN_Typedescriptor_t PCUIF__bts__model_descr_ = { "@PCUIF_Types.PCUIF_bts_model", NULL, &PCUIF__bts__model_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__bts__model_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__TextType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__TextType
const TTCN_Typedescriptor_t PCUIF__TextType_descr_ = { "@PCUIF_Types.PCUIF_TextType", NULL, &PCUIF__TextType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__TextType_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Text_raw_ = {-8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,128,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Text_xer_ = { {"PCUIF_Text>\n", "PCUIF_Text>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t PCUIF__Text_descr_ = { "@PCUIF_Types.PCUIF_Text", NULL, &PCUIF__Text_raw_, &CHARSTRING_text_, &PCUIF__Text_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Text_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__txt__ind_txt__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__txt__ind_txt__type
const TTCN_Typedescriptor_t PCUIF__txt__ind_txt__type_descr_ = { "@PCUIF_Types.PCUIF_txt_ind.txt_type", NULL, &PCUIF__txt__ind_txt__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__txt__ind_txt__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__txt__ind_text_raw_ = {-8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,128,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__txt__ind_text_xer_ = { {"text>\n", "text>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t PCUIF__txt__ind_text_descr_ = { "@PCUIF_Types.PCUIF_txt_ind.text", NULL, &PCUIF__txt__ind_text_raw_, &CHARSTRING_text_, &PCUIF__txt__ind_text_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__txt__ind_text_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__txt__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__txt__ind
const TTCN_Typedescriptor_t PCUIF__txt__ind_descr_ = { "@PCUIF_Types.PCUIF_txt_ind", NULL, &PCUIF__txt__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__txt__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__data_sapi
const TTCN_Typedescriptor_t PCUIF__data_sapi_descr_ = { "@PCUIF_Types.PCUIF_data.sapi", NULL, &PCUIF__data_sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_len_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_len_descr_ = { "@PCUIF_Types.PCUIF_data.len", &INTEGER_ber_, &PCUIF__data_len_raw_, &INTEGER_text_, &PCUIF__data_len_xer_, &INTEGER_json_, &PCUIF__data_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_len_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_data_raw_ = {1296,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,162,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__data_data_oer_ext_arr_[0] = {};
const int PCUIF__data_data_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__data_data_oer_ = { -1, TRUE, 162, FALSE, 0, 0, PCUIF__data_data_oer_ext_arr_, 0, PCUIF__data_data_oer_p_};
const TTCN_Typedescriptor_t PCUIF__data_data_descr_ = { "@PCUIF_Types.PCUIF_data.data", &OCTETSTRING_ber_, &PCUIF__data_data_raw_, &OCTETSTRING_text_, &PCUIF__data_data_xer_, &OCTETSTRING_json_, &PCUIF__data_data_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_data_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_fn_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_fn_xer_ = { {"fn>\n", "fn>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_fn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_fn_descr_ = { "@PCUIF_Types.PCUIF_data.fn", &INTEGER_ber_, &PCUIF__data_fn_raw_, &INTEGER_text_, &PCUIF__data_fn_xer_, &INTEGER_json_, &PCUIF__data_fn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_fn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_arfcn_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_arfcn_xer_ = { {"arfcn>\n", "arfcn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_arfcn_descr_ = { "@PCUIF_Types.PCUIF_data.arfcn", &INTEGER_ber_, &PCUIF__data_arfcn_raw_, &INTEGER_text_, &PCUIF__data_arfcn_xer_, &INTEGER_json_, &PCUIF__data_arfcn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_data.trx_nr", &INTEGER_ber_, &PCUIF__data_trx__nr_raw_, &INTEGER_text_, &PCUIF__data_trx__nr_xer_, &INTEGER_json_, &PCUIF__data_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_ts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_ts__nr_descr_ = { "@PCUIF_Types.PCUIF_data.ts_nr", &INTEGER_ber_, &PCUIF__data_ts__nr_raw_, &INTEGER_text_, &PCUIF__data_ts__nr_xer_, &INTEGER_json_, &PCUIF__data_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_block__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_block__nr_xer_ = { {"block_nr>\n", "block_nr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_block__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_block__nr_descr_ = { "@PCUIF_Types.PCUIF_data.block_nr", &INTEGER_ber_, &PCUIF__data_block__nr_raw_, &INTEGER_text_, &PCUIF__data_block__nr_xer_, &INTEGER_json_, &PCUIF__data_block__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_block__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_rssi_raw_ = {8,SG_SG_BIT,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_rssi_xer_ = { {"rssi>\n", "rssi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_rssi_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_rssi_descr_ = { "@PCUIF_Types.PCUIF_data.rssi", &INTEGER_ber_, &PCUIF__data_rssi_raw_, &INTEGER_text_, &PCUIF__data_rssi_xer_, &INTEGER_json_, &PCUIF__data_rssi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_rssi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_ber10k_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_ber10k_xer_ = { {"ber10k>\n", "ber10k>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_ber10k_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_ber10k_descr_ = { "@PCUIF_Types.PCUIF_data.ber10k", &INTEGER_ber_, &PCUIF__data_ber10k_raw_, &INTEGER_text_, &PCUIF__data_ber10k_xer_, &INTEGER_json_, &PCUIF__data_ber10k_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_ber10k_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_ta__offs__qbits_raw_ = {16,SG_SG_BIT,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_ta__offs__qbits_xer_ = { {"ta_offs_qbits>\n", "ta_offs_qbits>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_ta__offs__qbits_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_ta__offs__qbits_descr_ = { "@PCUIF_Types.PCUIF_data.ta_offs_qbits", &INTEGER_ber_, &PCUIF__data_ta__offs__qbits_raw_, &INTEGER_text_, &PCUIF__data_ta__offs__qbits_xer_, &INTEGER_json_, &PCUIF__data_ta__offs__qbits_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_ta__offs__qbits_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_lqual__cb_raw_ = {16,SG_2COMPL,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data_lqual__cb_xer_ = { {"lqual_cb>\n", "lqual_cb>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__data_lqual__cb_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__data_lqual__cb_descr_ = { "@PCUIF_Types.PCUIF_data.lqual_cb", &INTEGER_ber_, &PCUIF__data_lqual__cb_raw_, &INTEGER_text_, &PCUIF__data_lqual__cb_xer_, &INTEGER_json_, &PCUIF__data_lqual__cb_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_lqual__cb_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__data
const TTCN_Typedescriptor_t PCUIF__data_descr_ = { "@PCUIF_Types.PCUIF_data", NULL, &PCUIF__data_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data__cnf_sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__data__cnf_sapi
const TTCN_Typedescriptor_t PCUIF__data__cnf_sapi_descr_ = { "@PCUIF_Types.PCUIF_data_cnf.sapi", NULL, &PCUIF__data__cnf_sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data__cnf_sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data__cnf_msg__id_raw_ = {32,SG_NO,ORDER_MSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__data__cnf_msg__id_xer_ = { {"msg_id>\n", "msg_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__data__cnf_msg__id_oer_ext_arr_[0] = {};
const int PCUIF__data__cnf_msg__id_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__data__cnf_msg__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PCUIF__data__cnf_msg__id_oer_ext_arr_, 0, PCUIF__data__cnf_msg__id_oer_p_};
const TTCN_Typedescriptor_t PCUIF__data__cnf_msg__id_descr_ = { "@PCUIF_Types.PCUIF_data_cnf.msg_id", &OCTETSTRING_ber_, &PCUIF__data__cnf_msg__id_raw_, &OCTETSTRING_text_, &PCUIF__data__cnf_msg__id_xer_, &OCTETSTRING_json_, &PCUIF__data__cnf_msg__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data__cnf_msg__id_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__data__cnf_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__data__cnf
const TTCN_Typedescriptor_t PCUIF__data__cnf_descr_ = { "@PCUIF_Types.PCUIF_data_cnf", NULL, &PCUIF__data__cnf_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__data__cnf_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__rts__req_sapi
const TTCN_Typedescriptor_t PCUIF__rts__req_sapi_descr_ = { "@PCUIF_Types.PCUIF_rts_req.sapi", NULL, &PCUIF__rts__req_sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_spare_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__rts__req_spare_oer_ext_arr_[0] = {};
const int PCUIF__rts__req_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__rts__req_spare_oer_ = { -1, TRUE, 3, FALSE, 0, 0, PCUIF__rts__req_spare_oer_ext_arr_, 0, PCUIF__rts__req_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__rts__req_spare_descr_ = { "@PCUIF_Types.PCUIF_rts_req.spare", &OCTETSTRING_ber_, &PCUIF__rts__req_spare_raw_, &OCTETSTRING_text_, &PCUIF__rts__req_spare_xer_, &OCTETSTRING_json_, &PCUIF__rts__req_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_fn_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_fn_xer_ = { {"fn>\n", "fn>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rts__req_fn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rts__req_fn_descr_ = { "@PCUIF_Types.PCUIF_rts_req.fn", &INTEGER_ber_, &PCUIF__rts__req_fn_raw_, &INTEGER_text_, &PCUIF__rts__req_fn_xer_, &INTEGER_json_, &PCUIF__rts__req_fn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_fn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_arfcn_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_arfcn_xer_ = { {"arfcn>\n", "arfcn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rts__req_arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rts__req_arfcn_descr_ = { "@PCUIF_Types.PCUIF_rts_req.arfcn", &INTEGER_ber_, &PCUIF__rts__req_arfcn_raw_, &INTEGER_text_, &PCUIF__rts__req_arfcn_xer_, &INTEGER_json_, &PCUIF__rts__req_arfcn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rts__req_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rts__req_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_rts_req.trx_nr", &INTEGER_ber_, &PCUIF__rts__req_trx__nr_raw_, &INTEGER_text_, &PCUIF__rts__req_trx__nr_xer_, &INTEGER_json_, &PCUIF__rts__req_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_ts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rts__req_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rts__req_ts__nr_descr_ = { "@PCUIF_Types.PCUIF_rts_req.ts_nr", &INTEGER_ber_, &PCUIF__rts__req_ts__nr_raw_, &INTEGER_text_, &PCUIF__rts__req_ts__nr_xer_, &INTEGER_json_, &PCUIF__rts__req_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_block__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rts__req_block__nr_xer_ = { {"block_nr>\n", "block_nr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rts__req_block__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rts__req_block__nr_descr_ = { "@PCUIF_Types.PCUIF_rts_req.block_nr", &INTEGER_ber_, &PCUIF__rts__req_block__nr_raw_, &INTEGER_text_, &PCUIF__rts__req_block__nr_xer_, &INTEGER_json_, &PCUIF__rts__req_block__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_block__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rts__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__rts__req
const TTCN_Typedescriptor_t PCUIF__rts__req_descr_ = { "@PCUIF_Types.PCUIF_rts_req", NULL, &PCUIF__rts__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rts__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__BurstType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__BurstType
const TTCN_Typedescriptor_t PCUIF__BurstType_descr_ = { "@PCUIF_Types.PCUIF_BurstType", NULL, &PCUIF__BurstType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__BurstType_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__rach__ind_sapi
const TTCN_Typedescriptor_t PCUIF__rach__ind_sapi_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.sapi", NULL, &PCUIF__rach__ind_sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_ra_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_ra_xer_ = { {"ra>\n", "ra>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_ra_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_ra_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.ra", &INTEGER_ber_, &PCUIF__rach__ind_ra_raw_, &INTEGER_text_, &PCUIF__rach__ind_ra_xer_, &INTEGER_json_, &PCUIF__rach__ind_ra_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_ra_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_qta_raw_ = {16,SG_SG_BIT,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_qta_xer_ = { {"qta>\n", "qta>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_qta_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_qta_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.qta", &INTEGER_ber_, &PCUIF__rach__ind_qta_raw_, &INTEGER_text_, &PCUIF__rach__ind_qta_xer_, &INTEGER_json_, &PCUIF__rach__ind_qta_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_qta_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_fn_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_fn_xer_ = { {"fn>\n", "fn>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_fn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_fn_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.fn", &INTEGER_ber_, &PCUIF__rach__ind_fn_raw_, &INTEGER_text_, &PCUIF__rach__ind_fn_xer_, &INTEGER_json_, &PCUIF__rach__ind_fn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_fn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_arfcn_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_arfcn_xer_ = { {"arfcn>\n", "arfcn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_arfcn_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.arfcn", &INTEGER_ber_, &PCUIF__rach__ind_arfcn_raw_, &INTEGER_text_, &PCUIF__rach__ind_arfcn_xer_, &INTEGER_json_, &PCUIF__rach__ind_arfcn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_is__11bit_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_is__11bit_xer_ = { {"is_11bit>\n", "is_11bit>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_is__11bit_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_is__11bit_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.is_11bit", &INTEGER_ber_, &PCUIF__rach__ind_is__11bit_raw_, &INTEGER_text_, &PCUIF__rach__ind_is__11bit_xer_, &INTEGER_json_, &PCUIF__rach__ind_is__11bit_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_is__11bit_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_burst__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__rach__ind_burst__type
const TTCN_Typedescriptor_t PCUIF__rach__ind_burst__type_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.burst_type", NULL, &PCUIF__rach__ind_burst__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_burst__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.trx_nr", &INTEGER_ber_, &PCUIF__rach__ind_trx__nr_raw_, &INTEGER_text_, &PCUIF__rach__ind_trx__nr_xer_, &INTEGER_json_, &PCUIF__rach__ind_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_ts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__rach__ind_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__rach__ind_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__rach__ind_ts__nr_descr_ = { "@PCUIF_Types.PCUIF_rach_ind.ts_nr", &INTEGER_ber_, &PCUIF__rach__ind_ts__nr_raw_, &INTEGER_text_, &PCUIF__rach__ind_ts__nr_xer_, &INTEGER_json_, &PCUIF__rach__ind_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__rach__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__rach__ind
const TTCN_Typedescriptor_t PCUIF__rach__ind_descr_ = { "@PCUIF_Types.PCUIF_rach_ind", NULL, &PCUIF__rach__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__rach__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_tsc_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_tsc_xer_ = { {"tsc>\n", "tsc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrxTs_tsc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_tsc_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.tsc", &INTEGER_ber_, &PCUIF__InfoTrxTs_tsc_raw_, &INTEGER_text_, &PCUIF__InfoTrxTs_tsc_xer_, &INTEGER_json_, &PCUIF__InfoTrxTs_tsc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_tsc_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_hopping_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_hopping_xer_ = { {"hopping>\n", "hopping>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrxTs_hopping_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_hopping_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.hopping", &INTEGER_ber_, &PCUIF__InfoTrxTs_hopping_raw_, &INTEGER_text_, &PCUIF__InfoTrxTs_hopping_xer_, &INTEGER_json_, &PCUIF__InfoTrxTs_hopping_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_hopping_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_hsn_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_hsn_xer_ = { {"hsn>\n", "hsn>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrxTs_hsn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_hsn_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.hsn", &INTEGER_ber_, &PCUIF__InfoTrxTs_hsn_raw_, &INTEGER_text_, &PCUIF__InfoTrxTs_hsn_xer_, &INTEGER_json_, &PCUIF__InfoTrxTs_hsn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_hsn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_maio_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_maio_xer_ = { {"maio>\n", "maio>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrxTs_maio_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_maio_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.maio", &INTEGER_ber_, &PCUIF__InfoTrxTs_maio_raw_, &INTEGER_text_, &PCUIF__InfoTrxTs_maio_xer_, &INTEGER_json_, &PCUIF__InfoTrxTs_maio_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_maio_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_ma__bit__len_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_ma__bit__len_xer_ = { {"ma_bit_len>\n", "ma_bit_len>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrxTs_ma__bit__len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_ma__bit__len_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.ma_bit_len", &INTEGER_ber_, &PCUIF__InfoTrxTs_ma__bit__len_raw_, &INTEGER_text_, &PCUIF__InfoTrxTs_ma__bit__len_xer_, &INTEGER_json_, &PCUIF__InfoTrxTs_ma__bit__len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_ma__bit__len_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_ma_raw_ = {64,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrxTs_ma_xer_ = { {"ma>\n", "ma>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_ma_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs.ma", &BITSTRING_ber_, &PCUIF__InfoTrxTs_ma_raw_, NULL, &PCUIF__InfoTrxTs_ma_xer_, &BITSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_ma_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTs_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrxTs
const TTCN_Typedescriptor_t PCUIF__InfoTrxTs_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTs", NULL, &PCUIF__InfoTrxTs_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTs_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTsList_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrxTsList
const TTCN_Typedescriptor_t PCUIF__InfoTrxTsList_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTsList", NULL, &PCUIF__InfoTrxTsList_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__InfoTrxTsList_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__InfoTrxTsList_0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrxTsList_0
const TTCN_Typedescriptor_t PCUIF__InfoTrxTsList_0_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxTsList.<oftype>", NULL, &PCUIF__InfoTrxTsList_0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTsList_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__InfoTrxTsList_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_arfcn_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrx_arfcn_xer_ = { {"arfcn>\n", "arfcn>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrx_arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrx_arfcn_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx.arfcn", &INTEGER_ber_, &PCUIF__InfoTrx_arfcn_raw_, &INTEGER_text_, &PCUIF__InfoTrx_arfcn_xer_, &INTEGER_json_, &PCUIF__InfoTrx_arfcn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_pdch__mask_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_MSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrx_pdch__mask_xer_ = { {"pdch_mask>\n", "pdch_mask>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrx_pdch__mask_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrx_pdch__mask_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx.pdch_mask", &BITSTRING_ber_, &PCUIF__InfoTrx_pdch__mask_raw_, NULL, &PCUIF__InfoTrx_pdch__mask_xer_, &BITSTRING_json_, &PCUIF__InfoTrx_pdch__mask_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_pdch__mask_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_spare_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrx_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__InfoTrx_spare_oer_ext_arr_[0] = {};
const int PCUIF__InfoTrx_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__InfoTrx_spare_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PCUIF__InfoTrx_spare_oer_ext_arr_, 0, PCUIF__InfoTrx_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__InfoTrx_spare_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx.spare", &OCTETSTRING_ber_, &PCUIF__InfoTrx_spare_raw_, &OCTETSTRING_text_, &PCUIF__InfoTrx_spare_xer_, &OCTETSTRING_json_, &PCUIF__InfoTrx_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_hLayer1_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__InfoTrx_hLayer1_xer_ = { {"hLayer1>\n", "hLayer1>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__InfoTrx_hLayer1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__InfoTrx_hLayer1_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx.hLayer1", &INTEGER_ber_, &PCUIF__InfoTrx_hLayer1_raw_, &INTEGER_text_, &PCUIF__InfoTrx_hLayer1_xer_, &INTEGER_json_, &PCUIF__InfoTrx_hLayer1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_hLayer1_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_ts_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrx_ts
const TTCN_Typedescriptor_t PCUIF__InfoTrx_ts_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx.ts", NULL, &PCUIF__InfoTrx_ts_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__InfoTrxTsList_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_ts_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrx_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrx
const TTCN_Typedescriptor_t PCUIF__InfoTrx_descr_ = { "@PCUIF_Types.PCUIF_InfoTrx", NULL, &PCUIF__InfoTrx_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrx_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__InfoTrxs_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrxs
const TTCN_Typedescriptor_t PCUIF__InfoTrxs_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxs", NULL, &PCUIF__InfoTrxs_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__InfoTrxs_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__InfoTrxs_0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__InfoTrxs_0
const TTCN_Typedescriptor_t PCUIF__InfoTrxs_0_descr_ = { "@PCUIF_Types.PCUIF_InfoTrxs.<oftype>", NULL, &PCUIF__InfoTrxs_0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__InfoTrxs_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__InfoTrxs_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_version_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_version_xer_ = { {"version>\n", "version>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_version_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_version_descr_ = { "@PCUIF_Types.PCUIF_info_ind.version", &INTEGER_ber_, &PCUIF__info__ind_version_raw_, &INTEGER_text_, &PCUIF__info__ind_version_xer_, &INTEGER_json_, &PCUIF__info__ind_version_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_version_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_flags_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_flags
const TTCN_Typedescriptor_t PCUIF__info__ind_flags_descr_ = { "@PCUIF_Types.PCUIF_info_ind.flags", NULL, &PCUIF__info__ind_flags_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_flags_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_trx_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_trx
const TTCN_Typedescriptor_t PCUIF__info__ind_trx_descr_ = { "@PCUIF_Types.PCUIF_info_ind.trx", NULL, &PCUIF__info__ind_trx_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__InfoTrxs_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_trx_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_bsic_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_bsic_xer_ = { {"bsic>\n", "bsic>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_bsic_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_bsic_descr_ = { "@PCUIF_Types.PCUIF_info_ind.bsic", &INTEGER_ber_, &PCUIF__info__ind_bsic_raw_, &INTEGER_text_, &PCUIF__info__ind_bsic_xer_, &INTEGER_json_, &PCUIF__info__ind_bsic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_bsic_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_mcc_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_mcc_xer_ = { {"mcc>\n", "mcc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_mcc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_mcc_descr_ = { "@PCUIF_Types.PCUIF_info_ind.mcc", &INTEGER_ber_, &PCUIF__info__ind_mcc_raw_, &INTEGER_text_, &PCUIF__info__ind_mcc_xer_, &INTEGER_json_, &PCUIF__info__ind_mcc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_mcc_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_mnc_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_mnc_xer_ = { {"mnc>\n", "mnc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_mnc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_mnc_descr_ = { "@PCUIF_Types.PCUIF_info_ind.mnc", &INTEGER_ber_, &PCUIF__info__ind_mnc_raw_, &INTEGER_text_, &PCUIF__info__ind_mnc_xer_, &INTEGER_json_, &PCUIF__info__ind_mnc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_mnc_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_mnc__3__digits_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_mnc__3__digits_xer_ = { {"mnc_3_digits>\n", "mnc_3_digits>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_mnc__3__digits_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_mnc__3__digits_descr_ = { "@PCUIF_Types.PCUIF_info_ind.mnc_3_digits", &INTEGER_ber_, &PCUIF__info__ind_mnc__3__digits_raw_, &INTEGER_text_, &PCUIF__info__ind_mnc__3__digits_xer_, &INTEGER_json_, &PCUIF__info__ind_mnc__3__digits_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_mnc__3__digits_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_lac_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_lac_xer_ = { {"lac>\n", "lac>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_lac_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_lac_descr_ = { "@PCUIF_Types.PCUIF_info_ind.lac", &INTEGER_ber_, &PCUIF__info__ind_lac_raw_, &INTEGER_text_, &PCUIF__info__ind_lac_xer_, &INTEGER_json_, &PCUIF__info__ind_lac_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_lac_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_rac_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_rac_xer_ = { {"rac>\n", "rac>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_rac_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_rac_descr_ = { "@PCUIF_Types.PCUIF_info_ind.rac", &INTEGER_ber_, &PCUIF__info__ind_rac_raw_, &INTEGER_text_, &PCUIF__info__ind_rac_xer_, &INTEGER_json_, &PCUIF__info__ind_rac_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_rac_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_nsei_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_nsei_xer_ = { {"nsei>\n", "nsei>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_nsei_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_nsei_descr_ = { "@PCUIF_Types.PCUIF_info_ind.nsei", &INTEGER_ber_, &PCUIF__info__ind_nsei_raw_, &INTEGER_text_, &PCUIF__info__ind_nsei_xer_, &INTEGER_json_, &PCUIF__info__ind_nsei_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_nsei_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_nse__timer_raw_ = {7,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_nse__timer
const TTCN_Typedescriptor_t PCUIF__info__ind_nse__timer_descr_ = { "@PCUIF_Types.PCUIF_info_ind.nse_timer", NULL, &PCUIF__info__ind_nse__timer_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__info__ind_nse__timer_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_nse__timer_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_nse__timer_0_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 PCUIF__info__ind_nse__timer_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_nse__timer_0_descr_ = { "@PCUIF_Types.PCUIF_info_ind.nse_timer.<oftype>", &INTEGER_ber_, &PCUIF__info__ind_nse__timer_0_raw_, &INTEGER_text_, &PCUIF__info__ind_nse__timer_0_xer_, &INTEGER_json_, &PCUIF__info__ind_nse__timer_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_nse__timer_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_nse__timer_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_cell__timer_raw_ = {11,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_cell__timer
const TTCN_Typedescriptor_t PCUIF__info__ind_cell__timer_descr_ = { "@PCUIF_Types.PCUIF_info_ind.cell_timer", NULL, &PCUIF__info__ind_cell__timer_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__info__ind_cell__timer_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_cell__timer_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_cell__timer_0_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 PCUIF__info__ind_cell__timer_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_cell__timer_0_descr_ = { "@PCUIF_Types.PCUIF_info_ind.cell_timer.<oftype>", &INTEGER_ber_, &PCUIF__info__ind_cell__timer_0_raw_, &INTEGER_text_, &PCUIF__info__ind_cell__timer_0_xer_, &INTEGER_json_, &PCUIF__info__ind_cell__timer_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_cell__timer_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_cell__timer_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_cell__id_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_cell__id_xer_ = { {"cell_id>\n", "cell_id>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_cell__id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_cell__id_descr_ = { "@PCUIF_Types.PCUIF_info_ind.cell_id", &INTEGER_ber_, &PCUIF__info__ind_cell__id_raw_, &INTEGER_text_, &PCUIF__info__ind_cell__id_xer_, &INTEGER_json_, &PCUIF__info__ind_cell__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_cell__id_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_repeat__time_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_repeat__time_xer_ = { {"repeat_time>\n", "repeat_time>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_repeat__time_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_repeat__time_descr_ = { "@PCUIF_Types.PCUIF_info_ind.repeat_time", &INTEGER_ber_, &PCUIF__info__ind_repeat__time_raw_, &INTEGER_text_, &PCUIF__info__ind_repeat__time_xer_, &INTEGER_json_, &PCUIF__info__ind_repeat__time_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_repeat__time_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_repeat__count_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_repeat__count_xer_ = { {"repeat_count>\n", "repeat_count>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_repeat__count_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_repeat__count_descr_ = { "@PCUIF_Types.PCUIF_info_ind.repeat_count", &INTEGER_ber_, &PCUIF__info__ind_repeat__count_raw_, &INTEGER_text_, &PCUIF__info__ind_repeat__count_xer_, &INTEGER_json_, &PCUIF__info__ind_repeat__count_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_repeat__count_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_bvci_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_bvci_xer_ = { {"bvci>\n", "bvci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_bvci_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_bvci_descr_ = { "@PCUIF_Types.PCUIF_info_ind.bvci", &INTEGER_ber_, &PCUIF__info__ind_bvci_raw_, &INTEGER_text_, &PCUIF__info__ind_bvci_xer_, &INTEGER_json_, &PCUIF__info__ind_bvci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_bvci_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_t3142_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_t3142_xer_ = { {"t3142>\n", "t3142>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_t3142_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_t3142_descr_ = { "@PCUIF_Types.PCUIF_info_ind.t3142", &INTEGER_ber_, &PCUIF__info__ind_t3142_raw_, &INTEGER_text_, &PCUIF__info__ind_t3142_xer_, &INTEGER_json_, &PCUIF__info__ind_t3142_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_t3142_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_t3169_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_t3169_xer_ = { {"t3169>\n", "t3169>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_t3169_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_t3169_descr_ = { "@PCUIF_Types.PCUIF_info_ind.t3169", &INTEGER_ber_, &PCUIF__info__ind_t3169_raw_, &INTEGER_text_, &PCUIF__info__ind_t3169_xer_, &INTEGER_json_, &PCUIF__info__ind_t3169_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_t3169_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_t3191_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_t3191_xer_ = { {"t3191>\n", "t3191>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_t3191_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_t3191_descr_ = { "@PCUIF_Types.PCUIF_info_ind.t3191", &INTEGER_ber_, &PCUIF__info__ind_t3191_raw_, &INTEGER_text_, &PCUIF__info__ind_t3191_xer_, &INTEGER_json_, &PCUIF__info__ind_t3191_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_t3191_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_t3193__10ms_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_t3193__10ms_xer_ = { {"t3193_10ms>\n", "t3193_10ms>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_t3193__10ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_t3193__10ms_descr_ = { "@PCUIF_Types.PCUIF_info_ind.t3193_10ms", &INTEGER_ber_, &PCUIF__info__ind_t3193__10ms_raw_, &INTEGER_text_, &PCUIF__info__ind_t3193__10ms_xer_, &INTEGER_json_, &PCUIF__info__ind_t3193__10ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_t3193__10ms_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_t3195_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_t3195_xer_ = { {"t3195>\n", "t3195>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_t3195_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_t3195_descr_ = { "@PCUIF_Types.PCUIF_info_ind.t3195", &INTEGER_ber_, &PCUIF__info__ind_t3195_raw_, &INTEGER_text_, &PCUIF__info__ind_t3195_xer_, &INTEGER_json_, &PCUIF__info__ind_t3195_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_t3195_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_n3101_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_n3101_xer_ = { {"n3101>\n", "n3101>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_n3101_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_n3101_descr_ = { "@PCUIF_Types.PCUIF_info_ind.n3101", &INTEGER_ber_, &PCUIF__info__ind_n3101_raw_, &INTEGER_text_, &PCUIF__info__ind_n3101_xer_, &INTEGER_json_, &PCUIF__info__ind_n3101_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_n3101_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_n3103_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_n3103_xer_ = { {"n3103>\n", "n3103>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_n3103_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_n3103_descr_ = { "@PCUIF_Types.PCUIF_info_ind.n3103", &INTEGER_ber_, &PCUIF__info__ind_n3103_raw_, &INTEGER_text_, &PCUIF__info__ind_n3103_xer_, &INTEGER_json_, &PCUIF__info__ind_n3103_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_n3103_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_n3105_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_n3105_xer_ = { {"n3105>\n", "n3105>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_n3105_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_n3105_descr_ = { "@PCUIF_Types.PCUIF_info_ind.n3105", &INTEGER_ber_, &PCUIF__info__ind_n3105_raw_, &INTEGER_text_, &PCUIF__info__ind_n3105_xer_, &INTEGER_json_, &PCUIF__info__ind_n3105_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_n3105_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_cv__countdown_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_cv__countdown_xer_ = { {"cv_countdown>\n", "cv_countdown>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_cv__countdown_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_cv__countdown_descr_ = { "@PCUIF_Types.PCUIF_info_ind.cv_countdown", &INTEGER_ber_, &PCUIF__info__ind_cv__countdown_raw_, &INTEGER_text_, &PCUIF__info__ind_cv__countdown_xer_, &INTEGER_json_, &PCUIF__info__ind_cv__countdown_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_cv__countdown_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_dl__tbf__ext_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_dl__tbf__ext_xer_ = { {"dl_tbf_ext>\n", "dl_tbf_ext>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_dl__tbf__ext_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_dl__tbf__ext_descr_ = { "@PCUIF_Types.PCUIF_info_ind.dl_tbf_ext", &INTEGER_ber_, &PCUIF__info__ind_dl__tbf__ext_raw_, &INTEGER_text_, &PCUIF__info__ind_dl__tbf__ext_xer_, &INTEGER_json_, &PCUIF__info__ind_dl__tbf__ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_dl__tbf__ext_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_ul__tbf__ext_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_ul__tbf__ext_xer_ = { {"ul_tbf_ext>\n", "ul_tbf_ext>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_ul__tbf__ext_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_ul__tbf__ext_descr_ = { "@PCUIF_Types.PCUIF_info_ind.ul_tbf_ext", &INTEGER_ber_, &PCUIF__info__ind_ul__tbf__ext_raw_, &INTEGER_text_, &PCUIF__info__ind_ul__tbf__ext_xer_, &INTEGER_json_, &PCUIF__info__ind_ul__tbf__ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_ul__tbf__ext_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_initial__cs_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_initial__cs_xer_ = { {"initial_cs>\n", "initial_cs>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_initial__cs_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_initial__cs_descr_ = { "@PCUIF_Types.PCUIF_info_ind.initial_cs", &INTEGER_ber_, &PCUIF__info__ind_initial__cs_raw_, &INTEGER_text_, &PCUIF__info__ind_initial__cs_xer_, &INTEGER_json_, &PCUIF__info__ind_initial__cs_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_initial__cs_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_initial__mcs_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_initial__mcs_xer_ = { {"initial_mcs>\n", "initial_mcs>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__info__ind_initial__mcs_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_initial__mcs_descr_ = { "@PCUIF_Types.PCUIF_info_ind.initial_mcs", &INTEGER_ber_, &PCUIF__info__ind_initial__mcs_raw_, &INTEGER_text_, &PCUIF__info__ind_initial__mcs_xer_, &INTEGER_json_, &PCUIF__info__ind_initial__mcs_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_initial__mcs_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_nsvci_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_nsvci
const TTCN_Typedescriptor_t PCUIF__info__ind_nsvci_descr_ = { "@PCUIF_Types.PCUIF_info_ind.nsvci", NULL, &PCUIF__info__ind_nsvci_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__info__ind_nsvci_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_nsvci_0_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_nsvci_0_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 PCUIF__info__ind_nsvci_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_nsvci_0_descr_ = { "@PCUIF_Types.PCUIF_info_ind.nsvci.<oftype>", &INTEGER_ber_, &PCUIF__info__ind_nsvci_0_raw_, &INTEGER_text_, &PCUIF__info__ind_nsvci_0_xer_, &INTEGER_json_, &PCUIF__info__ind_nsvci_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_nsvci_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_nsvci_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_local__port_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_local__port
const TTCN_Typedescriptor_t PCUIF__info__ind_local__port_descr_ = { "@PCUIF_Types.PCUIF_info_ind.local_port", NULL, &PCUIF__info__ind_local__port_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__info__ind_local__port_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_local__port_0_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_local__port_0_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 PCUIF__info__ind_local__port_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_local__port_0_descr_ = { "@PCUIF_Types.PCUIF_info_ind.local_port.<oftype>", &INTEGER_ber_, &PCUIF__info__ind_local__port_0_raw_, &INTEGER_text_, &PCUIF__info__ind_local__port_0_xer_, &INTEGER_json_, &PCUIF__info__ind_local__port_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_local__port_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_local__port_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_remote__port_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_remote__port
const TTCN_Typedescriptor_t PCUIF__info__ind_remote__port_descr_ = { "@PCUIF_Types.PCUIF_info_ind.remote_port", NULL, &PCUIF__info__ind_remote__port_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__info__ind_remote__port_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_remote__port_0_raw_ = {16,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__info__ind_remote__port_0_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 PCUIF__info__ind_remote__port_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__info__ind_remote__port_0_descr_ = { "@PCUIF_Types.PCUIF_info_ind.remote_port.<oftype>", &INTEGER_ber_, &PCUIF__info__ind_remote__port_0_raw_, &INTEGER_text_, &PCUIF__info__ind_remote__port_0_xer_, &INTEGER_json_, &PCUIF__info__ind_remote__port_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_remote__port_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_remote__port_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__RemoteAddr_addr__type_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__RemoteAddr_addr__type
const TTCN_Typedescriptor_t PCUIF__RemoteAddr_addr__type_descr_ = { "@PCUIF_Types.PCUIF_RemoteAddr.addr_type", NULL, &PCUIF__RemoteAddr_addr__type_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__RemoteAddr_addr__type_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__AddrType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__AddrType
const TTCN_Typedescriptor_t PCUIF__AddrType_descr_ = { "@PCUIF_Types.PCUIF_AddrType", NULL, &PCUIF__AddrType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__AddrType_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__RemoteAddr_addr__type_0_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__RemoteAddr_addr__type_0
const TTCN_Typedescriptor_t PCUIF__RemoteAddr_addr__type_0_descr_ = { "@PCUIF_Types.PCUIF_RemoteAddr.addr_type.<oftype>", NULL, &PCUIF__RemoteAddr_addr__type_0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__RemoteAddr_addr__type_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__RemoteAddr_addr__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__RemoteAddr_addr_raw_ = {2,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__RemoteAddr_addr
const TTCN_Typedescriptor_t PCUIF__RemoteAddr_addr_descr_ = { "@PCUIF_Types.PCUIF_RemoteAddr.addr", NULL, &PCUIF__RemoteAddr_addr_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__RemoteAddr_addr_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__RemoteAddr_addr_0_raw_ = {128,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__RemoteAddr_addr_0_xer_ = { {"OCTETSTRING>\n", "OCTETSTRING>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__RemoteAddr_addr_0_oer_ext_arr_[0] = {};
const int PCUIF__RemoteAddr_addr_0_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__RemoteAddr_addr_0_oer_ = { -1, TRUE, 16, FALSE, 0, 0, PCUIF__RemoteAddr_addr_0_oer_ext_arr_, 0, PCUIF__RemoteAddr_addr_0_oer_p_};
const TTCN_Typedescriptor_t PCUIF__RemoteAddr_addr_0_descr_ = { "@PCUIF_Types.PCUIF_RemoteAddr.addr.<oftype>", &OCTETSTRING_ber_, &PCUIF__RemoteAddr_addr_0_raw_, &OCTETSTRING_text_, &PCUIF__RemoteAddr_addr_0_xer_, &OCTETSTRING_json_, &PCUIF__RemoteAddr_addr_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__RemoteAddr_addr_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__RemoteAddr_addr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__RemoteAddr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__RemoteAddr
const TTCN_Typedescriptor_t PCUIF__RemoteAddr_descr_ = { "@PCUIF_Types.PCUIF_RemoteAddr", NULL, &PCUIF__RemoteAddr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__RemoteAddr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_remote__addr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_remote__addr
const TTCN_Typedescriptor_t PCUIF__info__ind_remote__addr_descr_ = { "@PCUIF_Types.PCUIF_info_ind.remote_addr", NULL, &PCUIF__info__ind_remote__addr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_remote__addr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__info__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind
const TTCN_Typedescriptor_t PCUIF__info__ind_descr_ = { "@PCUIF_Types.PCUIF_info_ind", NULL, &PCUIF__info__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__info__ind_bts__model_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__info__ind_bts__model
const TTCN_Typedescriptor_t PCUIF__info__ind_bts__model_descr_ = { "@PCUIF_Types.PCUIF_info_ind.bts_model", NULL, &PCUIF__info__ind_bts__model_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__info__ind_bts__model_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__info__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__e1__ccu__ind_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__e1__ccu__ind_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind.trx_nr", &INTEGER_ber_, &PCUIF__e1__ccu__ind_trx__nr_raw_, &INTEGER_text_, &PCUIF__e1__ccu__ind_trx__nr_xer_, &INTEGER_json_, &PCUIF__e1__ccu__ind_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_ts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__e1__ccu__ind_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__e1__ccu__ind_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_ts__nr_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind.ts_nr", &INTEGER_ber_, &PCUIF__e1__ccu__ind_ts__nr_raw_, &INTEGER_text_, &PCUIF__e1__ccu__ind_ts__nr_xer_, &INTEGER_json_, &PCUIF__e1__ccu__ind_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_e1__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__e1__ccu__ind_e1__nr_xer_ = { {"e1_nr>\n", "e1_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__e1__ccu__ind_e1__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_e1__nr_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind.e1_nr", &INTEGER_ber_, &PCUIF__e1__ccu__ind_e1__nr_raw_, &INTEGER_text_, &PCUIF__e1__ccu__ind_e1__nr_xer_, &INTEGER_json_, &PCUIF__e1__ccu__ind_e1__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_e1__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_e1__ts_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__e1__ccu__ind_e1__ts_xer_ = { {"e1_ts>\n", "e1_ts>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__e1__ccu__ind_e1__ts_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_e1__ts_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind.e1_ts", &INTEGER_ber_, &PCUIF__e1__ccu__ind_e1__ts_raw_, &INTEGER_text_, &PCUIF__e1__ccu__ind_e1__ts_xer_, &INTEGER_json_, &PCUIF__e1__ccu__ind_e1__ts_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_e1__ts_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_e1__ts__ss_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__e1__ccu__ind_e1__ts__ss_xer_ = { {"e1_ts_ss>\n", "e1_ts_ss>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__e1__ccu__ind_e1__ts__ss_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_e1__ts__ss_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind.e1_ts_ss", &INTEGER_ber_, &PCUIF__e1__ccu__ind_e1__ts__ss_raw_, &INTEGER_text_, &PCUIF__e1__ccu__ind_e1__ts__ss_xer_, &INTEGER_json_, &PCUIF__e1__ccu__ind_e1__ts__ss_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_e1__ts__ss_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__e1__ccu__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__e1__ccu__ind
const TTCN_Typedescriptor_t PCUIF__e1__ccu__ind_descr_ = { "@PCUIF_Types.PCUIF_e1_ccu_ind", NULL, &PCUIF__e1__ccu__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__e1__ccu__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__act__req_is__activate_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__act__req_is__activate_xer_ = { {"is_activate>\n", "is_activate>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__act__req_is__activate_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__act__req_is__activate_descr_ = { "@PCUIF_Types.PCUIF_act_req.is_activate", &INTEGER_ber_, &PCUIF__act__req_is__activate_raw_, &INTEGER_text_, &PCUIF__act__req_is__activate_xer_, &INTEGER_json_, &PCUIF__act__req_is__activate_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__act__req_is__activate_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__act__req_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__act__req_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__act__req_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__act__req_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_act_req.trx_nr", &INTEGER_ber_, &PCUIF__act__req_trx__nr_raw_, &INTEGER_text_, &PCUIF__act__req_trx__nr_xer_, &INTEGER_json_, &PCUIF__act__req_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__act__req_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__act__req_ts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__act__req_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__act__req_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__act__req_ts__nr_descr_ = { "@PCUIF_Types.PCUIF_act_req.ts_nr", &INTEGER_ber_, &PCUIF__act__req_ts__nr_raw_, &INTEGER_text_, &PCUIF__act__req_ts__nr_xer_, &INTEGER_json_, &PCUIF__act__req_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__act__req_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__act__req_spare_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__act__req_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__act__req_spare_oer_ext_arr_[0] = {};
const int PCUIF__act__req_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__act__req_spare_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PCUIF__act__req_spare_oer_ext_arr_, 0, PCUIF__act__req_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__act__req_spare_descr_ = { "@PCUIF_Types.PCUIF_act_req.spare", &OCTETSTRING_ber_, &PCUIF__act__req_spare_raw_, &OCTETSTRING_text_, &PCUIF__act__req_spare_xer_, &OCTETSTRING_json_, &PCUIF__act__req_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__act__req_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__act__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__act__req
const TTCN_Typedescriptor_t PCUIF__act__req_descr_ = { "@PCUIF_Types.PCUIF_act_req", NULL, &PCUIF__act__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__act__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__time__ind_fn_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__time__ind_fn_xer_ = { {"fn>\n", "fn>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__time__ind_fn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__time__ind_fn_descr_ = { "@PCUIF_Types.PCUIF_time_ind.fn", &INTEGER_ber_, &PCUIF__time__ind_fn_raw_, &INTEGER_text_, &PCUIF__time__ind_fn_xer_, &INTEGER_json_, &PCUIF__time__ind_fn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__time__ind_fn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__time__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__time__ind
const TTCN_Typedescriptor_t PCUIF__time__ind_descr_ = { "@PCUIF_Types.PCUIF_time_ind", NULL, &PCUIF__time__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__time__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__interf
const TTCN_Typedescriptor_t PCUIF__interf_descr_ = { "@PCUIF_Types.PCUIF_interf", NULL, &PCUIF__interf_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__interf_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__interf_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__interf_0_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 PCUIF__interf_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__interf_0_descr_ = { "@PCUIF_Types.PCUIF_interf.<oftype>", &INTEGER_ber_, &PCUIF__interf_0_raw_, &INTEGER_text_, &PCUIF__interf_0_xer_, &INTEGER_json_, &PCUIF__interf_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf_0_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__interf_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf__ind_trx__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__interf__ind_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__interf__ind_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__interf__ind_trx__nr_descr_ = { "@PCUIF_Types.PCUIF_interf_ind.trx_nr", &INTEGER_ber_, &PCUIF__interf__ind_trx__nr_raw_, &INTEGER_text_, &PCUIF__interf__ind_trx__nr_xer_, &INTEGER_json_, &PCUIF__interf__ind_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf__ind_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf__ind_spare_raw_ = {24,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,3,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__interf__ind_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__interf__ind_spare_oer_ext_arr_[0] = {};
const int PCUIF__interf__ind_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__interf__ind_spare_oer_ = { -1, TRUE, 3, FALSE, 0, 0, PCUIF__interf__ind_spare_oer_ext_arr_, 0, PCUIF__interf__ind_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__interf__ind_spare_descr_ = { "@PCUIF_Types.PCUIF_interf_ind.spare", &OCTETSTRING_ber_, &PCUIF__interf__ind_spare_raw_, &OCTETSTRING_text_, &PCUIF__interf__ind_spare_xer_, &OCTETSTRING_json_, &PCUIF__interf__ind_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf__ind_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf__ind_fn_raw_ = {32,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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__interf__ind_fn_xer_ = { {"fn>\n", "fn>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__interf__ind_fn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__interf__ind_fn_descr_ = { "@PCUIF_Types.PCUIF_interf_ind.fn", &INTEGER_ber_, &PCUIF__interf__ind_fn_raw_, &INTEGER_text_, &PCUIF__interf__ind_fn_xer_, &INTEGER_json_, &PCUIF__interf__ind_fn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf__ind_fn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf__ind_interf_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__interf__ind_interf
const TTCN_Typedescriptor_t PCUIF__interf__ind_interf_descr_ = { "@PCUIF_Types.PCUIF_interf_ind.interf", NULL, &PCUIF__interf__ind_interf_raw_, NULL, NULL, NULL, NULL, NULL, &PCUIF__interf_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf__ind_interf_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__interf__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__interf__ind
const TTCN_Typedescriptor_t PCUIF__interf__ind_descr_ = { "@PCUIF_Types.PCUIF_interf_ind", NULL, &PCUIF__interf__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__interf__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pag__req_sapi_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__pag__req_sapi
const TTCN_Typedescriptor_t PCUIF__pag__req_sapi_descr_ = { "@PCUIF_Types.PCUIF_pag_req.sapi", NULL, &PCUIF__pag__req_sapi_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pag__req_sapi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pag__req_chan__needed_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pag__req_chan__needed_xer_ = { {"chan_needed>\n", "chan_needed>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__pag__req_chan__needed_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__pag__req_chan__needed_descr_ = { "@PCUIF_Types.PCUIF_pag_req.chan_needed", &INTEGER_ber_, &PCUIF__pag__req_chan__needed_raw_, &INTEGER_text_, &PCUIF__pag__req_chan__needed_xer_, &INTEGER_json_, &PCUIF__pag__req_chan__needed_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pag__req_chan__needed_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pag__req_identity__lv_raw_ = {72,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,9,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pag__req_identity__lv_xer_ = { {"identity_lv>\n", "identity_lv>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__pag__req_identity__lv_oer_ext_arr_[0] = {};
const int PCUIF__pag__req_identity__lv_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__pag__req_identity__lv_oer_ = { -1, TRUE, 9, FALSE, 0, 0, PCUIF__pag__req_identity__lv_oer_ext_arr_, 0, PCUIF__pag__req_identity__lv_oer_p_};
const TTCN_Typedescriptor_t PCUIF__pag__req_identity__lv_descr_ = { "@PCUIF_Types.PCUIF_pag_req.identity_lv", &OCTETSTRING_ber_, &PCUIF__pag__req_identity__lv_raw_, &OCTETSTRING_text_, &PCUIF__pag__req_identity__lv_xer_, &OCTETSTRING_json_, &PCUIF__pag__req_identity__lv_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pag__req_identity__lv_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pag__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__pag__req
const TTCN_Typedescriptor_t PCUIF__pag__req_descr_ = { "@PCUIF_Types.PCUIF_pag_req", NULL, &PCUIF__pag__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pag__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__app__info__req_application__type_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__app__info__req_application__type_xer_ = { {"application_type>\n", "application_type>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__app__info__req_application__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__app__info__req_application__type_descr_ = { "@PCUIF_Types.PCUIF_app_info_req.application_type", &INTEGER_ber_, &PCUIF__app__info__req_application__type_raw_, &INTEGER_text_, &PCUIF__app__info__req_application__type_xer_, &INTEGER_json_, &PCUIF__app__info__req_application__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__app__info__req_application__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__app__info__req_len_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__app__info__req_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__app__info__req_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__app__info__req_len_descr_ = { "@PCUIF_Types.PCUIF_app_info_req.len", &INTEGER_ber_, &PCUIF__app__info__req_len_raw_, &INTEGER_text_, &PCUIF__app__info__req_len_xer_, &INTEGER_json_, &PCUIF__app__info__req_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__app__info__req_len_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__app__info__req_data_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__app__info__req_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__app__info__req_data_oer_ext_arr_[0] = {};
const int PCUIF__app__info__req_data_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__app__info__req_data_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__app__info__req_data_oer_ext_arr_, 0, PCUIF__app__info__req_data_oer_p_};
const TTCN_Typedescriptor_t PCUIF__app__info__req_data_descr_ = { "@PCUIF_Types.PCUIF_app_info_req.data", &OCTETSTRING_ber_, &PCUIF__app__info__req_data_raw_, &OCTETSTRING_text_, &PCUIF__app__info__req_data_xer_, &OCTETSTRING_json_, &PCUIF__app__info__req_data_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__app__info__req_data_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__app__info__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__app__info__req
const TTCN_Typedescriptor_t PCUIF__app__info__req_descr_ = { "@PCUIF_Types.PCUIF_app_info_req", NULL, &PCUIF__app__info__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__app__info__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__susp__req_tlli_raw_ = {32,SG_NO,ORDER_MSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__susp__req_tlli_xer_ = { {"tlli>\n", "tlli>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__susp__req_tlli_oer_ext_arr_[0] = {};
const int PCUIF__susp__req_tlli_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__susp__req_tlli_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PCUIF__susp__req_tlli_oer_ext_arr_, 0, PCUIF__susp__req_tlli_oer_p_};
const TTCN_Typedescriptor_t PCUIF__susp__req_tlli_descr_ = { "@PCUIF_Types.PCUIF_susp_req.tlli", &OCTETSTRING_ber_, &PCUIF__susp__req_tlli_raw_, &OCTETSTRING_text_, &PCUIF__susp__req_tlli_xer_, &OCTETSTRING_json_, &PCUIF__susp__req_tlli_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__susp__req_tlli_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__susp__req_ra__id_raw_ = {48,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__susp__req_ra__id_xer_ = { {"ra_id>\n", "ra_id>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__susp__req_ra__id_oer_ext_arr_[0] = {};
const int PCUIF__susp__req_ra__id_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__susp__req_ra__id_oer_ = { -1, TRUE, 6, FALSE, 0, 0, PCUIF__susp__req_ra__id_oer_ext_arr_, 0, PCUIF__susp__req_ra__id_oer_p_};
const TTCN_Typedescriptor_t PCUIF__susp__req_ra__id_descr_ = { "@PCUIF_Types.PCUIF_susp_req.ra_id", &OCTETSTRING_ber_, &PCUIF__susp__req_ra__id_raw_, &OCTETSTRING_text_, &PCUIF__susp__req_ra__id_xer_, &OCTETSTRING_json_, &PCUIF__susp__req_ra__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__susp__req_ra__id_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__susp__req_cause_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__susp__req_cause_xer_ = { {"cause>\n", "cause>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__susp__req_cause_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__susp__req_cause_descr_ = { "@PCUIF_Types.PCUIF_susp_req.cause", &INTEGER_ber_, &PCUIF__susp__req_cause_raw_, &INTEGER_text_, &PCUIF__susp__req_cause_xer_, &INTEGER_json_, &PCUIF__susp__req_cause_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__susp__req_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__susp__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__susp__req
const TTCN_Typedescriptor_t PCUIF__susp__req_descr_ = { "@PCUIF_Types.PCUIF_susp_req", NULL, &PCUIF__susp__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__susp__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__req_local__lac_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__req_local__lac_xer_ = { {"local_lac>\n", "local_lac>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__req_local__lac_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__req_local__lac_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_req.local_lac", &INTEGER_ber_, &PCUIF__neigh__addr__req_local__lac_raw_, &INTEGER_text_, &PCUIF__neigh__addr__req_local__lac_xer_, &INTEGER_json_, &PCUIF__neigh__addr__req_local__lac_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__req_local__lac_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__req_local__ci_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__req_local__ci_xer_ = { {"local_ci>\n", "local_ci>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__req_local__ci_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__req_local__ci_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_req.local_ci", &INTEGER_ber_, &PCUIF__neigh__addr__req_local__ci_raw_, &INTEGER_text_, &PCUIF__neigh__addr__req_local__ci_xer_, &INTEGER_json_, &PCUIF__neigh__addr__req_local__ci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__req_local__ci_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__req_tgt__arfcn_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__req_tgt__arfcn_xer_ = { {"tgt_arfcn>\n", "tgt_arfcn>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__req_tgt__arfcn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__req_tgt__arfcn_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_req.tgt_arfcn", &INTEGER_ber_, &PCUIF__neigh__addr__req_tgt__arfcn_raw_, &INTEGER_text_, &PCUIF__neigh__addr__req_tgt__arfcn_xer_, &INTEGER_json_, &PCUIF__neigh__addr__req_tgt__arfcn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__req_tgt__arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__req_tgt__bsic_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__req_tgt__bsic_xer_ = { {"tgt_bsic>\n", "tgt_bsic>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__req_tgt__bsic_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__req_tgt__bsic_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_req.tgt_bsic", &INTEGER_ber_, &PCUIF__neigh__addr__req_tgt__bsic_raw_, &INTEGER_text_, &PCUIF__neigh__addr__req_tgt__bsic_xer_, &INTEGER_json_, &PCUIF__neigh__addr__req_tgt__bsic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__req_tgt__bsic_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__neigh__addr__req
const TTCN_Typedescriptor_t PCUIF__neigh__addr__req_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_req", NULL, &PCUIF__neigh__addr__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_orig__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__neigh__addr__cnf_orig__req
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_orig__req_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.orig_req", NULL, &PCUIF__neigh__addr__cnf_orig__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_orig__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_error__code_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_error__code_xer_ = { {"error_code>\n", "error_code>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_error__code_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_error__code_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.error_code", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_error__code_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_error__code_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_error__code_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_error__code_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_mcc_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_mcc_xer_ = { {"mcc>\n", "mcc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_mcc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_mcc_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.mcc", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_mcc_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_mcc_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_mcc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_mcc_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_mnc_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_mnc_xer_ = { {"mnc>\n", "mnc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_mnc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_mnc_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.mnc", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_mnc_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_mnc_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_mnc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_mnc_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_mnc__3__digits_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_mnc__3__digits_xer_ = { {"mnc_3_digits>\n", "mnc_3_digits>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_mnc__3__digits_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_mnc__3__digits_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.mnc_3_digits", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_mnc__3__digits_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_mnc__3__digits_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_mnc__3__digits_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_mnc__3__digits_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_lac_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_lac_xer_ = { {"lac>\n", "lac>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_lac_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_lac_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.lac", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_lac_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_lac_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_lac_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_lac_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_rac_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_rac_xer_ = { {"rac>\n", "rac>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_rac_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_rac_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.rac", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_rac_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_rac_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_rac_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_rac_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_cell__identity_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__neigh__addr__cnf_cell__identity_xer_ = { {"cell_identity>\n", "cell_identity>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__neigh__addr__cnf_cell__identity_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_cell__identity_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf.cell_identity", &INTEGER_ber_, &PCUIF__neigh__addr__cnf_cell__identity_raw_, &INTEGER_text_, &PCUIF__neigh__addr__cnf_cell__identity_xer_, &INTEGER_json_, &PCUIF__neigh__addr__cnf_cell__identity_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_cell__identity_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__neigh__addr__cnf_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__neigh__addr__cnf
const TTCN_Typedescriptor_t PCUIF__neigh__addr__cnf_descr_ = { "@PCUIF_Types.PCUIF_neigh_addr_cnf", NULL, &PCUIF__neigh__addr__cnf_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__neigh__addr__cnf_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__ContainerMsgUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__ContainerMsgUnion
const TTCN_Typedescriptor_t PCUIF__ContainerMsgUnion_descr_ = { "@PCUIF_Types.PCUIF_ContainerMsgUnion", NULL, &PCUIF__ContainerMsgUnion_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__ContainerMsgUnion_neigh__addr__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__ContainerMsgUnion_neigh__addr__req
const TTCN_Typedescriptor_t PCUIF__ContainerMsgUnion_neigh__addr__req_descr_ = { "@PCUIF_Types.PCUIF_ContainerMsgUnion.neigh_addr_req", NULL, &PCUIF__ContainerMsgUnion_neigh__addr__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__ContainerMsgUnion_neigh__addr__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__ContainerMsgUnion_neigh__addr__cnf_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__ContainerMsgUnion_neigh__addr__cnf
const TTCN_Typedescriptor_t PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_ = { "@PCUIF_Types.PCUIF_ContainerMsgUnion.neigh_addr_cnf", NULL, &PCUIF__ContainerMsgUnion_neigh__addr__cnf_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__ContainerMsgUnion_neigh__addr__cnf_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__ContainerMsgUnion_other_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__ContainerMsgUnion_other_xer_ = { {"other>\n", "other>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__ContainerMsgUnion_other_oer_ext_arr_[0] = {};
const int PCUIF__ContainerMsgUnion_other_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__ContainerMsgUnion_other_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__ContainerMsgUnion_other_oer_ext_arr_, 0, PCUIF__ContainerMsgUnion_other_oer_p_};
const TTCN_Typedescriptor_t PCUIF__ContainerMsgUnion_other_descr_ = { "@PCUIF_Types.PCUIF_ContainerMsgUnion.other", &OCTETSTRING_ber_, &PCUIF__ContainerMsgUnion_other_raw_, &OCTETSTRING_text_, &PCUIF__ContainerMsgUnion_other_xer_, &OCTETSTRING_json_, &PCUIF__ContainerMsgUnion_other_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__ContainerMsgUnion_other_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__ContainerMsgUnion_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__container_msg__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__container_msg__type
const TTCN_Typedescriptor_t PCUIF__container_msg__type_descr_ = { "@PCUIF_Types.PCUIF_container.msg_type", NULL, &PCUIF__container_msg__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__container_msg__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__container_spare_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__container_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__container_spare_oer_ext_arr_[0] = {};
const int PCUIF__container_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__container_spare_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PCUIF__container_spare_oer_ext_arr_, 0, PCUIF__container_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__container_spare_descr_ = { "@PCUIF_Types.PCUIF_container.spare", &OCTETSTRING_ber_, &PCUIF__container_spare_raw_, &OCTETSTRING_text_, &PCUIF__container_spare_xer_, &OCTETSTRING_json_, &PCUIF__container_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__container_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__container_len_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__container_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__container_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__container_len_descr_ = { "@PCUIF_Types.PCUIF_container.len", &INTEGER_ber_, &PCUIF__container_len_raw_, &INTEGER_text_, &PCUIF__container_len_xer_, &INTEGER_json_, &PCUIF__container_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__container_len_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__container_u_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__container_u
const TTCN_Typedescriptor_t PCUIF__container_u_descr_ = { "@PCUIF_Types.PCUIF_container.u", NULL, &PCUIF__container_u_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__container_u_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__container_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__container
const TTCN_Typedescriptor_t PCUIF__container_descr_ = { "@PCUIF_Types.PCUIF_container", NULL, &PCUIF__container_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__container_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pch_msg__id_raw_ = {32,SG_NO,ORDER_MSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pch_msg__id_xer_ = { {"msg_id>\n", "msg_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__pch_msg__id_oer_ext_arr_[0] = {};
const int PCUIF__pch_msg__id_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__pch_msg__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PCUIF__pch_msg__id_oer_ext_arr_, 0, PCUIF__pch_msg__id_oer_p_};
const TTCN_Typedescriptor_t PCUIF__pch_msg__id_descr_ = { "@PCUIF_Types.PCUIF_pch.msg_id", &OCTETSTRING_ber_, &PCUIF__pch_msg__id_raw_, &OCTETSTRING_text_, &PCUIF__pch_msg__id_xer_, &OCTETSTRING_json_, &PCUIF__pch_msg__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pch_msg__id_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pch_imsi_raw_ = {136,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,17,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pch_imsi_xer_ = { {"imsi>\n", "imsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t PCUIF__pch_imsi_descr_ = { "@PCUIF_Types.PCUIF_pch.imsi", NULL, &PCUIF__pch_imsi_raw_, &CHARSTRING_text_, &PCUIF__pch_imsi_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pch_imsi_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pch_data_raw_ = {184,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,23,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pch_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__pch_data_oer_ext_arr_[0] = {};
const int PCUIF__pch_data_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__pch_data_oer_ = { -1, TRUE, 23, FALSE, 0, 0, PCUIF__pch_data_oer_ext_arr_, 0, PCUIF__pch_data_oer_p_};
const TTCN_Typedescriptor_t PCUIF__pch_data_descr_ = { "@PCUIF_Types.PCUIF_pch.data", &OCTETSTRING_ber_, &PCUIF__pch_data_raw_, &OCTETSTRING_text_, &PCUIF__pch_data_xer_, &OCTETSTRING_json_, &PCUIF__pch_data_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pch_data_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pch_confirm_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__pch_confirm_xer_ = { {"confirm>\n", "confirm>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__pch_confirm_oer_ext_arr_[0] = {};
const int PCUIF__pch_confirm_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__pch_confirm_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__pch_confirm_oer_ext_arr_, 0, PCUIF__pch_confirm_oer_p_};
const TTCN_Typedescriptor_t PCUIF__pch_confirm_descr_ = { "@PCUIF_Types.PCUIF_pch.confirm", &BOOLEAN_ber_, &PCUIF__pch_confirm_raw_, &BOOLEAN_text_, &PCUIF__pch_confirm_xer_, &BOOLEAN_json_, &PCUIF__pch_confirm_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pch_confirm_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__pch_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__pch
const TTCN_Typedescriptor_t PCUIF__pch_descr_ = { "@PCUIF_Types.PCUIF_pch", NULL, &PCUIF__pch_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__pch_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__agch_msg__id_raw_ = {32,SG_NO,ORDER_MSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,4,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__agch_msg__id_xer_ = { {"msg_id>\n", "msg_id>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__agch_msg__id_oer_ext_arr_[0] = {};
const int PCUIF__agch_msg__id_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__agch_msg__id_oer_ = { -1, TRUE, 4, FALSE, 0, 0, PCUIF__agch_msg__id_oer_ext_arr_, 0, PCUIF__agch_msg__id_oer_p_};
const TTCN_Typedescriptor_t PCUIF__agch_msg__id_descr_ = { "@PCUIF_Types.PCUIF_agch.msg_id", &OCTETSTRING_ber_, &PCUIF__agch_msg__id_raw_, &OCTETSTRING_text_, &PCUIF__agch_msg__id_xer_, &OCTETSTRING_json_, &PCUIF__agch_msg__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__agch_msg__id_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__agch_data_raw_ = {184,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,23,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__agch_data_xer_ = { {"data>\n", "data>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__agch_data_oer_ext_arr_[0] = {};
const int PCUIF__agch_data_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__agch_data_oer_ = { -1, TRUE, 23, FALSE, 0, 0, PCUIF__agch_data_oer_ext_arr_, 0, PCUIF__agch_data_oer_p_};
const TTCN_Typedescriptor_t PCUIF__agch_data_descr_ = { "@PCUIF_Types.PCUIF_agch.data", &OCTETSTRING_ber_, &PCUIF__agch_data_raw_, &OCTETSTRING_text_, &PCUIF__agch_data_xer_, &OCTETSTRING_json_, &PCUIF__agch_data_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__agch_data_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__agch_confirm_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__agch_confirm_xer_ = { {"confirm>\n", "confirm>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__agch_confirm_oer_ext_arr_[0] = {};
const int PCUIF__agch_confirm_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__agch_confirm_oer_ = { -1, TRUE, -1, FALSE, 0, 0, PCUIF__agch_confirm_oer_ext_arr_, 0, PCUIF__agch_confirm_oer_p_};
const TTCN_Typedescriptor_t PCUIF__agch_confirm_descr_ = { "@PCUIF_Types.PCUIF_agch.confirm", &BOOLEAN_ber_, &PCUIF__agch_confirm_raw_, &BOOLEAN_text_, &PCUIF__agch_confirm_xer_, &BOOLEAN_json_, &PCUIF__agch_confirm_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__agch_confirm_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__agch_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__agch
const TTCN_Typedescriptor_t PCUIF__agch_descr_ = { "@PCUIF_Types.PCUIF_agch", NULL, &PCUIF__agch_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__agch_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion
const TTCN_Typedescriptor_t PCUIF__MsgUnion_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion", NULL, &PCUIF__MsgUnion_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_data__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_data__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_data__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.data_req", NULL, &PCUIF__MsgUnion_data__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_data__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_data__cnf2_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_data__cnf2
const TTCN_Typedescriptor_t PCUIF__MsgUnion_data__cnf2_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.data_cnf2", NULL, &PCUIF__MsgUnion_data__cnf2_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_data__cnf2_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_data__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_data__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_data__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.data_ind", NULL, &PCUIF__MsgUnion_data__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_data__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_susp__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_susp__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_susp__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.susp_req", NULL, &PCUIF__MsgUnion_susp__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_susp__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_rts__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_rts__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_rts__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.rts_req", NULL, &PCUIF__MsgUnion_rts__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_rts__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_rach__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_rach__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_rach__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.rach_ind", NULL, &PCUIF__MsgUnion_rach__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_rach__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_txt__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_txt__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_txt__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.txt_ind", NULL, &PCUIF__MsgUnion_txt__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_txt__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_info__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_info__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_info__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.info_ind", NULL, &PCUIF__MsgUnion_info__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_info__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_e1__ccu__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_e1__ccu__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_e1__ccu__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.e1_ccu_ind", NULL, &PCUIF__MsgUnion_e1__ccu__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_e1__ccu__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_act__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_act__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_act__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.act_req", NULL, &PCUIF__MsgUnion_act__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_act__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_time__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_time__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_time__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.time_ind", NULL, &PCUIF__MsgUnion_time__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_time__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_interf__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_interf__ind
const TTCN_Typedescriptor_t PCUIF__MsgUnion_interf__ind_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.interf_ind", NULL, &PCUIF__MsgUnion_interf__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_interf__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_pag__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_pag__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_pag__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.pag_req", NULL, &PCUIF__MsgUnion_pag__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_pag__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_app__info__req_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_app__info__req
const TTCN_Typedescriptor_t PCUIF__MsgUnion_app__info__req_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.app_info_req", NULL, &PCUIF__MsgUnion_app__info__req_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_app__info__req_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__MsgUnion_container_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__MsgUnion_container
const TTCN_Typedescriptor_t PCUIF__MsgUnion_container_descr_ = { "@PCUIF_Types.PCUIF_MsgUnion.container", NULL, &PCUIF__MsgUnion_container_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_container_default_coding("RAW");
UNIVERSAL_CHARSTRING PCUIF__MsgUnion_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Message_msg__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__Message_msg__type
const TTCN_Typedescriptor_t PCUIF__Message_msg__type_descr_ = { "@PCUIF_Types.PCUIF_Message.msg_type", NULL, &PCUIF__Message_msg__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Message_msg__type_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Message_bts__nr_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_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Message_bts__nr_xer_ = { {"bts_nr>\n", "bts_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PCUIF__Message_bts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PCUIF__Message_bts__nr_descr_ = { "@PCUIF_Types.PCUIF_Message.bts_nr", &INTEGER_ber_, &PCUIF__Message_bts__nr_raw_, &INTEGER_text_, &PCUIF__Message_bts__nr_xer_, &INTEGER_json_, &PCUIF__Message_bts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Message_bts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Message_spare_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       PCUIF__Message_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PCUIF__Message_spare_oer_ext_arr_[0] = {};
const int PCUIF__Message_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t PCUIF__Message_spare_oer_ = { -1, TRUE, 2, FALSE, 0, 0, PCUIF__Message_spare_oer_ext_arr_, 0, PCUIF__Message_spare_oer_p_};
const TTCN_Typedescriptor_t PCUIF__Message_spare_descr_ = { "@PCUIF_Types.PCUIF_Message.spare", &OCTETSTRING_ber_, &PCUIF__Message_spare_raw_, &OCTETSTRING_text_, &PCUIF__Message_spare_xer_, &OCTETSTRING_json_, &PCUIF__Message_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Message_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Message_u_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__Message_u
const TTCN_Typedescriptor_t PCUIF__Message_u_descr_ = { "@PCUIF_Types.PCUIF_Message.u", NULL, &PCUIF__Message_u_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Message_u_default_coding("RAW");
const TTCN_RAWdescriptor_t PCUIF__Message_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8056,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PCUIF__Message
const TTCN_Typedescriptor_t PCUIF__Message_descr_ = { "@PCUIF_Types.PCUIF_Message", NULL, &PCUIF__Message_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PCUIF__Message_default_coding("RAW");
PCUIF__MsgType_template template_tr__PCUIF__MSG_msg__type_defval;
const PCUIF__MsgType_template& tr__PCUIF__MSG_msg__type_defval = template_tr__PCUIF__MSG_msg__type_defval;
INTEGER_template template_tr__PCUIF__MSG_bts__nr_defval;
const INTEGER_template& tr__PCUIF__MSG_bts__nr_defval = template_tr__PCUIF__MSG_bts__nr_defval;
INTEGER_template template_tr__PCUIF__RTS__REQ_bts__nr_defval;
const INTEGER_template& tr__PCUIF__RTS__REQ_bts__nr_defval = template_tr__PCUIF__RTS__REQ_bts__nr_defval;
INTEGER_template template_tr__PCUIF__RTS__REQ_trx__nr_defval;
const INTEGER_template& tr__PCUIF__RTS__REQ_trx__nr_defval = template_tr__PCUIF__RTS__REQ_trx__nr_defval;
INTEGER_template template_tr__PCUIF__RTS__REQ_ts__nr_defval;
const INTEGER_template& tr__PCUIF__RTS__REQ_ts__nr_defval = template_tr__PCUIF__RTS__REQ_ts__nr_defval;
PCUIF__Sapi_template template_tr__PCUIF__RTS__REQ_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__RTS__REQ_sapi_defval = template_tr__PCUIF__RTS__REQ_sapi_defval;
INTEGER_template template_tr__PCUIF__RTS__REQ_fn_defval;
const INTEGER_template& tr__PCUIF__RTS__REQ_fn_defval = template_tr__PCUIF__RTS__REQ_fn_defval;
INTEGER_template template_tr__PCUIF__RTS__REQ_block__nr_defval;
const INTEGER_template& tr__PCUIF__RTS__REQ_block__nr_defval = template_tr__PCUIF__RTS__REQ_block__nr_defval;
CHARSTRING_template template_tr__PCUIF__TXT__IND_text_defval;
const CHARSTRING_template& tr__PCUIF__TXT__IND_text_defval = template_tr__PCUIF__TXT__IND_text_defval;
INTEGER_template template_ts__PCUIF__DATA__IND_rssi_defval;
const INTEGER_template& ts__PCUIF__DATA__IND_rssi_defval = template_ts__PCUIF__DATA__IND_rssi_defval;
INTEGER_template template_ts__PCUIF__DATA__IND_ber10k_defval;
const INTEGER_template& ts__PCUIF__DATA__IND_ber10k_defval = template_ts__PCUIF__DATA__IND_ber10k_defval;
INTEGER_template template_ts__PCUIF__DATA__IND_ta__offs__qbits_defval;
const INTEGER_template& ts__PCUIF__DATA__IND_ta__offs__qbits_defval = template_ts__PCUIF__DATA__IND_ta__offs__qbits_defval;
INTEGER_template template_ts__PCUIF__DATA__IND_lqual__cb_defval;
const INTEGER_template& ts__PCUIF__DATA__IND_lqual__cb_defval = template_ts__PCUIF__DATA__IND_lqual__cb_defval;
INTEGER_template template_tr__PCUIF__DATA__IND_bts__nr_defval;
const INTEGER_template& tr__PCUIF__DATA__IND_bts__nr_defval = template_tr__PCUIF__DATA__IND_bts__nr_defval;
INTEGER_template template_tr__PCUIF__DATA__IND_trx__nr_defval;
const INTEGER_template& tr__PCUIF__DATA__IND_trx__nr_defval = template_tr__PCUIF__DATA__IND_trx__nr_defval;
INTEGER_template template_tr__PCUIF__DATA__IND_ts__nr_defval;
const INTEGER_template& tr__PCUIF__DATA__IND_ts__nr_defval = template_tr__PCUIF__DATA__IND_ts__nr_defval;
INTEGER_template template_tr__PCUIF__DATA__IND_block__nr_defval;
const INTEGER_template& tr__PCUIF__DATA__IND_block__nr_defval = template_tr__PCUIF__DATA__IND_block__nr_defval;
PCUIF__Sapi_template template_tr__PCUIF__DATA__IND_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__DATA__IND_sapi_defval = template_tr__PCUIF__DATA__IND_sapi_defval;
OCTETSTRING_template template_tr__PCUIF__DATA__IND_data_defval;
const OCTETSTRING_template& tr__PCUIF__DATA__IND_data_defval = template_tr__PCUIF__DATA__IND_data_defval;
INTEGER_template template_tr__PCUIF__DATA_block__nr_defval;
const INTEGER_template& tr__PCUIF__DATA_block__nr_defval = template_tr__PCUIF__DATA_block__nr_defval;
INTEGER_template template_tr__PCUIF__DATA_fn_defval;
const INTEGER_template& tr__PCUIF__DATA_fn_defval = template_tr__PCUIF__DATA_fn_defval;
PCUIF__Sapi_template template_tr__PCUIF__DATA_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__DATA_sapi_defval = template_tr__PCUIF__DATA_sapi_defval;
OCTETSTRING_template template_tr__PCUIF__DATA_data_defval;
const OCTETSTRING_template& tr__PCUIF__DATA_data_defval = template_tr__PCUIF__DATA_data_defval;
INTEGER_template template_tr__PCUIF__DATA__REQ_block__nr_defval;
const INTEGER_template& tr__PCUIF__DATA__REQ_block__nr_defval = template_tr__PCUIF__DATA__REQ_block__nr_defval;
INTEGER_template template_tr__PCUIF__DATA__REQ_fn_defval;
const INTEGER_template& tr__PCUIF__DATA__REQ_fn_defval = template_tr__PCUIF__DATA__REQ_fn_defval;
PCUIF__Sapi_template template_tr__PCUIF__DATA__REQ_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__DATA__REQ_sapi_defval = template_tr__PCUIF__DATA__REQ_sapi_defval;
OCTETSTRING_template template_tr__PCUIF__DATA__REQ_data_defval;
const OCTETSTRING_template& tr__PCUIF__DATA__REQ_data_defval = template_tr__PCUIF__DATA__REQ_data_defval;
PCUIF__Sapi_template template_tr__PCUIF__DATA__CNF__2_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__DATA__CNF__2_sapi_defval = template_tr__PCUIF__DATA__CNF__2_sapi_defval;
OCTETSTRING_template template_tr__PCUIF__DATA__CNF__2_msg__id_defval;
const OCTETSTRING_template& tr__PCUIF__DATA__CNF__2_msg__id_defval = template_tr__PCUIF__DATA__CNF__2_msg__id_defval;
INTEGER_template template_ts__PCUIF__RACH__IND_qta_defval;
const INTEGER_template& ts__PCUIF__RACH__IND_qta_defval = template_ts__PCUIF__RACH__IND_qta_defval;
PCUIF__Sapi_template template_ts__PCUIF__RACH__IND_sapi_defval;
const PCUIF__Sapi_template& ts__PCUIF__RACH__IND_sapi_defval = template_ts__PCUIF__RACH__IND_sapi_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_bts__nr_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_bts__nr_defval = template_tr__PCUIF__RACH__IND_bts__nr_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_trx__nr_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_trx__nr_defval = template_tr__PCUIF__RACH__IND_trx__nr_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_ts__nr_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_ts__nr_defval = template_tr__PCUIF__RACH__IND_ts__nr_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_ra_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_ra_defval = template_tr__PCUIF__RACH__IND_ra_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_is__11bit_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_is__11bit_defval = template_tr__PCUIF__RACH__IND_is__11bit_defval;
PCUIF__BurstType_template template_tr__PCUIF__RACH__IND_burst__type_defval;
const PCUIF__BurstType_template& tr__PCUIF__RACH__IND_burst__type_defval = template_tr__PCUIF__RACH__IND_burst__type_defval;
INTEGER_template template_tr__PCUIF__RACH__IND_fn_defval;
const INTEGER_template& tr__PCUIF__RACH__IND_fn_defval = template_tr__PCUIF__RACH__IND_fn_defval;
PCUIF__Sapi_template template_tr__PCUIF__RACH__IND_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__RACH__IND_sapi_defval = template_tr__PCUIF__RACH__IND_sapi_defval;
INTEGER_template template_tr__PCUIF__PAG__REQ_bts__nr_defval;
const INTEGER_template& tr__PCUIF__PAG__REQ_bts__nr_defval = template_tr__PCUIF__PAG__REQ_bts__nr_defval;
OCTETSTRING_template template_tr__PCUIF__PAG__REQ_id__lv_defval;
const OCTETSTRING_template& tr__PCUIF__PAG__REQ_id__lv_defval = template_tr__PCUIF__PAG__REQ_id__lv_defval;
INTEGER_template template_tr__PCUIF__PAG__REQ_chan__needed_defval;
const INTEGER_template& tr__PCUIF__PAG__REQ_chan__needed_defval = template_tr__PCUIF__PAG__REQ_chan__needed_defval;
PCUIF__Sapi_template template_tr__PCUIF__PAG__REQ_sapi_defval;
const PCUIF__Sapi_template& tr__PCUIF__PAG__REQ_sapi_defval = template_tr__PCUIF__PAG__REQ_sapi_defval;
PCUIF__Flags const_c__PCUIF__Flags__default;
const PCUIF__Flags& c__PCUIF__Flags__default = const_c__PCUIF__Flags__default;
PCUIF__Flags const_c__PCUIF__Flags__noMCS;
const PCUIF__Flags& c__PCUIF__Flags__noMCS = const_c__PCUIF__Flags__noMCS;
INTEGER_template template_ts__PCUIF__InfoTrxTsH0_tsc_defval;
const INTEGER_template& ts__PCUIF__InfoTrxTsH0_tsc_defval = template_ts__PCUIF__InfoTrxTsH0_tsc_defval;
INTEGER_template template_tr__PCUIF__InfoTrxTsH0_tsc_defval;
const INTEGER_template& tr__PCUIF__InfoTrxTsH0_tsc_defval = template_tr__PCUIF__InfoTrxTsH0_tsc_defval;
INTEGER_template template_ts__PCUIF__InfoTrxTsH1_tsc_defval;
const INTEGER_template& ts__PCUIF__InfoTrxTsH1_tsc_defval = template_ts__PCUIF__InfoTrxTsH1_tsc_defval;
INTEGER_template template_ts__PCUIF__InfoTrxTsH1_hsn_defval;
const INTEGER_template& ts__PCUIF__InfoTrxTsH1_hsn_defval = template_ts__PCUIF__InfoTrxTsH1_hsn_defval;
INTEGER_template template_ts__PCUIF__InfoTrxTsH1_maio_defval;
const INTEGER_template& ts__PCUIF__InfoTrxTsH1_maio_defval = template_ts__PCUIF__InfoTrxTsH1_maio_defval;
BITSTRING_template template_ts__PCUIF__InfoTrxTsH1_ma_defval;
const BITSTRING_template& ts__PCUIF__InfoTrxTsH1_ma_defval = template_ts__PCUIF__InfoTrxTsH1_ma_defval;
INTEGER_template template_tr__PCUIF__InfoTrxTsH1_tsc_defval;
const INTEGER_template& tr__PCUIF__InfoTrxTsH1_tsc_defval = template_tr__PCUIF__InfoTrxTsH1_tsc_defval;
INTEGER_template template_tr__PCUIF__InfoTrxTsH1_hsn_defval;
const INTEGER_template& tr__PCUIF__InfoTrxTsH1_hsn_defval = template_tr__PCUIF__InfoTrxTsH1_hsn_defval;
INTEGER_template template_tr__PCUIF__InfoTrxTsH1_maio_defval;
const INTEGER_template& tr__PCUIF__InfoTrxTsH1_maio_defval = template_tr__PCUIF__InfoTrxTsH1_maio_defval;
BITSTRING_template template_tr__PCUIF__InfoTrxTsH1_ma_defval;
const BITSTRING_template& tr__PCUIF__InfoTrxTsH1_ma_defval = template_tr__PCUIF__InfoTrxTsH1_ma_defval;
INTEGER_template template_tr__PCUIF__InfoTrxTsH1_ma__bit__len_defval;
const INTEGER_template& tr__PCUIF__InfoTrxTsH1_ma__bit__len_defval = template_tr__PCUIF__InfoTrxTsH1_ma__bit__len_defval;
INTEGER_template template_ts__PCUIF__InfoTrx_arfcn_defval;
const INTEGER_template& ts__PCUIF__InfoTrx_arfcn_defval = template_ts__PCUIF__InfoTrx_arfcn_defval;
BITSTRING_template template_ts__PCUIF__InfoTrx_pdch__mask_defval;
const BITSTRING_template& ts__PCUIF__InfoTrx_pdch__mask_defval = template_ts__PCUIF__InfoTrx_pdch__mask_defval;
INTEGER_template template_ts__PCUIF__InfoTrx_tsc_defval;
const INTEGER_template& ts__PCUIF__InfoTrx_tsc_defval = template_ts__PCUIF__InfoTrx_tsc_defval;
INTEGER_template template_tr__PCUIF__INFO__IND_bts__nr_defval;
const INTEGER_template& tr__PCUIF__INFO__IND_bts__nr_defval = template_tr__PCUIF__INFO__IND_bts__nr_defval;
PCUIF__Flags_template template_tr__PCUIF__INFO__IND_flags_defval;
const PCUIF__Flags_template& tr__PCUIF__INFO__IND_flags_defval = template_tr__PCUIF__INFO__IND_flags_defval;
INTEGER_template template_tr__PCUIF__INFO__IND_version_defval;
const INTEGER_template& tr__PCUIF__INFO__IND_version_defval = template_tr__PCUIF__INFO__IND_version_defval;
INTEGER_template template_tr__PCUIF__INTERF__IND_bts__nr_defval;
const INTEGER_template& tr__PCUIF__INTERF__IND_bts__nr_defval = template_tr__PCUIF__INTERF__IND_bts__nr_defval;
INTEGER_template template_tr__PCUIF__INTERF__IND_trx__nr_defval;
const INTEGER_template& tr__PCUIF__INTERF__IND_trx__nr_defval = template_tr__PCUIF__INTERF__IND_trx__nr_defval;
INTEGER_template template_tr__PCUIF__INTERF__IND_fn_defval;
const INTEGER_template& tr__PCUIF__INTERF__IND_fn_defval = template_tr__PCUIF__INTERF__IND_fn_defval;
PCUIF__interf_template template_tr__PCUIF__INTERF__IND_interf_defval;
const PCUIF__interf_template& tr__PCUIF__INTERF__IND_interf_defval = template_tr__PCUIF__INTERF__IND_interf_defval;
INTEGER_template template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__lac_defval;
const INTEGER_template& tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__lac_defval = template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__lac_defval;
INTEGER_template template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__ci_defval;
const INTEGER_template& tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__ci_defval = template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_local__ci_defval;
INTEGER_template template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__arfcn_defval;
const INTEGER_template& tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__arfcn_defval = template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__arfcn_defval;
INTEGER_template template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__bsic_defval;
const INTEGER_template& tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__bsic_defval = template_tr__PCUIF__CONT__NEIGH__ADDR__REQ_tgt__bsic_defval;
INTEGER_template template_tr__PCUIF__NEIGH__ADDR__REQ_local__lac_defval;
const INTEGER_template& tr__PCUIF__NEIGH__ADDR__REQ_local__lac_defval = template_tr__PCUIF__NEIGH__ADDR__REQ_local__lac_defval;
INTEGER_template template_tr__PCUIF__NEIGH__ADDR__REQ_local__ci_defval;
const INTEGER_template& tr__PCUIF__NEIGH__ADDR__REQ_local__ci_defval = template_tr__PCUIF__NEIGH__ADDR__REQ_local__ci_defval;
INTEGER_template template_tr__PCUIF__NEIGH__ADDR__REQ_tgt__arfcn_defval;
const INTEGER_template& tr__PCUIF__NEIGH__ADDR__REQ_tgt__arfcn_defval = template_tr__PCUIF__NEIGH__ADDR__REQ_tgt__arfcn_defval;
INTEGER_template template_tr__PCUIF__NEIGH__ADDR__REQ_tgt__bsic_defval;
const INTEGER_template& tr__PCUIF__NEIGH__ADDR__REQ_tgt__bsic_defval = template_tr__PCUIF__NEIGH__ADDR__REQ_tgt__bsic_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_error__code_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_error__code_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_error__code_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mcc_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_mcc_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mcc_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc__3__digits_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc__3__digits_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_mnc__3__digits_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_lac_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_lac_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_lac_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_rac_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_rac_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_rac_defval;
INTEGER_template template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_cell__identity_defval;
const INTEGER_template& ts__PCUIF__CONT__NEIGH__ADDR__CNF_cell__identity_defval = template_ts__PCUIF__CONT__NEIGH__ADDR__CNF_cell__identity_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_error__code_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_error__code_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_error__code_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_mcc_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_mcc_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_mcc_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_mnc_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_mnc_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_mnc_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_mnc__3__digits_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_mnc__3__digits_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_mnc__3__digits_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_lac_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_lac_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_lac_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_rac_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_rac_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_rac_defval;
INTEGER_template template_ts__PCUIF__NEIGH__ADDR__CNF_cell__identity_defval;
const INTEGER_template& ts__PCUIF__NEIGH__ADDR__CNF_cell__identity_defval = template_ts__PCUIF__NEIGH__ADDR__CNF_cell__identity_defval;
INTEGER_template template_f__PCUIF__PDCHMask__set_trx__nr_defval;
const INTEGER_template& f__PCUIF__PDCHMask__set_trx__nr_defval = template_f__PCUIF__PDCHMask__set_trx__nr_defval;
TTCN_Module module_object("PCUIF_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, set_module_param, NULL, log_module_param, NULL, NULL, NULL, NULL);

const RuntimeVersionChecker ver_checker(  current_runtime_version.requires_major_version_11,
  current_runtime_version.requires_minor_version_1,
  current_runtime_version.requires_patch_level_0,  current_runtime_version.requires_runtime_1);

/* Member functions of C++ classes */

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

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

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

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

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

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

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

boolean PCUIF__MsgType::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_MsgType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_MsgType comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__MsgType::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_MsgType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_MsgType comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__MsgType::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 @PCUIF_Types.PCUIF_MsgType.");
return enum_value < other_value;
}

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

boolean PCUIF__MsgType::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_MsgType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_MsgType comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__MsgType::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 @PCUIF_Types.PCUIF_MsgType.");
return enum_value > other_value;
}

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

const char *PCUIF__MsgType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case PCU__IF__MSG__DATA__REQ: return "PCU_IF_MSG_DATA_REQ";
case PCU__IF__MSG__DATA__IND: return "PCU_IF_MSG_DATA_IND";
case PCU__IF__MSG__SUSP__REQ: return "PCU_IF_MSG_SUSP_REQ";
case PCU__IF__MSG__APP__INFO__REQ: return "PCU_IF_MSG_APP_INFO_REQ";
case PCU__IF__MSG__RTS__REQ: return "PCU_IF_MSG_RTS_REQ";
case PCU__IF__MSG__DATA__CNF__2: return "PCU_IF_MSG_DATA_CNF_2";
case PCU__IF__MSG__RACH__IND: return "PCU_IF_MSG_RACH_IND";
case PCU__IF__MSG__INFO__IND: return "PCU_IF_MSG_INFO_IND";
case PCU__IF__MSG__E1__CCU__IND: return "PCU_IF_MSG_E1_CCU_IND";
case PCU__IF__MSG__ACT__REQ: return "PCU_IF_MSG_ACT_REQ";
case PCU__IF__MSG__TIME__IND: return "PCU_IF_MSG_TIME_IND";
case PCU__IF__MSG__INTERF__IND: return "PCU_IF_MSG_INTERF_IND";
case PCU__IF__MSG__PAG__REQ: return "PCU_IF_MSG_PAG_REQ";
case PCU__IF__MSG__TXT__IND: return "PCU_IF_MSG_TXT_IND";
case PCU__IF__MSG__CONTAINER: return "PCU_IF_MSG_CONTAINER";
case PCU__IF__MSG__NEIGH__ADDR__REQ: return "PCU_IF_MSG_NEIGH_ADDR_REQ";
case PCU__IF__MSG__NEIGH__ADDR__CNF: return "PCU_IF_MSG_NEIGH_ADDR_CNF";
default:
return "<unknown>";
}
}

PCUIF__MsgType::enum_type PCUIF__MsgType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "PCU_IF_MSG_DATA_REQ")) return PCU__IF__MSG__DATA__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_DATA_IND")) return PCU__IF__MSG__DATA__IND;
if (!strcmp(str_par, "PCU_IF_MSG_SUSP_REQ")) return PCU__IF__MSG__SUSP__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_APP_INFO_REQ")) return PCU__IF__MSG__APP__INFO__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_RTS_REQ")) return PCU__IF__MSG__RTS__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_DATA_CNF_2")) return PCU__IF__MSG__DATA__CNF__2;
if (!strcmp(str_par, "PCU_IF_MSG_RACH_IND")) return PCU__IF__MSG__RACH__IND;
if (!strcmp(str_par, "PCU_IF_MSG_INFO_IND")) return PCU__IF__MSG__INFO__IND;
if (!strcmp(str_par, "PCU_IF_MSG_E1_CCU_IND")) return PCU__IF__MSG__E1__CCU__IND;
if (!strcmp(str_par, "PCU_IF_MSG_ACT_REQ")) return PCU__IF__MSG__ACT__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_TIME_IND")) return PCU__IF__MSG__TIME__IND;
if (!strcmp(str_par, "PCU_IF_MSG_INTERF_IND")) return PCU__IF__MSG__INTERF__IND;
if (!strcmp(str_par, "PCU_IF_MSG_PAG_REQ")) return PCU__IF__MSG__PAG__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_TXT_IND")) return PCU__IF__MSG__TXT__IND;
if (!strcmp(str_par, "PCU_IF_MSG_CONTAINER")) return PCU__IF__MSG__CONTAINER;
if (!strcmp(str_par, "PCU_IF_MSG_NEIGH_ADDR_REQ")) return PCU__IF__MSG__NEIGH__ADDR__REQ;
if (!strcmp(str_par, "PCU_IF_MSG_NEIGH_ADDR_CNF")) return PCU__IF__MSG__NEIGH__ADDR__CNF;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__MsgType::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 2:
case 3:
case 4:
case 16:
case 17:
case 34:
case 50:
case 51:
case 64:
case 82:
case 83:
case 96:
case 112:
case 128:
case 129:
case 130:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__MsgType::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 @PCUIF_Types.PCUIF_MsgType.", enum_value);
}

void PCUIF__MsgType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__MsgType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__MsgType::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, 8, 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 PCUIF__MsgType::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 8);
}

void PCUIF__MsgType_template::copy_template(const PCUIF__MsgType_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 PCUIF__MsgType_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 PCUIF__MsgType_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__MsgType_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 @PCUIF_Types.PCUIF_MsgType.");
}
}

PCUIF__MsgType_template::PCUIF__MsgType_template()
{
}

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

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

PCUIF__MsgType_template::PCUIF__MsgType_template(PCUIF__MsgType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__MsgType_template::match(PCUIF__MsgType::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 @PCUIF_Types.PCUIF_MsgType.");
}
return FALSE;
}

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

PCUIF__MsgType::enum_type PCUIF__MsgType_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 @PCUIF_Types.PCUIF_MsgType.");
return single_value;
}

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

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

void PCUIF__MsgType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__MsgType::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 PCUIF__MsgType_template::log_match(const PCUIF__MsgType& 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 PCUIF__MsgType_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 @PCUIF_Types.PCUIF_MsgType.");
}
}

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

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

boolean PCUIF__MsgType_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 PCUIF__MsgType_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: {
    PCUIF__MsgType_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: {
    PCUIF__MsgType::enum_type enum_val = PCUIF__MsgType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__MsgType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_MsgType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__MsgType_template* precondition = new PCUIF__MsgType_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__MsgType_template* implied_template = new PCUIF__MsgType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__MsgType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_MsgType");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__MsgType_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 : "@PCUIF_Types.PCUIF_MsgType");
}

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

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

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

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

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

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

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

boolean PCUIF__Sapi::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_Sapi.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_Sapi comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__Sapi::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_Sapi.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_Sapi comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__Sapi::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 @PCUIF_Types.PCUIF_Sapi.");
return enum_value < other_value;
}

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

boolean PCUIF__Sapi::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_Sapi.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_Sapi comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__Sapi::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 @PCUIF_Types.PCUIF_Sapi.");
return enum_value > other_value;
}

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

const char *PCUIF__Sapi::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case PCU__IF__SAPI__UNKNOWN: return "PCU_IF_SAPI_UNKNOWN";
case PCU__IF__SAPI__RACH: return "PCU_IF_SAPI_RACH";
case PCU__IF__SAPI__BCCH: return "PCU_IF_SAPI_BCCH";
case PCU__IF__SAPI__PDTCH: return "PCU_IF_SAPI_PDTCH";
case PCU__IF__SAPI__PRACH: return "PCU_IF_SAPI_PRACH";
case PCU__IF__SAPI__PTCCH: return "PCU_IF_SAPI_PTCCH";
case PCU__IF__SAPI__PCH__2: return "PCU_IF_SAPI_PCH_2";
case PCU__IF__SAPI__AGCH__2: return "PCU_IF_SAPI_AGCH_2";
default:
return "<unknown>";
}
}

PCUIF__Sapi::enum_type PCUIF__Sapi::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "PCU_IF_SAPI_UNKNOWN")) return PCU__IF__SAPI__UNKNOWN;
if (!strcmp(str_par, "PCU_IF_SAPI_RACH")) return PCU__IF__SAPI__RACH;
if (!strcmp(str_par, "PCU_IF_SAPI_BCCH")) return PCU__IF__SAPI__BCCH;
if (!strcmp(str_par, "PCU_IF_SAPI_PDTCH")) return PCU__IF__SAPI__PDTCH;
if (!strcmp(str_par, "PCU_IF_SAPI_PRACH")) return PCU__IF__SAPI__PRACH;
if (!strcmp(str_par, "PCU_IF_SAPI_PTCCH")) return PCU__IF__SAPI__PTCCH;
if (!strcmp(str_par, "PCU_IF_SAPI_PCH_2")) return PCU__IF__SAPI__PCH__2;
if (!strcmp(str_par, "PCU_IF_SAPI_AGCH_2")) return PCU__IF__SAPI__AGCH__2;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__Sapi::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__Sapi::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 @PCUIF_Types.PCUIF_Sapi.", enum_value);
}

void PCUIF__Sapi::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__Sapi::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__Sapi::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 PCUIF__Sapi::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 PCUIF__Sapi_template::copy_template(const PCUIF__Sapi_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 PCUIF__Sapi_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 PCUIF__Sapi_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__Sapi_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 @PCUIF_Types.PCUIF_Sapi.");
}
}

PCUIF__Sapi_template::PCUIF__Sapi_template()
{
}

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

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

PCUIF__Sapi_template::PCUIF__Sapi_template(PCUIF__Sapi::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__Sapi_template::match(PCUIF__Sapi::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 @PCUIF_Types.PCUIF_Sapi.");
}
return FALSE;
}

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

PCUIF__Sapi::enum_type PCUIF__Sapi_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 @PCUIF_Types.PCUIF_Sapi.");
return single_value;
}

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

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

void PCUIF__Sapi_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__Sapi::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 PCUIF__Sapi_template::log_match(const PCUIF__Sapi& 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 PCUIF__Sapi_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 @PCUIF_Types.PCUIF_Sapi.");
}
}

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

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

boolean PCUIF__Sapi_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 PCUIF__Sapi_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: {
    PCUIF__Sapi_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: {
    PCUIF__Sapi::enum_type enum_val = PCUIF__Sapi::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__Sapi::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_Sapi.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__Sapi_template* precondition = new PCUIF__Sapi_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__Sapi_template* implied_template = new PCUIF__Sapi_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__Sapi_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_Sapi");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__Sapi_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 : "@PCUIF_Types.PCUIF_Sapi");
}

PCUIF__Flags::PCUIF__Flags()
{
}

PCUIF__Flags::PCUIF__Flags(const BOOLEAN& par_bts__active,
    const BOOLEAN& par_direct__phy,
    const BITSTRING& par_spare,
    const BOOLEAN& par_cs1,
    const BOOLEAN& par_cs2,
    const BOOLEAN& par_cs3,
    const BOOLEAN& par_cs4,
    const BOOLEAN& par_mcs1,
    const BOOLEAN& par_mcs2,
    const BOOLEAN& par_mcs3,
    const BOOLEAN& par_mcs4,
    const BOOLEAN& par_mcs5,
    const BOOLEAN& par_mcs6,
    const BOOLEAN& par_mcs7,
    const BOOLEAN& par_mcs8,
    const BOOLEAN& par_mcs9,
    const BITSTRING& par_spare2)
  :   field_bts__active(par_bts__active),
  field_direct__phy(par_direct__phy),
  field_spare(par_spare),
  field_cs1(par_cs1),
  field_cs2(par_cs2),
  field_cs3(par_cs3),
  field_cs4(par_cs4),
  field_mcs1(par_mcs1),
  field_mcs2(par_mcs2),
  field_mcs3(par_mcs3),
  field_mcs4(par_mcs4),
  field_mcs5(par_mcs5),
  field_mcs6(par_mcs6),
  field_mcs7(par_mcs7),
  field_mcs8(par_mcs8),
  field_mcs9(par_mcs9),
  field_spare2(par_spare2)
{
}

PCUIF__Flags::PCUIF__Flags(const PCUIF__Flags& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_Flags.");
if (other_value.bts__active().is_bound()) field_bts__active = other_value.bts__active();
else field_bts__active.clean_up();
if (other_value.direct__phy().is_bound()) field_direct__phy = other_value.direct__phy();
else field_direct__phy.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.cs1().is_bound()) field_cs1 = other_value.cs1();
else field_cs1.clean_up();
if (other_value.cs2().is_bound()) field_cs2 = other_value.cs2();
else field_cs2.clean_up();
if (other_value.cs3().is_bound()) field_cs3 = other_value.cs3();
else field_cs3.clean_up();
if (other_value.cs4().is_bound()) field_cs4 = other_value.cs4();
else field_cs4.clean_up();
if (other_value.mcs1().is_bound()) field_mcs1 = other_value.mcs1();
else field_mcs1.clean_up();
if (other_value.mcs2().is_bound()) field_mcs2 = other_value.mcs2();
else field_mcs2.clean_up();
if (other_value.mcs3().is_bound()) field_mcs3 = other_value.mcs3();
else field_mcs3.clean_up();
if (other_value.mcs4().is_bound()) field_mcs4 = other_value.mcs4();
else field_mcs4.clean_up();
if (other_value.mcs5().is_bound()) field_mcs5 = other_value.mcs5();
else field_mcs5.clean_up();
if (other_value.mcs6().is_bound()) field_mcs6 = other_value.mcs6();
else field_mcs6.clean_up();
if (other_value.mcs7().is_bound()) field_mcs7 = other_value.mcs7();
else field_mcs7.clean_up();
if (other_value.mcs8().is_bound()) field_mcs8 = other_value.mcs8();
else field_mcs8.clean_up();
if (other_value.mcs9().is_bound()) field_mcs9 = other_value.mcs9();
else field_mcs9.clean_up();
if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
else field_spare2.clean_up();
}

void PCUIF__Flags::clean_up()
{
field_bts__active.clean_up();
field_direct__phy.clean_up();
field_spare.clean_up();
field_cs1.clean_up();
field_cs2.clean_up();
field_cs3.clean_up();
field_cs4.clean_up();
field_mcs1.clean_up();
field_mcs2.clean_up();
field_mcs3.clean_up();
field_mcs4.clean_up();
field_mcs5.clean_up();
field_mcs6.clean_up();
field_mcs7.clean_up();
field_mcs8.clean_up();
field_mcs9.clean_up();
field_spare2.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__Flags::get_descriptor() const { return &PCUIF__Flags_descr_; }
PCUIF__Flags& PCUIF__Flags::operator=(const PCUIF__Flags& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_Flags.");
  if (other_value.bts__active().is_bound()) field_bts__active = other_value.bts__active();
  else field_bts__active.clean_up();
  if (other_value.direct__phy().is_bound()) field_direct__phy = other_value.direct__phy();
  else field_direct__phy.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.cs1().is_bound()) field_cs1 = other_value.cs1();
  else field_cs1.clean_up();
  if (other_value.cs2().is_bound()) field_cs2 = other_value.cs2();
  else field_cs2.clean_up();
  if (other_value.cs3().is_bound()) field_cs3 = other_value.cs3();
  else field_cs3.clean_up();
  if (other_value.cs4().is_bound()) field_cs4 = other_value.cs4();
  else field_cs4.clean_up();
  if (other_value.mcs1().is_bound()) field_mcs1 = other_value.mcs1();
  else field_mcs1.clean_up();
  if (other_value.mcs2().is_bound()) field_mcs2 = other_value.mcs2();
  else field_mcs2.clean_up();
  if (other_value.mcs3().is_bound()) field_mcs3 = other_value.mcs3();
  else field_mcs3.clean_up();
  if (other_value.mcs4().is_bound()) field_mcs4 = other_value.mcs4();
  else field_mcs4.clean_up();
  if (other_value.mcs5().is_bound()) field_mcs5 = other_value.mcs5();
  else field_mcs5.clean_up();
  if (other_value.mcs6().is_bound()) field_mcs6 = other_value.mcs6();
  else field_mcs6.clean_up();
  if (other_value.mcs7().is_bound()) field_mcs7 = other_value.mcs7();
  else field_mcs7.clean_up();
  if (other_value.mcs8().is_bound()) field_mcs8 = other_value.mcs8();
  else field_mcs8.clean_up();
  if (other_value.mcs9().is_bound()) field_mcs9 = other_value.mcs9();
  else field_mcs9.clean_up();
  if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
  else field_spare2.clean_up();
}
return *this;
}

boolean PCUIF__Flags::operator==(const PCUIF__Flags& other_value) const
{
return field_bts__active==other_value.field_bts__active
  && field_direct__phy==other_value.field_direct__phy
  && field_spare==other_value.field_spare
  && field_cs1==other_value.field_cs1
  && field_cs2==other_value.field_cs2
  && field_cs3==other_value.field_cs3
  && field_cs4==other_value.field_cs4
  && field_mcs1==other_value.field_mcs1
  && field_mcs2==other_value.field_mcs2
  && field_mcs3==other_value.field_mcs3
  && field_mcs4==other_value.field_mcs4
  && field_mcs5==other_value.field_mcs5
  && field_mcs6==other_value.field_mcs6
  && field_mcs7==other_value.field_mcs7
  && field_mcs8==other_value.field_mcs8
  && field_mcs9==other_value.field_mcs9
  && field_spare2==other_value.field_spare2;
}

boolean PCUIF__Flags::is_bound() const
{
return (field_bts__active.is_bound())
  || (field_direct__phy.is_bound())
  || (field_spare.is_bound())
  || (field_cs1.is_bound())
  || (field_cs2.is_bound())
  || (field_cs3.is_bound())
  || (field_cs4.is_bound())
  || (field_mcs1.is_bound())
  || (field_mcs2.is_bound())
  || (field_mcs3.is_bound())
  || (field_mcs4.is_bound())
  || (field_mcs5.is_bound())
  || (field_mcs6.is_bound())
  || (field_mcs7.is_bound())
  || (field_mcs8.is_bound())
  || (field_mcs9.is_bound())
  || (field_spare2.is_bound());
}
boolean PCUIF__Flags::is_value() const
{
return field_bts__active.is_value()
  && field_direct__phy.is_value()
  && field_spare.is_value()
  && field_cs1.is_value()
  && field_cs2.is_value()
  && field_cs3.is_value()
  && field_cs4.is_value()
  && field_mcs1.is_value()
  && field_mcs2.is_value()
  && field_mcs3.is_value()
  && field_mcs4.is_value()
  && field_mcs5.is_value()
  && field_mcs6.is_value()
  && field_mcs7.is_value()
  && field_mcs8.is_value()
  && field_mcs9.is_value()
  && field_spare2.is_value();
}
void PCUIF__Flags::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ bts_active := ");
field_bts__active.log();
TTCN_Logger::log_event_str(", direct_phy := ");
field_direct__phy.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", cs1 := ");
field_cs1.log();
TTCN_Logger::log_event_str(", cs2 := ");
field_cs2.log();
TTCN_Logger::log_event_str(", cs3 := ");
field_cs3.log();
TTCN_Logger::log_event_str(", cs4 := ");
field_cs4.log();
TTCN_Logger::log_event_str(", mcs1 := ");
field_mcs1.log();
TTCN_Logger::log_event_str(", mcs2 := ");
field_mcs2.log();
TTCN_Logger::log_event_str(", mcs3 := ");
field_mcs3.log();
TTCN_Logger::log_event_str(", mcs4 := ");
field_mcs4.log();
TTCN_Logger::log_event_str(", mcs5 := ");
field_mcs5.log();
TTCN_Logger::log_event_str(", mcs6 := ");
field_mcs6.log();
TTCN_Logger::log_event_str(", mcs7 := ");
field_mcs7.log();
TTCN_Logger::log_event_str(", mcs8 := ");
field_mcs8.log();
TTCN_Logger::log_event_str(", mcs9 := ");
field_mcs9.log();
TTCN_Logger::log_event_str(", spare2 := ");
field_spare2.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__Flags::set_implicit_omit()
{
if (bts__active().is_bound()) bts__active().set_implicit_omit();
if (direct__phy().is_bound()) direct__phy().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (cs1().is_bound()) cs1().set_implicit_omit();
if (cs2().is_bound()) cs2().set_implicit_omit();
if (cs3().is_bound()) cs3().set_implicit_omit();
if (cs4().is_bound()) cs4().set_implicit_omit();
if (mcs1().is_bound()) mcs1().set_implicit_omit();
if (mcs2().is_bound()) mcs2().set_implicit_omit();
if (mcs3().is_bound()) mcs3().set_implicit_omit();
if (mcs4().is_bound()) mcs4().set_implicit_omit();
if (mcs5().is_bound()) mcs5().set_implicit_omit();
if (mcs6().is_bound()) mcs6().set_implicit_omit();
if (mcs7().is_bound()) mcs7().set_implicit_omit();
if (mcs8().is_bound()) mcs8().set_implicit_omit();
if (mcs9().is_bound()) mcs9().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void PCUIF__Flags::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (17<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_Flags has 17 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) bts__active().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) direct__phy().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) cs1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) cs2().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) cs3().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) cs4().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) mcs1().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) mcs2().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) mcs3().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) mcs4().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) mcs5().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) mcs6().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) mcs7().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) mcs8().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) mcs9().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) spare2().set_param(*param.get_elem(16));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_active")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__active().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "direct_phy")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          direct__phy().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs7().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs8")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs8().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs9")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs9().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_Flags: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_Flags");
  }
}

void PCUIF__Flags::encode_text(Text_Buf& text_buf) const
{
field_bts__active.encode_text(text_buf);
field_direct__phy.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_cs1.encode_text(text_buf);
field_cs2.encode_text(text_buf);
field_cs3.encode_text(text_buf);
field_cs4.encode_text(text_buf);
field_mcs1.encode_text(text_buf);
field_mcs2.encode_text(text_buf);
field_mcs3.encode_text(text_buf);
field_mcs4.encode_text(text_buf);
field_mcs5.encode_text(text_buf);
field_mcs6.encode_text(text_buf);
field_mcs7.encode_text(text_buf);
field_mcs8.encode_text(text_buf);
field_mcs9.encode_text(text_buf);
field_spare2.encode_text(text_buf);
}

void PCUIF__Flags::decode_text(Text_Buf& text_buf)
{
field_bts__active.decode_text(text_buf);
field_direct__phy.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_cs1.decode_text(text_buf);
field_cs2.decode_text(text_buf);
field_cs3.decode_text(text_buf);
field_cs4.decode_text(text_buf);
field_mcs1.decode_text(text_buf);
field_mcs2.decode_text(text_buf);
field_mcs3.decode_text(text_buf);
field_mcs4.decode_text(text_buf);
field_mcs5.decode_text(text_buf);
field_mcs6.decode_text(text_buf);
field_mcs7.decode_text(text_buf);
field_mcs8.decode_text(text_buf);
field_mcs9.decode_text(text_buf);
field_spare2.decode_text(text_buf);
}

void PCUIF__Flags::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__Flags::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__Flags::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__Flags_bts__active_descr_.raw->forceomit);
  decoded_field_length = field_bts__active.RAW_decode(PCUIF__Flags_bts__active_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__Flags_direct__phy_descr_.raw->forceomit);
  decoded_field_length = field_direct__phy.RAW_decode(PCUIF__Flags_direct__phy_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__Flags_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__Flags_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__Flags_cs1_descr_.raw->forceomit);
  decoded_field_length = field_cs1.RAW_decode(PCUIF__Flags_cs1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__Flags_cs2_descr_.raw->forceomit);
  decoded_field_length = field_cs2.RAW_decode(PCUIF__Flags_cs2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__Flags_cs3_descr_.raw->forceomit);
  decoded_field_length = field_cs3.RAW_decode(PCUIF__Flags_cs3_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__Flags_cs4_descr_.raw->forceomit);
  decoded_field_length = field_cs4.RAW_decode(PCUIF__Flags_cs4_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PCUIF__Flags_mcs1_descr_.raw->forceomit);
  decoded_field_length = field_mcs1.RAW_decode(PCUIF__Flags_mcs1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_8_force_omit(8, force_omit, PCUIF__Flags_mcs2_descr_.raw->forceomit);
  decoded_field_length = field_mcs2.RAW_decode(PCUIF__Flags_mcs2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_9_force_omit(9, force_omit, PCUIF__Flags_mcs3_descr_.raw->forceomit);
  decoded_field_length = field_mcs3.RAW_decode(PCUIF__Flags_mcs3_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_10_force_omit(10, force_omit, PCUIF__Flags_mcs4_descr_.raw->forceomit);
  decoded_field_length = field_mcs4.RAW_decode(PCUIF__Flags_mcs4_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_11_force_omit(11, force_omit, PCUIF__Flags_mcs5_descr_.raw->forceomit);
  decoded_field_length = field_mcs5.RAW_decode(PCUIF__Flags_mcs5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_12_force_omit(12, force_omit, PCUIF__Flags_mcs6_descr_.raw->forceomit);
  decoded_field_length = field_mcs6.RAW_decode(PCUIF__Flags_mcs6_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_12_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_13_force_omit(13, force_omit, PCUIF__Flags_mcs7_descr_.raw->forceomit);
  decoded_field_length = field_mcs7.RAW_decode(PCUIF__Flags_mcs7_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_13_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_14_force_omit(14, force_omit, PCUIF__Flags_mcs8_descr_.raw->forceomit);
  decoded_field_length = field_mcs8.RAW_decode(PCUIF__Flags_mcs8_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_14_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_15_force_omit(15, force_omit, PCUIF__Flags_mcs9_descr_.raw->forceomit);
  decoded_field_length = field_mcs9.RAW_decode(PCUIF__Flags_mcs9_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_15_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_16_force_omit(16, force_omit, PCUIF__Flags_spare2_descr_.raw->forceomit);
  decoded_field_length = field_spare2.RAW_decode(PCUIF__Flags_spare2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_16_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__Flags::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 17;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(17);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__Flags_bts__active_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__Flags_direct__phy_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__Flags_spare_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__Flags_cs1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__Flags_cs2_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__Flags_cs3_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__Flags_cs4_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PCUIF__Flags_mcs1_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PCUIF__Flags_mcs2_descr_.raw);
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, PCUIF__Flags_mcs3_descr_.raw);
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, PCUIF__Flags_mcs4_descr_.raw);
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, PCUIF__Flags_mcs5_descr_.raw);
  myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 12, PCUIF__Flags_mcs6_descr_.raw);
  myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 13, PCUIF__Flags_mcs7_descr_.raw);
  myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 14, PCUIF__Flags_mcs8_descr_.raw);
  myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 15, PCUIF__Flags_mcs9_descr_.raw);
  myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 16, PCUIF__Flags_spare2_descr_.raw);
  encoded_length += field_bts__active.RAW_encode(PCUIF__Flags_bts__active_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_direct__phy.RAW_encode(PCUIF__Flags_direct__phy_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare.RAW_encode(PCUIF__Flags_spare_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_cs1.RAW_encode(PCUIF__Flags_cs1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_cs2.RAW_encode(PCUIF__Flags_cs2_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_cs3.RAW_encode(PCUIF__Flags_cs3_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_cs4.RAW_encode(PCUIF__Flags_cs4_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_mcs1.RAW_encode(PCUIF__Flags_mcs1_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_mcs2.RAW_encode(PCUIF__Flags_mcs2_descr_, *myleaf.body.node.nodes[8]);
  encoded_length += field_mcs3.RAW_encode(PCUIF__Flags_mcs3_descr_, *myleaf.body.node.nodes[9]);
  encoded_length += field_mcs4.RAW_encode(PCUIF__Flags_mcs4_descr_, *myleaf.body.node.nodes[10]);
  encoded_length += field_mcs5.RAW_encode(PCUIF__Flags_mcs5_descr_, *myleaf.body.node.nodes[11]);
  encoded_length += field_mcs6.RAW_encode(PCUIF__Flags_mcs6_descr_, *myleaf.body.node.nodes[12]);
  encoded_length += field_mcs7.RAW_encode(PCUIF__Flags_mcs7_descr_, *myleaf.body.node.nodes[13]);
  encoded_length += field_mcs8.RAW_encode(PCUIF__Flags_mcs8_descr_, *myleaf.body.node.nodes[14]);
  encoded_length += field_mcs9.RAW_encode(PCUIF__Flags_mcs9_descr_, *myleaf.body.node.nodes[15]);
  encoded_length += field_spare2.RAW_encode(PCUIF__Flags_spare2_descr_, *myleaf.body.node.nodes[16]);
  return myleaf.length = encoded_length;
}

struct PCUIF__Flags_template::single_value_struct {
BOOLEAN_template field_bts__active;
BOOLEAN_template field_direct__phy;
BITSTRING_template field_spare;
BOOLEAN_template field_cs1;
BOOLEAN_template field_cs2;
BOOLEAN_template field_cs3;
BOOLEAN_template field_cs4;
BOOLEAN_template field_mcs1;
BOOLEAN_template field_mcs2;
BOOLEAN_template field_mcs3;
BOOLEAN_template field_mcs4;
BOOLEAN_template field_mcs5;
BOOLEAN_template field_mcs6;
BOOLEAN_template field_mcs7;
BOOLEAN_template field_mcs8;
BOOLEAN_template field_mcs9;
BITSTRING_template field_spare2;
};

void PCUIF__Flags_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_bts__active = ANY_VALUE;
single_value->field_direct__phy = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_cs1 = ANY_VALUE;
single_value->field_cs2 = ANY_VALUE;
single_value->field_cs3 = ANY_VALUE;
single_value->field_cs4 = ANY_VALUE;
single_value->field_mcs1 = ANY_VALUE;
single_value->field_mcs2 = ANY_VALUE;
single_value->field_mcs3 = ANY_VALUE;
single_value->field_mcs4 = ANY_VALUE;
single_value->field_mcs5 = ANY_VALUE;
single_value->field_mcs6 = ANY_VALUE;
single_value->field_mcs7 = ANY_VALUE;
single_value->field_mcs8 = ANY_VALUE;
single_value->field_mcs9 = ANY_VALUE;
single_value->field_spare2 = ANY_VALUE;
}
}
}

void PCUIF__Flags_template::copy_value(const PCUIF__Flags& other_value)
{
single_value = new single_value_struct;
if (other_value.bts__active().is_bound()) {
  single_value->field_bts__active = other_value.bts__active();
} else {
  single_value->field_bts__active.clean_up();
}
if (other_value.direct__phy().is_bound()) {
  single_value->field_direct__phy = other_value.direct__phy();
} else {
  single_value->field_direct__phy.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.cs1().is_bound()) {
  single_value->field_cs1 = other_value.cs1();
} else {
  single_value->field_cs1.clean_up();
}
if (other_value.cs2().is_bound()) {
  single_value->field_cs2 = other_value.cs2();
} else {
  single_value->field_cs2.clean_up();
}
if (other_value.cs3().is_bound()) {
  single_value->field_cs3 = other_value.cs3();
} else {
  single_value->field_cs3.clean_up();
}
if (other_value.cs4().is_bound()) {
  single_value->field_cs4 = other_value.cs4();
} else {
  single_value->field_cs4.clean_up();
}
if (other_value.mcs1().is_bound()) {
  single_value->field_mcs1 = other_value.mcs1();
} else {
  single_value->field_mcs1.clean_up();
}
if (other_value.mcs2().is_bound()) {
  single_value->field_mcs2 = other_value.mcs2();
} else {
  single_value->field_mcs2.clean_up();
}
if (other_value.mcs3().is_bound()) {
  single_value->field_mcs3 = other_value.mcs3();
} else {
  single_value->field_mcs3.clean_up();
}
if (other_value.mcs4().is_bound()) {
  single_value->field_mcs4 = other_value.mcs4();
} else {
  single_value->field_mcs4.clean_up();
}
if (other_value.mcs5().is_bound()) {
  single_value->field_mcs5 = other_value.mcs5();
} else {
  single_value->field_mcs5.clean_up();
}
if (other_value.mcs6().is_bound()) {
  single_value->field_mcs6 = other_value.mcs6();
} else {
  single_value->field_mcs6.clean_up();
}
if (other_value.mcs7().is_bound()) {
  single_value->field_mcs7 = other_value.mcs7();
} else {
  single_value->field_mcs7.clean_up();
}
if (other_value.mcs8().is_bound()) {
  single_value->field_mcs8 = other_value.mcs8();
} else {
  single_value->field_mcs8.clean_up();
}
if (other_value.mcs9().is_bound()) {
  single_value->field_mcs9 = other_value.mcs9();
} else {
  single_value->field_mcs9.clean_up();
}
if (other_value.spare2().is_bound()) {
  single_value->field_spare2 = other_value.spare2();
} else {
  single_value->field_spare2.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__Flags_template::copy_template(const PCUIF__Flags_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.bts__active().get_selection()) {
single_value->field_bts__active = other_value.bts__active();
} else {
single_value->field_bts__active.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.direct__phy().get_selection()) {
single_value->field_direct__phy = other_value.direct__phy();
} else {
single_value->field_direct__phy.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cs1().get_selection()) {
single_value->field_cs1 = other_value.cs1();
} else {
single_value->field_cs1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cs2().get_selection()) {
single_value->field_cs2 = other_value.cs2();
} else {
single_value->field_cs2.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cs3().get_selection()) {
single_value->field_cs3 = other_value.cs3();
} else {
single_value->field_cs3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cs4().get_selection()) {
single_value->field_cs4 = other_value.cs4();
} else {
single_value->field_cs4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs1().get_selection()) {
single_value->field_mcs1 = other_value.mcs1();
} else {
single_value->field_mcs1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs2().get_selection()) {
single_value->field_mcs2 = other_value.mcs2();
} else {
single_value->field_mcs2.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs3().get_selection()) {
single_value->field_mcs3 = other_value.mcs3();
} else {
single_value->field_mcs3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs4().get_selection()) {
single_value->field_mcs4 = other_value.mcs4();
} else {
single_value->field_mcs4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs5().get_selection()) {
single_value->field_mcs5 = other_value.mcs5();
} else {
single_value->field_mcs5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs6().get_selection()) {
single_value->field_mcs6 = other_value.mcs6();
} else {
single_value->field_mcs6.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs7().get_selection()) {
single_value->field_mcs7 = other_value.mcs7();
} else {
single_value->field_mcs7.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs8().get_selection()) {
single_value->field_mcs8 = other_value.mcs8();
} else {
single_value->field_mcs8.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcs9().get_selection()) {
single_value->field_mcs9 = other_value.mcs9();
} else {
single_value->field_mcs9.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare2().get_selection()) {
single_value->field_spare2 = other_value.spare2();
} else {
single_value->field_spare2.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__Flags_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 PCUIF__Flags_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__Flags_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 @PCUIF_Types.PCUIF_Flags.");
break;
}
set_selection(other_value);
}

PCUIF__Flags_template::PCUIF__Flags_template()
{
}

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

PCUIF__Flags_template::PCUIF__Flags_template(const PCUIF__Flags& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__Flags_template& PCUIF__Flags_template::operator=(const OPTIONAL<PCUIF__Flags>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__Flags&)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 @PCUIF_Types.PCUIF_Flags.");
}
return *this;
}

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

boolean PCUIF__Flags_template::match(const PCUIF__Flags& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.bts__active().is_bound()) return FALSE;
if(!single_value->field_bts__active.match(other_value.bts__active(), legacy))return FALSE;
if(!other_value.direct__phy().is_bound()) return FALSE;
if(!single_value->field_direct__phy.match(other_value.direct__phy(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.cs1().is_bound()) return FALSE;
if(!single_value->field_cs1.match(other_value.cs1(), legacy))return FALSE;
if(!other_value.cs2().is_bound()) return FALSE;
if(!single_value->field_cs2.match(other_value.cs2(), legacy))return FALSE;
if(!other_value.cs3().is_bound()) return FALSE;
if(!single_value->field_cs3.match(other_value.cs3(), legacy))return FALSE;
if(!other_value.cs4().is_bound()) return FALSE;
if(!single_value->field_cs4.match(other_value.cs4(), legacy))return FALSE;
if(!other_value.mcs1().is_bound()) return FALSE;
if(!single_value->field_mcs1.match(other_value.mcs1(), legacy))return FALSE;
if(!other_value.mcs2().is_bound()) return FALSE;
if(!single_value->field_mcs2.match(other_value.mcs2(), legacy))return FALSE;
if(!other_value.mcs3().is_bound()) return FALSE;
if(!single_value->field_mcs3.match(other_value.mcs3(), legacy))return FALSE;
if(!other_value.mcs4().is_bound()) return FALSE;
if(!single_value->field_mcs4.match(other_value.mcs4(), legacy))return FALSE;
if(!other_value.mcs5().is_bound()) return FALSE;
if(!single_value->field_mcs5.match(other_value.mcs5(), legacy))return FALSE;
if(!other_value.mcs6().is_bound()) return FALSE;
if(!single_value->field_mcs6.match(other_value.mcs6(), legacy))return FALSE;
if(!other_value.mcs7().is_bound()) return FALSE;
if(!single_value->field_mcs7.match(other_value.mcs7(), legacy))return FALSE;
if(!other_value.mcs8().is_bound()) return FALSE;
if(!single_value->field_mcs8.match(other_value.mcs8(), legacy))return FALSE;
if(!other_value.mcs9().is_bound()) return FALSE;
if(!single_value->field_mcs9.match(other_value.mcs9(), legacy))return FALSE;
if(!other_value.spare2().is_bound()) return FALSE;
if(!single_value->field_spare2.match(other_value.spare2(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_Flags.");
}
return FALSE;
}

boolean PCUIF__Flags_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_bts__active.is_bound()
 || single_value->field_direct__phy.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_cs1.is_bound()
 || single_value->field_cs2.is_bound()
 || single_value->field_cs3.is_bound()
 || single_value->field_cs4.is_bound()
 || single_value->field_mcs1.is_bound()
 || single_value->field_mcs2.is_bound()
 || single_value->field_mcs3.is_bound()
 || single_value->field_mcs4.is_bound()
 || single_value->field_mcs5.is_bound()
 || single_value->field_mcs6.is_bound()
 || single_value->field_mcs7.is_bound()
 || single_value->field_mcs8.is_bound()
 || single_value->field_mcs9.is_bound()
 || single_value->field_spare2.is_bound();
}

boolean PCUIF__Flags_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_bts__active.is_value()
 && single_value->field_direct__phy.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_cs1.is_value()
 && single_value->field_cs2.is_value()
 && single_value->field_cs3.is_value()
 && single_value->field_cs4.is_value()
 && single_value->field_mcs1.is_value()
 && single_value->field_mcs2.is_value()
 && single_value->field_mcs3.is_value()
 && single_value->field_mcs4.is_value()
 && single_value->field_mcs5.is_value()
 && single_value->field_mcs6.is_value()
 && single_value->field_mcs7.is_value()
 && single_value->field_mcs8.is_value()
 && single_value->field_mcs9.is_value()
 && single_value->field_spare2.is_value();
}

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

PCUIF__Flags PCUIF__Flags_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 @PCUIF_Types.PCUIF_Flags.");
PCUIF__Flags ret_val;
if (single_value->field_bts__active.is_bound()) {
ret_val.bts__active() = single_value->field_bts__active.valueof();
}
if (single_value->field_direct__phy.is_bound()) {
ret_val.direct__phy() = single_value->field_direct__phy.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_cs1.is_bound()) {
ret_val.cs1() = single_value->field_cs1.valueof();
}
if (single_value->field_cs2.is_bound()) {
ret_val.cs2() = single_value->field_cs2.valueof();
}
if (single_value->field_cs3.is_bound()) {
ret_val.cs3() = single_value->field_cs3.valueof();
}
if (single_value->field_cs4.is_bound()) {
ret_val.cs4() = single_value->field_cs4.valueof();
}
if (single_value->field_mcs1.is_bound()) {
ret_val.mcs1() = single_value->field_mcs1.valueof();
}
if (single_value->field_mcs2.is_bound()) {
ret_val.mcs2() = single_value->field_mcs2.valueof();
}
if (single_value->field_mcs3.is_bound()) {
ret_val.mcs3() = single_value->field_mcs3.valueof();
}
if (single_value->field_mcs4.is_bound()) {
ret_val.mcs4() = single_value->field_mcs4.valueof();
}
if (single_value->field_mcs5.is_bound()) {
ret_val.mcs5() = single_value->field_mcs5.valueof();
}
if (single_value->field_mcs6.is_bound()) {
ret_val.mcs6() = single_value->field_mcs6.valueof();
}
if (single_value->field_mcs7.is_bound()) {
ret_val.mcs7() = single_value->field_mcs7.valueof();
}
if (single_value->field_mcs8.is_bound()) {
ret_val.mcs8() = single_value->field_mcs8.valueof();
}
if (single_value->field_mcs9.is_bound()) {
ret_val.mcs9() = single_value->field_mcs9.valueof();
}
if (single_value->field_spare2.is_bound()) {
ret_val.spare2() = single_value->field_spare2.valueof();
}
return ret_val;
}

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

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

BOOLEAN_template& PCUIF__Flags_template::bts__active()
{
set_specific();
return single_value->field_bts__active;
}

const BOOLEAN_template& PCUIF__Flags_template::bts__active() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bts_active of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_bts__active;
}

BOOLEAN_template& PCUIF__Flags_template::direct__phy()
{
set_specific();
return single_value->field_direct__phy;
}

const BOOLEAN_template& PCUIF__Flags_template::direct__phy() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field direct_phy of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_direct__phy;
}

BITSTRING_template& PCUIF__Flags_template::spare()
{
set_specific();
return single_value->field_spare;
}

const BITSTRING_template& PCUIF__Flags_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_spare;
}

BOOLEAN_template& PCUIF__Flags_template::cs1()
{
set_specific();
return single_value->field_cs1;
}

const BOOLEAN_template& PCUIF__Flags_template::cs1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cs1 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_cs1;
}

BOOLEAN_template& PCUIF__Flags_template::cs2()
{
set_specific();
return single_value->field_cs2;
}

const BOOLEAN_template& PCUIF__Flags_template::cs2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cs2 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_cs2;
}

BOOLEAN_template& PCUIF__Flags_template::cs3()
{
set_specific();
return single_value->field_cs3;
}

const BOOLEAN_template& PCUIF__Flags_template::cs3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cs3 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_cs3;
}

BOOLEAN_template& PCUIF__Flags_template::cs4()
{
set_specific();
return single_value->field_cs4;
}

const BOOLEAN_template& PCUIF__Flags_template::cs4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cs4 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_cs4;
}

BOOLEAN_template& PCUIF__Flags_template::mcs1()
{
set_specific();
return single_value->field_mcs1;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs1 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs1;
}

BOOLEAN_template& PCUIF__Flags_template::mcs2()
{
set_specific();
return single_value->field_mcs2;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs2 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs2;
}

BOOLEAN_template& PCUIF__Flags_template::mcs3()
{
set_specific();
return single_value->field_mcs3;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs3 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs3;
}

BOOLEAN_template& PCUIF__Flags_template::mcs4()
{
set_specific();
return single_value->field_mcs4;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs4 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs4;
}

BOOLEAN_template& PCUIF__Flags_template::mcs5()
{
set_specific();
return single_value->field_mcs5;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs5 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs5;
}

BOOLEAN_template& PCUIF__Flags_template::mcs6()
{
set_specific();
return single_value->field_mcs6;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs6() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs6 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs6;
}

BOOLEAN_template& PCUIF__Flags_template::mcs7()
{
set_specific();
return single_value->field_mcs7;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs7() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs7 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs7;
}

BOOLEAN_template& PCUIF__Flags_template::mcs8()
{
set_specific();
return single_value->field_mcs8;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs8() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs8 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs8;
}

BOOLEAN_template& PCUIF__Flags_template::mcs9()
{
set_specific();
return single_value->field_mcs9;
}

const BOOLEAN_template& PCUIF__Flags_template::mcs9() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcs9 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_mcs9;
}

BITSTRING_template& PCUIF__Flags_template::spare2()
{
set_specific();
return single_value->field_spare2;
}

const BITSTRING_template& PCUIF__Flags_template::spare2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare2 of a non-specific template of type @PCUIF_Types.PCUIF_Flags.");
return single_value->field_spare2;
}

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

void PCUIF__Flags_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ bts_active := ");
single_value->field_bts__active.log();
TTCN_Logger::log_event_str(", direct_phy := ");
single_value->field_direct__phy.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", cs1 := ");
single_value->field_cs1.log();
TTCN_Logger::log_event_str(", cs2 := ");
single_value->field_cs2.log();
TTCN_Logger::log_event_str(", cs3 := ");
single_value->field_cs3.log();
TTCN_Logger::log_event_str(", cs4 := ");
single_value->field_cs4.log();
TTCN_Logger::log_event_str(", mcs1 := ");
single_value->field_mcs1.log();
TTCN_Logger::log_event_str(", mcs2 := ");
single_value->field_mcs2.log();
TTCN_Logger::log_event_str(", mcs3 := ");
single_value->field_mcs3.log();
TTCN_Logger::log_event_str(", mcs4 := ");
single_value->field_mcs4.log();
TTCN_Logger::log_event_str(", mcs5 := ");
single_value->field_mcs5.log();
TTCN_Logger::log_event_str(", mcs6 := ");
single_value->field_mcs6.log();
TTCN_Logger::log_event_str(", mcs7 := ");
single_value->field_mcs7.log();
TTCN_Logger::log_event_str(", mcs8 := ");
single_value->field_mcs8.log();
TTCN_Logger::log_event_str(", mcs9 := ");
single_value->field_mcs9.log();
TTCN_Logger::log_event_str(", spare2 := ");
single_value->field_spare2.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__Flags_template::log_match(const PCUIF__Flags& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_bts__active.match(match_value.bts__active(), legacy)){
TTCN_Logger::log_logmatch_info(".bts_active");
single_value->field_bts__active.log_match(match_value.bts__active(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_direct__phy.match(match_value.direct__phy(), legacy)){
TTCN_Logger::log_logmatch_info(".direct_phy");
single_value->field_direct__phy.log_match(match_value.direct__phy(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cs1.match(match_value.cs1(), legacy)){
TTCN_Logger::log_logmatch_info(".cs1");
single_value->field_cs1.log_match(match_value.cs1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cs2.match(match_value.cs2(), legacy)){
TTCN_Logger::log_logmatch_info(".cs2");
single_value->field_cs2.log_match(match_value.cs2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cs3.match(match_value.cs3(), legacy)){
TTCN_Logger::log_logmatch_info(".cs3");
single_value->field_cs3.log_match(match_value.cs3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cs4.match(match_value.cs4(), legacy)){
TTCN_Logger::log_logmatch_info(".cs4");
single_value->field_cs4.log_match(match_value.cs4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs1.match(match_value.mcs1(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs1");
single_value->field_mcs1.log_match(match_value.mcs1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs2.match(match_value.mcs2(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs2");
single_value->field_mcs2.log_match(match_value.mcs2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs3.match(match_value.mcs3(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs3");
single_value->field_mcs3.log_match(match_value.mcs3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs4.match(match_value.mcs4(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs4");
single_value->field_mcs4.log_match(match_value.mcs4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs5.match(match_value.mcs5(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs5");
single_value->field_mcs5.log_match(match_value.mcs5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs6.match(match_value.mcs6(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs6");
single_value->field_mcs6.log_match(match_value.mcs6(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs7.match(match_value.mcs7(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs7");
single_value->field_mcs7.log_match(match_value.mcs7(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs8.match(match_value.mcs8(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs8");
single_value->field_mcs8.log_match(match_value.mcs8(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcs9.match(match_value.mcs9(), legacy)){
TTCN_Logger::log_logmatch_info(".mcs9");
single_value->field_mcs9.log_match(match_value.mcs9(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare2.match(match_value.spare2(), legacy)){
TTCN_Logger::log_logmatch_info(".spare2");
single_value->field_spare2.log_match(match_value.spare2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ bts_active := ");
single_value->field_bts__active.log_match(match_value.bts__active(), legacy);
TTCN_Logger::log_event_str(", direct_phy := ");
single_value->field_direct__phy.log_match(match_value.direct__phy(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", cs1 := ");
single_value->field_cs1.log_match(match_value.cs1(), legacy);
TTCN_Logger::log_event_str(", cs2 := ");
single_value->field_cs2.log_match(match_value.cs2(), legacy);
TTCN_Logger::log_event_str(", cs3 := ");
single_value->field_cs3.log_match(match_value.cs3(), legacy);
TTCN_Logger::log_event_str(", cs4 := ");
single_value->field_cs4.log_match(match_value.cs4(), legacy);
TTCN_Logger::log_event_str(", mcs1 := ");
single_value->field_mcs1.log_match(match_value.mcs1(), legacy);
TTCN_Logger::log_event_str(", mcs2 := ");
single_value->field_mcs2.log_match(match_value.mcs2(), legacy);
TTCN_Logger::log_event_str(", mcs3 := ");
single_value->field_mcs3.log_match(match_value.mcs3(), legacy);
TTCN_Logger::log_event_str(", mcs4 := ");
single_value->field_mcs4.log_match(match_value.mcs4(), legacy);
TTCN_Logger::log_event_str(", mcs5 := ");
single_value->field_mcs5.log_match(match_value.mcs5(), legacy);
TTCN_Logger::log_event_str(", mcs6 := ");
single_value->field_mcs6.log_match(match_value.mcs6(), legacy);
TTCN_Logger::log_event_str(", mcs7 := ");
single_value->field_mcs7.log_match(match_value.mcs7(), legacy);
TTCN_Logger::log_event_str(", mcs8 := ");
single_value->field_mcs8.log_match(match_value.mcs8(), legacy);
TTCN_Logger::log_event_str(", mcs9 := ");
single_value->field_mcs9.log_match(match_value.mcs9(), legacy);
TTCN_Logger::log_event_str(", spare2 := ");
single_value->field_spare2.log_match(match_value.spare2(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__Flags_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (bts__active().is_bound()) bts__active().set_implicit_omit();
if (direct__phy().is_bound()) direct__phy().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (cs1().is_bound()) cs1().set_implicit_omit();
if (cs2().is_bound()) cs2().set_implicit_omit();
if (cs3().is_bound()) cs3().set_implicit_omit();
if (cs4().is_bound()) cs4().set_implicit_omit();
if (mcs1().is_bound()) mcs1().set_implicit_omit();
if (mcs2().is_bound()) mcs2().set_implicit_omit();
if (mcs3().is_bound()) mcs3().set_implicit_omit();
if (mcs4().is_bound()) mcs4().set_implicit_omit();
if (mcs5().is_bound()) mcs5().set_implicit_omit();
if (mcs6().is_bound()) mcs6().set_implicit_omit();
if (mcs7().is_bound()) mcs7().set_implicit_omit();
if (mcs8().is_bound()) mcs8().set_implicit_omit();
if (mcs9().is_bound()) mcs9().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void PCUIF__Flags_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_bts__active.encode_text(text_buf);
single_value->field_direct__phy.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_cs1.encode_text(text_buf);
single_value->field_cs2.encode_text(text_buf);
single_value->field_cs3.encode_text(text_buf);
single_value->field_cs4.encode_text(text_buf);
single_value->field_mcs1.encode_text(text_buf);
single_value->field_mcs2.encode_text(text_buf);
single_value->field_mcs3.encode_text(text_buf);
single_value->field_mcs4.encode_text(text_buf);
single_value->field_mcs5.encode_text(text_buf);
single_value->field_mcs6.encode_text(text_buf);
single_value->field_mcs7.encode_text(text_buf);
single_value->field_mcs8.encode_text(text_buf);
single_value->field_mcs9.encode_text(text_buf);
single_value->field_spare2.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 @PCUIF_Types.PCUIF_Flags.");
}
}

void PCUIF__Flags_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_bts__active.decode_text(text_buf);
single_value->field_direct__phy.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_cs1.decode_text(text_buf);
single_value->field_cs2.decode_text(text_buf);
single_value->field_cs3.decode_text(text_buf);
single_value->field_cs4.decode_text(text_buf);
single_value->field_mcs1.decode_text(text_buf);
single_value->field_mcs2.decode_text(text_buf);
single_value->field_mcs3.decode_text(text_buf);
single_value->field_mcs4.decode_text(text_buf);
single_value->field_mcs5.decode_text(text_buf);
single_value->field_mcs6.decode_text(text_buf);
single_value->field_mcs7.decode_text(text_buf);
single_value->field_mcs8.decode_text(text_buf);
single_value->field_mcs9.decode_text(text_buf);
single_value->field_spare2.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 PCUIF__Flags_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_Flags.");
}
}

void PCUIF__Flags_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__Flags_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (17<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_Flags has 17 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) bts__active().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) direct__phy().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) cs1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) cs2().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) cs3().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) cs4().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) mcs1().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) mcs2().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) mcs3().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) mcs4().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) mcs5().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) mcs6().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) mcs7().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) mcs8().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) mcs9().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) spare2().set_param(*param.get_elem(16));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_active")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__active().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "direct_phy")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          direct__phy().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cs4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cs4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs7().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs8")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs8().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcs9")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcs9().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_Flags: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__Flags_template* precondition = new PCUIF__Flags_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__Flags_template* implied_template = new PCUIF__Flags_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__Flags_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_Flags");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__Flags_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_bts__active.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_direct__phy.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_cs1.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_cs2.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_cs3.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_cs4.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs1.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs2.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs3.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs4.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs5.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs6.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs7.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs8.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_mcs9.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
single_value->field_spare2.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_Flags");
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 : "@PCUIF_Types.PCUIF_Flags");
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__bts__model::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_bts_model.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_bts_model comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__bts__model::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_bts_model.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_bts_model comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__bts__model::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 @PCUIF_Types.PCUIF_bts_model.");
return enum_value < other_value;
}

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

boolean PCUIF__bts__model::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_bts_model.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_bts_model comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__bts__model::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 @PCUIF_Types.PCUIF_bts_model.");
return enum_value > other_value;
}

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

const char *PCUIF__bts__model::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case PCU__IF__BTS__MODEL__UNSPEC: return "PCU_IF_BTS_MODEL_UNSPEC";
case PCU__IF__BTS__MODEL__LC15: return "PCU_IF_BTS_MODEL_LC15";
case PCU__IF__BTS__MODEL__OC2G: return "PCU_IF_BTS_MODEL_OC2G";
case PCU__IF__BTS__MODEL__OCTPHY: return "PCU_IF_BTS_MODEL_OCTPHY";
case PCU__IF__BTS__MODEL__SYSMO: return "PCU_IF_BTS_MODEL_SYSMO";
case PCU__IF__BTS__MODEL__TRX: return "PCU_IF_BTS_MODEL_TRX";
case PCU__IF__BTS__MODEL__RBS: return "PCU_IF_BTS_MODEL_RBS";
default:
return "<unknown>";
}
}

PCUIF__bts__model::enum_type PCUIF__bts__model::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_UNSPEC")) return PCU__IF__BTS__MODEL__UNSPEC;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_LC15")) return PCU__IF__BTS__MODEL__LC15;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_OC2G")) return PCU__IF__BTS__MODEL__OC2G;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_OCTPHY")) return PCU__IF__BTS__MODEL__OCTPHY;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_SYSMO")) return PCU__IF__BTS__MODEL__SYSMO;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_TRX")) return PCU__IF__BTS__MODEL__TRX;
if (!strcmp(str_par, "PCU_IF_BTS_MODEL_RBS")) return PCU__IF__BTS__MODEL__RBS;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__bts__model::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__bts__model::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 @PCUIF_Types.PCUIF_bts_model.", enum_value);
}

void PCUIF__bts__model::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__bts__model::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__bts__model::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, 3, 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 PCUIF__bts__model::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 3);
}

void PCUIF__bts__model_template::copy_template(const PCUIF__bts__model_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 PCUIF__bts__model_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 PCUIF__bts__model_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__bts__model_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 @PCUIF_Types.PCUIF_bts_model.");
}
}

PCUIF__bts__model_template::PCUIF__bts__model_template()
{
}

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

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

PCUIF__bts__model_template::PCUIF__bts__model_template(PCUIF__bts__model::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__bts__model_template::match(PCUIF__bts__model::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 @PCUIF_Types.PCUIF_bts_model.");
}
return FALSE;
}

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

PCUIF__bts__model::enum_type PCUIF__bts__model_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 @PCUIF_Types.PCUIF_bts_model.");
return single_value;
}

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

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

void PCUIF__bts__model_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__bts__model::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 PCUIF__bts__model_template::log_match(const PCUIF__bts__model& 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 PCUIF__bts__model_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 @PCUIF_Types.PCUIF_bts_model.");
}
}

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

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

boolean PCUIF__bts__model_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 PCUIF__bts__model_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: {
    PCUIF__bts__model_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: {
    PCUIF__bts__model::enum_type enum_val = PCUIF__bts__model::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__bts__model::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_bts_model.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__bts__model_template* precondition = new PCUIF__bts__model_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__bts__model_template* implied_template = new PCUIF__bts__model_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__bts__model_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_bts_model");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__bts__model_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 : "@PCUIF_Types.PCUIF_bts_model");
}

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

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

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

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

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

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

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

boolean PCUIF__TextType::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_TextType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_TextType comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__TextType::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_TextType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_TextType comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__TextType::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 @PCUIF_Types.PCUIF_TextType.");
return enum_value < other_value;
}

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

boolean PCUIF__TextType::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_TextType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_TextType comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__TextType::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 @PCUIF_Types.PCUIF_TextType.");
return enum_value > other_value;
}

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

const char *PCUIF__TextType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case PCU__VERSION: return "PCU_VERSION";
case PCU__OML__ALERT: return "PCU_OML_ALERT";
default:
return "<unknown>";
}
}

PCUIF__TextType::enum_type PCUIF__TextType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "PCU_VERSION")) return PCU__VERSION;
if (!strcmp(str_par, "PCU_OML_ALERT")) return PCU__OML__ALERT;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__TextType::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__TextType::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 @PCUIF_Types.PCUIF_TextType.", enum_value);
}

void PCUIF__TextType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__TextType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__TextType::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, 2, 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 PCUIF__TextType::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 2);
}

void PCUIF__TextType_template::copy_template(const PCUIF__TextType_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 PCUIF__TextType_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 PCUIF__TextType_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__TextType_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 @PCUIF_Types.PCUIF_TextType.");
}
}

PCUIF__TextType_template::PCUIF__TextType_template()
{
}

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

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

PCUIF__TextType_template::PCUIF__TextType_template(PCUIF__TextType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__TextType_template::match(PCUIF__TextType::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 @PCUIF_Types.PCUIF_TextType.");
}
return FALSE;
}

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

PCUIF__TextType::enum_type PCUIF__TextType_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 @PCUIF_Types.PCUIF_TextType.");
return single_value;
}

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

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

void PCUIF__TextType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__TextType::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 PCUIF__TextType_template::log_match(const PCUIF__TextType& 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 PCUIF__TextType_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 @PCUIF_Types.PCUIF_TextType.");
}
}

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

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

boolean PCUIF__TextType_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 PCUIF__TextType_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: {
    PCUIF__TextType_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: {
    PCUIF__TextType::enum_type enum_val = PCUIF__TextType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__TextType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_TextType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__TextType_template* precondition = new PCUIF__TextType_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__TextType_template* implied_template = new PCUIF__TextType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__TextType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_TextType");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__TextType_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 : "@PCUIF_Types.PCUIF_TextType");
}

PCUIF__txt__ind::PCUIF__txt__ind()
{
}

PCUIF__txt__ind::PCUIF__txt__ind(const PCUIF__TextType& par_txt__type,
    const CHARSTRING& par_text)
  :   field_txt__type(par_txt__type),
  field_text(par_text)
{
}

PCUIF__txt__ind::PCUIF__txt__ind(const PCUIF__txt__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_txt_ind.");
if (other_value.txt__type().is_bound()) field_txt__type = other_value.txt__type();
else field_txt__type.clean_up();
if (other_value.text().is_bound()) field_text = other_value.text();
else field_text.clean_up();
}

void PCUIF__txt__ind::clean_up()
{
field_txt__type.clean_up();
field_text.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__txt__ind::get_descriptor() const { return &PCUIF__txt__ind_descr_; }
PCUIF__txt__ind& PCUIF__txt__ind::operator=(const PCUIF__txt__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_txt_ind.");
  if (other_value.txt__type().is_bound()) field_txt__type = other_value.txt__type();
  else field_txt__type.clean_up();
  if (other_value.text().is_bound()) field_text = other_value.text();
  else field_text.clean_up();
}
return *this;
}

boolean PCUIF__txt__ind::operator==(const PCUIF__txt__ind& other_value) const
{
return field_txt__type==other_value.field_txt__type
  && field_text==other_value.field_text;
}

boolean PCUIF__txt__ind::is_bound() const
{
return (field_txt__type.is_bound())
  || (field_text.is_bound());
}
boolean PCUIF__txt__ind::is_value() const
{
return field_txt__type.is_value()
  && field_text.is_value();
}
void PCUIF__txt__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ txt_type := ");
field_txt__type.log();
TTCN_Logger::log_event_str(", text := ");
field_text.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__txt__ind::set_implicit_omit()
{
if (txt__type().is_bound()) txt__type().set_implicit_omit();
if (text().is_bound()) text().set_implicit_omit();
}

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

void PCUIF__txt__ind::encode_text(Text_Buf& text_buf) const
{
field_txt__type.encode_text(text_buf);
field_text.encode_text(text_buf);
}

void PCUIF__txt__ind::decode_text(Text_Buf& text_buf)
{
field_txt__type.decode_text(text_buf);
field_text.decode_text(text_buf);
}

void PCUIF__txt__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__txt__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__txt__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__txt__ind_txt__type_descr_.raw->forceomit);
  decoded_field_length = field_txt__type.RAW_decode(PCUIF__txt__ind_txt__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__txt__ind_text_descr_.raw->forceomit);
  decoded_field_length = field_text.RAW_decode(PCUIF__txt__ind_text_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__txt__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__txt__ind_txt__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__txt__ind_text_descr_.raw);
  encoded_length += field_txt__type.RAW_encode(PCUIF__txt__ind_txt__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_text.RAW_encode(PCUIF__txt__ind_text_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PCUIF__txt__ind_template::single_value_struct {
PCUIF__TextType_template field_txt__type;
CHARSTRING_template field_text;
};

void PCUIF__txt__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_txt__type = ANY_VALUE;
single_value->field_text = ANY_VALUE;
}
}
}

void PCUIF__txt__ind_template::copy_value(const PCUIF__txt__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.txt__type().is_bound()) {
  single_value->field_txt__type = other_value.txt__type();
} else {
  single_value->field_txt__type.clean_up();
}
if (other_value.text().is_bound()) {
  single_value->field_text = other_value.text();
} else {
  single_value->field_text.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

PCUIF__txt__ind_template::PCUIF__txt__ind_template()
{
}

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

PCUIF__txt__ind_template::PCUIF__txt__ind_template(const PCUIF__txt__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__txt__ind_template::match(const PCUIF__txt__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.txt__type().is_bound()) return FALSE;
if(!single_value->field_txt__type.match(other_value.txt__type(), legacy))return FALSE;
if(!other_value.text().is_bound()) return FALSE;
if(!single_value->field_text.match(other_value.text(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_txt_ind.");
}
return FALSE;
}

boolean PCUIF__txt__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_txt__type.is_bound()
 || single_value->field_text.is_bound();
}

boolean PCUIF__txt__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_txt__type.is_value()
 && single_value->field_text.is_value();
}

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

PCUIF__txt__ind PCUIF__txt__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_txt_ind.");
PCUIF__txt__ind ret_val;
if (single_value->field_txt__type.is_bound()) {
ret_val.txt__type() = single_value->field_txt__type.valueof();
}
if (single_value->field_text.is_bound()) {
ret_val.text() = single_value->field_text.valueof();
}
return ret_val;
}

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

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

PCUIF__TextType_template& PCUIF__txt__ind_template::txt__type()
{
set_specific();
return single_value->field_txt__type;
}

const PCUIF__TextType_template& PCUIF__txt__ind_template::txt__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field txt_type of a non-specific template of type @PCUIF_Types.PCUIF_txt_ind.");
return single_value->field_txt__type;
}

CHARSTRING_template& PCUIF__txt__ind_template::text()
{
set_specific();
return single_value->field_text;
}

const CHARSTRING_template& PCUIF__txt__ind_template::text() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field text of a non-specific template of type @PCUIF_Types.PCUIF_txt_ind.");
return single_value->field_text;
}

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

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

void PCUIF__txt__ind_template::log_match(const PCUIF__txt__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_txt__type.match(match_value.txt__type(), legacy)){
TTCN_Logger::log_logmatch_info(".txt_type");
single_value->field_txt__type.log_match(match_value.txt__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_text.match(match_value.text(), legacy)){
TTCN_Logger::log_logmatch_info(".text");
single_value->field_text.log_match(match_value.text(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ txt_type := ");
single_value->field_txt__type.log_match(match_value.txt__type(), legacy);
TTCN_Logger::log_event_str(", text := ");
single_value->field_text.log_match(match_value.text(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__txt__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (txt__type().is_bound()) txt__type().set_implicit_omit();
if (text().is_bound()) text().set_implicit_omit();
}

void PCUIF__txt__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_txt__type.encode_text(text_buf);
single_value->field_text.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 @PCUIF_Types.PCUIF_txt_ind.");
}
}

void PCUIF__txt__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_txt__type.decode_text(text_buf);
single_value->field_text.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 PCUIF__txt__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_txt_ind.");
}
}

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

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

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

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

PCUIF__data::PCUIF__data()
{
}

PCUIF__data::PCUIF__data(const PCUIF__Sapi& par_sapi,
    const INTEGER& par_len,
    const OCTETSTRING& par_data,
    const INTEGER& par_fn,
    const INTEGER& par_arfcn,
    const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr,
    const INTEGER& par_block__nr,
    const INTEGER& par_rssi,
    const INTEGER& par_ber10k,
    const INTEGER& par_ta__offs__qbits,
    const INTEGER& par_lqual__cb)
  :   field_sapi(par_sapi),
  field_len(par_len),
  field_data(par_data),
  field_fn(par_fn),
  field_arfcn(par_arfcn),
  field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr),
  field_block__nr(par_block__nr),
  field_rssi(par_rssi),
  field_ber10k(par_ber10k),
  field_ta__offs__qbits(par_ta__offs__qbits),
  field_lqual__cb(par_lqual__cb)
{
}

PCUIF__data::PCUIF__data(const PCUIF__data& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_data.");
if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
else field_sapi.clean_up();
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.data().is_bound()) field_data = other_value.data();
else field_data.clean_up();
if (other_value.fn().is_bound()) field_fn = other_value.fn();
else field_fn.clean_up();
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
if (other_value.block__nr().is_bound()) field_block__nr = other_value.block__nr();
else field_block__nr.clean_up();
if (other_value.rssi().is_bound()) field_rssi = other_value.rssi();
else field_rssi.clean_up();
if (other_value.ber10k().is_bound()) field_ber10k = other_value.ber10k();
else field_ber10k.clean_up();
if (other_value.ta__offs__qbits().is_bound()) field_ta__offs__qbits = other_value.ta__offs__qbits();
else field_ta__offs__qbits.clean_up();
if (other_value.lqual__cb().is_bound()) field_lqual__cb = other_value.lqual__cb();
else field_lqual__cb.clean_up();
}

void PCUIF__data::clean_up()
{
field_sapi.clean_up();
field_len.clean_up();
field_data.clean_up();
field_fn.clean_up();
field_arfcn.clean_up();
field_trx__nr.clean_up();
field_ts__nr.clean_up();
field_block__nr.clean_up();
field_rssi.clean_up();
field_ber10k.clean_up();
field_ta__offs__qbits.clean_up();
field_lqual__cb.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__data::get_descriptor() const { return &PCUIF__data_descr_; }
PCUIF__data& PCUIF__data::operator=(const PCUIF__data& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_data.");
  if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
  else field_sapi.clean_up();
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.data().is_bound()) field_data = other_value.data();
  else field_data.clean_up();
  if (other_value.fn().is_bound()) field_fn = other_value.fn();
  else field_fn.clean_up();
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
  if (other_value.block__nr().is_bound()) field_block__nr = other_value.block__nr();
  else field_block__nr.clean_up();
  if (other_value.rssi().is_bound()) field_rssi = other_value.rssi();
  else field_rssi.clean_up();
  if (other_value.ber10k().is_bound()) field_ber10k = other_value.ber10k();
  else field_ber10k.clean_up();
  if (other_value.ta__offs__qbits().is_bound()) field_ta__offs__qbits = other_value.ta__offs__qbits();
  else field_ta__offs__qbits.clean_up();
  if (other_value.lqual__cb().is_bound()) field_lqual__cb = other_value.lqual__cb();
  else field_lqual__cb.clean_up();
}
return *this;
}

boolean PCUIF__data::operator==(const PCUIF__data& other_value) const
{
return field_sapi==other_value.field_sapi
  && field_len==other_value.field_len
  && field_data==other_value.field_data
  && field_fn==other_value.field_fn
  && field_arfcn==other_value.field_arfcn
  && field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr
  && field_block__nr==other_value.field_block__nr
  && field_rssi==other_value.field_rssi
  && field_ber10k==other_value.field_ber10k
  && field_ta__offs__qbits==other_value.field_ta__offs__qbits
  && field_lqual__cb==other_value.field_lqual__cb;
}

boolean PCUIF__data::is_bound() const
{
return (field_sapi.is_bound())
  || (field_len.is_bound())
  || (field_data.is_bound())
  || (field_fn.is_bound())
  || (field_arfcn.is_bound())
  || (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound())
  || (field_block__nr.is_bound())
  || (field_rssi.is_bound())
  || (field_ber10k.is_bound())
  || (field_ta__offs__qbits.is_bound())
  || (field_lqual__cb.is_bound());
}
boolean PCUIF__data::is_value() const
{
return field_sapi.is_value()
  && field_len.is_value()
  && field_data.is_value()
  && field_fn.is_value()
  && field_arfcn.is_value()
  && field_trx__nr.is_value()
  && field_ts__nr.is_value()
  && field_block__nr.is_value()
  && field_rssi.is_value()
  && field_ber10k.is_value()
  && field_ta__offs__qbits.is_value()
  && field_lqual__cb.is_value();
}
void PCUIF__data::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sapi := ");
field_sapi.log();
TTCN_Logger::log_event_str(", len := ");
field_len.log();
TTCN_Logger::log_event_str(", data := ");
field_data.log();
TTCN_Logger::log_event_str(", fn := ");
field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(", block_nr := ");
field_block__nr.log();
TTCN_Logger::log_event_str(", rssi := ");
field_rssi.log();
TTCN_Logger::log_event_str(", ber10k := ");
field_ber10k.log();
TTCN_Logger::log_event_str(", ta_offs_qbits := ");
field_ta__offs__qbits.log();
TTCN_Logger::log_event_str(", lqual_cb := ");
field_lqual__cb.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__data::set_implicit_omit()
{
if (sapi().is_bound()) sapi().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (block__nr().is_bound()) block__nr().set_implicit_omit();
if (rssi().is_bound()) rssi().set_implicit_omit();
if (ber10k().is_bound()) ber10k().set_implicit_omit();
if (ta__offs__qbits().is_bound()) ta__offs__qbits().set_implicit_omit();
if (lqual__cb().is_bound()) lqual__cb().set_implicit_omit();
}

void PCUIF__data::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (12<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_data has 12 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) data().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) block__nr().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rssi().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) ber10k().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) ta__offs__qbits().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) lqual__cb().set_param(*param.get_elem(11));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "data")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          data().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "block_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          block__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rssi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rssi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ber10k")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ber10k().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ta_offs_qbits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ta__offs__qbits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lqual_cb")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lqual__cb().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_data: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_data");
  }
}

void PCUIF__data::encode_text(Text_Buf& text_buf) const
{
field_sapi.encode_text(text_buf);
field_len.encode_text(text_buf);
field_data.encode_text(text_buf);
field_fn.encode_text(text_buf);
field_arfcn.encode_text(text_buf);
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
field_block__nr.encode_text(text_buf);
field_rssi.encode_text(text_buf);
field_ber10k.encode_text(text_buf);
field_ta__offs__qbits.encode_text(text_buf);
field_lqual__cb.encode_text(text_buf);
}

void PCUIF__data::decode_text(Text_Buf& text_buf)
{
field_sapi.decode_text(text_buf);
field_len.decode_text(text_buf);
field_data.decode_text(text_buf);
field_fn.decode_text(text_buf);
field_arfcn.decode_text(text_buf);
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
field_block__nr.decode_text(text_buf);
field_rssi.decode_text(text_buf);
field_ber10k.decode_text(text_buf);
field_ta__offs__qbits.decode_text(text_buf);
field_lqual__cb.decode_text(text_buf);
}

void PCUIF__data::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__data::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__data::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__data_sapi_descr_.raw->forceomit);
  decoded_field_length = field_sapi.RAW_decode(PCUIF__data_sapi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__data_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(PCUIF__data_len_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__data_data_descr_.raw->forceomit);
  decoded_field_length = field_data.RAW_decode(PCUIF__data_data_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__data_fn_descr_.raw->forceomit);
  decoded_field_length = field_fn.RAW_decode(PCUIF__data_fn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__data_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn.RAW_decode(PCUIF__data_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__data_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__data_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__data_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(PCUIF__data_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PCUIF__data_block__nr_descr_.raw->forceomit);
  decoded_field_length = field_block__nr.RAW_decode(PCUIF__data_block__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_8_force_omit(8, force_omit, PCUIF__data_rssi_descr_.raw->forceomit);
  decoded_field_length = field_rssi.RAW_decode(PCUIF__data_rssi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_9_force_omit(9, force_omit, PCUIF__data_ber10k_descr_.raw->forceomit);
  decoded_field_length = field_ber10k.RAW_decode(PCUIF__data_ber10k_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_10_force_omit(10, force_omit, PCUIF__data_ta__offs__qbits_descr_.raw->forceomit);
  decoded_field_length = field_ta__offs__qbits.RAW_decode(PCUIF__data_ta__offs__qbits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_11_force_omit(11, force_omit, PCUIF__data_lqual__cb_descr_.raw->forceomit);
  decoded_field_length = field_lqual__cb.RAW_decode(PCUIF__data_lqual__cb_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__data::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 12;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(12);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__data_sapi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__data_len_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__data_data_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__data_fn_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__data_arfcn_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__data_trx__nr_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__data_ts__nr_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PCUIF__data_block__nr_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PCUIF__data_rssi_descr_.raw);
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, PCUIF__data_ber10k_descr_.raw);
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, PCUIF__data_ta__offs__qbits_descr_.raw);
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, PCUIF__data_lqual__cb_descr_.raw);
  encoded_length += field_sapi.RAW_encode(PCUIF__data_sapi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_len.RAW_encode(PCUIF__data_len_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_data.RAW_encode(PCUIF__data_data_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_fn.RAW_encode(PCUIF__data_fn_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_arfcn.RAW_encode(PCUIF__data_arfcn_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__data_trx__nr_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_ts__nr.RAW_encode(PCUIF__data_ts__nr_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_block__nr.RAW_encode(PCUIF__data_block__nr_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_rssi.RAW_encode(PCUIF__data_rssi_descr_, *myleaf.body.node.nodes[8]);
  encoded_length += field_ber10k.RAW_encode(PCUIF__data_ber10k_descr_, *myleaf.body.node.nodes[9]);
  encoded_length += field_ta__offs__qbits.RAW_encode(PCUIF__data_ta__offs__qbits_descr_, *myleaf.body.node.nodes[10]);
  encoded_length += field_lqual__cb.RAW_encode(PCUIF__data_lqual__cb_descr_, *myleaf.body.node.nodes[11]);
  return myleaf.length = encoded_length;
}

struct PCUIF__data_template::single_value_struct {
PCUIF__Sapi_template field_sapi;
INTEGER_template field_len;
OCTETSTRING_template field_data;
INTEGER_template field_fn;
INTEGER_template field_arfcn;
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
INTEGER_template field_block__nr;
INTEGER_template field_rssi;
INTEGER_template field_ber10k;
INTEGER_template field_ta__offs__qbits;
INTEGER_template field_lqual__cb;
};

void PCUIF__data_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_sapi = ANY_VALUE;
single_value->field_len = ANY_VALUE;
single_value->field_data = ANY_VALUE;
single_value->field_fn = ANY_VALUE;
single_value->field_arfcn = ANY_VALUE;
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
single_value->field_block__nr = ANY_VALUE;
single_value->field_rssi = ANY_VALUE;
single_value->field_ber10k = ANY_VALUE;
single_value->field_ta__offs__qbits = ANY_VALUE;
single_value->field_lqual__cb = ANY_VALUE;
}
}
}

void PCUIF__data_template::copy_value(const PCUIF__data& other_value)
{
single_value = new single_value_struct;
if (other_value.sapi().is_bound()) {
  single_value->field_sapi = other_value.sapi();
} else {
  single_value->field_sapi.clean_up();
}
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.data().is_bound()) {
  single_value->field_data = other_value.data();
} else {
  single_value->field_data.clean_up();
}
if (other_value.fn().is_bound()) {
  single_value->field_fn = other_value.fn();
} else {
  single_value->field_fn.clean_up();
}
if (other_value.arfcn().is_bound()) {
  single_value->field_arfcn = other_value.arfcn();
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
if (other_value.block__nr().is_bound()) {
  single_value->field_block__nr = other_value.block__nr();
} else {
  single_value->field_block__nr.clean_up();
}
if (other_value.rssi().is_bound()) {
  single_value->field_rssi = other_value.rssi();
} else {
  single_value->field_rssi.clean_up();
}
if (other_value.ber10k().is_bound()) {
  single_value->field_ber10k = other_value.ber10k();
} else {
  single_value->field_ber10k.clean_up();
}
if (other_value.ta__offs__qbits().is_bound()) {
  single_value->field_ta__offs__qbits = other_value.ta__offs__qbits();
} else {
  single_value->field_ta__offs__qbits.clean_up();
}
if (other_value.lqual__cb().is_bound()) {
  single_value->field_lqual__cb = other_value.lqual__cb();
} else {
  single_value->field_lqual__cb.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__data_template::copy_template(const PCUIF__data_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sapi().get_selection()) {
single_value->field_sapi = other_value.sapi();
} else {
single_value->field_sapi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.data().get_selection()) {
single_value->field_data = other_value.data();
} else {
single_value->field_data.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fn().get_selection()) {
single_value->field_fn = other_value.fn();
} else {
single_value->field_fn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.block__nr().get_selection()) {
single_value->field_block__nr = other_value.block__nr();
} else {
single_value->field_block__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rssi().get_selection()) {
single_value->field_rssi = other_value.rssi();
} else {
single_value->field_rssi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ber10k().get_selection()) {
single_value->field_ber10k = other_value.ber10k();
} else {
single_value->field_ber10k.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ta__offs__qbits().get_selection()) {
single_value->field_ta__offs__qbits = other_value.ta__offs__qbits();
} else {
single_value->field_ta__offs__qbits.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lqual__cb().get_selection()) {
single_value->field_lqual__cb = other_value.lqual__cb();
} else {
single_value->field_lqual__cb.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__data_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 PCUIF__data_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__data_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 @PCUIF_Types.PCUIF_data.");
break;
}
set_selection(other_value);
}

PCUIF__data_template::PCUIF__data_template()
{
}

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

PCUIF__data_template::PCUIF__data_template(const PCUIF__data& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__data_template& PCUIF__data_template::operator=(const OPTIONAL<PCUIF__data>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__data&)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 @PCUIF_Types.PCUIF_data.");
}
return *this;
}

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

boolean PCUIF__data_template::match(const PCUIF__data& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.sapi().is_bound()) return FALSE;
if(!single_value->field_sapi.match(other_value.sapi(), legacy))return FALSE;
if(!other_value.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.data().is_bound()) return FALSE;
if(!single_value->field_data.match(other_value.data(), legacy))return FALSE;
if(!other_value.fn().is_bound()) return FALSE;
if(!single_value->field_fn.match(other_value.fn(), legacy))return FALSE;
if(!other_value.arfcn().is_bound()) return FALSE;
if(!single_value->field_arfcn.match(other_value.arfcn(), legacy))return FALSE;
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
if(!other_value.block__nr().is_bound()) return FALSE;
if(!single_value->field_block__nr.match(other_value.block__nr(), legacy))return FALSE;
if(!other_value.rssi().is_bound()) return FALSE;
if(!single_value->field_rssi.match(other_value.rssi(), legacy))return FALSE;
if(!other_value.ber10k().is_bound()) return FALSE;
if(!single_value->field_ber10k.match(other_value.ber10k(), legacy))return FALSE;
if(!other_value.ta__offs__qbits().is_bound()) return FALSE;
if(!single_value->field_ta__offs__qbits.match(other_value.ta__offs__qbits(), legacy))return FALSE;
if(!other_value.lqual__cb().is_bound()) return FALSE;
if(!single_value->field_lqual__cb.match(other_value.lqual__cb(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_data.");
}
return FALSE;
}

boolean PCUIF__data_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sapi.is_bound()
 || single_value->field_len.is_bound()
 || single_value->field_data.is_bound()
 || single_value->field_fn.is_bound()
 || single_value->field_arfcn.is_bound()
 || single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound()
 || single_value->field_block__nr.is_bound()
 || single_value->field_rssi.is_bound()
 || single_value->field_ber10k.is_bound()
 || single_value->field_ta__offs__qbits.is_bound()
 || single_value->field_lqual__cb.is_bound();
}

boolean PCUIF__data_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sapi.is_value()
 && single_value->field_len.is_value()
 && single_value->field_data.is_value()
 && single_value->field_fn.is_value()
 && single_value->field_arfcn.is_value()
 && single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value()
 && single_value->field_block__nr.is_value()
 && single_value->field_rssi.is_value()
 && single_value->field_ber10k.is_value()
 && single_value->field_ta__offs__qbits.is_value()
 && single_value->field_lqual__cb.is_value();
}

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

PCUIF__data PCUIF__data_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 @PCUIF_Types.PCUIF_data.");
PCUIF__data ret_val;
if (single_value->field_sapi.is_bound()) {
ret_val.sapi() = single_value->field_sapi.valueof();
}
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_data.is_bound()) {
ret_val.data() = single_value->field_data.valueof();
}
if (single_value->field_fn.is_bound()) {
ret_val.fn() = single_value->field_fn.valueof();
}
if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
if (single_value->field_block__nr.is_bound()) {
ret_val.block__nr() = single_value->field_block__nr.valueof();
}
if (single_value->field_rssi.is_bound()) {
ret_val.rssi() = single_value->field_rssi.valueof();
}
if (single_value->field_ber10k.is_bound()) {
ret_val.ber10k() = single_value->field_ber10k.valueof();
}
if (single_value->field_ta__offs__qbits.is_bound()) {
ret_val.ta__offs__qbits() = single_value->field_ta__offs__qbits.valueof();
}
if (single_value->field_lqual__cb.is_bound()) {
ret_val.lqual__cb() = single_value->field_lqual__cb.valueof();
}
return ret_val;
}

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

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

PCUIF__Sapi_template& PCUIF__data_template::sapi()
{
set_specific();
return single_value->field_sapi;
}

const PCUIF__Sapi_template& PCUIF__data_template::sapi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sapi of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_sapi;
}

INTEGER_template& PCUIF__data_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& PCUIF__data_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_len;
}

OCTETSTRING_template& PCUIF__data_template::data()
{
set_specific();
return single_value->field_data;
}

const OCTETSTRING_template& PCUIF__data_template::data() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field data of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_data;
}

INTEGER_template& PCUIF__data_template::fn()
{
set_specific();
return single_value->field_fn;
}

const INTEGER_template& PCUIF__data_template::fn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fn of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_fn;
}

INTEGER_template& PCUIF__data_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PCUIF__data_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_arfcn;
}

INTEGER_template& PCUIF__data_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__data_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_trx__nr;
}

INTEGER_template& PCUIF__data_template::ts__nr()
{
set_specific();
return single_value->field_ts__nr;
}

const INTEGER_template& PCUIF__data_template::ts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts_nr of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_ts__nr;
}

INTEGER_template& PCUIF__data_template::block__nr()
{
set_specific();
return single_value->field_block__nr;
}

const INTEGER_template& PCUIF__data_template::block__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field block_nr of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_block__nr;
}

INTEGER_template& PCUIF__data_template::rssi()
{
set_specific();
return single_value->field_rssi;
}

const INTEGER_template& PCUIF__data_template::rssi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rssi of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_rssi;
}

INTEGER_template& PCUIF__data_template::ber10k()
{
set_specific();
return single_value->field_ber10k;
}

const INTEGER_template& PCUIF__data_template::ber10k() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ber10k of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_ber10k;
}

INTEGER_template& PCUIF__data_template::ta__offs__qbits()
{
set_specific();
return single_value->field_ta__offs__qbits;
}

const INTEGER_template& PCUIF__data_template::ta__offs__qbits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ta_offs_qbits of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_ta__offs__qbits;
}

INTEGER_template& PCUIF__data_template::lqual__cb()
{
set_specific();
return single_value->field_lqual__cb;
}

const INTEGER_template& PCUIF__data_template::lqual__cb() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lqual_cb of a non-specific template of type @PCUIF_Types.PCUIF_data.");
return single_value->field_lqual__cb;
}

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

void PCUIF__data_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log();
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log();
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log();
TTCN_Logger::log_event_str(", block_nr := ");
single_value->field_block__nr.log();
TTCN_Logger::log_event_str(", rssi := ");
single_value->field_rssi.log();
TTCN_Logger::log_event_str(", ber10k := ");
single_value->field_ber10k.log();
TTCN_Logger::log_event_str(", ta_offs_qbits := ");
single_value->field_ta__offs__qbits.log();
TTCN_Logger::log_event_str(", lqual_cb := ");
single_value->field_lqual__cb.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__data_template::log_match(const PCUIF__data& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_sapi.match(match_value.sapi(), legacy)){
TTCN_Logger::log_logmatch_info(".sapi");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_data.match(match_value.data(), legacy)){
TTCN_Logger::log_logmatch_info(".data");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fn.match(match_value.fn(), legacy)){
TTCN_Logger::log_logmatch_info(".fn");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_block__nr.match(match_value.block__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".block_nr");
single_value->field_block__nr.log_match(match_value.block__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rssi.match(match_value.rssi(), legacy)){
TTCN_Logger::log_logmatch_info(".rssi");
single_value->field_rssi.log_match(match_value.rssi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ber10k.match(match_value.ber10k(), legacy)){
TTCN_Logger::log_logmatch_info(".ber10k");
single_value->field_ber10k.log_match(match_value.ber10k(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ta__offs__qbits.match(match_value.ta__offs__qbits(), legacy)){
TTCN_Logger::log_logmatch_info(".ta_offs_qbits");
single_value->field_ta__offs__qbits.log_match(match_value.ta__offs__qbits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lqual__cb.match(match_value.lqual__cb(), legacy)){
TTCN_Logger::log_logmatch_info(".lqual_cb");
single_value->field_lqual__cb.log_match(match_value.lqual__cb(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(", block_nr := ");
single_value->field_block__nr.log_match(match_value.block__nr(), legacy);
TTCN_Logger::log_event_str(", rssi := ");
single_value->field_rssi.log_match(match_value.rssi(), legacy);
TTCN_Logger::log_event_str(", ber10k := ");
single_value->field_ber10k.log_match(match_value.ber10k(), legacy);
TTCN_Logger::log_event_str(", ta_offs_qbits := ");
single_value->field_ta__offs__qbits.log_match(match_value.ta__offs__qbits(), legacy);
TTCN_Logger::log_event_str(", lqual_cb := ");
single_value->field_lqual__cb.log_match(match_value.lqual__cb(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__data_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sapi().is_bound()) sapi().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (block__nr().is_bound()) block__nr().set_implicit_omit();
if (rssi().is_bound()) rssi().set_implicit_omit();
if (ber10k().is_bound()) ber10k().set_implicit_omit();
if (ta__offs__qbits().is_bound()) ta__offs__qbits().set_implicit_omit();
if (lqual__cb().is_bound()) lqual__cb().set_implicit_omit();
}

void PCUIF__data_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_sapi.encode_text(text_buf);
single_value->field_len.encode_text(text_buf);
single_value->field_data.encode_text(text_buf);
single_value->field_fn.encode_text(text_buf);
single_value->field_arfcn.encode_text(text_buf);
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_ts__nr.encode_text(text_buf);
single_value->field_block__nr.encode_text(text_buf);
single_value->field_rssi.encode_text(text_buf);
single_value->field_ber10k.encode_text(text_buf);
single_value->field_ta__offs__qbits.encode_text(text_buf);
single_value->field_lqual__cb.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 @PCUIF_Types.PCUIF_data.");
}
}

void PCUIF__data_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_sapi.decode_text(text_buf);
single_value->field_len.decode_text(text_buf);
single_value->field_data.decode_text(text_buf);
single_value->field_fn.decode_text(text_buf);
single_value->field_arfcn.decode_text(text_buf);
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.decode_text(text_buf);
single_value->field_block__nr.decode_text(text_buf);
single_value->field_rssi.decode_text(text_buf);
single_value->field_ber10k.decode_text(text_buf);
single_value->field_ta__offs__qbits.decode_text(text_buf);
single_value->field_lqual__cb.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 PCUIF__data_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_data.");
}
}

void PCUIF__data_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__data_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (12<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_data has 12 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) data().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) block__nr().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rssi().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) ber10k().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) ta__offs__qbits().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) lqual__cb().set_param(*param.get_elem(11));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "data")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          data().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "block_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          block__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rssi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rssi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ber10k")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ber10k().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ta_offs_qbits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ta__offs__qbits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lqual_cb")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lqual__cb().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_data: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__data_template* precondition = new PCUIF__data_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__data_template* implied_template = new PCUIF__data_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__data_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_data");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__data_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_sapi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_len.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_data.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_fn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_trx__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_ts__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_block__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_rssi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_ber10k.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_ta__offs__qbits.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
single_value->field_lqual__cb.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data");
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 : "@PCUIF_Types.PCUIF_data");
}

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

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

PCUIF__data__cnf::PCUIF__data__cnf()
{
}

PCUIF__data__cnf::PCUIF__data__cnf(const PCUIF__Sapi& par_sapi,
    const OCTETSTRING& par_msg__id)
  :   field_sapi(par_sapi),
  field_msg__id(par_msg__id)
{
}

PCUIF__data__cnf::PCUIF__data__cnf(const PCUIF__data__cnf& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_data_cnf.");
if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
else field_sapi.clean_up();
if (other_value.msg__id().is_bound()) field_msg__id = other_value.msg__id();
else field_msg__id.clean_up();
}

void PCUIF__data__cnf::clean_up()
{
field_sapi.clean_up();
field_msg__id.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__data__cnf::get_descriptor() const { return &PCUIF__data__cnf_descr_; }
PCUIF__data__cnf& PCUIF__data__cnf::operator=(const PCUIF__data__cnf& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_data_cnf.");
  if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
  else field_sapi.clean_up();
  if (other_value.msg__id().is_bound()) field_msg__id = other_value.msg__id();
  else field_msg__id.clean_up();
}
return *this;
}

boolean PCUIF__data__cnf::operator==(const PCUIF__data__cnf& other_value) const
{
return field_sapi==other_value.field_sapi
  && field_msg__id==other_value.field_msg__id;
}

boolean PCUIF__data__cnf::is_bound() const
{
return (field_sapi.is_bound())
  || (field_msg__id.is_bound());
}
boolean PCUIF__data__cnf::is_value() const
{
return field_sapi.is_value()
  && field_msg__id.is_value();
}
void PCUIF__data__cnf::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sapi := ");
field_sapi.log();
TTCN_Logger::log_event_str(", msg_id := ");
field_msg__id.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__data__cnf::set_implicit_omit()
{
if (sapi().is_bound()) sapi().set_implicit_omit();
if (msg__id().is_bound()) msg__id().set_implicit_omit();
}

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

void PCUIF__data__cnf::encode_text(Text_Buf& text_buf) const
{
field_sapi.encode_text(text_buf);
field_msg__id.encode_text(text_buf);
}

void PCUIF__data__cnf::decode_text(Text_Buf& text_buf)
{
field_sapi.decode_text(text_buf);
field_msg__id.decode_text(text_buf);
}

void PCUIF__data__cnf::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__data__cnf::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__data__cnf::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__data__cnf_sapi_descr_.raw->forceomit);
  decoded_field_length = field_sapi.RAW_decode(PCUIF__data__cnf_sapi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__data__cnf_msg__id_descr_.raw->forceomit);
  decoded_field_length = field_msg__id.RAW_decode(PCUIF__data__cnf_msg__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__data__cnf::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__data__cnf_sapi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__data__cnf_msg__id_descr_.raw);
  encoded_length += field_sapi.RAW_encode(PCUIF__data__cnf_sapi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_msg__id.RAW_encode(PCUIF__data__cnf_msg__id_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PCUIF__data__cnf_template::single_value_struct {
PCUIF__Sapi_template field_sapi;
OCTETSTRING_template field_msg__id;
};

void PCUIF__data__cnf_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_sapi = ANY_VALUE;
single_value->field_msg__id = ANY_VALUE;
}
}
}

void PCUIF__data__cnf_template::copy_value(const PCUIF__data__cnf& other_value)
{
single_value = new single_value_struct;
if (other_value.sapi().is_bound()) {
  single_value->field_sapi = other_value.sapi();
} else {
  single_value->field_sapi.clean_up();
}
if (other_value.msg__id().is_bound()) {
  single_value->field_msg__id = other_value.msg__id();
} else {
  single_value->field_msg__id.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__data__cnf_template::copy_template(const PCUIF__data__cnf_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sapi().get_selection()) {
single_value->field_sapi = other_value.sapi();
} else {
single_value->field_sapi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.msg__id().get_selection()) {
single_value->field_msg__id = other_value.msg__id();
} else {
single_value->field_msg__id.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__data__cnf_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 PCUIF__data__cnf_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__data__cnf_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 @PCUIF_Types.PCUIF_data_cnf.");
break;
}
set_selection(other_value);
}

PCUIF__data__cnf_template::PCUIF__data__cnf_template()
{
}

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

PCUIF__data__cnf_template::PCUIF__data__cnf_template(const PCUIF__data__cnf& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__data__cnf_template& PCUIF__data__cnf_template::operator=(const OPTIONAL<PCUIF__data__cnf>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__data__cnf&)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 @PCUIF_Types.PCUIF_data_cnf.");
}
return *this;
}

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

boolean PCUIF__data__cnf_template::match(const PCUIF__data__cnf& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.sapi().is_bound()) return FALSE;
if(!single_value->field_sapi.match(other_value.sapi(), legacy))return FALSE;
if(!other_value.msg__id().is_bound()) return FALSE;
if(!single_value->field_msg__id.match(other_value.msg__id(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_data_cnf.");
}
return FALSE;
}

boolean PCUIF__data__cnf_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sapi.is_bound()
 || single_value->field_msg__id.is_bound();
}

boolean PCUIF__data__cnf_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sapi.is_value()
 && single_value->field_msg__id.is_value();
}

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

PCUIF__data__cnf PCUIF__data__cnf_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 @PCUIF_Types.PCUIF_data_cnf.");
PCUIF__data__cnf ret_val;
if (single_value->field_sapi.is_bound()) {
ret_val.sapi() = single_value->field_sapi.valueof();
}
if (single_value->field_msg__id.is_bound()) {
ret_val.msg__id() = single_value->field_msg__id.valueof();
}
return ret_val;
}

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

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

PCUIF__Sapi_template& PCUIF__data__cnf_template::sapi()
{
set_specific();
return single_value->field_sapi;
}

const PCUIF__Sapi_template& PCUIF__data__cnf_template::sapi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sapi of a non-specific template of type @PCUIF_Types.PCUIF_data_cnf.");
return single_value->field_sapi;
}

OCTETSTRING_template& PCUIF__data__cnf_template::msg__id()
{
set_specific();
return single_value->field_msg__id;
}

const OCTETSTRING_template& PCUIF__data__cnf_template::msg__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field msg_id of a non-specific template of type @PCUIF_Types.PCUIF_data_cnf.");
return single_value->field_msg__id;
}

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

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

void PCUIF__data__cnf_template::log_match(const PCUIF__data__cnf& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_sapi.match(match_value.sapi(), legacy)){
TTCN_Logger::log_logmatch_info(".sapi");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_msg__id.match(match_value.msg__id(), legacy)){
TTCN_Logger::log_logmatch_info(".msg_id");
single_value->field_msg__id.log_match(match_value.msg__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::log_event_str(", msg_id := ");
single_value->field_msg__id.log_match(match_value.msg__id(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__data__cnf_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sapi().is_bound()) sapi().set_implicit_omit();
if (msg__id().is_bound()) msg__id().set_implicit_omit();
}

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

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

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

void PCUIF__data__cnf_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_sapi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data_cnf");
single_value->field_msg__id.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_data_cnf");
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 : "@PCUIF_Types.PCUIF_data_cnf");
}

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

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

PCUIF__rts__req::PCUIF__rts__req()
{
}

PCUIF__rts__req::PCUIF__rts__req(const PCUIF__Sapi& par_sapi,
    const OCTETSTRING& par_spare,
    const INTEGER& par_fn,
    const INTEGER& par_arfcn,
    const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr,
    const INTEGER& par_block__nr)
  :   field_sapi(par_sapi),
  field_spare(par_spare),
  field_fn(par_fn),
  field_arfcn(par_arfcn),
  field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr),
  field_block__nr(par_block__nr)
{
}

PCUIF__rts__req::PCUIF__rts__req(const PCUIF__rts__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_rts_req.");
if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
else field_sapi.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.fn().is_bound()) field_fn = other_value.fn();
else field_fn.clean_up();
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
if (other_value.block__nr().is_bound()) field_block__nr = other_value.block__nr();
else field_block__nr.clean_up();
}

void PCUIF__rts__req::clean_up()
{
field_sapi.clean_up();
field_spare.clean_up();
field_fn.clean_up();
field_arfcn.clean_up();
field_trx__nr.clean_up();
field_ts__nr.clean_up();
field_block__nr.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__rts__req::get_descriptor() const { return &PCUIF__rts__req_descr_; }
PCUIF__rts__req& PCUIF__rts__req::operator=(const PCUIF__rts__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_rts_req.");
  if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
  else field_sapi.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.fn().is_bound()) field_fn = other_value.fn();
  else field_fn.clean_up();
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
  if (other_value.block__nr().is_bound()) field_block__nr = other_value.block__nr();
  else field_block__nr.clean_up();
}
return *this;
}

boolean PCUIF__rts__req::operator==(const PCUIF__rts__req& other_value) const
{
return field_sapi==other_value.field_sapi
  && field_spare==other_value.field_spare
  && field_fn==other_value.field_fn
  && field_arfcn==other_value.field_arfcn
  && field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr
  && field_block__nr==other_value.field_block__nr;
}

boolean PCUIF__rts__req::is_bound() const
{
return (field_sapi.is_bound())
  || (field_spare.is_bound())
  || (field_fn.is_bound())
  || (field_arfcn.is_bound())
  || (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound())
  || (field_block__nr.is_bound());
}
boolean PCUIF__rts__req::is_value() const
{
return field_sapi.is_value()
  && field_spare.is_value()
  && field_fn.is_value()
  && field_arfcn.is_value()
  && field_trx__nr.is_value()
  && field_ts__nr.is_value()
  && field_block__nr.is_value();
}
void PCUIF__rts__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sapi := ");
field_sapi.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", fn := ");
field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(", block_nr := ");
field_block__nr.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__rts__req::set_implicit_omit()
{
if (sapi().is_bound()) sapi().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (block__nr().is_bound()) block__nr().set_implicit_omit();
}

void PCUIF__rts__req::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (7<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_rts_req has 7 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) block__nr().set_param(*param.get_elem(6));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "block_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          block__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_rts_req: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_rts_req");
  }
}

void PCUIF__rts__req::encode_text(Text_Buf& text_buf) const
{
field_sapi.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_fn.encode_text(text_buf);
field_arfcn.encode_text(text_buf);
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
field_block__nr.encode_text(text_buf);
}

void PCUIF__rts__req::decode_text(Text_Buf& text_buf)
{
field_sapi.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_fn.decode_text(text_buf);
field_arfcn.decode_text(text_buf);
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
field_block__nr.decode_text(text_buf);
}

void PCUIF__rts__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__rts__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__rts__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__rts__req_sapi_descr_.raw->forceomit);
  decoded_field_length = field_sapi.RAW_decode(PCUIF__rts__req_sapi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__rts__req_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__rts__req_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__rts__req_fn_descr_.raw->forceomit);
  decoded_field_length = field_fn.RAW_decode(PCUIF__rts__req_fn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__rts__req_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn.RAW_decode(PCUIF__rts__req_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__rts__req_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__rts__req_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__rts__req_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(PCUIF__rts__req_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__rts__req_block__nr_descr_.raw->forceomit);
  decoded_field_length = field_block__nr.RAW_decode(PCUIF__rts__req_block__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__rts__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 7;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(7);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__rts__req_sapi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__rts__req_spare_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__rts__req_fn_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__rts__req_arfcn_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__rts__req_trx__nr_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__rts__req_ts__nr_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__rts__req_block__nr_descr_.raw);
  encoded_length += field_sapi.RAW_encode(PCUIF__rts__req_sapi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_spare.RAW_encode(PCUIF__rts__req_spare_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_fn.RAW_encode(PCUIF__rts__req_fn_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_arfcn.RAW_encode(PCUIF__rts__req_arfcn_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__rts__req_trx__nr_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_ts__nr.RAW_encode(PCUIF__rts__req_ts__nr_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_block__nr.RAW_encode(PCUIF__rts__req_block__nr_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct PCUIF__rts__req_template::single_value_struct {
PCUIF__Sapi_template field_sapi;
OCTETSTRING_template field_spare;
INTEGER_template field_fn;
INTEGER_template field_arfcn;
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
INTEGER_template field_block__nr;
};

void PCUIF__rts__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_sapi = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_fn = ANY_VALUE;
single_value->field_arfcn = ANY_VALUE;
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
single_value->field_block__nr = ANY_VALUE;
}
}
}

void PCUIF__rts__req_template::copy_value(const PCUIF__rts__req& other_value)
{
single_value = new single_value_struct;
if (other_value.sapi().is_bound()) {
  single_value->field_sapi = other_value.sapi();
} else {
  single_value->field_sapi.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.fn().is_bound()) {
  single_value->field_fn = other_value.fn();
} else {
  single_value->field_fn.clean_up();
}
if (other_value.arfcn().is_bound()) {
  single_value->field_arfcn = other_value.arfcn();
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
if (other_value.block__nr().is_bound()) {
  single_value->field_block__nr = other_value.block__nr();
} else {
  single_value->field_block__nr.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__rts__req_template::copy_template(const PCUIF__rts__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sapi().get_selection()) {
single_value->field_sapi = other_value.sapi();
} else {
single_value->field_sapi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fn().get_selection()) {
single_value->field_fn = other_value.fn();
} else {
single_value->field_fn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.block__nr().get_selection()) {
single_value->field_block__nr = other_value.block__nr();
} else {
single_value->field_block__nr.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__rts__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__rts__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__rts__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_rts_req.");
break;
}
set_selection(other_value);
}

PCUIF__rts__req_template::PCUIF__rts__req_template()
{
}

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

PCUIF__rts__req_template::PCUIF__rts__req_template(const PCUIF__rts__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__rts__req_template::match(const PCUIF__rts__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.sapi().is_bound()) return FALSE;
if(!single_value->field_sapi.match(other_value.sapi(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.fn().is_bound()) return FALSE;
if(!single_value->field_fn.match(other_value.fn(), legacy))return FALSE;
if(!other_value.arfcn().is_bound()) return FALSE;
if(!single_value->field_arfcn.match(other_value.arfcn(), legacy))return FALSE;
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
if(!other_value.block__nr().is_bound()) return FALSE;
if(!single_value->field_block__nr.match(other_value.block__nr(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_rts_req.");
}
return FALSE;
}

boolean PCUIF__rts__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sapi.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_fn.is_bound()
 || single_value->field_arfcn.is_bound()
 || single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound()
 || single_value->field_block__nr.is_bound();
}

boolean PCUIF__rts__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sapi.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_fn.is_value()
 && single_value->field_arfcn.is_value()
 && single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value()
 && single_value->field_block__nr.is_value();
}

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

PCUIF__rts__req PCUIF__rts__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
PCUIF__rts__req ret_val;
if (single_value->field_sapi.is_bound()) {
ret_val.sapi() = single_value->field_sapi.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_fn.is_bound()) {
ret_val.fn() = single_value->field_fn.valueof();
}
if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
if (single_value->field_block__nr.is_bound()) {
ret_val.block__nr() = single_value->field_block__nr.valueof();
}
return ret_val;
}

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

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

PCUIF__Sapi_template& PCUIF__rts__req_template::sapi()
{
set_specific();
return single_value->field_sapi;
}

const PCUIF__Sapi_template& PCUIF__rts__req_template::sapi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sapi of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_sapi;
}

OCTETSTRING_template& PCUIF__rts__req_template::spare()
{
set_specific();
return single_value->field_spare;
}

const OCTETSTRING_template& PCUIF__rts__req_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_spare;
}

INTEGER_template& PCUIF__rts__req_template::fn()
{
set_specific();
return single_value->field_fn;
}

const INTEGER_template& PCUIF__rts__req_template::fn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fn of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_fn;
}

INTEGER_template& PCUIF__rts__req_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PCUIF__rts__req_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_arfcn;
}

INTEGER_template& PCUIF__rts__req_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__rts__req_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_trx__nr;
}

INTEGER_template& PCUIF__rts__req_template::ts__nr()
{
set_specific();
return single_value->field_ts__nr;
}

const INTEGER_template& PCUIF__rts__req_template::ts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts_nr of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_ts__nr;
}

INTEGER_template& PCUIF__rts__req_template::block__nr()
{
set_specific();
return single_value->field_block__nr;
}

const INTEGER_template& PCUIF__rts__req_template::block__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field block_nr of a non-specific template of type @PCUIF_Types.PCUIF_rts_req.");
return single_value->field_block__nr;
}

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

void PCUIF__rts__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log();
TTCN_Logger::log_event_str(", block_nr := ");
single_value->field_block__nr.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__rts__req_template::log_match(const PCUIF__rts__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_sapi.match(match_value.sapi(), legacy)){
TTCN_Logger::log_logmatch_info(".sapi");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fn.match(match_value.fn(), legacy)){
TTCN_Logger::log_logmatch_info(".fn");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_block__nr.match(match_value.block__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".block_nr");
single_value->field_block__nr.log_match(match_value.block__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(", block_nr := ");
single_value->field_block__nr.log_match(match_value.block__nr(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__rts__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sapi().is_bound()) sapi().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (block__nr().is_bound()) block__nr().set_implicit_omit();
}

void PCUIF__rts__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_sapi.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_fn.encode_text(text_buf);
single_value->field_arfcn.encode_text(text_buf);
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_ts__nr.encode_text(text_buf);
single_value->field_block__nr.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 @PCUIF_Types.PCUIF_rts_req.");
}
}

void PCUIF__rts__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_sapi.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_fn.decode_text(text_buf);
single_value->field_arfcn.decode_text(text_buf);
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.decode_text(text_buf);
single_value->field_block__nr.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 PCUIF__rts__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_rts_req.");
}
}

void PCUIF__rts__req_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__rts__req_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (7<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_rts_req has 7 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) block__nr().set_param(*param.get_elem(6));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "block_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          block__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_rts_req: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__rts__req_template* precondition = new PCUIF__rts__req_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__rts__req_template* implied_template = new PCUIF__rts__req_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__rts__req_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_rts_req");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__rts__req_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_sapi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_fn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_trx__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_ts__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
single_value->field_block__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@PCUIF_Types.PCUIF_rts_req");
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__BurstType::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_BurstType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_BurstType comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__BurstType::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_BurstType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_BurstType comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__BurstType::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 @PCUIF_Types.PCUIF_BurstType.");
return enum_value < other_value;
}

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

boolean PCUIF__BurstType::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_BurstType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_BurstType comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__BurstType::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 @PCUIF_Types.PCUIF_BurstType.");
return enum_value > other_value;
}

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

const char *PCUIF__BurstType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case BURST__TYPE__NONE: return "BURST_TYPE_NONE";
case BURST__TYPE__0: return "BURST_TYPE_0";
case BURST__TYPE__1: return "BURST_TYPE_1";
case BURST__TYPE__2: return "BURST_TYPE_2";
default:
return "<unknown>";
}
}

PCUIF__BurstType::enum_type PCUIF__BurstType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "BURST_TYPE_NONE")) return BURST__TYPE__NONE;
if (!strcmp(str_par, "BURST_TYPE_0")) return BURST__TYPE__0;
if (!strcmp(str_par, "BURST_TYPE_1")) return BURST__TYPE__1;
if (!strcmp(str_par, "BURST_TYPE_2")) return BURST__TYPE__2;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__BurstType::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__BurstType::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 @PCUIF_Types.PCUIF_BurstType.", enum_value);
}

void PCUIF__BurstType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__BurstType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__BurstType::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, 3, 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 PCUIF__BurstType::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 3);
}

void PCUIF__BurstType_template::copy_template(const PCUIF__BurstType_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 PCUIF__BurstType_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 PCUIF__BurstType_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__BurstType_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 @PCUIF_Types.PCUIF_BurstType.");
}
}

PCUIF__BurstType_template::PCUIF__BurstType_template()
{
}

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

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

PCUIF__BurstType_template::PCUIF__BurstType_template(PCUIF__BurstType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__BurstType_template::match(PCUIF__BurstType::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 @PCUIF_Types.PCUIF_BurstType.");
}
return FALSE;
}

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

PCUIF__BurstType::enum_type PCUIF__BurstType_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 @PCUIF_Types.PCUIF_BurstType.");
return single_value;
}

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

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

void PCUIF__BurstType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__BurstType::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 PCUIF__BurstType_template::log_match(const PCUIF__BurstType& 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 PCUIF__BurstType_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 @PCUIF_Types.PCUIF_BurstType.");
}
}

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

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

boolean PCUIF__BurstType_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 PCUIF__BurstType_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: {
    PCUIF__BurstType_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: {
    PCUIF__BurstType::enum_type enum_val = PCUIF__BurstType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__BurstType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_BurstType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__BurstType_template* precondition = new PCUIF__BurstType_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__BurstType_template* implied_template = new PCUIF__BurstType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__BurstType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_BurstType");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__BurstType_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 : "@PCUIF_Types.PCUIF_BurstType");
}

PCUIF__rach__ind::PCUIF__rach__ind()
{
}

PCUIF__rach__ind::PCUIF__rach__ind(const PCUIF__Sapi& par_sapi,
    const INTEGER& par_ra,
    const INTEGER& par_qta,
    const INTEGER& par_fn,
    const INTEGER& par_arfcn,
    const INTEGER& par_is__11bit,
    const PCUIF__BurstType& par_burst__type,
    const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr)
  :   field_sapi(par_sapi),
  field_ra(par_ra),
  field_qta(par_qta),
  field_fn(par_fn),
  field_arfcn(par_arfcn),
  field_is__11bit(par_is__11bit),
  field_burst__type(par_burst__type),
  field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr)
{
}

PCUIF__rach__ind::PCUIF__rach__ind(const PCUIF__rach__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_rach_ind.");
if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
else field_sapi.clean_up();
if (other_value.ra().is_bound()) field_ra = other_value.ra();
else field_ra.clean_up();
if (other_value.qta().is_bound()) field_qta = other_value.qta();
else field_qta.clean_up();
if (other_value.fn().is_bound()) field_fn = other_value.fn();
else field_fn.clean_up();
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.is__11bit().is_bound()) field_is__11bit = other_value.is__11bit();
else field_is__11bit.clean_up();
if (other_value.burst__type().is_bound()) field_burst__type = other_value.burst__type();
else field_burst__type.clean_up();
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
}

void PCUIF__rach__ind::clean_up()
{
field_sapi.clean_up();
field_ra.clean_up();
field_qta.clean_up();
field_fn.clean_up();
field_arfcn.clean_up();
field_is__11bit.clean_up();
field_burst__type.clean_up();
field_trx__nr.clean_up();
field_ts__nr.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__rach__ind::get_descriptor() const { return &PCUIF__rach__ind_descr_; }
PCUIF__rach__ind& PCUIF__rach__ind::operator=(const PCUIF__rach__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_rach_ind.");
  if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
  else field_sapi.clean_up();
  if (other_value.ra().is_bound()) field_ra = other_value.ra();
  else field_ra.clean_up();
  if (other_value.qta().is_bound()) field_qta = other_value.qta();
  else field_qta.clean_up();
  if (other_value.fn().is_bound()) field_fn = other_value.fn();
  else field_fn.clean_up();
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.is__11bit().is_bound()) field_is__11bit = other_value.is__11bit();
  else field_is__11bit.clean_up();
  if (other_value.burst__type().is_bound()) field_burst__type = other_value.burst__type();
  else field_burst__type.clean_up();
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
}
return *this;
}

boolean PCUIF__rach__ind::operator==(const PCUIF__rach__ind& other_value) const
{
return field_sapi==other_value.field_sapi
  && field_ra==other_value.field_ra
  && field_qta==other_value.field_qta
  && field_fn==other_value.field_fn
  && field_arfcn==other_value.field_arfcn
  && field_is__11bit==other_value.field_is__11bit
  && field_burst__type==other_value.field_burst__type
  && field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr;
}

boolean PCUIF__rach__ind::is_bound() const
{
return (field_sapi.is_bound())
  || (field_ra.is_bound())
  || (field_qta.is_bound())
  || (field_fn.is_bound())
  || (field_arfcn.is_bound())
  || (field_is__11bit.is_bound())
  || (field_burst__type.is_bound())
  || (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound());
}
boolean PCUIF__rach__ind::is_value() const
{
return field_sapi.is_value()
  && field_ra.is_value()
  && field_qta.is_value()
  && field_fn.is_value()
  && field_arfcn.is_value()
  && field_is__11bit.is_value()
  && field_burst__type.is_value()
  && field_trx__nr.is_value()
  && field_ts__nr.is_value();
}
void PCUIF__rach__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sapi := ");
field_sapi.log();
TTCN_Logger::log_event_str(", ra := ");
field_ra.log();
TTCN_Logger::log_event_str(", qta := ");
field_qta.log();
TTCN_Logger::log_event_str(", fn := ");
field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", is_11bit := ");
field_is__11bit.log();
TTCN_Logger::log_event_str(", burst_type := ");
field_burst__type.log();
TTCN_Logger::log_event_str(", trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__rach__ind::set_implicit_omit()
{
if (sapi().is_bound()) sapi().set_implicit_omit();
if (ra().is_bound()) ra().set_implicit_omit();
if (qta().is_bound()) qta().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (is__11bit().is_bound()) is__11bit().set_implicit_omit();
if (burst__type().is_bound()) burst__type().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
}

void PCUIF__rach__ind::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (9<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_rach_ind has 9 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ra().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) qta().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) is__11bit().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) burst__type().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(8));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ra")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ra().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "qta")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          qta().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "is_11bit")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          is__11bit().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "burst_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          burst__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_rach_ind: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_rach_ind");
  }
}

void PCUIF__rach__ind::encode_text(Text_Buf& text_buf) const
{
field_sapi.encode_text(text_buf);
field_ra.encode_text(text_buf);
field_qta.encode_text(text_buf);
field_fn.encode_text(text_buf);
field_arfcn.encode_text(text_buf);
field_is__11bit.encode_text(text_buf);
field_burst__type.encode_text(text_buf);
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
}

void PCUIF__rach__ind::decode_text(Text_Buf& text_buf)
{
field_sapi.decode_text(text_buf);
field_ra.decode_text(text_buf);
field_qta.decode_text(text_buf);
field_fn.decode_text(text_buf);
field_arfcn.decode_text(text_buf);
field_is__11bit.decode_text(text_buf);
field_burst__type.decode_text(text_buf);
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
}

void PCUIF__rach__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__rach__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__rach__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__rach__ind_sapi_descr_.raw->forceomit);
  decoded_field_length = field_sapi.RAW_decode(PCUIF__rach__ind_sapi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__rach__ind_ra_descr_.raw->forceomit);
  decoded_field_length = field_ra.RAW_decode(PCUIF__rach__ind_ra_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__rach__ind_qta_descr_.raw->forceomit);
  decoded_field_length = field_qta.RAW_decode(PCUIF__rach__ind_qta_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__rach__ind_fn_descr_.raw->forceomit);
  decoded_field_length = field_fn.RAW_decode(PCUIF__rach__ind_fn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__rach__ind_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn.RAW_decode(PCUIF__rach__ind_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__rach__ind_is__11bit_descr_.raw->forceomit);
  decoded_field_length = field_is__11bit.RAW_decode(PCUIF__rach__ind_is__11bit_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__rach__ind_burst__type_descr_.raw->forceomit);
  decoded_field_length = field_burst__type.RAW_decode(PCUIF__rach__ind_burst__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PCUIF__rach__ind_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__rach__ind_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_8_force_omit(8, force_omit, PCUIF__rach__ind_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(PCUIF__rach__ind_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__rach__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 9;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(9);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__rach__ind_sapi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__rach__ind_ra_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__rach__ind_qta_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__rach__ind_fn_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__rach__ind_arfcn_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__rach__ind_is__11bit_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__rach__ind_burst__type_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PCUIF__rach__ind_trx__nr_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PCUIF__rach__ind_ts__nr_descr_.raw);
  encoded_length += field_sapi.RAW_encode(PCUIF__rach__ind_sapi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_ra.RAW_encode(PCUIF__rach__ind_ra_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_qta.RAW_encode(PCUIF__rach__ind_qta_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_fn.RAW_encode(PCUIF__rach__ind_fn_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_arfcn.RAW_encode(PCUIF__rach__ind_arfcn_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_is__11bit.RAW_encode(PCUIF__rach__ind_is__11bit_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_burst__type.RAW_encode(PCUIF__rach__ind_burst__type_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__rach__ind_trx__nr_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_ts__nr.RAW_encode(PCUIF__rach__ind_ts__nr_descr_, *myleaf.body.node.nodes[8]);
  return myleaf.length = encoded_length;
}

struct PCUIF__rach__ind_template::single_value_struct {
PCUIF__Sapi_template field_sapi;
INTEGER_template field_ra;
INTEGER_template field_qta;
INTEGER_template field_fn;
INTEGER_template field_arfcn;
INTEGER_template field_is__11bit;
PCUIF__BurstType_template field_burst__type;
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
};

void PCUIF__rach__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_sapi = ANY_VALUE;
single_value->field_ra = ANY_VALUE;
single_value->field_qta = ANY_VALUE;
single_value->field_fn = ANY_VALUE;
single_value->field_arfcn = ANY_VALUE;
single_value->field_is__11bit = ANY_VALUE;
single_value->field_burst__type = ANY_VALUE;
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
}
}
}

void PCUIF__rach__ind_template::copy_value(const PCUIF__rach__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.sapi().is_bound()) {
  single_value->field_sapi = other_value.sapi();
} else {
  single_value->field_sapi.clean_up();
}
if (other_value.ra().is_bound()) {
  single_value->field_ra = other_value.ra();
} else {
  single_value->field_ra.clean_up();
}
if (other_value.qta().is_bound()) {
  single_value->field_qta = other_value.qta();
} else {
  single_value->field_qta.clean_up();
}
if (other_value.fn().is_bound()) {
  single_value->field_fn = other_value.fn();
} else {
  single_value->field_fn.clean_up();
}
if (other_value.arfcn().is_bound()) {
  single_value->field_arfcn = other_value.arfcn();
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.is__11bit().is_bound()) {
  single_value->field_is__11bit = other_value.is__11bit();
} else {
  single_value->field_is__11bit.clean_up();
}
if (other_value.burst__type().is_bound()) {
  single_value->field_burst__type = other_value.burst__type();
} else {
  single_value->field_burst__type.clean_up();
}
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__rach__ind_template::copy_template(const PCUIF__rach__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sapi().get_selection()) {
single_value->field_sapi = other_value.sapi();
} else {
single_value->field_sapi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ra().get_selection()) {
single_value->field_ra = other_value.ra();
} else {
single_value->field_ra.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.qta().get_selection()) {
single_value->field_qta = other_value.qta();
} else {
single_value->field_qta.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fn().get_selection()) {
single_value->field_fn = other_value.fn();
} else {
single_value->field_fn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.is__11bit().get_selection()) {
single_value->field_is__11bit = other_value.is__11bit();
} else {
single_value->field_is__11bit.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.burst__type().get_selection()) {
single_value->field_burst__type = other_value.burst__type();
} else {
single_value->field_burst__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__rach__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__rach__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__rach__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_rach_ind.");
break;
}
set_selection(other_value);
}

PCUIF__rach__ind_template::PCUIF__rach__ind_template()
{
}

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

PCUIF__rach__ind_template::PCUIF__rach__ind_template(const PCUIF__rach__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__rach__ind_template::match(const PCUIF__rach__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.sapi().is_bound()) return FALSE;
if(!single_value->field_sapi.match(other_value.sapi(), legacy))return FALSE;
if(!other_value.ra().is_bound()) return FALSE;
if(!single_value->field_ra.match(other_value.ra(), legacy))return FALSE;
if(!other_value.qta().is_bound()) return FALSE;
if(!single_value->field_qta.match(other_value.qta(), legacy))return FALSE;
if(!other_value.fn().is_bound()) return FALSE;
if(!single_value->field_fn.match(other_value.fn(), legacy))return FALSE;
if(!other_value.arfcn().is_bound()) return FALSE;
if(!single_value->field_arfcn.match(other_value.arfcn(), legacy))return FALSE;
if(!other_value.is__11bit().is_bound()) return FALSE;
if(!single_value->field_is__11bit.match(other_value.is__11bit(), legacy))return FALSE;
if(!other_value.burst__type().is_bound()) return FALSE;
if(!single_value->field_burst__type.match(other_value.burst__type(), legacy))return FALSE;
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_rach_ind.");
}
return FALSE;
}

boolean PCUIF__rach__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sapi.is_bound()
 || single_value->field_ra.is_bound()
 || single_value->field_qta.is_bound()
 || single_value->field_fn.is_bound()
 || single_value->field_arfcn.is_bound()
 || single_value->field_is__11bit.is_bound()
 || single_value->field_burst__type.is_bound()
 || single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound();
}

boolean PCUIF__rach__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sapi.is_value()
 && single_value->field_ra.is_value()
 && single_value->field_qta.is_value()
 && single_value->field_fn.is_value()
 && single_value->field_arfcn.is_value()
 && single_value->field_is__11bit.is_value()
 && single_value->field_burst__type.is_value()
 && single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value();
}

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

PCUIF__rach__ind PCUIF__rach__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
PCUIF__rach__ind ret_val;
if (single_value->field_sapi.is_bound()) {
ret_val.sapi() = single_value->field_sapi.valueof();
}
if (single_value->field_ra.is_bound()) {
ret_val.ra() = single_value->field_ra.valueof();
}
if (single_value->field_qta.is_bound()) {
ret_val.qta() = single_value->field_qta.valueof();
}
if (single_value->field_fn.is_bound()) {
ret_val.fn() = single_value->field_fn.valueof();
}
if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_is__11bit.is_bound()) {
ret_val.is__11bit() = single_value->field_is__11bit.valueof();
}
if (single_value->field_burst__type.is_bound()) {
ret_val.burst__type() = single_value->field_burst__type.valueof();
}
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
return ret_val;
}

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

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

PCUIF__Sapi_template& PCUIF__rach__ind_template::sapi()
{
set_specific();
return single_value->field_sapi;
}

const PCUIF__Sapi_template& PCUIF__rach__ind_template::sapi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sapi of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_sapi;
}

INTEGER_template& PCUIF__rach__ind_template::ra()
{
set_specific();
return single_value->field_ra;
}

const INTEGER_template& PCUIF__rach__ind_template::ra() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ra of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_ra;
}

INTEGER_template& PCUIF__rach__ind_template::qta()
{
set_specific();
return single_value->field_qta;
}

const INTEGER_template& PCUIF__rach__ind_template::qta() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field qta of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_qta;
}

INTEGER_template& PCUIF__rach__ind_template::fn()
{
set_specific();
return single_value->field_fn;
}

const INTEGER_template& PCUIF__rach__ind_template::fn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fn of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_fn;
}

INTEGER_template& PCUIF__rach__ind_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PCUIF__rach__ind_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_arfcn;
}

INTEGER_template& PCUIF__rach__ind_template::is__11bit()
{
set_specific();
return single_value->field_is__11bit;
}

const INTEGER_template& PCUIF__rach__ind_template::is__11bit() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field is_11bit of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_is__11bit;
}

PCUIF__BurstType_template& PCUIF__rach__ind_template::burst__type()
{
set_specific();
return single_value->field_burst__type;
}

const PCUIF__BurstType_template& PCUIF__rach__ind_template::burst__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field burst_type of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_burst__type;
}

INTEGER_template& PCUIF__rach__ind_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__rach__ind_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_trx__nr;
}

INTEGER_template& PCUIF__rach__ind_template::ts__nr()
{
set_specific();
return single_value->field_ts__nr;
}

const INTEGER_template& PCUIF__rach__ind_template::ts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts_nr of a non-specific template of type @PCUIF_Types.PCUIF_rach_ind.");
return single_value->field_ts__nr;
}

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

void PCUIF__rach__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log();
TTCN_Logger::log_event_str(", ra := ");
single_value->field_ra.log();
TTCN_Logger::log_event_str(", qta := ");
single_value->field_qta.log();
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log();
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", is_11bit := ");
single_value->field_is__11bit.log();
TTCN_Logger::log_event_str(", burst_type := ");
single_value->field_burst__type.log();
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__rach__ind_template::log_match(const PCUIF__rach__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_sapi.match(match_value.sapi(), legacy)){
TTCN_Logger::log_logmatch_info(".sapi");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ra.match(match_value.ra(), legacy)){
TTCN_Logger::log_logmatch_info(".ra");
single_value->field_ra.log_match(match_value.ra(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_qta.match(match_value.qta(), legacy)){
TTCN_Logger::log_logmatch_info(".qta");
single_value->field_qta.log_match(match_value.qta(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fn.match(match_value.fn(), legacy)){
TTCN_Logger::log_logmatch_info(".fn");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_is__11bit.match(match_value.is__11bit(), legacy)){
TTCN_Logger::log_logmatch_info(".is_11bit");
single_value->field_is__11bit.log_match(match_value.is__11bit(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_burst__type.match(match_value.burst__type(), legacy)){
TTCN_Logger::log_logmatch_info(".burst_type");
single_value->field_burst__type.log_match(match_value.burst__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::log_event_str(", ra := ");
single_value->field_ra.log_match(match_value.ra(), legacy);
TTCN_Logger::log_event_str(", qta := ");
single_value->field_qta.log_match(match_value.qta(), legacy);
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::log_event_str(", is_11bit := ");
single_value->field_is__11bit.log_match(match_value.is__11bit(), legacy);
TTCN_Logger::log_event_str(", burst_type := ");
single_value->field_burst__type.log_match(match_value.burst__type(), legacy);
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__rach__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sapi().is_bound()) sapi().set_implicit_omit();
if (ra().is_bound()) ra().set_implicit_omit();
if (qta().is_bound()) qta().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (is__11bit().is_bound()) is__11bit().set_implicit_omit();
if (burst__type().is_bound()) burst__type().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
}

void PCUIF__rach__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_sapi.encode_text(text_buf);
single_value->field_ra.encode_text(text_buf);
single_value->field_qta.encode_text(text_buf);
single_value->field_fn.encode_text(text_buf);
single_value->field_arfcn.encode_text(text_buf);
single_value->field_is__11bit.encode_text(text_buf);
single_value->field_burst__type.encode_text(text_buf);
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_ts__nr.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 @PCUIF_Types.PCUIF_rach_ind.");
}
}

void PCUIF__rach__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_sapi.decode_text(text_buf);
single_value->field_ra.decode_text(text_buf);
single_value->field_qta.decode_text(text_buf);
single_value->field_fn.decode_text(text_buf);
single_value->field_arfcn.decode_text(text_buf);
single_value->field_is__11bit.decode_text(text_buf);
single_value->field_burst__type.decode_text(text_buf);
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.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 PCUIF__rach__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_rach_ind.");
}
}

void PCUIF__rach__ind_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__rach__ind_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (9<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_rach_ind has 9 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sapi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ra().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) qta().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) fn().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) is__11bit().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) burst__type().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(8));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sapi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sapi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ra")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ra().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "qta")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          qta().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "is_11bit")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          is__11bit().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "burst_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          burst__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_rach_ind: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__rach__ind_template* precondition = new PCUIF__rach__ind_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__rach__ind_template* implied_template = new PCUIF__rach__ind_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__rach__ind_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_rach_ind");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__rach__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_sapi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_ra.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_qta.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_fn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_is__11bit.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_burst__type.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_trx__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
single_value->field_ts__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@PCUIF_Types.PCUIF_rach_ind");
}

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

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

PCUIF__InfoTrxTs::PCUIF__InfoTrxTs()
{
}

PCUIF__InfoTrxTs::PCUIF__InfoTrxTs(const INTEGER& par_tsc,
    const INTEGER& par_hopping,
    const INTEGER& par_hsn,
    const INTEGER& par_maio,
    const INTEGER& par_ma__bit__len,
    const BITSTRING& par_ma)
  :   field_tsc(par_tsc),
  field_hopping(par_hopping),
  field_hsn(par_hsn),
  field_maio(par_maio),
  field_ma__bit__len(par_ma__bit__len),
  field_ma(par_ma)
{
}

PCUIF__InfoTrxTs::PCUIF__InfoTrxTs(const PCUIF__InfoTrxTs& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTs.");
if (other_value.tsc().is_bound()) field_tsc = other_value.tsc();
else field_tsc.clean_up();
if (other_value.hopping().is_bound()) field_hopping = other_value.hopping();
else field_hopping.clean_up();
if (other_value.hsn().is_bound()) field_hsn = other_value.hsn();
else field_hsn.clean_up();
if (other_value.maio().is_bound()) field_maio = other_value.maio();
else field_maio.clean_up();
if (other_value.ma__bit__len().is_bound()) field_ma__bit__len = other_value.ma__bit__len();
else field_ma__bit__len.clean_up();
if (other_value.ma().is_bound()) field_ma = other_value.ma();
else field_ma.clean_up();
}

void PCUIF__InfoTrxTs::clean_up()
{
field_tsc.clean_up();
field_hopping.clean_up();
field_hsn.clean_up();
field_maio.clean_up();
field_ma__bit__len.clean_up();
field_ma.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__InfoTrxTs::get_descriptor() const { return &PCUIF__InfoTrxTs_descr_; }
PCUIF__InfoTrxTs& PCUIF__InfoTrxTs::operator=(const PCUIF__InfoTrxTs& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTs.");
  if (other_value.tsc().is_bound()) field_tsc = other_value.tsc();
  else field_tsc.clean_up();
  if (other_value.hopping().is_bound()) field_hopping = other_value.hopping();
  else field_hopping.clean_up();
  if (other_value.hsn().is_bound()) field_hsn = other_value.hsn();
  else field_hsn.clean_up();
  if (other_value.maio().is_bound()) field_maio = other_value.maio();
  else field_maio.clean_up();
  if (other_value.ma__bit__len().is_bound()) field_ma__bit__len = other_value.ma__bit__len();
  else field_ma__bit__len.clean_up();
  if (other_value.ma().is_bound()) field_ma = other_value.ma();
  else field_ma.clean_up();
}
return *this;
}

boolean PCUIF__InfoTrxTs::operator==(const PCUIF__InfoTrxTs& other_value) const
{
return field_tsc==other_value.field_tsc
  && field_hopping==other_value.field_hopping
  && field_hsn==other_value.field_hsn
  && field_maio==other_value.field_maio
  && field_ma__bit__len==other_value.field_ma__bit__len
  && field_ma==other_value.field_ma;
}

boolean PCUIF__InfoTrxTs::is_bound() const
{
return (field_tsc.is_bound())
  || (field_hopping.is_bound())
  || (field_hsn.is_bound())
  || (field_maio.is_bound())
  || (field_ma__bit__len.is_bound())
  || (field_ma.is_bound());
}
boolean PCUIF__InfoTrxTs::is_value() const
{
return field_tsc.is_value()
  && field_hopping.is_value()
  && field_hsn.is_value()
  && field_maio.is_value()
  && field_ma__bit__len.is_value()
  && field_ma.is_value();
}
void PCUIF__InfoTrxTs::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tsc := ");
field_tsc.log();
TTCN_Logger::log_event_str(", hopping := ");
field_hopping.log();
TTCN_Logger::log_event_str(", hsn := ");
field_hsn.log();
TTCN_Logger::log_event_str(", maio := ");
field_maio.log();
TTCN_Logger::log_event_str(", ma_bit_len := ");
field_ma__bit__len.log();
TTCN_Logger::log_event_str(", ma := ");
field_ma.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__InfoTrxTs::set_implicit_omit()
{
if (tsc().is_bound()) tsc().set_implicit_omit();
if (hopping().is_bound()) hopping().set_implicit_omit();
if (hsn().is_bound()) hsn().set_implicit_omit();
if (maio().is_bound()) maio().set_implicit_omit();
if (ma__bit__len().is_bound()) ma__bit__len().set_implicit_omit();
if (ma().is_bound()) ma().set_implicit_omit();
}

void PCUIF__InfoTrxTs::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (6<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_InfoTrxTs has 6 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) tsc().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) hopping().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) hsn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) maio().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ma__bit__len().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ma().set_param(*param.get_elem(5));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tsc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tsc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hopping")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hopping().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hsn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hsn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maio")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maio().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ma_bit_len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ma__bit__len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ma")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ma().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_InfoTrxTs: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_InfoTrxTs");
  }
}

void PCUIF__InfoTrxTs::encode_text(Text_Buf& text_buf) const
{
field_tsc.encode_text(text_buf);
field_hopping.encode_text(text_buf);
field_hsn.encode_text(text_buf);
field_maio.encode_text(text_buf);
field_ma__bit__len.encode_text(text_buf);
field_ma.encode_text(text_buf);
}

void PCUIF__InfoTrxTs::decode_text(Text_Buf& text_buf)
{
field_tsc.decode_text(text_buf);
field_hopping.decode_text(text_buf);
field_hsn.decode_text(text_buf);
field_maio.decode_text(text_buf);
field_ma__bit__len.decode_text(text_buf);
field_ma.decode_text(text_buf);
}

void PCUIF__InfoTrxTs::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__InfoTrxTs::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__InfoTrxTs::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__InfoTrxTs_tsc_descr_.raw->forceomit);
  decoded_field_length = field_tsc.RAW_decode(PCUIF__InfoTrxTs_tsc_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__InfoTrxTs_hopping_descr_.raw->forceomit);
  decoded_field_length = field_hopping.RAW_decode(PCUIF__InfoTrxTs_hopping_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__InfoTrxTs_hsn_descr_.raw->forceomit);
  decoded_field_length = field_hsn.RAW_decode(PCUIF__InfoTrxTs_hsn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__InfoTrxTs_maio_descr_.raw->forceomit);
  decoded_field_length = field_maio.RAW_decode(PCUIF__InfoTrxTs_maio_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__InfoTrxTs_ma__bit__len_descr_.raw->forceomit);
  decoded_field_length = field_ma__bit__len.RAW_decode(PCUIF__InfoTrxTs_ma__bit__len_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__InfoTrxTs_ma_descr_.raw->forceomit);
  decoded_field_length = field_ma.RAW_decode(PCUIF__InfoTrxTs_ma_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__InfoTrxTs::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 6;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__InfoTrxTs_tsc_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__InfoTrxTs_hopping_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__InfoTrxTs_hsn_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__InfoTrxTs_maio_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__InfoTrxTs_ma__bit__len_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__InfoTrxTs_ma_descr_.raw);
  encoded_length += field_tsc.RAW_encode(PCUIF__InfoTrxTs_tsc_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_hopping.RAW_encode(PCUIF__InfoTrxTs_hopping_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_hsn.RAW_encode(PCUIF__InfoTrxTs_hsn_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_maio.RAW_encode(PCUIF__InfoTrxTs_maio_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_ma__bit__len.RAW_encode(PCUIF__InfoTrxTs_ma__bit__len_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_ma.RAW_encode(PCUIF__InfoTrxTs_ma_descr_, *myleaf.body.node.nodes[5]);
  return myleaf.length = encoded_length;
}

struct PCUIF__InfoTrxTs_template::single_value_struct {
INTEGER_template field_tsc;
INTEGER_template field_hopping;
INTEGER_template field_hsn;
INTEGER_template field_maio;
INTEGER_template field_ma__bit__len;
BITSTRING_template field_ma;
};

void PCUIF__InfoTrxTs_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_tsc = ANY_VALUE;
single_value->field_hopping = ANY_VALUE;
single_value->field_hsn = ANY_VALUE;
single_value->field_maio = ANY_VALUE;
single_value->field_ma__bit__len = ANY_VALUE;
single_value->field_ma = ANY_VALUE;
}
}
}

void PCUIF__InfoTrxTs_template::copy_value(const PCUIF__InfoTrxTs& other_value)
{
single_value = new single_value_struct;
if (other_value.tsc().is_bound()) {
  single_value->field_tsc = other_value.tsc();
} else {
  single_value->field_tsc.clean_up();
}
if (other_value.hopping().is_bound()) {
  single_value->field_hopping = other_value.hopping();
} else {
  single_value->field_hopping.clean_up();
}
if (other_value.hsn().is_bound()) {
  single_value->field_hsn = other_value.hsn();
} else {
  single_value->field_hsn.clean_up();
}
if (other_value.maio().is_bound()) {
  single_value->field_maio = other_value.maio();
} else {
  single_value->field_maio.clean_up();
}
if (other_value.ma__bit__len().is_bound()) {
  single_value->field_ma__bit__len = other_value.ma__bit__len();
} else {
  single_value->field_ma__bit__len.clean_up();
}
if (other_value.ma().is_bound()) {
  single_value->field_ma = other_value.ma();
} else {
  single_value->field_ma.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__InfoTrxTs_template::copy_template(const PCUIF__InfoTrxTs_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tsc().get_selection()) {
single_value->field_tsc = other_value.tsc();
} else {
single_value->field_tsc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hopping().get_selection()) {
single_value->field_hopping = other_value.hopping();
} else {
single_value->field_hopping.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hsn().get_selection()) {
single_value->field_hsn = other_value.hsn();
} else {
single_value->field_hsn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.maio().get_selection()) {
single_value->field_maio = other_value.maio();
} else {
single_value->field_maio.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ma__bit__len().get_selection()) {
single_value->field_ma__bit__len = other_value.ma__bit__len();
} else {
single_value->field_ma__bit__len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ma().get_selection()) {
single_value->field_ma = other_value.ma();
} else {
single_value->field_ma.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__InfoTrxTs_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 @PCUIF_Types.PCUIF_InfoTrxTs.");
break;
}
set_selection(other_value);
}

PCUIF__InfoTrxTs_template::PCUIF__InfoTrxTs_template()
{
}

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

PCUIF__InfoTrxTs_template::PCUIF__InfoTrxTs_template(const PCUIF__InfoTrxTs& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__InfoTrxTs_template& PCUIF__InfoTrxTs_template::operator=(const OPTIONAL<PCUIF__InfoTrxTs>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__InfoTrxTs&)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 @PCUIF_Types.PCUIF_InfoTrxTs.");
}
return *this;
}

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

boolean PCUIF__InfoTrxTs_template::match(const PCUIF__InfoTrxTs& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.tsc().is_bound()) return FALSE;
if(!single_value->field_tsc.match(other_value.tsc(), legacy))return FALSE;
if(!other_value.hopping().is_bound()) return FALSE;
if(!single_value->field_hopping.match(other_value.hopping(), legacy))return FALSE;
if(!other_value.hsn().is_bound()) return FALSE;
if(!single_value->field_hsn.match(other_value.hsn(), legacy))return FALSE;
if(!other_value.maio().is_bound()) return FALSE;
if(!single_value->field_maio.match(other_value.maio(), legacy))return FALSE;
if(!other_value.ma__bit__len().is_bound()) return FALSE;
if(!single_value->field_ma__bit__len.match(other_value.ma__bit__len(), legacy))return FALSE;
if(!other_value.ma().is_bound()) return FALSE;
if(!single_value->field_ma.match(other_value.ma(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
}
return FALSE;
}

boolean PCUIF__InfoTrxTs_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tsc.is_bound()
 || single_value->field_hopping.is_bound()
 || single_value->field_hsn.is_bound()
 || single_value->field_maio.is_bound()
 || single_value->field_ma__bit__len.is_bound()
 || single_value->field_ma.is_bound();
}

boolean PCUIF__InfoTrxTs_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tsc.is_value()
 && single_value->field_hopping.is_value()
 && single_value->field_hsn.is_value()
 && single_value->field_maio.is_value()
 && single_value->field_ma__bit__len.is_value()
 && single_value->field_ma.is_value();
}

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

PCUIF__InfoTrxTs PCUIF__InfoTrxTs_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 @PCUIF_Types.PCUIF_InfoTrxTs.");
PCUIF__InfoTrxTs ret_val;
if (single_value->field_tsc.is_bound()) {
ret_val.tsc() = single_value->field_tsc.valueof();
}
if (single_value->field_hopping.is_bound()) {
ret_val.hopping() = single_value->field_hopping.valueof();
}
if (single_value->field_hsn.is_bound()) {
ret_val.hsn() = single_value->field_hsn.valueof();
}
if (single_value->field_maio.is_bound()) {
ret_val.maio() = single_value->field_maio.valueof();
}
if (single_value->field_ma__bit__len.is_bound()) {
ret_val.ma__bit__len() = single_value->field_ma__bit__len.valueof();
}
if (single_value->field_ma.is_bound()) {
ret_val.ma() = single_value->field_ma.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__InfoTrxTs_template::tsc()
{
set_specific();
return single_value->field_tsc;
}

const INTEGER_template& PCUIF__InfoTrxTs_template::tsc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tsc of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_tsc;
}

INTEGER_template& PCUIF__InfoTrxTs_template::hopping()
{
set_specific();
return single_value->field_hopping;
}

const INTEGER_template& PCUIF__InfoTrxTs_template::hopping() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hopping of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_hopping;
}

INTEGER_template& PCUIF__InfoTrxTs_template::hsn()
{
set_specific();
return single_value->field_hsn;
}

const INTEGER_template& PCUIF__InfoTrxTs_template::hsn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hsn of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_hsn;
}

INTEGER_template& PCUIF__InfoTrxTs_template::maio()
{
set_specific();
return single_value->field_maio;
}

const INTEGER_template& PCUIF__InfoTrxTs_template::maio() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field maio of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_maio;
}

INTEGER_template& PCUIF__InfoTrxTs_template::ma__bit__len()
{
set_specific();
return single_value->field_ma__bit__len;
}

const INTEGER_template& PCUIF__InfoTrxTs_template::ma__bit__len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ma_bit_len of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_ma__bit__len;
}

BITSTRING_template& PCUIF__InfoTrxTs_template::ma()
{
set_specific();
return single_value->field_ma;
}

const BITSTRING_template& PCUIF__InfoTrxTs_template::ma() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ma of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
return single_value->field_ma;
}

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

void PCUIF__InfoTrxTs_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tsc := ");
single_value->field_tsc.log();
TTCN_Logger::log_event_str(", hopping := ");
single_value->field_hopping.log();
TTCN_Logger::log_event_str(", hsn := ");
single_value->field_hsn.log();
TTCN_Logger::log_event_str(", maio := ");
single_value->field_maio.log();
TTCN_Logger::log_event_str(", ma_bit_len := ");
single_value->field_ma__bit__len.log();
TTCN_Logger::log_event_str(", ma := ");
single_value->field_ma.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__InfoTrxTs_template::log_match(const PCUIF__InfoTrxTs& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_tsc.match(match_value.tsc(), legacy)){
TTCN_Logger::log_logmatch_info(".tsc");
single_value->field_tsc.log_match(match_value.tsc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_hopping.match(match_value.hopping(), legacy)){
TTCN_Logger::log_logmatch_info(".hopping");
single_value->field_hopping.log_match(match_value.hopping(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_hsn.match(match_value.hsn(), legacy)){
TTCN_Logger::log_logmatch_info(".hsn");
single_value->field_hsn.log_match(match_value.hsn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_maio.match(match_value.maio(), legacy)){
TTCN_Logger::log_logmatch_info(".maio");
single_value->field_maio.log_match(match_value.maio(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ma__bit__len.match(match_value.ma__bit__len(), legacy)){
TTCN_Logger::log_logmatch_info(".ma_bit_len");
single_value->field_ma__bit__len.log_match(match_value.ma__bit__len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ma.match(match_value.ma(), legacy)){
TTCN_Logger::log_logmatch_info(".ma");
single_value->field_ma.log_match(match_value.ma(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ tsc := ");
single_value->field_tsc.log_match(match_value.tsc(), legacy);
TTCN_Logger::log_event_str(", hopping := ");
single_value->field_hopping.log_match(match_value.hopping(), legacy);
TTCN_Logger::log_event_str(", hsn := ");
single_value->field_hsn.log_match(match_value.hsn(), legacy);
TTCN_Logger::log_event_str(", maio := ");
single_value->field_maio.log_match(match_value.maio(), legacy);
TTCN_Logger::log_event_str(", ma_bit_len := ");
single_value->field_ma__bit__len.log_match(match_value.ma__bit__len(), legacy);
TTCN_Logger::log_event_str(", ma := ");
single_value->field_ma.log_match(match_value.ma(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__InfoTrxTs_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tsc().is_bound()) tsc().set_implicit_omit();
if (hopping().is_bound()) hopping().set_implicit_omit();
if (hsn().is_bound()) hsn().set_implicit_omit();
if (maio().is_bound()) maio().set_implicit_omit();
if (ma__bit__len().is_bound()) ma__bit__len().set_implicit_omit();
if (ma().is_bound()) ma().set_implicit_omit();
}

void PCUIF__InfoTrxTs_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tsc.encode_text(text_buf);
single_value->field_hopping.encode_text(text_buf);
single_value->field_hsn.encode_text(text_buf);
single_value->field_maio.encode_text(text_buf);
single_value->field_ma__bit__len.encode_text(text_buf);
single_value->field_ma.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 @PCUIF_Types.PCUIF_InfoTrxTs.");
}
}

void PCUIF__InfoTrxTs_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_tsc.decode_text(text_buf);
single_value->field_hopping.decode_text(text_buf);
single_value->field_hsn.decode_text(text_buf);
single_value->field_maio.decode_text(text_buf);
single_value->field_ma__bit__len.decode_text(text_buf);
single_value->field_ma.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 PCUIF__InfoTrxTs_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_InfoTrxTs.");
}
}

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

void PCUIF__InfoTrxTs_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_tsc.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
single_value->field_hopping.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
single_value->field_hsn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
single_value->field_maio.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
single_value->field_ma__bit__len.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
single_value->field_ma.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrxTs");
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 : "@PCUIF_Types.PCUIF_InfoTrxTs");
}

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

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


const PCUIF__InfoTrxTs PCUIF__InfoTrxTsList::UNBOUND_ELEM;
PCUIF__InfoTrxTsList::PCUIF__InfoTrxTsList()
{
val_ptr = NULL;
}

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

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

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

void PCUIF__InfoTrxTsList::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.");
}
}

PCUIF__InfoTrxTsList& PCUIF__InfoTrxTsList::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;
}

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

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

boolean PCUIF__InfoTrxTsList::operator==(const PCUIF__InfoTrxTsList& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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;
}

PCUIF__InfoTrxTs& PCUIF__InfoTrxTsList::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_InfoTrxTsList 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 = (PCUIF__InfoTrxTs**)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 PCUIF__InfoTrxTs(*(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 PCUIF__InfoTrxTs;
}
return *val_ptr->value_elements[index_value];
}

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

const PCUIF__InfoTrxTs& PCUIF__InfoTrxTsList::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_InfoTrxTsList using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @PCUIF_Types.PCUIF_InfoTrxTsList: 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 PCUIF__InfoTrxTs& PCUIF__InfoTrxTsList::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
return (*this)[(int)index_value];
}

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

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

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

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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;
PCUIF__InfoTrxTsList 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 PCUIF__InfoTrxTs(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList::operator+(const PCUIF__InfoTrxTsList& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @PCUIF_Types.PCUIF_InfoTrxTsList concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
PCUIF__InfoTrxTsList 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 PCUIF__InfoTrxTs(*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 PCUIF__InfoTrxTs(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@PCUIF_Types.PCUIF_InfoTrxTsList","element");
PCUIF__InfoTrxTsList 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 PCUIF__InfoTrxTs(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList::replace(int index, int len, const PCUIF__InfoTrxTsList& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
check_replace_arguments(val_ptr->n_elements, index, len, "@PCUIF_Types.PCUIF_InfoTrxTsList","element");
PCUIF__InfoTrxTsList 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 PCUIF__InfoTrxTs(*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 PCUIF__InfoTrxTs(*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 PCUIF__InfoTrxTs(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList::replace(int index, int len, const PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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 = (PCUIF__InfoTrxTs**)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 PCUIF__InfoTrxTs(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (PCUIF__InfoTrxTs**)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 @PCUIF_Types.PCUIF_InfoTrxTsList: %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 = (PCUIF__InfoTrxTs**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean PCUIF__InfoTrxTsList::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 PCUIF__InfoTrxTsList::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
return val_ptr->n_elements;
}

int PCUIF__InfoTrxTsList::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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 PCUIF__InfoTrxTsList::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 PCUIF__InfoTrxTsList::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 PCUIF__InfoTrxTsList::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", "@PCUIF_Types.PCUIF_InfoTrxTsList");
    }
    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", "@PCUIF_Types.PCUIF_InfoTrxTsList");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void PCUIF__InfoTrxTsList::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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 PCUIF__InfoTrxTsList::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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
val_ptr->value_elements = (PCUIF__InfoTrxTs**)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 PCUIF__InfoTrxTs;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void PCUIF__InfoTrxTsList::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__InfoTrxTsList::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__InfoTrxTsList::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 PCUIF__InfoTrxTsList::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 PCUIF__InfoTrxTsList_template::copy_value(const PCUIF__InfoTrxTsList& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @PCUIF_Types.PCUIF_InfoTrxTsList with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__InfoTrxTs_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__InfoTrxTsList_template::copy_template(const PCUIF__InfoTrxTsList_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 = (PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
break;
}
set_selection(other_value);
}

boolean PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const PCUIF__InfoTrxTsList*)value_ptr)[value_index], legacy);
else return ((const PCUIF__InfoTrxTsList_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

PCUIF__InfoTrxTsList_template::PCUIF__InfoTrxTsList_template()
{
}

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

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

PCUIF__InfoTrxTsList_template::PCUIF__InfoTrxTsList_template(const PCUIF__InfoTrxTsList& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

PCUIF__InfoTrxTsList_template& PCUIF__InfoTrxTsList_template::operator=(const OPTIONAL<PCUIF__InfoTrxTsList>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__InfoTrxTsList&)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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
}
return *this;
}

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

PCUIF__InfoTrxTs_template& PCUIF__InfoTrxTsList_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
    break;
}
return *single_value.value_elements[index_value];
}

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

const PCUIF__InfoTrxTs_template& PCUIF__InfoTrxTsList_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_InfoTrxTsList using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @PCUIF_Types.PCUIF_InfoTrxTsList.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @PCUIF_Types.PCUIF_InfoTrxTsList: 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 PCUIF__InfoTrxTs_template& PCUIF__InfoTrxTsList_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
return (*this)[(int)index_value];
}

void PCUIF__InfoTrxTsList_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
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 = (PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_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 = (PCUIF__InfoTrxTs_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList 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 @PCUIF_Types.PCUIF_InfoTrxTsList containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_InfoTrxTsList.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @PCUIF_Types.PCUIF_InfoTrxTsList");
}

boolean PCUIF__InfoTrxTsList_template::match(const PCUIF__InfoTrxTsList& 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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
}
return FALSE;
}

boolean PCUIF__InfoTrxTsList_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;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
PCUIF__InfoTrxTsList 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;
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList_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);
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList_template::replace(int index, int len, const PCUIF__InfoTrxTsList_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());
}

PCUIF__InfoTrxTsList PCUIF__InfoTrxTsList_template::replace(int index, int len, const PCUIF__InfoTrxTsList& 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 PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
}
set_selection(template_type);
}

PCUIF__InfoTrxTsList_template& PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @PCUIF_Types.PCUIF_InfoTrxTsList.");
return value_list.list_value[list_index];
}

void PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_template::log_match(const PCUIF__InfoTrxTsList& 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 PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
}
}

void PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
single_value.value_elements = (PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTs_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 PCUIF__InfoTrxTsList_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 @PCUIF_Types.PCUIF_InfoTrxTsList.");
}
}

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

boolean PCUIF__InfoTrxTsList_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 PCUIF__InfoTrxTsList_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
for (int i = 0; i < single_value.n_elements; i++) {
if (single_value.value_elements[i] != NULL) single_value.value_elements[i]->set_implicit_omit();
}
}

void PCUIF__InfoTrxTsList_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: {
    PCUIF__InfoTrxTsList_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: {
    PCUIF__InfoTrxTsList_template* precondition = new PCUIF__InfoTrxTsList_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__InfoTrxTsList_template* implied_template = new PCUIF__InfoTrxTsList_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__InfoTrxTsList_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@PCUIF_Types.PCUIF_InfoTrxTsList");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void PCUIF__InfoTrxTsList_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 : "@PCUIF_Types.PCUIF_InfoTrxTsList");
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 : "@PCUIF_Types.PCUIF_InfoTrxTsList");
}

boolean PCUIF__InfoTrxTsList_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);
}
}
PCUIF__InfoTrx::PCUIF__InfoTrx()
{
}

PCUIF__InfoTrx::PCUIF__InfoTrx(const INTEGER& par_arfcn,
    const BITSTRING& par_pdch__mask,
    const OCTETSTRING& par_spare,
    const INTEGER& par_hLayer1,
    const PCUIF__InfoTrxTsList& par_ts)
  :   field_arfcn(par_arfcn),
  field_pdch__mask(par_pdch__mask),
  field_spare(par_spare),
  field_hLayer1(par_hLayer1),
  field_ts(par_ts)
{
}

PCUIF__InfoTrx::PCUIF__InfoTrx(const PCUIF__InfoTrx& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_InfoTrx.");
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.pdch__mask().is_bound()) field_pdch__mask = other_value.pdch__mask();
else field_pdch__mask.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.hLayer1().is_bound()) field_hLayer1 = other_value.hLayer1();
else field_hLayer1.clean_up();
if (other_value.ts().is_bound()) field_ts = other_value.ts();
else field_ts.clean_up();
}

void PCUIF__InfoTrx::clean_up()
{
field_arfcn.clean_up();
field_pdch__mask.clean_up();
field_spare.clean_up();
field_hLayer1.clean_up();
field_ts.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__InfoTrx::get_descriptor() const { return &PCUIF__InfoTrx_descr_; }
PCUIF__InfoTrx& PCUIF__InfoTrx::operator=(const PCUIF__InfoTrx& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_InfoTrx.");
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.pdch__mask().is_bound()) field_pdch__mask = other_value.pdch__mask();
  else field_pdch__mask.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.hLayer1().is_bound()) field_hLayer1 = other_value.hLayer1();
  else field_hLayer1.clean_up();
  if (other_value.ts().is_bound()) field_ts = other_value.ts();
  else field_ts.clean_up();
}
return *this;
}

boolean PCUIF__InfoTrx::operator==(const PCUIF__InfoTrx& other_value) const
{
return field_arfcn==other_value.field_arfcn
  && field_pdch__mask==other_value.field_pdch__mask
  && field_spare==other_value.field_spare
  && field_hLayer1==other_value.field_hLayer1
  && field_ts==other_value.field_ts;
}

boolean PCUIF__InfoTrx::is_bound() const
{
return (field_arfcn.is_bound())
  || (field_pdch__mask.is_bound())
  || (field_spare.is_bound())
  || (field_hLayer1.is_bound())
  || (field_ts.is_bound());
}
boolean PCUIF__InfoTrx::is_value() const
{
return field_arfcn.is_value()
  && field_pdch__mask.is_value()
  && field_spare.is_value()
  && field_hLayer1.is_value()
  && field_ts.is_value();
}
void PCUIF__InfoTrx::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", pdch_mask := ");
field_pdch__mask.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", hLayer1 := ");
field_hLayer1.log();
TTCN_Logger::log_event_str(", ts := ");
field_ts.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__InfoTrx::set_implicit_omit()
{
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (pdch__mask().is_bound()) pdch__mask().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (hLayer1().is_bound()) hLayer1().set_implicit_omit();
if (ts().is_bound()) ts().set_implicit_omit();
}

void PCUIF__InfoTrx::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_InfoTrx has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) pdch__mask().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) hLayer1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ts().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pdch_mask")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdch__mask().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hLayer1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hLayer1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_InfoTrx: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_InfoTrx");
  }
}

void PCUIF__InfoTrx::encode_text(Text_Buf& text_buf) const
{
field_arfcn.encode_text(text_buf);
field_pdch__mask.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_hLayer1.encode_text(text_buf);
field_ts.encode_text(text_buf);
}

void PCUIF__InfoTrx::decode_text(Text_Buf& text_buf)
{
field_arfcn.decode_text(text_buf);
field_pdch__mask.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_hLayer1.decode_text(text_buf);
field_ts.decode_text(text_buf);
}

void PCUIF__InfoTrx::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__InfoTrx::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__InfoTrx::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__InfoTrx_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn.RAW_decode(PCUIF__InfoTrx_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__InfoTrx_pdch__mask_descr_.raw->forceomit);
  decoded_field_length = field_pdch__mask.RAW_decode(PCUIF__InfoTrx_pdch__mask_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__InfoTrx_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__InfoTrx_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__InfoTrx_hLayer1_descr_.raw->forceomit);
  decoded_field_length = field_hLayer1.RAW_decode(PCUIF__InfoTrx_hLayer1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__InfoTrx_ts_descr_.raw->forceomit);
  decoded_field_length = field_ts.RAW_decode(PCUIF__InfoTrx_ts_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__InfoTrx::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__InfoTrx_arfcn_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__InfoTrx_pdch__mask_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__InfoTrx_spare_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__InfoTrx_hLayer1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__InfoTrx_ts_descr_.raw);
  encoded_length += field_arfcn.RAW_encode(PCUIF__InfoTrx_arfcn_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_pdch__mask.RAW_encode(PCUIF__InfoTrx_pdch__mask_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare.RAW_encode(PCUIF__InfoTrx_spare_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_hLayer1.RAW_encode(PCUIF__InfoTrx_hLayer1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_ts.RAW_encode(PCUIF__InfoTrx_ts_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct PCUIF__InfoTrx_template::single_value_struct {
INTEGER_template field_arfcn;
BITSTRING_template field_pdch__mask;
OCTETSTRING_template field_spare;
INTEGER_template field_hLayer1;
PCUIF__InfoTrxTsList_template field_ts;
};

void PCUIF__InfoTrx_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_arfcn = ANY_VALUE;
single_value->field_pdch__mask = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_hLayer1 = ANY_VALUE;
single_value->field_ts = ANY_VALUE;
}
}
}

void PCUIF__InfoTrx_template::copy_value(const PCUIF__InfoTrx& other_value)
{
single_value = new single_value_struct;
if (other_value.arfcn().is_bound()) {
  single_value->field_arfcn = other_value.arfcn();
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.pdch__mask().is_bound()) {
  single_value->field_pdch__mask = other_value.pdch__mask();
} else {
  single_value->field_pdch__mask.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.hLayer1().is_bound()) {
  single_value->field_hLayer1 = other_value.hLayer1();
} else {
  single_value->field_hLayer1.clean_up();
}
if (other_value.ts().is_bound()) {
  single_value->field_ts = other_value.ts();
} else {
  single_value->field_ts.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__InfoTrx_template::copy_template(const PCUIF__InfoTrx_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pdch__mask().get_selection()) {
single_value->field_pdch__mask = other_value.pdch__mask();
} else {
single_value->field_pdch__mask.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hLayer1().get_selection()) {
single_value->field_hLayer1 = other_value.hLayer1();
} else {
single_value->field_hLayer1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts().get_selection()) {
single_value->field_ts = other_value.ts();
} else {
single_value->field_ts.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__InfoTrx_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 PCUIF__InfoTrx_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__InfoTrx_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 @PCUIF_Types.PCUIF_InfoTrx.");
break;
}
set_selection(other_value);
}

PCUIF__InfoTrx_template::PCUIF__InfoTrx_template()
{
}

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

PCUIF__InfoTrx_template::PCUIF__InfoTrx_template(const PCUIF__InfoTrx& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__InfoTrx_template& PCUIF__InfoTrx_template::operator=(const OPTIONAL<PCUIF__InfoTrx>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__InfoTrx&)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 @PCUIF_Types.PCUIF_InfoTrx.");
}
return *this;
}

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

boolean PCUIF__InfoTrx_template::match(const PCUIF__InfoTrx& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.arfcn().is_bound()) return FALSE;
if(!single_value->field_arfcn.match(other_value.arfcn(), legacy))return FALSE;
if(!other_value.pdch__mask().is_bound()) return FALSE;
if(!single_value->field_pdch__mask.match(other_value.pdch__mask(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.hLayer1().is_bound()) return FALSE;
if(!single_value->field_hLayer1.match(other_value.hLayer1(), legacy))return FALSE;
if(!other_value.ts().is_bound()) return FALSE;
if(!single_value->field_ts.match(other_value.ts(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_InfoTrx.");
}
return FALSE;
}

boolean PCUIF__InfoTrx_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_arfcn.is_bound()
 || single_value->field_pdch__mask.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_hLayer1.is_bound()
 || single_value->field_ts.is_bound();
}

boolean PCUIF__InfoTrx_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_arfcn.is_value()
 && single_value->field_pdch__mask.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_hLayer1.is_value()
 && single_value->field_ts.is_value();
}

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

PCUIF__InfoTrx PCUIF__InfoTrx_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 @PCUIF_Types.PCUIF_InfoTrx.");
PCUIF__InfoTrx ret_val;
if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_pdch__mask.is_bound()) {
ret_val.pdch__mask() = single_value->field_pdch__mask.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_hLayer1.is_bound()) {
ret_val.hLayer1() = single_value->field_hLayer1.valueof();
}
if (single_value->field_ts.is_bound()) {
ret_val.ts() = single_value->field_ts.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__InfoTrx_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PCUIF__InfoTrx_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrx.");
return single_value->field_arfcn;
}

BITSTRING_template& PCUIF__InfoTrx_template::pdch__mask()
{
set_specific();
return single_value->field_pdch__mask;
}

const BITSTRING_template& PCUIF__InfoTrx_template::pdch__mask() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pdch_mask of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrx.");
return single_value->field_pdch__mask;
}

OCTETSTRING_template& PCUIF__InfoTrx_template::spare()
{
set_specific();
return single_value->field_spare;
}

const OCTETSTRING_template& PCUIF__InfoTrx_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrx.");
return single_value->field_spare;
}

INTEGER_template& PCUIF__InfoTrx_template::hLayer1()
{
set_specific();
return single_value->field_hLayer1;
}

const INTEGER_template& PCUIF__InfoTrx_template::hLayer1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hLayer1 of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrx.");
return single_value->field_hLayer1;
}

PCUIF__InfoTrxTsList_template& PCUIF__InfoTrx_template::ts()
{
set_specific();
return single_value->field_ts;
}

const PCUIF__InfoTrxTsList_template& PCUIF__InfoTrx_template::ts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts of a non-specific template of type @PCUIF_Types.PCUIF_InfoTrx.");
return single_value->field_ts;
}

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

void PCUIF__InfoTrx_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", pdch_mask := ");
single_value->field_pdch__mask.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", hLayer1 := ");
single_value->field_hLayer1.log();
TTCN_Logger::log_event_str(", ts := ");
single_value->field_ts.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__InfoTrx_template::log_match(const PCUIF__InfoTrx& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pdch__mask.match(match_value.pdch__mask(), legacy)){
TTCN_Logger::log_logmatch_info(".pdch_mask");
single_value->field_pdch__mask.log_match(match_value.pdch__mask(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_hLayer1.match(match_value.hLayer1(), legacy)){
TTCN_Logger::log_logmatch_info(".hLayer1");
single_value->field_hLayer1.log_match(match_value.hLayer1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts.match(match_value.ts(), legacy)){
TTCN_Logger::log_logmatch_info(".ts");
single_value->field_ts.log_match(match_value.ts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ arfcn := ");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::log_event_str(", pdch_mask := ");
single_value->field_pdch__mask.log_match(match_value.pdch__mask(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", hLayer1 := ");
single_value->field_hLayer1.log_match(match_value.hLayer1(), legacy);
TTCN_Logger::log_event_str(", ts := ");
single_value->field_ts.log_match(match_value.ts(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__InfoTrx_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (pdch__mask().is_bound()) pdch__mask().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (hLayer1().is_bound()) hLayer1().set_implicit_omit();
if (ts().is_bound()) ts().set_implicit_omit();
}

void PCUIF__InfoTrx_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_arfcn.encode_text(text_buf);
single_value->field_pdch__mask.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_hLayer1.encode_text(text_buf);
single_value->field_ts.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 @PCUIF_Types.PCUIF_InfoTrx.");
}
}

void PCUIF__InfoTrx_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_arfcn.decode_text(text_buf);
single_value->field_pdch__mask.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_hLayer1.decode_text(text_buf);
single_value->field_ts.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 PCUIF__InfoTrx_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_InfoTrx.");
}
}

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

void PCUIF__InfoTrx_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrx");
single_value->field_pdch__mask.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrx");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrx");
single_value->field_hLayer1.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrx");
single_value->field_ts.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_InfoTrx");
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 : "@PCUIF_Types.PCUIF_InfoTrx");
}

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

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


const PCUIF__InfoTrx PCUIF__InfoTrxs::UNBOUND_ELEM;
PCUIF__InfoTrxs::PCUIF__InfoTrxs()
{
val_ptr = NULL;
}

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

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

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

void PCUIF__InfoTrxs::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.");
}
}

PCUIF__InfoTrxs& PCUIF__InfoTrxs::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;
}

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

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

boolean PCUIF__InfoTrxs::operator==(const PCUIF__InfoTrxs& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
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;
}

PCUIF__InfoTrx& PCUIF__InfoTrxs::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_InfoTrxs 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 = (PCUIF__InfoTrx**)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 PCUIF__InfoTrx(*(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 PCUIF__InfoTrx;
}
return *val_ptr->value_elements[index_value];
}

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

const PCUIF__InfoTrx& PCUIF__InfoTrxs::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_InfoTrxs using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @PCUIF_Types.PCUIF_InfoTrxs: 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 PCUIF__InfoTrx& PCUIF__InfoTrxs::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @PCUIF_Types.PCUIF_InfoTrxs.");
return (*this)[(int)index_value];
}

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

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

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

PCUIF__InfoTrxs PCUIF__InfoTrxs::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
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;
PCUIF__InfoTrxs 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 PCUIF__InfoTrx(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs::operator+(const PCUIF__InfoTrxs& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @PCUIF_Types.PCUIF_InfoTrxs concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
PCUIF__InfoTrxs 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 PCUIF__InfoTrx(*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 PCUIF__InfoTrx(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@PCUIF_Types.PCUIF_InfoTrxs","element");
PCUIF__InfoTrxs 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 PCUIF__InfoTrx(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs::replace(int index, int len, const PCUIF__InfoTrxs& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
check_replace_arguments(val_ptr->n_elements, index, len, "@PCUIF_Types.PCUIF_InfoTrxs","element");
PCUIF__InfoTrxs 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 PCUIF__InfoTrx(*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 PCUIF__InfoTrx(*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 PCUIF__InfoTrx(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs::replace(int index, int len, const PCUIF__InfoTrxs_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 PCUIF__InfoTrxs::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @PCUIF_Types.PCUIF_InfoTrxs.");
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 = (PCUIF__InfoTrx**)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 PCUIF__InfoTrx(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (PCUIF__InfoTrx**)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 @PCUIF_Types.PCUIF_InfoTrxs: %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 = (PCUIF__InfoTrx**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean PCUIF__InfoTrxs::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 PCUIF__InfoTrxs::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
return val_ptr->n_elements;
}

int PCUIF__InfoTrxs::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
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 PCUIF__InfoTrxs::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 PCUIF__InfoTrxs::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 PCUIF__InfoTrxs::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", "@PCUIF_Types.PCUIF_InfoTrxs");
    }
    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", "@PCUIF_Types.PCUIF_InfoTrxs");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void PCUIF__InfoTrxs::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @PCUIF_Types.PCUIF_InfoTrxs.");
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 PCUIF__InfoTrxs::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 @PCUIF_Types.PCUIF_InfoTrxs.");
val_ptr->value_elements = (PCUIF__InfoTrx**)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 PCUIF__InfoTrx;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void PCUIF__InfoTrxs::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__InfoTrxs::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__InfoTrxs::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 PCUIF__InfoTrxs::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 PCUIF__InfoTrxs_template::copy_value(const PCUIF__InfoTrxs& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @PCUIF_Types.PCUIF_InfoTrxs with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (PCUIF__InfoTrx_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 PCUIF__InfoTrx_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__InfoTrx_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__InfoTrxs_template::copy_template(const PCUIF__InfoTrxs_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 = (PCUIF__InfoTrx_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 PCUIF__InfoTrx_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__InfoTrx_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 PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
break;
}
set_selection(other_value);
}

boolean PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const PCUIF__InfoTrxs*)value_ptr)[value_index], legacy);
else return ((const PCUIF__InfoTrxs_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

PCUIF__InfoTrxs_template::PCUIF__InfoTrxs_template()
{
}

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

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

PCUIF__InfoTrxs_template::PCUIF__InfoTrxs_template(const PCUIF__InfoTrxs& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

PCUIF__InfoTrxs_template& PCUIF__InfoTrxs_template::operator=(const OPTIONAL<PCUIF__InfoTrxs>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__InfoTrxs&)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 @PCUIF_Types.PCUIF_InfoTrxs.");
}
return *this;
}

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

PCUIF__InfoTrx_template& PCUIF__InfoTrxs_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs.");
    break;
}
return *single_value.value_elements[index_value];
}

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

const PCUIF__InfoTrx_template& PCUIF__InfoTrxs_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_InfoTrxs using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @PCUIF_Types.PCUIF_InfoTrxs.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @PCUIF_Types.PCUIF_InfoTrxs: 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 PCUIF__InfoTrx_template& PCUIF__InfoTrxs_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @PCUIF_Types.PCUIF_InfoTrxs.");
return (*this)[(int)index_value];
}

void PCUIF__InfoTrxs_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @PCUIF_Types.PCUIF_InfoTrxs.");
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 = (PCUIF__InfoTrx_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 PCUIF__InfoTrx_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 PCUIF__InfoTrx_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 = (PCUIF__InfoTrx_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs 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 @PCUIF_Types.PCUIF_InfoTrxs containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_InfoTrxs.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @PCUIF_Types.PCUIF_InfoTrxs");
}

boolean PCUIF__InfoTrxs_template::match(const PCUIF__InfoTrxs& 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 @PCUIF_Types.PCUIF_InfoTrxs.");
}
return FALSE;
}

boolean PCUIF__InfoTrxs_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;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
PCUIF__InfoTrxs 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;
}

PCUIF__InfoTrxs PCUIF__InfoTrxs_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);
}

PCUIF__InfoTrxs PCUIF__InfoTrxs_template::replace(int index, int len, const PCUIF__InfoTrxs_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());
}

PCUIF__InfoTrxs PCUIF__InfoTrxs_template::replace(int index, int len, const PCUIF__InfoTrxs& 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 PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @PCUIF_Types.PCUIF_InfoTrxs.");
}
set_selection(template_type);
}

PCUIF__InfoTrxs_template& PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @PCUIF_Types.PCUIF_InfoTrxs.");
return value_list.list_value[list_index];
}

void PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_template::log_match(const PCUIF__InfoTrxs& 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 PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
}
}

void PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
single_value.value_elements = (PCUIF__InfoTrx_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 PCUIF__InfoTrx_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 PCUIF__InfoTrxs_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 @PCUIF_Types.PCUIF_InfoTrxs.");
}
}

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

boolean PCUIF__InfoTrxs_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 PCUIF__InfoTrxs_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
for (int i = 0; i < single_value.n_elements; i++) {
if (single_value.value_elements[i] != NULL) single_value.value_elements[i]->set_implicit_omit();
}
}

void PCUIF__InfoTrxs_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: {
    PCUIF__InfoTrxs_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: {
    PCUIF__InfoTrxs_template* precondition = new PCUIF__InfoTrxs_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__InfoTrxs_template* implied_template = new PCUIF__InfoTrxs_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__InfoTrxs_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@PCUIF_Types.PCUIF_InfoTrxs");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void PCUIF__InfoTrxs_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 : "@PCUIF_Types.PCUIF_InfoTrxs");
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 : "@PCUIF_Types.PCUIF_InfoTrxs");
}

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

const PCUIF__AddrType PCUIF__RemoteAddr_addr__type::UNBOUND_ELEM;
PCUIF__RemoteAddr_addr__type::PCUIF__RemoteAddr_addr__type()
{
val_ptr = NULL;
}

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

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

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

void PCUIF__RemoteAddr_addr__type::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.");
}
}

PCUIF__RemoteAddr_addr__type& PCUIF__RemoteAddr_addr__type::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;
}

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

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

boolean PCUIF__RemoteAddr_addr__type::operator==(const PCUIF__RemoteAddr_addr__type& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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;
}

PCUIF__AddrType& PCUIF__RemoteAddr_addr__type::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 = (PCUIF__AddrType**)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 PCUIF__AddrType(*(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 PCUIF__AddrType;
}
return *val_ptr->value_elements[index_value];
}

PCUIF__AddrType& PCUIF__RemoteAddr_addr__type::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return (*this)[(int)index_value];
}

const PCUIF__AddrType& PCUIF__RemoteAddr_addr__type::operator[](int index_value) const
{
if (val_ptr == NULL)
TTCN_error("Accessing an element in an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
if (index_value < 0) TTCN_error("Accessing an element of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type using a negative index: %d.", index_value);
if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type: 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 PCUIF__AddrType& PCUIF__RemoteAddr_addr__type::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return (*this)[(int)index_value];
}

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

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

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

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type::operator>>=(int rotate_count) const
{
if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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;
PCUIF__RemoteAddr_addr__type 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 PCUIF__AddrType(*val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type::operator+(const PCUIF__RemoteAddr_addr__type& other_value) const
{
if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @PCUIF_Types.PCUIF_RemoteAddr.addr_type concatenation.");
if (val_ptr->n_elements == 0) return other_value;
if (other_value.val_ptr->n_elements == 0) return *this;
PCUIF__RemoteAddr_addr__type 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 PCUIF__AddrType(*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 PCUIF__AddrType(*other_value.val_ptr->value_elements[i]);
}
}
return ret_val;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type::substr(int index, int returncount) const
{
if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
check_substr_arguments(val_ptr->n_elements, index, returncount, "@PCUIF_Types.PCUIF_RemoteAddr.addr_type","element");
PCUIF__RemoteAddr_addr__type 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 PCUIF__AddrType(*val_ptr->value_elements[i+index]);
}
}
return ret_val;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type::replace(int index, int len, const PCUIF__RemoteAddr_addr__type& repl) const
{
if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
check_replace_arguments(val_ptr->n_elements, index, len, "@PCUIF_Types.PCUIF_RemoteAddr.addr_type","element");
PCUIF__RemoteAddr_addr__type 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 PCUIF__AddrType(*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 PCUIF__AddrType(*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 PCUIF__AddrType(*val_ptr->value_elements[index+i+len]);
}
}
return ret_val;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type::replace(int index, int len, const PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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 = (PCUIF__AddrType**)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 PCUIF__AddrType(*(val_ptr->value_elements[elem_count]));
}
}
clean_up();
val_ptr = new_val_ptr;
}
if (new_size > val_ptr->n_elements) {
val_ptr->value_elements = (PCUIF__AddrType**)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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type: %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 = (PCUIF__AddrType**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size);
val_ptr->n_elements = new_size;
}
}

boolean PCUIF__RemoteAddr_addr__type::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 PCUIF__RemoteAddr_addr__type::size_of() const
{
if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return val_ptr->n_elements;
}

int PCUIF__RemoteAddr_addr__type::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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 PCUIF__RemoteAddr_addr__type::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 PCUIF__RemoteAddr_addr__type::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 PCUIF__RemoteAddr_addr__type::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", "@PCUIF_Types.PCUIF_RemoteAddr.addr_type");
    }
    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", "@PCUIF_Types.PCUIF_RemoteAddr.addr_type");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

void PCUIF__RemoteAddr_addr__type::encode_text(Text_Buf& text_buf) const
{
if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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 PCUIF__RemoteAddr_addr__type::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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
val_ptr->value_elements = (PCUIF__AddrType**)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 PCUIF__AddrType;
val_ptr->value_elements[elem_count]->decode_text(text_buf);
}
}

void PCUIF__RemoteAddr_addr__type::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__RemoteAddr_addr__type::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__RemoteAddr_addr__type::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 PCUIF__RemoteAddr_addr__type::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 PCUIF__RemoteAddr_addr__type_template::copy_value(const PCUIF__RemoteAddr_addr__type& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (PCUIF__AddrType_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 PCUIF__AddrType_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__AddrType_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__RemoteAddr_addr__type_template::copy_template(const PCUIF__RemoteAddr_addr__type_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 = (PCUIF__AddrType_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 PCUIF__AddrType_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new PCUIF__AddrType_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 PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
break;
}
set_selection(other_value);
}

boolean PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const PCUIF__RemoteAddr_addr__type*)value_ptr)[value_index], legacy);
else return ((const PCUIF__RemoteAddr_addr__type_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit();
}

PCUIF__RemoteAddr_addr__type_template::PCUIF__RemoteAddr_addr__type_template()
{
}

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

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

PCUIF__RemoteAddr_addr__type_template::PCUIF__RemoteAddr_addr__type_template(const PCUIF__RemoteAddr_addr__type& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

PCUIF__RemoteAddr_addr__type_template& PCUIF__RemoteAddr_addr__type_template::operator=(const OPTIONAL<PCUIF__RemoteAddr_addr__type>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__RemoteAddr_addr__type&)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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
}
return *this;
}

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

PCUIF__AddrType_template& PCUIF__RemoteAddr_addr__type_template::operator[](int index_value)
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
    break;
}
return *single_value.value_elements[index_value];
}

PCUIF__AddrType_template& PCUIF__RemoteAddr_addr__type_template::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return (*this)[(int)index_value];
}

const PCUIF__AddrType_template& PCUIF__RemoteAddr_addr__type_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @PCUIF_Types.PCUIF_RemoteAddr.addr_type using a negative index: %d.", index_value);
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type: 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 PCUIF__AddrType_template& PCUIF__RemoteAddr_addr__type_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return (*this)[(int)index_value];
}

void PCUIF__RemoteAddr_addr__type_template::set_size(int new_size)
{
if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
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 = (PCUIF__AddrType_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 PCUIF__AddrType_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 PCUIF__AddrType_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 = (PCUIF__AddrType_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size);
single_value.n_elements = new_size;
}
}

int PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type");
}

boolean PCUIF__RemoteAddr_addr__type_template::match(const PCUIF__RemoteAddr_addr__type& 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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
}
return FALSE;
}

boolean PCUIF__RemoteAddr_addr__type_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;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
PCUIF__RemoteAddr_addr__type 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;
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type_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);
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type_template::replace(int index, int len, const PCUIF__RemoteAddr_addr__type_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());
}

PCUIF__RemoteAddr_addr__type PCUIF__RemoteAddr_addr__type_template::replace(int index, int len, const PCUIF__RemoteAddr_addr__type& 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 PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
}
set_selection(template_type);
}

PCUIF__RemoteAddr_addr__type_template& PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
return value_list.list_value[list_index];
}

void PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_template::log_match(const PCUIF__RemoteAddr_addr__type& 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 PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
}
}

void PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
single_value.value_elements = (PCUIF__AddrType_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 PCUIF__AddrType_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 PCUIF__RemoteAddr_addr__type_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 @PCUIF_Types.PCUIF_RemoteAddr.addr_type.");
}
}

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

boolean PCUIF__RemoteAddr_addr__type_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 PCUIF__RemoteAddr_addr__type_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
for (int i = 0; i < single_value.n_elements; i++) {
if (single_value.value_elements[i] != NULL) single_value.value_elements[i]->set_implicit_omit();
}
}

void PCUIF__RemoteAddr_addr__type_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: {
    PCUIF__RemoteAddr_addr__type_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: {
    PCUIF__RemoteAddr_addr__type_template* precondition = new PCUIF__RemoteAddr_addr__type_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__RemoteAddr_addr__type_template* implied_template = new PCUIF__RemoteAddr_addr__type_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__RemoteAddr_addr__type_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@PCUIF_Types.PCUIF_RemoteAddr.addr_type");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void PCUIF__RemoteAddr_addr__type_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 : "@PCUIF_Types.PCUIF_RemoteAddr.addr_type");
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 : "@PCUIF_Types.PCUIF_RemoteAddr.addr_type");
}

boolean PCUIF__RemoteAddr_addr__type_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);
}
}
PCUIF__AddrType::PCUIF__AddrType()
{
enum_value = UNBOUND_VALUE;
}

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

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

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

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

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

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

boolean PCUIF__AddrType::operator==(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_AddrType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_AddrType comparison is an unknown numeric value %d", other_value);
return enum_value == other_value;
}

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

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

boolean PCUIF__AddrType::operator<(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_AddrType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_AddrType comparison is an unknown numeric value %d", other_value);
return enum_value < other_value;
}

boolean PCUIF__AddrType::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 @PCUIF_Types.PCUIF_AddrType.");
return enum_value < other_value;
}

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

boolean PCUIF__AddrType::operator>(int other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @PCUIF_Types.PCUIF_AddrType.");
if (!is_valid_enum(other_value)) TTCN_error("The right operand of enumerated type @PCUIF_Types.PCUIF_AddrType comparison is an unknown numeric value %d", other_value);
return enum_value > other_value;
}

boolean PCUIF__AddrType::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 @PCUIF_Types.PCUIF_AddrType.");
return enum_value > other_value;
}

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

const char *PCUIF__AddrType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case PCUIF__ADDR__TYPE__UNSPEC: return "PCUIF_ADDR_TYPE_UNSPEC";
case PCUIF__ADDR__TYPE__IPV4: return "PCUIF_ADDR_TYPE_IPV4";
case PCUIF__ADDR__TYPE__IPV6: return "PCUIF_ADDR_TYPE_IPV6";
default:
return "<unknown>";
}
}

PCUIF__AddrType::enum_type PCUIF__AddrType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "PCUIF_ADDR_TYPE_UNSPEC")) return PCUIF__ADDR__TYPE__UNSPEC;
if (!strcmp(str_par, "PCUIF_ADDR_TYPE_IPV4")) return PCUIF__ADDR__TYPE__IPV4;
if (!strcmp(str_par, "PCUIF_ADDR_TYPE_IPV6")) return PCUIF__ADDR__TYPE__IPV6;
}
return UNKNOWN_VALUE;
}

boolean PCUIF__AddrType::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 4:
case 41:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

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

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

void PCUIF__AddrType::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 @PCUIF_Types.PCUIF_AddrType.", enum_value);
}

void PCUIF__AddrType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__AddrType::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__AddrType::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, 6, 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 PCUIF__AddrType::RAW_encode(const TTCN_Typedescriptor_t& p_td, RAW_enc_tree& myleaf) const
{
  return RAW_encode_enum_type(p_td, myleaf, (int)enum_value, 6);
}

void PCUIF__AddrType_template::copy_template(const PCUIF__AddrType_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 PCUIF__AddrType_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 PCUIF__AddrType_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__AddrType_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 @PCUIF_Types.PCUIF_AddrType.");
}
}

PCUIF__AddrType_template::PCUIF__AddrType_template()
{
}

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

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

PCUIF__AddrType_template::PCUIF__AddrType_template(PCUIF__AddrType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__AddrType_template::match(PCUIF__AddrType::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 @PCUIF_Types.PCUIF_AddrType.");
}
return FALSE;
}

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

PCUIF__AddrType::enum_type PCUIF__AddrType_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 @PCUIF_Types.PCUIF_AddrType.");
return single_value;
}

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

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

void PCUIF__AddrType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(PCUIF__AddrType::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 PCUIF__AddrType_template::log_match(const PCUIF__AddrType& 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 PCUIF__AddrType_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 @PCUIF_Types.PCUIF_AddrType.");
}
}

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

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

boolean PCUIF__AddrType_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 PCUIF__AddrType_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: {
    PCUIF__AddrType_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: {
    PCUIF__AddrType::enum_type enum_val = PCUIF__AddrType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!PCUIF__AddrType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @PCUIF_Types.PCUIF_AddrType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__AddrType_template* precondition = new PCUIF__AddrType_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__AddrType_template* implied_template = new PCUIF__AddrType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__AddrType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@PCUIF_Types.PCUIF_AddrType");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__AddrType_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 : "@PCUIF_Types.PCUIF_AddrType");
}

PCUIF__RemoteAddr::PCUIF__RemoteAddr()
{
}

PCUIF__RemoteAddr::PCUIF__RemoteAddr(const PCUIF__RemoteAddr_addr__type& par_addr__type,
    const PCUIF__RemoteAddr_addr& par_addr)
  :   field_addr__type(par_addr__type),
  field_addr(par_addr)
{
}

PCUIF__RemoteAddr::PCUIF__RemoteAddr(const PCUIF__RemoteAddr& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.");
if (other_value.addr__type().is_bound()) field_addr__type = other_value.addr__type();
else field_addr__type.clean_up();
if (other_value.addr().is_bound()) field_addr = other_value.addr();
else field_addr.clean_up();
}

void PCUIF__RemoteAddr::clean_up()
{
field_addr__type.clean_up();
field_addr.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__RemoteAddr::get_descriptor() const { return &PCUIF__RemoteAddr_descr_; }
PCUIF__RemoteAddr& PCUIF__RemoteAddr::operator=(const PCUIF__RemoteAddr& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_RemoteAddr.");
  if (other_value.addr__type().is_bound()) field_addr__type = other_value.addr__type();
  else field_addr__type.clean_up();
  if (other_value.addr().is_bound()) field_addr = other_value.addr();
  else field_addr.clean_up();
}
return *this;
}

boolean PCUIF__RemoteAddr::operator==(const PCUIF__RemoteAddr& other_value) const
{
return field_addr__type==other_value.field_addr__type
  && field_addr==other_value.field_addr;
}

boolean PCUIF__RemoteAddr::is_bound() const
{
return (field_addr__type.is_bound())
  || (field_addr.is_bound());
}
boolean PCUIF__RemoteAddr::is_value() const
{
return field_addr__type.is_value()
  && field_addr.is_value();
}
void PCUIF__RemoteAddr::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ addr_type := ");
field_addr__type.log();
TTCN_Logger::log_event_str(", addr := ");
field_addr.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__RemoteAddr::set_implicit_omit()
{
if (addr__type().is_bound()) addr__type().set_implicit_omit();
if (addr().is_bound()) addr().set_implicit_omit();
}

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

void PCUIF__RemoteAddr::encode_text(Text_Buf& text_buf) const
{
field_addr__type.encode_text(text_buf);
field_addr.encode_text(text_buf);
}

void PCUIF__RemoteAddr::decode_text(Text_Buf& text_buf)
{
field_addr__type.decode_text(text_buf);
field_addr.decode_text(text_buf);
}

void PCUIF__RemoteAddr::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__RemoteAddr::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__RemoteAddr::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__RemoteAddr_addr__type_descr_.raw->forceomit);
  decoded_field_length = field_addr__type.RAW_decode(PCUIF__RemoteAddr_addr__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__RemoteAddr_addr_descr_.raw->forceomit);
  decoded_field_length = field_addr.RAW_decode(PCUIF__RemoteAddr_addr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__RemoteAddr::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__RemoteAddr_addr__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__RemoteAddr_addr_descr_.raw);
  encoded_length += field_addr__type.RAW_encode(PCUIF__RemoteAddr_addr__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_addr.RAW_encode(PCUIF__RemoteAddr_addr_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PCUIF__RemoteAddr_template::single_value_struct {
PCUIF__RemoteAddr_addr__type_template field_addr__type;
PCUIF__RemoteAddr_addr_template field_addr;
};

void PCUIF__RemoteAddr_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_addr__type = ANY_VALUE;
single_value->field_addr = ANY_VALUE;
}
}
}

void PCUIF__RemoteAddr_template::copy_value(const PCUIF__RemoteAddr& other_value)
{
single_value = new single_value_struct;
if (other_value.addr__type().is_bound()) {
  single_value->field_addr__type = other_value.addr__type();
} else {
  single_value->field_addr__type.clean_up();
}
if (other_value.addr().is_bound()) {
  single_value->field_addr = other_value.addr();
} else {
  single_value->field_addr.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__RemoteAddr_template::copy_template(const PCUIF__RemoteAddr_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.addr__type().get_selection()) {
single_value->field_addr__type = other_value.addr__type();
} else {
single_value->field_addr__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.addr().get_selection()) {
single_value->field_addr = other_value.addr();
} else {
single_value->field_addr.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__RemoteAddr_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 PCUIF__RemoteAddr_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__RemoteAddr_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 @PCUIF_Types.PCUIF_RemoteAddr.");
break;
}
set_selection(other_value);
}

PCUIF__RemoteAddr_template::PCUIF__RemoteAddr_template()
{
}

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

PCUIF__RemoteAddr_template::PCUIF__RemoteAddr_template(const PCUIF__RemoteAddr& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__RemoteAddr_template& PCUIF__RemoteAddr_template::operator=(const OPTIONAL<PCUIF__RemoteAddr>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__RemoteAddr&)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 @PCUIF_Types.PCUIF_RemoteAddr.");
}
return *this;
}

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

boolean PCUIF__RemoteAddr_template::match(const PCUIF__RemoteAddr& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.addr__type().is_bound()) return FALSE;
if(!single_value->field_addr__type.match(other_value.addr__type(), legacy))return FALSE;
if(!other_value.addr().is_bound()) return FALSE;
if(!single_value->field_addr.match(other_value.addr(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_RemoteAddr.");
}
return FALSE;
}

boolean PCUIF__RemoteAddr_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_addr__type.is_bound()
 || single_value->field_addr.is_bound();
}

boolean PCUIF__RemoteAddr_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_addr__type.is_value()
 && single_value->field_addr.is_value();
}

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

PCUIF__RemoteAddr PCUIF__RemoteAddr_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 @PCUIF_Types.PCUIF_RemoteAddr.");
PCUIF__RemoteAddr ret_val;
if (single_value->field_addr__type.is_bound()) {
ret_val.addr__type() = single_value->field_addr__type.valueof();
}
if (single_value->field_addr.is_bound()) {
ret_val.addr() = single_value->field_addr.valueof();
}
return ret_val;
}

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

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

PCUIF__RemoteAddr_addr__type_template& PCUIF__RemoteAddr_template::addr__type()
{
set_specific();
return single_value->field_addr__type;
}

const PCUIF__RemoteAddr_addr__type_template& PCUIF__RemoteAddr_template::addr__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field addr_type of a non-specific template of type @PCUIF_Types.PCUIF_RemoteAddr.");
return single_value->field_addr__type;
}

PCUIF__RemoteAddr_addr_template& PCUIF__RemoteAddr_template::addr()
{
set_specific();
return single_value->field_addr;
}

const PCUIF__RemoteAddr_addr_template& PCUIF__RemoteAddr_template::addr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field addr of a non-specific template of type @PCUIF_Types.PCUIF_RemoteAddr.");
return single_value->field_addr;
}

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

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

void PCUIF__RemoteAddr_template::log_match(const PCUIF__RemoteAddr& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_addr__type.match(match_value.addr__type(), legacy)){
TTCN_Logger::log_logmatch_info(".addr_type");
single_value->field_addr__type.log_match(match_value.addr__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_addr.match(match_value.addr(), legacy)){
TTCN_Logger::log_logmatch_info(".addr");
single_value->field_addr.log_match(match_value.addr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ addr_type := ");
single_value->field_addr__type.log_match(match_value.addr__type(), legacy);
TTCN_Logger::log_event_str(", addr := ");
single_value->field_addr.log_match(match_value.addr(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__RemoteAddr_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (addr__type().is_bound()) addr__type().set_implicit_omit();
if (addr().is_bound()) addr().set_implicit_omit();
}

void PCUIF__RemoteAddr_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_addr__type.encode_text(text_buf);
single_value->field_addr.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 @PCUIF_Types.PCUIF_RemoteAddr.");
}
}

void PCUIF__RemoteAddr_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_addr__type.decode_text(text_buf);
single_value->field_addr.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 PCUIF__RemoteAddr_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_RemoteAddr.");
}
}

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

void PCUIF__RemoteAddr_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_addr__type.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_RemoteAddr");
single_value->field_addr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_RemoteAddr");
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 : "@PCUIF_Types.PCUIF_RemoteAddr");
}

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

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

PCUIF__info__ind::PCUIF__info__ind()
{
}

PCUIF__info__ind::PCUIF__info__ind(const INTEGER& par_version,
    const PCUIF__Flags& par_flags,
    const PCUIF__InfoTrxs& par_trx,
    const INTEGER& par_bsic,
    const INTEGER& par_mcc,
    const INTEGER& par_mnc,
    const INTEGER& par_mnc__3__digits,
    const INTEGER& par_lac,
    const INTEGER& par_rac,
    const INTEGER& par_nsei,
    const PCUIF__info__ind_nse__timer& par_nse__timer,
    const PCUIF__info__ind_cell__timer& par_cell__timer,
    const INTEGER& par_cell__id,
    const INTEGER& par_repeat__time,
    const INTEGER& par_repeat__count,
    const INTEGER& par_bvci,
    const INTEGER& par_t3142,
    const INTEGER& par_t3169,
    const INTEGER& par_t3191,
    const INTEGER& par_t3193__10ms,
    const INTEGER& par_t3195,
    const INTEGER& par_n3101,
    const INTEGER& par_n3103,
    const INTEGER& par_n3105,
    const INTEGER& par_cv__countdown,
    const INTEGER& par_dl__tbf__ext,
    const INTEGER& par_ul__tbf__ext,
    const INTEGER& par_initial__cs,
    const INTEGER& par_initial__mcs,
    const PCUIF__info__ind_nsvci& par_nsvci,
    const PCUIF__info__ind_local__port& par_local__port,
    const PCUIF__info__ind_remote__port& par_remote__port,
    const PCUIF__RemoteAddr& par_remote__addr,
    const OPTIONAL< PCUIF__bts__model >& par_bts__model)
  :   field_version(par_version),
  field_flags(par_flags),
  field_trx(par_trx),
  field_bsic(par_bsic),
  field_mcc(par_mcc),
  field_mnc(par_mnc),
  field_mnc__3__digits(par_mnc__3__digits),
  field_lac(par_lac),
  field_rac(par_rac),
  field_nsei(par_nsei),
  field_nse__timer(par_nse__timer),
  field_cell__timer(par_cell__timer),
  field_cell__id(par_cell__id),
  field_repeat__time(par_repeat__time),
  field_repeat__count(par_repeat__count),
  field_bvci(par_bvci),
  field_t3142(par_t3142),
  field_t3169(par_t3169),
  field_t3191(par_t3191),
  field_t3193__10ms(par_t3193__10ms),
  field_t3195(par_t3195),
  field_n3101(par_n3101),
  field_n3103(par_n3103),
  field_n3105(par_n3105),
  field_cv__countdown(par_cv__countdown),
  field_dl__tbf__ext(par_dl__tbf__ext),
  field_ul__tbf__ext(par_ul__tbf__ext),
  field_initial__cs(par_initial__cs),
  field_initial__mcs(par_initial__mcs),
  field_nsvci(par_nsvci),
  field_local__port(par_local__port),
  field_remote__port(par_remote__port),
  field_remote__addr(par_remote__addr),
  field_bts__model(par_bts__model)
{
}

PCUIF__info__ind::PCUIF__info__ind(const PCUIF__info__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_info_ind.");
if (other_value.version().is_bound()) field_version = other_value.version();
else field_version.clean_up();
if (other_value.flags().is_bound()) field_flags = other_value.flags();
else field_flags.clean_up();
if (other_value.trx().is_bound()) field_trx = other_value.trx();
else field_trx.clean_up();
if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
else field_bsic.clean_up();
if (other_value.mcc().is_bound()) field_mcc = other_value.mcc();
else field_mcc.clean_up();
if (other_value.mnc().is_bound()) field_mnc = other_value.mnc();
else field_mnc.clean_up();
if (other_value.mnc__3__digits().is_bound()) field_mnc__3__digits = other_value.mnc__3__digits();
else field_mnc__3__digits.clean_up();
if (other_value.lac().is_bound()) field_lac = other_value.lac();
else field_lac.clean_up();
if (other_value.rac().is_bound()) field_rac = other_value.rac();
else field_rac.clean_up();
if (other_value.nsei().is_bound()) field_nsei = other_value.nsei();
else field_nsei.clean_up();
if (other_value.nse__timer().is_bound()) field_nse__timer = other_value.nse__timer();
else field_nse__timer.clean_up();
if (other_value.cell__timer().is_bound()) field_cell__timer = other_value.cell__timer();
else field_cell__timer.clean_up();
if (other_value.cell__id().is_bound()) field_cell__id = other_value.cell__id();
else field_cell__id.clean_up();
if (other_value.repeat__time().is_bound()) field_repeat__time = other_value.repeat__time();
else field_repeat__time.clean_up();
if (other_value.repeat__count().is_bound()) field_repeat__count = other_value.repeat__count();
else field_repeat__count.clean_up();
if (other_value.bvci().is_bound()) field_bvci = other_value.bvci();
else field_bvci.clean_up();
if (other_value.t3142().is_bound()) field_t3142 = other_value.t3142();
else field_t3142.clean_up();
if (other_value.t3169().is_bound()) field_t3169 = other_value.t3169();
else field_t3169.clean_up();
if (other_value.t3191().is_bound()) field_t3191 = other_value.t3191();
else field_t3191.clean_up();
if (other_value.t3193__10ms().is_bound()) field_t3193__10ms = other_value.t3193__10ms();
else field_t3193__10ms.clean_up();
if (other_value.t3195().is_bound()) field_t3195 = other_value.t3195();
else field_t3195.clean_up();
if (other_value.n3101().is_bound()) field_n3101 = other_value.n3101();
else field_n3101.clean_up();
if (other_value.n3103().is_bound()) field_n3103 = other_value.n3103();
else field_n3103.clean_up();
if (other_value.n3105().is_bound()) field_n3105 = other_value.n3105();
else field_n3105.clean_up();
if (other_value.cv__countdown().is_bound()) field_cv__countdown = other_value.cv__countdown();
else field_cv__countdown.clean_up();
if (other_value.dl__tbf__ext().is_bound()) field_dl__tbf__ext = other_value.dl__tbf__ext();
else field_dl__tbf__ext.clean_up();
if (other_value.ul__tbf__ext().is_bound()) field_ul__tbf__ext = other_value.ul__tbf__ext();
else field_ul__tbf__ext.clean_up();
if (other_value.initial__cs().is_bound()) field_initial__cs = other_value.initial__cs();
else field_initial__cs.clean_up();
if (other_value.initial__mcs().is_bound()) field_initial__mcs = other_value.initial__mcs();
else field_initial__mcs.clean_up();
if (other_value.nsvci().is_bound()) field_nsvci = other_value.nsvci();
else field_nsvci.clean_up();
if (other_value.local__port().is_bound()) field_local__port = other_value.local__port();
else field_local__port.clean_up();
if (other_value.remote__port().is_bound()) field_remote__port = other_value.remote__port();
else field_remote__port.clean_up();
if (other_value.remote__addr().is_bound()) field_remote__addr = other_value.remote__addr();
else field_remote__addr.clean_up();
if (other_value.bts__model().is_bound()) field_bts__model = other_value.bts__model();
else field_bts__model.clean_up();
}

void PCUIF__info__ind::clean_up()
{
field_version.clean_up();
field_flags.clean_up();
field_trx.clean_up();
field_bsic.clean_up();
field_mcc.clean_up();
field_mnc.clean_up();
field_mnc__3__digits.clean_up();
field_lac.clean_up();
field_rac.clean_up();
field_nsei.clean_up();
field_nse__timer.clean_up();
field_cell__timer.clean_up();
field_cell__id.clean_up();
field_repeat__time.clean_up();
field_repeat__count.clean_up();
field_bvci.clean_up();
field_t3142.clean_up();
field_t3169.clean_up();
field_t3191.clean_up();
field_t3193__10ms.clean_up();
field_t3195.clean_up();
field_n3101.clean_up();
field_n3103.clean_up();
field_n3105.clean_up();
field_cv__countdown.clean_up();
field_dl__tbf__ext.clean_up();
field_ul__tbf__ext.clean_up();
field_initial__cs.clean_up();
field_initial__mcs.clean_up();
field_nsvci.clean_up();
field_local__port.clean_up();
field_remote__port.clean_up();
field_remote__addr.clean_up();
field_bts__model.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__info__ind::get_descriptor() const { return &PCUIF__info__ind_descr_; }
PCUIF__info__ind& PCUIF__info__ind::operator=(const PCUIF__info__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_info_ind.");
  if (other_value.version().is_bound()) field_version = other_value.version();
  else field_version.clean_up();
  if (other_value.flags().is_bound()) field_flags = other_value.flags();
  else field_flags.clean_up();
  if (other_value.trx().is_bound()) field_trx = other_value.trx();
  else field_trx.clean_up();
  if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
  else field_bsic.clean_up();
  if (other_value.mcc().is_bound()) field_mcc = other_value.mcc();
  else field_mcc.clean_up();
  if (other_value.mnc().is_bound()) field_mnc = other_value.mnc();
  else field_mnc.clean_up();
  if (other_value.mnc__3__digits().is_bound()) field_mnc__3__digits = other_value.mnc__3__digits();
  else field_mnc__3__digits.clean_up();
  if (other_value.lac().is_bound()) field_lac = other_value.lac();
  else field_lac.clean_up();
  if (other_value.rac().is_bound()) field_rac = other_value.rac();
  else field_rac.clean_up();
  if (other_value.nsei().is_bound()) field_nsei = other_value.nsei();
  else field_nsei.clean_up();
  if (other_value.nse__timer().is_bound()) field_nse__timer = other_value.nse__timer();
  else field_nse__timer.clean_up();
  if (other_value.cell__timer().is_bound()) field_cell__timer = other_value.cell__timer();
  else field_cell__timer.clean_up();
  if (other_value.cell__id().is_bound()) field_cell__id = other_value.cell__id();
  else field_cell__id.clean_up();
  if (other_value.repeat__time().is_bound()) field_repeat__time = other_value.repeat__time();
  else field_repeat__time.clean_up();
  if (other_value.repeat__count().is_bound()) field_repeat__count = other_value.repeat__count();
  else field_repeat__count.clean_up();
  if (other_value.bvci().is_bound()) field_bvci = other_value.bvci();
  else field_bvci.clean_up();
  if (other_value.t3142().is_bound()) field_t3142 = other_value.t3142();
  else field_t3142.clean_up();
  if (other_value.t3169().is_bound()) field_t3169 = other_value.t3169();
  else field_t3169.clean_up();
  if (other_value.t3191().is_bound()) field_t3191 = other_value.t3191();
  else field_t3191.clean_up();
  if (other_value.t3193__10ms().is_bound()) field_t3193__10ms = other_value.t3193__10ms();
  else field_t3193__10ms.clean_up();
  if (other_value.t3195().is_bound()) field_t3195 = other_value.t3195();
  else field_t3195.clean_up();
  if (other_value.n3101().is_bound()) field_n3101 = other_value.n3101();
  else field_n3101.clean_up();
  if (other_value.n3103().is_bound()) field_n3103 = other_value.n3103();
  else field_n3103.clean_up();
  if (other_value.n3105().is_bound()) field_n3105 = other_value.n3105();
  else field_n3105.clean_up();
  if (other_value.cv__countdown().is_bound()) field_cv__countdown = other_value.cv__countdown();
  else field_cv__countdown.clean_up();
  if (other_value.dl__tbf__ext().is_bound()) field_dl__tbf__ext = other_value.dl__tbf__ext();
  else field_dl__tbf__ext.clean_up();
  if (other_value.ul__tbf__ext().is_bound()) field_ul__tbf__ext = other_value.ul__tbf__ext();
  else field_ul__tbf__ext.clean_up();
  if (other_value.initial__cs().is_bound()) field_initial__cs = other_value.initial__cs();
  else field_initial__cs.clean_up();
  if (other_value.initial__mcs().is_bound()) field_initial__mcs = other_value.initial__mcs();
  else field_initial__mcs.clean_up();
  if (other_value.nsvci().is_bound()) field_nsvci = other_value.nsvci();
  else field_nsvci.clean_up();
  if (other_value.local__port().is_bound()) field_local__port = other_value.local__port();
  else field_local__port.clean_up();
  if (other_value.remote__port().is_bound()) field_remote__port = other_value.remote__port();
  else field_remote__port.clean_up();
  if (other_value.remote__addr().is_bound()) field_remote__addr = other_value.remote__addr();
  else field_remote__addr.clean_up();
  if (other_value.bts__model().is_bound()) field_bts__model = other_value.bts__model();
  else field_bts__model.clean_up();
}
return *this;
}

boolean PCUIF__info__ind::operator==(const PCUIF__info__ind& other_value) const
{
return field_version==other_value.field_version
  && field_flags==other_value.field_flags
  && field_trx==other_value.field_trx
  && field_bsic==other_value.field_bsic
  && field_mcc==other_value.field_mcc
  && field_mnc==other_value.field_mnc
  && field_mnc__3__digits==other_value.field_mnc__3__digits
  && field_lac==other_value.field_lac
  && field_rac==other_value.field_rac
  && field_nsei==other_value.field_nsei
  && field_nse__timer==other_value.field_nse__timer
  && field_cell__timer==other_value.field_cell__timer
  && field_cell__id==other_value.field_cell__id
  && field_repeat__time==other_value.field_repeat__time
  && field_repeat__count==other_value.field_repeat__count
  && field_bvci==other_value.field_bvci
  && field_t3142==other_value.field_t3142
  && field_t3169==other_value.field_t3169
  && field_t3191==other_value.field_t3191
  && field_t3193__10ms==other_value.field_t3193__10ms
  && field_t3195==other_value.field_t3195
  && field_n3101==other_value.field_n3101
  && field_n3103==other_value.field_n3103
  && field_n3105==other_value.field_n3105
  && field_cv__countdown==other_value.field_cv__countdown
  && field_dl__tbf__ext==other_value.field_dl__tbf__ext
  && field_ul__tbf__ext==other_value.field_ul__tbf__ext
  && field_initial__cs==other_value.field_initial__cs
  && field_initial__mcs==other_value.field_initial__mcs
  && field_nsvci==other_value.field_nsvci
  && field_local__port==other_value.field_local__port
  && field_remote__port==other_value.field_remote__port
  && field_remote__addr==other_value.field_remote__addr
  && field_bts__model==other_value.field_bts__model;
}

boolean PCUIF__info__ind::is_bound() const
{
return (field_version.is_bound())
  || (field_flags.is_bound())
  || (field_trx.is_bound())
  || (field_bsic.is_bound())
  || (field_mcc.is_bound())
  || (field_mnc.is_bound())
  || (field_mnc__3__digits.is_bound())
  || (field_lac.is_bound())
  || (field_rac.is_bound())
  || (field_nsei.is_bound())
  || (field_nse__timer.is_bound())
  || (field_cell__timer.is_bound())
  || (field_cell__id.is_bound())
  || (field_repeat__time.is_bound())
  || (field_repeat__count.is_bound())
  || (field_bvci.is_bound())
  || (field_t3142.is_bound())
  || (field_t3169.is_bound())
  || (field_t3191.is_bound())
  || (field_t3193__10ms.is_bound())
  || (field_t3195.is_bound())
  || (field_n3101.is_bound())
  || (field_n3103.is_bound())
  || (field_n3105.is_bound())
  || (field_cv__countdown.is_bound())
  || (field_dl__tbf__ext.is_bound())
  || (field_ul__tbf__ext.is_bound())
  || (field_initial__cs.is_bound())
  || (field_initial__mcs.is_bound())
  || (field_nsvci.is_bound())
  || (field_local__port.is_bound())
  || (field_remote__port.is_bound())
  || (field_remote__addr.is_bound())
  || (OPTIONAL_OMIT == field_bts__model.get_selection() || field_bts__model.is_bound());
}
boolean PCUIF__info__ind::is_value() const
{
return field_version.is_value()
  && field_flags.is_value()
  && field_trx.is_value()
  && field_bsic.is_value()
  && field_mcc.is_value()
  && field_mnc.is_value()
  && field_mnc__3__digits.is_value()
  && field_lac.is_value()
  && field_rac.is_value()
  && field_nsei.is_value()
  && field_nse__timer.is_value()
  && field_cell__timer.is_value()
  && field_cell__id.is_value()
  && field_repeat__time.is_value()
  && field_repeat__count.is_value()
  && field_bvci.is_value()
  && field_t3142.is_value()
  && field_t3169.is_value()
  && field_t3191.is_value()
  && field_t3193__10ms.is_value()
  && field_t3195.is_value()
  && field_n3101.is_value()
  && field_n3103.is_value()
  && field_n3105.is_value()
  && field_cv__countdown.is_value()
  && field_dl__tbf__ext.is_value()
  && field_ul__tbf__ext.is_value()
  && field_initial__cs.is_value()
  && field_initial__mcs.is_value()
  && field_nsvci.is_value()
  && field_local__port.is_value()
  && field_remote__port.is_value()
  && field_remote__addr.is_value()
  && (OPTIONAL_OMIT == field_bts__model.get_selection() || field_bts__model.is_value());
}
int PCUIF__info__ind::size_of() const
{
  int ret_val = 33;
  if (field_bts__model.ispresent()) ret_val++;
  return ret_val;
}

void PCUIF__info__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ version := ");
field_version.log();
TTCN_Logger::log_event_str(", flags := ");
field_flags.log();
TTCN_Logger::log_event_str(", trx := ");
field_trx.log();
TTCN_Logger::log_event_str(", bsic := ");
field_bsic.log();
TTCN_Logger::log_event_str(", mcc := ");
field_mcc.log();
TTCN_Logger::log_event_str(", mnc := ");
field_mnc.log();
TTCN_Logger::log_event_str(", mnc_3_digits := ");
field_mnc__3__digits.log();
TTCN_Logger::log_event_str(", lac := ");
field_lac.log();
TTCN_Logger::log_event_str(", rac := ");
field_rac.log();
TTCN_Logger::log_event_str(", nsei := ");
field_nsei.log();
TTCN_Logger::log_event_str(", nse_timer := ");
field_nse__timer.log();
TTCN_Logger::log_event_str(", cell_timer := ");
field_cell__timer.log();
TTCN_Logger::log_event_str(", cell_id := ");
field_cell__id.log();
TTCN_Logger::log_event_str(", repeat_time := ");
field_repeat__time.log();
TTCN_Logger::log_event_str(", repeat_count := ");
field_repeat__count.log();
TTCN_Logger::log_event_str(", bvci := ");
field_bvci.log();
TTCN_Logger::log_event_str(", t3142 := ");
field_t3142.log();
TTCN_Logger::log_event_str(", t3169 := ");
field_t3169.log();
TTCN_Logger::log_event_str(", t3191 := ");
field_t3191.log();
TTCN_Logger::log_event_str(", t3193_10ms := ");
field_t3193__10ms.log();
TTCN_Logger::log_event_str(", t3195 := ");
field_t3195.log();
TTCN_Logger::log_event_str(", n3101 := ");
field_n3101.log();
TTCN_Logger::log_event_str(", n3103 := ");
field_n3103.log();
TTCN_Logger::log_event_str(", n3105 := ");
field_n3105.log();
TTCN_Logger::log_event_str(", cv_countdown := ");
field_cv__countdown.log();
TTCN_Logger::log_event_str(", dl_tbf_ext := ");
field_dl__tbf__ext.log();
TTCN_Logger::log_event_str(", ul_tbf_ext := ");
field_ul__tbf__ext.log();
TTCN_Logger::log_event_str(", initial_cs := ");
field_initial__cs.log();
TTCN_Logger::log_event_str(", initial_mcs := ");
field_initial__mcs.log();
TTCN_Logger::log_event_str(", nsvci := ");
field_nsvci.log();
TTCN_Logger::log_event_str(", local_port := ");
field_local__port.log();
TTCN_Logger::log_event_str(", remote_port := ");
field_remote__port.log();
TTCN_Logger::log_event_str(", remote_addr := ");
field_remote__addr.log();
TTCN_Logger::log_event_str(", bts_model := ");
field_bts__model.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__info__ind::set_implicit_omit()
{
if (version().is_bound()) version().set_implicit_omit();
if (flags().is_bound()) flags().set_implicit_omit();
if (trx().is_bound()) trx().set_implicit_omit();
if (bsic().is_bound()) bsic().set_implicit_omit();
if (mcc().is_bound()) mcc().set_implicit_omit();
if (mnc().is_bound()) mnc().set_implicit_omit();
if (mnc__3__digits().is_bound()) mnc__3__digits().set_implicit_omit();
if (lac().is_bound()) lac().set_implicit_omit();
if (rac().is_bound()) rac().set_implicit_omit();
if (nsei().is_bound()) nsei().set_implicit_omit();
if (nse__timer().is_bound()) nse__timer().set_implicit_omit();
if (cell__timer().is_bound()) cell__timer().set_implicit_omit();
if (cell__id().is_bound()) cell__id().set_implicit_omit();
if (repeat__time().is_bound()) repeat__time().set_implicit_omit();
if (repeat__count().is_bound()) repeat__count().set_implicit_omit();
if (bvci().is_bound()) bvci().set_implicit_omit();
if (t3142().is_bound()) t3142().set_implicit_omit();
if (t3169().is_bound()) t3169().set_implicit_omit();
if (t3191().is_bound()) t3191().set_implicit_omit();
if (t3193__10ms().is_bound()) t3193__10ms().set_implicit_omit();
if (t3195().is_bound()) t3195().set_implicit_omit();
if (n3101().is_bound()) n3101().set_implicit_omit();
if (n3103().is_bound()) n3103().set_implicit_omit();
if (n3105().is_bound()) n3105().set_implicit_omit();
if (cv__countdown().is_bound()) cv__countdown().set_implicit_omit();
if (dl__tbf__ext().is_bound()) dl__tbf__ext().set_implicit_omit();
if (ul__tbf__ext().is_bound()) ul__tbf__ext().set_implicit_omit();
if (initial__cs().is_bound()) initial__cs().set_implicit_omit();
if (initial__mcs().is_bound()) initial__mcs().set_implicit_omit();
if (nsvci().is_bound()) nsvci().set_implicit_omit();
if (local__port().is_bound()) local__port().set_implicit_omit();
if (remote__port().is_bound()) remote__port().set_implicit_omit();
if (remote__addr().is_bound()) remote__addr().set_implicit_omit();
if (!bts__model().is_bound()) bts__model() = OMIT_VALUE;
else bts__model().set_implicit_omit();
}

void PCUIF__info__ind::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (34<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_info_ind has 34 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) version().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) flags().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) trx().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) bsic().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mcc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mnc().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mnc__3__digits().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) lac().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rac().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) nsei().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nse__timer().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) cell__timer().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) cell__id().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) repeat__time().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) repeat__count().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) bvci().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) t3142().set_param(*param.get_elem(16));
    if (param.get_size()>17 && param.get_elem(17)->get_type()!=Module_Param::MP_NotUsed) t3169().set_param(*param.get_elem(17));
    if (param.get_size()>18 && param.get_elem(18)->get_type()!=Module_Param::MP_NotUsed) t3191().set_param(*param.get_elem(18));
    if (param.get_size()>19 && param.get_elem(19)->get_type()!=Module_Param::MP_NotUsed) t3193__10ms().set_param(*param.get_elem(19));
    if (param.get_size()>20 && param.get_elem(20)->get_type()!=Module_Param::MP_NotUsed) t3195().set_param(*param.get_elem(20));
    if (param.get_size()>21 && param.get_elem(21)->get_type()!=Module_Param::MP_NotUsed) n3101().set_param(*param.get_elem(21));
    if (param.get_size()>22 && param.get_elem(22)->get_type()!=Module_Param::MP_NotUsed) n3103().set_param(*param.get_elem(22));
    if (param.get_size()>23 && param.get_elem(23)->get_type()!=Module_Param::MP_NotUsed) n3105().set_param(*param.get_elem(23));
    if (param.get_size()>24 && param.get_elem(24)->get_type()!=Module_Param::MP_NotUsed) cv__countdown().set_param(*param.get_elem(24));
    if (param.get_size()>25 && param.get_elem(25)->get_type()!=Module_Param::MP_NotUsed) dl__tbf__ext().set_param(*param.get_elem(25));
    if (param.get_size()>26 && param.get_elem(26)->get_type()!=Module_Param::MP_NotUsed) ul__tbf__ext().set_param(*param.get_elem(26));
    if (param.get_size()>27 && param.get_elem(27)->get_type()!=Module_Param::MP_NotUsed) initial__cs().set_param(*param.get_elem(27));
    if (param.get_size()>28 && param.get_elem(28)->get_type()!=Module_Param::MP_NotUsed) initial__mcs().set_param(*param.get_elem(28));
    if (param.get_size()>29 && param.get_elem(29)->get_type()!=Module_Param::MP_NotUsed) nsvci().set_param(*param.get_elem(29));
    if (param.get_size()>30 && param.get_elem(30)->get_type()!=Module_Param::MP_NotUsed) local__port().set_param(*param.get_elem(30));
    if (param.get_size()>31 && param.get_elem(31)->get_type()!=Module_Param::MP_NotUsed) remote__port().set_param(*param.get_elem(31));
    if (param.get_size()>32 && param.get_elem(32)->get_type()!=Module_Param::MP_NotUsed) remote__addr().set_param(*param.get_elem(32));
    if (param.get_size()>33 && param.get_elem(33)->get_type()!=Module_Param::MP_NotUsed) bts__model().set_param(*param.get_elem(33));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "version")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          version().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "flags")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          flags().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bsic")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bsic().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc_3_digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc__3__digits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nsei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nsei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nse_timer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nse__timer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_timer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__timer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "repeat_time")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          repeat__time().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "repeat_count")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          repeat__count().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bvci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bvci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3142")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3142().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3169")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3169().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3191")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3191().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3193_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3193__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3195")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3195().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3101")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3101().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3103")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3103().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3105")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3105().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cv_countdown")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cv__countdown().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "dl_tbf_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dl__tbf__ext().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ul_tbf_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ul__tbf__ext().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "initial_cs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          initial__cs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "initial_mcs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          initial__mcs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nsvci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nsvci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "local_port")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          local__port().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "remote_port")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          remote__port().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "remote_addr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          remote__addr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_model")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__model().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_info_ind: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_info_ind");
  }
}

void PCUIF__info__ind::encode_text(Text_Buf& text_buf) const
{
field_version.encode_text(text_buf);
field_flags.encode_text(text_buf);
field_trx.encode_text(text_buf);
field_bsic.encode_text(text_buf);
field_mcc.encode_text(text_buf);
field_mnc.encode_text(text_buf);
field_mnc__3__digits.encode_text(text_buf);
field_lac.encode_text(text_buf);
field_rac.encode_text(text_buf);
field_nsei.encode_text(text_buf);
field_nse__timer.encode_text(text_buf);
field_cell__timer.encode_text(text_buf);
field_cell__id.encode_text(text_buf);
field_repeat__time.encode_text(text_buf);
field_repeat__count.encode_text(text_buf);
field_bvci.encode_text(text_buf);
field_t3142.encode_text(text_buf);
field_t3169.encode_text(text_buf);
field_t3191.encode_text(text_buf);
field_t3193__10ms.encode_text(text_buf);
field_t3195.encode_text(text_buf);
field_n3101.encode_text(text_buf);
field_n3103.encode_text(text_buf);
field_n3105.encode_text(text_buf);
field_cv__countdown.encode_text(text_buf);
field_dl__tbf__ext.encode_text(text_buf);
field_ul__tbf__ext.encode_text(text_buf);
field_initial__cs.encode_text(text_buf);
field_initial__mcs.encode_text(text_buf);
field_nsvci.encode_text(text_buf);
field_local__port.encode_text(text_buf);
field_remote__port.encode_text(text_buf);
field_remote__addr.encode_text(text_buf);
field_bts__model.encode_text(text_buf);
}

void PCUIF__info__ind::decode_text(Text_Buf& text_buf)
{
field_version.decode_text(text_buf);
field_flags.decode_text(text_buf);
field_trx.decode_text(text_buf);
field_bsic.decode_text(text_buf);
field_mcc.decode_text(text_buf);
field_mnc.decode_text(text_buf);
field_mnc__3__digits.decode_text(text_buf);
field_lac.decode_text(text_buf);
field_rac.decode_text(text_buf);
field_nsei.decode_text(text_buf);
field_nse__timer.decode_text(text_buf);
field_cell__timer.decode_text(text_buf);
field_cell__id.decode_text(text_buf);
field_repeat__time.decode_text(text_buf);
field_repeat__count.decode_text(text_buf);
field_bvci.decode_text(text_buf);
field_t3142.decode_text(text_buf);
field_t3169.decode_text(text_buf);
field_t3191.decode_text(text_buf);
field_t3193__10ms.decode_text(text_buf);
field_t3195.decode_text(text_buf);
field_n3101.decode_text(text_buf);
field_n3103.decode_text(text_buf);
field_n3105.decode_text(text_buf);
field_cv__countdown.decode_text(text_buf);
field_dl__tbf__ext.decode_text(text_buf);
field_ul__tbf__ext.decode_text(text_buf);
field_initial__cs.decode_text(text_buf);
field_initial__mcs.decode_text(text_buf);
field_nsvci.decode_text(text_buf);
field_local__port.decode_text(text_buf);
field_remote__port.decode_text(text_buf);
field_remote__addr.decode_text(text_buf);
field_bts__model.decode_text(text_buf);
}

void PCUIF__info__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__info__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__info__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__info__ind_version_descr_.raw->forceomit);
  decoded_field_length = field_version.RAW_decode(PCUIF__info__ind_version_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__info__ind_flags_descr_.raw->forceomit);
  decoded_field_length = field_flags.RAW_decode(PCUIF__info__ind_flags_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__info__ind_trx_descr_.raw->forceomit);
  decoded_field_length = field_trx.RAW_decode(PCUIF__info__ind_trx_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__info__ind_bsic_descr_.raw->forceomit);
  decoded_field_length = field_bsic.RAW_decode(PCUIF__info__ind_bsic_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__info__ind_mcc_descr_.raw->forceomit);
  decoded_field_length = field_mcc.RAW_decode(PCUIF__info__ind_mcc_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__info__ind_mnc_descr_.raw->forceomit);
  decoded_field_length = field_mnc.RAW_decode(PCUIF__info__ind_mnc_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__info__ind_mnc__3__digits_descr_.raw->forceomit);
  decoded_field_length = field_mnc__3__digits.RAW_decode(PCUIF__info__ind_mnc__3__digits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PCUIF__info__ind_lac_descr_.raw->forceomit);
  decoded_field_length = field_lac.RAW_decode(PCUIF__info__ind_lac_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_8_force_omit(8, force_omit, PCUIF__info__ind_rac_descr_.raw->forceomit);
  decoded_field_length = field_rac.RAW_decode(PCUIF__info__ind_rac_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_9_force_omit(9, force_omit, PCUIF__info__ind_nsei_descr_.raw->forceomit);
  decoded_field_length = field_nsei.RAW_decode(PCUIF__info__ind_nsei_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_10_force_omit(10, force_omit, PCUIF__info__ind_nse__timer_descr_.raw->forceomit);
  decoded_field_length = field_nse__timer.RAW_decode(PCUIF__info__ind_nse__timer_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_11_force_omit(11, force_omit, PCUIF__info__ind_cell__timer_descr_.raw->forceomit);
  decoded_field_length = field_cell__timer.RAW_decode(PCUIF__info__ind_cell__timer_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_12_force_omit(12, force_omit, PCUIF__info__ind_cell__id_descr_.raw->forceomit);
  decoded_field_length = field_cell__id.RAW_decode(PCUIF__info__ind_cell__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_12_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_13_force_omit(13, force_omit, PCUIF__info__ind_repeat__time_descr_.raw->forceomit);
  decoded_field_length = field_repeat__time.RAW_decode(PCUIF__info__ind_repeat__time_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_13_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_14_force_omit(14, force_omit, PCUIF__info__ind_repeat__count_descr_.raw->forceomit);
  decoded_field_length = field_repeat__count.RAW_decode(PCUIF__info__ind_repeat__count_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_14_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_15_force_omit(15, force_omit, PCUIF__info__ind_bvci_descr_.raw->forceomit);
  decoded_field_length = field_bvci.RAW_decode(PCUIF__info__ind_bvci_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_15_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_16_force_omit(16, force_omit, PCUIF__info__ind_t3142_descr_.raw->forceomit);
  decoded_field_length = field_t3142.RAW_decode(PCUIF__info__ind_t3142_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_16_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_17_force_omit(17, force_omit, PCUIF__info__ind_t3169_descr_.raw->forceomit);
  decoded_field_length = field_t3169.RAW_decode(PCUIF__info__ind_t3169_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_17_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_18_force_omit(18, force_omit, PCUIF__info__ind_t3191_descr_.raw->forceomit);
  decoded_field_length = field_t3191.RAW_decode(PCUIF__info__ind_t3191_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_18_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_19_force_omit(19, force_omit, PCUIF__info__ind_t3193__10ms_descr_.raw->forceomit);
  decoded_field_length = field_t3193__10ms.RAW_decode(PCUIF__info__ind_t3193__10ms_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_19_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_20_force_omit(20, force_omit, PCUIF__info__ind_t3195_descr_.raw->forceomit);
  decoded_field_length = field_t3195.RAW_decode(PCUIF__info__ind_t3195_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_20_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_21_force_omit(21, force_omit, PCUIF__info__ind_n3101_descr_.raw->forceomit);
  decoded_field_length = field_n3101.RAW_decode(PCUIF__info__ind_n3101_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_21_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_22_force_omit(22, force_omit, PCUIF__info__ind_n3103_descr_.raw->forceomit);
  decoded_field_length = field_n3103.RAW_decode(PCUIF__info__ind_n3103_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_22_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_23_force_omit(23, force_omit, PCUIF__info__ind_n3105_descr_.raw->forceomit);
  decoded_field_length = field_n3105.RAW_decode(PCUIF__info__ind_n3105_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_23_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_24_force_omit(24, force_omit, PCUIF__info__ind_cv__countdown_descr_.raw->forceomit);
  decoded_field_length = field_cv__countdown.RAW_decode(PCUIF__info__ind_cv__countdown_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_24_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_25_force_omit(25, force_omit, PCUIF__info__ind_dl__tbf__ext_descr_.raw->forceomit);
  decoded_field_length = field_dl__tbf__ext.RAW_decode(PCUIF__info__ind_dl__tbf__ext_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_25_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_26_force_omit(26, force_omit, PCUIF__info__ind_ul__tbf__ext_descr_.raw->forceomit);
  decoded_field_length = field_ul__tbf__ext.RAW_decode(PCUIF__info__ind_ul__tbf__ext_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_26_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_27_force_omit(27, force_omit, PCUIF__info__ind_initial__cs_descr_.raw->forceomit);
  decoded_field_length = field_initial__cs.RAW_decode(PCUIF__info__ind_initial__cs_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_27_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_28_force_omit(28, force_omit, PCUIF__info__ind_initial__mcs_descr_.raw->forceomit);
  decoded_field_length = field_initial__mcs.RAW_decode(PCUIF__info__ind_initial__mcs_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_28_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_29_force_omit(29, force_omit, PCUIF__info__ind_nsvci_descr_.raw->forceomit);
  decoded_field_length = field_nsvci.RAW_decode(PCUIF__info__ind_nsvci_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_29_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_30_force_omit(30, force_omit, PCUIF__info__ind_local__port_descr_.raw->forceomit);
  decoded_field_length = field_local__port.RAW_decode(PCUIF__info__ind_local__port_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_30_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_31_force_omit(31, force_omit, PCUIF__info__ind_remote__port_descr_.raw->forceomit);
  decoded_field_length = field_remote__port.RAW_decode(PCUIF__info__ind_remote__port_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_31_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_32_force_omit(32, force_omit, PCUIF__info__ind_remote__addr_descr_.raw->forceomit);
  decoded_field_length = field_remote__addr.RAW_decode(PCUIF__info__ind_remote__addr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_32_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(33)) {
    field_bts__model = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_33_force_omit(33, force_omit, PCUIF__info__ind_bts__model_descr_.raw->forceomit);
  decoded_field_length = field_bts__model().RAW_decode(PCUIF__info__ind_bts__model_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_33_force_omit);
  if (decoded_field_length < 1) {
  field_bts__model = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_bts__model=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__info__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 34;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(34);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__info__ind_version_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__info__ind_flags_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__info__ind_trx_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__info__ind_bsic_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__info__ind_mcc_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__info__ind_mnc_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__info__ind_mnc__3__digits_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PCUIF__info__ind_lac_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PCUIF__info__ind_rac_descr_.raw);
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, PCUIF__info__ind_nsei_descr_.raw);
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, PCUIF__info__ind_nse__timer_descr_.raw);
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, PCUIF__info__ind_cell__timer_descr_.raw);
  myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 12, PCUIF__info__ind_cell__id_descr_.raw);
  myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 13, PCUIF__info__ind_repeat__time_descr_.raw);
  myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 14, PCUIF__info__ind_repeat__count_descr_.raw);
  myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 15, PCUIF__info__ind_bvci_descr_.raw);
  myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 16, PCUIF__info__ind_t3142_descr_.raw);
  myleaf.body.node.nodes[17] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 17, PCUIF__info__ind_t3169_descr_.raw);
  myleaf.body.node.nodes[18] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 18, PCUIF__info__ind_t3191_descr_.raw);
  myleaf.body.node.nodes[19] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 19, PCUIF__info__ind_t3193__10ms_descr_.raw);
  myleaf.body.node.nodes[20] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 20, PCUIF__info__ind_t3195_descr_.raw);
  myleaf.body.node.nodes[21] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 21, PCUIF__info__ind_n3101_descr_.raw);
  myleaf.body.node.nodes[22] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 22, PCUIF__info__ind_n3103_descr_.raw);
  myleaf.body.node.nodes[23] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 23, PCUIF__info__ind_n3105_descr_.raw);
  myleaf.body.node.nodes[24] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 24, PCUIF__info__ind_cv__countdown_descr_.raw);
  myleaf.body.node.nodes[25] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 25, PCUIF__info__ind_dl__tbf__ext_descr_.raw);
  myleaf.body.node.nodes[26] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 26, PCUIF__info__ind_ul__tbf__ext_descr_.raw);
  myleaf.body.node.nodes[27] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 27, PCUIF__info__ind_initial__cs_descr_.raw);
  myleaf.body.node.nodes[28] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 28, PCUIF__info__ind_initial__mcs_descr_.raw);
  myleaf.body.node.nodes[29] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 29, PCUIF__info__ind_nsvci_descr_.raw);
  myleaf.body.node.nodes[30] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 30, PCUIF__info__ind_local__port_descr_.raw);
  myleaf.body.node.nodes[31] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 31, PCUIF__info__ind_remote__port_descr_.raw);
  myleaf.body.node.nodes[32] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 32, PCUIF__info__ind_remote__addr_descr_.raw);
  if (field_bts__model.ispresent()) {
  myleaf.body.node.nodes[33] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 33, PCUIF__info__ind_bts__model_descr_.raw);
  }
  else myleaf.body.node.nodes[33] = NULL;
  encoded_length += field_version.RAW_encode(PCUIF__info__ind_version_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_flags.RAW_encode(PCUIF__info__ind_flags_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_trx.RAW_encode(PCUIF__info__ind_trx_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_bsic.RAW_encode(PCUIF__info__ind_bsic_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_mcc.RAW_encode(PCUIF__info__ind_mcc_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_mnc.RAW_encode(PCUIF__info__ind_mnc_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_mnc__3__digits.RAW_encode(PCUIF__info__ind_mnc__3__digits_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_lac.RAW_encode(PCUIF__info__ind_lac_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_rac.RAW_encode(PCUIF__info__ind_rac_descr_, *myleaf.body.node.nodes[8]);
  encoded_length += field_nsei.RAW_encode(PCUIF__info__ind_nsei_descr_, *myleaf.body.node.nodes[9]);
  encoded_length += field_nse__timer.RAW_encode(PCUIF__info__ind_nse__timer_descr_, *myleaf.body.node.nodes[10]);
  encoded_length += field_cell__timer.RAW_encode(PCUIF__info__ind_cell__timer_descr_, *myleaf.body.node.nodes[11]);
  encoded_length += field_cell__id.RAW_encode(PCUIF__info__ind_cell__id_descr_, *myleaf.body.node.nodes[12]);
  encoded_length += field_repeat__time.RAW_encode(PCUIF__info__ind_repeat__time_descr_, *myleaf.body.node.nodes[13]);
  encoded_length += field_repeat__count.RAW_encode(PCUIF__info__ind_repeat__count_descr_, *myleaf.body.node.nodes[14]);
  encoded_length += field_bvci.RAW_encode(PCUIF__info__ind_bvci_descr_, *myleaf.body.node.nodes[15]);
  encoded_length += field_t3142.RAW_encode(PCUIF__info__ind_t3142_descr_, *myleaf.body.node.nodes[16]);
  encoded_length += field_t3169.RAW_encode(PCUIF__info__ind_t3169_descr_, *myleaf.body.node.nodes[17]);
  encoded_length += field_t3191.RAW_encode(PCUIF__info__ind_t3191_descr_, *myleaf.body.node.nodes[18]);
  encoded_length += field_t3193__10ms.RAW_encode(PCUIF__info__ind_t3193__10ms_descr_, *myleaf.body.node.nodes[19]);
  encoded_length += field_t3195.RAW_encode(PCUIF__info__ind_t3195_descr_, *myleaf.body.node.nodes[20]);
  encoded_length += field_n3101.RAW_encode(PCUIF__info__ind_n3101_descr_, *myleaf.body.node.nodes[21]);
  encoded_length += field_n3103.RAW_encode(PCUIF__info__ind_n3103_descr_, *myleaf.body.node.nodes[22]);
  encoded_length += field_n3105.RAW_encode(PCUIF__info__ind_n3105_descr_, *myleaf.body.node.nodes[23]);
  encoded_length += field_cv__countdown.RAW_encode(PCUIF__info__ind_cv__countdown_descr_, *myleaf.body.node.nodes[24]);
  encoded_length += field_dl__tbf__ext.RAW_encode(PCUIF__info__ind_dl__tbf__ext_descr_, *myleaf.body.node.nodes[25]);
  encoded_length += field_ul__tbf__ext.RAW_encode(PCUIF__info__ind_ul__tbf__ext_descr_, *myleaf.body.node.nodes[26]);
  encoded_length += field_initial__cs.RAW_encode(PCUIF__info__ind_initial__cs_descr_, *myleaf.body.node.nodes[27]);
  encoded_length += field_initial__mcs.RAW_encode(PCUIF__info__ind_initial__mcs_descr_, *myleaf.body.node.nodes[28]);
  encoded_length += field_nsvci.RAW_encode(PCUIF__info__ind_nsvci_descr_, *myleaf.body.node.nodes[29]);
  encoded_length += field_local__port.RAW_encode(PCUIF__info__ind_local__port_descr_, *myleaf.body.node.nodes[30]);
  encoded_length += field_remote__port.RAW_encode(PCUIF__info__ind_remote__port_descr_, *myleaf.body.node.nodes[31]);
  encoded_length += field_remote__addr.RAW_encode(PCUIF__info__ind_remote__addr_descr_, *myleaf.body.node.nodes[32]);
  if (field_bts__model.ispresent()) {
  encoded_length += field_bts__model().RAW_encode(PCUIF__info__ind_bts__model_descr_, *myleaf.body.node.nodes[33]);
  }
  return myleaf.length = encoded_length;
}

struct PCUIF__info__ind_template::single_value_struct {
INTEGER_template field_version;
PCUIF__Flags_template field_flags;
PCUIF__InfoTrxs_template field_trx;
INTEGER_template field_bsic;
INTEGER_template field_mcc;
INTEGER_template field_mnc;
INTEGER_template field_mnc__3__digits;
INTEGER_template field_lac;
INTEGER_template field_rac;
INTEGER_template field_nsei;
PCUIF__info__ind_nse__timer_template field_nse__timer;
PCUIF__info__ind_cell__timer_template field_cell__timer;
INTEGER_template field_cell__id;
INTEGER_template field_repeat__time;
INTEGER_template field_repeat__count;
INTEGER_template field_bvci;
INTEGER_template field_t3142;
INTEGER_template field_t3169;
INTEGER_template field_t3191;
INTEGER_template field_t3193__10ms;
INTEGER_template field_t3195;
INTEGER_template field_n3101;
INTEGER_template field_n3103;
INTEGER_template field_n3105;
INTEGER_template field_cv__countdown;
INTEGER_template field_dl__tbf__ext;
INTEGER_template field_ul__tbf__ext;
INTEGER_template field_initial__cs;
INTEGER_template field_initial__mcs;
PCUIF__info__ind_nsvci_template field_nsvci;
PCUIF__info__ind_local__port_template field_local__port;
PCUIF__info__ind_remote__port_template field_remote__port;
PCUIF__RemoteAddr_template field_remote__addr;
PCUIF__bts__model_template field_bts__model;
};

void PCUIF__info__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_version = ANY_VALUE;
single_value->field_flags = ANY_VALUE;
single_value->field_trx = ANY_VALUE;
single_value->field_bsic = ANY_VALUE;
single_value->field_mcc = ANY_VALUE;
single_value->field_mnc = ANY_VALUE;
single_value->field_mnc__3__digits = ANY_VALUE;
single_value->field_lac = ANY_VALUE;
single_value->field_rac = ANY_VALUE;
single_value->field_nsei = ANY_VALUE;
single_value->field_nse__timer = ANY_VALUE;
single_value->field_cell__timer = ANY_VALUE;
single_value->field_cell__id = ANY_VALUE;
single_value->field_repeat__time = ANY_VALUE;
single_value->field_repeat__count = ANY_VALUE;
single_value->field_bvci = ANY_VALUE;
single_value->field_t3142 = ANY_VALUE;
single_value->field_t3169 = ANY_VALUE;
single_value->field_t3191 = ANY_VALUE;
single_value->field_t3193__10ms = ANY_VALUE;
single_value->field_t3195 = ANY_VALUE;
single_value->field_n3101 = ANY_VALUE;
single_value->field_n3103 = ANY_VALUE;
single_value->field_n3105 = ANY_VALUE;
single_value->field_cv__countdown = ANY_VALUE;
single_value->field_dl__tbf__ext = ANY_VALUE;
single_value->field_ul__tbf__ext = ANY_VALUE;
single_value->field_initial__cs = ANY_VALUE;
single_value->field_initial__mcs = ANY_VALUE;
single_value->field_nsvci = ANY_VALUE;
single_value->field_local__port = ANY_VALUE;
single_value->field_remote__port = ANY_VALUE;
single_value->field_remote__addr = ANY_VALUE;
single_value->field_bts__model = ANY_OR_OMIT;
}
}
}

void PCUIF__info__ind_template::copy_value(const PCUIF__info__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.version().is_bound()) {
  single_value->field_version = other_value.version();
} else {
  single_value->field_version.clean_up();
}
if (other_value.flags().is_bound()) {
  single_value->field_flags = other_value.flags();
} else {
  single_value->field_flags.clean_up();
}
if (other_value.trx().is_bound()) {
  single_value->field_trx = other_value.trx();
} else {
  single_value->field_trx.clean_up();
}
if (other_value.bsic().is_bound()) {
  single_value->field_bsic = other_value.bsic();
} else {
  single_value->field_bsic.clean_up();
}
if (other_value.mcc().is_bound()) {
  single_value->field_mcc = other_value.mcc();
} else {
  single_value->field_mcc.clean_up();
}
if (other_value.mnc().is_bound()) {
  single_value->field_mnc = other_value.mnc();
} else {
  single_value->field_mnc.clean_up();
}
if (other_value.mnc__3__digits().is_bound()) {
  single_value->field_mnc__3__digits = other_value.mnc__3__digits();
} else {
  single_value->field_mnc__3__digits.clean_up();
}
if (other_value.lac().is_bound()) {
  single_value->field_lac = other_value.lac();
} else {
  single_value->field_lac.clean_up();
}
if (other_value.rac().is_bound()) {
  single_value->field_rac = other_value.rac();
} else {
  single_value->field_rac.clean_up();
}
if (other_value.nsei().is_bound()) {
  single_value->field_nsei = other_value.nsei();
} else {
  single_value->field_nsei.clean_up();
}
if (other_value.nse__timer().is_bound()) {
  single_value->field_nse__timer = other_value.nse__timer();
} else {
  single_value->field_nse__timer.clean_up();
}
if (other_value.cell__timer().is_bound()) {
  single_value->field_cell__timer = other_value.cell__timer();
} else {
  single_value->field_cell__timer.clean_up();
}
if (other_value.cell__id().is_bound()) {
  single_value->field_cell__id = other_value.cell__id();
} else {
  single_value->field_cell__id.clean_up();
}
if (other_value.repeat__time().is_bound()) {
  single_value->field_repeat__time = other_value.repeat__time();
} else {
  single_value->field_repeat__time.clean_up();
}
if (other_value.repeat__count().is_bound()) {
  single_value->field_repeat__count = other_value.repeat__count();
} else {
  single_value->field_repeat__count.clean_up();
}
if (other_value.bvci().is_bound()) {
  single_value->field_bvci = other_value.bvci();
} else {
  single_value->field_bvci.clean_up();
}
if (other_value.t3142().is_bound()) {
  single_value->field_t3142 = other_value.t3142();
} else {
  single_value->field_t3142.clean_up();
}
if (other_value.t3169().is_bound()) {
  single_value->field_t3169 = other_value.t3169();
} else {
  single_value->field_t3169.clean_up();
}
if (other_value.t3191().is_bound()) {
  single_value->field_t3191 = other_value.t3191();
} else {
  single_value->field_t3191.clean_up();
}
if (other_value.t3193__10ms().is_bound()) {
  single_value->field_t3193__10ms = other_value.t3193__10ms();
} else {
  single_value->field_t3193__10ms.clean_up();
}
if (other_value.t3195().is_bound()) {
  single_value->field_t3195 = other_value.t3195();
} else {
  single_value->field_t3195.clean_up();
}
if (other_value.n3101().is_bound()) {
  single_value->field_n3101 = other_value.n3101();
} else {
  single_value->field_n3101.clean_up();
}
if (other_value.n3103().is_bound()) {
  single_value->field_n3103 = other_value.n3103();
} else {
  single_value->field_n3103.clean_up();
}
if (other_value.n3105().is_bound()) {
  single_value->field_n3105 = other_value.n3105();
} else {
  single_value->field_n3105.clean_up();
}
if (other_value.cv__countdown().is_bound()) {
  single_value->field_cv__countdown = other_value.cv__countdown();
} else {
  single_value->field_cv__countdown.clean_up();
}
if (other_value.dl__tbf__ext().is_bound()) {
  single_value->field_dl__tbf__ext = other_value.dl__tbf__ext();
} else {
  single_value->field_dl__tbf__ext.clean_up();
}
if (other_value.ul__tbf__ext().is_bound()) {
  single_value->field_ul__tbf__ext = other_value.ul__tbf__ext();
} else {
  single_value->field_ul__tbf__ext.clean_up();
}
if (other_value.initial__cs().is_bound()) {
  single_value->field_initial__cs = other_value.initial__cs();
} else {
  single_value->field_initial__cs.clean_up();
}
if (other_value.initial__mcs().is_bound()) {
  single_value->field_initial__mcs = other_value.initial__mcs();
} else {
  single_value->field_initial__mcs.clean_up();
}
if (other_value.nsvci().is_bound()) {
  single_value->field_nsvci = other_value.nsvci();
} else {
  single_value->field_nsvci.clean_up();
}
if (other_value.local__port().is_bound()) {
  single_value->field_local__port = other_value.local__port();
} else {
  single_value->field_local__port.clean_up();
}
if (other_value.remote__port().is_bound()) {
  single_value->field_remote__port = other_value.remote__port();
} else {
  single_value->field_remote__port.clean_up();
}
if (other_value.remote__addr().is_bound()) {
  single_value->field_remote__addr = other_value.remote__addr();
} else {
  single_value->field_remote__addr.clean_up();
}
if (other_value.bts__model().is_bound()) {
  if (other_value.bts__model().ispresent()) single_value->field_bts__model = other_value.bts__model()();
  else single_value->field_bts__model = OMIT_VALUE;
} else {
  single_value->field_bts__model.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__info__ind_template::copy_template(const PCUIF__info__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.version().get_selection()) {
single_value->field_version = other_value.version();
} else {
single_value->field_version.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.flags().get_selection()) {
single_value->field_flags = other_value.flags();
} else {
single_value->field_flags.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx().get_selection()) {
single_value->field_trx = other_value.trx();
} else {
single_value->field_trx.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bsic().get_selection()) {
single_value->field_bsic = other_value.bsic();
} else {
single_value->field_bsic.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcc().get_selection()) {
single_value->field_mcc = other_value.mcc();
} else {
single_value->field_mcc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mnc().get_selection()) {
single_value->field_mnc = other_value.mnc();
} else {
single_value->field_mnc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mnc__3__digits().get_selection()) {
single_value->field_mnc__3__digits = other_value.mnc__3__digits();
} else {
single_value->field_mnc__3__digits.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lac().get_selection()) {
single_value->field_lac = other_value.lac();
} else {
single_value->field_lac.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rac().get_selection()) {
single_value->field_rac = other_value.rac();
} else {
single_value->field_rac.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nsei().get_selection()) {
single_value->field_nsei = other_value.nsei();
} else {
single_value->field_nsei.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nse__timer().get_selection()) {
single_value->field_nse__timer = other_value.nse__timer();
} else {
single_value->field_nse__timer.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cell__timer().get_selection()) {
single_value->field_cell__timer = other_value.cell__timer();
} else {
single_value->field_cell__timer.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cell__id().get_selection()) {
single_value->field_cell__id = other_value.cell__id();
} else {
single_value->field_cell__id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.repeat__time().get_selection()) {
single_value->field_repeat__time = other_value.repeat__time();
} else {
single_value->field_repeat__time.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.repeat__count().get_selection()) {
single_value->field_repeat__count = other_value.repeat__count();
} else {
single_value->field_repeat__count.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bvci().get_selection()) {
single_value->field_bvci = other_value.bvci();
} else {
single_value->field_bvci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3142().get_selection()) {
single_value->field_t3142 = other_value.t3142();
} else {
single_value->field_t3142.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3169().get_selection()) {
single_value->field_t3169 = other_value.t3169();
} else {
single_value->field_t3169.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3191().get_selection()) {
single_value->field_t3191 = other_value.t3191();
} else {
single_value->field_t3191.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3193__10ms().get_selection()) {
single_value->field_t3193__10ms = other_value.t3193__10ms();
} else {
single_value->field_t3193__10ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3195().get_selection()) {
single_value->field_t3195 = other_value.t3195();
} else {
single_value->field_t3195.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.n3101().get_selection()) {
single_value->field_n3101 = other_value.n3101();
} else {
single_value->field_n3101.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.n3103().get_selection()) {
single_value->field_n3103 = other_value.n3103();
} else {
single_value->field_n3103.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.n3105().get_selection()) {
single_value->field_n3105 = other_value.n3105();
} else {
single_value->field_n3105.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cv__countdown().get_selection()) {
single_value->field_cv__countdown = other_value.cv__countdown();
} else {
single_value->field_cv__countdown.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.dl__tbf__ext().get_selection()) {
single_value->field_dl__tbf__ext = other_value.dl__tbf__ext();
} else {
single_value->field_dl__tbf__ext.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ul__tbf__ext().get_selection()) {
single_value->field_ul__tbf__ext = other_value.ul__tbf__ext();
} else {
single_value->field_ul__tbf__ext.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.initial__cs().get_selection()) {
single_value->field_initial__cs = other_value.initial__cs();
} else {
single_value->field_initial__cs.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.initial__mcs().get_selection()) {
single_value->field_initial__mcs = other_value.initial__mcs();
} else {
single_value->field_initial__mcs.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nsvci().get_selection()) {
single_value->field_nsvci = other_value.nsvci();
} else {
single_value->field_nsvci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.local__port().get_selection()) {
single_value->field_local__port = other_value.local__port();
} else {
single_value->field_local__port.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.remote__port().get_selection()) {
single_value->field_remote__port = other_value.remote__port();
} else {
single_value->field_remote__port.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.remote__addr().get_selection()) {
single_value->field_remote__addr = other_value.remote__addr();
} else {
single_value->field_remote__addr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bts__model().get_selection()) {
single_value->field_bts__model = other_value.bts__model();
} else {
single_value->field_bts__model.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__info__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__info__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__info__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_info_ind.");
break;
}
set_selection(other_value);
}

PCUIF__info__ind_template::PCUIF__info__ind_template()
{
}

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

PCUIF__info__ind_template::PCUIF__info__ind_template(const PCUIF__info__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__info__ind_template::match(const PCUIF__info__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.version().is_bound()) return FALSE;
if(!single_value->field_version.match(other_value.version(), legacy))return FALSE;
if(!other_value.flags().is_bound()) return FALSE;
if(!single_value->field_flags.match(other_value.flags(), legacy))return FALSE;
if(!other_value.trx().is_bound()) return FALSE;
if(!single_value->field_trx.match(other_value.trx(), legacy))return FALSE;
if(!other_value.bsic().is_bound()) return FALSE;
if(!single_value->field_bsic.match(other_value.bsic(), legacy))return FALSE;
if(!other_value.mcc().is_bound()) return FALSE;
if(!single_value->field_mcc.match(other_value.mcc(), legacy))return FALSE;
if(!other_value.mnc().is_bound()) return FALSE;
if(!single_value->field_mnc.match(other_value.mnc(), legacy))return FALSE;
if(!other_value.mnc__3__digits().is_bound()) return FALSE;
if(!single_value->field_mnc__3__digits.match(other_value.mnc__3__digits(), legacy))return FALSE;
if(!other_value.lac().is_bound()) return FALSE;
if(!single_value->field_lac.match(other_value.lac(), legacy))return FALSE;
if(!other_value.rac().is_bound()) return FALSE;
if(!single_value->field_rac.match(other_value.rac(), legacy))return FALSE;
if(!other_value.nsei().is_bound()) return FALSE;
if(!single_value->field_nsei.match(other_value.nsei(), legacy))return FALSE;
if(!other_value.nse__timer().is_bound()) return FALSE;
if(!single_value->field_nse__timer.match(other_value.nse__timer(), legacy))return FALSE;
if(!other_value.cell__timer().is_bound()) return FALSE;
if(!single_value->field_cell__timer.match(other_value.cell__timer(), legacy))return FALSE;
if(!other_value.cell__id().is_bound()) return FALSE;
if(!single_value->field_cell__id.match(other_value.cell__id(), legacy))return FALSE;
if(!other_value.repeat__time().is_bound()) return FALSE;
if(!single_value->field_repeat__time.match(other_value.repeat__time(), legacy))return FALSE;
if(!other_value.repeat__count().is_bound()) return FALSE;
if(!single_value->field_repeat__count.match(other_value.repeat__count(), legacy))return FALSE;
if(!other_value.bvci().is_bound()) return FALSE;
if(!single_value->field_bvci.match(other_value.bvci(), legacy))return FALSE;
if(!other_value.t3142().is_bound()) return FALSE;
if(!single_value->field_t3142.match(other_value.t3142(), legacy))return FALSE;
if(!other_value.t3169().is_bound()) return FALSE;
if(!single_value->field_t3169.match(other_value.t3169(), legacy))return FALSE;
if(!other_value.t3191().is_bound()) return FALSE;
if(!single_value->field_t3191.match(other_value.t3191(), legacy))return FALSE;
if(!other_value.t3193__10ms().is_bound()) return FALSE;
if(!single_value->field_t3193__10ms.match(other_value.t3193__10ms(), legacy))return FALSE;
if(!other_value.t3195().is_bound()) return FALSE;
if(!single_value->field_t3195.match(other_value.t3195(), legacy))return FALSE;
if(!other_value.n3101().is_bound()) return FALSE;
if(!single_value->field_n3101.match(other_value.n3101(), legacy))return FALSE;
if(!other_value.n3103().is_bound()) return FALSE;
if(!single_value->field_n3103.match(other_value.n3103(), legacy))return FALSE;
if(!other_value.n3105().is_bound()) return FALSE;
if(!single_value->field_n3105.match(other_value.n3105(), legacy))return FALSE;
if(!other_value.cv__countdown().is_bound()) return FALSE;
if(!single_value->field_cv__countdown.match(other_value.cv__countdown(), legacy))return FALSE;
if(!other_value.dl__tbf__ext().is_bound()) return FALSE;
if(!single_value->field_dl__tbf__ext.match(other_value.dl__tbf__ext(), legacy))return FALSE;
if(!other_value.ul__tbf__ext().is_bound()) return FALSE;
if(!single_value->field_ul__tbf__ext.match(other_value.ul__tbf__ext(), legacy))return FALSE;
if(!other_value.initial__cs().is_bound()) return FALSE;
if(!single_value->field_initial__cs.match(other_value.initial__cs(), legacy))return FALSE;
if(!other_value.initial__mcs().is_bound()) return FALSE;
if(!single_value->field_initial__mcs.match(other_value.initial__mcs(), legacy))return FALSE;
if(!other_value.nsvci().is_bound()) return FALSE;
if(!single_value->field_nsvci.match(other_value.nsvci(), legacy))return FALSE;
if(!other_value.local__port().is_bound()) return FALSE;
if(!single_value->field_local__port.match(other_value.local__port(), legacy))return FALSE;
if(!other_value.remote__port().is_bound()) return FALSE;
if(!single_value->field_remote__port.match(other_value.remote__port(), legacy))return FALSE;
if(!other_value.remote__addr().is_bound()) return FALSE;
if(!single_value->field_remote__addr.match(other_value.remote__addr(), legacy))return FALSE;
if(!other_value.bts__model().is_bound()) return FALSE;
if((other_value.bts__model().ispresent() ? !single_value->field_bts__model.match((const PCUIF__bts__model&)other_value.bts__model(), legacy) : !single_value->field_bts__model.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_info_ind.");
}
return FALSE;
}

boolean PCUIF__info__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_version.is_bound()
 || single_value->field_flags.is_bound()
 || single_value->field_trx.is_bound()
 || single_value->field_bsic.is_bound()
 || single_value->field_mcc.is_bound()
 || single_value->field_mnc.is_bound()
 || single_value->field_mnc__3__digits.is_bound()
 || single_value->field_lac.is_bound()
 || single_value->field_rac.is_bound()
 || single_value->field_nsei.is_bound()
 || single_value->field_nse__timer.is_bound()
 || single_value->field_cell__timer.is_bound()
 || single_value->field_cell__id.is_bound()
 || single_value->field_repeat__time.is_bound()
 || single_value->field_repeat__count.is_bound()
 || single_value->field_bvci.is_bound()
 || single_value->field_t3142.is_bound()
 || single_value->field_t3169.is_bound()
 || single_value->field_t3191.is_bound()
 || single_value->field_t3193__10ms.is_bound()
 || single_value->field_t3195.is_bound()
 || single_value->field_n3101.is_bound()
 || single_value->field_n3103.is_bound()
 || single_value->field_n3105.is_bound()
 || single_value->field_cv__countdown.is_bound()
 || single_value->field_dl__tbf__ext.is_bound()
 || single_value->field_ul__tbf__ext.is_bound()
 || single_value->field_initial__cs.is_bound()
 || single_value->field_initial__mcs.is_bound()
 || single_value->field_nsvci.is_bound()
 || single_value->field_local__port.is_bound()
 || single_value->field_remote__port.is_bound()
 || single_value->field_remote__addr.is_bound()
 || (single_value->field_bts__model.is_omit() || single_value->field_bts__model.is_bound());
}

boolean PCUIF__info__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_version.is_value()
 && single_value->field_flags.is_value()
 && single_value->field_trx.is_value()
 && single_value->field_bsic.is_value()
 && single_value->field_mcc.is_value()
 && single_value->field_mnc.is_value()
 && single_value->field_mnc__3__digits.is_value()
 && single_value->field_lac.is_value()
 && single_value->field_rac.is_value()
 && single_value->field_nsei.is_value()
 && single_value->field_nse__timer.is_value()
 && single_value->field_cell__timer.is_value()
 && single_value->field_cell__id.is_value()
 && single_value->field_repeat__time.is_value()
 && single_value->field_repeat__count.is_value()
 && single_value->field_bvci.is_value()
 && single_value->field_t3142.is_value()
 && single_value->field_t3169.is_value()
 && single_value->field_t3191.is_value()
 && single_value->field_t3193__10ms.is_value()
 && single_value->field_t3195.is_value()
 && single_value->field_n3101.is_value()
 && single_value->field_n3103.is_value()
 && single_value->field_n3105.is_value()
 && single_value->field_cv__countdown.is_value()
 && single_value->field_dl__tbf__ext.is_value()
 && single_value->field_ul__tbf__ext.is_value()
 && single_value->field_initial__cs.is_value()
 && single_value->field_initial__mcs.is_value()
 && single_value->field_nsvci.is_value()
 && single_value->field_local__port.is_value()
 && single_value->field_remote__port.is_value()
 && single_value->field_remote__addr.is_value()
 && (single_value->field_bts__model.is_omit() || single_value->field_bts__model.is_value());
}

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

PCUIF__info__ind PCUIF__info__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
PCUIF__info__ind ret_val;
if (single_value->field_version.is_bound()) {
ret_val.version() = single_value->field_version.valueof();
}
if (single_value->field_flags.is_bound()) {
ret_val.flags() = single_value->field_flags.valueof();
}
if (single_value->field_trx.is_bound()) {
ret_val.trx() = single_value->field_trx.valueof();
}
if (single_value->field_bsic.is_bound()) {
ret_val.bsic() = single_value->field_bsic.valueof();
}
if (single_value->field_mcc.is_bound()) {
ret_val.mcc() = single_value->field_mcc.valueof();
}
if (single_value->field_mnc.is_bound()) {
ret_val.mnc() = single_value->field_mnc.valueof();
}
if (single_value->field_mnc__3__digits.is_bound()) {
ret_val.mnc__3__digits() = single_value->field_mnc__3__digits.valueof();
}
if (single_value->field_lac.is_bound()) {
ret_val.lac() = single_value->field_lac.valueof();
}
if (single_value->field_rac.is_bound()) {
ret_val.rac() = single_value->field_rac.valueof();
}
if (single_value->field_nsei.is_bound()) {
ret_val.nsei() = single_value->field_nsei.valueof();
}
if (single_value->field_nse__timer.is_bound()) {
ret_val.nse__timer() = single_value->field_nse__timer.valueof();
}
if (single_value->field_cell__timer.is_bound()) {
ret_val.cell__timer() = single_value->field_cell__timer.valueof();
}
if (single_value->field_cell__id.is_bound()) {
ret_val.cell__id() = single_value->field_cell__id.valueof();
}
if (single_value->field_repeat__time.is_bound()) {
ret_val.repeat__time() = single_value->field_repeat__time.valueof();
}
if (single_value->field_repeat__count.is_bound()) {
ret_val.repeat__count() = single_value->field_repeat__count.valueof();
}
if (single_value->field_bvci.is_bound()) {
ret_val.bvci() = single_value->field_bvci.valueof();
}
if (single_value->field_t3142.is_bound()) {
ret_val.t3142() = single_value->field_t3142.valueof();
}
if (single_value->field_t3169.is_bound()) {
ret_val.t3169() = single_value->field_t3169.valueof();
}
if (single_value->field_t3191.is_bound()) {
ret_val.t3191() = single_value->field_t3191.valueof();
}
if (single_value->field_t3193__10ms.is_bound()) {
ret_val.t3193__10ms() = single_value->field_t3193__10ms.valueof();
}
if (single_value->field_t3195.is_bound()) {
ret_val.t3195() = single_value->field_t3195.valueof();
}
if (single_value->field_n3101.is_bound()) {
ret_val.n3101() = single_value->field_n3101.valueof();
}
if (single_value->field_n3103.is_bound()) {
ret_val.n3103() = single_value->field_n3103.valueof();
}
if (single_value->field_n3105.is_bound()) {
ret_val.n3105() = single_value->field_n3105.valueof();
}
if (single_value->field_cv__countdown.is_bound()) {
ret_val.cv__countdown() = single_value->field_cv__countdown.valueof();
}
if (single_value->field_dl__tbf__ext.is_bound()) {
ret_val.dl__tbf__ext() = single_value->field_dl__tbf__ext.valueof();
}
if (single_value->field_ul__tbf__ext.is_bound()) {
ret_val.ul__tbf__ext() = single_value->field_ul__tbf__ext.valueof();
}
if (single_value->field_initial__cs.is_bound()) {
ret_val.initial__cs() = single_value->field_initial__cs.valueof();
}
if (single_value->field_initial__mcs.is_bound()) {
ret_val.initial__mcs() = single_value->field_initial__mcs.valueof();
}
if (single_value->field_nsvci.is_bound()) {
ret_val.nsvci() = single_value->field_nsvci.valueof();
}
if (single_value->field_local__port.is_bound()) {
ret_val.local__port() = single_value->field_local__port.valueof();
}
if (single_value->field_remote__port.is_bound()) {
ret_val.remote__port() = single_value->field_remote__port.valueof();
}
if (single_value->field_remote__addr.is_bound()) {
ret_val.remote__addr() = single_value->field_remote__addr.valueof();
}
if (single_value->field_bts__model.is_omit()) ret_val.bts__model() = OMIT_VALUE;
else if (single_value->field_bts__model.is_bound()) {
ret_val.bts__model() = single_value->field_bts__model.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__info__ind_template::version()
{
set_specific();
return single_value->field_version;
}

const INTEGER_template& PCUIF__info__ind_template::version() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field version of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_version;
}

PCUIF__Flags_template& PCUIF__info__ind_template::flags()
{
set_specific();
return single_value->field_flags;
}

const PCUIF__Flags_template& PCUIF__info__ind_template::flags() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field flags of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_flags;
}

PCUIF__InfoTrxs_template& PCUIF__info__ind_template::trx()
{
set_specific();
return single_value->field_trx;
}

const PCUIF__InfoTrxs_template& PCUIF__info__ind_template::trx() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_trx;
}

INTEGER_template& PCUIF__info__ind_template::bsic()
{
set_specific();
return single_value->field_bsic;
}

const INTEGER_template& PCUIF__info__ind_template::bsic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bsic of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_bsic;
}

INTEGER_template& PCUIF__info__ind_template::mcc()
{
set_specific();
return single_value->field_mcc;
}

const INTEGER_template& PCUIF__info__ind_template::mcc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcc of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_mcc;
}

INTEGER_template& PCUIF__info__ind_template::mnc()
{
set_specific();
return single_value->field_mnc;
}

const INTEGER_template& PCUIF__info__ind_template::mnc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mnc of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_mnc;
}

INTEGER_template& PCUIF__info__ind_template::mnc__3__digits()
{
set_specific();
return single_value->field_mnc__3__digits;
}

const INTEGER_template& PCUIF__info__ind_template::mnc__3__digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mnc_3_digits of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_mnc__3__digits;
}

INTEGER_template& PCUIF__info__ind_template::lac()
{
set_specific();
return single_value->field_lac;
}

const INTEGER_template& PCUIF__info__ind_template::lac() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lac of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_lac;
}

INTEGER_template& PCUIF__info__ind_template::rac()
{
set_specific();
return single_value->field_rac;
}

const INTEGER_template& PCUIF__info__ind_template::rac() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rac of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_rac;
}

INTEGER_template& PCUIF__info__ind_template::nsei()
{
set_specific();
return single_value->field_nsei;
}

const INTEGER_template& PCUIF__info__ind_template::nsei() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nsei of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_nsei;
}

PCUIF__info__ind_nse__timer_template& PCUIF__info__ind_template::nse__timer()
{
set_specific();
return single_value->field_nse__timer;
}

const PCUIF__info__ind_nse__timer_template& PCUIF__info__ind_template::nse__timer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nse_timer of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_nse__timer;
}

PCUIF__info__ind_cell__timer_template& PCUIF__info__ind_template::cell__timer()
{
set_specific();
return single_value->field_cell__timer;
}

const PCUIF__info__ind_cell__timer_template& PCUIF__info__ind_template::cell__timer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cell_timer of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_cell__timer;
}

INTEGER_template& PCUIF__info__ind_template::cell__id()
{
set_specific();
return single_value->field_cell__id;
}

const INTEGER_template& PCUIF__info__ind_template::cell__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cell_id of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_cell__id;
}

INTEGER_template& PCUIF__info__ind_template::repeat__time()
{
set_specific();
return single_value->field_repeat__time;
}

const INTEGER_template& PCUIF__info__ind_template::repeat__time() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field repeat_time of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_repeat__time;
}

INTEGER_template& PCUIF__info__ind_template::repeat__count()
{
set_specific();
return single_value->field_repeat__count;
}

const INTEGER_template& PCUIF__info__ind_template::repeat__count() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field repeat_count of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_repeat__count;
}

INTEGER_template& PCUIF__info__ind_template::bvci()
{
set_specific();
return single_value->field_bvci;
}

const INTEGER_template& PCUIF__info__ind_template::bvci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bvci of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_bvci;
}

INTEGER_template& PCUIF__info__ind_template::t3142()
{
set_specific();
return single_value->field_t3142;
}

const INTEGER_template& PCUIF__info__ind_template::t3142() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3142 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_t3142;
}

INTEGER_template& PCUIF__info__ind_template::t3169()
{
set_specific();
return single_value->field_t3169;
}

const INTEGER_template& PCUIF__info__ind_template::t3169() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3169 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_t3169;
}

INTEGER_template& PCUIF__info__ind_template::t3191()
{
set_specific();
return single_value->field_t3191;
}

const INTEGER_template& PCUIF__info__ind_template::t3191() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3191 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_t3191;
}

INTEGER_template& PCUIF__info__ind_template::t3193__10ms()
{
set_specific();
return single_value->field_t3193__10ms;
}

const INTEGER_template& PCUIF__info__ind_template::t3193__10ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3193_10ms of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_t3193__10ms;
}

INTEGER_template& PCUIF__info__ind_template::t3195()
{
set_specific();
return single_value->field_t3195;
}

const INTEGER_template& PCUIF__info__ind_template::t3195() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3195 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_t3195;
}

INTEGER_template& PCUIF__info__ind_template::n3101()
{
set_specific();
return single_value->field_n3101;
}

const INTEGER_template& PCUIF__info__ind_template::n3101() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field n3101 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_n3101;
}

INTEGER_template& PCUIF__info__ind_template::n3103()
{
set_specific();
return single_value->field_n3103;
}

const INTEGER_template& PCUIF__info__ind_template::n3103() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field n3103 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_n3103;
}

INTEGER_template& PCUIF__info__ind_template::n3105()
{
set_specific();
return single_value->field_n3105;
}

const INTEGER_template& PCUIF__info__ind_template::n3105() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field n3105 of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_n3105;
}

INTEGER_template& PCUIF__info__ind_template::cv__countdown()
{
set_specific();
return single_value->field_cv__countdown;
}

const INTEGER_template& PCUIF__info__ind_template::cv__countdown() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cv_countdown of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_cv__countdown;
}

INTEGER_template& PCUIF__info__ind_template::dl__tbf__ext()
{
set_specific();
return single_value->field_dl__tbf__ext;
}

const INTEGER_template& PCUIF__info__ind_template::dl__tbf__ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field dl_tbf_ext of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_dl__tbf__ext;
}

INTEGER_template& PCUIF__info__ind_template::ul__tbf__ext()
{
set_specific();
return single_value->field_ul__tbf__ext;
}

const INTEGER_template& PCUIF__info__ind_template::ul__tbf__ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ul_tbf_ext of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_ul__tbf__ext;
}

INTEGER_template& PCUIF__info__ind_template::initial__cs()
{
set_specific();
return single_value->field_initial__cs;
}

const INTEGER_template& PCUIF__info__ind_template::initial__cs() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field initial_cs of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_initial__cs;
}

INTEGER_template& PCUIF__info__ind_template::initial__mcs()
{
set_specific();
return single_value->field_initial__mcs;
}

const INTEGER_template& PCUIF__info__ind_template::initial__mcs() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field initial_mcs of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_initial__mcs;
}

PCUIF__info__ind_nsvci_template& PCUIF__info__ind_template::nsvci()
{
set_specific();
return single_value->field_nsvci;
}

const PCUIF__info__ind_nsvci_template& PCUIF__info__ind_template::nsvci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nsvci of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_nsvci;
}

PCUIF__info__ind_local__port_template& PCUIF__info__ind_template::local__port()
{
set_specific();
return single_value->field_local__port;
}

const PCUIF__info__ind_local__port_template& PCUIF__info__ind_template::local__port() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field local_port of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_local__port;
}

PCUIF__info__ind_remote__port_template& PCUIF__info__ind_template::remote__port()
{
set_specific();
return single_value->field_remote__port;
}

const PCUIF__info__ind_remote__port_template& PCUIF__info__ind_template::remote__port() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field remote_port of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_remote__port;
}

PCUIF__RemoteAddr_template& PCUIF__info__ind_template::remote__addr()
{
set_specific();
return single_value->field_remote__addr;
}

const PCUIF__RemoteAddr_template& PCUIF__info__ind_template::remote__addr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field remote_addr of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_remote__addr;
}

PCUIF__bts__model_template& PCUIF__info__ind_template::bts__model()
{
set_specific();
return single_value->field_bts__model;
}

const PCUIF__bts__model_template& PCUIF__info__ind_template::bts__model() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bts_model of a non-specific template of type @PCUIF_Types.PCUIF_info_ind.");
return single_value->field_bts__model;
}

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

void PCUIF__info__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ version := ");
single_value->field_version.log();
TTCN_Logger::log_event_str(", flags := ");
single_value->field_flags.log();
TTCN_Logger::log_event_str(", trx := ");
single_value->field_trx.log();
TTCN_Logger::log_event_str(", bsic := ");
single_value->field_bsic.log();
TTCN_Logger::log_event_str(", mcc := ");
single_value->field_mcc.log();
TTCN_Logger::log_event_str(", mnc := ");
single_value->field_mnc.log();
TTCN_Logger::log_event_str(", mnc_3_digits := ");
single_value->field_mnc__3__digits.log();
TTCN_Logger::log_event_str(", lac := ");
single_value->field_lac.log();
TTCN_Logger::log_event_str(", rac := ");
single_value->field_rac.log();
TTCN_Logger::log_event_str(", nsei := ");
single_value->field_nsei.log();
TTCN_Logger::log_event_str(", nse_timer := ");
single_value->field_nse__timer.log();
TTCN_Logger::log_event_str(", cell_timer := ");
single_value->field_cell__timer.log();
TTCN_Logger::log_event_str(", cell_id := ");
single_value->field_cell__id.log();
TTCN_Logger::log_event_str(", repeat_time := ");
single_value->field_repeat__time.log();
TTCN_Logger::log_event_str(", repeat_count := ");
single_value->field_repeat__count.log();
TTCN_Logger::log_event_str(", bvci := ");
single_value->field_bvci.log();
TTCN_Logger::log_event_str(", t3142 := ");
single_value->field_t3142.log();
TTCN_Logger::log_event_str(", t3169 := ");
single_value->field_t3169.log();
TTCN_Logger::log_event_str(", t3191 := ");
single_value->field_t3191.log();
TTCN_Logger::log_event_str(", t3193_10ms := ");
single_value->field_t3193__10ms.log();
TTCN_Logger::log_event_str(", t3195 := ");
single_value->field_t3195.log();
TTCN_Logger::log_event_str(", n3101 := ");
single_value->field_n3101.log();
TTCN_Logger::log_event_str(", n3103 := ");
single_value->field_n3103.log();
TTCN_Logger::log_event_str(", n3105 := ");
single_value->field_n3105.log();
TTCN_Logger::log_event_str(", cv_countdown := ");
single_value->field_cv__countdown.log();
TTCN_Logger::log_event_str(", dl_tbf_ext := ");
single_value->field_dl__tbf__ext.log();
TTCN_Logger::log_event_str(", ul_tbf_ext := ");
single_value->field_ul__tbf__ext.log();
TTCN_Logger::log_event_str(", initial_cs := ");
single_value->field_initial__cs.log();
TTCN_Logger::log_event_str(", initial_mcs := ");
single_value->field_initial__mcs.log();
TTCN_Logger::log_event_str(", nsvci := ");
single_value->field_nsvci.log();
TTCN_Logger::log_event_str(", local_port := ");
single_value->field_local__port.log();
TTCN_Logger::log_event_str(", remote_port := ");
single_value->field_remote__port.log();
TTCN_Logger::log_event_str(", remote_addr := ");
single_value->field_remote__addr.log();
TTCN_Logger::log_event_str(", bts_model := ");
single_value->field_bts__model.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__info__ind_template::log_match(const PCUIF__info__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_version.match(match_value.version(), legacy)){
TTCN_Logger::log_logmatch_info(".version");
single_value->field_version.log_match(match_value.version(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_flags.match(match_value.flags(), legacy)){
TTCN_Logger::log_logmatch_info(".flags");
single_value->field_flags.log_match(match_value.flags(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx.match(match_value.trx(), legacy)){
TTCN_Logger::log_logmatch_info(".trx");
single_value->field_trx.log_match(match_value.trx(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_bsic.match(match_value.bsic(), legacy)){
TTCN_Logger::log_logmatch_info(".bsic");
single_value->field_bsic.log_match(match_value.bsic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcc.match(match_value.mcc(), legacy)){
TTCN_Logger::log_logmatch_info(".mcc");
single_value->field_mcc.log_match(match_value.mcc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mnc.match(match_value.mnc(), legacy)){
TTCN_Logger::log_logmatch_info(".mnc");
single_value->field_mnc.log_match(match_value.mnc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mnc__3__digits.match(match_value.mnc__3__digits(), legacy)){
TTCN_Logger::log_logmatch_info(".mnc_3_digits");
single_value->field_mnc__3__digits.log_match(match_value.mnc__3__digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lac.match(match_value.lac(), legacy)){
TTCN_Logger::log_logmatch_info(".lac");
single_value->field_lac.log_match(match_value.lac(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rac.match(match_value.rac(), legacy)){
TTCN_Logger::log_logmatch_info(".rac");
single_value->field_rac.log_match(match_value.rac(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_nsei.match(match_value.nsei(), legacy)){
TTCN_Logger::log_logmatch_info(".nsei");
single_value->field_nsei.log_match(match_value.nsei(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_nse__timer.match(match_value.nse__timer(), legacy)){
TTCN_Logger::log_logmatch_info(".nse_timer");
single_value->field_nse__timer.log_match(match_value.nse__timer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cell__timer.match(match_value.cell__timer(), legacy)){
TTCN_Logger::log_logmatch_info(".cell_timer");
single_value->field_cell__timer.log_match(match_value.cell__timer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cell__id.match(match_value.cell__id(), legacy)){
TTCN_Logger::log_logmatch_info(".cell_id");
single_value->field_cell__id.log_match(match_value.cell__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_repeat__time.match(match_value.repeat__time(), legacy)){
TTCN_Logger::log_logmatch_info(".repeat_time");
single_value->field_repeat__time.log_match(match_value.repeat__time(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_repeat__count.match(match_value.repeat__count(), legacy)){
TTCN_Logger::log_logmatch_info(".repeat_count");
single_value->field_repeat__count.log_match(match_value.repeat__count(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_bvci.match(match_value.bvci(), legacy)){
TTCN_Logger::log_logmatch_info(".bvci");
single_value->field_bvci.log_match(match_value.bvci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3142.match(match_value.t3142(), legacy)){
TTCN_Logger::log_logmatch_info(".t3142");
single_value->field_t3142.log_match(match_value.t3142(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3169.match(match_value.t3169(), legacy)){
TTCN_Logger::log_logmatch_info(".t3169");
single_value->field_t3169.log_match(match_value.t3169(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3191.match(match_value.t3191(), legacy)){
TTCN_Logger::log_logmatch_info(".t3191");
single_value->field_t3191.log_match(match_value.t3191(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3193__10ms.match(match_value.t3193__10ms(), legacy)){
TTCN_Logger::log_logmatch_info(".t3193_10ms");
single_value->field_t3193__10ms.log_match(match_value.t3193__10ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3195.match(match_value.t3195(), legacy)){
TTCN_Logger::log_logmatch_info(".t3195");
single_value->field_t3195.log_match(match_value.t3195(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_n3101.match(match_value.n3101(), legacy)){
TTCN_Logger::log_logmatch_info(".n3101");
single_value->field_n3101.log_match(match_value.n3101(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_n3103.match(match_value.n3103(), legacy)){
TTCN_Logger::log_logmatch_info(".n3103");
single_value->field_n3103.log_match(match_value.n3103(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_n3105.match(match_value.n3105(), legacy)){
TTCN_Logger::log_logmatch_info(".n3105");
single_value->field_n3105.log_match(match_value.n3105(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cv__countdown.match(match_value.cv__countdown(), legacy)){
TTCN_Logger::log_logmatch_info(".cv_countdown");
single_value->field_cv__countdown.log_match(match_value.cv__countdown(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_dl__tbf__ext.match(match_value.dl__tbf__ext(), legacy)){
TTCN_Logger::log_logmatch_info(".dl_tbf_ext");
single_value->field_dl__tbf__ext.log_match(match_value.dl__tbf__ext(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ul__tbf__ext.match(match_value.ul__tbf__ext(), legacy)){
TTCN_Logger::log_logmatch_info(".ul_tbf_ext");
single_value->field_ul__tbf__ext.log_match(match_value.ul__tbf__ext(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_initial__cs.match(match_value.initial__cs(), legacy)){
TTCN_Logger::log_logmatch_info(".initial_cs");
single_value->field_initial__cs.log_match(match_value.initial__cs(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_initial__mcs.match(match_value.initial__mcs(), legacy)){
TTCN_Logger::log_logmatch_info(".initial_mcs");
single_value->field_initial__mcs.log_match(match_value.initial__mcs(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_nsvci.match(match_value.nsvci(), legacy)){
TTCN_Logger::log_logmatch_info(".nsvci");
single_value->field_nsvci.log_match(match_value.nsvci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_local__port.match(match_value.local__port(), legacy)){
TTCN_Logger::log_logmatch_info(".local_port");
single_value->field_local__port.log_match(match_value.local__port(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_remote__port.match(match_value.remote__port(), legacy)){
TTCN_Logger::log_logmatch_info(".remote_port");
single_value->field_remote__port.log_match(match_value.remote__port(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_remote__addr.match(match_value.remote__addr(), legacy)){
TTCN_Logger::log_logmatch_info(".remote_addr");
single_value->field_remote__addr.log_match(match_value.remote__addr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.bts__model().ispresent()){
if(!single_value->field_bts__model.match(match_value.bts__model(), legacy)){
TTCN_Logger::log_logmatch_info(".bts_model");
single_value->field_bts__model.log_match(match_value.bts__model(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_bts__model.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".bts_model := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_bts__model.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ version := ");
single_value->field_version.log_match(match_value.version(), legacy);
TTCN_Logger::log_event_str(", flags := ");
single_value->field_flags.log_match(match_value.flags(), legacy);
TTCN_Logger::log_event_str(", trx := ");
single_value->field_trx.log_match(match_value.trx(), legacy);
TTCN_Logger::log_event_str(", bsic := ");
single_value->field_bsic.log_match(match_value.bsic(), legacy);
TTCN_Logger::log_event_str(", mcc := ");
single_value->field_mcc.log_match(match_value.mcc(), legacy);
TTCN_Logger::log_event_str(", mnc := ");
single_value->field_mnc.log_match(match_value.mnc(), legacy);
TTCN_Logger::log_event_str(", mnc_3_digits := ");
single_value->field_mnc__3__digits.log_match(match_value.mnc__3__digits(), legacy);
TTCN_Logger::log_event_str(", lac := ");
single_value->field_lac.log_match(match_value.lac(), legacy);
TTCN_Logger::log_event_str(", rac := ");
single_value->field_rac.log_match(match_value.rac(), legacy);
TTCN_Logger::log_event_str(", nsei := ");
single_value->field_nsei.log_match(match_value.nsei(), legacy);
TTCN_Logger::log_event_str(", nse_timer := ");
single_value->field_nse__timer.log_match(match_value.nse__timer(), legacy);
TTCN_Logger::log_event_str(", cell_timer := ");
single_value->field_cell__timer.log_match(match_value.cell__timer(), legacy);
TTCN_Logger::log_event_str(", cell_id := ");
single_value->field_cell__id.log_match(match_value.cell__id(), legacy);
TTCN_Logger::log_event_str(", repeat_time := ");
single_value->field_repeat__time.log_match(match_value.repeat__time(), legacy);
TTCN_Logger::log_event_str(", repeat_count := ");
single_value->field_repeat__count.log_match(match_value.repeat__count(), legacy);
TTCN_Logger::log_event_str(", bvci := ");
single_value->field_bvci.log_match(match_value.bvci(), legacy);
TTCN_Logger::log_event_str(", t3142 := ");
single_value->field_t3142.log_match(match_value.t3142(), legacy);
TTCN_Logger::log_event_str(", t3169 := ");
single_value->field_t3169.log_match(match_value.t3169(), legacy);
TTCN_Logger::log_event_str(", t3191 := ");
single_value->field_t3191.log_match(match_value.t3191(), legacy);
TTCN_Logger::log_event_str(", t3193_10ms := ");
single_value->field_t3193__10ms.log_match(match_value.t3193__10ms(), legacy);
TTCN_Logger::log_event_str(", t3195 := ");
single_value->field_t3195.log_match(match_value.t3195(), legacy);
TTCN_Logger::log_event_str(", n3101 := ");
single_value->field_n3101.log_match(match_value.n3101(), legacy);
TTCN_Logger::log_event_str(", n3103 := ");
single_value->field_n3103.log_match(match_value.n3103(), legacy);
TTCN_Logger::log_event_str(", n3105 := ");
single_value->field_n3105.log_match(match_value.n3105(), legacy);
TTCN_Logger::log_event_str(", cv_countdown := ");
single_value->field_cv__countdown.log_match(match_value.cv__countdown(), legacy);
TTCN_Logger::log_event_str(", dl_tbf_ext := ");
single_value->field_dl__tbf__ext.log_match(match_value.dl__tbf__ext(), legacy);
TTCN_Logger::log_event_str(", ul_tbf_ext := ");
single_value->field_ul__tbf__ext.log_match(match_value.ul__tbf__ext(), legacy);
TTCN_Logger::log_event_str(", initial_cs := ");
single_value->field_initial__cs.log_match(match_value.initial__cs(), legacy);
TTCN_Logger::log_event_str(", initial_mcs := ");
single_value->field_initial__mcs.log_match(match_value.initial__mcs(), legacy);
TTCN_Logger::log_event_str(", nsvci := ");
single_value->field_nsvci.log_match(match_value.nsvci(), legacy);
TTCN_Logger::log_event_str(", local_port := ");
single_value->field_local__port.log_match(match_value.local__port(), legacy);
TTCN_Logger::log_event_str(", remote_port := ");
single_value->field_remote__port.log_match(match_value.remote__port(), legacy);
TTCN_Logger::log_event_str(", remote_addr := ");
single_value->field_remote__addr.log_match(match_value.remote__addr(), legacy);
TTCN_Logger::log_event_str(", bts_model := ");
if (match_value.bts__model().ispresent()) {
single_value->field_bts__model.log_match(match_value.bts__model(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_bts__model.log();
if (single_value->field_bts__model.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__info__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (version().is_bound()) version().set_implicit_omit();
if (flags().is_bound()) flags().set_implicit_omit();
if (trx().is_bound()) trx().set_implicit_omit();
if (bsic().is_bound()) bsic().set_implicit_omit();
if (mcc().is_bound()) mcc().set_implicit_omit();
if (mnc().is_bound()) mnc().set_implicit_omit();
if (mnc__3__digits().is_bound()) mnc__3__digits().set_implicit_omit();
if (lac().is_bound()) lac().set_implicit_omit();
if (rac().is_bound()) rac().set_implicit_omit();
if (nsei().is_bound()) nsei().set_implicit_omit();
if (nse__timer().is_bound()) nse__timer().set_implicit_omit();
if (cell__timer().is_bound()) cell__timer().set_implicit_omit();
if (cell__id().is_bound()) cell__id().set_implicit_omit();
if (repeat__time().is_bound()) repeat__time().set_implicit_omit();
if (repeat__count().is_bound()) repeat__count().set_implicit_omit();
if (bvci().is_bound()) bvci().set_implicit_omit();
if (t3142().is_bound()) t3142().set_implicit_omit();
if (t3169().is_bound()) t3169().set_implicit_omit();
if (t3191().is_bound()) t3191().set_implicit_omit();
if (t3193__10ms().is_bound()) t3193__10ms().set_implicit_omit();
if (t3195().is_bound()) t3195().set_implicit_omit();
if (n3101().is_bound()) n3101().set_implicit_omit();
if (n3103().is_bound()) n3103().set_implicit_omit();
if (n3105().is_bound()) n3105().set_implicit_omit();
if (cv__countdown().is_bound()) cv__countdown().set_implicit_omit();
if (dl__tbf__ext().is_bound()) dl__tbf__ext().set_implicit_omit();
if (ul__tbf__ext().is_bound()) ul__tbf__ext().set_implicit_omit();
if (initial__cs().is_bound()) initial__cs().set_implicit_omit();
if (initial__mcs().is_bound()) initial__mcs().set_implicit_omit();
if (nsvci().is_bound()) nsvci().set_implicit_omit();
if (local__port().is_bound()) local__port().set_implicit_omit();
if (remote__port().is_bound()) remote__port().set_implicit_omit();
if (remote__addr().is_bound()) remote__addr().set_implicit_omit();
if (!bts__model().is_bound()) bts__model() = OMIT_VALUE;
else bts__model().set_implicit_omit();
}

void PCUIF__info__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_version.encode_text(text_buf);
single_value->field_flags.encode_text(text_buf);
single_value->field_trx.encode_text(text_buf);
single_value->field_bsic.encode_text(text_buf);
single_value->field_mcc.encode_text(text_buf);
single_value->field_mnc.encode_text(text_buf);
single_value->field_mnc__3__digits.encode_text(text_buf);
single_value->field_lac.encode_text(text_buf);
single_value->field_rac.encode_text(text_buf);
single_value->field_nsei.encode_text(text_buf);
single_value->field_nse__timer.encode_text(text_buf);
single_value->field_cell__timer.encode_text(text_buf);
single_value->field_cell__id.encode_text(text_buf);
single_value->field_repeat__time.encode_text(text_buf);
single_value->field_repeat__count.encode_text(text_buf);
single_value->field_bvci.encode_text(text_buf);
single_value->field_t3142.encode_text(text_buf);
single_value->field_t3169.encode_text(text_buf);
single_value->field_t3191.encode_text(text_buf);
single_value->field_t3193__10ms.encode_text(text_buf);
single_value->field_t3195.encode_text(text_buf);
single_value->field_n3101.encode_text(text_buf);
single_value->field_n3103.encode_text(text_buf);
single_value->field_n3105.encode_text(text_buf);
single_value->field_cv__countdown.encode_text(text_buf);
single_value->field_dl__tbf__ext.encode_text(text_buf);
single_value->field_ul__tbf__ext.encode_text(text_buf);
single_value->field_initial__cs.encode_text(text_buf);
single_value->field_initial__mcs.encode_text(text_buf);
single_value->field_nsvci.encode_text(text_buf);
single_value->field_local__port.encode_text(text_buf);
single_value->field_remote__port.encode_text(text_buf);
single_value->field_remote__addr.encode_text(text_buf);
single_value->field_bts__model.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 @PCUIF_Types.PCUIF_info_ind.");
}
}

void PCUIF__info__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_version.decode_text(text_buf);
single_value->field_flags.decode_text(text_buf);
single_value->field_trx.decode_text(text_buf);
single_value->field_bsic.decode_text(text_buf);
single_value->field_mcc.decode_text(text_buf);
single_value->field_mnc.decode_text(text_buf);
single_value->field_mnc__3__digits.decode_text(text_buf);
single_value->field_lac.decode_text(text_buf);
single_value->field_rac.decode_text(text_buf);
single_value->field_nsei.decode_text(text_buf);
single_value->field_nse__timer.decode_text(text_buf);
single_value->field_cell__timer.decode_text(text_buf);
single_value->field_cell__id.decode_text(text_buf);
single_value->field_repeat__time.decode_text(text_buf);
single_value->field_repeat__count.decode_text(text_buf);
single_value->field_bvci.decode_text(text_buf);
single_value->field_t3142.decode_text(text_buf);
single_value->field_t3169.decode_text(text_buf);
single_value->field_t3191.decode_text(text_buf);
single_value->field_t3193__10ms.decode_text(text_buf);
single_value->field_t3195.decode_text(text_buf);
single_value->field_n3101.decode_text(text_buf);
single_value->field_n3103.decode_text(text_buf);
single_value->field_n3105.decode_text(text_buf);
single_value->field_cv__countdown.decode_text(text_buf);
single_value->field_dl__tbf__ext.decode_text(text_buf);
single_value->field_ul__tbf__ext.decode_text(text_buf);
single_value->field_initial__cs.decode_text(text_buf);
single_value->field_initial__mcs.decode_text(text_buf);
single_value->field_nsvci.decode_text(text_buf);
single_value->field_local__port.decode_text(text_buf);
single_value->field_remote__port.decode_text(text_buf);
single_value->field_remote__addr.decode_text(text_buf);
single_value->field_bts__model.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 PCUIF__info__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_info_ind.");
}
}

void PCUIF__info__ind_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__info__ind_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (34<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_info_ind has 34 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) version().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) flags().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) trx().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) bsic().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mcc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mnc().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mnc__3__digits().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) lac().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rac().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) nsei().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nse__timer().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) cell__timer().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) cell__id().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) repeat__time().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) repeat__count().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) bvci().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) t3142().set_param(*param.get_elem(16));
    if (param.get_size()>17 && param.get_elem(17)->get_type()!=Module_Param::MP_NotUsed) t3169().set_param(*param.get_elem(17));
    if (param.get_size()>18 && param.get_elem(18)->get_type()!=Module_Param::MP_NotUsed) t3191().set_param(*param.get_elem(18));
    if (param.get_size()>19 && param.get_elem(19)->get_type()!=Module_Param::MP_NotUsed) t3193__10ms().set_param(*param.get_elem(19));
    if (param.get_size()>20 && param.get_elem(20)->get_type()!=Module_Param::MP_NotUsed) t3195().set_param(*param.get_elem(20));
    if (param.get_size()>21 && param.get_elem(21)->get_type()!=Module_Param::MP_NotUsed) n3101().set_param(*param.get_elem(21));
    if (param.get_size()>22 && param.get_elem(22)->get_type()!=Module_Param::MP_NotUsed) n3103().set_param(*param.get_elem(22));
    if (param.get_size()>23 && param.get_elem(23)->get_type()!=Module_Param::MP_NotUsed) n3105().set_param(*param.get_elem(23));
    if (param.get_size()>24 && param.get_elem(24)->get_type()!=Module_Param::MP_NotUsed) cv__countdown().set_param(*param.get_elem(24));
    if (param.get_size()>25 && param.get_elem(25)->get_type()!=Module_Param::MP_NotUsed) dl__tbf__ext().set_param(*param.get_elem(25));
    if (param.get_size()>26 && param.get_elem(26)->get_type()!=Module_Param::MP_NotUsed) ul__tbf__ext().set_param(*param.get_elem(26));
    if (param.get_size()>27 && param.get_elem(27)->get_type()!=Module_Param::MP_NotUsed) initial__cs().set_param(*param.get_elem(27));
    if (param.get_size()>28 && param.get_elem(28)->get_type()!=Module_Param::MP_NotUsed) initial__mcs().set_param(*param.get_elem(28));
    if (param.get_size()>29 && param.get_elem(29)->get_type()!=Module_Param::MP_NotUsed) nsvci().set_param(*param.get_elem(29));
    if (param.get_size()>30 && param.get_elem(30)->get_type()!=Module_Param::MP_NotUsed) local__port().set_param(*param.get_elem(30));
    if (param.get_size()>31 && param.get_elem(31)->get_type()!=Module_Param::MP_NotUsed) remote__port().set_param(*param.get_elem(31));
    if (param.get_size()>32 && param.get_elem(32)->get_type()!=Module_Param::MP_NotUsed) remote__addr().set_param(*param.get_elem(32));
    if (param.get_size()>33 && param.get_elem(33)->get_type()!=Module_Param::MP_NotUsed) bts__model().set_param(*param.get_elem(33));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "version")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          version().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "flags")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          flags().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bsic")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bsic().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc_3_digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc__3__digits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nsei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nsei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nse_timer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nse__timer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_timer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__timer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "repeat_time")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          repeat__time().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "repeat_count")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          repeat__count().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bvci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bvci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3142")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3142().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3169")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3169().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3191")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3191().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3193_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3193__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3195")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3195().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3101")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3101().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3103")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3103().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "n3105")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n3105().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cv_countdown")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cv__countdown().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "dl_tbf_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dl__tbf__ext().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ul_tbf_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ul__tbf__ext().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "initial_cs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          initial__cs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "initial_mcs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          initial__mcs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nsvci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nsvci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "local_port")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          local__port().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "remote_port")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          remote__port().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "remote_addr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          remote__addr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_model")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__model().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_info_ind: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__info__ind_template* precondition = new PCUIF__info__ind_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__info__ind_template* implied_template = new PCUIF__info__ind_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__info__ind_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_info_ind");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__info__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_version.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_flags.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_trx.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_bsic.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_mcc.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_mnc.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_mnc__3__digits.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_lac.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_rac.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_nsei.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_nse__timer.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_cell__timer.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_cell__id.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_repeat__time.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_repeat__count.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_bvci.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_t3142.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_t3169.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_t3191.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_t3193__10ms.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_t3195.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_n3101.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_n3103.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_n3105.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_cv__countdown.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_dl__tbf__ext.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_ul__tbf__ext.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_initial__cs.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_initial__mcs.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_nsvci.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_local__port.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_remote__port.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_remote__addr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
single_value->field_bts__model.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@PCUIF_Types.PCUIF_info_ind");
}

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

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

PCUIF__e1__ccu__ind::PCUIF__e1__ccu__ind()
{
}

PCUIF__e1__ccu__ind::PCUIF__e1__ccu__ind(const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr,
    const INTEGER& par_e1__nr,
    const INTEGER& par_e1__ts,
    const INTEGER& par_e1__ts__ss)
  :   field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr),
  field_e1__nr(par_e1__nr),
  field_e1__ts(par_e1__ts),
  field_e1__ts__ss(par_e1__ts__ss)
{
}

PCUIF__e1__ccu__ind::PCUIF__e1__ccu__ind(const PCUIF__e1__ccu__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
if (other_value.e1__nr().is_bound()) field_e1__nr = other_value.e1__nr();
else field_e1__nr.clean_up();
if (other_value.e1__ts().is_bound()) field_e1__ts = other_value.e1__ts();
else field_e1__ts.clean_up();
if (other_value.e1__ts__ss().is_bound()) field_e1__ts__ss = other_value.e1__ts__ss();
else field_e1__ts__ss.clean_up();
}

void PCUIF__e1__ccu__ind::clean_up()
{
field_trx__nr.clean_up();
field_ts__nr.clean_up();
field_e1__nr.clean_up();
field_e1__ts.clean_up();
field_e1__ts__ss.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__e1__ccu__ind::get_descriptor() const { return &PCUIF__e1__ccu__ind_descr_; }
PCUIF__e1__ccu__ind& PCUIF__e1__ccu__ind::operator=(const PCUIF__e1__ccu__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
  if (other_value.e1__nr().is_bound()) field_e1__nr = other_value.e1__nr();
  else field_e1__nr.clean_up();
  if (other_value.e1__ts().is_bound()) field_e1__ts = other_value.e1__ts();
  else field_e1__ts.clean_up();
  if (other_value.e1__ts__ss().is_bound()) field_e1__ts__ss = other_value.e1__ts__ss();
  else field_e1__ts__ss.clean_up();
}
return *this;
}

boolean PCUIF__e1__ccu__ind::operator==(const PCUIF__e1__ccu__ind& other_value) const
{
return field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr
  && field_e1__nr==other_value.field_e1__nr
  && field_e1__ts==other_value.field_e1__ts
  && field_e1__ts__ss==other_value.field_e1__ts__ss;
}

boolean PCUIF__e1__ccu__ind::is_bound() const
{
return (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound())
  || (field_e1__nr.is_bound())
  || (field_e1__ts.is_bound())
  || (field_e1__ts__ss.is_bound());
}
boolean PCUIF__e1__ccu__ind::is_value() const
{
return field_trx__nr.is_value()
  && field_ts__nr.is_value()
  && field_e1__nr.is_value()
  && field_e1__ts.is_value()
  && field_e1__ts__ss.is_value();
}
void PCUIF__e1__ccu__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(", e1_nr := ");
field_e1__nr.log();
TTCN_Logger::log_event_str(", e1_ts := ");
field_e1__ts.log();
TTCN_Logger::log_event_str(", e1_ts_ss := ");
field_e1__ts__ss.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__e1__ccu__ind::set_implicit_omit()
{
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (e1__nr().is_bound()) e1__nr().set_implicit_omit();
if (e1__ts().is_bound()) e1__ts().set_implicit_omit();
if (e1__ts__ss().is_bound()) e1__ts__ss().set_implicit_omit();
}

void PCUIF__e1__ccu__ind::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_e1_ccu_ind has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) e1__nr().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) e1__ts().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) e1__ts__ss().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "e1_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          e1__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "e1_ts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          e1__ts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "e1_ts_ss")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          e1__ts__ss().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_e1_ccu_ind: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_e1_ccu_ind");
  }
}

void PCUIF__e1__ccu__ind::encode_text(Text_Buf& text_buf) const
{
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
field_e1__nr.encode_text(text_buf);
field_e1__ts.encode_text(text_buf);
field_e1__ts__ss.encode_text(text_buf);
}

void PCUIF__e1__ccu__ind::decode_text(Text_Buf& text_buf)
{
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
field_e1__nr.decode_text(text_buf);
field_e1__ts.decode_text(text_buf);
field_e1__ts__ss.decode_text(text_buf);
}

void PCUIF__e1__ccu__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__e1__ccu__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__e1__ccu__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__e1__ccu__ind_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__e1__ccu__ind_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__e1__ccu__ind_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(PCUIF__e1__ccu__ind_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__e1__ccu__ind_e1__nr_descr_.raw->forceomit);
  decoded_field_length = field_e1__nr.RAW_decode(PCUIF__e1__ccu__ind_e1__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__e1__ccu__ind_e1__ts_descr_.raw->forceomit);
  decoded_field_length = field_e1__ts.RAW_decode(PCUIF__e1__ccu__ind_e1__ts_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__e1__ccu__ind_e1__ts__ss_descr_.raw->forceomit);
  decoded_field_length = field_e1__ts__ss.RAW_decode(PCUIF__e1__ccu__ind_e1__ts__ss_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__e1__ccu__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__e1__ccu__ind_trx__nr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__e1__ccu__ind_ts__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__e1__ccu__ind_e1__nr_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__e1__ccu__ind_e1__ts_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__e1__ccu__ind_e1__ts__ss_descr_.raw);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__e1__ccu__ind_trx__nr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_ts__nr.RAW_encode(PCUIF__e1__ccu__ind_ts__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_e1__nr.RAW_encode(PCUIF__e1__ccu__ind_e1__nr_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_e1__ts.RAW_encode(PCUIF__e1__ccu__ind_e1__ts_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_e1__ts__ss.RAW_encode(PCUIF__e1__ccu__ind_e1__ts__ss_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct PCUIF__e1__ccu__ind_template::single_value_struct {
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
INTEGER_template field_e1__nr;
INTEGER_template field_e1__ts;
INTEGER_template field_e1__ts__ss;
};

void PCUIF__e1__ccu__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
single_value->field_e1__nr = ANY_VALUE;
single_value->field_e1__ts = ANY_VALUE;
single_value->field_e1__ts__ss = ANY_VALUE;
}
}
}

void PCUIF__e1__ccu__ind_template::copy_value(const PCUIF__e1__ccu__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
if (other_value.e1__nr().is_bound()) {
  single_value->field_e1__nr = other_value.e1__nr();
} else {
  single_value->field_e1__nr.clean_up();
}
if (other_value.e1__ts().is_bound()) {
  single_value->field_e1__ts = other_value.e1__ts();
} else {
  single_value->field_e1__ts.clean_up();
}
if (other_value.e1__ts__ss().is_bound()) {
  single_value->field_e1__ts__ss = other_value.e1__ts__ss();
} else {
  single_value->field_e1__ts__ss.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__e1__ccu__ind_template::copy_template(const PCUIF__e1__ccu__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.e1__nr().get_selection()) {
single_value->field_e1__nr = other_value.e1__nr();
} else {
single_value->field_e1__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.e1__ts().get_selection()) {
single_value->field_e1__ts = other_value.e1__ts();
} else {
single_value->field_e1__ts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.e1__ts__ss().get_selection()) {
single_value->field_e1__ts__ss = other_value.e1__ts__ss();
} else {
single_value->field_e1__ts__ss.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__e1__ccu__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__e1__ccu__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__e1__ccu__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
break;
}
set_selection(other_value);
}

PCUIF__e1__ccu__ind_template::PCUIF__e1__ccu__ind_template()
{
}

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

PCUIF__e1__ccu__ind_template::PCUIF__e1__ccu__ind_template(const PCUIF__e1__ccu__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__e1__ccu__ind_template::match(const PCUIF__e1__ccu__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
if(!other_value.e1__nr().is_bound()) return FALSE;
if(!single_value->field_e1__nr.match(other_value.e1__nr(), legacy))return FALSE;
if(!other_value.e1__ts().is_bound()) return FALSE;
if(!single_value->field_e1__ts.match(other_value.e1__ts(), legacy))return FALSE;
if(!other_value.e1__ts__ss().is_bound()) return FALSE;
if(!single_value->field_e1__ts__ss.match(other_value.e1__ts__ss(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
}
return FALSE;
}

boolean PCUIF__e1__ccu__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound()
 || single_value->field_e1__nr.is_bound()
 || single_value->field_e1__ts.is_bound()
 || single_value->field_e1__ts__ss.is_bound();
}

boolean PCUIF__e1__ccu__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value()
 && single_value->field_e1__nr.is_value()
 && single_value->field_e1__ts.is_value()
 && single_value->field_e1__ts__ss.is_value();
}

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

PCUIF__e1__ccu__ind PCUIF__e1__ccu__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
PCUIF__e1__ccu__ind ret_val;
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
if (single_value->field_e1__nr.is_bound()) {
ret_val.e1__nr() = single_value->field_e1__nr.valueof();
}
if (single_value->field_e1__ts.is_bound()) {
ret_val.e1__ts() = single_value->field_e1__ts.valueof();
}
if (single_value->field_e1__ts__ss.is_bound()) {
ret_val.e1__ts__ss() = single_value->field_e1__ts__ss.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__e1__ccu__ind_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__e1__ccu__ind_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
return single_value->field_trx__nr;
}

INTEGER_template& PCUIF__e1__ccu__ind_template::ts__nr()
{
set_specific();
return single_value->field_ts__nr;
}

const INTEGER_template& PCUIF__e1__ccu__ind_template::ts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts_nr of a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
return single_value->field_ts__nr;
}

INTEGER_template& PCUIF__e1__ccu__ind_template::e1__nr()
{
set_specific();
return single_value->field_e1__nr;
}

const INTEGER_template& PCUIF__e1__ccu__ind_template::e1__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field e1_nr of a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
return single_value->field_e1__nr;
}

INTEGER_template& PCUIF__e1__ccu__ind_template::e1__ts()
{
set_specific();
return single_value->field_e1__ts;
}

const INTEGER_template& PCUIF__e1__ccu__ind_template::e1__ts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field e1_ts of a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
return single_value->field_e1__ts;
}

INTEGER_template& PCUIF__e1__ccu__ind_template::e1__ts__ss()
{
set_specific();
return single_value->field_e1__ts__ss;
}

const INTEGER_template& PCUIF__e1__ccu__ind_template::e1__ts__ss() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field e1_ts_ss of a non-specific template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
return single_value->field_e1__ts__ss;
}

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

void PCUIF__e1__ccu__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log();
TTCN_Logger::log_event_str(", e1_nr := ");
single_value->field_e1__nr.log();
TTCN_Logger::log_event_str(", e1_ts := ");
single_value->field_e1__ts.log();
TTCN_Logger::log_event_str(", e1_ts_ss := ");
single_value->field_e1__ts__ss.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__e1__ccu__ind_template::log_match(const PCUIF__e1__ccu__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_e1__nr.match(match_value.e1__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".e1_nr");
single_value->field_e1__nr.log_match(match_value.e1__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_e1__ts.match(match_value.e1__ts(), legacy)){
TTCN_Logger::log_logmatch_info(".e1_ts");
single_value->field_e1__ts.log_match(match_value.e1__ts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_e1__ts__ss.match(match_value.e1__ts__ss(), legacy)){
TTCN_Logger::log_logmatch_info(".e1_ts_ss");
single_value->field_e1__ts__ss.log_match(match_value.e1__ts__ss(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(", e1_nr := ");
single_value->field_e1__nr.log_match(match_value.e1__nr(), legacy);
TTCN_Logger::log_event_str(", e1_ts := ");
single_value->field_e1__ts.log_match(match_value.e1__ts(), legacy);
TTCN_Logger::log_event_str(", e1_ts_ss := ");
single_value->field_e1__ts__ss.log_match(match_value.e1__ts__ss(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__e1__ccu__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (e1__nr().is_bound()) e1__nr().set_implicit_omit();
if (e1__ts().is_bound()) e1__ts().set_implicit_omit();
if (e1__ts__ss().is_bound()) e1__ts__ss().set_implicit_omit();
}

void PCUIF__e1__ccu__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_ts__nr.encode_text(text_buf);
single_value->field_e1__nr.encode_text(text_buf);
single_value->field_e1__ts.encode_text(text_buf);
single_value->field_e1__ts__ss.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 @PCUIF_Types.PCUIF_e1_ccu_ind.");
}
}

void PCUIF__e1__ccu__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.decode_text(text_buf);
single_value->field_e1__nr.decode_text(text_buf);
single_value->field_e1__ts.decode_text(text_buf);
single_value->field_e1__ts__ss.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 PCUIF__e1__ccu__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_e1_ccu_ind.");
}
}

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

void PCUIF__e1__ccu__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_trx__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
single_value->field_ts__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
single_value->field_e1__nr.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
single_value->field_e1__ts.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
single_value->field_e1__ts__ss.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@PCUIF_Types.PCUIF_e1_ccu_ind");
}

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

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

PCUIF__act__req::PCUIF__act__req()
{
}

PCUIF__act__req::PCUIF__act__req(const INTEGER& par_is__activate,
    const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr,
    const OCTETSTRING& par_spare)
  :   field_is__activate(par_is__activate),
  field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr),
  field_spare(par_spare)
{
}

PCUIF__act__req::PCUIF__act__req(const PCUIF__act__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_act_req.");
if (other_value.is__activate().is_bound()) field_is__activate = other_value.is__activate();
else field_is__activate.clean_up();
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
}

void PCUIF__act__req::clean_up()
{
field_is__activate.clean_up();
field_trx__nr.clean_up();
field_ts__nr.clean_up();
field_spare.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__act__req::get_descriptor() const { return &PCUIF__act__req_descr_; }
PCUIF__act__req& PCUIF__act__req::operator=(const PCUIF__act__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_act_req.");
  if (other_value.is__activate().is_bound()) field_is__activate = other_value.is__activate();
  else field_is__activate.clean_up();
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
}
return *this;
}

boolean PCUIF__act__req::operator==(const PCUIF__act__req& other_value) const
{
return field_is__activate==other_value.field_is__activate
  && field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr
  && field_spare==other_value.field_spare;
}

boolean PCUIF__act__req::is_bound() const
{
return (field_is__activate.is_bound())
  || (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound())
  || (field_spare.is_bound());
}
boolean PCUIF__act__req::is_value() const
{
return field_is__activate.is_value()
  && field_trx__nr.is_value()
  && field_ts__nr.is_value()
  && field_spare.is_value();
}
void PCUIF__act__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ is_activate := ");
field_is__activate.log();
TTCN_Logger::log_event_str(", trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__act__req::set_implicit_omit()
{
if (is__activate().is_bound()) is__activate().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
}

void PCUIF__act__req::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_act_req has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) is__activate().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "is_activate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          is__activate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_act_req: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_act_req");
  }
}

void PCUIF__act__req::encode_text(Text_Buf& text_buf) const
{
field_is__activate.encode_text(text_buf);
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
field_spare.encode_text(text_buf);
}

void PCUIF__act__req::decode_text(Text_Buf& text_buf)
{
field_is__activate.decode_text(text_buf);
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
field_spare.decode_text(text_buf);
}

void PCUIF__act__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__act__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__act__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__act__req_is__activate_descr_.raw->forceomit);
  decoded_field_length = field_is__activate.RAW_decode(PCUIF__act__req_is__activate_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__act__req_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__act__req_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__act__req_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(PCUIF__act__req_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__act__req_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__act__req_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__act__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__act__req_is__activate_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__act__req_trx__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__act__req_ts__nr_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__act__req_spare_descr_.raw);
  encoded_length += field_is__activate.RAW_encode(PCUIF__act__req_is__activate_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__act__req_trx__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_ts__nr.RAW_encode(PCUIF__act__req_ts__nr_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_spare.RAW_encode(PCUIF__act__req_spare_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PCUIF__act__req_template::single_value_struct {
INTEGER_template field_is__activate;
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
OCTETSTRING_template field_spare;
};

void PCUIF__act__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_is__activate = ANY_VALUE;
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
}
}
}

void PCUIF__act__req_template::copy_value(const PCUIF__act__req& other_value)
{
single_value = new single_value_struct;
if (other_value.is__activate().is_bound()) {
  single_value->field_is__activate = other_value.is__activate();
} else {
  single_value->field_is__activate.clean_up();
}
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__act__req_template::copy_template(const PCUIF__act__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.is__activate().get_selection()) {
single_value->field_is__activate = other_value.is__activate();
} else {
single_value->field_is__activate.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__act__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__act__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__act__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_act_req.");
break;
}
set_selection(other_value);
}

PCUIF__act__req_template::PCUIF__act__req_template()
{
}

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

PCUIF__act__req_template::PCUIF__act__req_template(const PCUIF__act__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__act__req_template::match(const PCUIF__act__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.is__activate().is_bound()) return FALSE;
if(!single_value->field_is__activate.match(other_value.is__activate(), legacy))return FALSE;
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_act_req.");
}
return FALSE;
}

boolean PCUIF__act__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_is__activate.is_bound()
 || single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound()
 || single_value->field_spare.is_bound();
}

boolean PCUIF__act__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_is__activate.is_value()
 && single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value()
 && single_value->field_spare.is_value();
}

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

PCUIF__act__req PCUIF__act__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_act_req.");
PCUIF__act__req ret_val;
if (single_value->field_is__activate.is_bound()) {
ret_val.is__activate() = single_value->field_is__activate.valueof();
}
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__act__req_template::is__activate()
{
set_specific();
return single_value->field_is__activate;
}

const INTEGER_template& PCUIF__act__req_template::is__activate() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field is_activate of a non-specific template of type @PCUIF_Types.PCUIF_act_req.");
return single_value->field_is__activate;
}

INTEGER_template& PCUIF__act__req_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__act__req_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_act_req.");
return single_value->field_trx__nr;
}

INTEGER_template& PCUIF__act__req_template::ts__nr()
{
set_specific();
return single_value->field_ts__nr;
}

const INTEGER_template& PCUIF__act__req_template::ts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ts_nr of a non-specific template of type @PCUIF_Types.PCUIF_act_req.");
return single_value->field_ts__nr;
}

OCTETSTRING_template& PCUIF__act__req_template::spare()
{
set_specific();
return single_value->field_spare;
}

const OCTETSTRING_template& PCUIF__act__req_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_act_req.");
return single_value->field_spare;
}

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

void PCUIF__act__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ is_activate := ");
single_value->field_is__activate.log();
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__act__req_template::log_match(const PCUIF__act__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_is__activate.match(match_value.is__activate(), legacy)){
TTCN_Logger::log_logmatch_info(".is_activate");
single_value->field_is__activate.log_match(match_value.is__activate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ is_activate := ");
single_value->field_is__activate.log_match(match_value.is__activate(), legacy);
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__act__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (is__activate().is_bound()) is__activate().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
}

void PCUIF__act__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_is__activate.encode_text(text_buf);
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_ts__nr.encode_text(text_buf);
single_value->field_spare.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 @PCUIF_Types.PCUIF_act_req.");
}
}

void PCUIF__act__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_is__activate.decode_text(text_buf);
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.decode_text(text_buf);
single_value->field_spare.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 PCUIF__act__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_act_req.");
}
}

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

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

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

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

PCUIF__time__ind::PCUIF__time__ind()
{
}

PCUIF__time__ind::PCUIF__time__ind(const INTEGER& par_fn)
  :   field_fn(par_fn)
{
}

PCUIF__time__ind::PCUIF__time__ind(const PCUIF__time__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_time_ind.");
if (other_value.fn().is_bound()) field_fn = other_value.fn();
else field_fn.clean_up();
}

void PCUIF__time__ind::clean_up()
{
field_fn.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__time__ind::get_descriptor() const { return &PCUIF__time__ind_descr_; }
PCUIF__time__ind& PCUIF__time__ind::operator=(const PCUIF__time__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_time_ind.");
  if (other_value.fn().is_bound()) field_fn = other_value.fn();
  else field_fn.clean_up();
}
return *this;
}

boolean PCUIF__time__ind::operator==(const PCUIF__time__ind& other_value) const
{
return field_fn==other_value.field_fn;
}

boolean PCUIF__time__ind::is_bound() const
{
return (field_fn.is_bound());
}
boolean PCUIF__time__ind::is_value() const
{
return field_fn.is_value();
}
void PCUIF__time__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ fn := ");
field_fn.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__time__ind::set_implicit_omit()
{
if (fn().is_bound()) fn().set_implicit_omit();
}

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

void PCUIF__time__ind::encode_text(Text_Buf& text_buf) const
{
field_fn.encode_text(text_buf);
}

void PCUIF__time__ind::decode_text(Text_Buf& text_buf)
{
field_fn.decode_text(text_buf);
}

void PCUIF__time__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__time__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__time__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__time__ind_fn_descr_.raw->forceomit);
  decoded_field_length = field_fn.RAW_decode(PCUIF__time__ind_fn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__time__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 1;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(1);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__time__ind_fn_descr_.raw);
  encoded_length += field_fn.RAW_encode(PCUIF__time__ind_fn_descr_, *myleaf.body.node.nodes[0]);
  return myleaf.length = encoded_length;
}

struct PCUIF__time__ind_template::single_value_struct {
INTEGER_template field_fn;
};

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

void PCUIF__time__ind_template::copy_value(const PCUIF__time__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.fn().is_bound()) {
  single_value->field_fn = other_value.fn();
} else {
  single_value->field_fn.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

PCUIF__time__ind_template::PCUIF__time__ind_template()
{
}

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

PCUIF__time__ind_template::PCUIF__time__ind_template(const PCUIF__time__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

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

boolean PCUIF__time__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_fn.is_bound();
}

boolean PCUIF__time__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_fn.is_value();
}

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

PCUIF__time__ind PCUIF__time__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_time_ind.");
PCUIF__time__ind ret_val;
if (single_value->field_fn.is_bound()) {
ret_val.fn() = single_value->field_fn.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__time__ind_template::fn()
{
set_specific();
return single_value->field_fn;
}

const INTEGER_template& PCUIF__time__ind_template::fn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fn of a non-specific template of type @PCUIF_Types.PCUIF_time_ind.");
return single_value->field_fn;
}

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

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

void PCUIF__time__ind_template::log_match(const PCUIF__time__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_fn.match(match_value.fn(), legacy)){
TTCN_Logger::log_logmatch_info(".fn");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ fn := ");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__time__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (fn().is_bound()) fn().set_implicit_omit();
}

void PCUIF__time__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_fn.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 @PCUIF_Types.PCUIF_time_ind.");
}
}

void PCUIF__time__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_fn.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 PCUIF__time__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_time_ind.");
}
}

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

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

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

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

PCUIF__interf__ind::PCUIF__interf__ind()
{
}

PCUIF__interf__ind::PCUIF__interf__ind(const INTEGER& par_trx__nr,
    const OCTETSTRING& par_spare,
    const INTEGER& par_fn,
    const PCUIF__interf& par_interf)
  :   field_trx__nr(par_trx__nr),
  field_spare(par_spare),
  field_fn(par_fn),
  field_interf(par_interf)
{
}

PCUIF__interf__ind::PCUIF__interf__ind(const PCUIF__interf__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_interf_ind.");
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.fn().is_bound()) field_fn = other_value.fn();
else field_fn.clean_up();
if (other_value.interf().is_bound()) field_interf = other_value.interf();
else field_interf.clean_up();
}

void PCUIF__interf__ind::clean_up()
{
field_trx__nr.clean_up();
field_spare.clean_up();
field_fn.clean_up();
field_interf.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__interf__ind::get_descriptor() const { return &PCUIF__interf__ind_descr_; }
PCUIF__interf__ind& PCUIF__interf__ind::operator=(const PCUIF__interf__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_interf_ind.");
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.fn().is_bound()) field_fn = other_value.fn();
  else field_fn.clean_up();
  if (other_value.interf().is_bound()) field_interf = other_value.interf();
  else field_interf.clean_up();
}
return *this;
}

boolean PCUIF__interf__ind::operator==(const PCUIF__interf__ind& other_value) const
{
return field_trx__nr==other_value.field_trx__nr
  && field_spare==other_value.field_spare
  && field_fn==other_value.field_fn
  && field_interf==other_value.field_interf;
}

boolean PCUIF__interf__ind::is_bound() const
{
return (field_trx__nr.is_bound())
  || (field_spare.is_bound())
  || (field_fn.is_bound())
  || (field_interf.is_bound());
}
boolean PCUIF__interf__ind::is_value() const
{
return field_trx__nr.is_value()
  && field_spare.is_value()
  && field_fn.is_value()
  && field_interf.is_value();
}
void PCUIF__interf__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", fn := ");
field_fn.log();
TTCN_Logger::log_event_str(", interf := ");
field_interf.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__interf__ind::set_implicit_omit()
{
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (interf().is_bound()) interf().set_implicit_omit();
}

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

void PCUIF__interf__ind::encode_text(Text_Buf& text_buf) const
{
field_trx__nr.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_fn.encode_text(text_buf);
field_interf.encode_text(text_buf);
}

void PCUIF__interf__ind::decode_text(Text_Buf& text_buf)
{
field_trx__nr.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_fn.decode_text(text_buf);
field_interf.decode_text(text_buf);
}

void PCUIF__interf__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__interf__ind::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__interf__ind::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__interf__ind_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(PCUIF__interf__ind_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__interf__ind_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__interf__ind_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__interf__ind_fn_descr_.raw->forceomit);
  decoded_field_length = field_fn.RAW_decode(PCUIF__interf__ind_fn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__interf__ind_interf_descr_.raw->forceomit);
  decoded_field_length = field_interf.RAW_decode(PCUIF__interf__ind_interf_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__interf__ind::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__interf__ind_trx__nr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__interf__ind_spare_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__interf__ind_fn_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__interf__ind_interf_descr_.raw);
  encoded_length += field_trx__nr.RAW_encode(PCUIF__interf__ind_trx__nr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_spare.RAW_encode(PCUIF__interf__ind_spare_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_fn.RAW_encode(PCUIF__interf__ind_fn_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_interf.RAW_encode(PCUIF__interf__ind_interf_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PCUIF__interf__ind_template::single_value_struct {
INTEGER_template field_trx__nr;
OCTETSTRING_template field_spare;
INTEGER_template field_fn;
PCUIF__interf_template field_interf;
};

void PCUIF__interf__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_trx__nr = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_fn = ANY_VALUE;
single_value->field_interf = ANY_VALUE;
}
}
}

void PCUIF__interf__ind_template::copy_value(const PCUIF__interf__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.fn().is_bound()) {
  single_value->field_fn = other_value.fn();
} else {
  single_value->field_fn.clean_up();
}
if (other_value.interf().is_bound()) {
  single_value->field_interf = other_value.interf();
} else {
  single_value->field_interf.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__interf__ind_template::copy_template(const PCUIF__interf__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fn().get_selection()) {
single_value->field_fn = other_value.fn();
} else {
single_value->field_fn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.interf().get_selection()) {
single_value->field_interf = other_value.interf();
} else {
single_value->field_interf.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__interf__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__interf__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__interf__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_interf_ind.");
break;
}
set_selection(other_value);
}

PCUIF__interf__ind_template::PCUIF__interf__ind_template()
{
}

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

PCUIF__interf__ind_template::PCUIF__interf__ind_template(const PCUIF__interf__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__interf__ind_template::match(const PCUIF__interf__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.fn().is_bound()) return FALSE;
if(!single_value->field_fn.match(other_value.fn(), legacy))return FALSE;
if(!other_value.interf().is_bound()) return FALSE;
if(!single_value->field_interf.match(other_value.interf(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_interf_ind.");
}
return FALSE;
}

boolean PCUIF__interf__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_trx__nr.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_fn.is_bound()
 || single_value->field_interf.is_bound();
}

boolean PCUIF__interf__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_trx__nr.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_fn.is_value()
 && single_value->field_interf.is_value();
}

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

PCUIF__interf__ind PCUIF__interf__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_interf_ind.");
PCUIF__interf__ind ret_val;
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_fn.is_bound()) {
ret_val.fn() = single_value->field_fn.valueof();
}
if (single_value->field_interf.is_bound()) {
ret_val.interf() = single_value->field_interf.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__interf__ind_template::trx__nr()
{
set_specific();
return single_value->field_trx__nr;
}

const INTEGER_template& PCUIF__interf__ind_template::trx__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field trx_nr of a non-specific template of type @PCUIF_Types.PCUIF_interf_ind.");
return single_value->field_trx__nr;
}

OCTETSTRING_template& PCUIF__interf__ind_template::spare()
{
set_specific();
return single_value->field_spare;
}

const OCTETSTRING_template& PCUIF__interf__ind_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_interf_ind.");
return single_value->field_spare;
}

INTEGER_template& PCUIF__interf__ind_template::fn()
{
set_specific();
return single_value->field_fn;
}

const INTEGER_template& PCUIF__interf__ind_template::fn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fn of a non-specific template of type @PCUIF_Types.PCUIF_interf_ind.");
return single_value->field_fn;
}

PCUIF__interf_template& PCUIF__interf__ind_template::interf()
{
set_specific();
return single_value->field_interf;
}

const PCUIF__interf_template& PCUIF__interf__ind_template::interf() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field interf of a non-specific template of type @PCUIF_Types.PCUIF_interf_ind.");
return single_value->field_interf;
}

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

void PCUIF__interf__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ trx_nr := ");
single_value->field_trx__nr.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log();
TTCN_Logger::log_event_str(", interf := ");
single_value->field_interf.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__interf__ind_template::log_match(const PCUIF__interf__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fn.match(match_value.fn(), legacy)){
TTCN_Logger::log_logmatch_info(".fn");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_interf.match(match_value.interf(), legacy)){
TTCN_Logger::log_logmatch_info(".interf");
single_value->field_interf.log_match(match_value.interf(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", fn := ");
single_value->field_fn.log_match(match_value.fn(), legacy);
TTCN_Logger::log_event_str(", interf := ");
single_value->field_interf.log_match(match_value.interf(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__interf__ind_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (fn().is_bound()) fn().set_implicit_omit();
if (interf().is_bound()) interf().set_implicit_omit();
}

void PCUIF__interf__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_trx__nr.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_fn.encode_text(text_buf);
single_value->field_interf.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 @PCUIF_Types.PCUIF_interf_ind.");
}
}

void PCUIF__interf__ind_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_fn.decode_text(text_buf);
single_value->field_interf.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 PCUIF__interf__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_interf_ind.");
}
}

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

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

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

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

PCUIF__pag__req::PCUIF__pag__req()
{
}

PCUIF__pag__req::PCUIF__pag__req(const PCUIF__Sapi& par_sapi,
    const INTEGER& par_chan__needed,
    const OCTETSTRING& par_identity__lv)
  :   field_sapi(par_sapi),
  field_chan__needed(par_chan__needed),
  field_identity__lv(par_identity__lv)
{
}

PCUIF__pag__req::PCUIF__pag__req(const PCUIF__pag__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_pag_req.");
if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
else field_sapi.clean_up();
if (other_value.chan__needed().is_bound()) field_chan__needed = other_value.chan__needed();
else field_chan__needed.clean_up();
if (other_value.identity__lv().is_bound()) field_identity__lv = other_value.identity__lv();
else field_identity__lv.clean_up();
}

void PCUIF__pag__req::clean_up()
{
field_sapi.clean_up();
field_chan__needed.clean_up();
field_identity__lv.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__pag__req::get_descriptor() const { return &PCUIF__pag__req_descr_; }
PCUIF__pag__req& PCUIF__pag__req::operator=(const PCUIF__pag__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_pag_req.");
  if (other_value.sapi().is_bound()) field_sapi = other_value.sapi();
  else field_sapi.clean_up();
  if (other_value.chan__needed().is_bound()) field_chan__needed = other_value.chan__needed();
  else field_chan__needed.clean_up();
  if (other_value.identity__lv().is_bound()) field_identity__lv = other_value.identity__lv();
  else field_identity__lv.clean_up();
}
return *this;
}

boolean PCUIF__pag__req::operator==(const PCUIF__pag__req& other_value) const
{
return field_sapi==other_value.field_sapi
  && field_chan__needed==other_value.field_chan__needed
  && field_identity__lv==other_value.field_identity__lv;
}

boolean PCUIF__pag__req::is_bound() const
{
return (field_sapi.is_bound())
  || (field_chan__needed.is_bound())
  || (field_identity__lv.is_bound());
}
boolean PCUIF__pag__req::is_value() const
{
return field_sapi.is_value()
  && field_chan__needed.is_value()
  && field_identity__lv.is_value();
}
void PCUIF__pag__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sapi := ");
field_sapi.log();
TTCN_Logger::log_event_str(", chan_needed := ");
field_chan__needed.log();
TTCN_Logger::log_event_str(", identity_lv := ");
field_identity__lv.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__pag__req::set_implicit_omit()
{
if (sapi().is_bound()) sapi().set_implicit_omit();
if (chan__needed().is_bound()) chan__needed().set_implicit_omit();
if (identity__lv().is_bound()) identity__lv().set_implicit_omit();
}

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

void PCUIF__pag__req::encode_text(Text_Buf& text_buf) const
{
field_sapi.encode_text(text_buf);
field_chan__needed.encode_text(text_buf);
field_identity__lv.encode_text(text_buf);
}

void PCUIF__pag__req::decode_text(Text_Buf& text_buf)
{
field_sapi.decode_text(text_buf);
field_chan__needed.decode_text(text_buf);
field_identity__lv.decode_text(text_buf);
}

void PCUIF__pag__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__pag__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__pag__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__pag__req_sapi_descr_.raw->forceomit);
  decoded_field_length = field_sapi.RAW_decode(PCUIF__pag__req_sapi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__pag__req_chan__needed_descr_.raw->forceomit);
  decoded_field_length = field_chan__needed.RAW_decode(PCUIF__pag__req_chan__needed_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__pag__req_identity__lv_descr_.raw->forceomit);
  decoded_field_length = field_identity__lv.RAW_decode(PCUIF__pag__req_identity__lv_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__pag__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__pag__req_sapi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__pag__req_chan__needed_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__pag__req_identity__lv_descr_.raw);
  encoded_length += field_sapi.RAW_encode(PCUIF__pag__req_sapi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_chan__needed.RAW_encode(PCUIF__pag__req_chan__needed_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_identity__lv.RAW_encode(PCUIF__pag__req_identity__lv_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct PCUIF__pag__req_template::single_value_struct {
PCUIF__Sapi_template field_sapi;
INTEGER_template field_chan__needed;
OCTETSTRING_template field_identity__lv;
};

void PCUIF__pag__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_sapi = ANY_VALUE;
single_value->field_chan__needed = ANY_VALUE;
single_value->field_identity__lv = ANY_VALUE;
}
}
}

void PCUIF__pag__req_template::copy_value(const PCUIF__pag__req& other_value)
{
single_value = new single_value_struct;
if (other_value.sapi().is_bound()) {
  single_value->field_sapi = other_value.sapi();
} else {
  single_value->field_sapi.clean_up();
}
if (other_value.chan__needed().is_bound()) {
  single_value->field_chan__needed = other_value.chan__needed();
} else {
  single_value->field_chan__needed.clean_up();
}
if (other_value.identity__lv().is_bound()) {
  single_value->field_identity__lv = other_value.identity__lv();
} else {
  single_value->field_identity__lv.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__pag__req_template::copy_template(const PCUIF__pag__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sapi().get_selection()) {
single_value->field_sapi = other_value.sapi();
} else {
single_value->field_sapi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.chan__needed().get_selection()) {
single_value->field_chan__needed = other_value.chan__needed();
} else {
single_value->field_chan__needed.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.identity__lv().get_selection()) {
single_value->field_identity__lv = other_value.identity__lv();
} else {
single_value->field_identity__lv.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__pag__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__pag__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__pag__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_pag_req.");
break;
}
set_selection(other_value);
}

PCUIF__pag__req_template::PCUIF__pag__req_template()
{
}

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

PCUIF__pag__req_template::PCUIF__pag__req_template(const PCUIF__pag__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__pag__req_template::match(const PCUIF__pag__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.sapi().is_bound()) return FALSE;
if(!single_value->field_sapi.match(other_value.sapi(), legacy))return FALSE;
if(!other_value.chan__needed().is_bound()) return FALSE;
if(!single_value->field_chan__needed.match(other_value.chan__needed(), legacy))return FALSE;
if(!other_value.identity__lv().is_bound()) return FALSE;
if(!single_value->field_identity__lv.match(other_value.identity__lv(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_pag_req.");
}
return FALSE;
}

boolean PCUIF__pag__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sapi.is_bound()
 || single_value->field_chan__needed.is_bound()
 || single_value->field_identity__lv.is_bound();
}

boolean PCUIF__pag__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sapi.is_value()
 && single_value->field_chan__needed.is_value()
 && single_value->field_identity__lv.is_value();
}

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

PCUIF__pag__req PCUIF__pag__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_pag_req.");
PCUIF__pag__req ret_val;
if (single_value->field_sapi.is_bound()) {
ret_val.sapi() = single_value->field_sapi.valueof();
}
if (single_value->field_chan__needed.is_bound()) {
ret_val.chan__needed() = single_value->field_chan__needed.valueof();
}
if (single_value->field_identity__lv.is_bound()) {
ret_val.identity__lv() = single_value->field_identity__lv.valueof();
}
return ret_val;
}

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

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

PCUIF__Sapi_template& PCUIF__pag__req_template::sapi()
{
set_specific();
return single_value->field_sapi;
}

const PCUIF__Sapi_template& PCUIF__pag__req_template::sapi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sapi of a non-specific template of type @PCUIF_Types.PCUIF_pag_req.");
return single_value->field_sapi;
}

INTEGER_template& PCUIF__pag__req_template::chan__needed()
{
set_specific();
return single_value->field_chan__needed;
}

const INTEGER_template& PCUIF__pag__req_template::chan__needed() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field chan_needed of a non-specific template of type @PCUIF_Types.PCUIF_pag_req.");
return single_value->field_chan__needed;
}

OCTETSTRING_template& PCUIF__pag__req_template::identity__lv()
{
set_specific();
return single_value->field_identity__lv;
}

const OCTETSTRING_template& PCUIF__pag__req_template::identity__lv() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field identity_lv of a non-specific template of type @PCUIF_Types.PCUIF_pag_req.");
return single_value->field_identity__lv;
}

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

void PCUIF__pag__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log();
TTCN_Logger::log_event_str(", chan_needed := ");
single_value->field_chan__needed.log();
TTCN_Logger::log_event_str(", identity_lv := ");
single_value->field_identity__lv.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__pag__req_template::log_match(const PCUIF__pag__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_sapi.match(match_value.sapi(), legacy)){
TTCN_Logger::log_logmatch_info(".sapi");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_chan__needed.match(match_value.chan__needed(), legacy)){
TTCN_Logger::log_logmatch_info(".chan_needed");
single_value->field_chan__needed.log_match(match_value.chan__needed(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_identity__lv.match(match_value.identity__lv(), legacy)){
TTCN_Logger::log_logmatch_info(".identity_lv");
single_value->field_identity__lv.log_match(match_value.identity__lv(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ sapi := ");
single_value->field_sapi.log_match(match_value.sapi(), legacy);
TTCN_Logger::log_event_str(", chan_needed := ");
single_value->field_chan__needed.log_match(match_value.chan__needed(), legacy);
TTCN_Logger::log_event_str(", identity_lv := ");
single_value->field_identity__lv.log_match(match_value.identity__lv(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__pag__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sapi().is_bound()) sapi().set_implicit_omit();
if (chan__needed().is_bound()) chan__needed().set_implicit_omit();
if (identity__lv().is_bound()) identity__lv().set_implicit_omit();
}

void PCUIF__pag__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_sapi.encode_text(text_buf);
single_value->field_chan__needed.encode_text(text_buf);
single_value->field_identity__lv.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 @PCUIF_Types.PCUIF_pag_req.");
}
}

void PCUIF__pag__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_sapi.decode_text(text_buf);
single_value->field_chan__needed.decode_text(text_buf);
single_value->field_identity__lv.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 PCUIF__pag__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_pag_req.");
}
}

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

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

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

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

PCUIF__app__info__req::PCUIF__app__info__req()
{
}

PCUIF__app__info__req::PCUIF__app__info__req(const INTEGER& par_application__type,
    const INTEGER& par_len,
    const OCTETSTRING& par_data)
  :   field_application__type(par_application__type),
  field_len(par_len),
  field_data(par_data)
{
}

PCUIF__app__info__req::PCUIF__app__info__req(const PCUIF__app__info__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_app_info_req.");
if (other_value.application__type().is_bound()) field_application__type = other_value.application__type();
else field_application__type.clean_up();
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.data().is_bound()) field_data = other_value.data();
else field_data.clean_up();
}

void PCUIF__app__info__req::clean_up()
{
field_application__type.clean_up();
field_len.clean_up();
field_data.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__app__info__req::get_descriptor() const { return &PCUIF__app__info__req_descr_; }
PCUIF__app__info__req& PCUIF__app__info__req::operator=(const PCUIF__app__info__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_app_info_req.");
  if (other_value.application__type().is_bound()) field_application__type = other_value.application__type();
  else field_application__type.clean_up();
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.data().is_bound()) field_data = other_value.data();
  else field_data.clean_up();
}
return *this;
}

boolean PCUIF__app__info__req::operator==(const PCUIF__app__info__req& other_value) const
{
return field_application__type==other_value.field_application__type
  && field_len==other_value.field_len
  && field_data==other_value.field_data;
}

boolean PCUIF__app__info__req::is_bound() const
{
return (field_application__type.is_bound())
  || (field_len.is_bound())
  || (field_data.is_bound());
}
boolean PCUIF__app__info__req::is_value() const
{
return field_application__type.is_value()
  && field_len.is_value()
  && field_data.is_value();
}
void PCUIF__app__info__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ application_type := ");
field_application__type.log();
TTCN_Logger::log_event_str(", len := ");
field_len.log();
TTCN_Logger::log_event_str(", data := ");
field_data.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__app__info__req::set_implicit_omit()
{
if (application__type().is_bound()) application__type().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
}

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

void PCUIF__app__info__req::encode_text(Text_Buf& text_buf) const
{
field_application__type.encode_text(text_buf);
field_len.encode_text(text_buf);
field_data.encode_text(text_buf);
}

void PCUIF__app__info__req::decode_text(Text_Buf& text_buf)
{
field_application__type.decode_text(text_buf);
field_len.decode_text(text_buf);
field_data.decode_text(text_buf);
}

void PCUIF__app__info__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__app__info__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__app__info__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  int value_of_length_field1 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__app__info__req_application__type_descr_.raw->forceomit);
  decoded_field_length = field_application__type.RAW_decode(PCUIF__app__info__req_application__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__app__info__req_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(PCUIF__app__info__req_len_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  INTEGER tmp1 = field_len.convert_to_Integer(PCUIF__app__info__req_len_descr_);
  field_len = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__app__info__req_data_descr_.raw->forceomit);
  decoded_field_length = field_data.RAW_decode(PCUIF__app__info__req_data_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  value_of_length_field1 -= decoded_field_length;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__app__info__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__app__info__req_application__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__app__info__req_len_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__app__info__req_data_descr_.raw);
  encoded_length += field_application__type.RAW_encode(PCUIF__app__info__req_application__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &PCUIF__app__info__req_len_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  encoded_length += field_data.RAW_encode(PCUIF__app__info__req_data_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct PCUIF__app__info__req_template::single_value_struct {
INTEGER_template field_application__type;
INTEGER_template field_len;
OCTETSTRING_template field_data;
};

void PCUIF__app__info__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_application__type = ANY_VALUE;
single_value->field_len = ANY_VALUE;
single_value->field_data = ANY_VALUE;
}
}
}

void PCUIF__app__info__req_template::copy_value(const PCUIF__app__info__req& other_value)
{
single_value = new single_value_struct;
if (other_value.application__type().is_bound()) {
  single_value->field_application__type = other_value.application__type();
} else {
  single_value->field_application__type.clean_up();
}
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.data().is_bound()) {
  single_value->field_data = other_value.data();
} else {
  single_value->field_data.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__app__info__req_template::copy_template(const PCUIF__app__info__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.application__type().get_selection()) {
single_value->field_application__type = other_value.application__type();
} else {
single_value->field_application__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.data().get_selection()) {
single_value->field_data = other_value.data();
} else {
single_value->field_data.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__app__info__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__app__info__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__app__info__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_app_info_req.");
break;
}
set_selection(other_value);
}

PCUIF__app__info__req_template::PCUIF__app__info__req_template()
{
}

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

PCUIF__app__info__req_template::PCUIF__app__info__req_template(const PCUIF__app__info__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__app__info__req_template::match(const PCUIF__app__info__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.application__type().is_bound()) return FALSE;
if(!single_value->field_application__type.match(other_value.application__type(), legacy))return FALSE;
if(!other_value.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.data().is_bound()) return FALSE;
if(!single_value->field_data.match(other_value.data(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_app_info_req.");
}
return FALSE;
}

boolean PCUIF__app__info__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_application__type.is_bound()
 || single_value->field_len.is_bound()
 || single_value->field_data.is_bound();
}

boolean PCUIF__app__info__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_application__type.is_value()
 && single_value->field_len.is_value()
 && single_value->field_data.is_value();
}

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

PCUIF__app__info__req PCUIF__app__info__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_app_info_req.");
PCUIF__app__info__req ret_val;
if (single_value->field_application__type.is_bound()) {
ret_val.application__type() = single_value->field_application__type.valueof();
}
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_data.is_bound()) {
ret_val.data() = single_value->field_data.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__app__info__req_template::application__type()
{
set_specific();
return single_value->field_application__type;
}

const INTEGER_template& PCUIF__app__info__req_template::application__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field application_type of a non-specific template of type @PCUIF_Types.PCUIF_app_info_req.");
return single_value->field_application__type;
}

INTEGER_template& PCUIF__app__info__req_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& PCUIF__app__info__req_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @PCUIF_Types.PCUIF_app_info_req.");
return single_value->field_len;
}

OCTETSTRING_template& PCUIF__app__info__req_template::data()
{
set_specific();
return single_value->field_data;
}

const OCTETSTRING_template& PCUIF__app__info__req_template::data() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field data of a non-specific template of type @PCUIF_Types.PCUIF_app_info_req.");
return single_value->field_data;
}

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

void PCUIF__app__info__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ application_type := ");
single_value->field_application__type.log();
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__app__info__req_template::log_match(const PCUIF__app__info__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_application__type.match(match_value.application__type(), legacy)){
TTCN_Logger::log_logmatch_info(".application_type");
single_value->field_application__type.log_match(match_value.application__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_data.match(match_value.data(), legacy)){
TTCN_Logger::log_logmatch_info(".data");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ application_type := ");
single_value->field_application__type.log_match(match_value.application__type(), legacy);
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__app__info__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (application__type().is_bound()) application__type().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
}

void PCUIF__app__info__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_application__type.encode_text(text_buf);
single_value->field_len.encode_text(text_buf);
single_value->field_data.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 @PCUIF_Types.PCUIF_app_info_req.");
}
}

void PCUIF__app__info__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_application__type.decode_text(text_buf);
single_value->field_len.decode_text(text_buf);
single_value->field_data.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 PCUIF__app__info__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_app_info_req.");
}
}

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

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

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

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

PCUIF__susp__req::PCUIF__susp__req()
{
}

PCUIF__susp__req::PCUIF__susp__req(const OCTETSTRING& par_tlli,
    const OCTETSTRING& par_ra__id,
    const INTEGER& par_cause)
  :   field_tlli(par_tlli),
  field_ra__id(par_ra__id),
  field_cause(par_cause)
{
}

PCUIF__susp__req::PCUIF__susp__req(const PCUIF__susp__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_susp_req.");
if (other_value.tlli().is_bound()) field_tlli = other_value.tlli();
else field_tlli.clean_up();
if (other_value.ra__id().is_bound()) field_ra__id = other_value.ra__id();
else field_ra__id.clean_up();
if (other_value.cause().is_bound()) field_cause = other_value.cause();
else field_cause.clean_up();
}

void PCUIF__susp__req::clean_up()
{
field_tlli.clean_up();
field_ra__id.clean_up();
field_cause.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__susp__req::get_descriptor() const { return &PCUIF__susp__req_descr_; }
PCUIF__susp__req& PCUIF__susp__req::operator=(const PCUIF__susp__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_susp_req.");
  if (other_value.tlli().is_bound()) field_tlli = other_value.tlli();
  else field_tlli.clean_up();
  if (other_value.ra__id().is_bound()) field_ra__id = other_value.ra__id();
  else field_ra__id.clean_up();
  if (other_value.cause().is_bound()) field_cause = other_value.cause();
  else field_cause.clean_up();
}
return *this;
}

boolean PCUIF__susp__req::operator==(const PCUIF__susp__req& other_value) const
{
return field_tlli==other_value.field_tlli
  && field_ra__id==other_value.field_ra__id
  && field_cause==other_value.field_cause;
}

boolean PCUIF__susp__req::is_bound() const
{
return (field_tlli.is_bound())
  || (field_ra__id.is_bound())
  || (field_cause.is_bound());
}
boolean PCUIF__susp__req::is_value() const
{
return field_tlli.is_value()
  && field_ra__id.is_value()
  && field_cause.is_value();
}
void PCUIF__susp__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tlli := ");
field_tlli.log();
TTCN_Logger::log_event_str(", ra_id := ");
field_ra__id.log();
TTCN_Logger::log_event_str(", cause := ");
field_cause.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__susp__req::set_implicit_omit()
{
if (tlli().is_bound()) tlli().set_implicit_omit();
if (ra__id().is_bound()) ra__id().set_implicit_omit();
if (cause().is_bound()) cause().set_implicit_omit();
}

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

void PCUIF__susp__req::encode_text(Text_Buf& text_buf) const
{
field_tlli.encode_text(text_buf);
field_ra__id.encode_text(text_buf);
field_cause.encode_text(text_buf);
}

void PCUIF__susp__req::decode_text(Text_Buf& text_buf)
{
field_tlli.decode_text(text_buf);
field_ra__id.decode_text(text_buf);
field_cause.decode_text(text_buf);
}

void PCUIF__susp__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__susp__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__susp__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__susp__req_tlli_descr_.raw->forceomit);
  decoded_field_length = field_tlli.RAW_decode(PCUIF__susp__req_tlli_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__susp__req_ra__id_descr_.raw->forceomit);
  decoded_field_length = field_ra__id.RAW_decode(PCUIF__susp__req_ra__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__susp__req_cause_descr_.raw->forceomit);
  decoded_field_length = field_cause.RAW_decode(PCUIF__susp__req_cause_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__susp__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__susp__req_tlli_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__susp__req_ra__id_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__susp__req_cause_descr_.raw);
  encoded_length += field_tlli.RAW_encode(PCUIF__susp__req_tlli_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_ra__id.RAW_encode(PCUIF__susp__req_ra__id_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_cause.RAW_encode(PCUIF__susp__req_cause_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct PCUIF__susp__req_template::single_value_struct {
OCTETSTRING_template field_tlli;
OCTETSTRING_template field_ra__id;
INTEGER_template field_cause;
};

void PCUIF__susp__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_tlli = ANY_VALUE;
single_value->field_ra__id = ANY_VALUE;
single_value->field_cause = ANY_VALUE;
}
}
}

void PCUIF__susp__req_template::copy_value(const PCUIF__susp__req& other_value)
{
single_value = new single_value_struct;
if (other_value.tlli().is_bound()) {
  single_value->field_tlli = other_value.tlli();
} else {
  single_value->field_tlli.clean_up();
}
if (other_value.ra__id().is_bound()) {
  single_value->field_ra__id = other_value.ra__id();
} else {
  single_value->field_ra__id.clean_up();
}
if (other_value.cause().is_bound()) {
  single_value->field_cause = other_value.cause();
} else {
  single_value->field_cause.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__susp__req_template::copy_template(const PCUIF__susp__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tlli().get_selection()) {
single_value->field_tlli = other_value.tlli();
} else {
single_value->field_tlli.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ra__id().get_selection()) {
single_value->field_ra__id = other_value.ra__id();
} else {
single_value->field_ra__id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cause().get_selection()) {
single_value->field_cause = other_value.cause();
} else {
single_value->field_cause.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__susp__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__susp__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__susp__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_susp_req.");
break;
}
set_selection(other_value);
}

PCUIF__susp__req_template::PCUIF__susp__req_template()
{
}

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

PCUIF__susp__req_template::PCUIF__susp__req_template(const PCUIF__susp__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__susp__req_template::match(const PCUIF__susp__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.tlli().is_bound()) return FALSE;
if(!single_value->field_tlli.match(other_value.tlli(), legacy))return FALSE;
if(!other_value.ra__id().is_bound()) return FALSE;
if(!single_value->field_ra__id.match(other_value.ra__id(), legacy))return FALSE;
if(!other_value.cause().is_bound()) return FALSE;
if(!single_value->field_cause.match(other_value.cause(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_susp_req.");
}
return FALSE;
}

boolean PCUIF__susp__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tlli.is_bound()
 || single_value->field_ra__id.is_bound()
 || single_value->field_cause.is_bound();
}

boolean PCUIF__susp__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tlli.is_value()
 && single_value->field_ra__id.is_value()
 && single_value->field_cause.is_value();
}

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

PCUIF__susp__req PCUIF__susp__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_susp_req.");
PCUIF__susp__req ret_val;
if (single_value->field_tlli.is_bound()) {
ret_val.tlli() = single_value->field_tlli.valueof();
}
if (single_value->field_ra__id.is_bound()) {
ret_val.ra__id() = single_value->field_ra__id.valueof();
}
if (single_value->field_cause.is_bound()) {
ret_val.cause() = single_value->field_cause.valueof();
}
return ret_val;
}

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

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

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

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

OCTETSTRING_template& PCUIF__susp__req_template::ra__id()
{
set_specific();
return single_value->field_ra__id;
}

const OCTETSTRING_template& PCUIF__susp__req_template::ra__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ra_id of a non-specific template of type @PCUIF_Types.PCUIF_susp_req.");
return single_value->field_ra__id;
}

INTEGER_template& PCUIF__susp__req_template::cause()
{
set_specific();
return single_value->field_cause;
}

const INTEGER_template& PCUIF__susp__req_template::cause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cause of a non-specific template of type @PCUIF_Types.PCUIF_susp_req.");
return single_value->field_cause;
}

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

void PCUIF__susp__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tlli := ");
single_value->field_tlli.log();
TTCN_Logger::log_event_str(", ra_id := ");
single_value->field_ra__id.log();
TTCN_Logger::log_event_str(", cause := ");
single_value->field_cause.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__susp__req_template::log_match(const PCUIF__susp__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_tlli.match(match_value.tlli(), legacy)){
TTCN_Logger::log_logmatch_info(".tlli");
single_value->field_tlli.log_match(match_value.tlli(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ra__id.match(match_value.ra__id(), legacy)){
TTCN_Logger::log_logmatch_info(".ra_id");
single_value->field_ra__id.log_match(match_value.ra__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cause.match(match_value.cause(), legacy)){
TTCN_Logger::log_logmatch_info(".cause");
single_value->field_cause.log_match(match_value.cause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ tlli := ");
single_value->field_tlli.log_match(match_value.tlli(), legacy);
TTCN_Logger::log_event_str(", ra_id := ");
single_value->field_ra__id.log_match(match_value.ra__id(), legacy);
TTCN_Logger::log_event_str(", cause := ");
single_value->field_cause.log_match(match_value.cause(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__susp__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tlli().is_bound()) tlli().set_implicit_omit();
if (ra__id().is_bound()) ra__id().set_implicit_omit();
if (cause().is_bound()) cause().set_implicit_omit();
}

void PCUIF__susp__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tlli.encode_text(text_buf);
single_value->field_ra__id.encode_text(text_buf);
single_value->field_cause.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 @PCUIF_Types.PCUIF_susp_req.");
}
}

void PCUIF__susp__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_tlli.decode_text(text_buf);
single_value->field_ra__id.decode_text(text_buf);
single_value->field_cause.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 PCUIF__susp__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_susp_req.");
}
}

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

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

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

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

PCUIF__neigh__addr__req::PCUIF__neigh__addr__req()
{
}

PCUIF__neigh__addr__req::PCUIF__neigh__addr__req(const INTEGER& par_local__lac,
    const INTEGER& par_local__ci,
    const INTEGER& par_tgt__arfcn,
    const INTEGER& par_tgt__bsic)
  :   field_local__lac(par_local__lac),
  field_local__ci(par_local__ci),
  field_tgt__arfcn(par_tgt__arfcn),
  field_tgt__bsic(par_tgt__bsic)
{
}

PCUIF__neigh__addr__req::PCUIF__neigh__addr__req(const PCUIF__neigh__addr__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_neigh_addr_req.");
if (other_value.local__lac().is_bound()) field_local__lac = other_value.local__lac();
else field_local__lac.clean_up();
if (other_value.local__ci().is_bound()) field_local__ci = other_value.local__ci();
else field_local__ci.clean_up();
if (other_value.tgt__arfcn().is_bound()) field_tgt__arfcn = other_value.tgt__arfcn();
else field_tgt__arfcn.clean_up();
if (other_value.tgt__bsic().is_bound()) field_tgt__bsic = other_value.tgt__bsic();
else field_tgt__bsic.clean_up();
}

void PCUIF__neigh__addr__req::clean_up()
{
field_local__lac.clean_up();
field_local__ci.clean_up();
field_tgt__arfcn.clean_up();
field_tgt__bsic.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__neigh__addr__req::get_descriptor() const { return &PCUIF__neigh__addr__req_descr_; }
PCUIF__neigh__addr__req& PCUIF__neigh__addr__req::operator=(const PCUIF__neigh__addr__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_neigh_addr_req.");
  if (other_value.local__lac().is_bound()) field_local__lac = other_value.local__lac();
  else field_local__lac.clean_up();
  if (other_value.local__ci().is_bound()) field_local__ci = other_value.local__ci();
  else field_local__ci.clean_up();
  if (other_value.tgt__arfcn().is_bound()) field_tgt__arfcn = other_value.tgt__arfcn();
  else field_tgt__arfcn.clean_up();
  if (other_value.tgt__bsic().is_bound()) field_tgt__bsic = other_value.tgt__bsic();
  else field_tgt__bsic.clean_up();
}
return *this;
}

boolean PCUIF__neigh__addr__req::operator==(const PCUIF__neigh__addr__req& other_value) const
{
return field_local__lac==other_value.field_local__lac
  && field_local__ci==other_value.field_local__ci
  && field_tgt__arfcn==other_value.field_tgt__arfcn
  && field_tgt__bsic==other_value.field_tgt__bsic;
}

boolean PCUIF__neigh__addr__req::is_bound() const
{
return (field_local__lac.is_bound())
  || (field_local__ci.is_bound())
  || (field_tgt__arfcn.is_bound())
  || (field_tgt__bsic.is_bound());
}
boolean PCUIF__neigh__addr__req::is_value() const
{
return field_local__lac.is_value()
  && field_local__ci.is_value()
  && field_tgt__arfcn.is_value()
  && field_tgt__bsic.is_value();
}
void PCUIF__neigh__addr__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ local_lac := ");
field_local__lac.log();
TTCN_Logger::log_event_str(", local_ci := ");
field_local__ci.log();
TTCN_Logger::log_event_str(", tgt_arfcn := ");
field_tgt__arfcn.log();
TTCN_Logger::log_event_str(", tgt_bsic := ");
field_tgt__bsic.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__neigh__addr__req::set_implicit_omit()
{
if (local__lac().is_bound()) local__lac().set_implicit_omit();
if (local__ci().is_bound()) local__ci().set_implicit_omit();
if (tgt__arfcn().is_bound()) tgt__arfcn().set_implicit_omit();
if (tgt__bsic().is_bound()) tgt__bsic().set_implicit_omit();
}

void PCUIF__neigh__addr__req::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_neigh_addr_req has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) local__lac().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) local__ci().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) tgt__arfcn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) tgt__bsic().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "local_lac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          local__lac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "local_ci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          local__ci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tgt_arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tgt__arfcn().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tgt_bsic")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tgt__bsic().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_neigh_addr_req: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_neigh_addr_req");
  }
}

void PCUIF__neigh__addr__req::encode_text(Text_Buf& text_buf) const
{
field_local__lac.encode_text(text_buf);
field_local__ci.encode_text(text_buf);
field_tgt__arfcn.encode_text(text_buf);
field_tgt__bsic.encode_text(text_buf);
}

void PCUIF__neigh__addr__req::decode_text(Text_Buf& text_buf)
{
field_local__lac.decode_text(text_buf);
field_local__ci.decode_text(text_buf);
field_tgt__arfcn.decode_text(text_buf);
field_tgt__bsic.decode_text(text_buf);
}

void PCUIF__neigh__addr__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__neigh__addr__req::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__neigh__addr__req::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__neigh__addr__req_local__lac_descr_.raw->forceomit);
  decoded_field_length = field_local__lac.RAW_decode(PCUIF__neigh__addr__req_local__lac_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__neigh__addr__req_local__ci_descr_.raw->forceomit);
  decoded_field_length = field_local__ci.RAW_decode(PCUIF__neigh__addr__req_local__ci_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__neigh__addr__req_tgt__arfcn_descr_.raw->forceomit);
  decoded_field_length = field_tgt__arfcn.RAW_decode(PCUIF__neigh__addr__req_tgt__arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__neigh__addr__req_tgt__bsic_descr_.raw->forceomit);
  decoded_field_length = field_tgt__bsic.RAW_decode(PCUIF__neigh__addr__req_tgt__bsic_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__neigh__addr__req::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__neigh__addr__req_local__lac_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__neigh__addr__req_local__ci_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__neigh__addr__req_tgt__arfcn_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__neigh__addr__req_tgt__bsic_descr_.raw);
  encoded_length += field_local__lac.RAW_encode(PCUIF__neigh__addr__req_local__lac_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_local__ci.RAW_encode(PCUIF__neigh__addr__req_local__ci_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_tgt__arfcn.RAW_encode(PCUIF__neigh__addr__req_tgt__arfcn_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_tgt__bsic.RAW_encode(PCUIF__neigh__addr__req_tgt__bsic_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PCUIF__neigh__addr__req_template::single_value_struct {
INTEGER_template field_local__lac;
INTEGER_template field_local__ci;
INTEGER_template field_tgt__arfcn;
INTEGER_template field_tgt__bsic;
};

void PCUIF__neigh__addr__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_local__lac = ANY_VALUE;
single_value->field_local__ci = ANY_VALUE;
single_value->field_tgt__arfcn = ANY_VALUE;
single_value->field_tgt__bsic = ANY_VALUE;
}
}
}

void PCUIF__neigh__addr__req_template::copy_value(const PCUIF__neigh__addr__req& other_value)
{
single_value = new single_value_struct;
if (other_value.local__lac().is_bound()) {
  single_value->field_local__lac = other_value.local__lac();
} else {
  single_value->field_local__lac.clean_up();
}
if (other_value.local__ci().is_bound()) {
  single_value->field_local__ci = other_value.local__ci();
} else {
  single_value->field_local__ci.clean_up();
}
if (other_value.tgt__arfcn().is_bound()) {
  single_value->field_tgt__arfcn = other_value.tgt__arfcn();
} else {
  single_value->field_tgt__arfcn.clean_up();
}
if (other_value.tgt__bsic().is_bound()) {
  single_value->field_tgt__bsic = other_value.tgt__bsic();
} else {
  single_value->field_tgt__bsic.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__neigh__addr__req_template::copy_template(const PCUIF__neigh__addr__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.local__lac().get_selection()) {
single_value->field_local__lac = other_value.local__lac();
} else {
single_value->field_local__lac.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.local__ci().get_selection()) {
single_value->field_local__ci = other_value.local__ci();
} else {
single_value->field_local__ci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tgt__arfcn().get_selection()) {
single_value->field_tgt__arfcn = other_value.tgt__arfcn();
} else {
single_value->field_tgt__arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tgt__bsic().get_selection()) {
single_value->field_tgt__bsic = other_value.tgt__bsic();
} else {
single_value->field_tgt__bsic.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__neigh__addr__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new PCUIF__neigh__addr__req_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__neigh__addr__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
break;
}
set_selection(other_value);
}

PCUIF__neigh__addr__req_template::PCUIF__neigh__addr__req_template()
{
}

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

PCUIF__neigh__addr__req_template::PCUIF__neigh__addr__req_template(const PCUIF__neigh__addr__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PCUIF__neigh__addr__req_template::match(const PCUIF__neigh__addr__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.local__lac().is_bound()) return FALSE;
if(!single_value->field_local__lac.match(other_value.local__lac(), legacy))return FALSE;
if(!other_value.local__ci().is_bound()) return FALSE;
if(!single_value->field_local__ci.match(other_value.local__ci(), legacy))return FALSE;
if(!other_value.tgt__arfcn().is_bound()) return FALSE;
if(!single_value->field_tgt__arfcn.match(other_value.tgt__arfcn(), legacy))return FALSE;
if(!other_value.tgt__bsic().is_bound()) return FALSE;
if(!single_value->field_tgt__bsic.match(other_value.tgt__bsic(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
}
return FALSE;
}

boolean PCUIF__neigh__addr__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_local__lac.is_bound()
 || single_value->field_local__ci.is_bound()
 || single_value->field_tgt__arfcn.is_bound()
 || single_value->field_tgt__bsic.is_bound();
}

boolean PCUIF__neigh__addr__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_local__lac.is_value()
 && single_value->field_local__ci.is_value()
 && single_value->field_tgt__arfcn.is_value()
 && single_value->field_tgt__bsic.is_value();
}

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

PCUIF__neigh__addr__req PCUIF__neigh__addr__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
PCUIF__neigh__addr__req ret_val;
if (single_value->field_local__lac.is_bound()) {
ret_val.local__lac() = single_value->field_local__lac.valueof();
}
if (single_value->field_local__ci.is_bound()) {
ret_val.local__ci() = single_value->field_local__ci.valueof();
}
if (single_value->field_tgt__arfcn.is_bound()) {
ret_val.tgt__arfcn() = single_value->field_tgt__arfcn.valueof();
}
if (single_value->field_tgt__bsic.is_bound()) {
ret_val.tgt__bsic() = single_value->field_tgt__bsic.valueof();
}
return ret_val;
}

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

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

INTEGER_template& PCUIF__neigh__addr__req_template::local__lac()
{
set_specific();
return single_value->field_local__lac;
}

const INTEGER_template& PCUIF__neigh__addr__req_template::local__lac() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field local_lac of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
return single_value->field_local__lac;
}

INTEGER_template& PCUIF__neigh__addr__req_template::local__ci()
{
set_specific();
return single_value->field_local__ci;
}

const INTEGER_template& PCUIF__neigh__addr__req_template::local__ci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field local_ci of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
return single_value->field_local__ci;
}

INTEGER_template& PCUIF__neigh__addr__req_template::tgt__arfcn()
{
set_specific();
return single_value->field_tgt__arfcn;
}

const INTEGER_template& PCUIF__neigh__addr__req_template::tgt__arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tgt_arfcn of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
return single_value->field_tgt__arfcn;
}

INTEGER_template& PCUIF__neigh__addr__req_template::tgt__bsic()
{
set_specific();
return single_value->field_tgt__bsic;
}

const INTEGER_template& PCUIF__neigh__addr__req_template::tgt__bsic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tgt_bsic of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
return single_value->field_tgt__bsic;
}

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

void PCUIF__neigh__addr__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ local_lac := ");
single_value->field_local__lac.log();
TTCN_Logger::log_event_str(", local_ci := ");
single_value->field_local__ci.log();
TTCN_Logger::log_event_str(", tgt_arfcn := ");
single_value->field_tgt__arfcn.log();
TTCN_Logger::log_event_str(", tgt_bsic := ");
single_value->field_tgt__bsic.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__neigh__addr__req_template::log_match(const PCUIF__neigh__addr__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_local__lac.match(match_value.local__lac(), legacy)){
TTCN_Logger::log_logmatch_info(".local_lac");
single_value->field_local__lac.log_match(match_value.local__lac(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_local__ci.match(match_value.local__ci(), legacy)){
TTCN_Logger::log_logmatch_info(".local_ci");
single_value->field_local__ci.log_match(match_value.local__ci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_tgt__arfcn.match(match_value.tgt__arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".tgt_arfcn");
single_value->field_tgt__arfcn.log_match(match_value.tgt__arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_tgt__bsic.match(match_value.tgt__bsic(), legacy)){
TTCN_Logger::log_logmatch_info(".tgt_bsic");
single_value->field_tgt__bsic.log_match(match_value.tgt__bsic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ local_lac := ");
single_value->field_local__lac.log_match(match_value.local__lac(), legacy);
TTCN_Logger::log_event_str(", local_ci := ");
single_value->field_local__ci.log_match(match_value.local__ci(), legacy);
TTCN_Logger::log_event_str(", tgt_arfcn := ");
single_value->field_tgt__arfcn.log_match(match_value.tgt__arfcn(), legacy);
TTCN_Logger::log_event_str(", tgt_bsic := ");
single_value->field_tgt__bsic.log_match(match_value.tgt__bsic(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__neigh__addr__req_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (local__lac().is_bound()) local__lac().set_implicit_omit();
if (local__ci().is_bound()) local__ci().set_implicit_omit();
if (tgt__arfcn().is_bound()) tgt__arfcn().set_implicit_omit();
if (tgt__bsic().is_bound()) tgt__bsic().set_implicit_omit();
}

void PCUIF__neigh__addr__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_local__lac.encode_text(text_buf);
single_value->field_local__ci.encode_text(text_buf);
single_value->field_tgt__arfcn.encode_text(text_buf);
single_value->field_tgt__bsic.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 @PCUIF_Types.PCUIF_neigh_addr_req.");
}
}

void PCUIF__neigh__addr__req_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_local__lac.decode_text(text_buf);
single_value->field_local__ci.decode_text(text_buf);
single_value->field_tgt__arfcn.decode_text(text_buf);
single_value->field_tgt__bsic.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 PCUIF__neigh__addr__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_neigh_addr_req.");
}
}

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

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

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

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

PCUIF__neigh__addr__cnf::PCUIF__neigh__addr__cnf()
{
}

PCUIF__neigh__addr__cnf::PCUIF__neigh__addr__cnf(const PCUIF__neigh__addr__req& par_orig__req,
    const INTEGER& par_error__code,
    const INTEGER& par_mcc,
    const INTEGER& par_mnc,
    const INTEGER& par_mnc__3__digits,
    const INTEGER& par_lac,
    const INTEGER& par_rac,
    const INTEGER& par_cell__identity)
  :   field_orig__req(par_orig__req),
  field_error__code(par_error__code),
  field_mcc(par_mcc),
  field_mnc(par_mnc),
  field_mnc__3__digits(par_mnc__3__digits),
  field_lac(par_lac),
  field_rac(par_rac),
  field_cell__identity(par_cell__identity)
{
}

PCUIF__neigh__addr__cnf::PCUIF__neigh__addr__cnf(const PCUIF__neigh__addr__cnf& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
if (other_value.orig__req().is_bound()) field_orig__req = other_value.orig__req();
else field_orig__req.clean_up();
if (other_value.error__code().is_bound()) field_error__code = other_value.error__code();
else field_error__code.clean_up();
if (other_value.mcc().is_bound()) field_mcc = other_value.mcc();
else field_mcc.clean_up();
if (other_value.mnc().is_bound()) field_mnc = other_value.mnc();
else field_mnc.clean_up();
if (other_value.mnc__3__digits().is_bound()) field_mnc__3__digits = other_value.mnc__3__digits();
else field_mnc__3__digits.clean_up();
if (other_value.lac().is_bound()) field_lac = other_value.lac();
else field_lac.clean_up();
if (other_value.rac().is_bound()) field_rac = other_value.rac();
else field_rac.clean_up();
if (other_value.cell__identity().is_bound()) field_cell__identity = other_value.cell__identity();
else field_cell__identity.clean_up();
}

void PCUIF__neigh__addr__cnf::clean_up()
{
field_orig__req.clean_up();
field_error__code.clean_up();
field_mcc.clean_up();
field_mnc.clean_up();
field_mnc__3__digits.clean_up();
field_lac.clean_up();
field_rac.clean_up();
field_cell__identity.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__neigh__addr__cnf::get_descriptor() const { return &PCUIF__neigh__addr__cnf_descr_; }
PCUIF__neigh__addr__cnf& PCUIF__neigh__addr__cnf::operator=(const PCUIF__neigh__addr__cnf& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
  if (other_value.orig__req().is_bound()) field_orig__req = other_value.orig__req();
  else field_orig__req.clean_up();
  if (other_value.error__code().is_bound()) field_error__code = other_value.error__code();
  else field_error__code.clean_up();
  if (other_value.mcc().is_bound()) field_mcc = other_value.mcc();
  else field_mcc.clean_up();
  if (other_value.mnc().is_bound()) field_mnc = other_value.mnc();
  else field_mnc.clean_up();
  if (other_value.mnc__3__digits().is_bound()) field_mnc__3__digits = other_value.mnc__3__digits();
  else field_mnc__3__digits.clean_up();
  if (other_value.lac().is_bound()) field_lac = other_value.lac();
  else field_lac.clean_up();
  if (other_value.rac().is_bound()) field_rac = other_value.rac();
  else field_rac.clean_up();
  if (other_value.cell__identity().is_bound()) field_cell__identity = other_value.cell__identity();
  else field_cell__identity.clean_up();
}
return *this;
}

boolean PCUIF__neigh__addr__cnf::operator==(const PCUIF__neigh__addr__cnf& other_value) const
{
return field_orig__req==other_value.field_orig__req
  && field_error__code==other_value.field_error__code
  && field_mcc==other_value.field_mcc
  && field_mnc==other_value.field_mnc
  && field_mnc__3__digits==other_value.field_mnc__3__digits
  && field_lac==other_value.field_lac
  && field_rac==other_value.field_rac
  && field_cell__identity==other_value.field_cell__identity;
}

boolean PCUIF__neigh__addr__cnf::is_bound() const
{
return (field_orig__req.is_bound())
  || (field_error__code.is_bound())
  || (field_mcc.is_bound())
  || (field_mnc.is_bound())
  || (field_mnc__3__digits.is_bound())
  || (field_lac.is_bound())
  || (field_rac.is_bound())
  || (field_cell__identity.is_bound());
}
boolean PCUIF__neigh__addr__cnf::is_value() const
{
return field_orig__req.is_value()
  && field_error__code.is_value()
  && field_mcc.is_value()
  && field_mnc.is_value()
  && field_mnc__3__digits.is_value()
  && field_lac.is_value()
  && field_rac.is_value()
  && field_cell__identity.is_value();
}
void PCUIF__neigh__addr__cnf::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ orig_req := ");
field_orig__req.log();
TTCN_Logger::log_event_str(", error_code := ");
field_error__code.log();
TTCN_Logger::log_event_str(", mcc := ");
field_mcc.log();
TTCN_Logger::log_event_str(", mnc := ");
field_mnc.log();
TTCN_Logger::log_event_str(", mnc_3_digits := ");
field_mnc__3__digits.log();
TTCN_Logger::log_event_str(", lac := ");
field_lac.log();
TTCN_Logger::log_event_str(", rac := ");
field_rac.log();
TTCN_Logger::log_event_str(", cell_identity := ");
field_cell__identity.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__neigh__addr__cnf::set_implicit_omit()
{
if (orig__req().is_bound()) orig__req().set_implicit_omit();
if (error__code().is_bound()) error__code().set_implicit_omit();
if (mcc().is_bound()) mcc().set_implicit_omit();
if (mnc().is_bound()) mnc().set_implicit_omit();
if (mnc__3__digits().is_bound()) mnc__3__digits().set_implicit_omit();
if (lac().is_bound()) lac().set_implicit_omit();
if (rac().is_bound()) rac().set_implicit_omit();
if (cell__identity().is_bound()) cell__identity().set_implicit_omit();
}

void PCUIF__neigh__addr__cnf::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record value of type @PCUIF_Types.PCUIF_neigh_addr_cnf has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) orig__req().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) error__code().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mcc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mnc().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mnc__3__digits().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) lac().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) rac().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) cell__identity().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "orig_req")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          orig__req().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "error_code")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          error__code().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc_3_digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc__3__digits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_identity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__identity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_neigh_addr_cnf: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@PCUIF_Types.PCUIF_neigh_addr_cnf");
  }
}

void PCUIF__neigh__addr__cnf::encode_text(Text_Buf& text_buf) const
{
field_orig__req.encode_text(text_buf);
field_error__code.encode_text(text_buf);
field_mcc.encode_text(text_buf);
field_mnc.encode_text(text_buf);
field_mnc__3__digits.encode_text(text_buf);
field_lac.encode_text(text_buf);
field_rac.encode_text(text_buf);
field_cell__identity.encode_text(text_buf);
}

void PCUIF__neigh__addr__cnf::decode_text(Text_Buf& text_buf)
{
field_orig__req.decode_text(text_buf);
field_error__code.decode_text(text_buf);
field_mcc.decode_text(text_buf);
field_mnc.decode_text(text_buf);
field_mnc__3__digits.decode_text(text_buf);
field_lac.decode_text(text_buf);
field_rac.decode_text(text_buf);
field_cell__identity.decode_text(text_buf);
}

void PCUIF__neigh__addr__cnf::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__neigh__addr__cnf::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__neigh__addr__cnf::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__neigh__addr__cnf_orig__req_descr_.raw->forceomit);
  decoded_field_length = field_orig__req.RAW_decode(PCUIF__neigh__addr__cnf_orig__req_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__neigh__addr__cnf_error__code_descr_.raw->forceomit);
  decoded_field_length = field_error__code.RAW_decode(PCUIF__neigh__addr__cnf_error__code_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__neigh__addr__cnf_mcc_descr_.raw->forceomit);
  decoded_field_length = field_mcc.RAW_decode(PCUIF__neigh__addr__cnf_mcc_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__neigh__addr__cnf_mnc_descr_.raw->forceomit);
  decoded_field_length = field_mnc.RAW_decode(PCUIF__neigh__addr__cnf_mnc_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, PCUIF__neigh__addr__cnf_mnc__3__digits_descr_.raw->forceomit);
  decoded_field_length = field_mnc__3__digits.RAW_decode(PCUIF__neigh__addr__cnf_mnc__3__digits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, PCUIF__neigh__addr__cnf_lac_descr_.raw->forceomit);
  decoded_field_length = field_lac.RAW_decode(PCUIF__neigh__addr__cnf_lac_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PCUIF__neigh__addr__cnf_rac_descr_.raw->forceomit);
  decoded_field_length = field_rac.RAW_decode(PCUIF__neigh__addr__cnf_rac_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PCUIF__neigh__addr__cnf_cell__identity_descr_.raw->forceomit);
  decoded_field_length = field_cell__identity.RAW_decode(PCUIF__neigh__addr__cnf_cell__identity_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__neigh__addr__cnf::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 8;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(8);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__neigh__addr__cnf_orig__req_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__neigh__addr__cnf_error__code_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__neigh__addr__cnf_mcc_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__neigh__addr__cnf_mnc_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PCUIF__neigh__addr__cnf_mnc__3__digits_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PCUIF__neigh__addr__cnf_lac_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PCUIF__neigh__addr__cnf_rac_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PCUIF__neigh__addr__cnf_cell__identity_descr_.raw);
  encoded_length += field_orig__req.RAW_encode(PCUIF__neigh__addr__cnf_orig__req_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_error__code.RAW_encode(PCUIF__neigh__addr__cnf_error__code_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_mcc.RAW_encode(PCUIF__neigh__addr__cnf_mcc_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_mnc.RAW_encode(PCUIF__neigh__addr__cnf_mnc_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_mnc__3__digits.RAW_encode(PCUIF__neigh__addr__cnf_mnc__3__digits_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_lac.RAW_encode(PCUIF__neigh__addr__cnf_lac_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_rac.RAW_encode(PCUIF__neigh__addr__cnf_rac_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_cell__identity.RAW_encode(PCUIF__neigh__addr__cnf_cell__identity_descr_, *myleaf.body.node.nodes[7]);
  return myleaf.length = encoded_length;
}

struct PCUIF__neigh__addr__cnf_template::single_value_struct {
PCUIF__neigh__addr__req_template field_orig__req;
INTEGER_template field_error__code;
INTEGER_template field_mcc;
INTEGER_template field_mnc;
INTEGER_template field_mnc__3__digits;
INTEGER_template field_lac;
INTEGER_template field_rac;
INTEGER_template field_cell__identity;
};

void PCUIF__neigh__addr__cnf_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_orig__req = ANY_VALUE;
single_value->field_error__code = ANY_VALUE;
single_value->field_mcc = ANY_VALUE;
single_value->field_mnc = ANY_VALUE;
single_value->field_mnc__3__digits = ANY_VALUE;
single_value->field_lac = ANY_VALUE;
single_value->field_rac = ANY_VALUE;
single_value->field_cell__identity = ANY_VALUE;
}
}
}

void PCUIF__neigh__addr__cnf_template::copy_value(const PCUIF__neigh__addr__cnf& other_value)
{
single_value = new single_value_struct;
if (other_value.orig__req().is_bound()) {
  single_value->field_orig__req = other_value.orig__req();
} else {
  single_value->field_orig__req.clean_up();
}
if (other_value.error__code().is_bound()) {
  single_value->field_error__code = other_value.error__code();
} else {
  single_value->field_error__code.clean_up();
}
if (other_value.mcc().is_bound()) {
  single_value->field_mcc = other_value.mcc();
} else {
  single_value->field_mcc.clean_up();
}
if (other_value.mnc().is_bound()) {
  single_value->field_mnc = other_value.mnc();
} else {
  single_value->field_mnc.clean_up();
}
if (other_value.mnc__3__digits().is_bound()) {
  single_value->field_mnc__3__digits = other_value.mnc__3__digits();
} else {
  single_value->field_mnc__3__digits.clean_up();
}
if (other_value.lac().is_bound()) {
  single_value->field_lac = other_value.lac();
} else {
  single_value->field_lac.clean_up();
}
if (other_value.rac().is_bound()) {
  single_value->field_rac = other_value.rac();
} else {
  single_value->field_rac.clean_up();
}
if (other_value.cell__identity().is_bound()) {
  single_value->field_cell__identity = other_value.cell__identity();
} else {
  single_value->field_cell__identity.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__neigh__addr__cnf_template::copy_template(const PCUIF__neigh__addr__cnf_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.orig__req().get_selection()) {
single_value->field_orig__req = other_value.orig__req();
} else {
single_value->field_orig__req.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.error__code().get_selection()) {
single_value->field_error__code = other_value.error__code();
} else {
single_value->field_error__code.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcc().get_selection()) {
single_value->field_mcc = other_value.mcc();
} else {
single_value->field_mcc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mnc().get_selection()) {
single_value->field_mnc = other_value.mnc();
} else {
single_value->field_mnc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mnc__3__digits().get_selection()) {
single_value->field_mnc__3__digits = other_value.mnc__3__digits();
} else {
single_value->field_mnc__3__digits.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lac().get_selection()) {
single_value->field_lac = other_value.lac();
} else {
single_value->field_lac.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rac().get_selection()) {
single_value->field_rac = other_value.rac();
} else {
single_value->field_rac.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cell__identity().get_selection()) {
single_value->field_cell__identity = other_value.cell__identity();
} else {
single_value->field_cell__identity.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__neigh__addr__cnf_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 PCUIF__neigh__addr__cnf_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__neigh__addr__cnf_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 @PCUIF_Types.PCUIF_neigh_addr_cnf.");
break;
}
set_selection(other_value);
}

PCUIF__neigh__addr__cnf_template::PCUIF__neigh__addr__cnf_template()
{
}

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

PCUIF__neigh__addr__cnf_template::PCUIF__neigh__addr__cnf_template(const PCUIF__neigh__addr__cnf& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__neigh__addr__cnf_template& PCUIF__neigh__addr__cnf_template::operator=(const OPTIONAL<PCUIF__neigh__addr__cnf>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__neigh__addr__cnf&)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 @PCUIF_Types.PCUIF_neigh_addr_cnf.");
}
return *this;
}

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

boolean PCUIF__neigh__addr__cnf_template::match(const PCUIF__neigh__addr__cnf& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.orig__req().is_bound()) return FALSE;
if(!single_value->field_orig__req.match(other_value.orig__req(), legacy))return FALSE;
if(!other_value.error__code().is_bound()) return FALSE;
if(!single_value->field_error__code.match(other_value.error__code(), legacy))return FALSE;
if(!other_value.mcc().is_bound()) return FALSE;
if(!single_value->field_mcc.match(other_value.mcc(), legacy))return FALSE;
if(!other_value.mnc().is_bound()) return FALSE;
if(!single_value->field_mnc.match(other_value.mnc(), legacy))return FALSE;
if(!other_value.mnc__3__digits().is_bound()) return FALSE;
if(!single_value->field_mnc__3__digits.match(other_value.mnc__3__digits(), legacy))return FALSE;
if(!other_value.lac().is_bound()) return FALSE;
if(!single_value->field_lac.match(other_value.lac(), legacy))return FALSE;
if(!other_value.rac().is_bound()) return FALSE;
if(!single_value->field_rac.match(other_value.rac(), legacy))return FALSE;
if(!other_value.cell__identity().is_bound()) return FALSE;
if(!single_value->field_cell__identity.match(other_value.cell__identity(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
}
return FALSE;
}

boolean PCUIF__neigh__addr__cnf_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_orig__req.is_bound()
 || single_value->field_error__code.is_bound()
 || single_value->field_mcc.is_bound()
 || single_value->field_mnc.is_bound()
 || single_value->field_mnc__3__digits.is_bound()
 || single_value->field_lac.is_bound()
 || single_value->field_rac.is_bound()
 || single_value->field_cell__identity.is_bound();
}

boolean PCUIF__neigh__addr__cnf_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_orig__req.is_value()
 && single_value->field_error__code.is_value()
 && single_value->field_mcc.is_value()
 && single_value->field_mnc.is_value()
 && single_value->field_mnc__3__digits.is_value()
 && single_value->field_lac.is_value()
 && single_value->field_rac.is_value()
 && single_value->field_cell__identity.is_value();
}

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

PCUIF__neigh__addr__cnf PCUIF__neigh__addr__cnf_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 @PCUIF_Types.PCUIF_neigh_addr_cnf.");
PCUIF__neigh__addr__cnf ret_val;
if (single_value->field_orig__req.is_bound()) {
ret_val.orig__req() = single_value->field_orig__req.valueof();
}
if (single_value->field_error__code.is_bound()) {
ret_val.error__code() = single_value->field_error__code.valueof();
}
if (single_value->field_mcc.is_bound()) {
ret_val.mcc() = single_value->field_mcc.valueof();
}
if (single_value->field_mnc.is_bound()) {
ret_val.mnc() = single_value->field_mnc.valueof();
}
if (single_value->field_mnc__3__digits.is_bound()) {
ret_val.mnc__3__digits() = single_value->field_mnc__3__digits.valueof();
}
if (single_value->field_lac.is_bound()) {
ret_val.lac() = single_value->field_lac.valueof();
}
if (single_value->field_rac.is_bound()) {
ret_val.rac() = single_value->field_rac.valueof();
}
if (single_value->field_cell__identity.is_bound()) {
ret_val.cell__identity() = single_value->field_cell__identity.valueof();
}
return ret_val;
}

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

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

PCUIF__neigh__addr__req_template& PCUIF__neigh__addr__cnf_template::orig__req()
{
set_specific();
return single_value->field_orig__req;
}

const PCUIF__neigh__addr__req_template& PCUIF__neigh__addr__cnf_template::orig__req() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field orig_req of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_orig__req;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::error__code()
{
set_specific();
return single_value->field_error__code;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::error__code() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field error_code of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_error__code;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::mcc()
{
set_specific();
return single_value->field_mcc;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::mcc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcc of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_mcc;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::mnc()
{
set_specific();
return single_value->field_mnc;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::mnc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mnc of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_mnc;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::mnc__3__digits()
{
set_specific();
return single_value->field_mnc__3__digits;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::mnc__3__digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mnc_3_digits of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_mnc__3__digits;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::lac()
{
set_specific();
return single_value->field_lac;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::lac() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lac of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_lac;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::rac()
{
set_specific();
return single_value->field_rac;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::rac() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rac of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_rac;
}

INTEGER_template& PCUIF__neigh__addr__cnf_template::cell__identity()
{
set_specific();
return single_value->field_cell__identity;
}

const INTEGER_template& PCUIF__neigh__addr__cnf_template::cell__identity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cell_identity of a non-specific template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
return single_value->field_cell__identity;
}

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

void PCUIF__neigh__addr__cnf_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ orig_req := ");
single_value->field_orig__req.log();
TTCN_Logger::log_event_str(", error_code := ");
single_value->field_error__code.log();
TTCN_Logger::log_event_str(", mcc := ");
single_value->field_mcc.log();
TTCN_Logger::log_event_str(", mnc := ");
single_value->field_mnc.log();
TTCN_Logger::log_event_str(", mnc_3_digits := ");
single_value->field_mnc__3__digits.log();
TTCN_Logger::log_event_str(", lac := ");
single_value->field_lac.log();
TTCN_Logger::log_event_str(", rac := ");
single_value->field_rac.log();
TTCN_Logger::log_event_str(", cell_identity := ");
single_value->field_cell__identity.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__neigh__addr__cnf_template::log_match(const PCUIF__neigh__addr__cnf& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_orig__req.match(match_value.orig__req(), legacy)){
TTCN_Logger::log_logmatch_info(".orig_req");
single_value->field_orig__req.log_match(match_value.orig__req(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_error__code.match(match_value.error__code(), legacy)){
TTCN_Logger::log_logmatch_info(".error_code");
single_value->field_error__code.log_match(match_value.error__code(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcc.match(match_value.mcc(), legacy)){
TTCN_Logger::log_logmatch_info(".mcc");
single_value->field_mcc.log_match(match_value.mcc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mnc.match(match_value.mnc(), legacy)){
TTCN_Logger::log_logmatch_info(".mnc");
single_value->field_mnc.log_match(match_value.mnc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mnc__3__digits.match(match_value.mnc__3__digits(), legacy)){
TTCN_Logger::log_logmatch_info(".mnc_3_digits");
single_value->field_mnc__3__digits.log_match(match_value.mnc__3__digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lac.match(match_value.lac(), legacy)){
TTCN_Logger::log_logmatch_info(".lac");
single_value->field_lac.log_match(match_value.lac(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rac.match(match_value.rac(), legacy)){
TTCN_Logger::log_logmatch_info(".rac");
single_value->field_rac.log_match(match_value.rac(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cell__identity.match(match_value.cell__identity(), legacy)){
TTCN_Logger::log_logmatch_info(".cell_identity");
single_value->field_cell__identity.log_match(match_value.cell__identity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ orig_req := ");
single_value->field_orig__req.log_match(match_value.orig__req(), legacy);
TTCN_Logger::log_event_str(", error_code := ");
single_value->field_error__code.log_match(match_value.error__code(), legacy);
TTCN_Logger::log_event_str(", mcc := ");
single_value->field_mcc.log_match(match_value.mcc(), legacy);
TTCN_Logger::log_event_str(", mnc := ");
single_value->field_mnc.log_match(match_value.mnc(), legacy);
TTCN_Logger::log_event_str(", mnc_3_digits := ");
single_value->field_mnc__3__digits.log_match(match_value.mnc__3__digits(), legacy);
TTCN_Logger::log_event_str(", lac := ");
single_value->field_lac.log_match(match_value.lac(), legacy);
TTCN_Logger::log_event_str(", rac := ");
single_value->field_rac.log_match(match_value.rac(), legacy);
TTCN_Logger::log_event_str(", cell_identity := ");
single_value->field_cell__identity.log_match(match_value.cell__identity(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__neigh__addr__cnf_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (orig__req().is_bound()) orig__req().set_implicit_omit();
if (error__code().is_bound()) error__code().set_implicit_omit();
if (mcc().is_bound()) mcc().set_implicit_omit();
if (mnc().is_bound()) mnc().set_implicit_omit();
if (mnc__3__digits().is_bound()) mnc__3__digits().set_implicit_omit();
if (lac().is_bound()) lac().set_implicit_omit();
if (rac().is_bound()) rac().set_implicit_omit();
if (cell__identity().is_bound()) cell__identity().set_implicit_omit();
}

void PCUIF__neigh__addr__cnf_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_orig__req.encode_text(text_buf);
single_value->field_error__code.encode_text(text_buf);
single_value->field_mcc.encode_text(text_buf);
single_value->field_mnc.encode_text(text_buf);
single_value->field_mnc__3__digits.encode_text(text_buf);
single_value->field_lac.encode_text(text_buf);
single_value->field_rac.encode_text(text_buf);
single_value->field_cell__identity.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 @PCUIF_Types.PCUIF_neigh_addr_cnf.");
}
}

void PCUIF__neigh__addr__cnf_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_orig__req.decode_text(text_buf);
single_value->field_error__code.decode_text(text_buf);
single_value->field_mcc.decode_text(text_buf);
single_value->field_mnc.decode_text(text_buf);
single_value->field_mnc__3__digits.decode_text(text_buf);
single_value->field_lac.decode_text(text_buf);
single_value->field_rac.decode_text(text_buf);
single_value->field_cell__identity.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 PCUIF__neigh__addr__cnf_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_neigh_addr_cnf.");
}
}

void PCUIF__neigh__addr__cnf_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "record template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    PCUIF__neigh__addr__cnf_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record template of type @PCUIF_Types.PCUIF_neigh_addr_cnf has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) orig__req().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) error__code().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mcc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mnc().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mnc__3__digits().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) lac().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) rac().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) cell__identity().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "orig_req")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          orig__req().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "error_code")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          error__code().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mnc_3_digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mnc__3__digits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rac")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rac().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cell_identity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cell__identity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @PCUIF_Types.PCUIF_neigh_addr_cnf: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__neigh__addr__cnf_template* precondition = new PCUIF__neigh__addr__cnf_template;
    precondition->set_param(*param.get_elem(0));
    PCUIF__neigh__addr__cnf_template* implied_template = new PCUIF__neigh__addr__cnf_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PCUIF__neigh__addr__cnf_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@PCUIF_Types.PCUIF_neigh_addr_cnf");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__neigh__addr__cnf_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_orig__req.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_error__code.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_mcc.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_mnc.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_mnc__3__digits.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_lac.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_rac.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
single_value->field_cell__identity.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
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 : "@PCUIF_Types.PCUIF_neigh_addr_cnf");
}

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

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

void PCUIF__ContainerMsgUnion::copy_value(const PCUIF__ContainerMsgUnion& other_value)
{
switch (other_value.union_selection) {
case ALT_neigh__addr__req:
field_neigh__addr__req = new PCUIF__neigh__addr__req(*other_value.field_neigh__addr__req);
break;
case ALT_neigh__addr__cnf:
field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf(*other_value.field_neigh__addr__cnf);
break;
case ALT_other:
field_other = new OCTETSTRING(*other_value.field_other);
break;
default:
TTCN_error("Assignment of an unbound union value of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
union_selection = other_value.union_selection;
}

PCUIF__ContainerMsgUnion::PCUIF__ContainerMsgUnion()
{
union_selection = UNBOUND_VALUE;
}

PCUIF__ContainerMsgUnion::PCUIF__ContainerMsgUnion(const PCUIF__ContainerMsgUnion& other_value)
: Base_Type(){
copy_value(other_value);
}

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

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

boolean PCUIF__ContainerMsgUnion::operator==(const PCUIF__ContainerMsgUnion& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_neigh__addr__req:
return *field_neigh__addr__req == *other_value.field_neigh__addr__req;
case ALT_neigh__addr__cnf:
return *field_neigh__addr__cnf == *other_value.field_neigh__addr__cnf;
case ALT_other:
return *field_other == *other_value.field_other;
default:
return FALSE;
}
}

PCUIF__neigh__addr__req& PCUIF__ContainerMsgUnion::neigh__addr__req()
{
if (union_selection != ALT_neigh__addr__req) {
clean_up();
field_neigh__addr__req = new PCUIF__neigh__addr__req;
union_selection = ALT_neigh__addr__req;
}
return *field_neigh__addr__req;
}

const PCUIF__neigh__addr__req& PCUIF__ContainerMsgUnion::neigh__addr__req() const
{
if (union_selection != ALT_neigh__addr__req) TTCN_error("Using non-selected field neigh_addr_req in a value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *field_neigh__addr__req;
}

PCUIF__neigh__addr__cnf& PCUIF__ContainerMsgUnion::neigh__addr__cnf()
{
if (union_selection != ALT_neigh__addr__cnf) {
clean_up();
field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf;
union_selection = ALT_neigh__addr__cnf;
}
return *field_neigh__addr__cnf;
}

const PCUIF__neigh__addr__cnf& PCUIF__ContainerMsgUnion::neigh__addr__cnf() const
{
if (union_selection != ALT_neigh__addr__cnf) TTCN_error("Using non-selected field neigh_addr_cnf in a value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *field_neigh__addr__cnf;
}

OCTETSTRING& PCUIF__ContainerMsgUnion::other()
{
if (union_selection != ALT_other) {
clean_up();
field_other = new OCTETSTRING;
union_selection = ALT_other;
}
return *field_other;
}

const OCTETSTRING& PCUIF__ContainerMsgUnion::other() const
{
if (union_selection != ALT_other) TTCN_error("Using non-selected field other in a value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *field_other;
}

boolean PCUIF__ContainerMsgUnion::ischosen(union_selection_type checked_selection) const
{
if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return union_selection == checked_selection;
}

boolean PCUIF__ContainerMsgUnion::is_bound() const
{
  return union_selection != UNBOUND_VALUE;
}

boolean PCUIF__ContainerMsgUnion::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_neigh__addr__req: return field_neigh__addr__req->is_value();
case ALT_neigh__addr__cnf: return field_neigh__addr__cnf->is_value();
case ALT_other: return field_other->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void PCUIF__ContainerMsgUnion::clean_up()
{
switch (union_selection) {
case ALT_neigh__addr__req:
  delete field_neigh__addr__req;
  break;
case ALT_neigh__addr__cnf:
  delete field_neigh__addr__cnf;
  break;
case ALT_other:
  delete field_other;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void PCUIF__ContainerMsgUnion::log() const
{
switch (union_selection) {
case ALT_neigh__addr__req:
TTCN_Logger::log_event_str("{ neigh_addr_req := ");
field_neigh__addr__req->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_neigh__addr__cnf:
TTCN_Logger::log_event_str("{ neigh_addr_cnf := ");
field_neigh__addr__cnf->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_other:
TTCN_Logger::log_event_str("{ other := ");
field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void PCUIF__ContainerMsgUnion::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "neigh_addr_req")) {
    neigh__addr__req().set_param(*mp_last);
    if (!neigh__addr__req().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "neigh_addr_cnf")) {
    neigh__addr__cnf().set_param(*mp_last);
    if (!neigh__addr__cnf().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "other")) {
    other().set_param(*mp_last);
    if (!other().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @PCUIF_Types.PCUIF_ContainerMsgUnion.", last_name);
}

void PCUIF__ContainerMsgUnion::set_implicit_omit()
{
switch (union_selection) {
case ALT_neigh__addr__req:
field_neigh__addr__req->set_implicit_omit(); break;
case ALT_neigh__addr__cnf:
field_neigh__addr__cnf->set_implicit_omit(); break;
case ALT_other:
field_other->set_implicit_omit(); break;
default: break;
}
}

void PCUIF__ContainerMsgUnion::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_neigh__addr__req:
field_neigh__addr__req->encode_text(text_buf);
break;
case ALT_neigh__addr__cnf:
field_neigh__addr__cnf->encode_text(text_buf);
break;
case ALT_other:
field_other->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}

void PCUIF__ContainerMsgUnion::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_neigh__addr__req:
neigh__addr__req().decode_text(text_buf);
break;
case ALT_neigh__addr__cnf:
neigh__addr__cnf().decode_text(text_buf);
break;
case ALT_other:
other().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}

void PCUIF__ContainerMsgUnion::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__ContainerMsgUnion::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__ContainerMsgUnion::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, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, PCUIF__ContainerMsgUnion_neigh__addr__req_descr_.raw->forceomit);
      decoded_length = neigh__addr__req().RAW_decode(PCUIF__ContainerMsgUnion_neigh__addr__req_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_.raw->forceomit);
      decoded_length = neigh__addr__cnf().RAW_decode(PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, PCUIF__ContainerMsgUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(PCUIF__ContainerMsgUnion_other_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__ContainerMsgUnion_neigh__addr__req_descr_.raw->forceomit);
      decoded_length = neigh__addr__req().RAW_decode(PCUIF__ContainerMsgUnion_neigh__addr__req_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_.raw->forceomit);
      decoded_length = neigh__addr__cnf().RAW_decode(PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__ContainerMsgUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(PCUIF__ContainerMsgUnion_other_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int PCUIF__ContainerMsgUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  memset(myleaf.body.node.nodes, 0, 3 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_neigh__addr__req:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PCUIF__ContainerMsgUnion_neigh__addr__req_descr_.raw);
    encoded_length = field_neigh__addr__req->RAW_encode(PCUIF__ContainerMsgUnion_neigh__addr__req_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PCUIF__ContainerMsgUnion_neigh__addr__req_descr_;
    break;
  case ALT_neigh__addr__cnf:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_.raw);
    encoded_length = field_neigh__addr__cnf->RAW_encode(PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PCUIF__ContainerMsgUnion_neigh__addr__cnf_descr_;
    break;
  case ALT_other:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PCUIF__ContainerMsgUnion_other_descr_.raw);
    encoded_length = field_other->RAW_encode(PCUIF__ContainerMsgUnion_other_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PCUIF__ContainerMsgUnion_other_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void PCUIF__ContainerMsgUnion_template::copy_value(const PCUIF__ContainerMsgUnion& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req = new PCUIF__neigh__addr__req_template(other_value.neigh__addr__req());
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf_template(other_value.neigh__addr__cnf());
break;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template(other_value.other());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__ContainerMsgUnion_template::copy_template(const PCUIF__ContainerMsgUnion_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req = new PCUIF__neigh__addr__req_template(*other_value.single_value.field_neigh__addr__req);
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf_template(*other_value.single_value.field_neigh__addr__cnf);
break;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template(*other_value.single_value.field_other);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
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 PCUIF__ContainerMsgUnion_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 PCUIF__ContainerMsgUnion_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__ContainerMsgUnion_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
set_selection(other_value);
}

PCUIF__ContainerMsgUnion_template::PCUIF__ContainerMsgUnion_template()
{
}

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

PCUIF__ContainerMsgUnion_template::PCUIF__ContainerMsgUnion_template(const PCUIF__ContainerMsgUnion& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void PCUIF__ContainerMsgUnion_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
delete single_value.field_neigh__addr__req;
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
delete single_value.field_neigh__addr__cnf;
break;
case PCUIF__ContainerMsgUnion::ALT_other:
delete single_value.field_other;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean PCUIF__ContainerMsgUnion_template::match(const PCUIF__ContainerMsgUnion& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
{
PCUIF__ContainerMsgUnion::union_selection_type value_selection = other_value.get_selection();
if (value_selection == PCUIF__ContainerMsgUnion::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
return single_value.field_neigh__addr__req->match(other_value.neigh__addr__req(), legacy);
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
return single_value.field_neigh__addr__cnf->match(other_value.neigh__addr__cnf(), legacy);
case PCUIF__ContainerMsgUnion::ALT_other:
return single_value.field_other->match(other_value.other(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
return FALSE;
}

boolean PCUIF__ContainerMsgUnion_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
return single_value.field_neigh__addr__req->is_value();
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
return single_value.field_neigh__addr__cnf->is_value();
case PCUIF__ContainerMsgUnion::ALT_other:
return single_value.field_other->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}

PCUIF__ContainerMsgUnion PCUIF__ContainerMsgUnion_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
PCUIF__ContainerMsgUnion ret_val;
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
ret_val.neigh__addr__req() = single_value.field_neigh__addr__req->valueof();
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
ret_val.neigh__addr__cnf() = single_value.field_neigh__addr__cnf->valueof();
break;
case PCUIF__ContainerMsgUnion::ALT_other:
ret_val.other() = single_value.field_other->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
return ret_val;
}

PCUIF__ContainerMsgUnion_template& PCUIF__ContainerMsgUnion_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return value_list.list_value[list_index];
}
void PCUIF__ContainerMsgUnion_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PCUIF__ContainerMsgUnion_template[list_length];
}

PCUIF__neigh__addr__req_template& PCUIF__ContainerMsgUnion_template::neigh__addr__req()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_neigh__addr__req) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_neigh__addr__req = new PCUIF__neigh__addr__req_template(ANY_VALUE);
else single_value.field_neigh__addr__req = new PCUIF__neigh__addr__req_template;
single_value.union_selection = PCUIF__ContainerMsgUnion::ALT_neigh__addr__req;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_neigh__addr__req;
}

const PCUIF__neigh__addr__req_template& PCUIF__ContainerMsgUnion_template::neigh__addr__req() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field neigh_addr_req in a non-specific template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_neigh__addr__req) TTCN_error("Accessing non-selected field neigh_addr_req in a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *single_value.field_neigh__addr__req;
}

PCUIF__neigh__addr__cnf_template& PCUIF__ContainerMsgUnion_template::neigh__addr__cnf()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf_template(ANY_VALUE);
else single_value.field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf_template;
single_value.union_selection = PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_neigh__addr__cnf;
}

const PCUIF__neigh__addr__cnf_template& PCUIF__ContainerMsgUnion_template::neigh__addr__cnf() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field neigh_addr_cnf in a non-specific template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf) TTCN_error("Accessing non-selected field neigh_addr_cnf in a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *single_value.field_neigh__addr__cnf;
}

OCTETSTRING_template& PCUIF__ContainerMsgUnion_template::other()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_other) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_other = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_other = new OCTETSTRING_template;
single_value.union_selection = PCUIF__ContainerMsgUnion::ALT_other;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_other;
}

const OCTETSTRING_template& PCUIF__ContainerMsgUnion_template::other() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field other in a non-specific template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
if (single_value.union_selection != PCUIF__ContainerMsgUnion::ALT_other) TTCN_error("Accessing non-selected field other in a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return *single_value.field_other;
}

boolean PCUIF__ContainerMsgUnion_template::ischosen(PCUIF__ContainerMsgUnion::union_selection_type checked_selection) const
{
if (checked_selection == PCUIF__ContainerMsgUnion::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == PCUIF__ContainerMsgUnion::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
return single_value.union_selection == checked_selection;
case VALUE_LIST:
{
if (value_list.n_values < 1)
TTCN_error("Internal error: Performing ischosen() operation on a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion containing an empty list.");
boolean ret_val = value_list.list_value[0].ischosen(checked_selection);
for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) {
ret_val = value_list.list_value[list_count].ischosen(checked_selection);
}
return ret_val;
}
default:
return FALSE;
}
return FALSE;
}

void PCUIF__ContainerMsgUnion_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
TTCN_Logger::log_event_str("{ neigh_addr_req := ");
single_value.field_neigh__addr__req->log();
TTCN_Logger::log_event_str(" }");
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
TTCN_Logger::log_event_str("{ neigh_addr_cnf := ");
single_value.field_neigh__addr__cnf->log();
TTCN_Logger::log_event_str(" }");
break;
case PCUIF__ContainerMsgUnion::ALT_other:
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__ContainerMsgUnion_template::log_match(const PCUIF__ContainerMsgUnion& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".neigh_addr_req");
single_value.field_neigh__addr__req->log_match(match_value.neigh__addr__req(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ neigh_addr_req := ");
single_value.field_neigh__addr__req->log_match(match_value.neigh__addr__req(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".neigh_addr_cnf");
single_value.field_neigh__addr__cnf->log_match(match_value.neigh__addr__cnf(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ neigh_addr_cnf := ");
single_value.field_neigh__addr__cnf->log_match(match_value.neigh__addr__cnf(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PCUIF__ContainerMsgUnion::ALT_other:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".other");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__ContainerMsgUnion_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req->set_implicit_omit(); break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf->set_implicit_omit(); break;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other->set_implicit_omit(); break;
default: break;
}
}

void PCUIF__ContainerMsgUnion_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req->encode_text(text_buf);
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf->encode_text(text_buf);
break;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}

void PCUIF__ContainerMsgUnion_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = PCUIF__ContainerMsgUnion::UNBOUND_VALUE;
PCUIF__ContainerMsgUnion::union_selection_type new_selection = (PCUIF__ContainerMsgUnion::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req = new PCUIF__neigh__addr__req_template;
single_value.field_neigh__addr__req->decode_text(text_buf);
break;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf = new PCUIF__neigh__addr__cnf_template;
single_value.field_neigh__addr__cnf->decode_text(text_buf);
break;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template;
single_value.field_other->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new PCUIF__ContainerMsgUnion_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
}

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

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

void PCUIF__ContainerMsgUnion_template::set_param(Module_Param& param)
{
  if (dynamic_cast<Module_Param_Name*>(param.get_id()) != NULL &&
      param.get_id()->next_name()) {
    char* param_field = param.get_id()->get_current_name();
    if (param_field[0] >= '0' && param_field[0] <= '9') {
      param.error("Unexpected array index in module parameter, expected a valid field"
        " name for union template type `@PCUIF_Types.PCUIF_ContainerMsgUnion'");
    }
    if (strcmp("neigh_addr_req", param_field) == 0) {
      neigh__addr__req().set_param(param);
      return;
    } else if (strcmp("neigh_addr_cnf", param_field) == 0) {
      neigh__addr__cnf().set_param(param);
      return;
    } else if (strcmp("other", param_field) == 0) {
      other().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@PCUIF_Types.PCUIF_ContainerMsgUnion'", param_field);
  }
  param.basic_check(Module_Param::BC_TEMPLATE, "union 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: {
    PCUIF__ContainerMsgUnion_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_Value_List:
    if (m_p->get_size()==0) break;
    param.type_error("union template", "@PCUIF_Types.PCUIF_ContainerMsgUnion");
    break;
  case Module_Param::MP_Assignment_List: {
    Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
    char* last_name = mp_last->get_id()->get_name();
    if (!strcmp(last_name, "neigh_addr_req")) {
      neigh__addr__req().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "neigh_addr_cnf")) {
      neigh__addr__cnf().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "other")) {
      other().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @PCUIF_Types.PCUIF_ContainerMsgUnion.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    PCUIF__ContainerMsgUnion_template* precondition = new PCUIF__ContainerMsgUnion_template;
    precondition->set_param(*m_p->get_elem(0));
    PCUIF__ContainerMsgUnion_template* implied_template = new PCUIF__ContainerMsgUnion_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PCUIF__ContainerMsgUnion_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@PCUIF_Types.PCUIF_ContainerMsgUnion");
  }
  is_ifpresent = param.get_ifpresent();
}

void PCUIF__ContainerMsgUnion_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
single_value.field_neigh__addr__req->check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_ContainerMsgUnion");
return;
case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
single_value.field_neigh__addr__cnf->check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_ContainerMsgUnion");
return;
case PCUIF__ContainerMsgUnion::ALT_other:
single_value.field_other->check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_ContainerMsgUnion");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @PCUIF_Types.PCUIF_ContainerMsgUnion.");
}
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 : "@PCUIF_Types.PCUIF_ContainerMsgUnion");
}

PCUIF__container::PCUIF__container()
{
}

PCUIF__container::PCUIF__container(const PCUIF__MsgType& par_msg__type,
    const OCTETSTRING& par_spare,
    const INTEGER& par_len,
    const PCUIF__ContainerMsgUnion& par_u)
  :   field_msg__type(par_msg__type),
  field_spare(par_spare),
  field_len(par_len),
  field_u(par_u)
{
}

PCUIF__container::PCUIF__container(const PCUIF__container& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_container.");
if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
else field_msg__type.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
}

void PCUIF__container::clean_up()
{
field_msg__type.clean_up();
field_spare.clean_up();
field_len.clean_up();
field_u.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__container::get_descriptor() const { return &PCUIF__container_descr_; }
PCUIF__container& PCUIF__container::operator=(const PCUIF__container& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_container.");
  if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
  else field_msg__type.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
}
return *this;
}

boolean PCUIF__container::operator==(const PCUIF__container& other_value) const
{
return field_msg__type==other_value.field_msg__type
  && field_spare==other_value.field_spare
  && field_len==other_value.field_len
  && field_u==other_value.field_u;
}

boolean PCUIF__container::is_bound() const
{
return (field_msg__type.is_bound())
  || (field_spare.is_bound())
  || (field_len.is_bound())
  || (field_u.is_bound());
}
boolean PCUIF__container::is_value() const
{
return field_msg__type.is_value()
  && field_spare.is_value()
  && field_len.is_value()
  && field_u.is_value();
}
void PCUIF__container::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ msg_type := ");
field_msg__type.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", len := ");
field_len.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__container::set_implicit_omit()
{
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

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

void PCUIF__container::encode_text(Text_Buf& text_buf) const
{
field_msg__type.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_len.encode_text(text_buf);
field_u.encode_text(text_buf);
}

void PCUIF__container::decode_text(Text_Buf& text_buf)
{
field_msg__type.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_len.decode_text(text_buf);
field_u.decode_text(text_buf);
}

void PCUIF__container::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__container::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__container::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  int selected_field = -1;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  int value_of_length_field2 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__container_msg__type_descr_.raw->forceomit);
  decoded_field_length = field_msg__type.RAW_decode(PCUIF__container_msg__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__container_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(PCUIF__container_spare_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__container_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(PCUIF__container_len_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  INTEGER tmp2 = field_len.convert_to_Integer(PCUIF__container_len_descr_);
  field_len = tmp2;
  value_of_length_field2 += tmp2.get_long_long_val() * 8;
  if (field_msg__type == PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__REQ) selected_field = 0;
  else if (field_msg__type == PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__CNF) selected_field = 1;
  else selected_field = 2;
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__container_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(PCUIF__container_u_descr_, p_buf, min_of_ints(2, limit, value_of_length_field2), local_top_order, no_err, selected_field, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  value_of_length_field2 -= decoded_field_length;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__container::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__container_msg__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__container_spare_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__container_len_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__container_u_descr_.raw);
  encoded_length += field_msg__type.RAW_encode(PCUIF__container_msg__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_spare.RAW_encode(PCUIF__container_spare_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += 16;
  myleaf.body.node.nodes[2]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[2]->coding_descr = &PCUIF__container_len_descr_;
  myleaf.body.node.nodes[2]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[2]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[2]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[2]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[2]->length = 16;
  myleaf.body.node.nodes[2]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[2]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  encoded_length += field_u.RAW_encode(PCUIF__container_u_descr_, *myleaf.body.node.nodes[3]);
  switch (field_u.get_selection()) {
  case PCUIF__ContainerMsgUnion::ALT_neigh__addr__req:
  if (field_msg__type != PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__REQ) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  PCUIF__MsgType new_val(PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__REQ);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(PCUIF__container_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case PCUIF__ContainerMsgUnion::ALT_neigh__addr__cnf:
  if (field_msg__type != PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__CNF) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  PCUIF__MsgType new_val(PCUIF__MsgType::PCU__IF__MSG__NEIGH__ADDR__CNF);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(PCUIF__container_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  default:;
  }
  return myleaf.length = encoded_length;
}

struct PCUIF__container_template::single_value_struct {
PCUIF__MsgType_template field_msg__type;
OCTETSTRING_template field_spare;
INTEGER_template field_len;
PCUIF__ContainerMsgUnion_template field_u;
};

void PCUIF__container_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_msg__type = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_len = ANY_VALUE;
single_value->field_u = ANY_VALUE;
}
}
}

void PCUIF__container_template::copy_value(const PCUIF__container& other_value)
{
single_value = new single_value_struct;
if (other_value.msg__type().is_bound()) {
  single_value->field_msg__type = other_value.msg__type();
} else {
  single_value->field_msg__type.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.u().is_bound()) {
  single_value->field_u = other_value.u();
} else {
  single_value->field_u.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__container_template::copy_template(const PCUIF__container_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.msg__type().get_selection()) {
single_value->field_msg__type = other_value.msg__type();
} else {
single_value->field_msg__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.u().get_selection()) {
single_value->field_u = other_value.u();
} else {
single_value->field_u.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__container_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 PCUIF__container_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__container_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 @PCUIF_Types.PCUIF_container.");
break;
}
set_selection(other_value);
}

PCUIF__container_template::PCUIF__container_template()
{
}

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

PCUIF__container_template::PCUIF__container_template(const PCUIF__container& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__container_template& PCUIF__container_template::operator=(const OPTIONAL<PCUIF__container>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__container&)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 @PCUIF_Types.PCUIF_container.");
}
return *this;
}

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

boolean PCUIF__container_template::match(const PCUIF__container& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.msg__type().is_bound()) return FALSE;
if(!single_value->field_msg__type.match(other_value.msg__type(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.u().is_bound()) return FALSE;
if(!single_value->field_u.match(other_value.u(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_container.");
}
return FALSE;
}

boolean PCUIF__container_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_msg__type.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_len.is_bound()
 || single_value->field_u.is_bound();
}

boolean PCUIF__container_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_msg__type.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_len.is_value()
 && single_value->field_u.is_value();
}

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

PCUIF__container PCUIF__container_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 @PCUIF_Types.PCUIF_container.");
PCUIF__container ret_val;
if (single_value->field_msg__type.is_bound()) {
ret_val.msg__type() = single_value->field_msg__type.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
return ret_val;
}

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

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

PCUIF__MsgType_template& PCUIF__container_template::msg__type()
{
set_specific();
return single_value->field_msg__type;
}

const PCUIF__MsgType_template& PCUIF__container_template::msg__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field msg_type of a non-specific template of type @PCUIF_Types.PCUIF_container.");
return single_value->field_msg__type;
}

OCTETSTRING_template& PCUIF__container_template::spare()
{
set_specific();
return single_value->field_spare;
}

const OCTETSTRING_template& PCUIF__container_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @PCUIF_Types.PCUIF_container.");
return single_value->field_spare;
}

INTEGER_template& PCUIF__container_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& PCUIF__container_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @PCUIF_Types.PCUIF_container.");
return single_value->field_len;
}

PCUIF__ContainerMsgUnion_template& PCUIF__container_template::u()
{
set_specific();
return single_value->field_u;
}

const PCUIF__ContainerMsgUnion_template& PCUIF__container_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @PCUIF_Types.PCUIF_container.");
return single_value->field_u;
}

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

void PCUIF__container_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ msg_type := ");
single_value->field_msg__type.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__container_template::log_match(const PCUIF__container& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_msg__type.match(match_value.msg__type(), legacy)){
TTCN_Logger::log_logmatch_info(".msg_type");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_u.match(match_value.u(), legacy)){
TTCN_Logger::log_logmatch_info(".u");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ msg_type := ");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__container_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (len().is_bound()) len().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void PCUIF__container_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_msg__type.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_len.encode_text(text_buf);
single_value->field_u.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 @PCUIF_Types.PCUIF_container.");
}
}

void PCUIF__container_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_msg__type.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_len.decode_text(text_buf);
single_value->field_u.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 PCUIF__container_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_container.");
}
}

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

void PCUIF__container_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_msg__type.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_container");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_container");
single_value->field_len.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_container");
single_value->field_u.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_container");
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 : "@PCUIF_Types.PCUIF_container");
}

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

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

PCUIF__pch::PCUIF__pch()
{
}

PCUIF__pch::PCUIF__pch(const OCTETSTRING& par_msg__id,
    const CHARSTRING& par_imsi,
    const OCTETSTRING& par_data,
    const BOOLEAN& par_confirm)
  :   field_msg__id(par_msg__id),
  field_imsi(par_imsi),
  field_data(par_data),
  field_confirm(par_confirm)
{
}

PCUIF__pch::PCUIF__pch(const PCUIF__pch& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @PCUIF_Types.PCUIF_pch.");
if (other_value.msg__id().is_bound()) field_msg__id = other_value.msg__id();
else field_msg__id.clean_up();
if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
else field_imsi.clean_up();
if (other_value.data().is_bound()) field_data = other_value.data();
else field_data.clean_up();
if (other_value.confirm().is_bound()) field_confirm = other_value.confirm();
else field_confirm.clean_up();
}

void PCUIF__pch::clean_up()
{
field_msg__id.clean_up();
field_imsi.clean_up();
field_data.clean_up();
field_confirm.clean_up();
}

const TTCN_Typedescriptor_t* PCUIF__pch::get_descriptor() const { return &PCUIF__pch_descr_; }
PCUIF__pch& PCUIF__pch::operator=(const PCUIF__pch& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @PCUIF_Types.PCUIF_pch.");
  if (other_value.msg__id().is_bound()) field_msg__id = other_value.msg__id();
  else field_msg__id.clean_up();
  if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
  else field_imsi.clean_up();
  if (other_value.data().is_bound()) field_data = other_value.data();
  else field_data.clean_up();
  if (other_value.confirm().is_bound()) field_confirm = other_value.confirm();
  else field_confirm.clean_up();
}
return *this;
}

boolean PCUIF__pch::operator==(const PCUIF__pch& other_value) const
{
return field_msg__id==other_value.field_msg__id
  && field_imsi==other_value.field_imsi
  && field_data==other_value.field_data
  && field_confirm==other_value.field_confirm;
}

boolean PCUIF__pch::is_bound() const
{
return (field_msg__id.is_bound())
  || (field_imsi.is_bound())
  || (field_data.is_bound())
  || (field_confirm.is_bound());
}
boolean PCUIF__pch::is_value() const
{
return field_msg__id.is_value()
  && field_imsi.is_value()
  && field_data.is_value()
  && field_confirm.is_value();
}
void PCUIF__pch::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ msg_id := ");
field_msg__id.log();
TTCN_Logger::log_event_str(", imsi := ");
field_imsi.log();
TTCN_Logger::log_event_str(", data := ");
field_data.log();
TTCN_Logger::log_event_str(", confirm := ");
field_confirm.log();
TTCN_Logger::log_event_str(" }");
}

void PCUIF__pch::set_implicit_omit()
{
if (msg__id().is_bound()) msg__id().set_implicit_omit();
if (imsi().is_bound()) imsi().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
if (confirm().is_bound()) confirm().set_implicit_omit();
}

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

void PCUIF__pch::encode_text(Text_Buf& text_buf) const
{
field_msg__id.encode_text(text_buf);
field_imsi.encode_text(text_buf);
field_data.encode_text(text_buf);
field_confirm.encode_text(text_buf);
}

void PCUIF__pch::decode_text(Text_Buf& text_buf)
{
field_msg__id.decode_text(text_buf);
field_imsi.decode_text(text_buf);
field_data.decode_text(text_buf);
field_confirm.decode_text(text_buf);
}

void PCUIF__pch::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PCUIF__pch::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;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PCUIF__pch::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PCUIF__pch_msg__id_descr_.raw->forceomit);
  decoded_field_length = field_msg__id.RAW_decode(PCUIF__pch_msg__id_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PCUIF__pch_imsi_descr_.raw->forceomit);
  decoded_field_length = field_imsi.RAW_decode(PCUIF__pch_imsi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PCUIF__pch_data_descr_.raw->forceomit);
  decoded_field_length = field_data.RAW_decode(PCUIF__pch_data_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, PCUIF__pch_confirm_descr_.raw->forceomit);
  decoded_field_length = field_confirm.RAW_decode(PCUIF__pch_confirm_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PCUIF__pch::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PCUIF__pch_msg__id_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PCUIF__pch_imsi_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PCUIF__pch_data_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PCUIF__pch_confirm_descr_.raw);
  encoded_length += field_msg__id.RAW_encode(PCUIF__pch_msg__id_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_imsi.RAW_encode(PCUIF__pch_imsi_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_data.RAW_encode(PCUIF__pch_data_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_confirm.RAW_encode(PCUIF__pch_confirm_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PCUIF__pch_template::single_value_struct {
OCTETSTRING_template field_msg__id;
CHARSTRING_template field_imsi;
OCTETSTRING_template field_data;
BOOLEAN_template field_confirm;
};

void PCUIF__pch_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_msg__id = ANY_VALUE;
single_value->field_imsi = ANY_VALUE;
single_value->field_data = ANY_VALUE;
single_value->field_confirm = ANY_VALUE;
}
}
}

void PCUIF__pch_template::copy_value(const PCUIF__pch& other_value)
{
single_value = new single_value_struct;
if (other_value.msg__id().is_bound()) {
  single_value->field_msg__id = other_value.msg__id();
} else {
  single_value->field_msg__id.clean_up();
}
if (other_value.imsi().is_bound()) {
  single_value->field_imsi = other_value.imsi();
} else {
  single_value->field_imsi.clean_up();
}
if (other_value.data().is_bound()) {
  single_value->field_data = other_value.data();
} else {
  single_value->field_data.clean_up();
}
if (other_value.confirm().is_bound()) {
  single_value->field_confirm = other_value.confirm();
} else {
  single_value->field_confirm.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PCUIF__pch_template::copy_template(const PCUIF__pch_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.msg__id().get_selection()) {
single_value->field_msg__id = other_value.msg__id();
} else {
single_value->field_msg__id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.imsi().get_selection()) {
single_value->field_imsi = other_value.imsi();
} else {
single_value->field_imsi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.data().get_selection()) {
single_value->field_data = other_value.data();
} else {
single_value->field_data.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.confirm().get_selection()) {
single_value->field_confirm = other_value.confirm();
} else {
single_value->field_confirm.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new PCUIF__pch_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 PCUIF__pch_template(*other_value.implication_.precondition);
implication_.implied_template = new PCUIF__pch_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 @PCUIF_Types.PCUIF_pch.");
break;
}
set_selection(other_value);
}

PCUIF__pch_template::PCUIF__pch_template()
{
}

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

PCUIF__pch_template::PCUIF__pch_template(const PCUIF__pch& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PCUIF__pch_template& PCUIF__pch_template::operator=(const OPTIONAL<PCUIF__pch>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PCUIF__pch&)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 @PCUIF_Types.PCUIF_pch.");
}
return *this;
}

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

boolean PCUIF__pch_template::match(const PCUIF__pch& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.msg__id().is_bound()) return FALSE;
if(!single_value->field_msg__id.match(other_value.msg__id(), legacy))return FALSE;
if(!other_value.imsi().is_bound()) return FALSE;
if(!single_value->field_imsi.match(other_value.imsi(), legacy))return FALSE;
if(!other_value.data().is_bound()) return FALSE;
if(!single_value->field_data.match(other_value.data(), legacy))return FALSE;
if(!other_value.confirm().is_bound()) return FALSE;
if(!single_value->field_confirm.match(other_value.confirm(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @PCUIF_Types.PCUIF_pch.");
}
return FALSE;
}

boolean PCUIF__pch_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_msg__id.is_bound()
 || single_value->field_imsi.is_bound()
 || single_value->field_data.is_bound()
 || single_value->field_confirm.is_bound();
}

boolean PCUIF__pch_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_msg__id.is_value()
 && single_value->field_imsi.is_value()
 && single_value->field_data.is_value()
 && single_value->field_confirm.is_value();
}

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

PCUIF__pch PCUIF__pch_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 @PCUIF_Types.PCUIF_pch.");
PCUIF__pch ret_val;
if (single_value->field_msg__id.is_bound()) {
ret_val.msg__id() = single_value->field_msg__id.valueof();
}
if (single_value->field_imsi.is_bound()) {
ret_val.imsi() = single_value->field_imsi.valueof();
}
if (single_value->field_data.is_bound()) {
ret_val.data() = single_value->field_data.valueof();
}
if (single_value->field_confirm.is_bound()) {
ret_val.confirm() = single_value->field_confirm.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& PCUIF__pch_template::msg__id()
{
set_specific();
return single_value->field_msg__id;
}

const OCTETSTRING_template& PCUIF__pch_template::msg__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field msg_id of a non-specific template of type @PCUIF_Types.PCUIF_pch.");
return single_value->field_msg__id;
}

CHARSTRING_template& PCUIF__pch_template::imsi()
{
set_specific();
return single_value->field_imsi;
}

const CHARSTRING_template& PCUIF__pch_template::imsi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field imsi of a non-specific template of type @PCUIF_Types.PCUIF_pch.");
return single_value->field_imsi;
}

OCTETSTRING_template& PCUIF__pch_template::data()
{
set_specific();
return single_value->field_data;
}

const OCTETSTRING_template& PCUIF__pch_template::data() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field data of a non-specific template of type @PCUIF_Types.PCUIF_pch.");
return single_value->field_data;
}

BOOLEAN_template& PCUIF__pch_template::confirm()
{
set_specific();
return single_value->field_confirm;
}

const BOOLEAN_template& PCUIF__pch_template::confirm() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field confirm of a non-specific template of type @PCUIF_Types.PCUIF_pch.");
return single_value->field_confirm;
}

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

void PCUIF__pch_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ msg_id := ");
single_value->field_msg__id.log();
TTCN_Logger::log_event_str(", imsi := ");
single_value->field_imsi.log();
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log();
TTCN_Logger::log_event_str(", confirm := ");
single_value->field_confirm.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PCUIF__pch_template::log_match(const PCUIF__pch& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_msg__id.match(match_value.msg__id(), legacy)){
TTCN_Logger::log_logmatch_info(".msg_id");
single_value->field_msg__id.log_match(match_value.msg__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_imsi.match(match_value.imsi(), legacy)){
TTCN_Logger::log_logmatch_info(".imsi");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_data.match(match_value.data(), legacy)){
TTCN_Logger::log_logmatch_info(".data");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_confirm.match(match_value.confirm(), legacy)){
TTCN_Logger::log_logmatch_info(".confirm");
single_value->field_confirm.log_match(match_value.confirm(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ msg_id := ");
single_value->field_msg__id.log_match(match_value.msg__id(), legacy);
TTCN_Logger::log_event_str(", imsi := ");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::log_event_str(", data := ");
single_value->field_data.log_match(match_value.data(), legacy);
TTCN_Logger::log_event_str(", confirm := ");
single_value->field_confirm.log_match(match_value.confirm(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PCUIF__pch_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (msg__id().is_bound()) msg__id().set_implicit_omit();
if (imsi().is_bound()) imsi().set_implicit_omit();
if (data().is_bound()) data().set_implicit_omit();
if (confirm().is_bound()) confirm().set_implicit_omit();
}

void PCUIF__pch_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_msg__id.encode_text(text_buf);
single_value->field_imsi.encode_text(text_buf);
single_value->field_data.encode_text(text_buf);
single_value->field_confirm.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 @PCUIF_Types.PCUIF_pch.");
}
}

void PCUIF__pch_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_msg__id.decode_text(text_buf);
single_value->field_imsi.decode_text(text_buf);
single_value->field_data.decode_text(text_buf);
single_value->field_confirm.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 PCUIF__pch_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @PCUIF_Types.PCUIF_pch.");
}
}

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

void PCUIF__pch_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_msg__id.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_pch");
single_value->field_imsi.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_pch");
single_value->field_data.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_pch");
single_value->field_confirm.check_restriction(t_res, t_name ? t_name : "@PCUIF_Types.PCUIF_pch");
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 : "@PCUIF_Types.PCUIF_pch");
}

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

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


} /* end of namespace */
