// 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 "IuUP_Types.hh"

namespace IuUP__Types {

/* Literal string constants */

const unsigned char bs_3_bits[] = { 0 },
bs_0_bits[] = { 0 },
bs_1_bits[] = { 0 },
bs_2_bits[] = { 0, 128 };
extern const BITSTRING bs_3(2, bs_3_bits),
bs_0(3, bs_0_bits),
bs_1(4, bs_1_bits),
bs_2(16, bs_2_bits);
const unsigned char module_checksum[] = { 0x03, 0x5c, 0x39, 0x7f, 0x39, 0x97, 0xcf, 0x61, 0x7e, 0x82, 0x1d, 0xf6, 0x51, 0x9f, 0x04, 0x28 };

/* Global variable definitions */

const TTCN_RAWdescriptor_t IuUP__PDU__Type_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type_xer_ = { {"IuUP_PDU_Type>\n", "IuUP_PDU_Type>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type_descr_ = { "@IuUP_Types.IuUP_PDU_Type", &INTEGER_ber_, &IuUP__PDU__Type_raw_, &INTEGER_text_, &IuUP__PDU__Type_xer_, &INTEGER_json_, &IuUP__PDU__Type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__AckNack_raw_ = {2,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};
// No XER for IuUP__AckNack
const TTCN_Typedescriptor_t IuUP__AckNack_descr_ = { "@IuUP_Types.IuUP_AckNack", NULL, &IuUP__AckNack_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__AckNack_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__FrameNr_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__FrameNr_xer_ = { {"IuUP_FrameNr>\n", "IuUP_FrameNr>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__FrameNr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__FrameNr_descr_ = { "@IuUP_Types.IuUP_FrameNr", &INTEGER_ber_, &IuUP__FrameNr_raw_, &INTEGER_text_, &IuUP__FrameNr_xer_, &INTEGER_json_, &IuUP__FrameNr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__FrameNr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__FQC_raw_ = {2,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};
// No XER for IuUP__FQC
const TTCN_Typedescriptor_t IuUP__FQC_descr_ = { "@IuUP_Types.IuUP_FQC", NULL, &IuUP__FQC_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__FQC_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__RFCI_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__RFCI_xer_ = { {"IuUP_RFCI>\n", "IuUP_RFCI>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__RFCI_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__RFCI_descr_ = { "@IuUP_Types.IuUP_RFCI", &INTEGER_ber_, &IuUP__RFCI_raw_, &INTEGER_text_, &IuUP__RFCI_xer_, &INTEGER_json_, &IuUP__RFCI_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__RFCI_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__ProcedureIndicator_raw_ = {4,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};
// No XER for IuUP__ProcedureIndicator
const TTCN_Typedescriptor_t IuUP__ProcedureIndicator_descr_ = { "@IuUP_Types.IuUP_ProcedureIndicator", NULL, &IuUP__ProcedureIndicator_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__ProcedureIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__NumOfRfciInd_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__NumOfRfciInd_xer_ = { {"IuUP_NumOfRfciInd>\n", "IuUP_NumOfRfciInd>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__NumOfRfciInd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__NumOfRfciInd_descr_ = { "@IuUP_Types.IuUP_NumOfRfciInd", &INTEGER_ber_, &IuUP__NumOfRfciInd_raw_, &INTEGER_text_, &IuUP__NumOfRfciInd_xer_, &INTEGER_json_, &IuUP__NumOfRfciInd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__NumOfRfciInd_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__ErrorDistance_raw_ = {2,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};
// No XER for IuUP__ErrorDistance
const TTCN_Typedescriptor_t IuUP__ErrorDistance_descr_ = { "@IuUP_Types.IuUP_ErrorDistance", NULL, &IuUP__ErrorDistance_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__ErrorDistance_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__ErrorCause_raw_ = {6,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};
// No XER for IuUP__ErrorCause
const TTCN_Typedescriptor_t IuUP__ErrorCause_descr_ = { "@IuUP_Types.IuUP_ErrorCause", NULL, &IuUP__ErrorCause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__ErrorCause_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__TimeAlignment_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__TimeAlignment_xer_ = { {"IuUP_TimeAlignment>\n", "IuUP_TimeAlignment>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__TimeAlignment_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__TimeAlignment_descr_ = { "@IuUP_Types.IuUP_TimeAlignment", &INTEGER_ber_, &IuUP__TimeAlignment_raw_, &INTEGER_text_, &IuUP__TimeAlignment_xer_, &INTEGER_json_, &IuUP__TimeAlignment_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__TimeAlignment_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__IPTI_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__IPTI_xer_ = { {"IuUP_IPTI>\n", "IuUP_IPTI>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__IPTI_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__IPTI_descr_ = { "@IuUP_Types.IuUP_IPTI", &INTEGER_ber_, &IuUP__IPTI_raw_, &INTEGER_text_, &IuUP__IPTI_xer_, &INTEGER_json_, &IuUP__IPTI_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__IPTI_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_pdu__type_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__0_pdu__type_xer_ = { {"pdu_type>\n", "pdu_type>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_pdu__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_pdu__type_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.pdu_type", &INTEGER_ber_, &IuUP__PDU__Type__0_pdu__type_raw_, &INTEGER_text_, &IuUP__PDU__Type__0_pdu__type_xer_, &INTEGER_json_, &IuUP__PDU__Type__0_pdu__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_pdu__type_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_frame__nr_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__0_frame__nr_xer_ = { {"frame_nr>\n", "frame_nr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_frame__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_frame__nr_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.frame_nr", &INTEGER_ber_, &IuUP__PDU__Type__0_frame__nr_raw_, &INTEGER_text_, &IuUP__PDU__Type__0_frame__nr_xer_, &INTEGER_json_, &IuUP__PDU__Type__0_frame__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_frame__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_fqc_raw_ = {2,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};
// No XER for IuUP__PDU__Type__0_fqc
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_fqc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.fqc", NULL, &IuUP__PDU__Type__0_fqc_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_fqc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_rfci_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__0_rfci_xer_ = { {"rfci>\n", "rfci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_rfci_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_rfci_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.rfci", &INTEGER_ber_, &IuUP__PDU__Type__0_rfci_raw_, &INTEGER_text_, &IuUP__PDU__Type__0_rfci_xer_, &INTEGER_json_, &IuUP__PDU__Type__0_rfci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_rfci_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_header__crc_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__0_header__crc_xer_ = { {"header_crc>\n", "header_crc>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_header__crc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_header__crc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.header_crc", &INTEGER_ber_, &IuUP__PDU__Type__0_header__crc_raw_, &INTEGER_text_, &IuUP__PDU__Type__0_header__crc_xer_, &INTEGER_json_, &IuUP__PDU__Type__0_header__crc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_header__crc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_payload__crc_raw_ = {10,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__0_payload__crc_xer_ = { {"payload_crc>\n", "payload_crc>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_payload__crc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_payload__crc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.payload_crc", &INTEGER_ber_, &IuUP__PDU__Type__0_payload__crc_raw_, &INTEGER_text_, &IuUP__PDU__Type__0_payload__crc_xer_, &INTEGER_json_, &IuUP__PDU__Type__0_payload__crc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_payload__crc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_payload_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU__Type__0_payload_xer_ = { {"payload>\n", "payload>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU__Type__0_payload_oer_ext_arr_[0] = {};
const int IuUP__PDU__Type__0_payload_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU__Type__0_payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU__Type__0_payload_oer_ext_arr_, 0, IuUP__PDU__Type__0_payload_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_payload_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0.payload", &OCTETSTRING_ber_, &IuUP__PDU__Type__0_payload_raw_, &OCTETSTRING_text_, &IuUP__PDU__Type__0_payload_xer_, &OCTETSTRING_json_, &IuUP__PDU__Type__0_payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_payload_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU__Type__0
const TTCN_Typedescriptor_t IuUP__PDU__Type__0_descr_ = { "@IuUP_Types.IuUP_PDU_Type_0", NULL, &IuUP__PDU__Type__0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__0_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_pdu__type_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__1_pdu__type_xer_ = { {"pdu_type>\n", "pdu_type>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__1_pdu__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_pdu__type_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.pdu_type", &INTEGER_ber_, &IuUP__PDU__Type__1_pdu__type_raw_, &INTEGER_text_, &IuUP__PDU__Type__1_pdu__type_xer_, &INTEGER_json_, &IuUP__PDU__Type__1_pdu__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_pdu__type_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_frame__nr_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__1_frame__nr_xer_ = { {"frame_nr>\n", "frame_nr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__1_frame__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_frame__nr_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.frame_nr", &INTEGER_ber_, &IuUP__PDU__Type__1_frame__nr_raw_, &INTEGER_text_, &IuUP__PDU__Type__1_frame__nr_xer_, &INTEGER_json_, &IuUP__PDU__Type__1_frame__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_frame__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_fqc_raw_ = {2,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};
// No XER for IuUP__PDU__Type__1_fqc
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_fqc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.fqc", NULL, &IuUP__PDU__Type__1_fqc_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_fqc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_rfci_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__1_rfci_xer_ = { {"rfci>\n", "rfci>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__1_rfci_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_rfci_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.rfci", &INTEGER_ber_, &IuUP__PDU__Type__1_rfci_raw_, &INTEGER_text_, &IuUP__PDU__Type__1_rfci_xer_, &INTEGER_json_, &IuUP__PDU__Type__1_rfci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_rfci_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_header__crc_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__1_header__crc_xer_ = { {"header_crc>\n", "header_crc>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__1_header__crc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_header__crc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.header_crc", &INTEGER_ber_, &IuUP__PDU__Type__1_header__crc_raw_, &INTEGER_text_, &IuUP__PDU__Type__1_header__crc_xer_, &INTEGER_json_, &IuUP__PDU__Type__1_header__crc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_header__crc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_spare_raw_ = {2,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,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__1_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 IuUP__PDU__Type__1_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_spare_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.spare", &BITSTRING_ber_, &IuUP__PDU__Type__1_spare_raw_, NULL, &IuUP__PDU__Type__1_spare_xer_, &BITSTRING_json_, &IuUP__PDU__Type__1_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_payload_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU__Type__1_payload_xer_ = { {"payload>\n", "payload>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU__Type__1_payload_oer_ext_arr_[0] = {};
const int IuUP__PDU__Type__1_payload_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU__Type__1_payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU__Type__1_payload_oer_ext_arr_, 0, IuUP__PDU__Type__1_payload_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_payload_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1.payload", &OCTETSTRING_ber_, &IuUP__PDU__Type__1_payload_raw_, &OCTETSTRING_text_, &IuUP__PDU__Type__1_payload_xer_, &OCTETSTRING_json_, &IuUP__PDU__Type__1_payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_payload_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__1_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU__Type__1
const TTCN_Typedescriptor_t IuUP__PDU__Type__1_descr_ = { "@IuUP_Types.IuUP_PDU_Type_1", NULL, &IuUP__PDU__Type__1_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__1_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14_pdu__type_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__14_pdu__type_xer_ = { {"pdu_type>\n", "pdu_type>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__14_pdu__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__14_pdu__type_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14.pdu_type", &INTEGER_ber_, &IuUP__PDU__Type__14_pdu__type_raw_, &INTEGER_text_, &IuUP__PDU__Type__14_pdu__type_xer_, &INTEGER_json_, &IuUP__PDU__Type__14_pdu__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14_pdu__type_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14_ack__nack_raw_ = {2,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};
// No XER for IuUP__PDU__Type__14_ack__nack
const TTCN_Typedescriptor_t IuUP__PDU__Type__14_ack__nack_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14.ack_nack", NULL, &IuUP__PDU__Type__14_ack__nack_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14_ack__nack_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14_frame__nr_raw_ = {2,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__14_frame__nr_xer_ = { {"frame_nr>\n", "frame_nr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__14_frame__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__14_frame__nr_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14.frame_nr", &INTEGER_ber_, &IuUP__PDU__Type__14_frame__nr_raw_, &INTEGER_text_, &IuUP__PDU__Type__14_frame__nr_xer_, &INTEGER_json_, &IuUP__PDU__Type__14_frame__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14_frame__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__Union_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__Union
const TTCN_Typedescriptor_t IuUP__PDU14__Union_descr_ = { "@IuUP_Types.IuUP_PDU14_Union", NULL, &IuUP__PDU14__Union_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14__Common__Hdr_iuup__version_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__14__Common__Hdr_iuup__version_xer_ = { {"iuup_version>\n", "iuup_version>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__14__Common__Hdr_iuup__version_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__14__Common__Hdr_iuup__version_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.iuup_version", &INTEGER_ber_, &IuUP__PDU__Type__14__Common__Hdr_iuup__version_raw_, &INTEGER_text_, &IuUP__PDU__Type__14__Common__Hdr_iuup__version_xer_, &INTEGER_json_, &IuUP__PDU__Type__14__Common__Hdr_iuup__version_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14__Common__Hdr_iuup__version_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14__Common__Hdr_procedure__ind_raw_ = {4,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};
// No XER for IuUP__PDU__Type__14__Common__Hdr_procedure__ind
const TTCN_Typedescriptor_t IuUP__PDU__Type__14__Common__Hdr_procedure__ind_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.procedure_ind", NULL, &IuUP__PDU__Type__14__Common__Hdr_procedure__ind_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14__Common__Hdr_procedure__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14__Common__Hdr_header__crc_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__14__Common__Hdr_header__crc_xer_ = { {"header_crc>\n", "header_crc>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__14__Common__Hdr_header__crc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__14__Common__Hdr_header__crc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.header_crc", &INTEGER_ber_, &IuUP__PDU__Type__14__Common__Hdr_header__crc_raw_, &INTEGER_text_, &IuUP__PDU__Type__14__Common__Hdr_header__crc_xer_, &INTEGER_json_, &IuUP__PDU__Type__14__Common__Hdr_header__crc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14__Common__Hdr_header__crc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14__Common__Hdr_payload__crc_raw_ = {10,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU__Type__14__Common__Hdr_payload__crc_xer_ = { {"payload_crc>\n", "payload_crc>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU__Type__14__Common__Hdr_payload__crc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU__Type__14__Common__Hdr_payload__crc_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.payload_crc", &INTEGER_ber_, &IuUP__PDU__Type__14__Common__Hdr_payload__crc_raw_, &INTEGER_text_, &IuUP__PDU__Type__14__Common__Hdr_payload__crc_xer_, &INTEGER_json_, &IuUP__PDU__Type__14__Common__Hdr_payload__crc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14__Common__Hdr_payload__crc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14__Common__Hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU__Type__14__Common__Hdr
const TTCN_Typedescriptor_t IuUP__PDU__Type__14__Common__Hdr_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr", NULL, &IuUP__PDU__Type__14__Common__Hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14__Common__Hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending_hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending_hdr
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending_hdr_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending.hdr", NULL, &IuUP__PDU14__ProcSending_hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending_hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSendingUnion
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion", NULL, &IuUP__PDU14__ProcSendingUnion_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_spare_raw_ = {3,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,3,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_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 IuUP__PDU14__ProcSending__INIT_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_spare_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.spare", &BITSTRING_ber_, &IuUP__PDU14__ProcSending__INIT_spare_raw_, NULL, &IuUP__PDU14__ProcSending__INIT_spare_xer_, &BITSTRING_json_, &IuUP__PDU14__ProcSending__INIT_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_ti_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_ti_xer_ = { {"ti>\n", "ti>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU14__ProcSending__INIT_ti_oer_ext_arr_[0] = {};
const int IuUP__PDU14__ProcSending__INIT_ti_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__INIT_ti_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__ProcSending__INIT_ti_oer_ext_arr_, 0, IuUP__PDU14__ProcSending__INIT_ti_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_ti_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.ti", &BOOLEAN_ber_, &IuUP__PDU14__ProcSending__INIT_ti_raw_, &BOOLEAN_text_, &IuUP__PDU14__ProcSending__INIT_ti_xer_, &BOOLEAN_json_, &IuUP__PDU14__ProcSending__INIT_ti_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_ti_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_raw_ = {3,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_xer_ = { {"subflows_per_rfci>\n", "subflows_per_rfci>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.subflows_per_rfci", &INTEGER_ber_, &IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_raw_, &INTEGER_text_, &IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_xer_, &INTEGER_json_, &IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_chain__ind_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_chain__ind_xer_ = { {"chain_ind>\n", "chain_ind>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU14__ProcSending__INIT_chain__ind_oer_ext_arr_[0] = {};
const int IuUP__PDU14__ProcSending__INIT_chain__ind_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__INIT_chain__ind_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__ProcSending__INIT_chain__ind_oer_ext_arr_, 0, IuUP__PDU14__ProcSending__INIT_chain__ind_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_chain__ind_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.chain_ind", &BOOLEAN_ber_, &IuUP__PDU14__ProcSending__INIT_chain__ind_raw_, &BOOLEAN_text_, &IuUP__PDU14__ProcSending__INIT_chain__ind_xer_, &BOOLEAN_json_, &IuUP__PDU14__ProcSending__INIT_chain__ind_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_chain__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_lri_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__InitRfci_lri_xer_ = { {"lri>\n", "lri>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__InitRfci_lri_oer_ext_arr_[0] = {};
const int IuUP__InitRfci_lri_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__InitRfci_lri_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__InitRfci_lri_oer_ext_arr_, 0, IuUP__InitRfci_lri_oer_p_};
const TTCN_Typedescriptor_t IuUP__InitRfci_lri_descr_ = { "@IuUP_Types.IuUP_InitRfci.lri", &BOOLEAN_ber_, &IuUP__InitRfci_lri_raw_, &BOOLEAN_text_, &IuUP__InitRfci_lri_xer_, &BOOLEAN_json_, &IuUP__InitRfci_lri_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_lri_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_li_raw_ = {1,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__InitRfci_li_xer_ = { {"li>\n", "li>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__InitRfci_li_oer_ext_arr_[0] = {};
const int IuUP__InitRfci_li_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__InitRfci_li_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__InitRfci_li_oer_ext_arr_, 0, IuUP__InitRfci_li_oer_p_};
const TTCN_Typedescriptor_t IuUP__InitRfci_li_descr_ = { "@IuUP_Types.IuUP_InitRfci.li", &BOOLEAN_ber_, &IuUP__InitRfci_li_raw_, &BOOLEAN_text_, &IuUP__InitRfci_li_xer_, &BOOLEAN_json_, &IuUP__InitRfci_li_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_li_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_rfci__id_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__InitRfci_rfci__id_xer_ = { {"rfci_id>\n", "rfci_id>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__InitRfci_rfci__id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__InitRfci_rfci__id_descr_ = { "@IuUP_Types.IuUP_InitRfci.rfci_id", &INTEGER_ber_, &IuUP__InitRfci_rfci__id_raw_, &INTEGER_text_, &IuUP__InitRfci_rfci__id_xer_, &INTEGER_json_, &IuUP__InitRfci_rfci__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_rfci__id_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__InitRfci
const TTCN_Typedescriptor_t IuUP__InitRfci_descr_ = { "@IuUP_Types.IuUP_InitRfci", NULL, &IuUP__InitRfci_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t RecOfU8_raw_ = {3,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};
// No XER for RecOfU8
const TTCN_Typedescriptor_t RecOfU8_descr_ = { "@IuUP_Types.RecOfU8", NULL, &RecOfU8_raw_, NULL, NULL, NULL, NULL, NULL, &RecOfU8_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t RecOfU8_0_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       RecOfU8_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 RecOfU8_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RecOfU8_0_descr_ = { "@IuUP_Types.RecOfU8.<oftype>", &INTEGER_ber_, &RecOfU8_0_raw_, &INTEGER_text_, &RecOfU8_0_xer_, &INTEGER_json_, &RecOfU8_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecOfU8_0_default_coding("RAW");
UNIVERSAL_CHARSTRING RecOfU8_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_len8_raw_ = {3,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};
// No XER for IuUP__InitRfci_len8
const TTCN_Typedescriptor_t IuUP__InitRfci_len8_descr_ = { "@IuUP_Types.IuUP_InitRfci.len8", NULL, &IuUP__InitRfci_len8_raw_, NULL, NULL, NULL, NULL, NULL, &RecOfU8_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_len8_default_coding("RAW");
const TTCN_RAWdescriptor_t RecOfU16_raw_ = {3,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};
// No XER for RecOfU16
const TTCN_Typedescriptor_t RecOfU16_descr_ = { "@IuUP_Types.RecOfU16", NULL, &RecOfU16_raw_, NULL, NULL, NULL, NULL, NULL, &RecOfU16_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t RecOfU16_0_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       RecOfU16_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 RecOfU16_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RecOfU16_0_descr_ = { "@IuUP_Types.RecOfU16.<oftype>", &INTEGER_ber_, &RecOfU16_0_raw_, &INTEGER_text_, &RecOfU16_0_xer_, &INTEGER_json_, &RecOfU16_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecOfU16_0_default_coding("RAW");
UNIVERSAL_CHARSTRING RecOfU16_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_len16_raw_ = {3,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};
// No XER for IuUP__InitRfci_len16
const TTCN_Typedescriptor_t IuUP__InitRfci_len16_descr_ = { "@IuUP_Types.IuUP_InitRfci.len16", NULL, &IuUP__InitRfci_len16_raw_, NULL, NULL, NULL, NULL, NULL, &RecOfU16_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_len16_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfci_rfci_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__InitRfci_rfci
const TTCN_Typedescriptor_t IuUP__InitRfci_rfci_descr_ = { "@IuUP_Types.IuUP_InitRfci.rfci", NULL, &IuUP__InitRfci_rfci_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfci_rfci_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__InitRfci_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_rfci_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__INIT_rfci
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_rfci_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.rfci", NULL, &IuUP__PDU14__ProcSending__INIT_rfci_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_rfci_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_versions__supported_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,16,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_versions__supported_xer_ = { {"versions_supported>\n", "versions_supported>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__INIT_versions__supported_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_versions__supported_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.versions_supported", &BITSTRING_ber_, &IuUP__PDU14__ProcSending__INIT_versions__supported_raw_, NULL, &IuUP__PDU14__ProcSending__INIT_versions__supported_xer_, &BITSTRING_json_, &IuUP__PDU14__ProcSending__INIT_versions__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_versions__supported_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_data__pdu__type_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_data__pdu__type_xer_ = { {"data_pdu_type>\n", "data_pdu_type>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__INIT_data__pdu__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_data__pdu__type_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.data_pdu_type", &INTEGER_ber_, &IuUP__PDU14__ProcSending__INIT_data__pdu__type_raw_, &INTEGER_text_, &IuUP__PDU14__ProcSending__INIT_data__pdu__type_xer_, &INTEGER_json_, &IuUP__PDU14__ProcSending__INIT_data__pdu__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_data__pdu__type_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_spare2_raw_ = {4,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,4,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__INIT_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 IuUP__PDU14__ProcSending__INIT_spare2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_spare2_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.spare2", &BITSTRING_ber_, &IuUP__PDU14__ProcSending__INIT_spare2_raw_, NULL, &IuUP__PDU14__ProcSending__INIT_spare2_xer_, &BITSTRING_json_, &IuUP__PDU14__ProcSending__INIT_spare2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_spare2_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__INIT
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT", NULL, &IuUP__PDU14__ProcSending__INIT_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__IPTI__List_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,8,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__IPTI__List
const TTCN_Typedescriptor_t IuUP__IPTI__List_descr_ = { "@IuUP_Types.IuUP_IPTI_List", NULL, &IuUP__IPTI__List_raw_, NULL, NULL, NULL, NULL, NULL, &IuUP__IPTI__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__IPTI__List_0_raw_ = {4,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__IPTI__List_0_xer_ = { {"IuUP_IPTI>\n", "IuUP_IPTI>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__IPTI__List_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__IPTI__List_0_descr_ = { "@IuUP_Types.IuUP_IPTI_List.<oftype>", &INTEGER_ber_, &IuUP__IPTI__List_0_raw_, &INTEGER_text_, &IuUP__IPTI__List_0_xer_, &INTEGER_json_, &IuUP__IPTI__List_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__IPTI__List_0_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__IPTI__List_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__INIT_IPTIs_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,8,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__INIT_IPTIs
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__INIT_IPTIs_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_INIT.IPTIs", NULL, &IuUP__PDU14__ProcSending__INIT_IPTIs_raw_, NULL, NULL, NULL, NULL, NULL, &IuUP__IPTI__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_IPTIs_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__INIT_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_init_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSendingUnion_init
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_init_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion.init", NULL, &IuUP__PDU14__ProcSendingUnion_init_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_init_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_spare_raw_ = {2,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,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__RATE__CTRL_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 IuUP__PDU14__ProcSending__RATE__CTRL_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_spare_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.spare", &BITSTRING_ber_, &IuUP__PDU14__ProcSending__RATE__CTRL_spare_raw_, NULL, &IuUP__PDU14__ProcSending__RATE__CTRL_spare_xer_, &BITSTRING_json_, &IuUP__PDU14__ProcSending__RATE__CTRL_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__RATE__CTRL_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_raw_ = {6,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,1,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_xer_ = { {"nr_of_rfci_ind>\n", "nr_of_rfci_ind>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.nr_of_rfci_ind", &INTEGER_ber_, &IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_raw_, &INTEGER_text_, &IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_xer_, &INTEGER_json_, &IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_xer_ = { {"rfci_ind>\n", "rfci_ind>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.rfci_ind", &BITSTRING_ber_, &IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_raw_, NULL, &IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_xer_, &BITSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__RATE__CTRL
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__RATE__CTRL_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL", NULL, &IuUP__PDU14__ProcSending__RATE__CTRL_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__RATE__CTRL_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_rate__ctrl_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSendingUnion_rate__ctrl
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion.rate_ctrl", NULL, &IuUP__PDU14__ProcSendingUnion_rate__ctrl_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_rate__ctrl_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_xer_ = { {"time_alignment>\n", "time_alignment>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.time_alignment", &INTEGER_ber_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_raw_, &INTEGER_text_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_xer_, &INTEGER_json_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__TIME__ALIGNMENT
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT", NULL, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_xer_ = { {"spare>\n", "spare>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_ext_arr_[0] = {};
const int IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_ext_arr_, 0, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.spare", &OCTETSTRING_ber_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_raw_, &OCTETSTRING_text_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_xer_, &OCTETSTRING_json_, &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__TIME__ALIGNMENT_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_time__alignment_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSendingUnion_time__alignment
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_time__alignment_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion.time_alignment", NULL, &IuUP__PDU14__ProcSendingUnion_time__alignment_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_time__alignment_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_distance_raw_ = {2,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};
// No XER for IuUP__PDU14__ProcSending__ERROR__EVENT_distance
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_distance_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.distance", NULL, &IuUP__PDU14__ProcSending__ERROR__EVENT_distance_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__ERROR__EVENT_distance_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_cause_raw_ = {6,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};
// No XER for IuUP__PDU14__ProcSending__ERROR__EVENT_cause
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_cause_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.cause", NULL, &IuUP__PDU14__ProcSending__ERROR__EVENT_cause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__ERROR__EVENT_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending__ERROR__EVENT
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending__ERROR__EVENT_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT", NULL, &IuUP__PDU14__ProcSending__ERROR__EVENT_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending__ERROR__EVENT_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_error__event_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSendingUnion_error__event
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_error__event_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion.error_event", NULL, &IuUP__PDU14__ProcSendingUnion_error__event_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_error__event_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSendingUnion_other_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion_other_oer_ext_arr_[0] = {};
const int IuUP__PDU14__ProcSendingUnion_other_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__ProcSendingUnion_other_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__ProcSendingUnion_other_oer_ext_arr_, 0, IuUP__PDU14__ProcSendingUnion_other_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSendingUnion_other_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSendingUnion.other", &OCTETSTRING_ber_, &IuUP__PDU14__ProcSendingUnion_other_raw_, &OCTETSTRING_text_, &IuUP__PDU14__ProcSendingUnion_other_xer_, &OCTETSTRING_json_, &IuUP__PDU14__ProcSendingUnion_other_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_other_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSendingUnion_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending_u_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending_u
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending_u_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending.u", NULL, &IuUP__PDU14__ProcSending_u_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending_u_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ProcSending_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ProcSending
const TTCN_Typedescriptor_t IuUP__PDU14__ProcSending_descr_ = { "@IuUP_Types.IuUP_PDU14_ProcSending", NULL, &IuUP__PDU14__ProcSending_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ProcSending_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__Union_proc_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__Union_proc
const TTCN_Typedescriptor_t IuUP__PDU14__Union_proc_descr_ = { "@IuUP_Types.IuUP_PDU14_Union.proc", NULL, &IuUP__PDU14__Union_proc_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__Union_proc_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ACK_hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ACK_hdr
const TTCN_Typedescriptor_t IuUP__PDU14__ACK_hdr_descr_ = { "@IuUP_Types.IuUP_PDU14_ACK.hdr", NULL, &IuUP__PDU14__ACK_hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ACK_hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__ACK_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__ACK
const TTCN_Typedescriptor_t IuUP__PDU14__ACK_descr_ = { "@IuUP_Types.IuUP_PDU14_ACK", NULL, &IuUP__PDU14__ACK_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU14__ACK_spare__ext_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU14__ACK_spare__ext_xer_ = { {"spare_ext>\n", "spare_ext>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU14__ACK_spare__ext_oer_ext_arr_[0] = {};
const int IuUP__PDU14__ACK_spare__ext_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__ACK_spare__ext_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__ACK_spare__ext_oer_ext_arr_, 0, IuUP__PDU14__ACK_spare__ext_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__ACK_spare__ext_descr_ = { "@IuUP_Types.IuUP_PDU14_ACK.spare_ext", &OCTETSTRING_ber_, &IuUP__PDU14__ACK_spare__ext_raw_, &OCTETSTRING_text_, &IuUP__PDU14__ACK_spare__ext_xer_, &OCTETSTRING_json_, &IuUP__PDU14__ACK_spare__ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__ACK_spare__ext_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__ACK_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__Union_ack_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__Union_ack
const TTCN_Typedescriptor_t IuUP__PDU14__Union_ack_descr_ = { "@IuUP_Types.IuUP_PDU14_Union.ack", NULL, &IuUP__PDU14__Union_ack_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__Union_ack_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__NACK_hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__NACK_hdr
const TTCN_Typedescriptor_t IuUP__PDU14__NACK_hdr_descr_ = { "@IuUP_Types.IuUP_PDU14_NACK.hdr", NULL, &IuUP__PDU14__NACK_hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__NACK_hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__NACK_err__cause_raw_ = {6,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};
// No XER for IuUP__PDU14__NACK_err__cause
const TTCN_Typedescriptor_t IuUP__PDU14__NACK_err__cause_descr_ = { "@IuUP_Types.IuUP_PDU14_NACK.err_cause", NULL, &IuUP__PDU14__NACK_err__cause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__NACK_err__cause_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__NACK_spare_raw_ = {2,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,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       IuUP__PDU14__NACK_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 IuUP__PDU14__NACK_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t IuUP__PDU14__NACK_spare_descr_ = { "@IuUP_Types.IuUP_PDU14_NACK.spare", &BITSTRING_ber_, &IuUP__PDU14__NACK_spare_raw_, NULL, &IuUP__PDU14__NACK_spare_xer_, &BITSTRING_json_, &IuUP__PDU14__NACK_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__NACK_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__NACK_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__NACK
const TTCN_Typedescriptor_t IuUP__PDU14__NACK_descr_ = { "@IuUP_Types.IuUP_PDU14_NACK", NULL, &IuUP__PDU14__NACK_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU14__NACK_spare__ext_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,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       IuUP__PDU14__NACK_spare__ext_xer_ = { {"spare_ext>\n", "spare_ext>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int IuUP__PDU14__NACK_spare__ext_oer_ext_arr_[0] = {};
const int IuUP__PDU14__NACK_spare__ext_oer_p_[0] = {};
const TTCN_OERdescriptor_t IuUP__PDU14__NACK_spare__ext_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IuUP__PDU14__NACK_spare__ext_oer_ext_arr_, 0, IuUP__PDU14__NACK_spare__ext_oer_p_};
const TTCN_Typedescriptor_t IuUP__PDU14__NACK_spare__ext_descr_ = { "@IuUP_Types.IuUP_PDU14_NACK.spare_ext", &OCTETSTRING_ber_, &IuUP__PDU14__NACK_spare__ext_raw_, &OCTETSTRING_text_, &IuUP__PDU14__NACK_spare__ext_xer_, &OCTETSTRING_json_, &IuUP__PDU14__NACK_spare__ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__NACK_spare__ext_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__NACK_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU14__Union_nack_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU14__Union_nack
const TTCN_Typedescriptor_t IuUP__PDU14__Union_nack_descr_ = { "@IuUP_Types.IuUP_PDU14_Union.nack", NULL, &IuUP__PDU14__Union_nack_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU14__Union_nack_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU14__Union_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14_u_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU__Type__14_u
const TTCN_Typedescriptor_t IuUP__PDU__Type__14_u_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14.u", NULL, &IuUP__PDU__Type__14_u_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14_u_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU__Type__14_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU__Type__14
const TTCN_Typedescriptor_t IuUP__PDU__Type__14_descr_ = { "@IuUP_Types.IuUP_PDU_Type_14", NULL, &IuUP__PDU__Type__14_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU__Type__14_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__InitRfciList_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__InitRfciList
const TTCN_Typedescriptor_t IuUP__InitRfciList_descr_ = { "@IuUP_Types.IuUP_InitRfciList", NULL, &IuUP__InitRfciList_raw_, NULL, NULL, NULL, NULL, NULL, &IuUP__InitRfciList_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__InitRfciList_0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__InitRfciList_0
const TTCN_Typedescriptor_t IuUP__InitRfciList_0_descr_ = { "@IuUP_Types.IuUP_InitRfciList.<oftype>", NULL, &IuUP__InitRfciList_0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__InitRfciList_0_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__InitRfciList_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU
const TTCN_Typedescriptor_t IuUP__PDU_descr_ = { "@IuUP_Types.IuUP_PDU", NULL, &IuUP__PDU_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t IuUP__PDU_type__0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU_type__0
const TTCN_Typedescriptor_t IuUP__PDU_type__0_descr_ = { "@IuUP_Types.IuUP_PDU.type_0", NULL, &IuUP__PDU_type__0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU_type__0_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU_type__1_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU_type__1
const TTCN_Typedescriptor_t IuUP__PDU_type__1_descr_ = { "@IuUP_Types.IuUP_PDU.type_1", NULL, &IuUP__PDU_type__1_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU_type__1_default_coding("RAW");
const TTCN_RAWdescriptor_t IuUP__PDU_type__14_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for IuUP__PDU_type__14
const TTCN_Typedescriptor_t IuUP__PDU_type__14_descr_ = { "@IuUP_Types.IuUP_PDU.type_14", NULL, &IuUP__PDU_type__14_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING IuUP__PDU_type__14_default_coding("RAW");
UNIVERSAL_CHARSTRING IuUP__PDU_default_coding("RAW");
INTEGER_template template_tr__IuUP__INIT__ACK_frame__nr_defval;
const INTEGER_template& tr__IuUP__INIT__ACK_frame__nr_defval = template_tr__IuUP__INIT__ACK_frame__nr_defval;
INTEGER_template template_tr__IuUP__INIT__ACK_version_defval;
const INTEGER_template& tr__IuUP__INIT__ACK_version_defval = template_tr__IuUP__INIT__ACK_version_defval;
IuUP__InitRfci_template template_ts__IuUP__InitRfci_rfci_defval;
const IuUP__InitRfci_template& ts__IuUP__InitRfci_rfci_defval = template_ts__IuUP__InitRfci_rfci_defval;
BOOLEAN_template template_ts__IuUP__PDU14__ProcSending__INIT_ti_defval;
const BOOLEAN_template& ts__IuUP__PDU14__ProcSending__INIT_ti_defval = template_ts__IuUP__PDU14__ProcSending__INIT_ti_defval;
INTEGER_template template_ts__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval;
const INTEGER_template& ts__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval = template_ts__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval;
BOOLEAN_template template_ts__IuUP__PDU14__ProcSending__INIT_chain__ind_defval;
const BOOLEAN_template& ts__IuUP__PDU14__ProcSending__INIT_chain__ind_defval = template_ts__IuUP__PDU14__ProcSending__INIT_chain__ind_defval;
IuUP__InitRfci_template template_ts__IuUP__PDU14__ProcSending__INIT_rfci_defval;
const IuUP__InitRfci_template& ts__IuUP__PDU14__ProcSending__INIT_rfci_defval = template_ts__IuUP__PDU14__ProcSending__INIT_rfci_defval;
IuUP__IPTI__List_template template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval;
const IuUP__IPTI__List_template& ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval = template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval;
BITSTRING_template template_ts__IuUP__PDU14__ProcSending__INIT_versions__supported_defval;
const BITSTRING_template& ts__IuUP__PDU14__ProcSending__INIT_versions__supported_defval = template_ts__IuUP__PDU14__ProcSending__INIT_versions__supported_defval;
INTEGER_template template_ts__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval;
const INTEGER_template& ts__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval = template_ts__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval;
BOOLEAN_template template_tr__IuUP__PDU14__ProcSending__INIT_ti_defval;
const BOOLEAN_template& tr__IuUP__PDU14__ProcSending__INIT_ti_defval = template_tr__IuUP__PDU14__ProcSending__INIT_ti_defval;
INTEGER_template template_tr__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval;
const INTEGER_template& tr__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval = template_tr__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval;
BOOLEAN_template template_tr__IuUP__PDU14__ProcSending__INIT_chain__ind_defval;
const BOOLEAN_template& tr__IuUP__PDU14__ProcSending__INIT_chain__ind_defval = template_tr__IuUP__PDU14__ProcSending__INIT_chain__ind_defval;
IuUP__InitRfci_template template_tr__IuUP__PDU14__ProcSending__INIT_rfci_defval;
const IuUP__InitRfci_template& tr__IuUP__PDU14__ProcSending__INIT_rfci_defval = template_tr__IuUP__PDU14__ProcSending__INIT_rfci_defval;
IuUP__IPTI__List_template template_tr__IuUP__PDU14__ProcSending__INIT_IPTIs_defval;
const IuUP__IPTI__List_template& tr__IuUP__PDU14__ProcSending__INIT_IPTIs_defval = template_tr__IuUP__PDU14__ProcSending__INIT_IPTIs_defval;
BITSTRING_template template_tr__IuUP__PDU14__ProcSending__INIT_versions__supported_defval;
const BITSTRING_template& tr__IuUP__PDU14__ProcSending__INIT_versions__supported_defval = template_tr__IuUP__PDU14__ProcSending__INIT_versions__supported_defval;
INTEGER_template template_tr__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval;
const INTEGER_template& tr__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval = template_tr__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval;
INTEGER const_ts__IuUP__INIT_frame__nr_defval;
const INTEGER& ts__IuUP__INIT_frame__nr_defval = const_ts__IuUP__INIT_frame__nr_defval;
INTEGER const_ts__IuUP__INIT_version_defval;
const INTEGER& ts__IuUP__INIT_version_defval = const_ts__IuUP__INIT_version_defval;
IuUP__PDU14__ProcSending__INIT_template template_tr__IuUP__INIT_init_defval;
const IuUP__PDU14__ProcSending__INIT_template& tr__IuUP__INIT_init_defval = template_tr__IuUP__INIT_init_defval;
OCTETSTRING_template template_tr__IuUP__INIT_payload_defval;
const OCTETSTRING_template& tr__IuUP__INIT_payload_defval = template_tr__IuUP__INIT_payload_defval;
INTEGER_template template_tr__IuUP__INIT_frame__nr_defval;
const INTEGER_template& tr__IuUP__INIT_frame__nr_defval = template_tr__IuUP__INIT_frame__nr_defval;
INTEGER_template template_tr__IuUP__INIT_version_defval;
const INTEGER_template& tr__IuUP__INIT_version_defval = template_tr__IuUP__INIT_version_defval;
IuUP__FQC const_ts__IuUP__Type0_fqc_defval;
const IuUP__FQC& ts__IuUP__Type0_fqc_defval = const_ts__IuUP__Type0_fqc_defval;
INTEGER_template template_tr__IuUP__Type0_frame__nr_defval;
const INTEGER_template& tr__IuUP__Type0_frame__nr_defval = template_tr__IuUP__Type0_frame__nr_defval;
INTEGER_template template_tr__IuUP__Type0_rfci_defval;
const INTEGER_template& tr__IuUP__Type0_rfci_defval = template_tr__IuUP__Type0_rfci_defval;
IuUP__FQC_template template_tr__IuUP__Type0_fqc_defval;
const IuUP__FQC_template& tr__IuUP__Type0_fqc_defval = template_tr__IuUP__Type0_fqc_defval;
IuUP__FQC const_ts__IuUP__Type1_fqc_defval;
const IuUP__FQC& ts__IuUP__Type1_fqc_defval = const_ts__IuUP__Type1_fqc_defval;
INTEGER_template template_tr__IuUP__Type1_frame__nr_defval;
const INTEGER_template& tr__IuUP__Type1_frame__nr_defval = template_tr__IuUP__Type1_frame__nr_defval;
INTEGER_template template_tr__IuUP__Type1_rfci_defval;
const INTEGER_template& tr__IuUP__Type1_rfci_defval = template_tr__IuUP__Type1_rfci_defval;
IuUP__FQC_template template_tr__IuUP__Type1_fqc_defval;
const IuUP__FQC_template& tr__IuUP__Type1_fqc_defval = template_tr__IuUP__Type1_fqc_defval;
TTCN_Module module_object("IuUP_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

const RuntimeVersionChecker ver_checker(  current_runtime_version.requires_major_version_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 */

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__AckNack::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 @IuUP_Types.IuUP_AckNack.");
return enum_value < other_value;
}

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

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

boolean IuUP__AckNack::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 @IuUP_Types.IuUP_AckNack.");
return enum_value > other_value;
}

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

const char *IuUP__AckNack::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case IuUP__ACKNACK__CTRL: return "IuUP_ACKNACK_CTRL";
case IuUP__ACKNACK__ACK: return "IuUP_ACKNACK_ACK";
case IuUP__ACKNACK__NACK: return "IuUP_ACKNACK_NACK";
case IuUP__ACKNACK__RESERVED: return "IuUP_ACKNACK_RESERVED";
default:
return "<unknown>";
}
}

IuUP__AckNack::enum_type IuUP__AckNack::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, "IuUP_ACKNACK_CTRL")) return IuUP__ACKNACK__CTRL;
if (!strcmp(str_par, "IuUP_ACKNACK_ACK")) return IuUP__ACKNACK__ACK;
if (!strcmp(str_par, "IuUP_ACKNACK_NACK")) return IuUP__ACKNACK__NACK;
if (!strcmp(str_par, "IuUP_ACKNACK_RESERVED")) return IuUP__ACKNACK__RESERVED;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void IuUP__AckNack::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 IuUP__AckNack::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", "@IuUP_Types.IuUP_AckNack");
  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 @IuUP_Types.IuUP_AckNack.");
  }
}

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

void IuUP__AckNack::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 @IuUP_Types.IuUP_AckNack.", enum_value);
}

void IuUP__AckNack::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 IuUP__AckNack::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 IuUP__AckNack::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 IuUP__AckNack::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 IuUP__AckNack_template::copy_template(const IuUP__AckNack_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 IuUP__AckNack_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 IuUP__AckNack_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__AckNack_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 @IuUP_Types.IuUP_AckNack.");
}
}

IuUP__AckNack_template::IuUP__AckNack_template()
{
}

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

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

IuUP__AckNack_template::IuUP__AckNack_template(IuUP__AckNack::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__AckNack_template::match(IuUP__AckNack::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 @IuUP_Types.IuUP_AckNack.");
}
return FALSE;
}

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

IuUP__AckNack::enum_type IuUP__AckNack_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 @IuUP_Types.IuUP_AckNack.");
return single_value;
}

void IuUP__AckNack_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 IuUP__AckNack_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @IuUP_Types.IuUP_AckNack.");
}
}

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

void IuUP__AckNack_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(IuUP__AckNack::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 IuUP__AckNack_template::log_match(const IuUP__AckNack& 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 IuUP__AckNack_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 @IuUP_Types.IuUP_AckNack.");
}
}

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

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

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

void IuUP__AckNack_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 : "@IuUP_Types.IuUP_AckNack");
}

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__FQC::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 @IuUP_Types.IuUP_FQC.");
return enum_value < other_value;
}

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

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

boolean IuUP__FQC::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 @IuUP_Types.IuUP_FQC.");
return enum_value > other_value;
}

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

const char *IuUP__FQC::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case IuUP__FQC__GOOD: return "IuUP_FQC_GOOD";
case IuUP__FQC__BAD: return "IuUP_FQC_BAD";
case IuUP__FQC__BAD__RADIO: return "IuUP_FQC_BAD_RADIO";
case IuUP__FQC__SPARE: return "IuUP_FQC_SPARE";
default:
return "<unknown>";
}
}

IuUP__FQC::enum_type IuUP__FQC::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, "IuUP_FQC_GOOD")) return IuUP__FQC__GOOD;
if (!strcmp(str_par, "IuUP_FQC_BAD")) return IuUP__FQC__BAD;
if (!strcmp(str_par, "IuUP_FQC_BAD_RADIO")) return IuUP__FQC__BAD__RADIO;
if (!strcmp(str_par, "IuUP_FQC_SPARE")) return IuUP__FQC__SPARE;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void IuUP__FQC::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 IuUP__FQC::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", "@IuUP_Types.IuUP_FQC");
  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 @IuUP_Types.IuUP_FQC.");
  }
}

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

void IuUP__FQC::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 @IuUP_Types.IuUP_FQC.", enum_value);
}

void IuUP__FQC::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 IuUP__FQC::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 IuUP__FQC::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 IuUP__FQC::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 IuUP__FQC_template::copy_template(const IuUP__FQC_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 IuUP__FQC_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 IuUP__FQC_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__FQC_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 @IuUP_Types.IuUP_FQC.");
}
}

IuUP__FQC_template::IuUP__FQC_template()
{
}

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

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

IuUP__FQC_template::IuUP__FQC_template(IuUP__FQC::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__FQC_template::match(IuUP__FQC::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 @IuUP_Types.IuUP_FQC.");
}
return FALSE;
}

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

IuUP__FQC::enum_type IuUP__FQC_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 @IuUP_Types.IuUP_FQC.");
return single_value;
}

void IuUP__FQC_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 IuUP__FQC_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @IuUP_Types.IuUP_FQC.");
}
}

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

void IuUP__FQC_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(IuUP__FQC::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 IuUP__FQC_template::log_match(const IuUP__FQC& 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 IuUP__FQC_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 @IuUP_Types.IuUP_FQC.");
}
}

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

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

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

void IuUP__FQC_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 : "@IuUP_Types.IuUP_FQC");
}

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ProcedureIndicator::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 @IuUP_Types.IuUP_ProcedureIndicator.");
return enum_value < other_value;
}

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

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

boolean IuUP__ProcedureIndicator::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 @IuUP_Types.IuUP_ProcedureIndicator.");
return enum_value > other_value;
}

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

const char *IuUP__ProcedureIndicator::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case IuUP__PRI__INITIALIZATION: return "IuUP_PRI_INITIALIZATION";
case IuUP__PRI__RATE__CONTROL: return "IuUP_PRI_RATE_CONTROL";
case IuUP__PRI__TIME__ALIGNMENT: return "IuUP_PRI_TIME_ALIGNMENT";
case IuUP__PRI__ERROR__EVENT: return "IuUP_PRI_ERROR_EVENT";
default:
return "<unknown>";
}
}

IuUP__ProcedureIndicator::enum_type IuUP__ProcedureIndicator::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, "IuUP_PRI_INITIALIZATION")) return IuUP__PRI__INITIALIZATION;
if (!strcmp(str_par, "IuUP_PRI_RATE_CONTROL")) return IuUP__PRI__RATE__CONTROL;
if (!strcmp(str_par, "IuUP_PRI_TIME_ALIGNMENT")) return IuUP__PRI__TIME__ALIGNMENT;
if (!strcmp(str_par, "IuUP_PRI_ERROR_EVENT")) return IuUP__PRI__ERROR__EVENT;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator::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", "@IuUP_Types.IuUP_ProcedureIndicator");
  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 @IuUP_Types.IuUP_ProcedureIndicator.");
  }
}

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

void IuUP__ProcedureIndicator::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 @IuUP_Types.IuUP_ProcedureIndicator.", enum_value);
}

void IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator_template::copy_template(const IuUP__ProcedureIndicator_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 IuUP__ProcedureIndicator_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 IuUP__ProcedureIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__ProcedureIndicator_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 @IuUP_Types.IuUP_ProcedureIndicator.");
}
}

IuUP__ProcedureIndicator_template::IuUP__ProcedureIndicator_template()
{
}

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

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

IuUP__ProcedureIndicator_template::IuUP__ProcedureIndicator_template(IuUP__ProcedureIndicator::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ProcedureIndicator_template::match(IuUP__ProcedureIndicator::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 @IuUP_Types.IuUP_ProcedureIndicator.");
}
return FALSE;
}

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

IuUP__ProcedureIndicator::enum_type IuUP__ProcedureIndicator_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 @IuUP_Types.IuUP_ProcedureIndicator.");
return single_value;
}

void IuUP__ProcedureIndicator_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 IuUP__ProcedureIndicator_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @IuUP_Types.IuUP_ProcedureIndicator.");
}
}

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

void IuUP__ProcedureIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(IuUP__ProcedureIndicator::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 IuUP__ProcedureIndicator_template::log_match(const IuUP__ProcedureIndicator& 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 IuUP__ProcedureIndicator_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 @IuUP_Types.IuUP_ProcedureIndicator.");
}
}

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

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

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

void IuUP__ProcedureIndicator_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 : "@IuUP_Types.IuUP_ProcedureIndicator");
}

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ErrorDistance::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 @IuUP_Types.IuUP_ErrorDistance.");
return enum_value < other_value;
}

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

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

boolean IuUP__ErrorDistance::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 @IuUP_Types.IuUP_ErrorDistance.");
return enum_value > other_value;
}

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

const char *IuUP__ErrorDistance::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case IuUP__ERR__DIST__LOCAL: return "IuUP_ERR_DIST_LOCAL";
case IuUP__ERR__DIST__FIRST__FW: return "IuUP_ERR_DIST_FIRST_FW";
case IuUP__ERR__DIST__SECOND__FW: return "IuUP_ERR_DIST_SECOND_FW";
case IuUP__ERR__DIST__RESERVED: return "IuUP_ERR_DIST_RESERVED";
default:
return "<unknown>";
}
}

IuUP__ErrorDistance::enum_type IuUP__ErrorDistance::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, "IuUP_ERR_DIST_LOCAL")) return IuUP__ERR__DIST__LOCAL;
if (!strcmp(str_par, "IuUP_ERR_DIST_FIRST_FW")) return IuUP__ERR__DIST__FIRST__FW;
if (!strcmp(str_par, "IuUP_ERR_DIST_SECOND_FW")) return IuUP__ERR__DIST__SECOND__FW;
if (!strcmp(str_par, "IuUP_ERR_DIST_RESERVED")) return IuUP__ERR__DIST__RESERVED;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void IuUP__ErrorDistance::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 IuUP__ErrorDistance::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", "@IuUP_Types.IuUP_ErrorDistance");
  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 @IuUP_Types.IuUP_ErrorDistance.");
  }
}

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

void IuUP__ErrorDistance::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 @IuUP_Types.IuUP_ErrorDistance.", enum_value);
}

void IuUP__ErrorDistance::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 IuUP__ErrorDistance::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 IuUP__ErrorDistance::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 IuUP__ErrorDistance::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 IuUP__ErrorDistance_template::copy_template(const IuUP__ErrorDistance_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 IuUP__ErrorDistance_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 IuUP__ErrorDistance_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__ErrorDistance_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 @IuUP_Types.IuUP_ErrorDistance.");
}
}

IuUP__ErrorDistance_template::IuUP__ErrorDistance_template()
{
}

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

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

IuUP__ErrorDistance_template::IuUP__ErrorDistance_template(IuUP__ErrorDistance::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ErrorDistance_template::match(IuUP__ErrorDistance::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 @IuUP_Types.IuUP_ErrorDistance.");
}
return FALSE;
}

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

IuUP__ErrorDistance::enum_type IuUP__ErrorDistance_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 @IuUP_Types.IuUP_ErrorDistance.");
return single_value;
}

void IuUP__ErrorDistance_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 IuUP__ErrorDistance_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @IuUP_Types.IuUP_ErrorDistance.");
}
}

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

void IuUP__ErrorDistance_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(IuUP__ErrorDistance::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 IuUP__ErrorDistance_template::log_match(const IuUP__ErrorDistance& 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 IuUP__ErrorDistance_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 @IuUP_Types.IuUP_ErrorDistance.");
}
}

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

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

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

void IuUP__ErrorDistance_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 : "@IuUP_Types.IuUP_ErrorDistance");
}

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ErrorCause::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 @IuUP_Types.IuUP_ErrorCause.");
return enum_value < other_value;
}

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

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

boolean IuUP__ErrorCause::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 @IuUP_Types.IuUP_ErrorCause.");
return enum_value > other_value;
}

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

const char *IuUP__ErrorCause::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case IuUP__CAUSE__CRC__ERROR__HEADER: return "IuUP_CAUSE_CRC_ERROR_HEADER";
case IuUP__CAUSE__CRC__ERROR__PAYLOAD: return "IuUP_CAUSE_CRC_ERROR_PAYLOAD";
case IuUP__CAUSE__UNEXP__FRAME__NR: return "IuUP_CAUSE_UNEXP_FRAME_NR";
case IuUP__CAUSE__FRAME__LOSS: return "IuUP_CAUSE_FRAME_LOSS";
case IuUP__CAUSE__PDU__TYPE__UNKNOWN: return "IuUP_CAUSE_PDU_TYPE_UNKNOWN";
case IuUP__CAUSE__UNKNOWN__PROCEDURE: return "IuUP_CAUSE_UNKNOWN_PROCEDURE";
case IuUP__CAUSE__UNKNOWN__RES__VAL: return "IuUP_CAUSE_UNKNOWN_RES_VAL";
case IuUP__CAUSE__UNKNOWN__FIELD: return "IuUP_CAUSE_UNKNOWN_FIELD";
case IuUP__CAUSE__FRAME__TOO__SHORT: return "IuUP_CAUSE_FRAME_TOO_SHORT";
case IuUP__CAUSE__MISSING__FIELD: return "IuUP_CAUSE_MISSING_FIELD";
case IuUP__CAUSE__UNEXPECTED__PDU__TYPE: return "IuUP_CAUSE_UNEXPECTED_PDU_TYPE";
case IuUP__CAUSE__UNEXPECTED__PROCEDURE: return "IuUP_CAUSE_UNEXPECTED_PROCEDURE";
case IuUP__CAUSE__UNEXPECTED__RFCI: return "IuUP_CAUSE_UNEXPECTED_RFCI";
case IuUP__CAUSE__UNEXPECTED__VALUE: return "IuUP_CAUSE_UNEXPECTED_VALUE";
case IuUP__CAUSE__INIT__FAIL: return "IuUP_CAUSE_INIT_FAIL";
case IuUP__CAUSE__INIT__FAIL__NET__TMR__EXP: return "IuUP_CAUSE_INIT_FAIL_NET_TMR_EXP";
case IuUP__CAUSE__INIT__FAIL__FERR__REP__NACK: return "IuUP_CAUSE_INIT_FAIL_FERR_REP_NACK";
case IuUP__CAUSE__RATE__CONTROL__FAIL: return "IuUP_CAUSE_RATE_CONTROL_FAIL";
case IuUP__CAUSE__ERROR__EVENT__FAIL: return "IuUP_CAUSE_ERROR_EVENT_FAIL";
case IuUP__CAUSE__TIME__ALIGN__NOTSUPP: return "IuUP_CAUSE_TIME_ALIGN_NOTSUPP";
case IuUP__CAUSE__REQ__ALIGN__NOTPOSS: return "IuUP_CAUSE_REQ_ALIGN_NOTPOSS";
case IuUP__CAUSE__IU__UP__VERS__NOTSUPP: return "IuUP_CAUSE_IU_UP_VERS_NOTSUPP";
default:
return "<unknown>";
}
}

IuUP__ErrorCause::enum_type IuUP__ErrorCause::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, "IuUP_CAUSE_CRC_ERROR_HEADER")) return IuUP__CAUSE__CRC__ERROR__HEADER;
if (!strcmp(str_par, "IuUP_CAUSE_CRC_ERROR_PAYLOAD")) return IuUP__CAUSE__CRC__ERROR__PAYLOAD;
if (!strcmp(str_par, "IuUP_CAUSE_UNEXP_FRAME_NR")) return IuUP__CAUSE__UNEXP__FRAME__NR;
if (!strcmp(str_par, "IuUP_CAUSE_FRAME_LOSS")) return IuUP__CAUSE__FRAME__LOSS;
if (!strcmp(str_par, "IuUP_CAUSE_PDU_TYPE_UNKNOWN")) return IuUP__CAUSE__PDU__TYPE__UNKNOWN;
if (!strcmp(str_par, "IuUP_CAUSE_UNKNOWN_PROCEDURE")) return IuUP__CAUSE__UNKNOWN__PROCEDURE;
if (!strcmp(str_par, "IuUP_CAUSE_UNKNOWN_RES_VAL")) return IuUP__CAUSE__UNKNOWN__RES__VAL;
if (!strcmp(str_par, "IuUP_CAUSE_UNKNOWN_FIELD")) return IuUP__CAUSE__UNKNOWN__FIELD;
if (!strcmp(str_par, "IuUP_CAUSE_FRAME_TOO_SHORT")) return IuUP__CAUSE__FRAME__TOO__SHORT;
if (!strcmp(str_par, "IuUP_CAUSE_MISSING_FIELD")) return IuUP__CAUSE__MISSING__FIELD;
if (!strcmp(str_par, "IuUP_CAUSE_UNEXPECTED_PDU_TYPE")) return IuUP__CAUSE__UNEXPECTED__PDU__TYPE;
if (!strcmp(str_par, "IuUP_CAUSE_UNEXPECTED_PROCEDURE")) return IuUP__CAUSE__UNEXPECTED__PROCEDURE;
if (!strcmp(str_par, "IuUP_CAUSE_UNEXPECTED_RFCI")) return IuUP__CAUSE__UNEXPECTED__RFCI;
if (!strcmp(str_par, "IuUP_CAUSE_UNEXPECTED_VALUE")) return IuUP__CAUSE__UNEXPECTED__VALUE;
if (!strcmp(str_par, "IuUP_CAUSE_INIT_FAIL")) return IuUP__CAUSE__INIT__FAIL;
if (!strcmp(str_par, "IuUP_CAUSE_INIT_FAIL_NET_TMR_EXP")) return IuUP__CAUSE__INIT__FAIL__NET__TMR__EXP;
if (!strcmp(str_par, "IuUP_CAUSE_INIT_FAIL_FERR_REP_NACK")) return IuUP__CAUSE__INIT__FAIL__FERR__REP__NACK;
if (!strcmp(str_par, "IuUP_CAUSE_RATE_CONTROL_FAIL")) return IuUP__CAUSE__RATE__CONTROL__FAIL;
if (!strcmp(str_par, "IuUP_CAUSE_ERROR_EVENT_FAIL")) return IuUP__CAUSE__ERROR__EVENT__FAIL;
if (!strcmp(str_par, "IuUP_CAUSE_TIME_ALIGN_NOTSUPP")) return IuUP__CAUSE__TIME__ALIGN__NOTSUPP;
if (!strcmp(str_par, "IuUP_CAUSE_REQ_ALIGN_NOTPOSS")) return IuUP__CAUSE__REQ__ALIGN__NOTPOSS;
if (!strcmp(str_par, "IuUP_CAUSE_IU_UP_VERS_NOTSUPP")) return IuUP__CAUSE__IU__UP__VERS__NOTSUPP;
}
return UNKNOWN_VALUE;
}

boolean IuUP__ErrorCause::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 16:
case 18:
case 19:
case 20:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

void IuUP__ErrorCause::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 IuUP__ErrorCause::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", "@IuUP_Types.IuUP_ErrorCause");
  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 @IuUP_Types.IuUP_ErrorCause.");
  }
}

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

void IuUP__ErrorCause::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 @IuUP_Types.IuUP_ErrorCause.", enum_value);
}

void IuUP__ErrorCause::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 IuUP__ErrorCause::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 IuUP__ErrorCause::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 IuUP__ErrorCause::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 IuUP__ErrorCause_template::copy_template(const IuUP__ErrorCause_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 IuUP__ErrorCause_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 IuUP__ErrorCause_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__ErrorCause_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 @IuUP_Types.IuUP_ErrorCause.");
}
}

IuUP__ErrorCause_template::IuUP__ErrorCause_template()
{
}

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

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

IuUP__ErrorCause_template::IuUP__ErrorCause_template(IuUP__ErrorCause::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__ErrorCause_template::match(IuUP__ErrorCause::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 @IuUP_Types.IuUP_ErrorCause.");
}
return FALSE;
}

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

IuUP__ErrorCause::enum_type IuUP__ErrorCause_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 @IuUP_Types.IuUP_ErrorCause.");
return single_value;
}

void IuUP__ErrorCause_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 IuUP__ErrorCause_template[list_length];
break;
default:
TTCN_error("Setting an invalid type for a template of enumerated type @IuUP_Types.IuUP_ErrorCause.");
}
}

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

void IuUP__ErrorCause_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(IuUP__ErrorCause::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 IuUP__ErrorCause_template::log_match(const IuUP__ErrorCause& 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 IuUP__ErrorCause_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 @IuUP_Types.IuUP_ErrorCause.");
}
}

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

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

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

void IuUP__ErrorCause_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 : "@IuUP_Types.IuUP_ErrorCause");
}

IuUP__PDU__Type__0::IuUP__PDU__Type__0()
{
}

IuUP__PDU__Type__0::IuUP__PDU__Type__0(const INTEGER& par_pdu__type,
    const INTEGER& par_frame__nr,
    const IuUP__FQC& par_fqc,
    const INTEGER& par_rfci,
    const INTEGER& par_header__crc,
    const INTEGER& par_payload__crc,
    const OCTETSTRING& par_payload)
  :   field_pdu__type(par_pdu__type),
  field_frame__nr(par_frame__nr),
  field_fqc(par_fqc),
  field_rfci(par_rfci),
  field_header__crc(par_header__crc),
  field_payload__crc(par_payload__crc),
  field_payload(par_payload)
{
}

IuUP__PDU__Type__0::IuUP__PDU__Type__0(const IuUP__PDU__Type__0& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU_Type_0.");
if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
else field_pdu__type.clean_up();
if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
else field_frame__nr.clean_up();
if (other_value.fqc().is_bound()) field_fqc = other_value.fqc();
else field_fqc.clean_up();
if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
else field_rfci.clean_up();
if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
else field_header__crc.clean_up();
if (other_value.payload__crc().is_bound()) field_payload__crc = other_value.payload__crc();
else field_payload__crc.clean_up();
if (other_value.payload().is_bound()) field_payload = other_value.payload();
else field_payload.clean_up();
}

void IuUP__PDU__Type__0::clean_up()
{
field_pdu__type.clean_up();
field_frame__nr.clean_up();
field_fqc.clean_up();
field_rfci.clean_up();
field_header__crc.clean_up();
field_payload__crc.clean_up();
field_payload.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU__Type__0::get_descriptor() const { return &IuUP__PDU__Type__0_descr_; }
IuUP__PDU__Type__0& IuUP__PDU__Type__0::operator=(const IuUP__PDU__Type__0& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU_Type_0.");
  if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
  else field_pdu__type.clean_up();
  if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
  else field_frame__nr.clean_up();
  if (other_value.fqc().is_bound()) field_fqc = other_value.fqc();
  else field_fqc.clean_up();
  if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
  else field_rfci.clean_up();
  if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
  else field_header__crc.clean_up();
  if (other_value.payload__crc().is_bound()) field_payload__crc = other_value.payload__crc();
  else field_payload__crc.clean_up();
  if (other_value.payload().is_bound()) field_payload = other_value.payload();
  else field_payload.clean_up();
}
return *this;
}

boolean IuUP__PDU__Type__0::operator==(const IuUP__PDU__Type__0& other_value) const
{
return field_pdu__type==other_value.field_pdu__type
  && field_frame__nr==other_value.field_frame__nr
  && field_fqc==other_value.field_fqc
  && field_rfci==other_value.field_rfci
  && field_header__crc==other_value.field_header__crc
  && field_payload__crc==other_value.field_payload__crc
  && field_payload==other_value.field_payload;
}

boolean IuUP__PDU__Type__0::is_bound() const
{
return (field_pdu__type.is_bound())
  || (field_frame__nr.is_bound())
  || (field_fqc.is_bound())
  || (field_rfci.is_bound())
  || (field_header__crc.is_bound())
  || (field_payload__crc.is_bound())
  || (field_payload.is_bound());
}
boolean IuUP__PDU__Type__0::is_value() const
{
return field_pdu__type.is_value()
  && field_frame__nr.is_value()
  && field_fqc.is_value()
  && field_rfci.is_value()
  && field_header__crc.is_value()
  && field_payload__crc.is_value()
  && field_payload.is_value();
}
void IuUP__PDU__Type__0::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ pdu_type := ");
field_pdu__type.log();
TTCN_Logger::log_event_str(", frame_nr := ");
field_frame__nr.log();
TTCN_Logger::log_event_str(", fqc := ");
field_fqc.log();
TTCN_Logger::log_event_str(", rfci := ");
field_rfci.log();
TTCN_Logger::log_event_str(", header_crc := ");
field_header__crc.log();
TTCN_Logger::log_event_str(", payload_crc := ");
field_payload__crc.log();
TTCN_Logger::log_event_str(", payload := ");
field_payload.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU__Type__0::set_implicit_omit()
{
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (fqc().is_bound()) fqc().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (payload__crc().is_bound()) payload__crc().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void IuUP__PDU__Type__0::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 @IuUP_Types.IuUP_PDU_Type_0 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) frame__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fqc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) payload__crc().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "fqc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fqc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().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 @IuUP_Types.IuUP_PDU_Type_0: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU_Type_0");
  }
}

void IuUP__PDU__Type__0::encode_text(Text_Buf& text_buf) const
{
field_pdu__type.encode_text(text_buf);
field_frame__nr.encode_text(text_buf);
field_fqc.encode_text(text_buf);
field_rfci.encode_text(text_buf);
field_header__crc.encode_text(text_buf);
field_payload__crc.encode_text(text_buf);
field_payload.encode_text(text_buf);
}

void IuUP__PDU__Type__0::decode_text(Text_Buf& text_buf)
{
field_pdu__type.decode_text(text_buf);
field_frame__nr.decode_text(text_buf);
field_fqc.decode_text(text_buf);
field_rfci.decode_text(text_buf);
field_header__crc.decode_text(text_buf);
field_payload__crc.decode_text(text_buf);
field_payload.decode_text(text_buf);
}

void IuUP__PDU__Type__0::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 IuUP__PDU__Type__0::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 IuUP__PDU__Type__0::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, IuUP__PDU__Type__0_pdu__type_descr_.raw->forceomit);
  decoded_field_length = field_pdu__type.RAW_decode(IuUP__PDU__Type__0_pdu__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, IuUP__PDU__Type__0_frame__nr_descr_.raw->forceomit);
  decoded_field_length = field_frame__nr.RAW_decode(IuUP__PDU__Type__0_frame__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, IuUP__PDU__Type__0_fqc_descr_.raw->forceomit);
  decoded_field_length = field_fqc.RAW_decode(IuUP__PDU__Type__0_fqc_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, IuUP__PDU__Type__0_rfci_descr_.raw->forceomit);
  decoded_field_length = field_rfci.RAW_decode(IuUP__PDU__Type__0_rfci_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, IuUP__PDU__Type__0_header__crc_descr_.raw->forceomit);
  decoded_field_length = field_header__crc.RAW_decode(IuUP__PDU__Type__0_header__crc_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, IuUP__PDU__Type__0_payload__crc_descr_.raw->forceomit);
  decoded_field_length = field_payload__crc.RAW_decode(IuUP__PDU__Type__0_payload__crc_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, IuUP__PDU__Type__0_payload_descr_.raw->forceomit);
  decoded_field_length = field_payload.RAW_decode(IuUP__PDU__Type__0_payload_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 IuUP__PDU__Type__0::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, IuUP__PDU__Type__0_pdu__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU__Type__0_frame__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU__Type__0_fqc_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU__Type__0_rfci_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IuUP__PDU__Type__0_header__crc_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IuUP__PDU__Type__0_payload__crc_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, IuUP__PDU__Type__0_payload_descr_.raw);
  encoded_length += field_pdu__type.RAW_encode(IuUP__PDU__Type__0_pdu__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_frame__nr.RAW_encode(IuUP__PDU__Type__0_frame__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_fqc.RAW_encode(IuUP__PDU__Type__0_fqc_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_rfci.RAW_encode(IuUP__PDU__Type__0_rfci_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_header__crc.RAW_encode(IuUP__PDU__Type__0_header__crc_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_payload__crc.RAW_encode(IuUP__PDU__Type__0_payload__crc_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_payload.RAW_encode(IuUP__PDU__Type__0_payload_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct IuUP__PDU__Type__0_template::single_value_struct {
INTEGER_template field_pdu__type;
INTEGER_template field_frame__nr;
IuUP__FQC_template field_fqc;
INTEGER_template field_rfci;
INTEGER_template field_header__crc;
INTEGER_template field_payload__crc;
OCTETSTRING_template field_payload;
};

void IuUP__PDU__Type__0_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_pdu__type = ANY_VALUE;
single_value->field_frame__nr = ANY_VALUE;
single_value->field_fqc = ANY_VALUE;
single_value->field_rfci = ANY_VALUE;
single_value->field_header__crc = ANY_VALUE;
single_value->field_payload__crc = ANY_VALUE;
single_value->field_payload = ANY_VALUE;
}
}
}

void IuUP__PDU__Type__0_template::copy_value(const IuUP__PDU__Type__0& other_value)
{
single_value = new single_value_struct;
if (other_value.pdu__type().is_bound()) {
  single_value->field_pdu__type = other_value.pdu__type();
} else {
  single_value->field_pdu__type.clean_up();
}
if (other_value.frame__nr().is_bound()) {
  single_value->field_frame__nr = other_value.frame__nr();
} else {
  single_value->field_frame__nr.clean_up();
}
if (other_value.fqc().is_bound()) {
  single_value->field_fqc = other_value.fqc();
} else {
  single_value->field_fqc.clean_up();
}
if (other_value.rfci().is_bound()) {
  single_value->field_rfci = other_value.rfci();
} else {
  single_value->field_rfci.clean_up();
}
if (other_value.header__crc().is_bound()) {
  single_value->field_header__crc = other_value.header__crc();
} else {
  single_value->field_header__crc.clean_up();
}
if (other_value.payload__crc().is_bound()) {
  single_value->field_payload__crc = other_value.payload__crc();
} else {
  single_value->field_payload__crc.clean_up();
}
if (other_value.payload().is_bound()) {
  single_value->field_payload = other_value.payload();
} else {
  single_value->field_payload.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU__Type__0_template::copy_template(const IuUP__PDU__Type__0_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.pdu__type().get_selection()) {
single_value->field_pdu__type = other_value.pdu__type();
} else {
single_value->field_pdu__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.frame__nr().get_selection()) {
single_value->field_frame__nr = other_value.frame__nr();
} else {
single_value->field_frame__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fqc().get_selection()) {
single_value->field_fqc = other_value.fqc();
} else {
single_value->field_fqc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci().get_selection()) {
single_value->field_rfci = other_value.rfci();
} else {
single_value->field_rfci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.header__crc().get_selection()) {
single_value->field_header__crc = other_value.header__crc();
} else {
single_value->field_header__crc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.payload__crc().get_selection()) {
single_value->field_payload__crc = other_value.payload__crc();
} else {
single_value->field_payload__crc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.payload().get_selection()) {
single_value->field_payload = other_value.payload();
} else {
single_value->field_payload.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 IuUP__PDU__Type__0_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 IuUP__PDU__Type__0_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0.");
break;
}
set_selection(other_value);
}

IuUP__PDU__Type__0_template::IuUP__PDU__Type__0_template()
{
}

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

IuUP__PDU__Type__0_template::IuUP__PDU__Type__0_template(const IuUP__PDU__Type__0& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU__Type__0_template::match(const IuUP__PDU__Type__0& 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.pdu__type().is_bound()) return FALSE;
if(!single_value->field_pdu__type.match(other_value.pdu__type(), legacy))return FALSE;
if(!other_value.frame__nr().is_bound()) return FALSE;
if(!single_value->field_frame__nr.match(other_value.frame__nr(), legacy))return FALSE;
if(!other_value.fqc().is_bound()) return FALSE;
if(!single_value->field_fqc.match(other_value.fqc(), legacy))return FALSE;
if(!other_value.rfci().is_bound()) return FALSE;
if(!single_value->field_rfci.match(other_value.rfci(), legacy))return FALSE;
if(!other_value.header__crc().is_bound()) return FALSE;
if(!single_value->field_header__crc.match(other_value.header__crc(), legacy))return FALSE;
if(!other_value.payload__crc().is_bound()) return FALSE;
if(!single_value->field_payload__crc.match(other_value.payload__crc(), legacy))return FALSE;
if(!other_value.payload().is_bound()) return FALSE;
if(!single_value->field_payload.match(other_value.payload(), 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 @IuUP_Types.IuUP_PDU_Type_0.");
}
return FALSE;
}

boolean IuUP__PDU__Type__0_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_pdu__type.is_bound()
 || single_value->field_frame__nr.is_bound()
 || single_value->field_fqc.is_bound()
 || single_value->field_rfci.is_bound()
 || single_value->field_header__crc.is_bound()
 || single_value->field_payload__crc.is_bound()
 || single_value->field_payload.is_bound();
}

boolean IuUP__PDU__Type__0_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_pdu__type.is_value()
 && single_value->field_frame__nr.is_value()
 && single_value->field_fqc.is_value()
 && single_value->field_rfci.is_value()
 && single_value->field_header__crc.is_value()
 && single_value->field_payload__crc.is_value()
 && single_value->field_payload.is_value();
}

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

IuUP__PDU__Type__0 IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0.");
IuUP__PDU__Type__0 ret_val;
if (single_value->field_pdu__type.is_bound()) {
ret_val.pdu__type() = single_value->field_pdu__type.valueof();
}
if (single_value->field_frame__nr.is_bound()) {
ret_val.frame__nr() = single_value->field_frame__nr.valueof();
}
if (single_value->field_fqc.is_bound()) {
ret_val.fqc() = single_value->field_fqc.valueof();
}
if (single_value->field_rfci.is_bound()) {
ret_val.rfci() = single_value->field_rfci.valueof();
}
if (single_value->field_header__crc.is_bound()) {
ret_val.header__crc() = single_value->field_header__crc.valueof();
}
if (single_value->field_payload__crc.is_bound()) {
ret_val.payload__crc() = single_value->field_payload__crc.valueof();
}
if (single_value->field_payload.is_bound()) {
ret_val.payload() = single_value->field_payload.valueof();
}
return ret_val;
}

void IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU__Type__0_template[list_length];
}

IuUP__PDU__Type__0_template& IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU_Type_0.");
return value_list.list_value[list_index];
}

INTEGER_template& IuUP__PDU__Type__0_template::pdu__type()
{
set_specific();
return single_value->field_pdu__type;
}

const INTEGER_template& IuUP__PDU__Type__0_template::pdu__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pdu_type of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_pdu__type;
}

INTEGER_template& IuUP__PDU__Type__0_template::frame__nr()
{
set_specific();
return single_value->field_frame__nr;
}

const INTEGER_template& IuUP__PDU__Type__0_template::frame__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field frame_nr of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_frame__nr;
}

IuUP__FQC_template& IuUP__PDU__Type__0_template::fqc()
{
set_specific();
return single_value->field_fqc;
}

const IuUP__FQC_template& IuUP__PDU__Type__0_template::fqc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fqc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_fqc;
}

INTEGER_template& IuUP__PDU__Type__0_template::rfci()
{
set_specific();
return single_value->field_rfci;
}

const INTEGER_template& IuUP__PDU__Type__0_template::rfci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_rfci;
}

INTEGER_template& IuUP__PDU__Type__0_template::header__crc()
{
set_specific();
return single_value->field_header__crc;
}

const INTEGER_template& IuUP__PDU__Type__0_template::header__crc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field header_crc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_header__crc;
}

INTEGER_template& IuUP__PDU__Type__0_template::payload__crc()
{
set_specific();
return single_value->field_payload__crc;
}

const INTEGER_template& IuUP__PDU__Type__0_template::payload__crc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload_crc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_payload__crc;
}

OCTETSTRING_template& IuUP__PDU__Type__0_template::payload()
{
set_specific();
return single_value->field_payload;
}

const OCTETSTRING_template& IuUP__PDU__Type__0_template::payload() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_0.");
return single_value->field_payload;
}

int IuUP__PDU__Type__0_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 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 @IuUP_Types.IuUP_PDU_Type_0 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 @IuUP_Types.IuUP_PDU_Type_0 containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_0 containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU_Type_0.");
  }
  return 0;
}

void IuUP__PDU__Type__0_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ pdu_type := ");
single_value->field_pdu__type.log();
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.log();
TTCN_Logger::log_event_str(", fqc := ");
single_value->field_fqc.log();
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log();
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log();
TTCN_Logger::log_event_str(", payload_crc := ");
single_value->field_payload__crc.log();
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.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 IuUP__PDU__Type__0_template::log_match(const IuUP__PDU__Type__0& 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_pdu__type.match(match_value.pdu__type(), legacy)){
TTCN_Logger::log_logmatch_info(".pdu_type");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_frame__nr.match(match_value.frame__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".frame_nr");
single_value->field_frame__nr.log_match(match_value.frame__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fqc.match(match_value.fqc(), legacy)){
TTCN_Logger::log_logmatch_info(".fqc");
single_value->field_fqc.log_match(match_value.fqc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rfci.match(match_value.rfci(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_header__crc.match(match_value.header__crc(), legacy)){
TTCN_Logger::log_logmatch_info(".header_crc");
single_value->field_header__crc.log_match(match_value.header__crc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_payload__crc.match(match_value.payload__crc(), legacy)){
TTCN_Logger::log_logmatch_info(".payload_crc");
single_value->field_payload__crc.log_match(match_value.payload__crc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_payload.match(match_value.payload(), legacy)){
TTCN_Logger::log_logmatch_info(".payload");
single_value->field_payload.log_match(match_value.payload(), 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("{ pdu_type := ");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.log_match(match_value.frame__nr(), legacy);
TTCN_Logger::log_event_str(", fqc := ");
single_value->field_fqc.log_match(match_value.fqc(), legacy);
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log_match(match_value.header__crc(), legacy);
TTCN_Logger::log_event_str(", payload_crc := ");
single_value->field_payload__crc.log_match(match_value.payload__crc(), legacy);
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log_match(match_value.payload(), 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 IuUP__PDU__Type__0_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (fqc().is_bound()) fqc().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (payload__crc().is_bound()) payload__crc().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void IuUP__PDU__Type__0_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_pdu__type.encode_text(text_buf);
single_value->field_frame__nr.encode_text(text_buf);
single_value->field_fqc.encode_text(text_buf);
single_value->field_rfci.encode_text(text_buf);
single_value->field_header__crc.encode_text(text_buf);
single_value->field_payload__crc.encode_text(text_buf);
single_value->field_payload.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 @IuUP_Types.IuUP_PDU_Type_0.");
}
}

void IuUP__PDU__Type__0_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_pdu__type.decode_text(text_buf);
single_value->field_frame__nr.decode_text(text_buf);
single_value->field_fqc.decode_text(text_buf);
single_value->field_rfci.decode_text(text_buf);
single_value->field_header__crc.decode_text(text_buf);
single_value->field_payload__crc.decode_text(text_buf);
single_value->field_payload.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 IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0.");
}
}

void IuUP__PDU__Type__0_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: {
    IuUP__PDU__Type__0_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 @IuUP_Types.IuUP_PDU_Type_0 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) frame__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fqc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) payload__crc().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "fqc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fqc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().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 @IuUP_Types.IuUP_PDU_Type_0: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU__Type__0_template* precondition = new IuUP__PDU__Type__0_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU__Type__0_template* implied_template = new IuUP__PDU__Type__0_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU__Type__0_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU_Type_0");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU__Type__0_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_pdu__type.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_frame__nr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_fqc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_rfci.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_header__crc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_payload__crc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
single_value->field_payload.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_0");
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 : "@IuUP_Types.IuUP_PDU_Type_0");
}

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

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

IuUP__PDU__Type__1::IuUP__PDU__Type__1()
{
}

IuUP__PDU__Type__1::IuUP__PDU__Type__1(const INTEGER& par_pdu__type,
    const INTEGER& par_frame__nr,
    const IuUP__FQC& par_fqc,
    const INTEGER& par_rfci,
    const INTEGER& par_header__crc,
    const BITSTRING& par_spare,
    const OCTETSTRING& par_payload)
  :   field_pdu__type(par_pdu__type),
  field_frame__nr(par_frame__nr),
  field_fqc(par_fqc),
  field_rfci(par_rfci),
  field_header__crc(par_header__crc),
  field_spare(par_spare),
  field_payload(par_payload)
{
}

IuUP__PDU__Type__1::IuUP__PDU__Type__1(const IuUP__PDU__Type__1& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU_Type_1.");
if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
else field_pdu__type.clean_up();
if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
else field_frame__nr.clean_up();
if (other_value.fqc().is_bound()) field_fqc = other_value.fqc();
else field_fqc.clean_up();
if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
else field_rfci.clean_up();
if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
else field_header__crc.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.payload().is_bound()) field_payload = other_value.payload();
else field_payload.clean_up();
}

void IuUP__PDU__Type__1::clean_up()
{
field_pdu__type.clean_up();
field_frame__nr.clean_up();
field_fqc.clean_up();
field_rfci.clean_up();
field_header__crc.clean_up();
field_spare.clean_up();
field_payload.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU__Type__1::get_descriptor() const { return &IuUP__PDU__Type__1_descr_; }
IuUP__PDU__Type__1& IuUP__PDU__Type__1::operator=(const IuUP__PDU__Type__1& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU_Type_1.");
  if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
  else field_pdu__type.clean_up();
  if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
  else field_frame__nr.clean_up();
  if (other_value.fqc().is_bound()) field_fqc = other_value.fqc();
  else field_fqc.clean_up();
  if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
  else field_rfci.clean_up();
  if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
  else field_header__crc.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.payload().is_bound()) field_payload = other_value.payload();
  else field_payload.clean_up();
}
return *this;
}

boolean IuUP__PDU__Type__1::operator==(const IuUP__PDU__Type__1& other_value) const
{
return field_pdu__type==other_value.field_pdu__type
  && field_frame__nr==other_value.field_frame__nr
  && field_fqc==other_value.field_fqc
  && field_rfci==other_value.field_rfci
  && field_header__crc==other_value.field_header__crc
  && field_spare==other_value.field_spare
  && field_payload==other_value.field_payload;
}

boolean IuUP__PDU__Type__1::is_bound() const
{
return (field_pdu__type.is_bound())
  || (field_frame__nr.is_bound())
  || (field_fqc.is_bound())
  || (field_rfci.is_bound())
  || (field_header__crc.is_bound())
  || (field_spare.is_bound())
  || (field_payload.is_bound());
}
boolean IuUP__PDU__Type__1::is_value() const
{
return field_pdu__type.is_value()
  && field_frame__nr.is_value()
  && field_fqc.is_value()
  && field_rfci.is_value()
  && field_header__crc.is_value()
  && field_spare.is_value()
  && field_payload.is_value();
}
void IuUP__PDU__Type__1::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ pdu_type := ");
field_pdu__type.log();
TTCN_Logger::log_event_str(", frame_nr := ");
field_frame__nr.log();
TTCN_Logger::log_event_str(", fqc := ");
field_fqc.log();
TTCN_Logger::log_event_str(", rfci := ");
field_rfci.log();
TTCN_Logger::log_event_str(", header_crc := ");
field_header__crc.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", payload := ");
field_payload.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU__Type__1::set_implicit_omit()
{
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (fqc().is_bound()) fqc().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void IuUP__PDU__Type__1::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 @IuUP_Types.IuUP_PDU_Type_1 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) frame__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fqc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "fqc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fqc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().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 @IuUP_Types.IuUP_PDU_Type_1: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU_Type_1");
  }
}

void IuUP__PDU__Type__1::encode_text(Text_Buf& text_buf) const
{
field_pdu__type.encode_text(text_buf);
field_frame__nr.encode_text(text_buf);
field_fqc.encode_text(text_buf);
field_rfci.encode_text(text_buf);
field_header__crc.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_payload.encode_text(text_buf);
}

void IuUP__PDU__Type__1::decode_text(Text_Buf& text_buf)
{
field_pdu__type.decode_text(text_buf);
field_frame__nr.decode_text(text_buf);
field_fqc.decode_text(text_buf);
field_rfci.decode_text(text_buf);
field_header__crc.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_payload.decode_text(text_buf);
}

void IuUP__PDU__Type__1::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 IuUP__PDU__Type__1::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 IuUP__PDU__Type__1::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, IuUP__PDU__Type__1_pdu__type_descr_.raw->forceomit);
  decoded_field_length = field_pdu__type.RAW_decode(IuUP__PDU__Type__1_pdu__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, IuUP__PDU__Type__1_frame__nr_descr_.raw->forceomit);
  decoded_field_length = field_frame__nr.RAW_decode(IuUP__PDU__Type__1_frame__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, IuUP__PDU__Type__1_fqc_descr_.raw->forceomit);
  decoded_field_length = field_fqc.RAW_decode(IuUP__PDU__Type__1_fqc_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, IuUP__PDU__Type__1_rfci_descr_.raw->forceomit);
  decoded_field_length = field_rfci.RAW_decode(IuUP__PDU__Type__1_rfci_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, IuUP__PDU__Type__1_header__crc_descr_.raw->forceomit);
  decoded_field_length = field_header__crc.RAW_decode(IuUP__PDU__Type__1_header__crc_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, IuUP__PDU__Type__1_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(IuUP__PDU__Type__1_spare_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, IuUP__PDU__Type__1_payload_descr_.raw->forceomit);
  decoded_field_length = field_payload.RAW_decode(IuUP__PDU__Type__1_payload_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 IuUP__PDU__Type__1::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, IuUP__PDU__Type__1_pdu__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU__Type__1_frame__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU__Type__1_fqc_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU__Type__1_rfci_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IuUP__PDU__Type__1_header__crc_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IuUP__PDU__Type__1_spare_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, IuUP__PDU__Type__1_payload_descr_.raw);
  encoded_length += field_pdu__type.RAW_encode(IuUP__PDU__Type__1_pdu__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_frame__nr.RAW_encode(IuUP__PDU__Type__1_frame__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_fqc.RAW_encode(IuUP__PDU__Type__1_fqc_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_rfci.RAW_encode(IuUP__PDU__Type__1_rfci_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_header__crc.RAW_encode(IuUP__PDU__Type__1_header__crc_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_spare.RAW_encode(IuUP__PDU__Type__1_spare_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_payload.RAW_encode(IuUP__PDU__Type__1_payload_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct IuUP__PDU__Type__1_template::single_value_struct {
INTEGER_template field_pdu__type;
INTEGER_template field_frame__nr;
IuUP__FQC_template field_fqc;
INTEGER_template field_rfci;
INTEGER_template field_header__crc;
BITSTRING_template field_spare;
OCTETSTRING_template field_payload;
};

void IuUP__PDU__Type__1_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_pdu__type = ANY_VALUE;
single_value->field_frame__nr = ANY_VALUE;
single_value->field_fqc = ANY_VALUE;
single_value->field_rfci = ANY_VALUE;
single_value->field_header__crc = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_payload = ANY_VALUE;
}
}
}

void IuUP__PDU__Type__1_template::copy_value(const IuUP__PDU__Type__1& other_value)
{
single_value = new single_value_struct;
if (other_value.pdu__type().is_bound()) {
  single_value->field_pdu__type = other_value.pdu__type();
} else {
  single_value->field_pdu__type.clean_up();
}
if (other_value.frame__nr().is_bound()) {
  single_value->field_frame__nr = other_value.frame__nr();
} else {
  single_value->field_frame__nr.clean_up();
}
if (other_value.fqc().is_bound()) {
  single_value->field_fqc = other_value.fqc();
} else {
  single_value->field_fqc.clean_up();
}
if (other_value.rfci().is_bound()) {
  single_value->field_rfci = other_value.rfci();
} else {
  single_value->field_rfci.clean_up();
}
if (other_value.header__crc().is_bound()) {
  single_value->field_header__crc = other_value.header__crc();
} else {
  single_value->field_header__crc.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.payload().is_bound()) {
  single_value->field_payload = other_value.payload();
} else {
  single_value->field_payload.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU__Type__1_template::copy_template(const IuUP__PDU__Type__1_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.pdu__type().get_selection()) {
single_value->field_pdu__type = other_value.pdu__type();
} else {
single_value->field_pdu__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.frame__nr().get_selection()) {
single_value->field_frame__nr = other_value.frame__nr();
} else {
single_value->field_frame__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fqc().get_selection()) {
single_value->field_fqc = other_value.fqc();
} else {
single_value->field_fqc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci().get_selection()) {
single_value->field_rfci = other_value.rfci();
} else {
single_value->field_rfci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.header__crc().get_selection()) {
single_value->field_header__crc = other_value.header__crc();
} else {
single_value->field_header__crc.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.payload().get_selection()) {
single_value->field_payload = other_value.payload();
} else {
single_value->field_payload.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 IuUP__PDU__Type__1_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 IuUP__PDU__Type__1_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1.");
break;
}
set_selection(other_value);
}

IuUP__PDU__Type__1_template::IuUP__PDU__Type__1_template()
{
}

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

IuUP__PDU__Type__1_template::IuUP__PDU__Type__1_template(const IuUP__PDU__Type__1& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU__Type__1_template::match(const IuUP__PDU__Type__1& 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.pdu__type().is_bound()) return FALSE;
if(!single_value->field_pdu__type.match(other_value.pdu__type(), legacy))return FALSE;
if(!other_value.frame__nr().is_bound()) return FALSE;
if(!single_value->field_frame__nr.match(other_value.frame__nr(), legacy))return FALSE;
if(!other_value.fqc().is_bound()) return FALSE;
if(!single_value->field_fqc.match(other_value.fqc(), legacy))return FALSE;
if(!other_value.rfci().is_bound()) return FALSE;
if(!single_value->field_rfci.match(other_value.rfci(), legacy))return FALSE;
if(!other_value.header__crc().is_bound()) return FALSE;
if(!single_value->field_header__crc.match(other_value.header__crc(), 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.payload().is_bound()) return FALSE;
if(!single_value->field_payload.match(other_value.payload(), 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 @IuUP_Types.IuUP_PDU_Type_1.");
}
return FALSE;
}

boolean IuUP__PDU__Type__1_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_pdu__type.is_bound()
 || single_value->field_frame__nr.is_bound()
 || single_value->field_fqc.is_bound()
 || single_value->field_rfci.is_bound()
 || single_value->field_header__crc.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_payload.is_bound();
}

boolean IuUP__PDU__Type__1_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_pdu__type.is_value()
 && single_value->field_frame__nr.is_value()
 && single_value->field_fqc.is_value()
 && single_value->field_rfci.is_value()
 && single_value->field_header__crc.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_payload.is_value();
}

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

IuUP__PDU__Type__1 IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1.");
IuUP__PDU__Type__1 ret_val;
if (single_value->field_pdu__type.is_bound()) {
ret_val.pdu__type() = single_value->field_pdu__type.valueof();
}
if (single_value->field_frame__nr.is_bound()) {
ret_val.frame__nr() = single_value->field_frame__nr.valueof();
}
if (single_value->field_fqc.is_bound()) {
ret_val.fqc() = single_value->field_fqc.valueof();
}
if (single_value->field_rfci.is_bound()) {
ret_val.rfci() = single_value->field_rfci.valueof();
}
if (single_value->field_header__crc.is_bound()) {
ret_val.header__crc() = single_value->field_header__crc.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_payload.is_bound()) {
ret_val.payload() = single_value->field_payload.valueof();
}
return ret_val;
}

void IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU__Type__1_template[list_length];
}

IuUP__PDU__Type__1_template& IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU_Type_1.");
return value_list.list_value[list_index];
}

INTEGER_template& IuUP__PDU__Type__1_template::pdu__type()
{
set_specific();
return single_value->field_pdu__type;
}

const INTEGER_template& IuUP__PDU__Type__1_template::pdu__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pdu_type of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_pdu__type;
}

INTEGER_template& IuUP__PDU__Type__1_template::frame__nr()
{
set_specific();
return single_value->field_frame__nr;
}

const INTEGER_template& IuUP__PDU__Type__1_template::frame__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field frame_nr of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_frame__nr;
}

IuUP__FQC_template& IuUP__PDU__Type__1_template::fqc()
{
set_specific();
return single_value->field_fqc;
}

const IuUP__FQC_template& IuUP__PDU__Type__1_template::fqc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fqc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_fqc;
}

INTEGER_template& IuUP__PDU__Type__1_template::rfci()
{
set_specific();
return single_value->field_rfci;
}

const INTEGER_template& IuUP__PDU__Type__1_template::rfci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_rfci;
}

INTEGER_template& IuUP__PDU__Type__1_template::header__crc()
{
set_specific();
return single_value->field_header__crc;
}

const INTEGER_template& IuUP__PDU__Type__1_template::header__crc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field header_crc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_header__crc;
}

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

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

OCTETSTRING_template& IuUP__PDU__Type__1_template::payload()
{
set_specific();
return single_value->field_payload;
}

const OCTETSTRING_template& IuUP__PDU__Type__1_template::payload() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_1.");
return single_value->field_payload;
}

int IuUP__PDU__Type__1_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 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 @IuUP_Types.IuUP_PDU_Type_1 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 @IuUP_Types.IuUP_PDU_Type_1 containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_1 containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU_Type_1.");
  }
  return 0;
}

void IuUP__PDU__Type__1_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ pdu_type := ");
single_value->field_pdu__type.log();
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.log();
TTCN_Logger::log_event_str(", fqc := ");
single_value->field_fqc.log();
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log();
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.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 IuUP__PDU__Type__1_template::log_match(const IuUP__PDU__Type__1& 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_pdu__type.match(match_value.pdu__type(), legacy)){
TTCN_Logger::log_logmatch_info(".pdu_type");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_frame__nr.match(match_value.frame__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".frame_nr");
single_value->field_frame__nr.log_match(match_value.frame__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_fqc.match(match_value.fqc(), legacy)){
TTCN_Logger::log_logmatch_info(".fqc");
single_value->field_fqc.log_match(match_value.fqc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rfci.match(match_value.rfci(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_header__crc.match(match_value.header__crc(), legacy)){
TTCN_Logger::log_logmatch_info(".header_crc");
single_value->field_header__crc.log_match(match_value.header__crc(), 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_payload.match(match_value.payload(), legacy)){
TTCN_Logger::log_logmatch_info(".payload");
single_value->field_payload.log_match(match_value.payload(), 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("{ pdu_type := ");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.log_match(match_value.frame__nr(), legacy);
TTCN_Logger::log_event_str(", fqc := ");
single_value->field_fqc.log_match(match_value.fqc(), legacy);
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log_match(match_value.header__crc(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log_match(match_value.payload(), 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 IuUP__PDU__Type__1_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (fqc().is_bound()) fqc().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void IuUP__PDU__Type__1_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_pdu__type.encode_text(text_buf);
single_value->field_frame__nr.encode_text(text_buf);
single_value->field_fqc.encode_text(text_buf);
single_value->field_rfci.encode_text(text_buf);
single_value->field_header__crc.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_payload.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 @IuUP_Types.IuUP_PDU_Type_1.");
}
}

void IuUP__PDU__Type__1_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_pdu__type.decode_text(text_buf);
single_value->field_frame__nr.decode_text(text_buf);
single_value->field_fqc.decode_text(text_buf);
single_value->field_rfci.decode_text(text_buf);
single_value->field_header__crc.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_payload.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 IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1.");
}
}

void IuUP__PDU__Type__1_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: {
    IuUP__PDU__Type__1_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 @IuUP_Types.IuUP_PDU_Type_1 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) frame__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) fqc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "fqc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fqc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().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 @IuUP_Types.IuUP_PDU_Type_1: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU__Type__1_template* precondition = new IuUP__PDU__Type__1_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU__Type__1_template* implied_template = new IuUP__PDU__Type__1_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU__Type__1_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU_Type_1");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU__Type__1_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_pdu__type.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_frame__nr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_fqc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_rfci.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_header__crc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
single_value->field_payload.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_1");
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 : "@IuUP_Types.IuUP_PDU_Type_1");
}

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

boolean IuUP__PDU__Type__1_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 IuUP__PDU14__Union::copy_value(const IuUP__PDU14__Union& other_value)
{
switch (other_value.union_selection) {
case ALT_proc:
field_proc = new IuUP__PDU14__ProcSending(*other_value.field_proc);
break;
case ALT_ack:
field_ack = new IuUP__PDU14__ACK(*other_value.field_ack);
break;
case ALT_nack:
field_nack = new IuUP__PDU14__NACK(*other_value.field_nack);
break;
default:
TTCN_error("Assignment of an unbound union value of type @IuUP_Types.IuUP_PDU14_Union.");
}
union_selection = other_value.union_selection;
}

IuUP__PDU14__Union::IuUP__PDU14__Union()
{
union_selection = UNBOUND_VALUE;
}

IuUP__PDU14__Union::IuUP__PDU14__Union(const IuUP__PDU14__Union& other_value)
: Base_Type(){
copy_value(other_value);
}

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

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

boolean IuUP__PDU14__Union::operator==(const IuUP__PDU14__Union& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU14_Union.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU14_Union.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_proc:
return *field_proc == *other_value.field_proc;
case ALT_ack:
return *field_ack == *other_value.field_ack;
case ALT_nack:
return *field_nack == *other_value.field_nack;
default:
return FALSE;
}
}

IuUP__PDU14__ProcSending& IuUP__PDU14__Union::proc()
{
if (union_selection != ALT_proc) {
clean_up();
field_proc = new IuUP__PDU14__ProcSending;
union_selection = ALT_proc;
}
return *field_proc;
}

const IuUP__PDU14__ProcSending& IuUP__PDU14__Union::proc() const
{
if (union_selection != ALT_proc) TTCN_error("Using non-selected field proc in a value of union type @IuUP_Types.IuUP_PDU14_Union.");
return *field_proc;
}

IuUP__PDU14__ACK& IuUP__PDU14__Union::ack()
{
if (union_selection != ALT_ack) {
clean_up();
field_ack = new IuUP__PDU14__ACK;
union_selection = ALT_ack;
}
return *field_ack;
}

const IuUP__PDU14__ACK& IuUP__PDU14__Union::ack() const
{
if (union_selection != ALT_ack) TTCN_error("Using non-selected field ack in a value of union type @IuUP_Types.IuUP_PDU14_Union.");
return *field_ack;
}

IuUP__PDU14__NACK& IuUP__PDU14__Union::nack()
{
if (union_selection != ALT_nack) {
clean_up();
field_nack = new IuUP__PDU14__NACK;
union_selection = ALT_nack;
}
return *field_nack;
}

const IuUP__PDU14__NACK& IuUP__PDU14__Union::nack() const
{
if (union_selection != ALT_nack) TTCN_error("Using non-selected field nack in a value of union type @IuUP_Types.IuUP_PDU14_Union.");
return *field_nack;
}

boolean IuUP__PDU14__Union::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 @IuUP_Types.IuUP_PDU14_Union.");
return union_selection == checked_selection;
}

boolean IuUP__PDU14__Union::is_bound() const
{
  return union_selection != UNBOUND_VALUE;
}

boolean IuUP__PDU14__Union::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_proc: return field_proc->is_value();
case ALT_ack: return field_ack->is_value();
case ALT_nack: return field_nack->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void IuUP__PDU14__Union::clean_up()
{
switch (union_selection) {
case ALT_proc:
  delete field_proc;
  break;
case ALT_ack:
  delete field_ack;
  break;
case ALT_nack:
  delete field_nack;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void IuUP__PDU14__Union::log() const
{
switch (union_selection) {
case ALT_proc:
TTCN_Logger::log_event_str("{ proc := ");
field_proc->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ack:
TTCN_Logger::log_event_str("{ ack := ");
field_ack->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_nack:
TTCN_Logger::log_event_str("{ nack := ");
field_nack->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void IuUP__PDU14__Union::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, "proc")) {
    proc().set_param(*mp_last);
    if (!proc().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ack")) {
    ack().set_param(*mp_last);
    if (!ack().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "nack")) {
    nack().set_param(*mp_last);
    if (!nack().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @IuUP_Types.IuUP_PDU14_Union.", last_name);
}

void IuUP__PDU14__Union::set_implicit_omit()
{
switch (union_selection) {
case ALT_proc:
field_proc->set_implicit_omit(); break;
case ALT_ack:
field_ack->set_implicit_omit(); break;
case ALT_nack:
field_nack->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU14__Union::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_proc:
field_proc->encode_text(text_buf);
break;
case ALT_ack:
field_ack->encode_text(text_buf);
break;
case ALT_nack:
field_nack->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @IuUP_Types.IuUP_PDU14_Union.");
}
}

void IuUP__PDU14__Union::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_proc:
proc().decode_text(text_buf);
break;
case ALT_ack:
ack().decode_text(text_buf);
break;
case ALT_nack:
nack().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @IuUP_Types.IuUP_PDU14_Union.");
}
}

void IuUP__PDU14__Union::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 IuUP__PDU14__Union::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 IuUP__PDU14__Union::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, IuUP__PDU14__Union_proc_descr_.raw->forceomit);
      decoded_length = proc().RAW_decode(IuUP__PDU14__Union_proc_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, IuUP__PDU14__Union_ack_descr_.raw->forceomit);
      decoded_length = ack().RAW_decode(IuUP__PDU14__Union_ack_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, IuUP__PDU14__Union_nack_descr_.raw->forceomit);
      decoded_length = nack().RAW_decode(IuUP__PDU14__Union_nack_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, IuUP__PDU14__Union_proc_descr_.raw->forceomit);
      decoded_length = proc().RAW_decode(IuUP__PDU14__Union_proc_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, IuUP__PDU14__Union_ack_descr_.raw->forceomit);
      decoded_length = ack().RAW_decode(IuUP__PDU14__Union_ack_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, IuUP__PDU14__Union_nack_descr_.raw->forceomit);
      decoded_length = nack().RAW_decode(IuUP__PDU14__Union_nack_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 IuUP__PDU14__Union::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_proc:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, IuUP__PDU14__Union_proc_descr_.raw);
    encoded_length = field_proc->RAW_encode(IuUP__PDU14__Union_proc_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &IuUP__PDU14__Union_proc_descr_;
    break;
  case ALT_ack:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, IuUP__PDU14__Union_ack_descr_.raw);
    encoded_length = field_ack->RAW_encode(IuUP__PDU14__Union_ack_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &IuUP__PDU14__Union_ack_descr_;
    break;
  case ALT_nack:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, IuUP__PDU14__Union_nack_descr_.raw);
    encoded_length = field_nack->RAW_encode(IuUP__PDU14__Union_nack_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &IuUP__PDU14__Union_nack_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void IuUP__PDU14__Union_template::copy_value(const IuUP__PDU14__Union& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
single_value.field_proc = new IuUP__PDU14__ProcSending_template(other_value.proc());
break;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack = new IuUP__PDU14__ACK_template(other_value.ack());
break;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack = new IuUP__PDU14__NACK_template(other_value.nack());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @IuUP_Types.IuUP_PDU14_Union.");
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__Union_template::copy_template(const IuUP__PDU14__Union_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 IuUP__PDU14__Union::ALT_proc:
single_value.field_proc = new IuUP__PDU14__ProcSending_template(*other_value.single_value.field_proc);
break;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack = new IuUP__PDU14__ACK_template(*other_value.single_value.field_ack);
break;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack = new IuUP__PDU14__NACK_template(*other_value.single_value.field_nack);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @IuUP_Types.IuUP_PDU14_Union.");
}
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 IuUP__PDU14__Union_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 IuUP__PDU14__Union_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__Union_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 @IuUP_Types.IuUP_PDU14_Union.");
}
set_selection(other_value);
}

IuUP__PDU14__Union_template::IuUP__PDU14__Union_template()
{
}

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

IuUP__PDU14__Union_template::IuUP__PDU14__Union_template(const IuUP__PDU14__Union& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void IuUP__PDU14__Union_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
delete single_value.field_proc;
break;
case IuUP__PDU14__Union::ALT_ack:
delete single_value.field_ack;
break;
case IuUP__PDU14__Union::ALT_nack:
delete single_value.field_nack;
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;
}

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

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

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

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

boolean IuUP__PDU14__Union_template::match(const IuUP__PDU14__Union& 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:
{
IuUP__PDU14__Union::union_selection_type value_selection = other_value.get_selection();
if (value_selection == IuUP__PDU14__Union::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case IuUP__PDU14__Union::ALT_proc:
return single_value.field_proc->match(other_value.proc(), legacy);
case IuUP__PDU14__Union::ALT_ack:
return single_value.field_ack->match(other_value.ack(), legacy);
case IuUP__PDU14__Union::ALT_nack:
return single_value.field_nack->match(other_value.nack(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @IuUP_Types.IuUP_PDU14_Union.");
}
}
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 @IuUP_Types.IuUP_PDU14_Union.");
}
return FALSE;
}

boolean IuUP__PDU14__Union_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
return single_value.field_proc->is_value();
case IuUP__PDU14__Union::ALT_ack:
return single_value.field_ack->is_value();
case IuUP__PDU14__Union::ALT_nack:
return single_value.field_nack->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @IuUP_Types.IuUP_PDU14_Union.");
}
}

IuUP__PDU14__Union IuUP__PDU14__Union_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 @IuUP_Types.IuUP_PDU14_Union.");
IuUP__PDU14__Union ret_val;
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
ret_val.proc() = single_value.field_proc->valueof();
break;
case IuUP__PDU14__Union::ALT_ack:
ret_val.ack() = single_value.field_ack->valueof();
break;
case IuUP__PDU14__Union::ALT_nack:
ret_val.nack() = single_value.field_nack->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @IuUP_Types.IuUP_PDU14_Union.");
}
return ret_val;
}

IuUP__PDU14__Union_template& IuUP__PDU14__Union_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 @IuUP_Types.IuUP_PDU14_Union.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @IuUP_Types.IuUP_PDU14_Union.");
return value_list.list_value[list_index];
}
void IuUP__PDU14__Union_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 @IuUP_Types.IuUP_PDU14_Union.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__Union_template[list_length];
}

IuUP__PDU14__ProcSending_template& IuUP__PDU14__Union_template::proc()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__Union::ALT_proc) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_proc = new IuUP__PDU14__ProcSending_template(ANY_VALUE);
else single_value.field_proc = new IuUP__PDU14__ProcSending_template;
single_value.union_selection = IuUP__PDU14__Union::ALT_proc;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_proc;
}

const IuUP__PDU14__ProcSending_template& IuUP__PDU14__Union_template::proc() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field proc in a non-specific template of union type @IuUP_Types.IuUP_PDU14_Union.");
if (single_value.union_selection != IuUP__PDU14__Union::ALT_proc) TTCN_error("Accessing non-selected field proc in a template of union type @IuUP_Types.IuUP_PDU14_Union.");
return *single_value.field_proc;
}

IuUP__PDU14__ACK_template& IuUP__PDU14__Union_template::ack()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__Union::ALT_ack) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ack = new IuUP__PDU14__ACK_template(ANY_VALUE);
else single_value.field_ack = new IuUP__PDU14__ACK_template;
single_value.union_selection = IuUP__PDU14__Union::ALT_ack;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ack;
}

const IuUP__PDU14__ACK_template& IuUP__PDU14__Union_template::ack() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ack in a non-specific template of union type @IuUP_Types.IuUP_PDU14_Union.");
if (single_value.union_selection != IuUP__PDU14__Union::ALT_ack) TTCN_error("Accessing non-selected field ack in a template of union type @IuUP_Types.IuUP_PDU14_Union.");
return *single_value.field_ack;
}

IuUP__PDU14__NACK_template& IuUP__PDU14__Union_template::nack()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__Union::ALT_nack) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_nack = new IuUP__PDU14__NACK_template(ANY_VALUE);
else single_value.field_nack = new IuUP__PDU14__NACK_template;
single_value.union_selection = IuUP__PDU14__Union::ALT_nack;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_nack;
}

const IuUP__PDU14__NACK_template& IuUP__PDU14__Union_template::nack() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field nack in a non-specific template of union type @IuUP_Types.IuUP_PDU14_Union.");
if (single_value.union_selection != IuUP__PDU14__Union::ALT_nack) TTCN_error("Accessing non-selected field nack in a template of union type @IuUP_Types.IuUP_PDU14_Union.");
return *single_value.field_nack;
}

boolean IuUP__PDU14__Union_template::ischosen(IuUP__PDU14__Union::union_selection_type checked_selection) const
{
if (checked_selection == IuUP__PDU14__Union::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IuUP_Types.IuUP_PDU14_Union.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == IuUP__PDU14__Union::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @IuUP_Types.IuUP_PDU14_Union.");
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 @IuUP_Types.IuUP_PDU14_Union 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 IuUP__PDU14__Union_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
TTCN_Logger::log_event_str("{ proc := ");
single_value.field_proc->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__Union::ALT_ack:
TTCN_Logger::log_event_str("{ ack := ");
single_value.field_ack->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__Union::ALT_nack:
TTCN_Logger::log_event_str("{ nack := ");
single_value.field_nack->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 IuUP__PDU14__Union_template::log_match(const IuUP__PDU14__Union& 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 IuUP__PDU14__Union::ALT_proc:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".proc");
single_value.field_proc->log_match(match_value.proc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ proc := ");
single_value.field_proc->log_match(match_value.proc(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__Union::ALT_ack:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ack");
single_value.field_ack->log_match(match_value.ack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ack := ");
single_value.field_ack->log_match(match_value.ack(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__Union::ALT_nack:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".nack");
single_value.field_nack->log_match(match_value.nack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ nack := ");
single_value.field_nack->log_match(match_value.nack(), 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 IuUP__PDU14__Union_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case IuUP__PDU14__Union::ALT_proc:
single_value.field_proc->set_implicit_omit(); break;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack->set_implicit_omit(); break;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU14__Union_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 IuUP__PDU14__Union::ALT_proc:
single_value.field_proc->encode_text(text_buf);
break;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack->encode_text(text_buf);
break;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @IuUP_Types.IuUP_PDU14_Union.");
}
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 @IuUP_Types.IuUP_PDU14_Union.");
}
}

void IuUP__PDU14__Union_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = IuUP__PDU14__Union::UNBOUND_VALUE;
IuUP__PDU14__Union::union_selection_type new_selection = (IuUP__PDU14__Union::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case IuUP__PDU14__Union::ALT_proc:
single_value.field_proc = new IuUP__PDU14__ProcSending_template;
single_value.field_proc->decode_text(text_buf);
break;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack = new IuUP__PDU14__ACK_template;
single_value.field_ack->decode_text(text_buf);
break;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack = new IuUP__PDU14__NACK_template;
single_value.field_nack->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @IuUP_Types.IuUP_PDU14_Union.");
}
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 IuUP__PDU14__Union_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 @IuUP_Types.IuUP_PDU14_Union.");
}
}

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

boolean IuUP__PDU14__Union_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 IuUP__PDU14__Union_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 `@IuUP_Types.IuUP_PDU14_Union'");
    }
    if (strcmp("proc", param_field) == 0) {
      proc().set_param(param);
      return;
    } else if (strcmp("ack", param_field) == 0) {
      ack().set_param(param);
      return;
    } else if (strcmp("nack", param_field) == 0) {
      nack().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@IuUP_Types.IuUP_PDU14_Union'", 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: {
    IuUP__PDU14__Union_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", "@IuUP_Types.IuUP_PDU14_Union");
    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, "proc")) {
      proc().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ack")) {
      ack().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "nack")) {
      nack().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @IuUP_Types.IuUP_PDU14_Union.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__Union_template* precondition = new IuUP__PDU14__Union_template;
    precondition->set_param(*m_p->get_elem(0));
    IuUP__PDU14__Union_template* implied_template = new IuUP__PDU14__Union_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = IuUP__PDU14__Union_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@IuUP_Types.IuUP_PDU14_Union");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__Union_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 IuUP__PDU14__Union::ALT_proc:
single_value.field_proc->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_Union");
return;
case IuUP__PDU14__Union::ALT_ack:
single_value.field_ack->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_Union");
return;
case IuUP__PDU14__Union::ALT_nack:
single_value.field_nack->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_Union");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @IuUP_Types.IuUP_PDU14_Union.");
}
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 : "@IuUP_Types.IuUP_PDU14_Union");
}

IuUP__PDU__Type__14__Common__Hdr::IuUP__PDU__Type__14__Common__Hdr()
{
}

IuUP__PDU__Type__14__Common__Hdr::IuUP__PDU__Type__14__Common__Hdr(const INTEGER& par_iuup__version,
    const IuUP__ProcedureIndicator& par_procedure__ind,
    const INTEGER& par_header__crc,
    const INTEGER& par_payload__crc)
  :   field_iuup__version(par_iuup__version),
  field_procedure__ind(par_procedure__ind),
  field_header__crc(par_header__crc),
  field_payload__crc(par_payload__crc)
{
}

IuUP__PDU__Type__14__Common__Hdr::IuUP__PDU__Type__14__Common__Hdr(const IuUP__PDU__Type__14__Common__Hdr& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
if (other_value.iuup__version().is_bound()) field_iuup__version = other_value.iuup__version();
else field_iuup__version.clean_up();
if (other_value.procedure__ind().is_bound()) field_procedure__ind = other_value.procedure__ind();
else field_procedure__ind.clean_up();
if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
else field_header__crc.clean_up();
if (other_value.payload__crc().is_bound()) field_payload__crc = other_value.payload__crc();
else field_payload__crc.clean_up();
}

void IuUP__PDU__Type__14__Common__Hdr::clean_up()
{
field_iuup__version.clean_up();
field_procedure__ind.clean_up();
field_header__crc.clean_up();
field_payload__crc.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU__Type__14__Common__Hdr::get_descriptor() const { return &IuUP__PDU__Type__14__Common__Hdr_descr_; }
IuUP__PDU__Type__14__Common__Hdr& IuUP__PDU__Type__14__Common__Hdr::operator=(const IuUP__PDU__Type__14__Common__Hdr& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
  if (other_value.iuup__version().is_bound()) field_iuup__version = other_value.iuup__version();
  else field_iuup__version.clean_up();
  if (other_value.procedure__ind().is_bound()) field_procedure__ind = other_value.procedure__ind();
  else field_procedure__ind.clean_up();
  if (other_value.header__crc().is_bound()) field_header__crc = other_value.header__crc();
  else field_header__crc.clean_up();
  if (other_value.payload__crc().is_bound()) field_payload__crc = other_value.payload__crc();
  else field_payload__crc.clean_up();
}
return *this;
}

boolean IuUP__PDU__Type__14__Common__Hdr::operator==(const IuUP__PDU__Type__14__Common__Hdr& other_value) const
{
return field_iuup__version==other_value.field_iuup__version
  && field_procedure__ind==other_value.field_procedure__ind
  && field_header__crc==other_value.field_header__crc
  && field_payload__crc==other_value.field_payload__crc;
}

boolean IuUP__PDU__Type__14__Common__Hdr::is_bound() const
{
return (field_iuup__version.is_bound())
  || (field_procedure__ind.is_bound())
  || (field_header__crc.is_bound())
  || (field_payload__crc.is_bound());
}
boolean IuUP__PDU__Type__14__Common__Hdr::is_value() const
{
return field_iuup__version.is_value()
  && field_procedure__ind.is_value()
  && field_header__crc.is_value()
  && field_payload__crc.is_value();
}
void IuUP__PDU__Type__14__Common__Hdr::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ iuup_version := ");
field_iuup__version.log();
TTCN_Logger::log_event_str(", procedure_ind := ");
field_procedure__ind.log();
TTCN_Logger::log_event_str(", header_crc := ");
field_header__crc.log();
TTCN_Logger::log_event_str(", payload_crc := ");
field_payload__crc.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU__Type__14__Common__Hdr::set_implicit_omit()
{
if (iuup__version().is_bound()) iuup__version().set_implicit_omit();
if (procedure__ind().is_bound()) procedure__ind().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (payload__crc().is_bound()) payload__crc().set_implicit_omit();
}

void IuUP__PDU__Type__14__Common__Hdr::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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr 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) iuup__version().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) procedure__ind().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) payload__crc().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(), "iuup_version")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iuup__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(), "procedure_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          procedure__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload__crc().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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
  }
}

void IuUP__PDU__Type__14__Common__Hdr::encode_text(Text_Buf& text_buf) const
{
field_iuup__version.encode_text(text_buf);
field_procedure__ind.encode_text(text_buf);
field_header__crc.encode_text(text_buf);
field_payload__crc.encode_text(text_buf);
}

void IuUP__PDU__Type__14__Common__Hdr::decode_text(Text_Buf& text_buf)
{
field_iuup__version.decode_text(text_buf);
field_procedure__ind.decode_text(text_buf);
field_header__crc.decode_text(text_buf);
field_payload__crc.decode_text(text_buf);
}

void IuUP__PDU__Type__14__Common__Hdr::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 IuUP__PDU__Type__14__Common__Hdr::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 IuUP__PDU__Type__14__Common__Hdr::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, IuUP__PDU__Type__14__Common__Hdr_iuup__version_descr_.raw->forceomit);
  decoded_field_length = field_iuup__version.RAW_decode(IuUP__PDU__Type__14__Common__Hdr_iuup__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, IuUP__PDU__Type__14__Common__Hdr_procedure__ind_descr_.raw->forceomit);
  decoded_field_length = field_procedure__ind.RAW_decode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_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, IuUP__PDU__Type__14__Common__Hdr_header__crc_descr_.raw->forceomit);
  decoded_field_length = field_header__crc.RAW_decode(IuUP__PDU__Type__14__Common__Hdr_header__crc_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, IuUP__PDU__Type__14__Common__Hdr_payload__crc_descr_.raw->forceomit);
  decoded_field_length = field_payload__crc.RAW_decode(IuUP__PDU__Type__14__Common__Hdr_payload__crc_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 IuUP__PDU__Type__14__Common__Hdr::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, IuUP__PDU__Type__14__Common__Hdr_iuup__version_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU__Type__14__Common__Hdr_procedure__ind_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU__Type__14__Common__Hdr_header__crc_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU__Type__14__Common__Hdr_payload__crc_descr_.raw);
  encoded_length += field_iuup__version.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_iuup__version_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_procedure__ind.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_header__crc.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_header__crc_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_payload__crc.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_payload__crc_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct IuUP__PDU__Type__14__Common__Hdr_template::single_value_struct {
INTEGER_template field_iuup__version;
IuUP__ProcedureIndicator_template field_procedure__ind;
INTEGER_template field_header__crc;
INTEGER_template field_payload__crc;
};

void IuUP__PDU__Type__14__Common__Hdr_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_iuup__version = ANY_VALUE;
single_value->field_procedure__ind = ANY_VALUE;
single_value->field_header__crc = ANY_VALUE;
single_value->field_payload__crc = ANY_VALUE;
}
}
}

void IuUP__PDU__Type__14__Common__Hdr_template::copy_value(const IuUP__PDU__Type__14__Common__Hdr& other_value)
{
single_value = new single_value_struct;
if (other_value.iuup__version().is_bound()) {
  single_value->field_iuup__version = other_value.iuup__version();
} else {
  single_value->field_iuup__version.clean_up();
}
if (other_value.procedure__ind().is_bound()) {
  single_value->field_procedure__ind = other_value.procedure__ind();
} else {
  single_value->field_procedure__ind.clean_up();
}
if (other_value.header__crc().is_bound()) {
  single_value->field_header__crc = other_value.header__crc();
} else {
  single_value->field_header__crc.clean_up();
}
if (other_value.payload__crc().is_bound()) {
  single_value->field_payload__crc = other_value.payload__crc();
} else {
  single_value->field_payload__crc.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU__Type__14__Common__Hdr_template::copy_template(const IuUP__PDU__Type__14__Common__Hdr_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.iuup__version().get_selection()) {
single_value->field_iuup__version = other_value.iuup__version();
} else {
single_value->field_iuup__version.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.procedure__ind().get_selection()) {
single_value->field_procedure__ind = other_value.procedure__ind();
} else {
single_value->field_procedure__ind.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.header__crc().get_selection()) {
single_value->field_header__crc = other_value.header__crc();
} else {
single_value->field_header__crc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.payload__crc().get_selection()) {
single_value->field_payload__crc = other_value.payload__crc();
} else {
single_value->field_payload__crc.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 IuUP__PDU__Type__14__Common__Hdr_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 IuUP__PDU__Type__14__Common__Hdr_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
break;
}
set_selection(other_value);
}

IuUP__PDU__Type__14__Common__Hdr_template::IuUP__PDU__Type__14__Common__Hdr_template()
{
}

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

IuUP__PDU__Type__14__Common__Hdr_template::IuUP__PDU__Type__14__Common__Hdr_template(const IuUP__PDU__Type__14__Common__Hdr& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU__Type__14__Common__Hdr_template::match(const IuUP__PDU__Type__14__Common__Hdr& 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.iuup__version().is_bound()) return FALSE;
if(!single_value->field_iuup__version.match(other_value.iuup__version(), legacy))return FALSE;
if(!other_value.procedure__ind().is_bound()) return FALSE;
if(!single_value->field_procedure__ind.match(other_value.procedure__ind(), legacy))return FALSE;
if(!other_value.header__crc().is_bound()) return FALSE;
if(!single_value->field_header__crc.match(other_value.header__crc(), legacy))return FALSE;
if(!other_value.payload__crc().is_bound()) return FALSE;
if(!single_value->field_payload__crc.match(other_value.payload__crc(), 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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
}
return FALSE;
}

boolean IuUP__PDU__Type__14__Common__Hdr_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_iuup__version.is_bound()
 || single_value->field_procedure__ind.is_bound()
 || single_value->field_header__crc.is_bound()
 || single_value->field_payload__crc.is_bound();
}

boolean IuUP__PDU__Type__14__Common__Hdr_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_iuup__version.is_value()
 && single_value->field_procedure__ind.is_value()
 && single_value->field_header__crc.is_value()
 && single_value->field_payload__crc.is_value();
}

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

IuUP__PDU__Type__14__Common__Hdr IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
IuUP__PDU__Type__14__Common__Hdr ret_val;
if (single_value->field_iuup__version.is_bound()) {
ret_val.iuup__version() = single_value->field_iuup__version.valueof();
}
if (single_value->field_procedure__ind.is_bound()) {
ret_val.procedure__ind() = single_value->field_procedure__ind.valueof();
}
if (single_value->field_header__crc.is_bound()) {
ret_val.header__crc() = single_value->field_header__crc.valueof();
}
if (single_value->field_payload__crc.is_bound()) {
ret_val.payload__crc() = single_value->field_payload__crc.valueof();
}
return ret_val;
}

void IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU__Type__14__Common__Hdr_template[list_length];
}

IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
return value_list.list_value[list_index];
}

INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::iuup__version()
{
set_specific();
return single_value->field_iuup__version;
}

const INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::iuup__version() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field iuup_version of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
return single_value->field_iuup__version;
}

IuUP__ProcedureIndicator_template& IuUP__PDU__Type__14__Common__Hdr_template::procedure__ind()
{
set_specific();
return single_value->field_procedure__ind;
}

const IuUP__ProcedureIndicator_template& IuUP__PDU__Type__14__Common__Hdr_template::procedure__ind() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field procedure_ind of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
return single_value->field_procedure__ind;
}

INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::header__crc()
{
set_specific();
return single_value->field_header__crc;
}

const INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::header__crc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field header_crc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
return single_value->field_header__crc;
}

INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::payload__crc()
{
set_specific();
return single_value->field_payload__crc;
}

const INTEGER_template& IuUP__PDU__Type__14__Common__Hdr_template::payload__crc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload_crc of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
return single_value->field_payload__crc;
}

int IuUP__PDU__Type__14__Common__Hdr_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr 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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr 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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
  }
  return 0;
}

void IuUP__PDU__Type__14__Common__Hdr_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ iuup_version := ");
single_value->field_iuup__version.log();
TTCN_Logger::log_event_str(", procedure_ind := ");
single_value->field_procedure__ind.log();
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log();
TTCN_Logger::log_event_str(", payload_crc := ");
single_value->field_payload__crc.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 IuUP__PDU__Type__14__Common__Hdr_template::log_match(const IuUP__PDU__Type__14__Common__Hdr& 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_iuup__version.match(match_value.iuup__version(), legacy)){
TTCN_Logger::log_logmatch_info(".iuup_version");
single_value->field_iuup__version.log_match(match_value.iuup__version(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_procedure__ind.match(match_value.procedure__ind(), legacy)){
TTCN_Logger::log_logmatch_info(".procedure_ind");
single_value->field_procedure__ind.log_match(match_value.procedure__ind(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_header__crc.match(match_value.header__crc(), legacy)){
TTCN_Logger::log_logmatch_info(".header_crc");
single_value->field_header__crc.log_match(match_value.header__crc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_payload__crc.match(match_value.payload__crc(), legacy)){
TTCN_Logger::log_logmatch_info(".payload_crc");
single_value->field_payload__crc.log_match(match_value.payload__crc(), 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("{ iuup_version := ");
single_value->field_iuup__version.log_match(match_value.iuup__version(), legacy);
TTCN_Logger::log_event_str(", procedure_ind := ");
single_value->field_procedure__ind.log_match(match_value.procedure__ind(), legacy);
TTCN_Logger::log_event_str(", header_crc := ");
single_value->field_header__crc.log_match(match_value.header__crc(), legacy);
TTCN_Logger::log_event_str(", payload_crc := ");
single_value->field_payload__crc.log_match(match_value.payload__crc(), 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 IuUP__PDU__Type__14__Common__Hdr_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (iuup__version().is_bound()) iuup__version().set_implicit_omit();
if (procedure__ind().is_bound()) procedure__ind().set_implicit_omit();
if (header__crc().is_bound()) header__crc().set_implicit_omit();
if (payload__crc().is_bound()) payload__crc().set_implicit_omit();
}

void IuUP__PDU__Type__14__Common__Hdr_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_iuup__version.encode_text(text_buf);
single_value->field_procedure__ind.encode_text(text_buf);
single_value->field_header__crc.encode_text(text_buf);
single_value->field_payload__crc.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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
}
}

void IuUP__PDU__Type__14__Common__Hdr_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_iuup__version.decode_text(text_buf);
single_value->field_procedure__ind.decode_text(text_buf);
single_value->field_header__crc.decode_text(text_buf);
single_value->field_payload__crc.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 IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr.");
}
}

void IuUP__PDU__Type__14__Common__Hdr_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: {
    IuUP__PDU__Type__14__Common__Hdr_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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr 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) iuup__version().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) procedure__ind().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) header__crc().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) payload__crc().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(), "iuup_version")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iuup__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(), "procedure_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          procedure__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "header_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          header__crc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload_crc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload__crc().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 @IuUP_Types.IuUP_PDU_Type_14_Common_Hdr: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU__Type__14__Common__Hdr_template* precondition = new IuUP__PDU__Type__14__Common__Hdr_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU__Type__14__Common__Hdr_template* implied_template = new IuUP__PDU__Type__14__Common__Hdr_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU__Type__14__Common__Hdr_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU__Type__14__Common__Hdr_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_iuup__version.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
single_value->field_procedure__ind.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
single_value->field_header__crc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
single_value->field_payload__crc.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
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 : "@IuUP_Types.IuUP_PDU_Type_14_Common_Hdr");
}

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

boolean IuUP__PDU__Type__14__Common__Hdr_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 IuUP__PDU14__ProcSendingUnion::copy_value(const IuUP__PDU14__ProcSendingUnion& other_value)
{
switch (other_value.union_selection) {
case ALT_init:
field_init = new IuUP__PDU14__ProcSending__INIT(*other_value.field_init);
break;
case ALT_rate__ctrl:
field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL(*other_value.field_rate__ctrl);
break;
case ALT_time__alignment:
field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT(*other_value.field_time__alignment);
break;
case ALT_error__event:
field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT(*other_value.field_error__event);
break;
case ALT_other:
field_other = new OCTETSTRING(*other_value.field_other);
break;
default:
TTCN_error("Assignment of an unbound union value of type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
union_selection = other_value.union_selection;
}

IuUP__PDU14__ProcSendingUnion::IuUP__PDU14__ProcSendingUnion()
{
union_selection = UNBOUND_VALUE;
}

IuUP__PDU14__ProcSendingUnion::IuUP__PDU14__ProcSendingUnion(const IuUP__PDU14__ProcSendingUnion& other_value)
: Base_Type(){
copy_value(other_value);
}

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

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

boolean IuUP__PDU14__ProcSendingUnion::operator==(const IuUP__PDU14__ProcSendingUnion& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_init:
return *field_init == *other_value.field_init;
case ALT_rate__ctrl:
return *field_rate__ctrl == *other_value.field_rate__ctrl;
case ALT_time__alignment:
return *field_time__alignment == *other_value.field_time__alignment;
case ALT_error__event:
return *field_error__event == *other_value.field_error__event;
case ALT_other:
return *field_other == *other_value.field_other;
default:
return FALSE;
}
}

IuUP__PDU14__ProcSending__INIT& IuUP__PDU14__ProcSendingUnion::init()
{
if (union_selection != ALT_init) {
clean_up();
field_init = new IuUP__PDU14__ProcSending__INIT;
union_selection = ALT_init;
}
return *field_init;
}

const IuUP__PDU14__ProcSending__INIT& IuUP__PDU14__ProcSendingUnion::init() const
{
if (union_selection != ALT_init) TTCN_error("Using non-selected field init in a value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *field_init;
}

IuUP__PDU14__ProcSending__RATE__CTRL& IuUP__PDU14__ProcSendingUnion::rate__ctrl()
{
if (union_selection != ALT_rate__ctrl) {
clean_up();
field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL;
union_selection = ALT_rate__ctrl;
}
return *field_rate__ctrl;
}

const IuUP__PDU14__ProcSending__RATE__CTRL& IuUP__PDU14__ProcSendingUnion::rate__ctrl() const
{
if (union_selection != ALT_rate__ctrl) TTCN_error("Using non-selected field rate_ctrl in a value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *field_rate__ctrl;
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT& IuUP__PDU14__ProcSendingUnion::time__alignment()
{
if (union_selection != ALT_time__alignment) {
clean_up();
field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT;
union_selection = ALT_time__alignment;
}
return *field_time__alignment;
}

const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& IuUP__PDU14__ProcSendingUnion::time__alignment() const
{
if (union_selection != ALT_time__alignment) TTCN_error("Using non-selected field time_alignment in a value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *field_time__alignment;
}

IuUP__PDU14__ProcSending__ERROR__EVENT& IuUP__PDU14__ProcSendingUnion::error__event()
{
if (union_selection != ALT_error__event) {
clean_up();
field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT;
union_selection = ALT_error__event;
}
return *field_error__event;
}

const IuUP__PDU14__ProcSending__ERROR__EVENT& IuUP__PDU14__ProcSendingUnion::error__event() const
{
if (union_selection != ALT_error__event) TTCN_error("Using non-selected field error_event in a value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *field_error__event;
}

OCTETSTRING& IuUP__PDU14__ProcSendingUnion::other()
{
if (union_selection != ALT_other) {
clean_up();
field_other = new OCTETSTRING;
union_selection = ALT_other;
}
return *field_other;
}

const OCTETSTRING& IuUP__PDU14__ProcSendingUnion::other() const
{
if (union_selection != ALT_other) TTCN_error("Using non-selected field other in a value of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *field_other;
}

boolean IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return union_selection == checked_selection;
}

boolean IuUP__PDU14__ProcSendingUnion::is_bound() const
{
  return union_selection != UNBOUND_VALUE;
}

boolean IuUP__PDU14__ProcSendingUnion::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_init: return field_init->is_value();
case ALT_rate__ctrl: return field_rate__ctrl->is_value();
case ALT_time__alignment: return field_time__alignment->is_value();
case ALT_error__event: return field_error__event->is_value();
case ALT_other: return field_other->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void IuUP__PDU14__ProcSendingUnion::clean_up()
{
switch (union_selection) {
case ALT_init:
  delete field_init;
  break;
case ALT_rate__ctrl:
  delete field_rate__ctrl;
  break;
case ALT_time__alignment:
  delete field_time__alignment;
  break;
case ALT_error__event:
  delete field_error__event;
  break;
case ALT_other:
  delete field_other;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void IuUP__PDU14__ProcSendingUnion::log() const
{
switch (union_selection) {
case ALT_init:
TTCN_Logger::log_event_str("{ init := ");
field_init->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_rate__ctrl:
TTCN_Logger::log_event_str("{ rate_ctrl := ");
field_rate__ctrl->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_time__alignment:
TTCN_Logger::log_event_str("{ time_alignment := ");
field_time__alignment->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_error__event:
TTCN_Logger::log_event_str("{ error_event := ");
field_error__event->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 IuUP__PDU14__ProcSendingUnion::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, "init")) {
    init().set_param(*mp_last);
    if (!init().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "rate_ctrl")) {
    rate__ctrl().set_param(*mp_last);
    if (!rate__ctrl().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "time_alignment")) {
    time__alignment().set_param(*mp_last);
    if (!time__alignment().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "error_event")) {
    error__event().set_param(*mp_last);
    if (!error__event().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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.", last_name);
}

void IuUP__PDU14__ProcSendingUnion::set_implicit_omit()
{
switch (union_selection) {
case ALT_init:
field_init->set_implicit_omit(); break;
case ALT_rate__ctrl:
field_rate__ctrl->set_implicit_omit(); break;
case ALT_time__alignment:
field_time__alignment->set_implicit_omit(); break;
case ALT_error__event:
field_error__event->set_implicit_omit(); break;
case ALT_other:
field_other->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU14__ProcSendingUnion::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_init:
field_init->encode_text(text_buf);
break;
case ALT_rate__ctrl:
field_rate__ctrl->encode_text(text_buf);
break;
case ALT_time__alignment:
field_time__alignment->encode_text(text_buf);
break;
case ALT_error__event:
field_error__event->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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}

void IuUP__PDU14__ProcSendingUnion::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_init:
init().decode_text(text_buf);
break;
case ALT_rate__ctrl:
rate__ctrl().decode_text(text_buf);
break;
case ALT_time__alignment:
time__alignment().decode_text(text_buf);
break;
case ALT_error__event:
error__event().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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}

void IuUP__PDU14__ProcSendingUnion::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 IuUP__PDU14__ProcSendingUnion::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 IuUP__PDU14__ProcSendingUnion::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, IuUP__PDU14__ProcSendingUnion_init_descr_.raw->forceomit);
      decoded_length = init().RAW_decode(IuUP__PDU14__ProcSendingUnion_init_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, IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_.raw->forceomit);
      decoded_length = rate__ctrl().RAW_decode(IuUP__PDU14__ProcSendingUnion_rate__ctrl_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, IuUP__PDU14__ProcSendingUnion_time__alignment_descr_.raw->forceomit);
      decoded_length = time__alignment().RAW_decode(IuUP__PDU14__ProcSendingUnion_time__alignment_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 3: {
      RAW_Force_Omit field_force_omit(3, force_omit, IuUP__PDU14__ProcSendingUnion_error__event_descr_.raw->forceomit);
      decoded_length = error__event().RAW_decode(IuUP__PDU14__ProcSendingUnion_error__event_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 4: {
      RAW_Force_Omit field_force_omit(4, force_omit, IuUP__PDU14__ProcSendingUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(IuUP__PDU14__ProcSendingUnion_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, IuUP__PDU14__ProcSendingUnion_init_descr_.raw->forceomit);
      decoded_length = init().RAW_decode(IuUP__PDU14__ProcSendingUnion_init_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, IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_.raw->forceomit);
      decoded_length = rate__ctrl().RAW_decode(IuUP__PDU14__ProcSendingUnion_rate__ctrl_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, IuUP__PDU14__ProcSendingUnion_time__alignment_descr_.raw->forceomit);
      decoded_length = time__alignment().RAW_decode(IuUP__PDU14__ProcSendingUnion_time__alignment_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;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, IuUP__PDU14__ProcSendingUnion_error__event_descr_.raw->forceomit);
      decoded_length = error__event().RAW_decode(IuUP__PDU14__ProcSendingUnion_error__event_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_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_4_force_omit(4, force_omit, IuUP__PDU14__ProcSendingUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(IuUP__PDU14__ProcSendingUnion_other_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int IuUP__PDU14__ProcSendingUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  memset(myleaf.body.node.nodes, 0, 5 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_init:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, IuUP__PDU14__ProcSendingUnion_init_descr_.raw);
    encoded_length = field_init->RAW_encode(IuUP__PDU14__ProcSendingUnion_init_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &IuUP__PDU14__ProcSendingUnion_init_descr_;
    break;
  case ALT_rate__ctrl:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_.raw);
    encoded_length = field_rate__ctrl->RAW_encode(IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &IuUP__PDU14__ProcSendingUnion_rate__ctrl_descr_;
    break;
  case ALT_time__alignment:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, IuUP__PDU14__ProcSendingUnion_time__alignment_descr_.raw);
    encoded_length = field_time__alignment->RAW_encode(IuUP__PDU14__ProcSendingUnion_time__alignment_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &IuUP__PDU14__ProcSendingUnion_time__alignment_descr_;
    break;
  case ALT_error__event:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, IuUP__PDU14__ProcSendingUnion_error__event_descr_.raw);
    encoded_length = field_error__event->RAW_encode(IuUP__PDU14__ProcSendingUnion_error__event_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &IuUP__PDU14__ProcSendingUnion_error__event_descr_;
    break;
  case ALT_other:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, IuUP__PDU14__ProcSendingUnion_other_descr_.raw);
    encoded_length = field_other->RAW_encode(IuUP__PDU14__ProcSendingUnion_other_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &IuUP__PDU14__ProcSendingUnion_other_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void IuUP__PDU14__ProcSendingUnion_template::copy_value(const IuUP__PDU14__ProcSendingUnion& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init = new IuUP__PDU14__ProcSending__INIT_template(other_value.init());
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL_template(other_value.rate__ctrl());
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(other_value.time__alignment());
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT_template(other_value.error__event());
break;
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__ProcSendingUnion_template::copy_template(const IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init = new IuUP__PDU14__ProcSending__INIT_template(*other_value.single_value.field_init);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL_template(*other_value.single_value.field_rate__ctrl);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(*other_value.single_value.field_time__alignment);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT_template(*other_value.single_value.field_error__event);
break;
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
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 IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSendingUnion_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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
set_selection(other_value);
}

IuUP__PDU14__ProcSendingUnion_template::IuUP__PDU14__ProcSendingUnion_template()
{
}

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

IuUP__PDU14__ProcSendingUnion_template::IuUP__PDU14__ProcSendingUnion_template(const IuUP__PDU14__ProcSendingUnion& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void IuUP__PDU14__ProcSendingUnion_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
delete single_value.field_init;
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
delete single_value.field_rate__ctrl;
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
delete single_value.field_time__alignment;
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
delete single_value.field_error__event;
break;
case IuUP__PDU14__ProcSendingUnion::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;
}

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

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

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

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

boolean IuUP__PDU14__ProcSendingUnion_template::match(const IuUP__PDU14__ProcSendingUnion& 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:
{
IuUP__PDU14__ProcSendingUnion::union_selection_type value_selection = other_value.get_selection();
if (value_selection == IuUP__PDU14__ProcSendingUnion::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
return single_value.field_init->match(other_value.init(), legacy);
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
return single_value.field_rate__ctrl->match(other_value.rate__ctrl(), legacy);
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
return single_value.field_time__alignment->match(other_value.time__alignment(), legacy);
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
return single_value.field_error__event->match(other_value.error__event(), legacy);
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}
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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
return FALSE;
}

boolean IuUP__PDU14__ProcSendingUnion_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
return single_value.field_init->is_value();
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
return single_value.field_rate__ctrl->is_value();
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
return single_value.field_time__alignment->is_value();
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
return single_value.field_error__event->is_value();
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}

IuUP__PDU14__ProcSendingUnion IuUP__PDU14__ProcSendingUnion_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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
IuUP__PDU14__ProcSendingUnion ret_val;
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
ret_val.init() = single_value.field_init->valueof();
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
ret_val.rate__ctrl() = single_value.field_rate__ctrl->valueof();
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
ret_val.time__alignment() = single_value.field_time__alignment->valueof();
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
ret_val.error__event() = single_value.field_error__event->valueof();
break;
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
return ret_val;
}

IuUP__PDU14__ProcSendingUnion_template& IuUP__PDU14__ProcSendingUnion_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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return value_list.list_value[list_index];
}
void IuUP__PDU14__ProcSendingUnion_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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSendingUnion_template[list_length];
}

IuUP__PDU14__ProcSending__INIT_template& IuUP__PDU14__ProcSendingUnion_template::init()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_init) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_init = new IuUP__PDU14__ProcSending__INIT_template(ANY_VALUE);
else single_value.field_init = new IuUP__PDU14__ProcSending__INIT_template;
single_value.union_selection = IuUP__PDU14__ProcSendingUnion::ALT_init;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_init;
}

const IuUP__PDU14__ProcSending__INIT_template& IuUP__PDU14__ProcSendingUnion_template::init() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field init in a non-specific template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_init) TTCN_error("Accessing non-selected field init in a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *single_value.field_init;
}

IuUP__PDU14__ProcSending__RATE__CTRL_template& IuUP__PDU14__ProcSendingUnion_template::rate__ctrl()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL_template(ANY_VALUE);
else single_value.field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL_template;
single_value.union_selection = IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_rate__ctrl;
}

const IuUP__PDU14__ProcSending__RATE__CTRL_template& IuUP__PDU14__ProcSendingUnion_template::rate__ctrl() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field rate_ctrl in a non-specific template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl) TTCN_error("Accessing non-selected field rate_ctrl in a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *single_value.field_rate__ctrl;
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template& IuUP__PDU14__ProcSendingUnion_template::time__alignment()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_time__alignment) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(ANY_VALUE);
else single_value.field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template;
single_value.union_selection = IuUP__PDU14__ProcSendingUnion::ALT_time__alignment;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_time__alignment;
}

const IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template& IuUP__PDU14__ProcSendingUnion_template::time__alignment() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field time_alignment in a non-specific template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_time__alignment) TTCN_error("Accessing non-selected field time_alignment in a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *single_value.field_time__alignment;
}

IuUP__PDU14__ProcSending__ERROR__EVENT_template& IuUP__PDU14__ProcSendingUnion_template::error__event()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_error__event) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT_template(ANY_VALUE);
else single_value.field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT_template;
single_value.union_selection = IuUP__PDU14__ProcSendingUnion::ALT_error__event;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_error__event;
}

const IuUP__PDU14__ProcSending__ERROR__EVENT_template& IuUP__PDU14__ProcSendingUnion_template::error__event() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field error_event in a non-specific template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_error__event) TTCN_error("Accessing non-selected field error_event in a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *single_value.field_error__event;
}

OCTETSTRING_template& IuUP__PDU14__ProcSendingUnion_template::other()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU14__ProcSendingUnion::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 = IuUP__PDU14__ProcSendingUnion::ALT_other;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_other;
}

const OCTETSTRING_template& IuUP__PDU14__ProcSendingUnion_template::other() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field other in a non-specific template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
if (single_value.union_selection != IuUP__PDU14__ProcSendingUnion::ALT_other) TTCN_error("Accessing non-selected field other in a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
return *single_value.field_other;
}

boolean IuUP__PDU14__ProcSendingUnion_template::ischosen(IuUP__PDU14__ProcSendingUnion::union_selection_type checked_selection) const
{
if (checked_selection == IuUP__PDU14__ProcSendingUnion::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == IuUP__PDU14__ProcSendingUnion::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion 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 IuUP__PDU14__ProcSendingUnion_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
TTCN_Logger::log_event_str("{ init := ");
single_value.field_init->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
TTCN_Logger::log_event_str("{ rate_ctrl := ");
single_value.field_rate__ctrl->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
TTCN_Logger::log_event_str("{ time_alignment := ");
single_value.field_time__alignment->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
TTCN_Logger::log_event_str("{ error_event := ");
single_value.field_error__event->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU14__ProcSendingUnion::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 IuUP__PDU14__ProcSendingUnion_template::log_match(const IuUP__PDU14__ProcSendingUnion& 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 IuUP__PDU14__ProcSendingUnion::ALT_init:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".init");
single_value.field_init->log_match(match_value.init(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ init := ");
single_value.field_init->log_match(match_value.init(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".rate_ctrl");
single_value.field_rate__ctrl->log_match(match_value.rate__ctrl(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ rate_ctrl := ");
single_value.field_rate__ctrl->log_match(match_value.rate__ctrl(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".time_alignment");
single_value.field_time__alignment->log_match(match_value.time__alignment(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ time_alignment := ");
single_value.field_time__alignment->log_match(match_value.time__alignment(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".error_event");
single_value.field_error__event->log_match(match_value.error__event(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ error_event := ");
single_value.field_error__event->log_match(match_value.error__event(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU14__ProcSendingUnion::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 IuUP__PDU14__ProcSendingUnion_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init->set_implicit_omit(); break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl->set_implicit_omit(); break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment->set_implicit_omit(); break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event->set_implicit_omit(); break;
case IuUP__PDU14__ProcSendingUnion::ALT_other:
single_value.field_other->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init->encode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl->encode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment->encode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event->encode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}

void IuUP__PDU14__ProcSendingUnion_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = IuUP__PDU14__ProcSendingUnion::UNBOUND_VALUE;
IuUP__PDU14__ProcSendingUnion::union_selection_type new_selection = (IuUP__PDU14__ProcSendingUnion::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init = new IuUP__PDU14__ProcSending__INIT_template;
single_value.field_init->decode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl = new IuUP__PDU14__ProcSending__RATE__CTRL_template;
single_value.field_rate__ctrl->decode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template;
single_value.field_time__alignment->decode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event = new IuUP__PDU14__ProcSending__ERROR__EVENT_template;
single_value.field_error__event->decode_text(text_buf);
break;
case IuUP__PDU14__ProcSendingUnion::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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
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 IuUP__PDU14__ProcSendingUnion_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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
}

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

boolean IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion_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 `@IuUP_Types.IuUP_PDU14_ProcSendingUnion'");
    }
    if (strcmp("init", param_field) == 0) {
      init().set_param(param);
      return;
    } else if (strcmp("rate_ctrl", param_field) == 0) {
      rate__ctrl().set_param(param);
      return;
    } else if (strcmp("time_alignment", param_field) == 0) {
      time__alignment().set_param(param);
      return;
    } else if (strcmp("error_event", param_field) == 0) {
      error__event().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 `@IuUP_Types.IuUP_PDU14_ProcSendingUnion'", 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: {
    IuUP__PDU14__ProcSendingUnion_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", "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
    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, "init")) {
      init().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "rate_ctrl")) {
      rate__ctrl().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "time_alignment")) {
      time__alignment().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "error_event")) {
      error__event().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 @IuUP_Types.IuUP_PDU14_ProcSendingUnion.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSendingUnion_template* precondition = new IuUP__PDU14__ProcSendingUnion_template;
    precondition->set_param(*m_p->get_elem(0));
    IuUP__PDU14__ProcSendingUnion_template* implied_template = new IuUP__PDU14__ProcSendingUnion_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = IuUP__PDU14__ProcSendingUnion_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSendingUnion_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 IuUP__PDU14__ProcSendingUnion::ALT_init:
single_value.field_init->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
return;
case IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
single_value.field_rate__ctrl->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
return;
case IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
single_value.field_time__alignment->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
return;
case IuUP__PDU14__ProcSendingUnion::ALT_error__event:
single_value.field_error__event->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
return;
case IuUP__PDU14__ProcSendingUnion::ALT_other:
single_value.field_other->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @IuUP_Types.IuUP_PDU14_ProcSendingUnion.");
}
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 : "@IuUP_Types.IuUP_PDU14_ProcSendingUnion");
}

IuUP__InitRfci::IuUP__InitRfci()
{
}

IuUP__InitRfci::IuUP__InitRfci(const BOOLEAN& par_lri,
    const BOOLEAN& par_li,
    const INTEGER& par_rfci__id,
    const OPTIONAL< RecOfU8 >& par_len8,
    const OPTIONAL< RecOfU16 >& par_len16,
    const OPTIONAL< IuUP__InitRfci >& par_rfci)
  :   field_lri(par_lri),
  field_li(par_li),
  field_rfci__id(par_rfci__id),
  field_len8(par_len8),
  field_len16(par_len16),
  field_rfci(par_rfci)
{
}

IuUP__InitRfci::IuUP__InitRfci(const IuUP__InitRfci& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_InitRfci.");
if (other_value.lri().is_bound()) field_lri = other_value.lri();
else field_lri.clean_up();
if (other_value.li().is_bound()) field_li = other_value.li();
else field_li.clean_up();
if (other_value.rfci__id().is_bound()) field_rfci__id = other_value.rfci__id();
else field_rfci__id.clean_up();
if (other_value.len8().is_bound()) field_len8 = other_value.len8();
else field_len8.clean_up();
if (other_value.len16().is_bound()) field_len16 = other_value.len16();
else field_len16.clean_up();
if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
else field_rfci.clean_up();
}

void IuUP__InitRfci::clean_up()
{
field_lri.clean_up();
field_li.clean_up();
field_rfci__id.clean_up();
field_len8.clean_up();
field_len16.clean_up();
field_rfci.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__InitRfci::get_descriptor() const { return &IuUP__InitRfci_descr_; }
IuUP__InitRfci& IuUP__InitRfci::operator=(const IuUP__InitRfci& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_InitRfci.");
  if (other_value.lri().is_bound()) field_lri = other_value.lri();
  else field_lri.clean_up();
  if (other_value.li().is_bound()) field_li = other_value.li();
  else field_li.clean_up();
  if (other_value.rfci__id().is_bound()) field_rfci__id = other_value.rfci__id();
  else field_rfci__id.clean_up();
  if (other_value.len8().is_bound()) field_len8 = other_value.len8();
  else field_len8.clean_up();
  if (other_value.len16().is_bound()) field_len16 = other_value.len16();
  else field_len16.clean_up();
  if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
  else field_rfci.clean_up();
}
return *this;
}

boolean IuUP__InitRfci::operator==(const IuUP__InitRfci& other_value) const
{
return field_lri==other_value.field_lri
  && field_li==other_value.field_li
  && field_rfci__id==other_value.field_rfci__id
  && field_len8==other_value.field_len8
  && field_len16==other_value.field_len16
  && field_rfci==other_value.field_rfci;
}

boolean IuUP__InitRfci::is_bound() const
{
return (field_lri.is_bound())
  || (field_li.is_bound())
  || (field_rfci__id.is_bound())
  || (OPTIONAL_OMIT == field_len8.get_selection() || field_len8.is_bound())
  || (OPTIONAL_OMIT == field_len16.get_selection() || field_len16.is_bound())
  || (OPTIONAL_OMIT == field_rfci.get_selection() || field_rfci.is_bound());
}
boolean IuUP__InitRfci::is_value() const
{
return field_lri.is_value()
  && field_li.is_value()
  && field_rfci__id.is_value()
  && (OPTIONAL_OMIT == field_len8.get_selection() || field_len8.is_value())
  && (OPTIONAL_OMIT == field_len16.get_selection() || field_len16.is_value())
  && (OPTIONAL_OMIT == field_rfci.get_selection() || field_rfci.is_value());
}
int IuUP__InitRfci::size_of() const
{
  int ret_val = 3;
  if (field_len8.ispresent()) ret_val++;
  if (field_len16.ispresent()) ret_val++;
  if (field_rfci.ispresent()) ret_val++;
  return ret_val;
}

void IuUP__InitRfci::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ lri := ");
field_lri.log();
TTCN_Logger::log_event_str(", li := ");
field_li.log();
TTCN_Logger::log_event_str(", rfci_id := ");
field_rfci__id.log();
TTCN_Logger::log_event_str(", len8 := ");
field_len8.log();
TTCN_Logger::log_event_str(", len16 := ");
field_len16.log();
TTCN_Logger::log_event_str(", rfci := ");
field_rfci.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__InitRfci::set_implicit_omit()
{
if (lri().is_bound()) lri().set_implicit_omit();
if (li().is_bound()) li().set_implicit_omit();
if (rfci__id().is_bound()) rfci__id().set_implicit_omit();
if (!len8().is_bound()) len8() = OMIT_VALUE;
else len8().set_implicit_omit();
if (!len16().is_bound()) len16() = OMIT_VALUE;
else len16().set_implicit_omit();
if (!rfci().is_bound()) rfci() = OMIT_VALUE;
else rfci().set_implicit_omit();
}

void IuUP__InitRfci::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 @IuUP_Types.IuUP_InitRfci 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) lri().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) li().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) rfci__id().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) len8().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) len16().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) rfci().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(), "lri")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lri().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "li")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          li().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci__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(), "len8")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len8().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "len16")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len16().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().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 @IuUP_Types.IuUP_InitRfci: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_InitRfci");
  }
}

void IuUP__InitRfci::encode_text(Text_Buf& text_buf) const
{
field_lri.encode_text(text_buf);
field_li.encode_text(text_buf);
field_rfci__id.encode_text(text_buf);
field_len8.encode_text(text_buf);
field_len16.encode_text(text_buf);
field_rfci.encode_text(text_buf);
}

void IuUP__InitRfci::decode_text(Text_Buf& text_buf)
{
field_lri.decode_text(text_buf);
field_li.decode_text(text_buf);
field_rfci__id.decode_text(text_buf);
field_len8.decode_text(text_buf);
field_len16.decode_text(text_buf);
field_rfci.decode_text(text_buf);
}

void IuUP__InitRfci::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 IuUP__InitRfci::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 IuUP__InitRfci::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, IuUP__InitRfci_lri_descr_.raw->forceomit);
  decoded_field_length = field_lri.RAW_decode(IuUP__InitRfci_lri_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, IuUP__InitRfci_li_descr_.raw->forceomit);
  decoded_field_length = field_li.RAW_decode(IuUP__InitRfci_li_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, IuUP__InitRfci_rfci__id_descr_.raw->forceomit);
  decoded_field_length = field_rfci__id.RAW_decode(IuUP__InitRfci_rfci__id_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());
  if (limit > 0 && field_li == FALSE){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_len8 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, IuUP__InitRfci_len8_descr_.raw->forceomit);
  decoded_field_length = field_len8().RAW_decode(IuUP__InitRfci_len8_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_len8 = 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_len8=OMIT_VALUE;
  if (limit > 0 && field_li == TRUE){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_len16 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, IuUP__InitRfci_len16_descr_.raw->forceomit);
  decoded_field_length = field_len16().RAW_decode(IuUP__InitRfci_len16_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_len16 = 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_len16=OMIT_VALUE;
  if (limit > 0 && field_lri == FALSE){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_rfci = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, IuUP__InitRfci_rfci_descr_.raw->forceomit);
  decoded_field_length = field_rfci().RAW_decode(IuUP__InitRfci_rfci_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_rfci = 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_rfci=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int IuUP__InitRfci::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, IuUP__InitRfci_lri_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__InitRfci_li_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__InitRfci_rfci__id_descr_.raw);
  if (field_len8.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__InitRfci_len8_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_len16.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IuUP__InitRfci_len16_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_rfci.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IuUP__InitRfci_rfci_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  encoded_length += field_lri.RAW_encode(IuUP__InitRfci_lri_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_li.RAW_encode(IuUP__InitRfci_li_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_rfci__id.RAW_encode(IuUP__InitRfci_rfci__id_descr_, *myleaf.body.node.nodes[2]);
  if (field_len8.ispresent()) {
  encoded_length += field_len8().RAW_encode(IuUP__InitRfci_len8_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_len16.ispresent()) {
  encoded_length += field_len16().RAW_encode(IuUP__InitRfci_len16_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_rfci.ispresent()) {
  encoded_length += field_rfci().RAW_encode(IuUP__InitRfci_rfci_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_len8.ispresent() && (field_li != FALSE)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={1};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  BOOLEAN new_val = FALSE;
  new_val.RAW_encode(IuUP__InitRfci_li_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_len16.ispresent() && (field_li != TRUE)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={1};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  BOOLEAN new_val = TRUE;
  new_val.RAW_encode(IuUP__InitRfci_li_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_rfci.ispresent() && (field_lri != FALSE)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  BOOLEAN new_val = FALSE;
  new_val.RAW_encode(IuUP__InitRfci_lri_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct IuUP__InitRfci_template::single_value_struct {
BOOLEAN_template field_lri;
BOOLEAN_template field_li;
INTEGER_template field_rfci__id;
RecOfU8_template field_len8;
RecOfU16_template field_len16;
IuUP__InitRfci_template field_rfci;
};

void IuUP__InitRfci_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_lri = ANY_VALUE;
single_value->field_li = ANY_VALUE;
single_value->field_rfci__id = ANY_VALUE;
single_value->field_len8 = ANY_OR_OMIT;
single_value->field_len16 = ANY_OR_OMIT;
single_value->field_rfci = ANY_OR_OMIT;
}
}
}

void IuUP__InitRfci_template::copy_value(const IuUP__InitRfci& other_value)
{
single_value = new single_value_struct;
if (other_value.lri().is_bound()) {
  single_value->field_lri = other_value.lri();
} else {
  single_value->field_lri.clean_up();
}
if (other_value.li().is_bound()) {
  single_value->field_li = other_value.li();
} else {
  single_value->field_li.clean_up();
}
if (other_value.rfci__id().is_bound()) {
  single_value->field_rfci__id = other_value.rfci__id();
} else {
  single_value->field_rfci__id.clean_up();
}
if (other_value.len8().is_bound()) {
  if (other_value.len8().ispresent()) single_value->field_len8 = other_value.len8()();
  else single_value->field_len8 = OMIT_VALUE;
} else {
  single_value->field_len8.clean_up();
}
if (other_value.len16().is_bound()) {
  if (other_value.len16().ispresent()) single_value->field_len16 = other_value.len16()();
  else single_value->field_len16 = OMIT_VALUE;
} else {
  single_value->field_len16.clean_up();
}
if (other_value.rfci().is_bound()) {
  if (other_value.rfci().ispresent()) single_value->field_rfci = other_value.rfci()();
  else single_value->field_rfci = OMIT_VALUE;
} else {
  single_value->field_rfci.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__InitRfci_template::copy_template(const IuUP__InitRfci_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.lri().get_selection()) {
single_value->field_lri = other_value.lri();
} else {
single_value->field_lri.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.li().get_selection()) {
single_value->field_li = other_value.li();
} else {
single_value->field_li.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci__id().get_selection()) {
single_value->field_rfci__id = other_value.rfci__id();
} else {
single_value->field_rfci__id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.len8().get_selection()) {
single_value->field_len8 = other_value.len8();
} else {
single_value->field_len8.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.len16().get_selection()) {
single_value->field_len16 = other_value.len16();
} else {
single_value->field_len16.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci().get_selection()) {
single_value->field_rfci = other_value.rfci();
} else {
single_value->field_rfci.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 IuUP__InitRfci_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 IuUP__InitRfci_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci.");
break;
}
set_selection(other_value);
}

IuUP__InitRfci_template::IuUP__InitRfci_template()
{
}

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

IuUP__InitRfci_template::IuUP__InitRfci_template(const IuUP__InitRfci& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__InitRfci_template::match(const IuUP__InitRfci& 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.lri().is_bound()) return FALSE;
if(!single_value->field_lri.match(other_value.lri(), legacy))return FALSE;
if(!other_value.li().is_bound()) return FALSE;
if(!single_value->field_li.match(other_value.li(), legacy))return FALSE;
if(!other_value.rfci__id().is_bound()) return FALSE;
if(!single_value->field_rfci__id.match(other_value.rfci__id(), legacy))return FALSE;
if(!other_value.len8().is_bound()) return FALSE;
if((other_value.len8().ispresent() ? !single_value->field_len8.match((const RecOfU8&)other_value.len8(), legacy) : !single_value->field_len8.match_omit(legacy)))return FALSE;
if(!other_value.len16().is_bound()) return FALSE;
if((other_value.len16().ispresent() ? !single_value->field_len16.match((const RecOfU16&)other_value.len16(), legacy) : !single_value->field_len16.match_omit(legacy)))return FALSE;
if(!other_value.rfci().is_bound()) return FALSE;
if((other_value.rfci().ispresent() ? !single_value->field_rfci.match((const IuUP__InitRfci&)other_value.rfci(), legacy) : !single_value->field_rfci.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 @IuUP_Types.IuUP_InitRfci.");
}
return FALSE;
}

boolean IuUP__InitRfci_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_lri.is_bound()
 || single_value->field_li.is_bound()
 || single_value->field_rfci__id.is_bound()
 || (single_value->field_len8.is_omit() || single_value->field_len8.is_bound())
 || (single_value->field_len16.is_omit() || single_value->field_len16.is_bound())
 || (single_value->field_rfci.is_omit() || single_value->field_rfci.is_bound());
}

boolean IuUP__InitRfci_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_lri.is_value()
 && single_value->field_li.is_value()
 && single_value->field_rfci__id.is_value()
 && (single_value->field_len8.is_omit() || single_value->field_len8.is_value())
 && (single_value->field_len16.is_omit() || single_value->field_len16.is_value())
 && (single_value->field_rfci.is_omit() || single_value->field_rfci.is_value());
}

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

IuUP__InitRfci IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci.");
IuUP__InitRfci ret_val;
if (single_value->field_lri.is_bound()) {
ret_val.lri() = single_value->field_lri.valueof();
}
if (single_value->field_li.is_bound()) {
ret_val.li() = single_value->field_li.valueof();
}
if (single_value->field_rfci__id.is_bound()) {
ret_val.rfci__id() = single_value->field_rfci__id.valueof();
}
if (single_value->field_len8.is_omit()) ret_val.len8() = OMIT_VALUE;
else if (single_value->field_len8.is_bound()) {
ret_val.len8() = single_value->field_len8.valueof();
}
if (single_value->field_len16.is_omit()) ret_val.len16() = OMIT_VALUE;
else if (single_value->field_len16.is_bound()) {
ret_val.len16() = single_value->field_len16.valueof();
}
if (single_value->field_rfci.is_omit()) ret_val.rfci() = OMIT_VALUE;
else if (single_value->field_rfci.is_bound()) {
ret_val.rfci() = single_value->field_rfci.valueof();
}
return ret_val;
}

void IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__InitRfci_template[list_length];
}

IuUP__InitRfci_template& IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_InitRfci.");
return value_list.list_value[list_index];
}

BOOLEAN_template& IuUP__InitRfci_template::lri()
{
set_specific();
return single_value->field_lri;
}

const BOOLEAN_template& IuUP__InitRfci_template::lri() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lri of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_lri;
}

BOOLEAN_template& IuUP__InitRfci_template::li()
{
set_specific();
return single_value->field_li;
}

const BOOLEAN_template& IuUP__InitRfci_template::li() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field li of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_li;
}

INTEGER_template& IuUP__InitRfci_template::rfci__id()
{
set_specific();
return single_value->field_rfci__id;
}

const INTEGER_template& IuUP__InitRfci_template::rfci__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci_id of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_rfci__id;
}

RecOfU8_template& IuUP__InitRfci_template::len8()
{
set_specific();
return single_value->field_len8;
}

const RecOfU8_template& IuUP__InitRfci_template::len8() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len8 of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_len8;
}

RecOfU16_template& IuUP__InitRfci_template::len16()
{
set_specific();
return single_value->field_len16;
}

const RecOfU16_template& IuUP__InitRfci_template::len16() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len16 of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_len16;
}

IuUP__InitRfci_template& IuUP__InitRfci_template::rfci()
{
set_specific();
return single_value->field_rfci;
}

const IuUP__InitRfci_template& IuUP__InitRfci_template::rfci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci of a non-specific template of type @IuUP_Types.IuUP_InitRfci.");
return single_value->field_rfci;
}

int IuUP__InitRfci_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 3;
      if (single_value->field_len8.is_present()) ret_val++;
      if (single_value->field_len16.is_present()) ret_val++;
      if (single_value->field_rfci.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 @IuUP_Types.IuUP_InitRfci 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 @IuUP_Types.IuUP_InitRfci containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_InitRfci containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_InitRfci.");
  }
  return 0;
}

void IuUP__InitRfci_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ lri := ");
single_value->field_lri.log();
TTCN_Logger::log_event_str(", li := ");
single_value->field_li.log();
TTCN_Logger::log_event_str(", rfci_id := ");
single_value->field_rfci__id.log();
TTCN_Logger::log_event_str(", len8 := ");
single_value->field_len8.log();
TTCN_Logger::log_event_str(", len16 := ");
single_value->field_len16.log();
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.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 IuUP__InitRfci_template::log_match(const IuUP__InitRfci& 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_lri.match(match_value.lri(), legacy)){
TTCN_Logger::log_logmatch_info(".lri");
single_value->field_lri.log_match(match_value.lri(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_li.match(match_value.li(), legacy)){
TTCN_Logger::log_logmatch_info(".li");
single_value->field_li.log_match(match_value.li(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rfci__id.match(match_value.rfci__id(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci_id");
single_value->field_rfci__id.log_match(match_value.rfci__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.len8().ispresent()){
if(!single_value->field_len8.match(match_value.len8(), legacy)){
TTCN_Logger::log_logmatch_info(".len8");
single_value->field_len8.log_match(match_value.len8(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_len8.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".len8 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_len8.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.len16().ispresent()){
if(!single_value->field_len16.match(match_value.len16(), legacy)){
TTCN_Logger::log_logmatch_info(".len16");
single_value->field_len16.log_match(match_value.len16(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_len16.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".len16 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_len16.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.rfci().ispresent()){
if(!single_value->field_rfci.match(match_value.rfci(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_rfci.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".rfci := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_rfci.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("{ lri := ");
single_value->field_lri.log_match(match_value.lri(), legacy);
TTCN_Logger::log_event_str(", li := ");
single_value->field_li.log_match(match_value.li(), legacy);
TTCN_Logger::log_event_str(", rfci_id := ");
single_value->field_rfci__id.log_match(match_value.rfci__id(), legacy);
TTCN_Logger::log_event_str(", len8 := ");
if (match_value.len8().ispresent()) {
single_value->field_len8.log_match(match_value.len8(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_len8.log();
if (single_value->field_len8.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", len16 := ");
if (match_value.len16().ispresent()) {
single_value->field_len16.log_match(match_value.len16(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_len16.log();
if (single_value->field_len16.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", rfci := ");
if (match_value.rfci().ispresent()) {
single_value->field_rfci.log_match(match_value.rfci(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_rfci.log();
if (single_value->field_rfci.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 IuUP__InitRfci_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (lri().is_bound()) lri().set_implicit_omit();
if (li().is_bound()) li().set_implicit_omit();
if (rfci__id().is_bound()) rfci__id().set_implicit_omit();
if (!len8().is_bound()) len8() = OMIT_VALUE;
else len8().set_implicit_omit();
if (!len16().is_bound()) len16() = OMIT_VALUE;
else len16().set_implicit_omit();
if (!rfci().is_bound()) rfci() = OMIT_VALUE;
else rfci().set_implicit_omit();
}

void IuUP__InitRfci_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_lri.encode_text(text_buf);
single_value->field_li.encode_text(text_buf);
single_value->field_rfci__id.encode_text(text_buf);
single_value->field_len8.encode_text(text_buf);
single_value->field_len16.encode_text(text_buf);
single_value->field_rfci.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 @IuUP_Types.IuUP_InitRfci.");
}
}

void IuUP__InitRfci_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_lri.decode_text(text_buf);
single_value->field_li.decode_text(text_buf);
single_value->field_rfci__id.decode_text(text_buf);
single_value->field_len8.decode_text(text_buf);
single_value->field_len16.decode_text(text_buf);
single_value->field_rfci.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 IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci.");
}
}

void IuUP__InitRfci_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: {
    IuUP__InitRfci_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 @IuUP_Types.IuUP_InitRfci 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) lri().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) li().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) rfci__id().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) len8().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) len16().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) rfci().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(), "lri")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lri().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "li")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          li().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci__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(), "len8")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len8().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "len16")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len16().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().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 @IuUP_Types.IuUP_InitRfci: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__InitRfci_template* precondition = new IuUP__InitRfci_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__InitRfci_template* implied_template = new IuUP__InitRfci_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__InitRfci_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_InitRfci");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__InitRfci_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_lri.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
single_value->field_li.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
single_value->field_rfci__id.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
single_value->field_len8.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
single_value->field_len16.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
single_value->field_rfci.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_InitRfci");
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 : "@IuUP_Types.IuUP_InitRfci");
}

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

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

IuUP__PDU14__ProcSending__INIT::IuUP__PDU14__ProcSending__INIT()
{
}

IuUP__PDU14__ProcSending__INIT::IuUP__PDU14__ProcSending__INIT(const BITSTRING& par_spare,
    const BOOLEAN& par_ti,
    const INTEGER& par_subflows__per__rfci,
    const BOOLEAN& par_chain__ind,
    const IuUP__InitRfci& par_rfci,
    const OPTIONAL< IuUP__IPTI__List >& par_IPTIs,
    const BITSTRING& par_versions__supported,
    const INTEGER& par_data__pdu__type,
    const BITSTRING& par_spare2)
  :   field_spare(par_spare),
  field_ti(par_ti),
  field_subflows__per__rfci(par_subflows__per__rfci),
  field_chain__ind(par_chain__ind),
  field_rfci(par_rfci),
  field_IPTIs(par_IPTIs),
  field_versions__supported(par_versions__supported),
  field_data__pdu__type(par_data__pdu__type),
  field_spare2(par_spare2)
{
}

IuUP__PDU14__ProcSending__INIT::IuUP__PDU14__ProcSending__INIT(const IuUP__PDU14__ProcSending__INIT& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.ti().is_bound()) field_ti = other_value.ti();
else field_ti.clean_up();
if (other_value.subflows__per__rfci().is_bound()) field_subflows__per__rfci = other_value.subflows__per__rfci();
else field_subflows__per__rfci.clean_up();
if (other_value.chain__ind().is_bound()) field_chain__ind = other_value.chain__ind();
else field_chain__ind.clean_up();
if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
else field_rfci.clean_up();
if (other_value.IPTIs().is_bound()) field_IPTIs = other_value.IPTIs();
else field_IPTIs.clean_up();
if (other_value.versions__supported().is_bound()) field_versions__supported = other_value.versions__supported();
else field_versions__supported.clean_up();
if (other_value.data__pdu__type().is_bound()) field_data__pdu__type = other_value.data__pdu__type();
else field_data__pdu__type.clean_up();
if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
else field_spare2.clean_up();
}

void IuUP__PDU14__ProcSending__INIT::clean_up()
{
field_spare.clean_up();
field_ti.clean_up();
field_subflows__per__rfci.clean_up();
field_chain__ind.clean_up();
field_rfci.clean_up();
field_IPTIs.clean_up();
field_versions__supported.clean_up();
field_data__pdu__type.clean_up();
field_spare2.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ProcSending__INIT::get_descriptor() const { return &IuUP__PDU14__ProcSending__INIT_descr_; }
IuUP__PDU14__ProcSending__INIT& IuUP__PDU14__ProcSending__INIT::operator=(const IuUP__PDU14__ProcSending__INIT& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.ti().is_bound()) field_ti = other_value.ti();
  else field_ti.clean_up();
  if (other_value.subflows__per__rfci().is_bound()) field_subflows__per__rfci = other_value.subflows__per__rfci();
  else field_subflows__per__rfci.clean_up();
  if (other_value.chain__ind().is_bound()) field_chain__ind = other_value.chain__ind();
  else field_chain__ind.clean_up();
  if (other_value.rfci().is_bound()) field_rfci = other_value.rfci();
  else field_rfci.clean_up();
  if (other_value.IPTIs().is_bound()) field_IPTIs = other_value.IPTIs();
  else field_IPTIs.clean_up();
  if (other_value.versions__supported().is_bound()) field_versions__supported = other_value.versions__supported();
  else field_versions__supported.clean_up();
  if (other_value.data__pdu__type().is_bound()) field_data__pdu__type = other_value.data__pdu__type();
  else field_data__pdu__type.clean_up();
  if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
  else field_spare2.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ProcSending__INIT::operator==(const IuUP__PDU14__ProcSending__INIT& other_value) const
{
return field_spare==other_value.field_spare
  && field_ti==other_value.field_ti
  && field_subflows__per__rfci==other_value.field_subflows__per__rfci
  && field_chain__ind==other_value.field_chain__ind
  && field_rfci==other_value.field_rfci
  && field_IPTIs==other_value.field_IPTIs
  && field_versions__supported==other_value.field_versions__supported
  && field_data__pdu__type==other_value.field_data__pdu__type
  && field_spare2==other_value.field_spare2;
}

boolean IuUP__PDU14__ProcSending__INIT::is_bound() const
{
return (field_spare.is_bound())
  || (field_ti.is_bound())
  || (field_subflows__per__rfci.is_bound())
  || (field_chain__ind.is_bound())
  || (field_rfci.is_bound())
  || (OPTIONAL_OMIT == field_IPTIs.get_selection() || field_IPTIs.is_bound())
  || (field_versions__supported.is_bound())
  || (field_data__pdu__type.is_bound())
  || (field_spare2.is_bound());
}
boolean IuUP__PDU14__ProcSending__INIT::is_value() const
{
return field_spare.is_value()
  && field_ti.is_value()
  && field_subflows__per__rfci.is_value()
  && field_chain__ind.is_value()
  && field_rfci.is_value()
  && (OPTIONAL_OMIT == field_IPTIs.get_selection() || field_IPTIs.is_value())
  && field_versions__supported.is_value()
  && field_data__pdu__type.is_value()
  && field_spare2.is_value();
}
int IuUP__PDU14__ProcSending__INIT::size_of() const
{
  int ret_val = 8;
  if (field_IPTIs.ispresent()) ret_val++;
  return ret_val;
}

void IuUP__PDU14__ProcSending__INIT::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", ti := ");
field_ti.log();
TTCN_Logger::log_event_str(", subflows_per_rfci := ");
field_subflows__per__rfci.log();
TTCN_Logger::log_event_str(", chain_ind := ");
field_chain__ind.log();
TTCN_Logger::log_event_str(", rfci := ");
field_rfci.log();
TTCN_Logger::log_event_str(", IPTIs := ");
field_IPTIs.log();
TTCN_Logger::log_event_str(", versions_supported := ");
field_versions__supported.log();
TTCN_Logger::log_event_str(", data_pdu_type := ");
field_data__pdu__type.log();
TTCN_Logger::log_event_str(", spare2 := ");
field_spare2.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ProcSending__INIT::set_implicit_omit()
{
if (spare().is_bound()) spare().set_implicit_omit();
if (ti().is_bound()) ti().set_implicit_omit();
if (subflows__per__rfci().is_bound()) subflows__per__rfci().set_implicit_omit();
if (chain__ind().is_bound()) chain__ind().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (!IPTIs().is_bound()) IPTIs() = OMIT_VALUE;
else IPTIs().set_implicit_omit();
if (versions__supported().is_bound()) versions__supported().set_implicit_omit();
if (data__pdu__type().is_bound()) data__pdu__type().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__INIT::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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT 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) spare().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ti().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) subflows__per__rfci().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) chain__ind().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) IPTIs().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) versions__supported().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) data__pdu__type().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) spare2().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(), "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(), "ti")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ti().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subflows_per_rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subflows__per__rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "chain_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          chain__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "IPTIs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          IPTIs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "versions_supported")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          versions__supported().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          data__pdu__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(), "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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
  }
}

void IuUP__PDU14__ProcSending__INIT::encode_text(Text_Buf& text_buf) const
{
field_spare.encode_text(text_buf);
field_ti.encode_text(text_buf);
field_subflows__per__rfci.encode_text(text_buf);
field_chain__ind.encode_text(text_buf);
field_rfci.encode_text(text_buf);
field_IPTIs.encode_text(text_buf);
field_versions__supported.encode_text(text_buf);
field_data__pdu__type.encode_text(text_buf);
field_spare2.encode_text(text_buf);
}

void IuUP__PDU14__ProcSending__INIT::decode_text(Text_Buf& text_buf)
{
field_spare.decode_text(text_buf);
field_ti.decode_text(text_buf);
field_subflows__per__rfci.decode_text(text_buf);
field_chain__ind.decode_text(text_buf);
field_rfci.decode_text(text_buf);
field_IPTIs.decode_text(text_buf);
field_versions__supported.decode_text(text_buf);
field_data__pdu__type.decode_text(text_buf);
field_spare2.decode_text(text_buf);
}

void IuUP__PDU14__ProcSending__INIT::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 IuUP__PDU14__ProcSending__INIT::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 IuUP__PDU14__ProcSending__INIT::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, IuUP__PDU14__ProcSending__INIT_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(IuUP__PDU14__ProcSending__INIT_spare_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, IuUP__PDU14__ProcSending__INIT_ti_descr_.raw->forceomit);
  decoded_field_length = field_ti.RAW_decode(IuUP__PDU14__ProcSending__INIT_ti_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, IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_descr_.raw->forceomit);
  decoded_field_length = field_subflows__per__rfci.RAW_decode(IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_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, IuUP__PDU14__ProcSending__INIT_chain__ind_descr_.raw->forceomit);
  decoded_field_length = field_chain__ind.RAW_decode(IuUP__PDU14__ProcSending__INIT_chain__ind_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, IuUP__PDU14__ProcSending__INIT_rfci_descr_.raw->forceomit);
  decoded_field_length = field_rfci.RAW_decode(IuUP__PDU14__ProcSending__INIT_rfci_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());
  if (limit > 0 && field_ti == TRUE){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_IPTIs = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, IuUP__PDU14__ProcSending__INIT_IPTIs_descr_.raw->forceomit);
  decoded_field_length = field_IPTIs().RAW_decode(IuUP__PDU14__ProcSending__INIT_IPTIs_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_IPTIs = 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_IPTIs=OMIT_VALUE;
  RAW_Force_Omit field_6_force_omit(6, force_omit, IuUP__PDU14__ProcSending__INIT_versions__supported_descr_.raw->forceomit);
  decoded_field_length = field_versions__supported.RAW_decode(IuUP__PDU14__ProcSending__INIT_versions__supported_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, IuUP__PDU14__ProcSending__INIT_data__pdu__type_descr_.raw->forceomit);
  decoded_field_length = field_data__pdu__type.RAW_decode(IuUP__PDU14__ProcSending__INIT_data__pdu__type_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, IuUP__PDU14__ProcSending__INIT_spare2_descr_.raw->forceomit);
  decoded_field_length = field_spare2.RAW_decode(IuUP__PDU14__ProcSending__INIT_spare2_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 IuUP__PDU14__ProcSending__INIT::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, IuUP__PDU14__ProcSending__INIT_spare_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ProcSending__INIT_ti_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU14__ProcSending__INIT_chain__ind_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, IuUP__PDU14__ProcSending__INIT_rfci_descr_.raw);
  if (field_IPTIs.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, IuUP__PDU14__ProcSending__INIT_IPTIs_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, IuUP__PDU14__ProcSending__INIT_versions__supported_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, IuUP__PDU14__ProcSending__INIT_data__pdu__type_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, IuUP__PDU14__ProcSending__INIT_spare2_descr_.raw);
  encoded_length += field_spare.RAW_encode(IuUP__PDU14__ProcSending__INIT_spare_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_ti.RAW_encode(IuUP__PDU14__ProcSending__INIT_ti_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_subflows__per__rfci.RAW_encode(IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_chain__ind.RAW_encode(IuUP__PDU14__ProcSending__INIT_chain__ind_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_rfci.RAW_encode(IuUP__PDU14__ProcSending__INIT_rfci_descr_, *myleaf.body.node.nodes[4]);
  if (field_IPTIs.ispresent()) {
  encoded_length += field_IPTIs().RAW_encode(IuUP__PDU14__ProcSending__INIT_IPTIs_descr_, *myleaf.body.node.nodes[5]);
  }
  encoded_length += field_versions__supported.RAW_encode(IuUP__PDU14__ProcSending__INIT_versions__supported_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_data__pdu__type.RAW_encode(IuUP__PDU14__ProcSending__INIT_data__pdu__type_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_spare2.RAW_encode(IuUP__PDU14__ProcSending__INIT_spare2_descr_, *myleaf.body.node.nodes[8]);
  if (field_IPTIs.ispresent() && (field_ti != TRUE)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={1};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  BOOLEAN new_val = TRUE;
  new_val.RAW_encode(IuUP__PDU14__ProcSending__INIT_ti_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__ProcSending__INIT_template::single_value_struct {
BITSTRING_template field_spare;
BOOLEAN_template field_ti;
INTEGER_template field_subflows__per__rfci;
BOOLEAN_template field_chain__ind;
IuUP__InitRfci_template field_rfci;
IuUP__IPTI__List_template field_IPTIs;
BITSTRING_template field_versions__supported;
INTEGER_template field_data__pdu__type;
BITSTRING_template field_spare2;
};

void IuUP__PDU14__ProcSending__INIT_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_spare = ANY_VALUE;
single_value->field_ti = ANY_VALUE;
single_value->field_subflows__per__rfci = ANY_VALUE;
single_value->field_chain__ind = ANY_VALUE;
single_value->field_rfci = ANY_VALUE;
single_value->field_IPTIs = ANY_OR_OMIT;
single_value->field_versions__supported = ANY_VALUE;
single_value->field_data__pdu__type = ANY_VALUE;
single_value->field_spare2 = ANY_VALUE;
}
}
}

void IuUP__PDU14__ProcSending__INIT_template::copy_value(const IuUP__PDU14__ProcSending__INIT& other_value)
{
single_value = new single_value_struct;
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.ti().is_bound()) {
  single_value->field_ti = other_value.ti();
} else {
  single_value->field_ti.clean_up();
}
if (other_value.subflows__per__rfci().is_bound()) {
  single_value->field_subflows__per__rfci = other_value.subflows__per__rfci();
} else {
  single_value->field_subflows__per__rfci.clean_up();
}
if (other_value.chain__ind().is_bound()) {
  single_value->field_chain__ind = other_value.chain__ind();
} else {
  single_value->field_chain__ind.clean_up();
}
if (other_value.rfci().is_bound()) {
  single_value->field_rfci = other_value.rfci();
} else {
  single_value->field_rfci.clean_up();
}
if (other_value.IPTIs().is_bound()) {
  if (other_value.IPTIs().ispresent()) single_value->field_IPTIs = other_value.IPTIs()();
  else single_value->field_IPTIs = OMIT_VALUE;
} else {
  single_value->field_IPTIs.clean_up();
}
if (other_value.versions__supported().is_bound()) {
  single_value->field_versions__supported = other_value.versions__supported();
} else {
  single_value->field_versions__supported.clean_up();
}
if (other_value.data__pdu__type().is_bound()) {
  single_value->field_data__pdu__type = other_value.data__pdu__type();
} else {
  single_value->field_data__pdu__type.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 IuUP__PDU14__ProcSending__INIT_template::copy_template(const IuUP__PDU14__ProcSending__INIT_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
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.ti().get_selection()) {
single_value->field_ti = other_value.ti();
} else {
single_value->field_ti.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subflows__per__rfci().get_selection()) {
single_value->field_subflows__per__rfci = other_value.subflows__per__rfci();
} else {
single_value->field_subflows__per__rfci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.chain__ind().get_selection()) {
single_value->field_chain__ind = other_value.chain__ind();
} else {
single_value->field_chain__ind.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci().get_selection()) {
single_value->field_rfci = other_value.rfci();
} else {
single_value->field_rfci.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.IPTIs().get_selection()) {
single_value->field_IPTIs = other_value.IPTIs();
} else {
single_value->field_IPTIs.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.versions__supported().get_selection()) {
single_value->field_versions__supported = other_value.versions__supported();
} else {
single_value->field_versions__supported.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.data__pdu__type().get_selection()) {
single_value->field_data__pdu__type = other_value.data__pdu__type();
} else {
single_value->field_data__pdu__type.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 IuUP__PDU14__ProcSending__INIT_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 IuUP__PDU14__ProcSending__INIT_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ProcSending__INIT_template::IuUP__PDU14__ProcSending__INIT_template()
{
}

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

IuUP__PDU14__ProcSending__INIT_template::IuUP__PDU14__ProcSending__INIT_template(const IuUP__PDU14__ProcSending__INIT& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ProcSending__INIT_template::match(const IuUP__PDU14__ProcSending__INIT& 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.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.ti().is_bound()) return FALSE;
if(!single_value->field_ti.match(other_value.ti(), legacy))return FALSE;
if(!other_value.subflows__per__rfci().is_bound()) return FALSE;
if(!single_value->field_subflows__per__rfci.match(other_value.subflows__per__rfci(), legacy))return FALSE;
if(!other_value.chain__ind().is_bound()) return FALSE;
if(!single_value->field_chain__ind.match(other_value.chain__ind(), legacy))return FALSE;
if(!other_value.rfci().is_bound()) return FALSE;
if(!single_value->field_rfci.match(other_value.rfci(), legacy))return FALSE;
if(!other_value.IPTIs().is_bound()) return FALSE;
if((other_value.IPTIs().ispresent() ? !single_value->field_IPTIs.match((const IuUP__IPTI__List&)other_value.IPTIs(), legacy) : !single_value->field_IPTIs.match_omit(legacy)))return FALSE;
if(!other_value.versions__supported().is_bound()) return FALSE;
if(!single_value->field_versions__supported.match(other_value.versions__supported(), legacy))return FALSE;
if(!other_value.data__pdu__type().is_bound()) return FALSE;
if(!single_value->field_data__pdu__type.match(other_value.data__pdu__type(), 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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
}
return FALSE;
}

boolean IuUP__PDU14__ProcSending__INIT_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_spare.is_bound()
 || single_value->field_ti.is_bound()
 || single_value->field_subflows__per__rfci.is_bound()
 || single_value->field_chain__ind.is_bound()
 || single_value->field_rfci.is_bound()
 || (single_value->field_IPTIs.is_omit() || single_value->field_IPTIs.is_bound())
 || single_value->field_versions__supported.is_bound()
 || single_value->field_data__pdu__type.is_bound()
 || single_value->field_spare2.is_bound();
}

boolean IuUP__PDU14__ProcSending__INIT_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_spare.is_value()
 && single_value->field_ti.is_value()
 && single_value->field_subflows__per__rfci.is_value()
 && single_value->field_chain__ind.is_value()
 && single_value->field_rfci.is_value()
 && (single_value->field_IPTIs.is_omit() || single_value->field_IPTIs.is_value())
 && single_value->field_versions__supported.is_value()
 && single_value->field_data__pdu__type.is_value()
 && single_value->field_spare2.is_value();
}

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

IuUP__PDU14__ProcSending__INIT IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
IuUP__PDU14__ProcSending__INIT ret_val;
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_ti.is_bound()) {
ret_val.ti() = single_value->field_ti.valueof();
}
if (single_value->field_subflows__per__rfci.is_bound()) {
ret_val.subflows__per__rfci() = single_value->field_subflows__per__rfci.valueof();
}
if (single_value->field_chain__ind.is_bound()) {
ret_val.chain__ind() = single_value->field_chain__ind.valueof();
}
if (single_value->field_rfci.is_bound()) {
ret_val.rfci() = single_value->field_rfci.valueof();
}
if (single_value->field_IPTIs.is_omit()) ret_val.IPTIs() = OMIT_VALUE;
else if (single_value->field_IPTIs.is_bound()) {
ret_val.IPTIs() = single_value->field_IPTIs.valueof();
}
if (single_value->field_versions__supported.is_bound()) {
ret_val.versions__supported() = single_value->field_versions__supported.valueof();
}
if (single_value->field_data__pdu__type.is_bound()) {
ret_val.data__pdu__type() = single_value->field_data__pdu__type.valueof();
}
if (single_value->field_spare2.is_bound()) {
ret_val.spare2() = single_value->field_spare2.valueof();
}
return ret_val;
}

void IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSending__INIT_template[list_length];
}

IuUP__PDU14__ProcSending__INIT_template& IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return value_list.list_value[list_index];
}

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

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

BOOLEAN_template& IuUP__PDU14__ProcSending__INIT_template::ti()
{
set_specific();
return single_value->field_ti;
}

const BOOLEAN_template& IuUP__PDU14__ProcSending__INIT_template::ti() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ti of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_ti;
}

INTEGER_template& IuUP__PDU14__ProcSending__INIT_template::subflows__per__rfci()
{
set_specific();
return single_value->field_subflows__per__rfci;
}

const INTEGER_template& IuUP__PDU14__ProcSending__INIT_template::subflows__per__rfci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subflows_per_rfci of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_subflows__per__rfci;
}

BOOLEAN_template& IuUP__PDU14__ProcSending__INIT_template::chain__ind()
{
set_specific();
return single_value->field_chain__ind;
}

const BOOLEAN_template& IuUP__PDU14__ProcSending__INIT_template::chain__ind() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field chain_ind of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_chain__ind;
}

IuUP__InitRfci_template& IuUP__PDU14__ProcSending__INIT_template::rfci()
{
set_specific();
return single_value->field_rfci;
}

const IuUP__InitRfci_template& IuUP__PDU14__ProcSending__INIT_template::rfci() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_rfci;
}

IuUP__IPTI__List_template& IuUP__PDU14__ProcSending__INIT_template::IPTIs()
{
set_specific();
return single_value->field_IPTIs;
}

const IuUP__IPTI__List_template& IuUP__PDU14__ProcSending__INIT_template::IPTIs() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field IPTIs of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_IPTIs;
}

BITSTRING_template& IuUP__PDU14__ProcSending__INIT_template::versions__supported()
{
set_specific();
return single_value->field_versions__supported;
}

const BITSTRING_template& IuUP__PDU14__ProcSending__INIT_template::versions__supported() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field versions_supported of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_versions__supported;
}

INTEGER_template& IuUP__PDU14__ProcSending__INIT_template::data__pdu__type()
{
set_specific();
return single_value->field_data__pdu__type;
}

const INTEGER_template& IuUP__PDU14__ProcSending__INIT_template::data__pdu__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field data_pdu_type of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
return single_value->field_data__pdu__type;
}

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

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

int IuUP__PDU14__ProcSending__INIT_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 8;
      if (single_value->field_IPTIs.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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT 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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
  }
  return 0;
}

void IuUP__PDU14__ProcSending__INIT_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", ti := ");
single_value->field_ti.log();
TTCN_Logger::log_event_str(", subflows_per_rfci := ");
single_value->field_subflows__per__rfci.log();
TTCN_Logger::log_event_str(", chain_ind := ");
single_value->field_chain__ind.log();
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log();
TTCN_Logger::log_event_str(", IPTIs := ");
single_value->field_IPTIs.log();
TTCN_Logger::log_event_str(", versions_supported := ");
single_value->field_versions__supported.log();
TTCN_Logger::log_event_str(", data_pdu_type := ");
single_value->field_data__pdu__type.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 IuUP__PDU14__ProcSending__INIT_template::log_match(const IuUP__PDU14__ProcSending__INIT& 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_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_ti.match(match_value.ti(), legacy)){
TTCN_Logger::log_logmatch_info(".ti");
single_value->field_ti.log_match(match_value.ti(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_subflows__per__rfci.match(match_value.subflows__per__rfci(), legacy)){
TTCN_Logger::log_logmatch_info(".subflows_per_rfci");
single_value->field_subflows__per__rfci.log_match(match_value.subflows__per__rfci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_chain__ind.match(match_value.chain__ind(), legacy)){
TTCN_Logger::log_logmatch_info(".chain_ind");
single_value->field_chain__ind.log_match(match_value.chain__ind(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rfci.match(match_value.rfci(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.IPTIs().ispresent()){
if(!single_value->field_IPTIs.match(match_value.IPTIs(), legacy)){
TTCN_Logger::log_logmatch_info(".IPTIs");
single_value->field_IPTIs.log_match(match_value.IPTIs(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_IPTIs.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".IPTIs := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_IPTIs.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_versions__supported.match(match_value.versions__supported(), legacy)){
TTCN_Logger::log_logmatch_info(".versions_supported");
single_value->field_versions__supported.log_match(match_value.versions__supported(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_data__pdu__type.match(match_value.data__pdu__type(), legacy)){
TTCN_Logger::log_logmatch_info(".data_pdu_type");
single_value->field_data__pdu__type.log_match(match_value.data__pdu__type(), 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("{ spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", ti := ");
single_value->field_ti.log_match(match_value.ti(), legacy);
TTCN_Logger::log_event_str(", subflows_per_rfci := ");
single_value->field_subflows__per__rfci.log_match(match_value.subflows__per__rfci(), legacy);
TTCN_Logger::log_event_str(", chain_ind := ");
single_value->field_chain__ind.log_match(match_value.chain__ind(), legacy);
TTCN_Logger::log_event_str(", rfci := ");
single_value->field_rfci.log_match(match_value.rfci(), legacy);
TTCN_Logger::log_event_str(", IPTIs := ");
if (match_value.IPTIs().ispresent()) {
single_value->field_IPTIs.log_match(match_value.IPTIs(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_IPTIs.log();
if (single_value->field_IPTIs.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", versions_supported := ");
single_value->field_versions__supported.log_match(match_value.versions__supported(), legacy);
TTCN_Logger::log_event_str(", data_pdu_type := ");
single_value->field_data__pdu__type.log_match(match_value.data__pdu__type(), 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 IuUP__PDU14__ProcSending__INIT_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (spare().is_bound()) spare().set_implicit_omit();
if (ti().is_bound()) ti().set_implicit_omit();
if (subflows__per__rfci().is_bound()) subflows__per__rfci().set_implicit_omit();
if (chain__ind().is_bound()) chain__ind().set_implicit_omit();
if (rfci().is_bound()) rfci().set_implicit_omit();
if (!IPTIs().is_bound()) IPTIs() = OMIT_VALUE;
else IPTIs().set_implicit_omit();
if (versions__supported().is_bound()) versions__supported().set_implicit_omit();
if (data__pdu__type().is_bound()) data__pdu__type().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__INIT_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_spare.encode_text(text_buf);
single_value->field_ti.encode_text(text_buf);
single_value->field_subflows__per__rfci.encode_text(text_buf);
single_value->field_chain__ind.encode_text(text_buf);
single_value->field_rfci.encode_text(text_buf);
single_value->field_IPTIs.encode_text(text_buf);
single_value->field_versions__supported.encode_text(text_buf);
single_value->field_data__pdu__type.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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
}
}

void IuUP__PDU14__ProcSending__INIT_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_spare.decode_text(text_buf);
single_value->field_ti.decode_text(text_buf);
single_value->field_subflows__per__rfci.decode_text(text_buf);
single_value->field_chain__ind.decode_text(text_buf);
single_value->field_rfci.decode_text(text_buf);
single_value->field_IPTIs.decode_text(text_buf);
single_value->field_versions__supported.decode_text(text_buf);
single_value->field_data__pdu__type.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 IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT.");
}
}

void IuUP__PDU14__ProcSending__INIT_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: {
    IuUP__PDU14__ProcSending__INIT_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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT 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) spare().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ti().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) subflows__per__rfci().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) chain__ind().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) rfci().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) IPTIs().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) versions__supported().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) data__pdu__type().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) spare2().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(), "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(), "ti")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ti().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subflows_per_rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subflows__per__rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "chain_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          chain__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "IPTIs")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          IPTIs().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "versions_supported")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          versions__supported().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          data__pdu__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(), "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 @IuUP_Types.IuUP_PDU14_ProcSending_INIT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSending__INIT_template* precondition = new IuUP__PDU14__ProcSending__INIT_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ProcSending__INIT_template* implied_template = new IuUP__PDU14__ProcSending__INIT_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ProcSending__INIT_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSending__INIT_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_spare.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_ti.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_subflows__per__rfci.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_chain__ind.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_rfci.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_IPTIs.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_versions__supported.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_data__pdu__type.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
single_value->field_spare2.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
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 : "@IuUP_Types.IuUP_PDU14_ProcSending_INIT");
}

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

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

IuUP__PDU14__ProcSending__RATE__CTRL::IuUP__PDU14__ProcSending__RATE__CTRL()
{
}

IuUP__PDU14__ProcSending__RATE__CTRL::IuUP__PDU14__ProcSending__RATE__CTRL(const BITSTRING& par_spare,
    const INTEGER& par_nr__of__rfci__ind,
    const BITSTRING& par_rfci__ind)
  :   field_spare(par_spare),
  field_nr__of__rfci__ind(par_nr__of__rfci__ind),
  field_rfci__ind(par_rfci__ind)
{
}

IuUP__PDU14__ProcSending__RATE__CTRL::IuUP__PDU14__ProcSending__RATE__CTRL(const IuUP__PDU14__ProcSending__RATE__CTRL& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.nr__of__rfci__ind().is_bound()) field_nr__of__rfci__ind = other_value.nr__of__rfci__ind();
else field_nr__of__rfci__ind.clean_up();
if (other_value.rfci__ind().is_bound()) field_rfci__ind = other_value.rfci__ind();
else field_rfci__ind.clean_up();
}

void IuUP__PDU14__ProcSending__RATE__CTRL::clean_up()
{
field_spare.clean_up();
field_nr__of__rfci__ind.clean_up();
field_rfci__ind.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ProcSending__RATE__CTRL::get_descriptor() const { return &IuUP__PDU14__ProcSending__RATE__CTRL_descr_; }
IuUP__PDU14__ProcSending__RATE__CTRL& IuUP__PDU14__ProcSending__RATE__CTRL::operator=(const IuUP__PDU14__ProcSending__RATE__CTRL& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.nr__of__rfci__ind().is_bound()) field_nr__of__rfci__ind = other_value.nr__of__rfci__ind();
  else field_nr__of__rfci__ind.clean_up();
  if (other_value.rfci__ind().is_bound()) field_rfci__ind = other_value.rfci__ind();
  else field_rfci__ind.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ProcSending__RATE__CTRL::operator==(const IuUP__PDU14__ProcSending__RATE__CTRL& other_value) const
{
return field_spare==other_value.field_spare
  && field_nr__of__rfci__ind==other_value.field_nr__of__rfci__ind
  && field_rfci__ind==other_value.field_rfci__ind;
}

boolean IuUP__PDU14__ProcSending__RATE__CTRL::is_bound() const
{
return (field_spare.is_bound())
  || (field_nr__of__rfci__ind.is_bound())
  || (field_rfci__ind.is_bound());
}
boolean IuUP__PDU14__ProcSending__RATE__CTRL::is_value() const
{
return field_spare.is_value()
  && field_nr__of__rfci__ind.is_value()
  && field_rfci__ind.is_value();
}
void IuUP__PDU14__ProcSending__RATE__CTRL::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", nr_of_rfci_ind := ");
field_nr__of__rfci__ind.log();
TTCN_Logger::log_event_str(", rfci_ind := ");
field_rfci__ind.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ProcSending__RATE__CTRL::set_implicit_omit()
{
if (spare().is_bound()) spare().set_implicit_omit();
if (nr__of__rfci__ind().is_bound()) nr__of__rfci__ind().set_implicit_omit();
if (rfci__ind().is_bound()) rfci__ind().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__RATE__CTRL::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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL 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) spare().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) nr__of__rfci__ind().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) rfci__ind().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(), "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(), "nr_of_rfci_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nr__of__rfci__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci__ind().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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
  }
}

void IuUP__PDU14__ProcSending__RATE__CTRL::encode_text(Text_Buf& text_buf) const
{
field_spare.encode_text(text_buf);
field_nr__of__rfci__ind.encode_text(text_buf);
field_rfci__ind.encode_text(text_buf);
}

void IuUP__PDU14__ProcSending__RATE__CTRL::decode_text(Text_Buf& text_buf)
{
field_spare.decode_text(text_buf);
field_nr__of__rfci__ind.decode_text(text_buf);
field_rfci__ind.decode_text(text_buf);
}

void IuUP__PDU14__ProcSending__RATE__CTRL::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 IuUP__PDU14__ProcSending__RATE__CTRL::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 IuUP__PDU14__ProcSending__RATE__CTRL::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, IuUP__PDU14__ProcSending__RATE__CTRL_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(IuUP__PDU14__ProcSending__RATE__CTRL_spare_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, IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_descr_.raw->forceomit);
  decoded_field_length = field_nr__of__rfci__ind.RAW_decode(IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_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_nr__of__rfci__ind.convert_to_Integer(IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_descr_);
  field_nr__of__rfci__ind = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 1;
  RAW_Force_Omit field_2_force_omit(2, force_omit, IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_descr_.raw->forceomit);
  decoded_field_length = field_rfci__ind.RAW_decode(IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_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 IuUP__PDU14__ProcSending__RATE__CTRL::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, IuUP__PDU14__ProcSending__RATE__CTRL_spare_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_descr_.raw);
  encoded_length += field_spare.RAW_encode(IuUP__PDU14__ProcSending__RATE__CTRL_spare_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 6;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &IuUP__PDU14__ProcSending__RATE__CTRL_nr__of__rfci__ind_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 1;
  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 = 6;
  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_rfci__ind.RAW_encode(IuUP__PDU14__ProcSending__RATE__CTRL_rfci__ind_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__ProcSending__RATE__CTRL_template::single_value_struct {
BITSTRING_template field_spare;
INTEGER_template field_nr__of__rfci__ind;
BITSTRING_template field_rfci__ind;
};

void IuUP__PDU14__ProcSending__RATE__CTRL_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_spare = ANY_VALUE;
single_value->field_nr__of__rfci__ind = ANY_VALUE;
single_value->field_rfci__ind = ANY_VALUE;
}
}
}

void IuUP__PDU14__ProcSending__RATE__CTRL_template::copy_value(const IuUP__PDU14__ProcSending__RATE__CTRL& other_value)
{
single_value = new single_value_struct;
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.nr__of__rfci__ind().is_bound()) {
  single_value->field_nr__of__rfci__ind = other_value.nr__of__rfci__ind();
} else {
  single_value->field_nr__of__rfci__ind.clean_up();
}
if (other_value.rfci__ind().is_bound()) {
  single_value->field_rfci__ind = other_value.rfci__ind();
} else {
  single_value->field_rfci__ind.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__ProcSending__RATE__CTRL_template::copy_template(const IuUP__PDU14__ProcSending__RATE__CTRL_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
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.nr__of__rfci__ind().get_selection()) {
single_value->field_nr__of__rfci__ind = other_value.nr__of__rfci__ind();
} else {
single_value->field_nr__of__rfci__ind.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rfci__ind().get_selection()) {
single_value->field_rfci__ind = other_value.rfci__ind();
} else {
single_value->field_rfci__ind.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 IuUP__PDU14__ProcSending__RATE__CTRL_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 IuUP__PDU14__ProcSending__RATE__CTRL_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ProcSending__RATE__CTRL_template::IuUP__PDU14__ProcSending__RATE__CTRL_template()
{
}

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

IuUP__PDU14__ProcSending__RATE__CTRL_template::IuUP__PDU14__ProcSending__RATE__CTRL_template(const IuUP__PDU14__ProcSending__RATE__CTRL& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ProcSending__RATE__CTRL_template::match(const IuUP__PDU14__ProcSending__RATE__CTRL& 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.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.nr__of__rfci__ind().is_bound()) return FALSE;
if(!single_value->field_nr__of__rfci__ind.match(other_value.nr__of__rfci__ind(), legacy))return FALSE;
if(!other_value.rfci__ind().is_bound()) return FALSE;
if(!single_value->field_rfci__ind.match(other_value.rfci__ind(), 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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
}
return FALSE;
}

boolean IuUP__PDU14__ProcSending__RATE__CTRL_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_spare.is_bound()
 || single_value->field_nr__of__rfci__ind.is_bound()
 || single_value->field_rfci__ind.is_bound();
}

boolean IuUP__PDU14__ProcSending__RATE__CTRL_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_spare.is_value()
 && single_value->field_nr__of__rfci__ind.is_value()
 && single_value->field_rfci__ind.is_value();
}

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

IuUP__PDU14__ProcSending__RATE__CTRL IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
IuUP__PDU14__ProcSending__RATE__CTRL ret_val;
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_nr__of__rfci__ind.is_bound()) {
ret_val.nr__of__rfci__ind() = single_value->field_nr__of__rfci__ind.valueof();
}
if (single_value->field_rfci__ind.is_bound()) {
ret_val.rfci__ind() = single_value->field_rfci__ind.valueof();
}
return ret_val;
}

void IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSending__RATE__CTRL_template[list_length];
}

IuUP__PDU14__ProcSending__RATE__CTRL_template& IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
return value_list.list_value[list_index];
}

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

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

INTEGER_template& IuUP__PDU14__ProcSending__RATE__CTRL_template::nr__of__rfci__ind()
{
set_specific();
return single_value->field_nr__of__rfci__ind;
}

const INTEGER_template& IuUP__PDU14__ProcSending__RATE__CTRL_template::nr__of__rfci__ind() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nr_of_rfci_ind of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
return single_value->field_nr__of__rfci__ind;
}

BITSTRING_template& IuUP__PDU14__ProcSending__RATE__CTRL_template::rfci__ind()
{
set_specific();
return single_value->field_rfci__ind;
}

const BITSTRING_template& IuUP__PDU14__ProcSending__RATE__CTRL_template::rfci__ind() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rfci_ind of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
return single_value->field_rfci__ind;
}

int IuUP__PDU14__ProcSending__RATE__CTRL_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL 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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL 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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
  }
  return 0;
}

void IuUP__PDU14__ProcSending__RATE__CTRL_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", nr_of_rfci_ind := ");
single_value->field_nr__of__rfci__ind.log();
TTCN_Logger::log_event_str(", rfci_ind := ");
single_value->field_rfci__ind.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 IuUP__PDU14__ProcSending__RATE__CTRL_template::log_match(const IuUP__PDU14__ProcSending__RATE__CTRL& 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_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_nr__of__rfci__ind.match(match_value.nr__of__rfci__ind(), legacy)){
TTCN_Logger::log_logmatch_info(".nr_of_rfci_ind");
single_value->field_nr__of__rfci__ind.log_match(match_value.nr__of__rfci__ind(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rfci__ind.match(match_value.rfci__ind(), legacy)){
TTCN_Logger::log_logmatch_info(".rfci_ind");
single_value->field_rfci__ind.log_match(match_value.rfci__ind(), 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("{ spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", nr_of_rfci_ind := ");
single_value->field_nr__of__rfci__ind.log_match(match_value.nr__of__rfci__ind(), legacy);
TTCN_Logger::log_event_str(", rfci_ind := ");
single_value->field_rfci__ind.log_match(match_value.rfci__ind(), 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 IuUP__PDU14__ProcSending__RATE__CTRL_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (spare().is_bound()) spare().set_implicit_omit();
if (nr__of__rfci__ind().is_bound()) nr__of__rfci__ind().set_implicit_omit();
if (rfci__ind().is_bound()) rfci__ind().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__RATE__CTRL_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_spare.encode_text(text_buf);
single_value->field_nr__of__rfci__ind.encode_text(text_buf);
single_value->field_rfci__ind.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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
}
}

void IuUP__PDU14__ProcSending__RATE__CTRL_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_spare.decode_text(text_buf);
single_value->field_nr__of__rfci__ind.decode_text(text_buf);
single_value->field_rfci__ind.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 IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL.");
}
}

void IuUP__PDU14__ProcSending__RATE__CTRL_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: {
    IuUP__PDU14__ProcSending__RATE__CTRL_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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL 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) spare().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) nr__of__rfci__ind().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) rfci__ind().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(), "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(), "nr_of_rfci_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nr__of__rfci__ind().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rfci_ind")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rfci__ind().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 @IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSending__RATE__CTRL_template* precondition = new IuUP__PDU14__ProcSending__RATE__CTRL_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ProcSending__RATE__CTRL_template* implied_template = new IuUP__PDU14__ProcSending__RATE__CTRL_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ProcSending__RATE__CTRL_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSending__RATE__CTRL_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_spare.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
single_value->field_nr__of__rfci__ind.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
single_value->field_rfci__ind.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
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 : "@IuUP_Types.IuUP_PDU14_ProcSending_RATE_CTRL");
}

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

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

IuUP__PDU14__ProcSending__TIME__ALIGNMENT::IuUP__PDU14__ProcSending__TIME__ALIGNMENT()
{
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT::IuUP__PDU14__ProcSending__TIME__ALIGNMENT(const INTEGER& par_time__alignment,
    const OPTIONAL< OCTETSTRING >& par_spare)
  :   field_time__alignment(par_time__alignment),
  field_spare(par_spare)
{
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT::IuUP__PDU14__ProcSending__TIME__ALIGNMENT(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
if (other_value.time__alignment().is_bound()) field_time__alignment = other_value.time__alignment();
else field_time__alignment.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::clean_up()
{
field_time__alignment.clean_up();
field_spare.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ProcSending__TIME__ALIGNMENT::get_descriptor() const { return &IuUP__PDU14__ProcSending__TIME__ALIGNMENT_descr_; }
IuUP__PDU14__ProcSending__TIME__ALIGNMENT& IuUP__PDU14__ProcSending__TIME__ALIGNMENT::operator=(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
  if (other_value.time__alignment().is_bound()) field_time__alignment = other_value.time__alignment();
  else field_time__alignment.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT::operator==(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& other_value) const
{
return field_time__alignment==other_value.field_time__alignment
  && field_spare==other_value.field_spare;
}

boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT::is_bound() const
{
return (field_time__alignment.is_bound())
  || (OPTIONAL_OMIT == field_spare.get_selection() || field_spare.is_bound());
}
boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT::is_value() const
{
return field_time__alignment.is_value()
  && (OPTIONAL_OMIT == field_spare.get_selection() || field_spare.is_value());
}
int IuUP__PDU14__ProcSending__TIME__ALIGNMENT::size_of() const
{
  int ret_val = 1;
  if (field_spare.ispresent()) ret_val++;
  return ret_val;
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ time_alignment := ");
field_time__alignment.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::set_implicit_omit()
{
if (time__alignment().is_bound()) time__alignment().set_implicit_omit();
if (!spare().is_bound()) spare() = OMIT_VALUE;
else spare().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT 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) time__alignment().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));
    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(), "time_alignment")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          time__alignment().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT");
  }
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::encode_text(Text_Buf& text_buf) const
{
field_time__alignment.encode_text(text_buf);
field_spare.encode_text(text_buf);
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::decode_text(Text_Buf& text_buf)
{
field_time__alignment.decode_text(text_buf);
field_spare.decode_text(text_buf);
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT::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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT::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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT::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, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_descr_.raw->forceomit);
  decoded_field_length = field_time__alignment.RAW_decode(IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_spare = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare().RAW_decode(IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_spare = 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_spare=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int IuUP__PDU14__ProcSending__TIME__ALIGNMENT::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, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_descr_.raw);
  if (field_spare.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  encoded_length += field_time__alignment.RAW_encode(IuUP__PDU14__ProcSending__TIME__ALIGNMENT_time__alignment_descr_, *myleaf.body.node.nodes[0]);
  if (field_spare.ispresent()) {
  encoded_length += field_spare().RAW_encode(IuUP__PDU14__ProcSending__TIME__ALIGNMENT_spare_descr_, *myleaf.body.node.nodes[1]);
  }
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::single_value_struct {
INTEGER_template field_time__alignment;
OCTETSTRING_template field_spare;
};

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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_time__alignment = ANY_VALUE;
single_value->field_spare = ANY_OR_OMIT;
}
}
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::copy_value(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& other_value)
{
single_value = new single_value_struct;
if (other_value.time__alignment().is_bound()) {
  single_value->field_time__alignment = other_value.time__alignment();
} else {
  single_value->field_time__alignment.clean_up();
}
if (other_value.spare().is_bound()) {
  if (other_value.spare().ispresent()) single_value->field_spare = other_value.spare()();
  else single_value->field_spare = OMIT_VALUE;
} else {
  single_value->field_spare.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::copy_template(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.time__alignment().get_selection()) {
single_value->field_time__alignment = other_value.time__alignment();
} else {
single_value->field_time__alignment.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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template()
{
}

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

IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::match(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& 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.time__alignment().is_bound()) return FALSE;
if(!single_value->field_time__alignment.match(other_value.time__alignment(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if((other_value.spare().ispresent() ? !single_value->field_spare.match((const OCTETSTRING&)other_value.spare(), legacy) : !single_value->field_spare.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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
}
return FALSE;
}

boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_time__alignment.is_bound()
 || (single_value->field_spare.is_omit() || single_value->field_spare.is_bound());
}

boolean IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_time__alignment.is_value()
 && (single_value->field_spare.is_omit() || single_value->field_spare.is_value());
}

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

IuUP__PDU14__ProcSending__TIME__ALIGNMENT IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
IuUP__PDU14__ProcSending__TIME__ALIGNMENT ret_val;
if (single_value->field_time__alignment.is_bound()) {
ret_val.time__alignment() = single_value->field_time__alignment.valueof();
}
if (single_value->field_spare.is_omit()) ret_val.spare() = OMIT_VALUE;
else if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
return ret_val;
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template[list_length];
}

IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template& IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
return value_list.list_value[list_index];
}

INTEGER_template& IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::time__alignment()
{
set_specific();
return single_value->field_time__alignment;
}

const INTEGER_template& IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::time__alignment() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field time_alignment of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
return single_value->field_time__alignment;
}

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

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

int IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 1;
      if (single_value->field_spare.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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT 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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
  }
  return 0;
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ time_alignment := ");
single_value->field_time__alignment.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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::log_match(const IuUP__PDU14__ProcSending__TIME__ALIGNMENT& 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_time__alignment.match(match_value.time__alignment(), legacy)){
TTCN_Logger::log_logmatch_info(".time_alignment");
single_value->field_time__alignment.log_match(match_value.time__alignment(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare().ispresent()){
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 {
if (!single_value->field_spare.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare.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("{ time_alignment := ");
single_value->field_time__alignment.log_match(match_value.time__alignment(), legacy);
TTCN_Logger::log_event_str(", spare := ");
if (match_value.spare().ispresent()) {
single_value->field_spare.log_match(match_value.spare(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare.log();
if (single_value->field_spare.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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (time__alignment().is_bound()) time__alignment().set_implicit_omit();
if (!spare().is_bound()) spare() = OMIT_VALUE;
else spare().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_time__alignment.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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
}
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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_time__alignment.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 IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT.");
}
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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: {
    IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT 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) time__alignment().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));
    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(), "time_alignment")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          time__alignment().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template* precondition = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template* implied_template = new IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ProcSending__TIME__ALIGNMENT_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSending__TIME__ALIGNMENT_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_time__alignment.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT");
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 : "@IuUP_Types.IuUP_PDU14_ProcSending_TIME_ALIGNMENT");
}

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

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

IuUP__PDU14__ProcSending__ERROR__EVENT::IuUP__PDU14__ProcSending__ERROR__EVENT()
{
}

IuUP__PDU14__ProcSending__ERROR__EVENT::IuUP__PDU14__ProcSending__ERROR__EVENT(const IuUP__ErrorDistance& par_distance,
    const IuUP__ErrorCause& par_cause)
  :   field_distance(par_distance),
  field_cause(par_cause)
{
}

IuUP__PDU14__ProcSending__ERROR__EVENT::IuUP__PDU14__ProcSending__ERROR__EVENT(const IuUP__PDU14__ProcSending__ERROR__EVENT& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
if (other_value.distance().is_bound()) field_distance = other_value.distance();
else field_distance.clean_up();
if (other_value.cause().is_bound()) field_cause = other_value.cause();
else field_cause.clean_up();
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::clean_up()
{
field_distance.clean_up();
field_cause.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ProcSending__ERROR__EVENT::get_descriptor() const { return &IuUP__PDU14__ProcSending__ERROR__EVENT_descr_; }
IuUP__PDU14__ProcSending__ERROR__EVENT& IuUP__PDU14__ProcSending__ERROR__EVENT::operator=(const IuUP__PDU14__ProcSending__ERROR__EVENT& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
  if (other_value.distance().is_bound()) field_distance = other_value.distance();
  else field_distance.clean_up();
  if (other_value.cause().is_bound()) field_cause = other_value.cause();
  else field_cause.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ProcSending__ERROR__EVENT::operator==(const IuUP__PDU14__ProcSending__ERROR__EVENT& other_value) const
{
return field_distance==other_value.field_distance
  && field_cause==other_value.field_cause;
}

boolean IuUP__PDU14__ProcSending__ERROR__EVENT::is_bound() const
{
return (field_distance.is_bound())
  || (field_cause.is_bound());
}
boolean IuUP__PDU14__ProcSending__ERROR__EVENT::is_value() const
{
return field_distance.is_value()
  && field_cause.is_value();
}
void IuUP__PDU14__ProcSending__ERROR__EVENT::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ distance := ");
field_distance.log();
TTCN_Logger::log_event_str(", cause := ");
field_cause.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::set_implicit_omit()
{
if (distance().is_bound()) distance().set_implicit_omit();
if (cause().is_bound()) cause().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT 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) distance().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) cause().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(), "distance")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          distance().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT");
  }
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::encode_text(Text_Buf& text_buf) const
{
field_distance.encode_text(text_buf);
field_cause.encode_text(text_buf);
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::decode_text(Text_Buf& text_buf)
{
field_distance.decode_text(text_buf);
field_cause.decode_text(text_buf);
}

void IuUP__PDU14__ProcSending__ERROR__EVENT::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 IuUP__PDU14__ProcSending__ERROR__EVENT::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 IuUP__PDU14__ProcSending__ERROR__EVENT::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, IuUP__PDU14__ProcSending__ERROR__EVENT_distance_descr_.raw->forceomit);
  decoded_field_length = field_distance.RAW_decode(IuUP__PDU14__ProcSending__ERROR__EVENT_distance_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, IuUP__PDU14__ProcSending__ERROR__EVENT_cause_descr_.raw->forceomit);
  decoded_field_length = field_cause.RAW_decode(IuUP__PDU14__ProcSending__ERROR__EVENT_cause_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 IuUP__PDU14__ProcSending__ERROR__EVENT::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, IuUP__PDU14__ProcSending__ERROR__EVENT_distance_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ProcSending__ERROR__EVENT_cause_descr_.raw);
  encoded_length += field_distance.RAW_encode(IuUP__PDU14__ProcSending__ERROR__EVENT_distance_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_cause.RAW_encode(IuUP__PDU14__ProcSending__ERROR__EVENT_cause_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__ProcSending__ERROR__EVENT_template::single_value_struct {
IuUP__ErrorDistance_template field_distance;
IuUP__ErrorCause_template field_cause;
};

void IuUP__PDU14__ProcSending__ERROR__EVENT_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_distance = ANY_VALUE;
single_value->field_cause = ANY_VALUE;
}
}
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_template::copy_value(const IuUP__PDU14__ProcSending__ERROR__EVENT& other_value)
{
single_value = new single_value_struct;
if (other_value.distance().is_bound()) {
  single_value->field_distance = other_value.distance();
} else {
  single_value->field_distance.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 IuUP__PDU14__ProcSending__ERROR__EVENT_template::copy_template(const IuUP__PDU14__ProcSending__ERROR__EVENT_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.distance().get_selection()) {
single_value->field_distance = other_value.distance();
} else {
single_value->field_distance.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 IuUP__PDU14__ProcSending__ERROR__EVENT_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 IuUP__PDU14__ProcSending__ERROR__EVENT_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ProcSending__ERROR__EVENT_template::IuUP__PDU14__ProcSending__ERROR__EVENT_template()
{
}

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

IuUP__PDU14__ProcSending__ERROR__EVENT_template::IuUP__PDU14__ProcSending__ERROR__EVENT_template(const IuUP__PDU14__ProcSending__ERROR__EVENT& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ProcSending__ERROR__EVENT_template::match(const IuUP__PDU14__ProcSending__ERROR__EVENT& 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.distance().is_bound()) return FALSE;
if(!single_value->field_distance.match(other_value.distance(), 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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
}
return FALSE;
}

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

boolean IuUP__PDU14__ProcSending__ERROR__EVENT_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_distance.is_value()
 && single_value->field_cause.is_value();
}

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

IuUP__PDU14__ProcSending__ERROR__EVENT IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
IuUP__PDU14__ProcSending__ERROR__EVENT ret_val;
if (single_value->field_distance.is_bound()) {
ret_val.distance() = single_value->field_distance.valueof();
}
if (single_value->field_cause.is_bound()) {
ret_val.cause() = single_value->field_cause.valueof();
}
return ret_val;
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSending__ERROR__EVENT_template[list_length];
}

IuUP__PDU14__ProcSending__ERROR__EVENT_template& IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
return value_list.list_value[list_index];
}

IuUP__ErrorDistance_template& IuUP__PDU14__ProcSending__ERROR__EVENT_template::distance()
{
set_specific();
return single_value->field_distance;
}

const IuUP__ErrorDistance_template& IuUP__PDU14__ProcSending__ERROR__EVENT_template::distance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field distance of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
return single_value->field_distance;
}

IuUP__ErrorCause_template& IuUP__PDU14__ProcSending__ERROR__EVENT_template::cause()
{
set_specific();
return single_value->field_cause;
}

const IuUP__ErrorCause_template& IuUP__PDU14__ProcSending__ERROR__EVENT_template::cause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cause of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
return single_value->field_cause;
}

int IuUP__PDU14__ProcSending__ERROR__EVENT_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT 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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT 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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
  }
  return 0;
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ distance := ");
single_value->field_distance.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 IuUP__PDU14__ProcSending__ERROR__EVENT_template::log_match(const IuUP__PDU14__ProcSending__ERROR__EVENT& 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_distance.match(match_value.distance(), legacy)){
TTCN_Logger::log_logmatch_info(".distance");
single_value->field_distance.log_match(match_value.distance(), 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("{ distance := ");
single_value->field_distance.log_match(match_value.distance(), 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 IuUP__PDU14__ProcSending__ERROR__EVENT_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (distance().is_bound()) distance().set_implicit_omit();
if (cause().is_bound()) cause().set_implicit_omit();
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_distance.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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
}
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_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_distance.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 IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT.");
}
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_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: {
    IuUP__PDU14__ProcSending__ERROR__EVENT_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT 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) distance().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) cause().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(), "distance")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          distance().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSending__ERROR__EVENT_template* precondition = new IuUP__PDU14__ProcSending__ERROR__EVENT_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ProcSending__ERROR__EVENT_template* implied_template = new IuUP__PDU14__ProcSending__ERROR__EVENT_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ProcSending__ERROR__EVENT_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSending__ERROR__EVENT_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_distance.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT");
single_value->field_cause.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT");
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 : "@IuUP_Types.IuUP_PDU14_ProcSending_ERROR_EVENT");
}

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

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

IuUP__PDU14__ProcSending::IuUP__PDU14__ProcSending()
{
}

IuUP__PDU14__ProcSending::IuUP__PDU14__ProcSending(const IuUP__PDU__Type__14__Common__Hdr& par_hdr,
    const IuUP__PDU14__ProcSendingUnion& par_u)
  :   field_hdr(par_hdr),
  field_u(par_u)
{
}

IuUP__PDU14__ProcSending::IuUP__PDU14__ProcSending(const IuUP__PDU14__ProcSending& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending.");
if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
else field_hdr.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
}

void IuUP__PDU14__ProcSending::clean_up()
{
field_hdr.clean_up();
field_u.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ProcSending::get_descriptor() const { return &IuUP__PDU14__ProcSending_descr_; }
IuUP__PDU14__ProcSending& IuUP__PDU14__ProcSending::operator=(const IuUP__PDU14__ProcSending& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ProcSending.");
  if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
  else field_hdr.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ProcSending::operator==(const IuUP__PDU14__ProcSending& other_value) const
{
return field_hdr==other_value.field_hdr
  && field_u==other_value.field_u;
}

boolean IuUP__PDU14__ProcSending::is_bound() const
{
return (field_hdr.is_bound())
  || (field_u.is_bound());
}
boolean IuUP__PDU14__ProcSending::is_value() const
{
return field_hdr.is_value()
  && field_u.is_value();
}
void IuUP__PDU14__ProcSending::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ hdr := ");
field_hdr.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ProcSending::set_implicit_omit()
{
if (hdr().is_bound()) hdr().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void IuUP__PDU14__ProcSending::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 @IuUP_Types.IuUP_PDU14_ProcSending 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ProcSending");
  }
}

void IuUP__PDU14__ProcSending::encode_text(Text_Buf& text_buf) const
{
field_hdr.encode_text(text_buf);
field_u.encode_text(text_buf);
}

void IuUP__PDU14__ProcSending::decode_text(Text_Buf& text_buf)
{
field_hdr.decode_text(text_buf);
field_u.decode_text(text_buf);
}

void IuUP__PDU14__ProcSending::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 IuUP__PDU14__ProcSending::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 IuUP__PDU14__ProcSending::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;
  RAW_Force_Omit field_0_force_omit(0, force_omit, IuUP__PDU14__ProcSending_hdr_descr_.raw->forceomit);
  decoded_field_length = field_hdr.RAW_decode(IuUP__PDU14__ProcSending_hdr_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());
  if (field_hdr.procedure__ind() == IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION) selected_field = 0;
  else if (field_hdr.procedure__ind() == IuUP__ProcedureIndicator::IuUP__PRI__RATE__CONTROL) selected_field = 1;
  else if (field_hdr.procedure__ind() == IuUP__ProcedureIndicator::IuUP__PRI__TIME__ALIGNMENT) selected_field = 2;
  else if (field_hdr.procedure__ind() == IuUP__ProcedureIndicator::IuUP__PRI__ERROR__EVENT) selected_field = 3;
  else selected_field = 4;
  RAW_Force_Omit field_1_force_omit(1, force_omit, IuUP__PDU14__ProcSending_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(IuUP__PDU14__ProcSending_u_descr_, p_buf, limit, local_top_order, no_err, selected_field, 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 IuUP__PDU14__ProcSending::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, IuUP__PDU14__ProcSending_hdr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ProcSending_u_descr_.raw);
  encoded_length += field_hdr.RAW_encode(IuUP__PDU14__ProcSending_hdr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_u.RAW_encode(IuUP__PDU14__ProcSending_u_descr_, *myleaf.body.node.nodes[1]);
  switch (field_u.get_selection()) {
  case IuUP__PDU14__ProcSendingUnion::ALT_init:
  if (field_hdr.procedure__ind() != IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 2;
  int new_pos[] = { 0, 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
  IuUP__ProcedureIndicator new_val(IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_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 IuUP__PDU14__ProcSendingUnion::ALT_rate__ctrl:
  if (field_hdr.procedure__ind() != IuUP__ProcedureIndicator::IuUP__PRI__RATE__CONTROL) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 2;
  int new_pos[] = { 0, 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
  IuUP__ProcedureIndicator new_val(IuUP__ProcedureIndicator::IuUP__PRI__RATE__CONTROL);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_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 IuUP__PDU14__ProcSendingUnion::ALT_time__alignment:
  if (field_hdr.procedure__ind() != IuUP__ProcedureIndicator::IuUP__PRI__TIME__ALIGNMENT) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 2;
  int new_pos[] = { 0, 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
  IuUP__ProcedureIndicator new_val(IuUP__ProcedureIndicator::IuUP__PRI__TIME__ALIGNMENT);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_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 IuUP__PDU14__ProcSendingUnion::ALT_error__event:
  if (field_hdr.procedure__ind() != IuUP__ProcedureIndicator::IuUP__PRI__ERROR__EVENT) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 2;
  int new_pos[] = { 0, 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 2, new_pos);
  IuUP__ProcedureIndicator new_val(IuUP__ProcedureIndicator::IuUP__PRI__ERROR__EVENT);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14__Common__Hdr_procedure__ind_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 IuUP__PDU14__ProcSending_template::single_value_struct {
IuUP__PDU__Type__14__Common__Hdr_template field_hdr;
IuUP__PDU14__ProcSendingUnion_template field_u;
};

void IuUP__PDU14__ProcSending_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_hdr = ANY_VALUE;
single_value->field_u = ANY_VALUE;
}
}
}

void IuUP__PDU14__ProcSending_template::copy_value(const IuUP__PDU14__ProcSending& other_value)
{
single_value = new single_value_struct;
if (other_value.hdr().is_bound()) {
  single_value->field_hdr = other_value.hdr();
} else {
  single_value->field_hdr.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 IuUP__PDU14__ProcSending_template::copy_template(const IuUP__PDU14__ProcSending_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.hdr().get_selection()) {
single_value->field_hdr = other_value.hdr();
} else {
single_value->field_hdr.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 IuUP__PDU14__ProcSending_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 IuUP__PDU14__ProcSending_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ProcSending_template::IuUP__PDU14__ProcSending_template()
{
}

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

IuUP__PDU14__ProcSending_template::IuUP__PDU14__ProcSending_template(const IuUP__PDU14__ProcSending& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ProcSending_template::match(const IuUP__PDU14__ProcSending& 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.hdr().is_bound()) return FALSE;
if(!single_value->field_hdr.match(other_value.hdr(), 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 @IuUP_Types.IuUP_PDU14_ProcSending.");
}
return FALSE;
}

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

boolean IuUP__PDU14__ProcSending_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_hdr.is_value()
 && single_value->field_u.is_value();
}

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

IuUP__PDU14__ProcSending IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending.");
IuUP__PDU14__ProcSending ret_val;
if (single_value->field_hdr.is_bound()) {
ret_val.hdr() = single_value->field_hdr.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
return ret_val;
}

void IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ProcSending_template[list_length];
}

IuUP__PDU14__ProcSending_template& IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ProcSending.");
return value_list.list_value[list_index];
}

IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__ProcSending_template::hdr()
{
set_specific();
return single_value->field_hdr;
}

const IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__ProcSending_template::hdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdr of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending.");
return single_value->field_hdr;
}

IuUP__PDU14__ProcSendingUnion_template& IuUP__PDU14__ProcSending_template::u()
{
set_specific();
return single_value->field_u;
}

const IuUP__PDU14__ProcSendingUnion_template& IuUP__PDU14__ProcSending_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @IuUP_Types.IuUP_PDU14_ProcSending.");
return single_value->field_u;
}

int IuUP__PDU14__ProcSending_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending 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 @IuUP_Types.IuUP_PDU14_ProcSending 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 @IuUP_Types.IuUP_PDU14_ProcSending containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ProcSending containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ProcSending.");
  }
  return 0;
}

void IuUP__PDU14__ProcSending_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ hdr := ");
single_value->field_hdr.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 IuUP__PDU14__ProcSending_template::log_match(const IuUP__PDU14__ProcSending& 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_hdr.match(match_value.hdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdr");
single_value->field_hdr.log_match(match_value.hdr(), 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("{ hdr := ");
single_value->field_hdr.log_match(match_value.hdr(), 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 IuUP__PDU14__ProcSending_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (hdr().is_bound()) hdr().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void IuUP__PDU14__ProcSending_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_hdr.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 @IuUP_Types.IuUP_PDU14_ProcSending.");
}
}

void IuUP__PDU14__ProcSending_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_hdr.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 IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending.");
}
}

void IuUP__PDU14__ProcSending_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: {
    IuUP__PDU14__ProcSending_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 @IuUP_Types.IuUP_PDU14_ProcSending 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @IuUP_Types.IuUP_PDU14_ProcSending: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ProcSending_template* precondition = new IuUP__PDU14__ProcSending_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ProcSending_template* implied_template = new IuUP__PDU14__ProcSending_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ProcSending_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ProcSending");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ProcSending_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_hdr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending");
single_value->field_u.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ProcSending");
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 : "@IuUP_Types.IuUP_PDU14_ProcSending");
}

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

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

IuUP__PDU14__ACK::IuUP__PDU14__ACK()
{
}

IuUP__PDU14__ACK::IuUP__PDU14__ACK(const IuUP__PDU__Type__14__Common__Hdr& par_hdr,
    const OPTIONAL< OCTETSTRING >& par_spare__ext)
  :   field_hdr(par_hdr),
  field_spare__ext(par_spare__ext)
{
}

IuUP__PDU14__ACK::IuUP__PDU14__ACK(const IuUP__PDU14__ACK& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_ACK.");
if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
else field_hdr.clean_up();
if (other_value.spare__ext().is_bound()) field_spare__ext = other_value.spare__ext();
else field_spare__ext.clean_up();
}

void IuUP__PDU14__ACK::clean_up()
{
field_hdr.clean_up();
field_spare__ext.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__ACK::get_descriptor() const { return &IuUP__PDU14__ACK_descr_; }
IuUP__PDU14__ACK& IuUP__PDU14__ACK::operator=(const IuUP__PDU14__ACK& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_ACK.");
  if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
  else field_hdr.clean_up();
  if (other_value.spare__ext().is_bound()) field_spare__ext = other_value.spare__ext();
  else field_spare__ext.clean_up();
}
return *this;
}

boolean IuUP__PDU14__ACK::operator==(const IuUP__PDU14__ACK& other_value) const
{
return field_hdr==other_value.field_hdr
  && field_spare__ext==other_value.field_spare__ext;
}

boolean IuUP__PDU14__ACK::is_bound() const
{
return (field_hdr.is_bound())
  || (OPTIONAL_OMIT == field_spare__ext.get_selection() || field_spare__ext.is_bound());
}
boolean IuUP__PDU14__ACK::is_value() const
{
return field_hdr.is_value()
  && (OPTIONAL_OMIT == field_spare__ext.get_selection() || field_spare__ext.is_value());
}
int IuUP__PDU14__ACK::size_of() const
{
  int ret_val = 1;
  if (field_spare__ext.ispresent()) ret_val++;
  return ret_val;
}

void IuUP__PDU14__ACK::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ hdr := ");
field_hdr.log();
TTCN_Logger::log_event_str(", spare_ext := ");
field_spare__ext.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__ACK::set_implicit_omit()
{
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!spare__ext().is_bound()) spare__ext() = OMIT_VALUE;
else spare__ext().set_implicit_omit();
}

void IuUP__PDU14__ACK::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 @IuUP_Types.IuUP_PDU14_ACK 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare__ext().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__ext().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 @IuUP_Types.IuUP_PDU14_ACK: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_ACK");
  }
}

void IuUP__PDU14__ACK::encode_text(Text_Buf& text_buf) const
{
field_hdr.encode_text(text_buf);
field_spare__ext.encode_text(text_buf);
}

void IuUP__PDU14__ACK::decode_text(Text_Buf& text_buf)
{
field_hdr.decode_text(text_buf);
field_spare__ext.decode_text(text_buf);
}

void IuUP__PDU14__ACK::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 IuUP__PDU14__ACK::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 IuUP__PDU14__ACK::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, IuUP__PDU14__ACK_hdr_descr_.raw->forceomit);
  decoded_field_length = field_hdr.RAW_decode(IuUP__PDU14__ACK_hdr_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_spare__ext = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, IuUP__PDU14__ACK_spare__ext_descr_.raw->forceomit);
  decoded_field_length = field_spare__ext().RAW_decode(IuUP__PDU14__ACK_spare__ext_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_spare__ext = 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_spare__ext=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int IuUP__PDU14__ACK::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, IuUP__PDU14__ACK_hdr_descr_.raw);
  if (field_spare__ext.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__ACK_spare__ext_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  encoded_length += field_hdr.RAW_encode(IuUP__PDU14__ACK_hdr_descr_, *myleaf.body.node.nodes[0]);
  if (field_spare__ext.ispresent()) {
  encoded_length += field_spare__ext().RAW_encode(IuUP__PDU14__ACK_spare__ext_descr_, *myleaf.body.node.nodes[1]);
  }
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__ACK_template::single_value_struct {
IuUP__PDU__Type__14__Common__Hdr_template field_hdr;
OCTETSTRING_template field_spare__ext;
};

void IuUP__PDU14__ACK_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_hdr = ANY_VALUE;
single_value->field_spare__ext = ANY_OR_OMIT;
}
}
}

void IuUP__PDU14__ACK_template::copy_value(const IuUP__PDU14__ACK& other_value)
{
single_value = new single_value_struct;
if (other_value.hdr().is_bound()) {
  single_value->field_hdr = other_value.hdr();
} else {
  single_value->field_hdr.clean_up();
}
if (other_value.spare__ext().is_bound()) {
  if (other_value.spare__ext().ispresent()) single_value->field_spare__ext = other_value.spare__ext()();
  else single_value->field_spare__ext = OMIT_VALUE;
} else {
  single_value->field_spare__ext.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__ACK_template::copy_template(const IuUP__PDU14__ACK_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.hdr().get_selection()) {
single_value->field_hdr = other_value.hdr();
} else {
single_value->field_hdr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare__ext().get_selection()) {
single_value->field_spare__ext = other_value.spare__ext();
} else {
single_value->field_spare__ext.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 IuUP__PDU14__ACK_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 IuUP__PDU14__ACK_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__ACK_template::IuUP__PDU14__ACK_template()
{
}

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

IuUP__PDU14__ACK_template::IuUP__PDU14__ACK_template(const IuUP__PDU14__ACK& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__ACK_template::match(const IuUP__PDU14__ACK& 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.hdr().is_bound()) return FALSE;
if(!single_value->field_hdr.match(other_value.hdr(), legacy))return FALSE;
if(!other_value.spare__ext().is_bound()) return FALSE;
if((other_value.spare__ext().ispresent() ? !single_value->field_spare__ext.match((const OCTETSTRING&)other_value.spare__ext(), legacy) : !single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_ACK.");
}
return FALSE;
}

boolean IuUP__PDU14__ACK_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_hdr.is_bound()
 || (single_value->field_spare__ext.is_omit() || single_value->field_spare__ext.is_bound());
}

boolean IuUP__PDU14__ACK_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_hdr.is_value()
 && (single_value->field_spare__ext.is_omit() || single_value->field_spare__ext.is_value());
}

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

IuUP__PDU14__ACK IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK.");
IuUP__PDU14__ACK ret_val;
if (single_value->field_hdr.is_bound()) {
ret_val.hdr() = single_value->field_hdr.valueof();
}
if (single_value->field_spare__ext.is_omit()) ret_val.spare__ext() = OMIT_VALUE;
else if (single_value->field_spare__ext.is_bound()) {
ret_val.spare__ext() = single_value->field_spare__ext.valueof();
}
return ret_val;
}

void IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__ACK_template[list_length];
}

IuUP__PDU14__ACK_template& IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_ACK.");
return value_list.list_value[list_index];
}

IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__ACK_template::hdr()
{
set_specific();
return single_value->field_hdr;
}

const IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__ACK_template::hdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdr of a non-specific template of type @IuUP_Types.IuUP_PDU14_ACK.");
return single_value->field_hdr;
}

OCTETSTRING_template& IuUP__PDU14__ACK_template::spare__ext()
{
set_specific();
return single_value->field_spare__ext;
}

const OCTETSTRING_template& IuUP__PDU14__ACK_template::spare__ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_ext of a non-specific template of type @IuUP_Types.IuUP_PDU14_ACK.");
return single_value->field_spare__ext;
}

int IuUP__PDU14__ACK_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 1;
      if (single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_ACK 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 @IuUP_Types.IuUP_PDU14_ACK containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_ACK containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_ACK.");
  }
  return 0;
}

void IuUP__PDU14__ACK_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ hdr := ");
single_value->field_hdr.log();
TTCN_Logger::log_event_str(", spare_ext := ");
single_value->field_spare__ext.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 IuUP__PDU14__ACK_template::log_match(const IuUP__PDU14__ACK& 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_hdr.match(match_value.hdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdr");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare__ext().ispresent()){
if(!single_value->field_spare__ext.match(match_value.spare__ext(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_ext");
single_value->field_spare__ext.log_match(match_value.spare__ext(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare__ext.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare_ext := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare__ext.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("{ hdr := ");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::log_event_str(", spare_ext := ");
if (match_value.spare__ext().ispresent()) {
single_value->field_spare__ext.log_match(match_value.spare__ext(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare__ext.log();
if (single_value->field_spare__ext.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 IuUP__PDU14__ACK_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!spare__ext().is_bound()) spare__ext() = OMIT_VALUE;
else spare__ext().set_implicit_omit();
}

void IuUP__PDU14__ACK_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_hdr.encode_text(text_buf);
single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_ACK.");
}
}

void IuUP__PDU14__ACK_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_hdr.decode_text(text_buf);
single_value->field_spare__ext.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 IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK.");
}
}

void IuUP__PDU14__ACK_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: {
    IuUP__PDU14__ACK_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 @IuUP_Types.IuUP_PDU14_ACK 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare__ext().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__ext().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 @IuUP_Types.IuUP_PDU14_ACK: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__ACK_template* precondition = new IuUP__PDU14__ACK_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__ACK_template* implied_template = new IuUP__PDU14__ACK_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__ACK_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_ACK");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__ACK_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_hdr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ACK");
single_value->field_spare__ext.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_ACK");
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 : "@IuUP_Types.IuUP_PDU14_ACK");
}

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

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

IuUP__PDU14__NACK::IuUP__PDU14__NACK()
{
}

IuUP__PDU14__NACK::IuUP__PDU14__NACK(const IuUP__PDU__Type__14__Common__Hdr& par_hdr,
    const IuUP__ErrorCause& par_err__cause,
    const BITSTRING& par_spare,
    const OPTIONAL< OCTETSTRING >& par_spare__ext)
  :   field_hdr(par_hdr),
  field_err__cause(par_err__cause),
  field_spare(par_spare),
  field_spare__ext(par_spare__ext)
{
}

IuUP__PDU14__NACK::IuUP__PDU14__NACK(const IuUP__PDU14__NACK& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU14_NACK.");
if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
else field_hdr.clean_up();
if (other_value.err__cause().is_bound()) field_err__cause = other_value.err__cause();
else field_err__cause.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.spare__ext().is_bound()) field_spare__ext = other_value.spare__ext();
else field_spare__ext.clean_up();
}

void IuUP__PDU14__NACK::clean_up()
{
field_hdr.clean_up();
field_err__cause.clean_up();
field_spare.clean_up();
field_spare__ext.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU14__NACK::get_descriptor() const { return &IuUP__PDU14__NACK_descr_; }
IuUP__PDU14__NACK& IuUP__PDU14__NACK::operator=(const IuUP__PDU14__NACK& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU14_NACK.");
  if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
  else field_hdr.clean_up();
  if (other_value.err__cause().is_bound()) field_err__cause = other_value.err__cause();
  else field_err__cause.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.spare__ext().is_bound()) field_spare__ext = other_value.spare__ext();
  else field_spare__ext.clean_up();
}
return *this;
}

boolean IuUP__PDU14__NACK::operator==(const IuUP__PDU14__NACK& other_value) const
{
return field_hdr==other_value.field_hdr
  && field_err__cause==other_value.field_err__cause
  && field_spare==other_value.field_spare
  && field_spare__ext==other_value.field_spare__ext;
}

boolean IuUP__PDU14__NACK::is_bound() const
{
return (field_hdr.is_bound())
  || (field_err__cause.is_bound())
  || (field_spare.is_bound())
  || (OPTIONAL_OMIT == field_spare__ext.get_selection() || field_spare__ext.is_bound());
}
boolean IuUP__PDU14__NACK::is_value() const
{
return field_hdr.is_value()
  && field_err__cause.is_value()
  && field_spare.is_value()
  && (OPTIONAL_OMIT == field_spare__ext.get_selection() || field_spare__ext.is_value());
}
int IuUP__PDU14__NACK::size_of() const
{
  int ret_val = 3;
  if (field_spare__ext.ispresent()) ret_val++;
  return ret_val;
}

void IuUP__PDU14__NACK::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ hdr := ");
field_hdr.log();
TTCN_Logger::log_event_str(", err_cause := ");
field_err__cause.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", spare_ext := ");
field_spare__ext.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU14__NACK::set_implicit_omit()
{
if (hdr().is_bound()) hdr().set_implicit_omit();
if (err__cause().is_bound()) err__cause().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (!spare__ext().is_bound()) spare__ext() = OMIT_VALUE;
else spare__ext().set_implicit_omit();
}

void IuUP__PDU14__NACK::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 @IuUP_Types.IuUP_PDU14_NACK 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) err__cause().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) spare__ext().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "err_cause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          err__cause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "spare_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__ext().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 @IuUP_Types.IuUP_PDU14_NACK: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU14_NACK");
  }
}

void IuUP__PDU14__NACK::encode_text(Text_Buf& text_buf) const
{
field_hdr.encode_text(text_buf);
field_err__cause.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_spare__ext.encode_text(text_buf);
}

void IuUP__PDU14__NACK::decode_text(Text_Buf& text_buf)
{
field_hdr.decode_text(text_buf);
field_err__cause.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_spare__ext.decode_text(text_buf);
}

void IuUP__PDU14__NACK::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 IuUP__PDU14__NACK::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 IuUP__PDU14__NACK::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, IuUP__PDU14__NACK_hdr_descr_.raw->forceomit);
  decoded_field_length = field_hdr.RAW_decode(IuUP__PDU14__NACK_hdr_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, IuUP__PDU14__NACK_err__cause_descr_.raw->forceomit);
  decoded_field_length = field_err__cause.RAW_decode(IuUP__PDU14__NACK_err__cause_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, IuUP__PDU14__NACK_spare_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(IuUP__PDU14__NACK_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_spare__ext = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, IuUP__PDU14__NACK_spare__ext_descr_.raw->forceomit);
  decoded_field_length = field_spare__ext().RAW_decode(IuUP__PDU14__NACK_spare__ext_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_spare__ext = 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_spare__ext=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int IuUP__PDU14__NACK::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, IuUP__PDU14__NACK_hdr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU14__NACK_err__cause_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU14__NACK_spare_descr_.raw);
  if (field_spare__ext.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU14__NACK_spare__ext_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_hdr.RAW_encode(IuUP__PDU14__NACK_hdr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_err__cause.RAW_encode(IuUP__PDU14__NACK_err__cause_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare.RAW_encode(IuUP__PDU14__NACK_spare_descr_, *myleaf.body.node.nodes[2]);
  if (field_spare__ext.ispresent()) {
  encoded_length += field_spare__ext().RAW_encode(IuUP__PDU14__NACK_spare__ext_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct IuUP__PDU14__NACK_template::single_value_struct {
IuUP__PDU__Type__14__Common__Hdr_template field_hdr;
IuUP__ErrorCause_template field_err__cause;
BITSTRING_template field_spare;
OCTETSTRING_template field_spare__ext;
};

void IuUP__PDU14__NACK_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_hdr = ANY_VALUE;
single_value->field_err__cause = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_spare__ext = ANY_OR_OMIT;
}
}
}

void IuUP__PDU14__NACK_template::copy_value(const IuUP__PDU14__NACK& other_value)
{
single_value = new single_value_struct;
if (other_value.hdr().is_bound()) {
  single_value->field_hdr = other_value.hdr();
} else {
  single_value->field_hdr.clean_up();
}
if (other_value.err__cause().is_bound()) {
  single_value->field_err__cause = other_value.err__cause();
} else {
  single_value->field_err__cause.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.spare__ext().is_bound()) {
  if (other_value.spare__ext().ispresent()) single_value->field_spare__ext = other_value.spare__ext()();
  else single_value->field_spare__ext = OMIT_VALUE;
} else {
  single_value->field_spare__ext.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU14__NACK_template::copy_template(const IuUP__PDU14__NACK_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.hdr().get_selection()) {
single_value->field_hdr = other_value.hdr();
} else {
single_value->field_hdr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.err__cause().get_selection()) {
single_value->field_err__cause = other_value.err__cause();
} else {
single_value->field_err__cause.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.spare__ext().get_selection()) {
single_value->field_spare__ext = other_value.spare__ext();
} else {
single_value->field_spare__ext.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 IuUP__PDU14__NACK_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 IuUP__PDU14__NACK_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK.");
break;
}
set_selection(other_value);
}

IuUP__PDU14__NACK_template::IuUP__PDU14__NACK_template()
{
}

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

IuUP__PDU14__NACK_template::IuUP__PDU14__NACK_template(const IuUP__PDU14__NACK& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU14__NACK_template::match(const IuUP__PDU14__NACK& 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.hdr().is_bound()) return FALSE;
if(!single_value->field_hdr.match(other_value.hdr(), legacy))return FALSE;
if(!other_value.err__cause().is_bound()) return FALSE;
if(!single_value->field_err__cause.match(other_value.err__cause(), 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.spare__ext().is_bound()) return FALSE;
if((other_value.spare__ext().ispresent() ? !single_value->field_spare__ext.match((const OCTETSTRING&)other_value.spare__ext(), legacy) : !single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_NACK.");
}
return FALSE;
}

boolean IuUP__PDU14__NACK_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_hdr.is_bound()
 || single_value->field_err__cause.is_bound()
 || single_value->field_spare.is_bound()
 || (single_value->field_spare__ext.is_omit() || single_value->field_spare__ext.is_bound());
}

boolean IuUP__PDU14__NACK_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_hdr.is_value()
 && single_value->field_err__cause.is_value()
 && single_value->field_spare.is_value()
 && (single_value->field_spare__ext.is_omit() || single_value->field_spare__ext.is_value());
}

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

IuUP__PDU14__NACK IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK.");
IuUP__PDU14__NACK ret_val;
if (single_value->field_hdr.is_bound()) {
ret_val.hdr() = single_value->field_hdr.valueof();
}
if (single_value->field_err__cause.is_bound()) {
ret_val.err__cause() = single_value->field_err__cause.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_spare__ext.is_omit()) ret_val.spare__ext() = OMIT_VALUE;
else if (single_value->field_spare__ext.is_bound()) {
ret_val.spare__ext() = single_value->field_spare__ext.valueof();
}
return ret_val;
}

void IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU14__NACK_template[list_length];
}

IuUP__PDU14__NACK_template& IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU14_NACK.");
return value_list.list_value[list_index];
}

IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__NACK_template::hdr()
{
set_specific();
return single_value->field_hdr;
}

const IuUP__PDU__Type__14__Common__Hdr_template& IuUP__PDU14__NACK_template::hdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdr of a non-specific template of type @IuUP_Types.IuUP_PDU14_NACK.");
return single_value->field_hdr;
}

IuUP__ErrorCause_template& IuUP__PDU14__NACK_template::err__cause()
{
set_specific();
return single_value->field_err__cause;
}

const IuUP__ErrorCause_template& IuUP__PDU14__NACK_template::err__cause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field err_cause of a non-specific template of type @IuUP_Types.IuUP_PDU14_NACK.");
return single_value->field_err__cause;
}

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

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

OCTETSTRING_template& IuUP__PDU14__NACK_template::spare__ext()
{
set_specific();
return single_value->field_spare__ext;
}

const OCTETSTRING_template& IuUP__PDU14__NACK_template::spare__ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_ext of a non-specific template of type @IuUP_Types.IuUP_PDU14_NACK.");
return single_value->field_spare__ext;
}

int IuUP__PDU14__NACK_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 3;
      if (single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_NACK 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 @IuUP_Types.IuUP_PDU14_NACK containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU14_NACK containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU14_NACK.");
  }
  return 0;
}

void IuUP__PDU14__NACK_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ hdr := ");
single_value->field_hdr.log();
TTCN_Logger::log_event_str(", err_cause := ");
single_value->field_err__cause.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", spare_ext := ");
single_value->field_spare__ext.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 IuUP__PDU14__NACK_template::log_match(const IuUP__PDU14__NACK& 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_hdr.match(match_value.hdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdr");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_err__cause.match(match_value.err__cause(), legacy)){
TTCN_Logger::log_logmatch_info(".err_cause");
single_value->field_err__cause.log_match(match_value.err__cause(), 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 (match_value.spare__ext().ispresent()){
if(!single_value->field_spare__ext.match(match_value.spare__ext(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_ext");
single_value->field_spare__ext.log_match(match_value.spare__ext(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare__ext.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare_ext := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare__ext.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("{ hdr := ");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::log_event_str(", err_cause := ");
single_value->field_err__cause.log_match(match_value.err__cause(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", spare_ext := ");
if (match_value.spare__ext().ispresent()) {
single_value->field_spare__ext.log_match(match_value.spare__ext(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare__ext.log();
if (single_value->field_spare__ext.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 IuUP__PDU14__NACK_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (hdr().is_bound()) hdr().set_implicit_omit();
if (err__cause().is_bound()) err__cause().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (!spare__ext().is_bound()) spare__ext() = OMIT_VALUE;
else spare__ext().set_implicit_omit();
}

void IuUP__PDU14__NACK_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_hdr.encode_text(text_buf);
single_value->field_err__cause.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_spare__ext.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 @IuUP_Types.IuUP_PDU14_NACK.");
}
}

void IuUP__PDU14__NACK_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_hdr.decode_text(text_buf);
single_value->field_err__cause.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_spare__ext.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 IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK.");
}
}

void IuUP__PDU14__NACK_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: {
    IuUP__PDU14__NACK_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 @IuUP_Types.IuUP_PDU14_NACK 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) hdr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) err__cause().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) spare__ext().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(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "err_cause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          err__cause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "spare_ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__ext().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 @IuUP_Types.IuUP_PDU14_NACK: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU14__NACK_template* precondition = new IuUP__PDU14__NACK_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU14__NACK_template* implied_template = new IuUP__PDU14__NACK_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU14__NACK_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU14_NACK");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU14__NACK_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_hdr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_NACK");
single_value->field_err__cause.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_NACK");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_NACK");
single_value->field_spare__ext.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU14_NACK");
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 : "@IuUP_Types.IuUP_PDU14_NACK");
}

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

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

IuUP__PDU__Type__14::IuUP__PDU__Type__14()
{
}

IuUP__PDU__Type__14::IuUP__PDU__Type__14(const INTEGER& par_pdu__type,
    const IuUP__AckNack& par_ack__nack,
    const INTEGER& par_frame__nr,
    const IuUP__PDU14__Union& par_u)
  :   field_pdu__type(par_pdu__type),
  field_ack__nack(par_ack__nack),
  field_frame__nr(par_frame__nr),
  field_u(par_u)
{
}

IuUP__PDU__Type__14::IuUP__PDU__Type__14(const IuUP__PDU__Type__14& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IuUP_Types.IuUP_PDU_Type_14.");
if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
else field_pdu__type.clean_up();
if (other_value.ack__nack().is_bound()) field_ack__nack = other_value.ack__nack();
else field_ack__nack.clean_up();
if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
else field_frame__nr.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
}

void IuUP__PDU__Type__14::clean_up()
{
field_pdu__type.clean_up();
field_ack__nack.clean_up();
field_frame__nr.clean_up();
field_u.clean_up();
}

const TTCN_Typedescriptor_t* IuUP__PDU__Type__14::get_descriptor() const { return &IuUP__PDU__Type__14_descr_; }
IuUP__PDU__Type__14& IuUP__PDU__Type__14::operator=(const IuUP__PDU__Type__14& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IuUP_Types.IuUP_PDU_Type_14.");
  if (other_value.pdu__type().is_bound()) field_pdu__type = other_value.pdu__type();
  else field_pdu__type.clean_up();
  if (other_value.ack__nack().is_bound()) field_ack__nack = other_value.ack__nack();
  else field_ack__nack.clean_up();
  if (other_value.frame__nr().is_bound()) field_frame__nr = other_value.frame__nr();
  else field_frame__nr.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
}
return *this;
}

boolean IuUP__PDU__Type__14::operator==(const IuUP__PDU__Type__14& other_value) const
{
return field_pdu__type==other_value.field_pdu__type
  && field_ack__nack==other_value.field_ack__nack
  && field_frame__nr==other_value.field_frame__nr
  && field_u==other_value.field_u;
}

boolean IuUP__PDU__Type__14::is_bound() const
{
return (field_pdu__type.is_bound())
  || (field_ack__nack.is_bound())
  || (field_frame__nr.is_bound())
  || (field_u.is_bound());
}
boolean IuUP__PDU__Type__14::is_value() const
{
return field_pdu__type.is_value()
  && field_ack__nack.is_value()
  && field_frame__nr.is_value()
  && field_u.is_value();
}
void IuUP__PDU__Type__14::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ pdu_type := ");
field_pdu__type.log();
TTCN_Logger::log_event_str(", ack_nack := ");
field_ack__nack.log();
TTCN_Logger::log_event_str(", frame_nr := ");
field_frame__nr.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(" }");
}

void IuUP__PDU__Type__14::set_implicit_omit()
{
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (ack__nack().is_bound()) ack__nack().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void IuUP__PDU__Type__14::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 @IuUP_Types.IuUP_PDU_Type_14 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ack__nack().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) frame__nr().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "ack_nack")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ack__nack().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "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 @IuUP_Types.IuUP_PDU_Type_14: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@IuUP_Types.IuUP_PDU_Type_14");
  }
}

void IuUP__PDU__Type__14::encode_text(Text_Buf& text_buf) const
{
field_pdu__type.encode_text(text_buf);
field_ack__nack.encode_text(text_buf);
field_frame__nr.encode_text(text_buf);
field_u.encode_text(text_buf);
}

void IuUP__PDU__Type__14::decode_text(Text_Buf& text_buf)
{
field_pdu__type.decode_text(text_buf);
field_ack__nack.decode_text(text_buf);
field_frame__nr.decode_text(text_buf);
field_u.decode_text(text_buf);
}

void IuUP__PDU__Type__14::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 IuUP__PDU__Type__14::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 IuUP__PDU__Type__14::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;
  RAW_Force_Omit field_0_force_omit(0, force_omit, IuUP__PDU__Type__14_pdu__type_descr_.raw->forceomit);
  decoded_field_length = field_pdu__type.RAW_decode(IuUP__PDU__Type__14_pdu__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, IuUP__PDU__Type__14_ack__nack_descr_.raw->forceomit);
  decoded_field_length = field_ack__nack.RAW_decode(IuUP__PDU__Type__14_ack__nack_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, IuUP__PDU__Type__14_frame__nr_descr_.raw->forceomit);
  decoded_field_length = field_frame__nr.RAW_decode(IuUP__PDU__Type__14_frame__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());
  if (field_ack__nack == IuUP__AckNack::IuUP__ACKNACK__CTRL) selected_field = 0;
  else if (field_ack__nack == IuUP__AckNack::IuUP__ACKNACK__ACK) selected_field = 1;
  else if (field_ack__nack == IuUP__AckNack::IuUP__ACKNACK__NACK) selected_field = 2;
  else selected_field = -1;
  RAW_Force_Omit field_3_force_omit(3, force_omit, IuUP__PDU__Type__14_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(IuUP__PDU__Type__14_u_descr_, p_buf, limit, 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());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int IuUP__PDU__Type__14::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, IuUP__PDU__Type__14_pdu__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, IuUP__PDU__Type__14_ack__nack_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, IuUP__PDU__Type__14_frame__nr_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, IuUP__PDU__Type__14_u_descr_.raw);
  encoded_length += field_pdu__type.RAW_encode(IuUP__PDU__Type__14_pdu__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_ack__nack.RAW_encode(IuUP__PDU__Type__14_ack__nack_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_frame__nr.RAW_encode(IuUP__PDU__Type__14_frame__nr_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_u.RAW_encode(IuUP__PDU__Type__14_u_descr_, *myleaf.body.node.nodes[3]);
  switch (field_u.get_selection()) {
  case IuUP__PDU14__Union::ALT_proc:
  if (field_ack__nack != IuUP__AckNack::IuUP__ACKNACK__CTRL) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  IuUP__AckNack new_val(IuUP__AckNack::IuUP__ACKNACK__CTRL);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14_ack__nack_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 IuUP__PDU14__Union::ALT_ack:
  if (field_ack__nack != IuUP__AckNack::IuUP__ACKNACK__ACK) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  IuUP__AckNack new_val(IuUP__AckNack::IuUP__ACKNACK__ACK);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14_ack__nack_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 IuUP__PDU14__Union::ALT_nack:
  if (field_ack__nack != IuUP__AckNack::IuUP__ACKNACK__NACK) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 1 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  IuUP__AckNack new_val(IuUP__AckNack::IuUP__ACKNACK__NACK);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(IuUP__PDU__Type__14_ack__nack_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 IuUP__PDU__Type__14_template::single_value_struct {
INTEGER_template field_pdu__type;
IuUP__AckNack_template field_ack__nack;
INTEGER_template field_frame__nr;
IuUP__PDU14__Union_template field_u;
};

void IuUP__PDU__Type__14_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_pdu__type = ANY_VALUE;
single_value->field_ack__nack = ANY_VALUE;
single_value->field_frame__nr = ANY_VALUE;
single_value->field_u = ANY_VALUE;
}
}
}

void IuUP__PDU__Type__14_template::copy_value(const IuUP__PDU__Type__14& other_value)
{
single_value = new single_value_struct;
if (other_value.pdu__type().is_bound()) {
  single_value->field_pdu__type = other_value.pdu__type();
} else {
  single_value->field_pdu__type.clean_up();
}
if (other_value.ack__nack().is_bound()) {
  single_value->field_ack__nack = other_value.ack__nack();
} else {
  single_value->field_ack__nack.clean_up();
}
if (other_value.frame__nr().is_bound()) {
  single_value->field_frame__nr = other_value.frame__nr();
} else {
  single_value->field_frame__nr.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 IuUP__PDU__Type__14_template::copy_template(const IuUP__PDU__Type__14_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.pdu__type().get_selection()) {
single_value->field_pdu__type = other_value.pdu__type();
} else {
single_value->field_pdu__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ack__nack().get_selection()) {
single_value->field_ack__nack = other_value.ack__nack();
} else {
single_value->field_ack__nack.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.frame__nr().get_selection()) {
single_value->field_frame__nr = other_value.frame__nr();
} else {
single_value->field_frame__nr.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 IuUP__PDU__Type__14_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 IuUP__PDU__Type__14_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14.");
break;
}
set_selection(other_value);
}

IuUP__PDU__Type__14_template::IuUP__PDU__Type__14_template()
{
}

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

IuUP__PDU__Type__14_template::IuUP__PDU__Type__14_template(const IuUP__PDU__Type__14& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean IuUP__PDU__Type__14_template::match(const IuUP__PDU__Type__14& 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.pdu__type().is_bound()) return FALSE;
if(!single_value->field_pdu__type.match(other_value.pdu__type(), legacy))return FALSE;
if(!other_value.ack__nack().is_bound()) return FALSE;
if(!single_value->field_ack__nack.match(other_value.ack__nack(), legacy))return FALSE;
if(!other_value.frame__nr().is_bound()) return FALSE;
if(!single_value->field_frame__nr.match(other_value.frame__nr(), 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 @IuUP_Types.IuUP_PDU_Type_14.");
}
return FALSE;
}

boolean IuUP__PDU__Type__14_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_pdu__type.is_bound()
 || single_value->field_ack__nack.is_bound()
 || single_value->field_frame__nr.is_bound()
 || single_value->field_u.is_bound();
}

boolean IuUP__PDU__Type__14_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_pdu__type.is_value()
 && single_value->field_ack__nack.is_value()
 && single_value->field_frame__nr.is_value()
 && single_value->field_u.is_value();
}

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

IuUP__PDU__Type__14 IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14.");
IuUP__PDU__Type__14 ret_val;
if (single_value->field_pdu__type.is_bound()) {
ret_val.pdu__type() = single_value->field_pdu__type.valueof();
}
if (single_value->field_ack__nack.is_bound()) {
ret_val.ack__nack() = single_value->field_ack__nack.valueof();
}
if (single_value->field_frame__nr.is_bound()) {
ret_val.frame__nr() = single_value->field_frame__nr.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
return ret_val;
}

void IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU__Type__14_template[list_length];
}

IuUP__PDU__Type__14_template& IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @IuUP_Types.IuUP_PDU_Type_14.");
return value_list.list_value[list_index];
}

INTEGER_template& IuUP__PDU__Type__14_template::pdu__type()
{
set_specific();
return single_value->field_pdu__type;
}

const INTEGER_template& IuUP__PDU__Type__14_template::pdu__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pdu_type of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14.");
return single_value->field_pdu__type;
}

IuUP__AckNack_template& IuUP__PDU__Type__14_template::ack__nack()
{
set_specific();
return single_value->field_ack__nack;
}

const IuUP__AckNack_template& IuUP__PDU__Type__14_template::ack__nack() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ack_nack of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14.");
return single_value->field_ack__nack;
}

INTEGER_template& IuUP__PDU__Type__14_template::frame__nr()
{
set_specific();
return single_value->field_frame__nr;
}

const INTEGER_template& IuUP__PDU__Type__14_template::frame__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field frame_nr of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14.");
return single_value->field_frame__nr;
}

IuUP__PDU14__Union_template& IuUP__PDU__Type__14_template::u()
{
set_specific();
return single_value->field_u;
}

const IuUP__PDU14__Union_template& IuUP__PDU__Type__14_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @IuUP_Types.IuUP_PDU_Type_14.");
return single_value->field_u;
}

int IuUP__PDU__Type__14_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 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 @IuUP_Types.IuUP_PDU_Type_14 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 @IuUP_Types.IuUP_PDU_Type_14 containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @IuUP_Types.IuUP_PDU_Type_14 containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IuUP_Types.IuUP_PDU_Type_14.");
  }
  return 0;
}

void IuUP__PDU__Type__14_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ pdu_type := ");
single_value->field_pdu__type.log();
TTCN_Logger::log_event_str(", ack_nack := ");
single_value->field_ack__nack.log();
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.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 IuUP__PDU__Type__14_template::log_match(const IuUP__PDU__Type__14& 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_pdu__type.match(match_value.pdu__type(), legacy)){
TTCN_Logger::log_logmatch_info(".pdu_type");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ack__nack.match(match_value.ack__nack(), legacy)){
TTCN_Logger::log_logmatch_info(".ack_nack");
single_value->field_ack__nack.log_match(match_value.ack__nack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_frame__nr.match(match_value.frame__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".frame_nr");
single_value->field_frame__nr.log_match(match_value.frame__nr(), 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("{ pdu_type := ");
single_value->field_pdu__type.log_match(match_value.pdu__type(), legacy);
TTCN_Logger::log_event_str(", ack_nack := ");
single_value->field_ack__nack.log_match(match_value.ack__nack(), legacy);
TTCN_Logger::log_event_str(", frame_nr := ");
single_value->field_frame__nr.log_match(match_value.frame__nr(), 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 IuUP__PDU__Type__14_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (pdu__type().is_bound()) pdu__type().set_implicit_omit();
if (ack__nack().is_bound()) ack__nack().set_implicit_omit();
if (frame__nr().is_bound()) frame__nr().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void IuUP__PDU__Type__14_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_pdu__type.encode_text(text_buf);
single_value->field_ack__nack.encode_text(text_buf);
single_value->field_frame__nr.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 @IuUP_Types.IuUP_PDU_Type_14.");
}
}

void IuUP__PDU__Type__14_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_pdu__type.decode_text(text_buf);
single_value->field_ack__nack.decode_text(text_buf);
single_value->field_frame__nr.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 IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14.");
}
}

void IuUP__PDU__Type__14_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: {
    IuUP__PDU__Type__14_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 @IuUP_Types.IuUP_PDU_Type_14 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) pdu__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ack__nack().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) frame__nr().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(), "pdu_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdu__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(), "ack_nack")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ack__nack().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "frame_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          frame__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(), "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 @IuUP_Types.IuUP_PDU_Type_14: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU__Type__14_template* precondition = new IuUP__PDU__Type__14_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__PDU__Type__14_template* implied_template = new IuUP__PDU__Type__14_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__PDU__Type__14_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@IuUP_Types.IuUP_PDU_Type_14");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU__Type__14_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_pdu__type.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14");
single_value->field_ack__nack.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14");
single_value->field_frame__nr.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14");
single_value->field_u.check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU_Type_14");
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 : "@IuUP_Types.IuUP_PDU_Type_14");
}

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

boolean IuUP__PDU__Type__14_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 IuUP__InitRfci IuUP__InitRfciList::UNBOUND_ELEM;
IuUP__InitRfciList::IuUP__InitRfciList()
{
val_ptr = NULL;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void IuUP__InitRfciList::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 IuUP__InitRfciList::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 IuUP__InitRfciList::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 IuUP__InitRfciList::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 IuUP__InitRfciList_template::copy_value(const IuUP__InitRfciList& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @IuUP_Types.IuUP_InitRfciList with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (IuUP__InitRfci_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 IuUP__InitRfci_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new IuUP__InitRfci_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__InitRfciList_template::copy_template(const IuUP__InitRfciList_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 = (IuUP__InitRfci_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 IuUP__InitRfci_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new IuUP__InitRfci_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 IuUP__InitRfciList_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 IuUP__InitRfciList_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__InitRfciList_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 @IuUP_Types.IuUP_InitRfciList.");
break;
}
set_selection(other_value);
}

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

IuUP__InitRfciList_template::IuUP__InitRfciList_template()
{
}

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

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

IuUP__InitRfciList_template::IuUP__InitRfciList_template(const IuUP__InitRfciList& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean IuUP__InitRfciList_template::match(const IuUP__InitRfciList& 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 @IuUP_Types.IuUP_InitRfciList.");
}
return FALSE;
}

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

IuUP__InitRfciList IuUP__InitRfciList_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 @IuUP_Types.IuUP_InitRfciList.");
IuUP__InitRfciList 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;
}

IuUP__InitRfciList IuUP__InitRfciList_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);
}

IuUP__InitRfciList IuUP__InitRfciList_template::replace(int index, int len, const IuUP__InitRfciList_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());
}

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

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

void IuUP__InitRfciList_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 IuUP__InitRfciList_template::log_match(const IuUP__InitRfciList& 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 IuUP__InitRfciList_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 @IuUP_Types.IuUP_InitRfciList.");
}
}

void IuUP__InitRfciList_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 @IuUP_Types.IuUP_InitRfciList.");
single_value.value_elements = (IuUP__InitRfci_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 IuUP__InitRfci_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 IuUP__InitRfciList_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 @IuUP_Types.IuUP_InitRfciList.");
}
}

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

boolean IuUP__InitRfciList_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 IuUP__InitRfciList_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 IuUP__InitRfciList_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: {
    IuUP__InitRfciList_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: {
    IuUP__InitRfciList_template* precondition = new IuUP__InitRfciList_template;
    precondition->set_param(*param.get_elem(0));
    IuUP__InitRfciList_template* implied_template = new IuUP__InitRfciList_template;
    implied_template->set_param(*param.get_elem(1));
    *this = IuUP__InitRfciList_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@IuUP_Types.IuUP_InitRfciList");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void IuUP__InitRfciList_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 : "@IuUP_Types.IuUP_InitRfciList");
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 : "@IuUP_Types.IuUP_InitRfciList");
}

boolean IuUP__InitRfciList_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);
}
}
void IuUP__PDU::copy_value(const IuUP__PDU& other_value)
{
switch (other_value.union_selection) {
case ALT_type__0:
field_type__0 = new IuUP__PDU__Type__0(*other_value.field_type__0);
break;
case ALT_type__1:
field_type__1 = new IuUP__PDU__Type__1(*other_value.field_type__1);
break;
case ALT_type__14:
field_type__14 = new IuUP__PDU__Type__14(*other_value.field_type__14);
break;
default:
TTCN_error("Assignment of an unbound union value of type @IuUP_Types.IuUP_PDU.");
}
union_selection = other_value.union_selection;
}

IuUP__PDU::IuUP__PDU()
{
union_selection = UNBOUND_VALUE;
}

IuUP__PDU::IuUP__PDU(const IuUP__PDU& other_value)
: Base_Type(){
copy_value(other_value);
}

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

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

boolean IuUP__PDU::operator==(const IuUP__PDU& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @IuUP_Types.IuUP_PDU.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_type__0:
return *field_type__0 == *other_value.field_type__0;
case ALT_type__1:
return *field_type__1 == *other_value.field_type__1;
case ALT_type__14:
return *field_type__14 == *other_value.field_type__14;
default:
return FALSE;
}
}

IuUP__PDU__Type__0& IuUP__PDU::type__0()
{
if (union_selection != ALT_type__0) {
clean_up();
field_type__0 = new IuUP__PDU__Type__0;
union_selection = ALT_type__0;
}
return *field_type__0;
}

const IuUP__PDU__Type__0& IuUP__PDU::type__0() const
{
if (union_selection != ALT_type__0) TTCN_error("Using non-selected field type_0 in a value of union type @IuUP_Types.IuUP_PDU.");
return *field_type__0;
}

IuUP__PDU__Type__1& IuUP__PDU::type__1()
{
if (union_selection != ALT_type__1) {
clean_up();
field_type__1 = new IuUP__PDU__Type__1;
union_selection = ALT_type__1;
}
return *field_type__1;
}

const IuUP__PDU__Type__1& IuUP__PDU::type__1() const
{
if (union_selection != ALT_type__1) TTCN_error("Using non-selected field type_1 in a value of union type @IuUP_Types.IuUP_PDU.");
return *field_type__1;
}

IuUP__PDU__Type__14& IuUP__PDU::type__14()
{
if (union_selection != ALT_type__14) {
clean_up();
field_type__14 = new IuUP__PDU__Type__14;
union_selection = ALT_type__14;
}
return *field_type__14;
}

const IuUP__PDU__Type__14& IuUP__PDU::type__14() const
{
if (union_selection != ALT_type__14) TTCN_error("Using non-selected field type_14 in a value of union type @IuUP_Types.IuUP_PDU.");
return *field_type__14;
}

boolean IuUP__PDU::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 @IuUP_Types.IuUP_PDU.");
return union_selection == checked_selection;
}

boolean IuUP__PDU::is_bound() const
{
  return union_selection != UNBOUND_VALUE;
}

boolean IuUP__PDU::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_type__0: return field_type__0->is_value();
case ALT_type__1: return field_type__1->is_value();
case ALT_type__14: return field_type__14->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void IuUP__PDU::clean_up()
{
switch (union_selection) {
case ALT_type__0:
  delete field_type__0;
  break;
case ALT_type__1:
  delete field_type__1;
  break;
case ALT_type__14:
  delete field_type__14;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void IuUP__PDU::log() const
{
switch (union_selection) {
case ALT_type__0:
TTCN_Logger::log_event_str("{ type_0 := ");
field_type__0->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_type__1:
TTCN_Logger::log_event_str("{ type_1 := ");
field_type__1->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_type__14:
TTCN_Logger::log_event_str("{ type_14 := ");
field_type__14->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void IuUP__PDU::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, "type_0")) {
    type__0().set_param(*mp_last);
    if (!type__0().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "type_1")) {
    type__1().set_param(*mp_last);
    if (!type__1().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "type_14")) {
    type__14().set_param(*mp_last);
    if (!type__14().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @IuUP_Types.IuUP_PDU.", last_name);
}

void IuUP__PDU::set_implicit_omit()
{
switch (union_selection) {
case ALT_type__0:
field_type__0->set_implicit_omit(); break;
case ALT_type__1:
field_type__1->set_implicit_omit(); break;
case ALT_type__14:
field_type__14->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_type__0:
field_type__0->encode_text(text_buf);
break;
case ALT_type__1:
field_type__1->encode_text(text_buf);
break;
case ALT_type__14:
field_type__14->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @IuUP_Types.IuUP_PDU.");
}
}

void IuUP__PDU::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_type__0:
type__0().decode_text(text_buf);
break;
case ALT_type__1:
type__1().decode_text(text_buf);
break;
case ALT_type__14:
type__14().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @IuUP_Types.IuUP_PDU.");
}
}

void IuUP__PDU::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 IuUP__PDU::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 IuUP__PDU::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, IuUP__PDU_type__0_descr_.raw->forceomit);
      decoded_length = type__0().RAW_decode(IuUP__PDU_type__0_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, IuUP__PDU_type__1_descr_.raw->forceomit);
      decoded_length = type__1().RAW_decode(IuUP__PDU_type__1_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, IuUP__PDU_type__14_descr_.raw->forceomit);
      decoded_length = type__14().RAW_decode(IuUP__PDU_type__14_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 {
    boolean already_failed = FALSE;
    already_failed = FALSE;
    if (!already_failed) {
      INTEGER temporal_0;
      int decoded_0_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_0_length = temporal_0.RAW_decode(IuUP__PDU__Type__0_pdu__type_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_0_length > 0) {
        if (temporal_0 == 0) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(0, force_omit, IuUP__PDU_type__0_descr_.raw->forceomit);
          decoded_length = type__0().RAW_decode(IuUP__PDU_type__0_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_type__0).pdu__type() == 0) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      INTEGER temporal_1;
      int decoded_1_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_1_length = temporal_1.RAW_decode(IuUP__PDU__Type__1_pdu__type_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_1_length > 0) {
        if (temporal_1 == 1) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(1, force_omit, IuUP__PDU_type__1_descr_.raw->forceomit);
          decoded_length = type__1().RAW_decode(IuUP__PDU_type__1_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_type__1).pdu__type() == 1) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      INTEGER temporal_2;
      int decoded_2_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_2_length = temporal_2.RAW_decode(IuUP__PDU__Type__14_pdu__type_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_2_length > 0) {
        if (temporal_2 == 14) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(2, force_omit, IuUP__PDU_type__14_descr_.raw->forceomit);
          decoded_length = type__14().RAW_decode(IuUP__PDU_type__14_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_type__14).pdu__type() == 14) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
 }
 clean_up();
 return -1;
}

int IuUP__PDU::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_type__0:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, IuUP__PDU_type__0_descr_.raw);
    encoded_length = field_type__0->RAW_encode(IuUP__PDU_type__0_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &IuUP__PDU_type__0_descr_;
    if ((*field_type__0).pdu__type() != 0) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={0,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  INTEGER new_val = 0;
  new_val.RAW_encode(IuUP__PDU__Type__0_pdu__type_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_type__1:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, IuUP__PDU_type__1_descr_.raw);
    encoded_length = field_type__1->RAW_encode(IuUP__PDU_type__1_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &IuUP__PDU_type__1_descr_;
    if ((*field_type__1).pdu__type() != 1) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={1,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  INTEGER new_val = 1;
  new_val.RAW_encode(IuUP__PDU__Type__1_pdu__type_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_type__14:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, IuUP__PDU_type__14_descr_.raw);
    encoded_length = field_type__14->RAW_encode(IuUP__PDU_type__14_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &IuUP__PDU_type__14_descr_;
    if ((*field_type__14).pdu__type() != 14) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={2,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
  INTEGER new_val = 14;
  new_val.RAW_encode(IuUP__PDU__Type__14_pdu__type_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void IuUP__PDU_template::copy_value(const IuUP__PDU& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
single_value.field_type__0 = new IuUP__PDU__Type__0_template(other_value.type__0());
break;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1 = new IuUP__PDU__Type__1_template(other_value.type__1());
break;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14 = new IuUP__PDU__Type__14_template(other_value.type__14());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @IuUP_Types.IuUP_PDU.");
}
set_selection(SPECIFIC_VALUE);
}

void IuUP__PDU_template::copy_template(const IuUP__PDU_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 IuUP__PDU::ALT_type__0:
single_value.field_type__0 = new IuUP__PDU__Type__0_template(*other_value.single_value.field_type__0);
break;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1 = new IuUP__PDU__Type__1_template(*other_value.single_value.field_type__1);
break;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14 = new IuUP__PDU__Type__14_template(*other_value.single_value.field_type__14);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @IuUP_Types.IuUP_PDU.");
}
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 IuUP__PDU_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 IuUP__PDU_template(*other_value.implication_.precondition);
implication_.implied_template = new IuUP__PDU_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 @IuUP_Types.IuUP_PDU.");
}
set_selection(other_value);
}

IuUP__PDU_template::IuUP__PDU_template()
{
}

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

IuUP__PDU_template::IuUP__PDU_template(const IuUP__PDU& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void IuUP__PDU_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
delete single_value.field_type__0;
break;
case IuUP__PDU::ALT_type__1:
delete single_value.field_type__1;
break;
case IuUP__PDU::ALT_type__14:
delete single_value.field_type__14;
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;
}

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

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

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

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

boolean IuUP__PDU_template::match(const IuUP__PDU& 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:
{
IuUP__PDU::union_selection_type value_selection = other_value.get_selection();
if (value_selection == IuUP__PDU::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case IuUP__PDU::ALT_type__0:
return single_value.field_type__0->match(other_value.type__0(), legacy);
case IuUP__PDU::ALT_type__1:
return single_value.field_type__1->match(other_value.type__1(), legacy);
case IuUP__PDU::ALT_type__14:
return single_value.field_type__14->match(other_value.type__14(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @IuUP_Types.IuUP_PDU.");
}
}
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 @IuUP_Types.IuUP_PDU.");
}
return FALSE;
}

boolean IuUP__PDU_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
return single_value.field_type__0->is_value();
case IuUP__PDU::ALT_type__1:
return single_value.field_type__1->is_value();
case IuUP__PDU::ALT_type__14:
return single_value.field_type__14->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @IuUP_Types.IuUP_PDU.");
}
}

IuUP__PDU IuUP__PDU_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 @IuUP_Types.IuUP_PDU.");
IuUP__PDU ret_val;
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
ret_val.type__0() = single_value.field_type__0->valueof();
break;
case IuUP__PDU::ALT_type__1:
ret_val.type__1() = single_value.field_type__1->valueof();
break;
case IuUP__PDU::ALT_type__14:
ret_val.type__14() = single_value.field_type__14->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @IuUP_Types.IuUP_PDU.");
}
return ret_val;
}

IuUP__PDU_template& IuUP__PDU_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 @IuUP_Types.IuUP_PDU.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @IuUP_Types.IuUP_PDU.");
return value_list.list_value[list_index];
}
void IuUP__PDU_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 @IuUP_Types.IuUP_PDU.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new IuUP__PDU_template[list_length];
}

IuUP__PDU__Type__0_template& IuUP__PDU_template::type__0()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU::ALT_type__0) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_type__0 = new IuUP__PDU__Type__0_template(ANY_VALUE);
else single_value.field_type__0 = new IuUP__PDU__Type__0_template;
single_value.union_selection = IuUP__PDU::ALT_type__0;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_type__0;
}

const IuUP__PDU__Type__0_template& IuUP__PDU_template::type__0() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field type_0 in a non-specific template of union type @IuUP_Types.IuUP_PDU.");
if (single_value.union_selection != IuUP__PDU::ALT_type__0) TTCN_error("Accessing non-selected field type_0 in a template of union type @IuUP_Types.IuUP_PDU.");
return *single_value.field_type__0;
}

IuUP__PDU__Type__1_template& IuUP__PDU_template::type__1()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU::ALT_type__1) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_type__1 = new IuUP__PDU__Type__1_template(ANY_VALUE);
else single_value.field_type__1 = new IuUP__PDU__Type__1_template;
single_value.union_selection = IuUP__PDU::ALT_type__1;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_type__1;
}

const IuUP__PDU__Type__1_template& IuUP__PDU_template::type__1() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field type_1 in a non-specific template of union type @IuUP_Types.IuUP_PDU.");
if (single_value.union_selection != IuUP__PDU::ALT_type__1) TTCN_error("Accessing non-selected field type_1 in a template of union type @IuUP_Types.IuUP_PDU.");
return *single_value.field_type__1;
}

IuUP__PDU__Type__14_template& IuUP__PDU_template::type__14()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != IuUP__PDU::ALT_type__14) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_type__14 = new IuUP__PDU__Type__14_template(ANY_VALUE);
else single_value.field_type__14 = new IuUP__PDU__Type__14_template;
single_value.union_selection = IuUP__PDU::ALT_type__14;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_type__14;
}

const IuUP__PDU__Type__14_template& IuUP__PDU_template::type__14() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field type_14 in a non-specific template of union type @IuUP_Types.IuUP_PDU.");
if (single_value.union_selection != IuUP__PDU::ALT_type__14) TTCN_error("Accessing non-selected field type_14 in a template of union type @IuUP_Types.IuUP_PDU.");
return *single_value.field_type__14;
}

boolean IuUP__PDU_template::ischosen(IuUP__PDU::union_selection_type checked_selection) const
{
if (checked_selection == IuUP__PDU::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IuUP_Types.IuUP_PDU.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == IuUP__PDU::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @IuUP_Types.IuUP_PDU.");
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 @IuUP_Types.IuUP_PDU 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 IuUP__PDU_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
TTCN_Logger::log_event_str("{ type_0 := ");
single_value.field_type__0->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU::ALT_type__1:
TTCN_Logger::log_event_str("{ type_1 := ");
single_value.field_type__1->log();
TTCN_Logger::log_event_str(" }");
break;
case IuUP__PDU::ALT_type__14:
TTCN_Logger::log_event_str("{ type_14 := ");
single_value.field_type__14->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 IuUP__PDU_template::log_match(const IuUP__PDU& 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 IuUP__PDU::ALT_type__0:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".type_0");
single_value.field_type__0->log_match(match_value.type__0(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ type_0 := ");
single_value.field_type__0->log_match(match_value.type__0(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU::ALT_type__1:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".type_1");
single_value.field_type__1->log_match(match_value.type__1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ type_1 := ");
single_value.field_type__1->log_match(match_value.type__1(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case IuUP__PDU::ALT_type__14:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".type_14");
single_value.field_type__14->log_match(match_value.type__14(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ type_14 := ");
single_value.field_type__14->log_match(match_value.type__14(), 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 IuUP__PDU_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case IuUP__PDU::ALT_type__0:
single_value.field_type__0->set_implicit_omit(); break;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1->set_implicit_omit(); break;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14->set_implicit_omit(); break;
default: break;
}
}

void IuUP__PDU_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 IuUP__PDU::ALT_type__0:
single_value.field_type__0->encode_text(text_buf);
break;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1->encode_text(text_buf);
break;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @IuUP_Types.IuUP_PDU.");
}
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 @IuUP_Types.IuUP_PDU.");
}
}

void IuUP__PDU_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = IuUP__PDU::UNBOUND_VALUE;
IuUP__PDU::union_selection_type new_selection = (IuUP__PDU::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case IuUP__PDU::ALT_type__0:
single_value.field_type__0 = new IuUP__PDU__Type__0_template;
single_value.field_type__0->decode_text(text_buf);
break;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1 = new IuUP__PDU__Type__1_template;
single_value.field_type__1->decode_text(text_buf);
break;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14 = new IuUP__PDU__Type__14_template;
single_value.field_type__14->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @IuUP_Types.IuUP_PDU.");
}
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 IuUP__PDU_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 @IuUP_Types.IuUP_PDU.");
}
}

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

boolean IuUP__PDU_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 IuUP__PDU_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 `@IuUP_Types.IuUP_PDU'");
    }
    if (strcmp("type_0", param_field) == 0) {
      type__0().set_param(param);
      return;
    } else if (strcmp("type_1", param_field) == 0) {
      type__1().set_param(param);
      return;
    } else if (strcmp("type_14", param_field) == 0) {
      type__14().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@IuUP_Types.IuUP_PDU'", 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: {
    IuUP__PDU_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", "@IuUP_Types.IuUP_PDU");
    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, "type_0")) {
      type__0().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "type_1")) {
      type__1().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "type_14")) {
      type__14().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @IuUP_Types.IuUP_PDU.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    IuUP__PDU_template* precondition = new IuUP__PDU_template;
    precondition->set_param(*m_p->get_elem(0));
    IuUP__PDU_template* implied_template = new IuUP__PDU_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = IuUP__PDU_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@IuUP_Types.IuUP_PDU");
  }
  is_ifpresent = param.get_ifpresent();
}

void IuUP__PDU_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 IuUP__PDU::ALT_type__0:
single_value.field_type__0->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU");
return;
case IuUP__PDU::ALT_type__1:
single_value.field_type__1->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU");
return;
case IuUP__PDU::ALT_type__14:
single_value.field_type__14->check_restriction(t_res, t_name ? t_name : "@IuUP_Types.IuUP_PDU");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @IuUP_Types.IuUP_PDU.");
}
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 : "@IuUP_Types.IuUP_PDU");
}


/* Bodies of functions, altsteps and testcases */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

IuUP__PDU dec__IuUP__PDU(const OCTETSTRING& stream)
{
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("dec_IuUP_PDU(): Stream before decoding: ");
stream.log();
TTCN_Logger::end_event();
}
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
TTCN_EncDec::clear_error();
TTCN_Buffer ttcn_buffer(stream);
IuUP__PDU ret_val;
ret_val.decode(IuUP__PDU_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("dec_IuUP_PDU(): Decoded @IuUP_Types.IuUP_PDU: ");
ret_val.log();
TTCN_Logger::end_event();
}
if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()) {
ttcn_buffer.cut();
OCTETSTRING tmp_os;
ttcn_buffer.get_string(tmp_os);
TTCN_Logger::begin_event_log2str();
tmp_os.log();
CHARSTRING remaining_stream = TTCN_Logger::end_event_log2str();
TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_EXTRA_DATA, "dec_IuUP_PDU(): Data remained at the end of the stream after successful decoding: %s", (const char*) remaining_stream);
}
}
return ret_val;
}

IuUP__PDU_template ts__IuUP__INIT__ACK(const INTEGER& frame__nr, const INTEGER& version)
{
TTCN_Location current_location("IuUP_Types.ttcn", 252, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_INIT_ACK");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__14_template& tmp_0 = ret_val.type__14();
tmp_0.pdu__type() = 14;
tmp_0.ack__nack() = IuUP__AckNack::IuUP__ACKNACK__ACK;
tmp_0.frame__nr() = frame__nr;
{
IuUP__PDU14__ACK_template& tmp_1 = tmp_0.u().ack();
{
IuUP__PDU__Type__14__Common__Hdr_template& tmp_2 = tmp_1.hdr();
tmp_2.iuup__version() = version;
tmp_2.procedure__ind() = IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION;
tmp_2.header__crc() = 0;
tmp_2.payload__crc() = 0;
}
tmp_1.spare__ext() = OMIT_VALUE;
}
}
return ret_val;
}

IuUP__PDU_template tr__IuUP__INIT__ACK(const INTEGER_template& frame__nr, const INTEGER_template& version)
{
TTCN_Location current_location("IuUP_Types.ttcn", 271, TTCN_Location::LOCATION_TEMPLATE, "tr_IuUP_INIT_ACK");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__14_template& tmp_3 = ret_val.type__14();
tmp_3.pdu__type() = 14;
tmp_3.ack__nack() = IuUP__AckNack::IuUP__ACKNACK__ACK;
tmp_3.frame__nr() = frame__nr;
{
IuUP__PDU14__ACK_template& tmp_4 = tmp_3.u().ack();
{
IuUP__PDU__Type__14__Common__Hdr_template& tmp_5 = tmp_4.hdr();
tmp_5.iuup__version() = version;
tmp_5.procedure__ind() = IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION;
tmp_5.header__crc() = ANY_VALUE;
tmp_5.payload__crc() = ANY_VALUE;
}
tmp_4.spare__ext() = OMIT_VALUE;
}
}
return ret_val;
}

IuUP__InitRfci_template ts__IuUP__InitRfci(const BOOLEAN_template& lri, const BOOLEAN_template& li, const INTEGER_template& rfci__id, const RecOfU8_template& len8, const RecOfU16_template& len16, const IuUP__InitRfci_template& rfci)
{
TTCN_Location current_location("IuUP_Types.ttcn", 290, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_InitRfci");
IuUP__InitRfci_template ret_val;
ret_val.lri() = lri;
ret_val.li() = li;
ret_val.rfci__id() = rfci__id;
ret_val.len8() = len8;
ret_val.len16() = len16;
ret_val.rfci() = rfci;
return ret_val;
}

IuUP__PDU14__ProcSending__INIT_template ts__IuUP__PDU14__ProcSending__INIT(const BOOLEAN_template& ti, const INTEGER_template& subflows__per__rfci, const BOOLEAN_template& chain__ind, const IuUP__InitRfci_template& rfci, const IuUP__IPTI__List_template& IPTIs, const BITSTRING_template& versions__supported, const INTEGER_template& data__pdu__type)
{
TTCN_Location current_location("IuUP_Types.ttcn", 305, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_PDU14_ProcSending_INIT");
IuUP__PDU14__ProcSending__INIT_template ret_val;
ret_val.spare() = bs_0;
ret_val.ti() = ti;
ret_val.subflows__per__rfci() = subflows__per__rfci;
ret_val.chain__ind() = chain__ind;
ret_val.rfci() = rfci;
ret_val.IPTIs() = IPTIs;
ret_val.versions__supported() = versions__supported;
ret_val.data__pdu__type() = data__pdu__type;
ret_val.spare2() = bs_1;
return ret_val;
}

IuUP__PDU14__ProcSending__INIT_template tr__IuUP__PDU14__ProcSending__INIT(const BOOLEAN_template& ti, const INTEGER_template& subflows__per__rfci, const BOOLEAN_template& chain__ind, const IuUP__InitRfci_template& rfci, const IuUP__IPTI__List_template& IPTIs, const BITSTRING_template& versions__supported, const INTEGER_template& data__pdu__type)
{
TTCN_Location current_location("IuUP_Types.ttcn", 326, TTCN_Location::LOCATION_TEMPLATE, "tr_IuUP_PDU14_ProcSending_INIT");
IuUP__PDU14__ProcSending__INIT_template ret_val;
ret_val.spare() = bs_0;
ret_val.ti() = ti;
ret_val.subflows__per__rfci() = subflows__per__rfci;
ret_val.chain__ind() = chain__ind;
ret_val.rfci() = rfci;
ret_val.IPTIs() = IPTIs;
ret_val.versions__supported() = versions__supported;
ret_val.data__pdu__type() = data__pdu__type;
ret_val.spare2() = bs_1;
return ret_val;
}

IuUP__PDU_template ts__IuUP__INIT(const IuUP__PDU14__ProcSending__INIT_template& init, const INTEGER& frame__nr, const INTEGER& version)
{
TTCN_Location current_location("IuUP_Types.ttcn", 345, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_INIT");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__14_template& tmp_9 = ret_val.type__14();
tmp_9.pdu__type() = 14;
tmp_9.ack__nack() = IuUP__AckNack::IuUP__ACKNACK__CTRL;
tmp_9.frame__nr() = frame__nr;
{
IuUP__PDU14__ProcSending_template& tmp_10 = tmp_9.u().proc();
{
IuUP__PDU__Type__14__Common__Hdr_template& tmp_11 = tmp_10.hdr();
tmp_11.iuup__version() = version;
tmp_11.procedure__ind() = IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION;
tmp_11.header__crc() = 0;
tmp_11.payload__crc() = 0;
}
tmp_10.u().init() = init;
}
}
return ret_val;
}

IuUP__PDU_template tr__IuUP__INIT(const IuUP__PDU14__ProcSending__INIT_template& init, const OCTETSTRING_template& , const INTEGER_template& frame__nr, const INTEGER_template& version)
{
TTCN_Location current_location("IuUP_Types.ttcn", 366, TTCN_Location::LOCATION_TEMPLATE, "tr_IuUP_INIT");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__14_template& tmp_12 = ret_val.type__14();
tmp_12.pdu__type() = 14;
tmp_12.ack__nack() = IuUP__AckNack::IuUP__ACKNACK__CTRL;
tmp_12.frame__nr() = frame__nr;
{
IuUP__PDU14__ProcSending_template& tmp_13 = tmp_12.u().proc();
{
IuUP__PDU__Type__14__Common__Hdr_template& tmp_14 = tmp_13.hdr();
tmp_14.iuup__version() = version;
tmp_14.procedure__ind() = IuUP__ProcedureIndicator::IuUP__PRI__INITIALIZATION;
tmp_14.header__crc() = ANY_VALUE;
tmp_14.payload__crc() = ANY_VALUE;
}
tmp_13.u().init() = init;
}
}
return ret_val;
}

IuUP__PDU_template ts__IuUP__Type0(const INTEGER& frame__nr, const INTEGER& rfci, const OCTETSTRING& payload, const IuUP__FQC& fqc)
{
TTCN_Location current_location("IuUP_Types.ttcn", 389, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_Type0");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__0_template& tmp_15 = ret_val.type__0();
tmp_15.pdu__type() = 0;
tmp_15.frame__nr() = frame__nr;
tmp_15.fqc() = fqc;
tmp_15.rfci() = rfci;
tmp_15.header__crc() = 0;
tmp_15.payload__crc() = 0;
tmp_15.payload() = payload;
}
return ret_val;
}

IuUP__PDU_template tr__IuUP__Type0(const INTEGER_template& frame__nr, const INTEGER_template& rfci, const IuUP__FQC_template& fqc)
{
TTCN_Location current_location("IuUP_Types.ttcn", 402, TTCN_Location::LOCATION_TEMPLATE, "tr_IuUP_Type0");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__0_template& tmp_16 = ret_val.type__0();
tmp_16.pdu__type() = 0;
tmp_16.frame__nr() = frame__nr;
tmp_16.fqc() = fqc;
tmp_16.rfci() = rfci;
tmp_16.header__crc() = ANY_VALUE;
tmp_16.payload__crc() = ANY_VALUE;
tmp_16.payload() = ANY_VALUE;
}
return ret_val;
}

IuUP__PDU_template ts__IuUP__Type1(const INTEGER& frame__nr, const INTEGER& rfci, const OCTETSTRING& payload, const IuUP__FQC& fqc)
{
TTCN_Location current_location("IuUP_Types.ttcn", 415, TTCN_Location::LOCATION_TEMPLATE, "ts_IuUP_Type1");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__1_template& tmp_17 = ret_val.type__1();
tmp_17.pdu__type() = 1;
tmp_17.frame__nr() = frame__nr;
tmp_17.fqc() = fqc;
tmp_17.rfci() = rfci;
tmp_17.header__crc() = 0;
tmp_17.spare() = bs_3;
tmp_17.payload() = payload;
}
return ret_val;
}

IuUP__PDU_template tr__IuUP__Type1(const INTEGER_template& frame__nr, const INTEGER_template& rfci, const IuUP__FQC_template& fqc)
{
TTCN_Location current_location("IuUP_Types.ttcn", 429, TTCN_Location::LOCATION_TEMPLATE, "tr_IuUP_Type1");
IuUP__PDU_template ret_val;
{
IuUP__PDU__Type__1_template& tmp_18 = ret_val.type__1();
tmp_18.pdu__type() = 1;
tmp_18.frame__nr() = frame__nr;
tmp_18.fqc() = fqc;
tmp_18.rfci() = rfci;
tmp_18.header__crc() = ANY_VALUE;
tmp_18.spare() = ANY_VALUE;
tmp_18.payload() = ANY_VALUE;
}
return ret_val;
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("IuUP_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "IuUP_Types");
Osmocom__Types::module_object.pre_init_module();
module_object.add_function("f_enc_IuUP_PDU", (genericfunc_t)&f__enc__IuUP__PDU, NULL);
module_object.add_function("f_IuUP_compute_crc_header", (genericfunc_t)&f__IuUP__compute__crc__header, NULL);
module_object.add_function("f_IuUP_compute_crc_payload", (genericfunc_t)&f__IuUP__compute__crc__payload, NULL);
module_object.add_function("dec_IuUP_PDU", (genericfunc_t)&dec__IuUP__PDU, NULL);
}

void post_init_module()
{
TTCN_Location current_location("IuUP_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "IuUP_Types");
Osmocom__Types::module_object.post_init_module();
current_location.update_lineno(271);
/* IuUP_Types.ttcn, line 271 */
template_tr__IuUP__INIT__ACK_frame__nr_defval = ANY_VALUE;
current_location.update_lineno(271);
/* IuUP_Types.ttcn, line 271 */
template_tr__IuUP__INIT__ACK_version_defval = ANY_VALUE;
current_location.update_lineno(296);
/* IuUP_Types.ttcn, line 296 */
template_ts__IuUP__InitRfci_rfci_defval = OMIT_VALUE;
current_location.update_lineno(306);
/* IuUP_Types.ttcn, line 306 */
template_ts__IuUP__PDU14__ProcSending__INIT_ti_defval = TRUE;
current_location.update_lineno(307);
/* IuUP_Types.ttcn, line 307 */
template_ts__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval = 3;
current_location.update_lineno(308);
/* IuUP_Types.ttcn, line 308 */
template_ts__IuUP__PDU14__ProcSending__INIT_chain__ind_defval = FALSE;
current_location.update_lineno(309);
/* IuUP_Types.ttcn, line 309 */
{
RecOfU8_template tmp_6;
tmp_6.set_size(3);
tmp_6[0] = 81;
tmp_6[1] = 103;
tmp_6[2] = 60;
RecOfU8_template tmp_7;
tmp_7.set_size(3);
tmp_7[0] = 39;
tmp_7[1] = 0;
tmp_7[2] = 0;
RecOfU8_template tmp_8;
tmp_8.set_size(3);
tmp_8[0] = 0;
tmp_8[1] = 0;
tmp_8[2] = 0;
template_ts__IuUP__PDU14__ProcSending__INIT_rfci_defval = ts__IuUP__InitRfci(BOOLEAN_template(FALSE), BOOLEAN_template(FALSE), INTEGER_template(0), tmp_6, RecOfU16_template(OMIT_VALUE), ts__IuUP__InitRfci(BOOLEAN_template(FALSE), BOOLEAN_template(FALSE), INTEGER_template(1), tmp_7, RecOfU16_template(OMIT_VALUE), ts__IuUP__InitRfci(BOOLEAN_template(TRUE), BOOLEAN_template(FALSE), INTEGER_template(2), tmp_8, RecOfU16_template(OMIT_VALUE), IuUP__InitRfci_template(OMIT_VALUE))));
}
current_location.update_lineno(312);
/* IuUP_Types.ttcn, line 312 */
template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval.set_size(3);
template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval[0] = 1;
template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval[1] = 7;
template_ts__IuUP__PDU14__ProcSending__INIT_IPTIs_defval[2] = 1;
current_location.update_lineno(313);
/* IuUP_Types.ttcn, line 313 */
template_ts__IuUP__PDU14__ProcSending__INIT_versions__supported_defval = bs_2;
current_location.update_lineno(314);
/* IuUP_Types.ttcn, line 314 */
template_ts__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval = 0;
current_location.update_lineno(327);
/* IuUP_Types.ttcn, line 327 */
template_tr__IuUP__PDU14__ProcSending__INIT_ti_defval = ANY_VALUE;
current_location.update_lineno(328);
/* IuUP_Types.ttcn, line 328 */
template_tr__IuUP__PDU14__ProcSending__INIT_subflows__per__rfci_defval = ANY_VALUE;
current_location.update_lineno(329);
/* IuUP_Types.ttcn, line 329 */
template_tr__IuUP__PDU14__ProcSending__INIT_chain__ind_defval = ANY_VALUE;
current_location.update_lineno(330);
/* IuUP_Types.ttcn, line 330 */
template_tr__IuUP__PDU14__ProcSending__INIT_rfci_defval = ANY_VALUE;
current_location.update_lineno(331);
/* IuUP_Types.ttcn, line 331 */
template_tr__IuUP__PDU14__ProcSending__INIT_IPTIs_defval = ANY_OR_OMIT;
current_location.update_lineno(332);
/* IuUP_Types.ttcn, line 332 */
template_tr__IuUP__PDU14__ProcSending__INIT_versions__supported_defval = ANY_VALUE;
current_location.update_lineno(333);
/* IuUP_Types.ttcn, line 333 */
template_tr__IuUP__PDU14__ProcSending__INIT_data__pdu__type_defval = ANY_VALUE;
current_location.update_lineno(345);
/* IuUP_Types.ttcn, line 345 */
const_ts__IuUP__INIT_frame__nr_defval = 0;
current_location.update_lineno(345);
/* IuUP_Types.ttcn, line 345 */
const_ts__IuUP__INIT_version_defval = 0;
current_location.update_lineno(366);
/* IuUP_Types.ttcn, line 366 */
template_tr__IuUP__INIT_init_defval = ANY_VALUE;
current_location.update_lineno(366);
/* IuUP_Types.ttcn, line 366 */
template_tr__IuUP__INIT_payload_defval = ANY_VALUE;
current_location.update_lineno(366);
/* IuUP_Types.ttcn, line 366 */
template_tr__IuUP__INIT_frame__nr_defval = ANY_VALUE;
current_location.update_lineno(367);
/* IuUP_Types.ttcn, line 367 */
template_tr__IuUP__INIT_version_defval = ANY_VALUE;
current_location.update_lineno(390);
/* IuUP_Types.ttcn, line 390 */
const_ts__IuUP__Type0_fqc_defval = IuUP__FQC::IuUP__FQC__GOOD;
current_location.update_lineno(402);
/* IuUP_Types.ttcn, line 402 */
template_tr__IuUP__Type0_frame__nr_defval = ANY_VALUE;
current_location.update_lineno(402);
/* IuUP_Types.ttcn, line 402 */
template_tr__IuUP__Type0_rfci_defval = ANY_VALUE;
current_location.update_lineno(403);
/* IuUP_Types.ttcn, line 403 */
template_tr__IuUP__Type0_fqc_defval = ANY_VALUE;
current_location.update_lineno(416);
/* IuUP_Types.ttcn, line 416 */
const_ts__IuUP__Type1_fqc_defval = IuUP__FQC::IuUP__FQC__GOOD;
current_location.update_lineno(429);
/* IuUP_Types.ttcn, line 429 */
template_tr__IuUP__Type1_frame__nr_defval = ANY_VALUE;
current_location.update_lineno(429);
/* IuUP_Types.ttcn, line 429 */
template_tr__IuUP__Type1_rfci_defval = ANY_VALUE;
current_location.update_lineno(430);
/* IuUP_Types.ttcn, line 430 */
template_tr__IuUP__Type1_fqc_defval = ANY_VALUE;
}


} /* end of namespace */
